/* app.css — Recovery24 Layout & Navigation */

        body {
            font-family: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
            background: var(--ap-bg);
            color: var(--ap-text);
            font-size: 17px;
            line-height: 1.75;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ═══════════════════════════════════════════════════════
           SENIOR-FRIENDLY READABILITY (50-70대)
           최소 글씨: 13px, 권장 본문: 16-17px
           ═══════════════════════════════════════════════════════ */

        /* ── Global minimum font sizes (inline style overrides) ── */
        /* 8-9px → 13px */
        [style*="font-size:8px"], [style*="font-size: 8px"],
        [style*="font-size:9px"], [style*="font-size: 9px"] {
            font-size: 13px !important;
        }
        /* 10px → 13px */
        [style*="font-size:10px"], [style*="font-size: 10px"] {
            font-size: 13px !important;
        }
        /* 11px → 13px */
        [style*="font-size:11px"], [style*="font-size: 11px"] {
            font-size: 14px !important;
        }
        /* 12px → 14px */
        [style*="font-size:12px"], [style*="font-size: 12px"] {
            font-size: 14px !important;
        }
        /* 13px → 15px */
        [style*="font-size:13px"], [style*="font-size: 13px"] {
            font-size: 15px !important;
        }
        /* 14px → 15px */
        [style*="font-size:14px"], [style*="font-size: 14px"] {
            font-size: 16px !important;
        }
        /* 15px → 16px */
        [style*="font-size:15px"], [style*="font-size: 15px"] {
            font-size: 17px !important;
        }

        /* ── Section titles bumped ── */
        .section-title { font-size: 20px !important; }

        /* ── Dark mode: ensure readability on dark bg ── */
        [data-theme="dark"] [style*="color:rgba(255,255,255,0.5)"] {
            color: rgba(255,255,255,0.7) !important;
        }
        [data-theme="dark"] [style*="color:rgba(255,255,255,0.6)"] {
            color: rgba(255,255,255,0.78) !important;
        }
        [data-theme="dark"] [style*="color:rgba(255,255,255,0.7)"] {
            color: rgba(255,255,255,0.85) !important;
        }
        [data-theme="dark"] [style*="color:rgba(255,255,255,0.8)"] {
            color: rgba(255,255,255,0.9) !important;
        }

        /* ── Line height improvement for readability ── */
        [style*="line-height:1.4"], [style*="line-height: 1.4"] {
            line-height: 1.7 !important;
        }
        [style*="line-height:1.5"], [style*="line-height: 1.5"] {
            line-height: 1.7 !important;
        }
        [style*="line-height:1.6"], [style*="line-height: 1.6"] {
            line-height: 1.75 !important;
        }

        /* Outfit for numbers, scores, metrics */
        .ap-stat-value, .gfit-card-value, .streak-num, .xp-text,
        .score, .adherence-value .score, .ap-reduction-value,
        .recovery-score-value, .recovery-score-label {
            font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
        }

        .action-plan-container {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            padding: 16px;
            padding-bottom: 100px;
            box-sizing: border-box;
        }

        /* Tab Bar — iOS-style bottom glassmorphism */
        .tab-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--ap-tab-bg);
            -webkit-backdrop-filter: saturate(180%) blur(20px);
            backdrop-filter: saturate(180%) blur(20px);
            border-top: 0.5px solid var(--ap-tab-border);
            display: flex;
            justify-content: space-around;
            align-items: center;
            z-index: 999;
            padding: 8px 0 env(safe-area-inset-bottom, 12px);
            max-width: 600px;
            margin: 0 auto;
        }

        .tab-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px 0;
            min-height: 56px;
            font-size: 12px;
            font-weight: 600;
            color: #8e8e93;
            cursor: pointer;
            transition: color 0.2s;
            -webkit-tap-highlight-color: transparent;
            border-bottom: none;
            position: relative;
        }

        .tab-item.active {
            color: #2DA89B;
            font-weight: 600;
        }

        .tab-item .tab-icon {
            font-size: 26px;
            line-height: 1;
        }

        .tab-content {
            display: none;
            width: 100%;
        }

        .tab-content.active {
            display: block;
            padding-top: 20px;
        }

        @media (max-width: 480px) {
            .week-grid {
                grid-template-columns: repeat(4, 1fr);
            }

            .ap-stat-value {
                font-size: 22px;
            }
        }

        /* ════════════════════════════════════════════════════════
           Phase 2: Premium Visual System
           ════════════════════════════════════════════════════════ */

        /* Tabular nums for all metrics */
        .ap-stat-value, .adherence-value .score, .gfit-card-value,
        .ap-reduction-value, .xp-text, .streak-num {
            font-variant-numeric: tabular-nums;
        }

        /* Balance headings */
        .section-title, .ap-hero-content h1, h2, h3 {
            text-wrap: balance;
        }

        /* Global interactive press feedback */
        button, .opt, .coach-btn, .tab-item, .badge, .milestone-card,
        .gfit-summary-card, .edu-card, .daily-mission-card {
            transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
        }
        button:active, .opt:active, .coach-btn:active, .tab-item:active,
        .badge:active, .milestone-card:active, .gfit-summary-card:active,
        .edu-card:active, .daily-mission-card:active {
            transform: scale(0.96);
        }

        /* Tab content transition — instant switch for reliability */
        .tab-content {
            animation: none;
            opacity: 1 !important;
            transform: none !important;
        }
