        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
        }
        
        :root {
            --header-height: calc(48px + env(safe-area-inset-top, 16px));
            
            /* Base Colors - 6 shades */
            --color-bg-darkest: #111827;  /* Primary background */
            --color-bg-dark: #1f2937;     /* Secondary/header background */
            --color-bg-medium: #2a313e;   /* Tertiary/input background */
            --color-bg-light: #343d4e;    /* Quaternary/card background */
            --color-bg-lighter: #373e49;  /* Hover states */
            --color-bg-accent: #334970;   /* Primary buttons */
            
            /* Text Colors - 3 shades */
            --color-text-primary: #ffffff;
            --color-text-secondary: #d1d5db;
            --color-text-muted: #b4bdd0;
            
            /* Accent Colors - 3 colors */
            --color-accent-blue: #3b82f6;   /* Focus/current states */
            --color-accent-green: #364e36;  /* Success states */
            --color-accent-red: #d83939;    /* Error states */
            --color-accent-red-muted: #852727;    /* Failed dailies */
        }

        html {
            height: -webkit-fill-available;
        }

        body {
            font-family: 'Atkinson Hyperlegible', sans-serif;
            background-color: var(--color-bg-darkest);
            color: var(--color-text-primary);
            margin: 0;
            min-height: 100vh;
            min-height: -webkit-fill-available;
            overflow: hidden;
            position: fixed;
            width: 100%;
            height: 100%;
        }
        
        /* LAYOUT */
        #app {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            overflow: hidden;
        }

        .header {
            background-color: var(--color-bg-dark);
            padding: env(safe-area-inset-top, 16px) 12% 12px 12%;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            min-height: var(--header-height);
            flex-shrink: 0;
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            position: relative; /* Make header relative for absolute positioning of center button */
        }
        
        .main-container {
            flex: 1;
            overflow-y: scroll;
            -webkit-overflow-scrolling: touch;
            position: relative;
            scrollbar-width: none;  /* Firefox */
            -ms-overflow-style: none;  /* Internet Explorer and Edge */
            padding: 0;
            margin: 0;
        }
        
        .main-container::-webkit-scrollbar {
            display: none;  /* Chrome, Safari, and Opera */
        }

        /* View transition animations - only animate with entering class */
        .scroll-container, .settings-container, .daily-container {
            /* No default animation */
        }

        /* When exiting left, content fades out left */
        .main-container.exiting-left .scroll-container,
        .main-container.exiting-left .settings-container,
        .main-container.exiting-left .daily-container {
            animation: viewSlideOutLeft 0.15s ease-in forwards;
        }

        /* When exiting right, content fades out right */
        .main-container.exiting-right .scroll-container,
        .main-container.exiting-right .settings-container,
        .main-container.exiting-right .daily-container {
            animation: viewSlideOutRight 0.15s ease-in forwards;
        }

        /* Enter from left (when going left) */
        .scroll-container.entering-left, 
        .settings-container.entering-left, 
        .daily-container.entering-left {
            animation: viewSlideInLeft 0.2s ease-out;
        }

        /* Enter from right (when going right) */
        .scroll-container.entering-right, 
        .settings-container.entering-right, 
        .daily-container.entering-right {
            animation: viewSlideInRight 0.2s ease-out;
        }

        @keyframes viewSlideOutLeft {
            from {
                opacity: 1;
                transform: translateX(0);
            }
            to {
                opacity: 0;
                transform: translateX(-30px);
            }
        }

        @keyframes viewSlideOutRight {
            from {
                opacity: 1;
                transform: translateX(0);
            }
            to {
                opacity: 0;
                transform: translateX(30px);
            }
        }

        @keyframes viewSlideInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes viewSlideInRight {
            from {
                opacity: 0;
                transform: translateX(30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .settings-container, .daily-container {
            padding: 16px 12%;
            min-height: 100%;
        }
        
        .scroll-container {
            padding: 16px 12%;
            margin: 0;
            min-height: 100%;
            position: relative;
            /* Hide default scrollbar */
            scrollbar-width: none;  /* Firefox */
            -ms-overflow-style: none;  /* Internet Explorer and Edge */
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
        
        .scroll-container::-webkit-scrollbar {
            display: none;  /* Chrome, Safari, and Opera */
        }
        
        /* BUTTONS & INPUTS */
        .btn {
            background: none;
            border: none;
            color: var(--color-text-muted);
            cursor: pointer;
            transition: color 0.2s;
            font-size: clamp(1.1rem, 4vw, 1.3rem);
        }
        
        .btn:hover {
            color: var(--color-text-primary);
        }

        .btn.active-view {
            color: var(--color-text-primary);
            font-weight: 700;
            border-bottom: 2px solid var(--color-text-primary);
            padding-bottom: 2px;
        }
        
        .btn-active {
            color: var(--color-text-primary);
            font-weight: 700;
        }
        
        input, select, textarea {
            background: none;
            border: none;
            color: var(--color-text-muted);
            font-family: inherit;
            transition: color 0.2s;
        }
        
        input:focus, select:focus, textarea:focus {
            outline: none;
            color: var(--color-text-primary);
        }
        
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        
        input[type=number] {
            -webkit-appearance: textfield;
            appearance: textfield;
        }
        
        textarea {
            color: var(--color-text-secondary);
            font-size: 20px;
        }       
        /* HEADER */
        .header h1 {
            font-size: clamp(1.2rem, 4vw, 1.8rem);
            font-weight: 700;
            cursor: pointer;
            transition: color 0.2s;
            color: var(--color-text-muted);
            padding-top: 16px;
        }
        
        .header h1:hover {
            color: var(--color-text-primary);
        }
        
        .header-buttons {
            display: flex;
            gap: 2rem;
            align-items: center;
        }
        
        .btn-label {
            font-size: clamp(1.1rem, 2.5vw, 1.3rem);
            vertical-align: middle;
        }
        
        /* DATE NAVIGATION */
        .date-nav {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            margin-bottom: 1rem;
            padding-top: 1rem;
            position: relative;
        }
        
        .date-nav-left {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--color-text-muted);
            grid-column: 1;
            justify-self: start;
        }
        
        .date-nav-right {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--color-text-muted);
            grid-column: 3;
            justify-self: end;
        }
        
        .date-input {
            font-size: clamp(1.2rem, 5vw, 1.5rem);
            text-align: center;
            width: clamp(120px, 30vw, 140px);
            cursor: pointer;
        }
        .date-btn {
            background-color: transparent;
            color: var(--color-text-muted);
            cursor: pointer;
            transition: color 0.2s;
            font-size: clamp(1.2rem, 5vw, 1.5rem);
        }
        .secondary-btn {
            font-size: clamp(1.2rem, 5vw, 1.5rem);
        }
        
        .jump-btn {
            background-color: var(--color-bg-dark);
            color: var(--color-text-muted);
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            cursor: pointer;
            transition: color 0.2s;
            font-size: clamp(0.8rem, 3vw, 1rem);
            min-width: max-content;
        }
        
        #wipeDayBtn {
            width: fit-content;
            flex-shrink: 0;
        }
        
        .jump-btn:hover {
            color: var(--color-text-secondary);
        }
        
        .jump-btn.wipe-confirmation {
            animation: morph-confirm 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

.jump-btn.wipe-closing {
    animation: morph-close 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes morph-confirm {
    0% { 
        background-color: transparent;
        color: var(--color-text-muted);
        padding-left: 1rem;
        padding-right: 1rem;
    }
    50% {
        background-color: rgba(211, 57, 57, 0.3);
        color: var(--color-text-muted);
    }
    100% { 
        background-color: var(--color-accent-red-muted);
        color: var(--color-text-primary);
        padding-left: 1.2rem;
        padding-right: 1.2rem;
        font-weight: bold;
    }
}

@keyframes morph-close {
    0% { 
        background-color: var(--color-accent-red-muted);
        color: var(--color-text-primary);
        padding-left: 1.2rem;
        padding-right: 1.2rem;
        font-weight: bold;
    }
    50% {
        background-color: rgba(211, 57, 57, 0.3);
        color: var(--color-text-muted);
    }
    100% { 
        background-color: transparent;
        color: var(--color-text-muted);
        padding-left: 1rem;
        padding-right: 1rem;
        font-weight: normal;
            0% { transform: scale(1); opacity: 0.9; }
            100% { transform: scale(1.02); opacity: 1; }
        }
        }
        
        /* GOALS */
        .goals-section {
            margin-bottom: 16px;
            padding: 0px;
            background-color: transparent;
            border-radius: 8px;
        }
        
        .goals-title {
            font-weight: 600;
            color: var(--color-text-secondary);
            margin-bottom: 8px;
        }
        
        .goal-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            margin-bottom: 4px;
            padding: 4px 8px;
            border-radius: 4px;
            width: fit-content;
        }
        
        .goal-item.passed {
            background-color: var(--color-accent-green);
        }
        
        .goal-item.failed {
            background-color: var(--color-accent-red-muted);
        }
        
        .goal-text {
            color: var(--color-text-secondary);
            font-size: 1.6em;
            font-weight: 500;
        }
        
        .no-goals {
            padding: 8px 12px;
            border-radius: 4px;
            background-color: var(--color-bg-medium);
            color: var(--color-text-muted);
            text-align: center;
            font-size: 14px;
        }
        
        /* HOURS */
        .hour-row {
            position: relative;
            margin-bottom: 8px;
        }
        
        .hour-entry {
            position: relative;
            cursor: pointer;
            padding: 12px 16px;
            border-radius: 4px;
            background-color: var(--color-bg-light);
            overflow: hidden;
            transition: all 0.3s ease-in-out, min-height 0.3s ease-in-out;
            min-height: 68px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .hour-entry:hover {
            background-color: var(--color-bg-lighter);
        }
        
        .hour-entry.current {
            box-shadow: 0 0 0 2px var(--color-accent-blue);
        }

        /* Hide current hour outline when overlay is open (unless editing) */
        .hours-container:has(.emoji-picker-overlay) .hour-entry.current:not(.editing) {
            box-shadow: none;
        }
        
        .hour-entry.editing {
            position: relative;
            box-shadow: 0 0 0 2px var(--color-accent-blue);
            z-index: 1002;
            user-select: text;
        }
        
        .hour-fill {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background-color: var(--color-bg-accent);
        }
        
        .hour-fill.empty {
            background-color: var(--color-bg-dark);
        }
        
        .hour-content {
            position: relative;
            display: flex;
            align-items: flex-start;
            gap: 6px;
        }
        
        .hour-time {
            font-size: 24px;
            width: 32px;
        }
        
        .hour-emojis {
            display: grid;
            grid-template-columns: repeat(2, 30px);
            gap: 4px;
            min-height: 30px;
            max-height: calc(30px * 3 + 8px);
            overflow: hidden;
            max-width: 64px;
            min-width: 64px;
            padding-right: 24px;
        }
        
        .hour-entry:not(.editing) .hour-content:has(.hour-text:empty) .hour-emojis {
            display: flex;
            flex-wrap: nowrap;
            gap: 4px;
            max-width: none;
            min-width: 0;
            overflow-x: auto;
        }
        
        .emoji {
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 28px;
            min-height: 28px;
        }
        
        .hour-input-container {
            flex: 1;
            display: flex;
            align-items: flex-start;
            position: relative;
        }
        
        .hour-input {
            flex: 1;
            background: transparent;
            color: var(--color-text-secondary);
            resize: none;
            overflow: hidden;
            min-height: 36px;
            line-height: 1.5;
            margin-top: 4px;
            transition: height 0.15s ease-out;
            user-select: text;
            white-space: pre-wrap;
        }
        
        .hour-input::placeholder {
            color: var(--color-text-muted);
        }
        
        .hour-input.empty {
            color: var(--color-text-muted);
        }
        
        .hour-input.scrolling {
            overflow-y: auto;
        }
        
        .hour-text {
            color: var(--color-text-secondary);
            font-size: 20px;
            white-space: pre-wrap;
        }
        
        .clear-btn {
            position: absolute;
            right: 0;
            top: 0;
            background: none;
            border: none;
            color: var(--color-accent-red);
            cursor: pointer;
            font-size: 36px;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
            z-index: 2;
        }
        
        /* EMOJI PICKER */
        .emoji-picker {
            position: absolute;
            left: 0;
            right: 0;
            background-color: var(--color-bg-dark);
            padding: 12px;
            display: grid;
            grid-template-columns: repeat(auto-fit, 64px);
            justify-content: center;
            gap: 8px;
            z-index: 1001;
            border-radius: 4px;
            box-shadow: 0 10px 25px var(rgba(0, 0, 0, 0.5));
            overflow: hidden;
        }
        
        .emoji-picker.above {
            bottom: 100%;
            margin-bottom: 8px;
        }
        
        .emoji-picker.below {
            top: 100%;
            margin-top: 8px;
        }

        /* Emoji picker open/close animations */
        .emoji-picker.opening {
            animation: emojiPickerFadeIn 0.3s ease-out forwards;
            border: 2px solid var(--color-accent-blue);
        }

        .emoji-picker.active {
            border: 2px solid var(--color-accent-blue);
        }

        .emoji-picker.closing {
            animation: emojiPickerFadeOut 0.2s ease-in forwards;
            border: 2px solid var(--color-accent-blue);
        }

        @keyframes emojiPickerFadeIn {
            from {
                opacity: 0;
                max-height: 0;
                padding: 0 12px;
            }
            to {
                opacity: 1;
                max-height: 200px;
                padding: 12px;
            }
        }

        @keyframes emojiPickerFadeOut {
            from {
                opacity: 1;
                max-height: 200px;
                padding: 12px;
            }
            to {
                opacity: 0;
                max-height: 0;
                padding: 0 12px;
            }
        }

        /* Overlay for emoji picker */
        .emoji-picker-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1000;
            pointer-events: auto;
            background: rgba(0, 0, 0, 0);
        }

        .emoji-picker-overlay.active {
            background: rgba(0, 0, 0, 0.5);
        }

        .emoji-picker-overlay.opening {
            animation: overlayFadeIn 0.3s ease-out forwards;
        }

        .emoji-picker-overlay.closing {
            animation: overlayFadeOut 0.2s ease-in forwards;
        }

        @keyframes overlayFadeIn {
            from {
                background: rgba(0, 0, 0, 0);
            }
            to {
                background: rgba(0, 0, 0, 0.5);
            }
        }

        @keyframes overlayFadeOut {
            from {
                background: rgba(0, 0, 0, 0.5);
            }
            to {
                background: rgba(0, 0, 0, 0);
            }
        }
        
        .emoji-btn {
            padding: 8px;
            font-size: 48px;
            background: none;
            border: none;
            cursor: pointer;
            transition: background-color 0.2s;
            border-radius: 4px;
        }
        
        .emoji-btn:hover {
            background-color: var(--color-bg-lighter);
        }
        
        .emoji-btn.selected {
            background-color: var(--color-bg-accent);
        }
        
        .emoji-btn.selected:hover {
            background-color: var(--color-accent-blue);
        }
        
        /* SCROLL BAR */
        .scroll-bar {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            width: 48px;
            cursor: ns-resize;
            transition: all 0.2s;
            background: repeating-linear-gradient(
                45deg,
                transparent 0px,
                transparent 3px,
                rgba(255,255,255,0.08) 3px,
                rgba(255,255,255,0.08) 4px,
                transparent 4px,
                transparent 8px
            ),
            repeating-linear-gradient(
                -45deg,
                transparent 0px,
                transparent 3px,
                rgba(255,255,255,0.08) 3px,
                rgba(255,255,255,0.08) 4px,
                transparent 4px,
                transparent 8px
            );
        }
        
        .scroll-bar.hidden {
            display: none;
        }
        
        .scroll-bar.dragging {
            background-color: var(rgba(255, 255, 255, 0.1));
        }
        
        .hour-indicator {
            position: absolute;
            right: 8px;
            width: 0;
            height: 0;
            border-left: 6px solid var(--color-accent-blue);
            border-top: 3px solid transparent;
            border-bottom: 3px solid transparent;
            animation: pulse 2s infinite;
            pointer-events: none;
            transform: translateY(-50%);
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        /* SETTINGS */
        .setting-group {
            margin-bottom: 24px;
        }
        
        .setting-label {
            display: block;
            color: var(--color-text-secondary);
            margin-bottom: 8px;
            font-size: 1.5rem;
        }
        
        .setting-input {
            width: 100%;
            padding: 12px;
            background-color: var(--color-bg-medium);
            color: var(--color-text-primary);
            border-radius: 4px;
            font-size: 18px;
            font-family: 'Atkinson Hyperlegible', monospace;
        }
        .emoji-input {
            font-size: 1.2em;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
            letter-spacing: normal;
            line-height: 1.5;
            min-height: 6em;
            resize: none;
            transition: all 0.3s ease;
        }
        
        .emoji-modal .emoji-input {
            width: 100%;
            height: calc(100% - 20px);
            resize: none;
            font-size: 1.1em;
            padding: 20px;
            border: none;
            outline: none;
        }
        
        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 18px;
            font-weight: 500;
            cursor: pointer;
            padding: 12px 16px;
            background-color: var(--color-bg-lighter);
            border-radius: 8px;
            border: 2px solid transparent;
            transition: all 0.2s;
            user-select: none;
            min-height: 48px;
        }
        
        .checkbox-label:hover {
            background-color: var(--color-bg-lighter);
            border-color: var(--color-text-muted);
        }
        
        .checkbox {
            width: 24px;
            height: 24px;
            cursor: pointer;
        }
        
        .add-goal-btn, .export-btn {
            background-color: var(--color-bg-accent);
            color: var(--color-text-primary);
            border: 2px solid transparent;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 18px;
            font-weight: 500;
            min-height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .add-goal-btn:hover, .export-btn:hover {
            background-color: var(--color-accent-blue);
            border-color: var(--color-accent-blue);
            transform: translateY(-1px);
        }
        
        /* GOAL EDITOR */
        .goal-row {
            position: relative;
            margin-bottom: 12px;
            display: flex;
            justify-content: center;
        }
        
        .goal-summary {
            cursor: pointer;
            padding: 12px;
            background-color: var(--color-bg-medium);
            border-radius: 6px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 12px;
            width:100%
        }
        
        .goal-summary:hover {
            background-color: var(--color-bg-lighter);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px var(rgba(0, 0, 0, 0.2));
        }
        
        .goal-summary.editing {
            background-color: var(--color-bg-dark);
            box-shadow: 0 4px 12px var(rgba(0, 0, 0, 0.3));
            transform: scale(1.02);
        }
                
        .goal-text-display {
            color: var(--color-text-secondary);
            flex: 1;
            font-size: 1.2rem;
        }
        
        /* SHARED MODAL STYLES */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .modal {
            position: relative;
            width: min(95%, 1000px);
            max-width: 1000px;
            max-height: 90vh;
            padding: 8px;
            background-color: var(--color-bg-dark);
            border-radius: 8px;
            border: 2px solid var(--color-bg-lighter);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            animation: slideIn 0.2s ease-out;
            overflow-y: auto;
        }
        
        @keyframes slideIn {
            from { 
                opacity: 0;
                transform: scale(0.95) translateY(-10px);
            }
            to { 
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        /* SHARED MODAL STYLES */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .modal {
            position: relative;
            width: min(95%, 1000px);
            max-width: 1000px;
            max-height: 90vh;
            padding: 4px;
            background-color: var(--color-bg-dark);
            border-radius: 8px;
            border: 2px solid var(--color-bg-lighter);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            animation: slideIn 0.2s ease-out;
            overflow-y: auto;
        }
        
        @keyframes slideIn {
            from { 
                opacity: 0;
                transform: scale(0.95) translateY(-10px);
            }
            to { 
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .remove-goal-btn {
            background: none;
            border: none;
            color: var(--color-text-muted);
            cursor: pointer;
            font-size: 20px;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .remove-goal-btn:hover {
            background-color: var(--color-bg-lighter);
            color: var(--color-accent-red);
        }
        
        .goal-editor-section {
            width: 100%;
        }
        
        .goal-editor {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: min(95%, 1000px);
            max-width: 1000px;
            padding: 32px;
            background-color: var(--color-bg-dark);
            border-radius: 8px;
            border: 2px solid var(--color-bg-lighter);
            z-index: 1100;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .goal-emoji-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
            gap: 8px;
            margin-bottom: 8px;
            width: 100%;
            max-height: 200px;
            overflow-y: auto;
            padding: 2px;
            border-radius: 8px;
        }

        .operator-value-group {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: nowrap;
            background: var(--color-bg-darkest);
            padding: 8px;
            border-radius: 8px;
            min-width: 100%;
        }
        
        .goal-emoji-btn {
            background: var(--color-bg-darkest);
            border: 2px solid transparent;
            border-radius: 6px;
            cursor: pointer;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 8px;
            transition: all 0.2s;
        }
        
        .goal-emoji-btn:hover {
            background-color: var(--color-bg-lighter);
            transform: scale(1.05);
        }
        
        .goal-emoji-btn.selected {
            border-color: var(--color-accent-blue);
            background-color: var(--color-bg-dark);
        }
        
        .goal-toggle {
            background-color: var(--color-bg-medium);
            color: var(--color-text-secondary);
            padding: 10px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            white-space: nowrap;
            transition: all 0.2s;
            min-height: 40px;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .goal-toggle:hover {
            background-color: var(--color-bg-lighter);
            transform: translateY(-1px);
        }
        
        .goal-action-btn,
        .goal-operator-btn {
            background-color: var(--color-bg-medium);
            color: var(--color-text-secondary);
            padding: 10px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            white-space: nowrap;
            transition: all 0.2s;
            min-height: 40px;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .goal-action-btn:hover,
        .goal-operator-btn:hover {
            background-color: var(--color-bg-lighter);
            border-color: var(--color-accent-blue);
            transform: translateY(-1px);
        }
        
        .goal-value-input {
            width: 60px;
            padding: 8px 10px;
            background-color: var(--color-bg-medium);
            border-radius: 6px;
            color: var(--color-text-secondary);
            font-size: 1rem;
            text-align: center;
            flex-shrink: 0;
            min-height: 40px;
            box-sizing: border-box;
        }
        
        .goal-times-text {
            color: var(--color-text-secondary);
            font-size: 1rem;
            font-weight: 500;
            white-space: nowrap;
            flex-shrink: 0;
        }
        
        .goal-operator-btn:hover {
            background-color: var(--color-bg-lighter);
            border-color: var(--color-accent-blue);
        }
        
        .goal-value-input {
            width: 70px;
            text-align: center;
            background-color: var(--color-bg-medium);
            color: var(--color-text-secondary);
            border: 2px solid transparent;
            border-radius: 6px;
            padding: 10px;
            font-size: 16px;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            transition: all 0.2s;
        }
        
        .goal-value-input:hover,
        .goal-value-input:focus {
            background-color: var(--color-bg-lighter);
            border-color: var(--color-accent-blue);
            outline: none;
        }
        
        .goal-editor-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-top: 24px;
        }
        
        .goal-action-btn {
            padding: 10px 20px;
            border: 2px solid transparent;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.2s;
            background-color: var(--color-bg-medium);
            color: var(--color-text-secondary);
        }
        
        .goal-action-btn:hover {
            background-color: var(--color-bg-lighter);
            border-color: var(--color-accent-blue);
        }
        
        .goal-action-btn.secondary:hover {
            background-color: var(--color-bg-lighter);
        }
        
        /* EXPORT/IMPORT */
        .export-section {
            background-color: var(--color-bg-medium);
            border-radius: 4px;
            overflow: hidden;
        }

        .export-toggle {
            width: 100%;
            background-color: var(--color-bg-medium);
            color: var(--color-text-primary);
            border: none;
            padding: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .export-toggle:hover {
            background-color: var(--color-bg-lighter);
        }
        
        .export-arrow {
            transition: transform 0.2s;
        }
        
        .export-arrow.open {
            transform: rotate(180deg);
        }
        
        .export-content {
            padding: 12px;
            background-color: var(--color-bg-medium);
        }
        
        .import-section {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }
        
        .import-input {
            flex: 1;
            padding: 8px;
            background-color: var(--color-bg-lighter);
            color: var(--color-text-primary);
            border-radius: 4px;
            font-size: 14px;
        }
        
        .export-help {
            font-size: 12px;
            color: var(--color-text-muted);
            padding-top: 8px;
            border-top: 1px solid var(--color-bg-lighter);
        }
        
        /* DAILY VIEW */
        .bubbles-container {
            border-radius: 8px;
            height: 550px;
            max-height: 60vh; /* Increased from 50vh to 80vh for more space */
            position: relative;
            overflow: hidden;
            border: 1px solid var(--color-bg-medium);
            margin-bottom: 24px;
            outline: none;
        }
        
        .bubbles-container.billiards-mode {
            background-color: rgba(0, 100, 0, 0.2);
        }
        
        .bubbles-container.repulsion-mode {
            background-color: rgba(139, 0, 0, 0.2); /* Increased opacity for visibility */
        }
        
        .bubble {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            color: var(--color-text-primary);
            background-color: var(--color-bg-dark);
        }
        
        .dailies-section h3 {
            font-size: 1.5rem;
            color: var(--color-text-secondary);
            margin-bottom: 12px;
        }
        
        .no-goals-daily {
            color: var(--color-text-muted);
            font-size: 14px;
        }
        
        /* ANIMATIONS */
        @keyframes flash-border {
            0% { box-shadow: 0 0 0 2px white; }
            100% { box-shadow: none; }
        }
        
        @keyframes copy-success {
            0% { 
                transform: scale(1); 
                background-color: var(--color-bg-dark);
                color: var(--color-text-muted);
            }
            20% { 
                transform: scale(1.05); 
                background-color: var(--color-accent-green);
                color: var(--color-text-primary);
            }
            40% { 
                transform: scale(0.98); 
            }
            60% { 
                transform: scale(1.02); 
            }
            100% { 
                transform: scale(1); 
                background-color: var(--color-accent-green);
                color: var(--color-text-primary);
            }
        }
        
        @keyframes wipe-success {
            0% { 
                transform: scale(1); 
                background-color: var(--color-accent-red-muted);
                color: var(--color-text-primary);
            }
            15% { 
                transform: scale(1.08); 
                background-color: var(--color-accent-red);
                color: var(--color-text-primary);
            }
            30% { 
                transform: scale(0.95);
                background-color: var(--color-accent-red-muted); 
            }
            45% { 
                transform: scale(1.03);
                background-color: var(--color-accent-red); 
            }
            60% { 
                transform: scale(0.99);
                background-color: var(--color-accent-red-muted); 
            }
            75% { 
                transform: scale(1.01);
                background-color: var(--color-accent-red); 
            }
            100% { 
                transform: scale(1); 
                background-color: var(--color-accent-red);
                color: var(--color-text-primary);
            }
        }
        
        .hour-entry.flash {
            animation: flash-border 0.5s ease;
        }
        
        .copy-success {
            animation: copy-success 0.6s ease-out;
        }
        
        .wipe-success {
            animation: wipe-success 0.8s ease-out;
        }
        
        /* SWIPE INDICATOR */
        .swipe-indicator {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            border-radius: 50px;
            padding: 12px 20px;
            font-size: 24px;
            z-index: 1500;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }
        
        .swipe-indicator.left {
            left: 20px;
        }
        
        .swipe-indicator.right {
            right: 20px;
        }
        
            /* MOBILE */
        @media (max-width: 768px) {
            .scroll-bar { display: none !important; }
            .header { 
                padding: calc(env(safe-area-inset-top, 16px)) 16px 8px 16px;
                min-height: var(--header-height);
            }
            .settings-container, .daily-container { 
                padding: 16px;
                margin-top: 0;
            }
            
            /* Make daily view buttons display in one row on mobile */
            .daily-container > div:first-child {
                flex-direction: row !important;
                gap: 4px !important;
                flex-wrap: nowrap !important;
            }
            
            .daily-container .jump-btn {
                flex: 1 !important;
                width: auto !important;
                text-align: center;
                font-size: clamp(0.7rem, 2.5vw, 0.9rem) !important;
                padding: 0.2rem 0.3rem !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
            }            .main-container:has(.daily-container) {
                overflow: hidden;
            }
            
            .daily-container {
                height: 100%;
                overflow: hidden;
                display: flex;
                flex-direction: column;
            }
            
            .dailies-section {
                flex: 1;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                min-height: 0;
            }
            
            .bubbles-container {
                height: 50%;
                flex-shrink: 0;
            }
            
            .scroll-container { 
                padding: 16px 0; 
                margin: 0 16px;
            }
            .header h1 { font-size: 1.4em; }
            .btn { font-size: 1.3em !important; }
            .btn-label { font-size: 0.8 em; }
            .date-nav { margin-bottom: 12px; }
            .secondary-btn, .date-input { font-size: 22px; }
            .date-input { width: 140px; }
            .hour-time { font-size: 20px; width: 28px; }
            .hour-emojis { grid-template-columns: repeat(2, 26px); gap: 2px; max-width: 54px; min-width: 54px; }
            .emoji { font-size: 24px; min-height: 24px; }
            .hour-text, .hour-input { font-size: 16px; }
            .emoji-picker { grid-template-columns: repeat(auto-fit, 42px); gap: 4px; padding: 8px; }
            .emoji-btn { width: 48px; height: 48px; font-size: 28px; }
            .setting-label, .setting-input, .checkbox-label { font-size: 16px; }
            .setting-input { padding: 10px; }
            .checkbox { width: 18px; height: 18px; }
            .dailies-section h3 { font-size: 16px; }
            .goal-text-display { font-size: 16px; }
            .goal-text { font-size: 1.3em;  }
            .add-goal-btn, .export-btn { 
                white-space: nowrap; 
                padding: 8px 16px;
                font-size: 16px;
                min-height: 40px;
            }
            .goal-summary { padding: 8px; gap: 8px; }
            .hour-entry { padding: 8px 12px; }
            .setting-group { margin-bottom: 16px; }
            .checkbox-label { padding: 8px 12px; }
            
            /* Modal adjustments for mobile */
            .modal {
                width: 95% !important;
                max-width: 95% !important;
                padding: 6px !important;
            }
            
            .operator-value-group {
                flex-wrap: wrap;
                gap: 10px;
                padding: 6px;
            }
            
            .goal-action-btn,
            .goal-operator-btn,
            .goal-toggle {
                min-width: 80px;
                font-size: 0.9rem;
                min-height: 36px;
                padding: 8px 12px;
            }
            
            .goal-value-input {
                width: 50px;
                min-height: 36px;
                font-size: 0.9rem;
            }
            
            .goal-times-text {
                font-size: 0.9rem;
            }
        }
        
        @media (max-width: 375px) {
            .header { 
                padding: env(safe-area-inset-top, 12px) 12px 6px 12px;
                min-height: calc(48px + env(safe-area-inset-top, 12px));
            }
            .header h1 { font-size: 1.2em; }
            .btn { font-size: 1.2em !important; }
            .btn-label { font-size: 0.55em; }
            .settings-container, .daily-container { padding: 8px 12px; }
            
            /* Apply same daily view fixes for smaller screens */
            .main-container:has(.daily-container) {
                overflow: hidden;
            }
            
            .daily-container {
                height: 100%;
                overflow: hidden;
                display: flex;
                flex-direction: column;
            }
            
            .dailies-section {
                flex: 1;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                min-height: 0;
            }
            
            .bubbles-container {
                height: 220px; /* Reduced from 300px to 220px for more square aspect */
                flex-shrink: 0;
            }
            
            .scroll-container { padding: 8px 0; margin: 0 12px; }
            .hour-time { font-size: 18px; width: 24px; }
            .hour-emojis { grid-template-columns: repeat(2, 24px); max-width: 50px; min-width: 50px; }
            .emoji { font-size: 22px; min-height: 22px; }
            .hour-text, .hour-input { font-size: 16px; }
            .emoji-picker { grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; }
            .emoji-btn { padding: 4px; font-size: 24px; }
            .date-input, .secondary-btn { font-size: 18px; }
            .add-goal-btn, .export-btn { 
                white-space: nowrap; 
                padding: 6px 12px;
                font-size: 14px;
                min-height: 36px;
            }
            .goal-summary { padding: 6px; gap: 6px; }
            .hour-entry { padding: 6px 10px; }
            .setting-group { margin-bottom: 12px; }
            .checkbox-label { padding: 6px 10px; }
            
            /* Modal adjustments for small mobile */
            .modal {
                width: 98% !important;
                max-width: 98% !important;
                padding: 4px !important;
            }
            
            .operator-value-group {
                flex-wrap: wrap;
                gap: 6px;
                padding: 4px;
            }
            
            .goal-action-btn,
            .goal-operator-btn,
            .goal-toggle {
                min-width: 70px;
                font-size: 0.8rem;
                padding: 8px 10px;
                min-height: 32px;
            }
            
            .goal-value-input {
                width: 45px;
                min-height: 32px;
                font-size: 0.8rem;
                padding: 6px 8px;
            }
            
            .goal-times-text {
                font-size: 0.8rem;
            }
        }