* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

        :root {
            --bg: #FFFFFF;
            --surface: #F4F6F3;
            --border: rgba(0,0,0,0.06);
            --text: #1D1D1B;
            --text2: rgba(0,0,0,0.4);
            --accent: #4CAF50;
            --header-h: 52px;
        }

        html, body {
            height: 100%;
            overflow: hidden;
        }

        body {
            background: var(--bg);
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
            display: flex;
            flex-direction: column;
        }

        /* ── Header ── */
        .app-header {
            flex-shrink: 0;
            height: var(--header-h);
            position: relative;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 18px;
            background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.92) 100%);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--border);
        }

        .header-logo {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            padding: 6px 8px 6px 0;
            border-radius: 10px;
            transition: opacity 0.15s;
            user-select: none;
            flex-shrink: 0;
        }
        .header-logo:active { opacity: 0.65; }

        .header-logo-icon {
            width: 30px; height: 30px;
            background: linear-gradient(135deg, #66BB6A, #A5D6A7);
            border-radius: 9px;
            display: flex; align-items: center; justify-content: center;
            font-size: 16px;
        }

        .header-logo-text {
            font-size: 17px;
            font-weight: 700;
            background: #1D1D1B;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: -0.3px;
        }

        .header-menu-icon {
            font-size: 13px;
            color: var(--text2);
            margin-left: 2px;
            line-height: 1;
        }

        /* Центрирование раздела — абсолютное, не зависит от ширины соседей */
        .header-section {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
            letter-spacing: -0.1px;
            pointer-events: none;
            white-space: nowrap;
        }

        .header-avatar {
            width: 34px; height: 34px;
            border-radius: 50%;
            background: linear-gradient(135deg, #66BB6A, #A5D6A7);
            display: flex; align-items: center; justify-content: center;
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
            border: 2px solid rgba(76,175,80,0.2);
            transition: transform 0.15s;
            flex-shrink: 0;
        }

        .header-avatar:active { transform: scale(0.93); }
        .header-avatar img { width:100%;height:100%;border-radius:50%;object-fit:cover; }

        /* ── Content area ── */
        .frames {
            flex: 1;
            position: relative;
        }

        iframe {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            border: none;
            display: none;
        }

        iframe.active {
            display: block;
        }

        /* ── Profile page ── */
        #profile-page {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            overflow-y: auto;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.22s ease;
            padding: 20px 16px 40px;
            -webkit-overflow-scrolling: touch;
        }

        #profile-page.active {
            opacity: 1;
            pointer-events: auto;
        }

        /* ── Settings page ── */
        #settings-page {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            overflow-y: auto;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.22s ease;
            padding: 20px 16px 40px;
            -webkit-overflow-scrolling: touch;
            background: #F4F6F3;
            z-index: 50;
        }

        #settings-page.active {
            opacity: 1;
            pointer-events: auto;
        }

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

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

        .anim-slide-in-right { animation: slideInRight 0.22s ease; }
        .anim-slide-in-left  { animation: slideInLeft  0.22s ease; }

        .settings-list-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 1px 6px rgba(0,0,0,0.07);
            overflow: hidden;
            margin-bottom: 16px;
        }

        .settings-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            cursor: pointer;
            transition: background 0.15s;
        }

        .settings-row:active { background: rgba(0,0,0,0.05); }

        .settings-row-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

.settings-row-label {
            font-size: 15px;
            color: rgba(0,0,0,0.8);
            font-weight: 500;
        }

        .settings-row-arrow {
            color: rgba(0,0,0,0.25);
            font-size: 20px;
            line-height: 1;
        }

        .settings-divider {
            height: 1px;
            background: rgba(0,0,0,0.07);
            margin-left: 58px;
        }

        .settings-sub-header {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-bottom: 20px;
        }

        .settings-back-btn {
            background: none;
            border: none;
            color: #007AFF;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            padding: 4px 8px 4px 0;
            display: flex;
            align-items: center;
            gap: 2px;
        }

        .settings-sub-title {
            font-size: 17px;
            font-weight: 700;
            color: rgba(0,0,0,0.85);
        }

        .profile-hero {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px 0 24px;
        }

        .profile-avatar-big {
            width: 84px; height: 84px;
            border-radius: 50%;
            background: linear-gradient(135deg, #66BB6A, #A5D6A7);
            display: flex; align-items: center; justify-content: center;
            font-size: 40px;
            font-weight: 700;
            margin-bottom: 6px;
            box-shadow: 0 8px 32px rgba(76,175,80,0.2);
            cursor: pointer;
            position: relative;
            transition: transform 0.15s;
        }
        .profile-avatar-big:active { transform: scale(0.93); }
        .profile-avatar-big img {
            width: 100%; height: 100%;
            border-radius: 50%;
            object-fit: cover;
        }

        .avatar-edit-hint {
            font-size: 11px;
            color: var(--text2);
            margin-bottom: 16px;
        }

        .emoji-picker {
            display: none;
            flex-direction: column;
            gap: 0;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 16px;
            margin-bottom: 16px;
            overflow: hidden;
        }
        .emoji-picker.open { display: flex; }
        .emoji-categories {
            display: flex;
            border-bottom: 1px solid var(--border);
            background: var(--surface2);
        }
        .emoji-cat-btn {
            flex: 1;
            padding: 8px 4px;
            font-size: 18px;
            background: none;
            border: none;
            cursor: pointer;
            opacity: 0.5;
            transition: opacity 0.15s;
        }
        .emoji-cat-btn.active { opacity: 1; border-bottom: 2px solid #4CAF50; }
        .emoji-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            padding: 12px;
            max-height: 200px;
            overflow-y: auto;
        }
        .emoji-option {
            font-size: 26px;
            cursor: pointer;
            padding: 5px;
            border-radius: 10px;
            transition: background 0.12s;
            line-height: 1;
            border: 2px solid transparent;
        }
        .emoji-option:hover { background: rgba(76,175,80,0.1); }
        .emoji-option.selected { border-color: #4CAF50; background: rgba(76,175,80,0.1); }

        .profile-hero-name {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .profile-hero-sub {
            font-size: 13px;
            color: var(--text2);
        }

        .prof-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 18px;
            margin-bottom: 12px;
        }

        .prof-card-title {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text2);
            margin-bottom: 14px;
        }

        .prof-field { margin-bottom: 12px; }
        .prof-field:last-child { margin-bottom: 0; }

        .prof-field label {
            display: block;
            font-size: 12px;
            color: var(--text2);
            margin-bottom: 6px;
        }

        .prof-field input,
        .prof-field textarea {
            width: 100%;
            background: rgba(0,0,0,0.03);
            border: 1px solid rgba(0,0,0,0.06);
            border-radius: 12px;
            padding: 11px 13px;
            color: var(--text);
            font-size: 16px;
            font-family: inherit;
            outline: none;
            resize: none;
            transition: border-color 0.15s;
        }

        .prof-field input:focus,
        .prof-field textarea:focus { border-color: rgba(76,175,80,0.35); }

        .prof-stat-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            color: var(--text2);
            padding: 2px 0;
        }

        .prof-stat-val { color: var(--text); font-weight: 600; }

        .btn-prof-save {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #66BB6A, #A5D6A7);
            color: #fff;
            border: none;
            border-radius: 14px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 4px;
            transition: opacity 0.15s, transform 0.15s;
            font-family: inherit;
        }

        .btn-prof-save:active { opacity: 0.85; transform: scale(0.98); }

        /* ── Profile sub-tabs ── */
        .prof-tabs {
            display: flex;
            gap: 10px;
            padding: 0 16px 16px;
            margin-top: 4px;
        }
        .prof-tab-btn {
            flex: 1;
            padding: 16px 0;
            border: 2px solid rgba(76,175,80,0.18);
            border-radius: 16px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
            background: rgba(76,175,80,0.06);
            color: #5a8a5e;
            letter-spacing: 0.01em;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            line-height: 1;
        }
        .prof-tab-btn .ptab-icon {
            font-size: 22px;
            line-height: 1;
        }
        .prof-tab-btn.active {
            background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
            color: #fff;
            border-color: transparent;
            box-shadow: 0 4px 14px rgba(76,175,80,0.35);
        }

        /* ── Nutrition tab in profile ── */
        .prof-card-nutrition {
            border-color: rgba(232,145,58,0.25);
            background: #FFFAF2;
        }
        .prof-card-title-nutrition {
            color: #C47A1A;
        }
        .prof-nutr-select {
            width: 100%;
            padding: 8px 10px;
            border: 1.5px solid rgba(232,145,58,0.35);
            border-radius: 10px;
            font-size: 15px;
            background: #FFF3DC;
            color: #1D1D1B;
            outline: none;
        }
        .prof-card-nutrition .prof-field input,
        .prof-card-nutrition .prof-field textarea {
            border-color: rgba(232,145,58,0.3);
            background: #FFF8EE;
        }
        .prof-card-nutrition .prof-field input:focus,
        .prof-card-nutrition .prof-field textarea:focus {
            border-color: rgba(232,145,58,0.6);
        }
        .btn-prof-save-nutrition {
            background: linear-gradient(135deg, #E8913A 0%, #D07020 100%);
        }
        .prof-n-btn-primary {
            padding: 11px 14px;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            background: linear-gradient(135deg, #E8913A 0%, #D07020 100%);
            color: #fff;
            transition: opacity .15s;
        }
        .prof-n-btn-primary:active { opacity: 0.8; }
        .prof-n-btn-secondary {
            padding: 11px 14px;
            border: 1.5px solid rgba(232,145,58,0.4);
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            background: transparent;
            color: #C47A1A;
            transition: background .15s;
        }
        .prof-n-btn-secondary:active { background: rgba(232,145,58,0.08); }
        .prof-n-kbju-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }
        .prof-n-kbju-box {
            background: #FFF3DC;
            border: 1px solid rgba(232,145,58,0.25);
            border-radius: 12px;
            padding: 10px 6px;
            text-align: center;
        }
        .prof-n-kbju-box.main {
            grid-column: span 4;
            background: linear-gradient(135deg, #E8913A 0%, #D07020 100%);
            border-color: transparent;
        }
        .prof-n-kbju-val {
            font-size: 22px;
            font-weight: 800;
            color: #C47A1A;
            line-height: 1;
        }
        .prof-n-kbju-box.main .prof-n-kbju-val { color: #fff; font-size: 32px; }
        .prof-n-kbju-lbl {
            font-size: 10px;
            color: #A09080;
            margin-top: 4px;
            font-weight: 600;
        }
        .prof-n-kbju-box.main .prof-n-kbju-lbl { color: rgba(255,255,255,0.75); }

        /* ── Stats tab ── */
        .prof-card-stats { border-radius: 18px; }

        .prof-card-habits { border-color: rgba(76,175,80,0.22); background: rgba(76,175,80,0.04); }
        .prof-card-title-habits { color: #3a7a3e; }

        .prof-card-nutr-stat { border-color: rgba(232,145,58,0.22); background: rgba(232,145,58,0.04); }
        .prof-card-fin-stat  { border-color: rgba(74,144,217,0.22); background: rgba(74,144,217,0.04); }

        .stats-kpi-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-top: 12px;
        }
        .stats-kpi {
            background: rgba(76,175,80,0.08);
            border: 1px solid rgba(76,175,80,0.15);
            border-radius: 14px;
            padding: 12px 6px;
            text-align: center;
        }
        .stats-kpi-nutr {
            background: rgba(232,145,58,0.08);
            border-color: rgba(232,145,58,0.15);
        }
        .stats-kpi-fin {
            background: rgba(74,144,217,0.08);
            border-color: rgba(74,144,217,0.15);
        }
        .stats-kpi-val {
            font-size: 22px;
            font-weight: 800;
            color: #4CAF50;
            line-height: 1;
            margin-bottom: 4px;
        }
        .stats-kpi-nutr .stats-kpi-val { color: #C47A1A; }
        .stats-kpi-fin  .stats-kpi-val { color: #2E6DA4; }
        .stats-kpi-lbl {
            font-size: 10px;
            font-weight: 600;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .st-habit-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            background: rgba(76,175,80,0.06);
            border-radius: 10px;
            font-size: 13px;
        }
        .st-habit-name { color: #2a5a2e; font-weight: 500; flex: 1; }
        .st-habit-streak {
            font-weight: 700;
            color: #4CAF50;
            font-size: 13px;
            white-space: nowrap;
        }

        /* ── Notifications tab ── */
        .prof-card-notif {
            border-color: rgba(255,167,38,0.22);
            background: rgba(255,167,38,0.03);
        }
        .prof-card-title-notif { color: #b06000; }

        .notif-section {
            padding: 12px 0;
            border-bottom: 1px solid rgba(0,0,0,0.06);
        }
        .notif-section:last-of-type { border-bottom: none; }

        .notif-section-label {
            font-size: 13px;
            font-weight: 700;
            color: #444;
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 2px;
        }
        .notif-section-icon { font-size: 16px; }

        .notif-add-btn {
            margin-top: 8px;
            width: 100%;
            background: none;
            border: 1.5px dashed rgba(0,0,0,0.15);
            border-radius: 10px;
            color: rgba(0,0,0,0.35);
            padding: 9px;
            font-size: 13px;
            cursor: pointer;
            transition: border-color .15s, color .15s;
        }
        .notif-add-btn:active { border-color: #4CAF50; color: #4CAF50; }

        /* Toggle switch */
        .notif-toggle-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 4px 0;
        }
        .notif-toggle {
            position: relative;
            display: inline-block;
            width: 48px;
            height: 28px;
            flex-shrink: 0;
        }
        .notif-toggle input { opacity: 0; width: 0; height: 0; }
        .notif-toggle-slider {
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.15);
            border-radius: 28px;
            cursor: pointer;
            transition: background .2s;
        }
        .notif-toggle-slider::before {
            content: '';
            position: absolute;
            width: 22px; height: 22px;
            left: 3px; top: 3px;
            background: #fff;
            border-radius: 50%;
            transition: transform .2s;
            box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        }
        .notif-toggle input:checked + .notif-toggle-slider { background: #4CAF50; }
        .notif-toggle input:checked + .notif-toggle-slider::before { transform: translateX(20px); }
        .notif-toggle-nutr input:checked + .notif-toggle-slider { background: #E8913A; }

        .save-toast {
            text-align: center;
            font-size: 12px;
            color: rgba(76,175,80,0.8);
            margin-top: 8px;
            height: 18px;
        }

        /* ── Side Drawer ── */
        .drawer-backdrop {
            position: fixed;
            top: 0; right: 0; bottom: 0;
            left: 0;
            z-index: 300;
            background: rgba(0,0,0,0);
            pointer-events: none;
            transition: background 0.28s ease;
        }
        .drawer-backdrop.open {
            /* покрываем только правую часть экрана — зону вне drawer */
            left: min(72%, 280px);
            background: rgba(0,0,0,0.2);
            pointer-events: auto;
        }

        .drawer {
            position: fixed;
            top: 0; left: 0;
            width: 72%;
            max-width: 280px;
            height: 100%;
            z-index: 301;
            background: #FFFFFF;
            border-right: 1px solid rgba(0,0,0,0.05);
            transform: translateX(-100%);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            padding-bottom: env(safe-area-inset-bottom);
        }

        .drawer.open {
            transform: translateX(0);
        }

        .drawer-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 20px 20px 16px;
            padding-top: calc(20px + env(safe-area-inset-top));
            border-bottom: 1px solid rgba(0,0,0,0.04);
        }

        .drawer-logo-icon {
            width: 36px; height: 36px;
            background: linear-gradient(135deg, #66BB6A, #A5D6A7);
            border-radius: 11px;
            display: flex; align-items: center; justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
        }

        .drawer-logo-text {
            font-size: 20px;
            font-weight: 700;
            background: #1D1D1B;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: -0.3px;
        }

        .drawer-user {
            padding: 14px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid rgba(0,0,0,0.04);
            cursor: pointer;
            transition: background 0.15s;
        }

        .drawer-user:active { background: rgba(76,175,80,0.06); }

        .drawer-user-avatar {
            width: 42px; height: 42px;
            border-radius: 50%;
            background: linear-gradient(135deg, #66BB6A, #A5D6A7);
            display: flex; align-items: center; justify-content: center;
            font-size: 20px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .drawer-user-info { flex: 1; min-width: 0; }

        .drawer-user-name {
            font-size: 15px;
            font-weight: 600;
            color: var(--text);
        }

        .drawer-user-sub {
            font-size: 12px;
            color: var(--text2);
            margin-top: 2px;
        }

        .drawer-user-arrow {
            font-size: 16px;
            color: var(--text2);
            flex-shrink: 0;
        }

        .drawer-nav {
            flex: 1;
            padding: 12px 10px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .drawer-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 13px 14px;
            border-radius: 14px;
            border: none;
            background: transparent;
            color: rgba(0,0,0,0.4);
            font-size: 15px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            text-align: left;
            width: 100%;
        }

        .drawer-item-icon {
            font-size: 22px;
            width: 28px;
            text-align: center;
            flex-shrink: 0;
        }

        .drawer-item.active {
            background: rgba(124,111,247,0.14);
            color: #c4b5fd;
        }

        .drawer-item.active .drawer-item-icon {
            filter: none;
        }

        .drawer-item:active {
            background: rgba(76,175,80,0.08);
        }

        .drawer-item-active-dot {
            width: 6px; height: 6px;
            border-radius: 50%;
            background: #4CAF50;
            margin-left: auto;
            flex-shrink: 0;
            opacity: 0;
        }

        .drawer-item.active .drawer-item-active-dot {
            opacity: 1;
        }

        /* ── Onboarding overlay ── */
        #onboarding-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9999;
            background: linear-gradient(160deg, #f5fef5 0%, #f0f8ff 55%, #fff8f0 100%);
            flex-direction: column;
            padding: max(env(safe-area-inset-top, 0px), 24px) 24px 24px;
            overflow-y: auto;
            transition: opacity 0.35s ease, transform 0.35s ease;
        }
        #onboarding-overlay.onb-hidden {
            opacity: 0;
            transform: scale(0.97);
            pointer-events: none;
        }
        .onb-dots {
            display: flex;
            gap: 7px;
            margin-bottom: 36px;
        }
        .onb-dot {
            height: 8px;
            width: 8px;
            border-radius: 50%;
            background: rgba(0,0,0,0.12);
            transition: background 0.3s, width 0.3s;
        }
        .onb-dot.active {
            background: var(--accent);
            width: 22px;
            border-radius: 4px;
        }
        .onb-step {
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .onb-big-icon { font-size: 52px; margin-bottom: 18px; line-height: 1; }
        .onb-title {
            font-size: 26px;
            font-weight: 700;
            color: var(--text);
            line-height: 1.25;
            margin-bottom: 8px;
        }
        .onb-sub {
            font-size: 15px;
            color: var(--text2);
            margin-bottom: 28px;
            line-height: 1.5;
        }
        .onb-field {
            display: flex;
            flex-direction: column;
            gap: 7px;
            margin-bottom: 14px;
        }
        .onb-label {
            font-size: 12px;
            font-weight: 600;
            color: rgba(0,0,0,0.45);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .onb-input {
            padding: 13px 16px;
            border-radius: 14px;
            border: 1.5px solid rgba(0,0,0,0.09);
            background: rgba(255,255,255,0.85);
            font-size: 16px;
            color: var(--text);
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s;
            width: 100%;
        }
        .onb-input:focus { border-color: var(--accent); }
        .onb-select {
            appearance: none; -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 36px;
        }
        .onb-goals { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
        .onb-goal-btn {
            display: flex;
            align-items: center;
            gap: 13px;
            padding: 15px 18px;
            border-radius: 16px;
            border: 2px solid rgba(0,0,0,0.07);
            background: rgba(255,255,255,0.75);
            font-size: 16px;
            font-weight: 500;
            color: var(--text);
            cursor: pointer;
            font-family: inherit;
            text-align: left;
            transition: border-color 0.18s, background 0.18s;
        }
        .onb-goal-btn:active { opacity: 0.75; }
        .onb-goal-btn.selected {
            border-color: var(--accent);
            background: rgba(76,175,80,0.07);
            font-weight: 600;
        }
        .onb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .onb-loading-wrap {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 16px;
        }
        .onb-spinner {
            width: 38px; height: 38px;
            border: 3px solid rgba(76,175,80,0.2);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: onb-spin 0.8s linear infinite;
        }
        @keyframes onb-spin { to { transform: rotate(360deg); } }
        .onb-plan-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
        .onb-plan-card {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            padding: 14px 16px;
            background: rgba(255,255,255,0.9);
            border-radius: 16px;
            border: 1px solid rgba(0,0,0,0.06);
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }
        .onb-plan-emoji { font-size: 26px; flex-shrink: 0; line-height: 1.3; }
        .onb-plan-tip { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
        .onb-plan-action { font-size: 13px; color: var(--text2); line-height: 1.45; }
        .onb-footer {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-top: 20px;
            flex-shrink: 0;
        }
        .onb-btn-main {
            flex: 1;
            padding: 15px 20px;
            border-radius: 16px;
            border: none;
            background: var(--accent);
            color: #fff;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: opacity 0.15s;
        }
        .onb-btn-main:active { opacity: 0.8; }
        .onb-btn-ghost {
            padding: 15px 4px;
            border: none;
            background: none;
            color: var(--text2);
            font-size: 15px;
            cursor: pointer;
            font-family: inherit;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .onb-btn-skip {
            padding: 15px 4px;
            border: none;
            background: none;
            color: var(--text2);
            font-size: 14px;
            cursor: pointer;
            font-family: inherit;
            flex-shrink: 0;
        }

        /* ── Contextual hint card ── */
        #hint-overlay {
            position: fixed;
            bottom: 0;
            left: 0; right: 0;
            z-index: 5000;
            padding: 0 12px 20px;
            transform: translateY(130%);
            transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
            pointer-events: none;
        }
        #hint-overlay.visible {
            transform: translateY(0);
            pointer-events: auto;
        }
        .hint-card {
            display: flex;
            align-items: center;
            gap: 12px;
            background: rgba(28,28,30,0.93);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            border-radius: 18px;
            padding: 14px 14px 14px 16px;
            color: #fff;
            box-shadow: 0 8px 28px rgba(0,0,0,0.22);
        }
        .hint-emoji { font-size: 26px; flex-shrink: 0; line-height: 1; }
        .hint-body { flex: 1; min-width: 0; }
        .hint-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
        .hint-text { font-size: 12px; opacity: 0.65; line-height: 1.4; }
        .hint-dismiss {
            background: rgba(255,255,255,0.14);
            border: none;
            color: #fff;
            width: 30px; height: 30px;
            border-radius: 50%;
            font-size: 14px;
            cursor: pointer;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
