        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --color-bg: #faf8f3;
            --color-surface: #ffffff;
            --color-primary: #c9985a;
            --color-primary-dark: #a0784a;
            --color-text: #2d3e50;
            --color-text-light: #5d7a8f;
            --color-text-footer: #959595;
            --color-border: #e8dccf;
            --color-success: #2d8b5a;
        }
 
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: var(--color-bg);
            color: var(--color-text);
            overflow: hidden;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .footer {
            text-align: center;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            color: var(--color-text-footer);
        }

        .container {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            padding: 16px;
            gap: 20px;
        }

        /* === HEADER === */
        .header {
            text-align: center;
            padding-top: 8px;
        }

        .header h1 {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 4px;
            color: var(--color-text);
        }

        .current-time {
            font-size: 18px;
            color: var(--color-text-light);
            font-weight: 500;
        }

        .time-display {
            font-size: 32px;
            font-weight: 700;
            color: var(--color-primary);
            font-family: 'Monaco', monospace;
        }

        /* === SECTION === */
        .section {
            background: var(--color-surface);
            border-radius: 16px;
            padding: 20px;
            border: 1px solid var(--color-border);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--color-text-light);
            margin-bottom: 16px;
        }

        /* === TIME PICKER === */
        .time-picker-container {
            display: flex;
            gap: 12px;
            justify-content: center;
            align-items: center;
            margin: 24px 0;
        }

        .time-picker-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            flex: 1;
            max-width: 120px;
        }

        .time-picker-group label,
        .time-picker-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--color-text-light);
            font-weight: 600;
        }

        /* Custom dropdown picker */
        .custom-picker-wrapper {
            position: relative;
            width: 100%;
        }

        .custom-picker-display {
            display: block;
            appearance: none;
            width: 100%;
            padding: 12px;
            font-size: 42px;
            font-weight: 700;
            text-align: center;
            border: 2px solid var(--color-border);
            border-radius: 12px;
            background: var(--color-bg);
            color: var(--color-primary);
            font-family: 'Monaco', monospace;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .custom-picker-display:focus-visible,
        .favorite-star:focus-visible,
        .mode-btn:focus-visible,
        .btn-add-recipe:focus-visible,
        .btn-cancel:focus-visible,
        .btn-save:focus-visible,
        .dialog-btn:focus-visible,
        .modal-close:focus-visible,
        .favorite-btn:focus-visible,
        .recipe-item:focus-visible {
            outline: 3px solid rgba(59, 130, 246, 0.45);
            outline-offset: 2px;
        }

        .custom-picker-display:active {
            border-color: var(--color-primary);
            background: rgba(201, 152, 90, 0.05);
        }

        .custom-picker-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--color-surface);
            border: 2px solid var(--color-border);
            border-radius: 12px;
            margin-top: 8px;
            max-height: 300px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            display: none;
            flex-direction: column;
            z-index: 100;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        }

        .custom-picker-dropdown.show {
            display: flex;
        }

        .custom-picker-item {
            padding: 16px;
            font-size: 28px;
            font-weight: 700;
            text-align: center;
            color: var(--color-text-light);
            font-family: 'Monaco', monospace;
            cursor: pointer;
            transition: all 0.15s ease;
            flex-shrink: 0;
            border-bottom: 1px solid var(--color-border);
        }

        .custom-picker-item:last-child {
            border-bottom: none;
        }

        .custom-picker-item:active,
        .custom-picker-item.selected {
            background: var(--color-primary);
            color: white;
        }

        .time-separator {
            font-size: 40px;
            font-weight: 700;
            color: var(--color-primary);
            padding: 0 4px;
        }

        /* === RESULT DISPLAY === */
        .result-card {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
            padding: 28px;
            border-radius: 16px;
            text-align: center;
            color: white;
            box-shadow: 0 4px 12px rgba(201, 152, 90, 0.25);
        }

        .result-label {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 12px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .result-value {
            font-size: 48px;
            font-weight: 700;
            font-family: 'Monaco', monospace;
            line-height: 1;
            margin-bottom: 16px;
        }

        .result-hint {
            font-size: 13px;
            opacity: 0.85;
            font-weight: 500;
        }

        /* Mode switcher */
        .mode-switcher {
            display: flex;
            gap: 6px;
            margin-top: 16px;
            justify-content: center;
        }

        .mode-btn {
            flex: 1;
            padding: 8px 6px;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            color: white;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
            white-space: nowrap;
        }

        .mode-btn.active {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.6);
            font-weight: 700;
        }

        .mode-btn:active {
            background: rgba(255, 255, 255, 0.25);
        }

        .copy-btn {
            margin-top: 16px;
            width: 100%;
            padding: 14px;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 10px;
            color: white;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .copy-btn:active {
            background: rgba(255, 255, 255, 0.3);
        }

        /* === RECIPES/NOTES === */
        .recipes-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .recipe-item {
            background: var(--color-bg);
            padding: 14px;
            border-radius: 12px;
            border: 1px solid var(--color-border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .recipe-item:active {
            background: var(--color-primary);
        }

        .recipe-item:active .recipe-name,
        .recipe-item:active .recipe-program,
        .recipe-item:active .recipe-desc {
            color: white;
        }

        .recipe-delete-btn {
            width: 44px;
            height: 44px;
            background: #c74545;
            border: none;
            color: white;
            border-radius: 8px;
            font-size: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .recipe-delete-btn.show {
            display: flex;
        }

        .recipe-delete-btn:active {
            background: #a03a3a;
            color: white;
        }

        .empty-state {
            text-align: center;
            color: var(--color-text-light);
            padding: 20px;
            font-size: 13px;
        }

        .recipe-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--color-text);
            margin-bottom: 6px;
        }

        .recipe-program {
            font-size: 13px;
            color: var(--color-primary);
            font-weight: 600;
            margin-bottom: 8px;
        }

        .recipe-desc {
            font-size: 12px;
            color: var(--color-text-light);
            line-height: 1.5;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .add-recipe-group {
            margin-top: 12px;
        }

        .btn-add-recipe {
            width: 100%;
            padding: 16px;
            background: var(--color-primary);
            color: white;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-add-recipe:active {
            background: var(--color-primary-dark);
        }

        /* === FAVORITES SECTION === */
        .section-title-with-star {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .section-title-with-star .section-title {
            margin-bottom: 0;
        }

        .favorite-star {
            background: transparent;
            border: none;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
            padding: 4px;
            margin-right: -4px;
            display: flex;
            align-items: center;
            margin-top: -2px;
        }

        .favorite-star.inactive {
            color: #bdbdbd;
        }

        .favorite-star.active {
            color: #3b82f6;
            filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.4));
        }

        .favorites-container {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 16px;
            justify-content: flex-start;
        }

        .favorite-btn {
            flex: 0 0 calc(33.333% - 6px);
            padding: 12px 8px;
            background: var(--color-bg);
            border: 1.5px solid var(--color-primary);
            border-radius: 10px;
            color: var(--color-primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            text-align: center;
        }

        .favorite-btn:active {
            background: var(--color-primary);
            color: white;
            transform: scale(0.98);
        }

        .favorite-btn-close {
            margin-left: 2px;
            font-size: 12px;
            opacity: 0.8;
        }

        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: flex-end;
            justify-content: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: var(--color-surface);
            width: 100%;
            max-width: 100%;
            border-radius: 20px 20px 0 0;
            display: flex;
            flex-direction: column;
            max-height: 90vh;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
            animation: slideUp 0.3s ease;
        }

        @keyframes slideUp {
            from {
                transform: translateY(100%);
            }
            to {
                transform: translateY(0);
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid var(--color-border);
        }

        .modal-header h2 {
            margin: 0;
            font-size: 18px;
            color: var(--color-text);
        }

        .modal-close {
            width: 40px;
            height: 40px;
            background: transparent;
            border: none;
            font-size: 28px;
            color: var(--color-text-light);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-group label {
            font-size: 14px;
            font-weight: 600;
            color: var(--color-text);
        }

        .modal-input,
        .modal-textarea {
            padding: 12px;
            border: 1px solid var(--color-border);
            border-radius: 10px;
            font-size: 14px;
            background: var(--color-bg);
            color: var(--color-text);
            font-family: inherit;
        }

        .modal-input:focus,
        .modal-textarea:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(201, 152, 90, 0.1);
        }

        .modal-textarea {
            min-height: 120px;
            resize: vertical;
        }

        .modal-footer {
            display: flex;
            gap: 12px;
            padding: 20px;
            border-top: 1px solid var(--color-border);
        }

        .btn-cancel,
        .btn-save {
            flex: 1;
            padding: 14px;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-cancel {
            background: var(--color-bg);
            color: var(--color-text);
            border: 1px solid var(--color-border);
        }

        .btn-cancel:active {
            background: var(--color-border);
        }

        .btn-save {
            background: var(--color-primary);
            color: white;
        }

        .btn-save:active {
            background: var(--color-primary-dark);
        }

        .btn-delete {
            background: #c74545;
            color: white;
        }

        .btn-delete:active {
            background: #a03a3a;
        }

        /* === CUSTOM DIALOG === */
        .dialog-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 3000;
            align-items: center;
            justify-content: center;
        }

        .dialog-overlay.show {
            display: flex;
        }

        .dialog-box {
            background: var(--color-surface);
            border-radius: 16px;
            padding: 24px;
            max-width: 90%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            animation: popIn 0.3s ease;
        }

        @keyframes popIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .dialog-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--color-text);
            margin-bottom: 12px;
        }

        .dialog-message {
            font-size: 14px;
            color: var(--color-text-light);
            margin-bottom: 20px;
            line-height: 1.5;
        }

        .dialog-buttons {
            display: flex;
            gap: 12px;
        }

        .dialog-btn {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .dialog-btn-cancel {
            background: var(--color-bg);
            color: var(--color-text);
            border: 1px solid var(--color-border);
        }

        .dialog-btn-cancel:active {
            background: var(--color-border);
        }

        .dialog-btn-confirm {
            background: var(--color-primary);
            color: white;
        }

        .dialog-btn-confirm:active {
            background: var(--color-primary-dark);
        }

        .dialog-btn-delete {
            background: #c74545;
            color: white;
        }

        .dialog-btn-delete:active {
            background: #a03a3a;
        }

        /* === TOAST === */
        .toast {
            position: fixed;
            bottom: 20px;
            left: 16px;
            right: 16px;
            background: var(--color-success);
            color: white;
            padding: 16px;
            border-radius: 10px;
            text-align: center;
            font-weight: 500;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 1000;
        }

        .toast.show {
            opacity: 1;
            pointer-events: auto;
        }

        .install-banner {
            position: fixed;
            bottom: 16px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(45, 62, 80, 0.92);
            color: white;
            padding: 12px 20px;
            border-radius: 12px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
            font-size: 14px;
            z-index: 9999;
            display: flex;
            align-items: center;
            gap: 16px;
            max-width: 90%;
        }

        .install-banner button {
            border-radius: 8px;
            cursor: pointer;
            padding: 8px 16px;
            font-weight: 600;
            white-space: nowrap;
        }

        .install-banner-accept {
            background: var(--color-primary);
            color: white;
            border: none;
        }

        .install-banner-decline {
            background: transparent;
            color: white;
            border: 1px solid white;
        }

        .footer-note {
            margin-top: 10px;
        }

        .footer-gap {
            margin-top: 30px;
        }

        .footer-gap-small {
            margin-top: 10px;
        }

        /* === RESPONSIVE === */
        @media (max-height: 600px) {
            .container {
                padding: 12px;
                gap: 12px;
            }

            .section {
                padding: 16px;
            }

            .header {
                padding-top: 4px;
            }

            .header h1 {
                font-size: 20px;
            }

            .result-value {
                font-size: 40px;
            }
        }

        @media (prefers-color-scheme: dark) {
            :root {
                --color-bg: #1a1f26;
                --color-surface: #242c37;
                --color-primary: #d4a76a;
                --color-primary-dark: #c9985a;
                --color-text: #e8e8e8;
                --color-text-light: #a0a8b0;
                --color-border: #3a4250;
            }

            .time-input-group input {
                background: #1a1f26;
                color: #d4a76a;
            }
        }
        /* Добавленный responsive для десктопа: делаем контент узким и по центру */
        @media (min-width: 768px) {
            .container {
                width: 700px;  /* Ширина как на мобильном (можно подкорректировать под твой вкус, напр. 400px или 600px) */
                margin: 0 auto;    /* Центрируем по горизонтали */
                padding: 32px 16px; /* Можно увеличить верхний/нижний padding для лучшего вида */
            }

            body {
                overflow: auto;  /* Убираем overflow: hidden, чтобы на десктопе можно было скроллить, если контент длинный */
            }
        }
