/* Generated by tools/extract-css.ts from SPORT/index.html. Do not hand-edit.
   New styles belong in additions.css. */


        @font-face {
            font-family: "Vazir";
            src: url("fonts/Vazir.woff2") format("woff2"), url("fonts/Vazir.woff") format("woff");
            font-weight: 400;
            font-style: normal;
            font-display: swap;
        }

        @font-face {
            font-family: "Vazir";
            src: url("fonts/Vazir-Bold.woff2") format("woff2"), url("fonts/Vazir-Bold.woff") format("woff");
            font-weight: 700;
            font-style: normal;
            font-display: swap;
        }

        :root {
            --bg-page: #edf3fb;
            --bg-card: rgba(255, 255, 255, 0.92);
            --bg-strong: #ffffff;
            --bg-soft: #f8fafc;
            --text-main: #0f172a;
            --text-muted: #475569;
            --text-soft: #64748b;
            --border: #dbe7f3;
            --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.06);
            --shadow-md: 0 24px 50px rgba(15, 23, 42, 0.08);
            --radius-sm: 16px;
            --radius-md: 24px;
            --radius-lg: 36px;
            --primary: #2563eb;
            --secondary: #16a34a;
            --danger: #dc2626;

            /* ── Tier / group-box palette (light) — سبک A: تینت ملایم + کادر نازک ──
               bg=تنه‌ی کم‌رنگ، border=رنگ لهجه (accent)، ink=رنگ عنوان (پالت کم‌اشباع) */
            --tier-red-bg: #fdf3f3;
            --tier-red-border: #d05a5a;
            --tier-red-ink: #a83a3a;

            --tier-amber-bg: #fdf8ef;
            --tier-amber-border: #c8912f;
            --tier-amber-ink: #8a5f15;

            --tier-blue-bg: #f1f7fd;
            --tier-blue-border: #4a90c2;
            --tier-blue-ink: #2f6a96;

            --tier-green-bg: #f0faf4;
            --tier-green-border: #44a878;
            --tier-green-ink: #2c7a55;
        }

        * { box-sizing: border-box; }

        html { scroll-behavior: smooth; }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: "Vazir", Tahoma, Arial, sans-serif;
            line-height: 1.85;
            color: var(--text-main);
            background:
                radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34%),
                radial-gradient(circle at bottom left, rgba(5, 150, 105, 0.1), transparent 28%),
                linear-gradient(180deg, #f7fbff 0%, var(--bg-page) 100%);
        }

        button, a { font: inherit; }
        a { color: inherit; text-decoration: none; }

        .page-shell {
            position: relative;
            width: min(1240px, calc(100% - 32px));
            margin: 0 auto;
            padding: 32px 0 64px;
        }

        .ambient {
            position: fixed;
            z-index: 0;
            border-radius: 999px;
            filter: blur(70px);
            opacity: 0.45;
            pointer-events: none;
        }

        .ambient-a {
            top: 40px;
            right: -120px;
            width: 260px;
            height: 260px;
            background: rgba(37, 99, 235, 0.22);
        }

        .ambient-b {
            bottom: 20px;
            left: -80px;
            width: 220px;
            height: 220px;
            background: rgba(5, 150, 105, 0.18);
        }

        .program-title, .phase-switcher, .phase-stack, .profile-page { position: relative; z-index: 1; }

        .app-page[hidden] { display: none; }

        .program-title {
            margin-bottom: 20px;
            padding: 26px 30px;
            border: 1px solid rgba(191, 219, 254, 0.95);
            border-radius: 28px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.94));
            box-shadow: var(--shadow-md);
        }

        .program-title-main {
            display: flex;
            align-items: center;
            gap: 18px;
        }

        .profile-avatar {
            flex: 0 0 auto;
            width: 82px;
            height: 82px;
            border-radius: 24px;
            object-fit: cover;
            border: 3px solid #ffffff;
            box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
            background: #ffffff;
        }

        .program-title-copy { min-width: 0; }

        .program-title h1 {
            margin: 12px 0 8px;
            font-size: clamp(1.7rem, 4vw, 2.8rem);
            line-height: 1.35;
        }

        .program-title p {
            margin: 0;
            color: var(--text-muted);
        }

        .math-value {
            direction: ltr;
            unicode-bidi: isolate;
            display: inline-block;
            white-space: nowrap;
            font-family: "Vazir", Tahoma, Arial, sans-serif;
            font-weight: 700;
        }

        /* برچسب کوچک سوپرست زیر ست×تکرار — که ستون در موبایل نشکند */
        .ss-tag {
            display: block;
            font-size: 0.64rem;
            font-weight: 800;
            color: #d97706;
            margin-top: 2px;
            white-space: nowrap;
            line-height: 1.4;
        }
        [data-theme="dark"] .ss-tag { color: #fbbf24; }

        /* دکمه‌های کوچک هدر (رفرش + تم) کنار نشان نسخه */
        .title-badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin-bottom: 10px; }
        .title-badge-row .badge { white-space: nowrap; }
        .title-btns { display: flex; gap: 8px; flex-shrink: 0; }
        .hdr-btn {
            width: 34px; height: 34px; padding: 0; flex-shrink: 0;
            border: 1px solid var(--border); border-radius: 11px;
            background: rgba(255, 255, 255, 0.9); color: #1d4ed8; cursor: pointer;
            display: inline-flex; align-items: center; justify-content: center;
            transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
        }
        .hdr-btn:hover { transform: translateY(-1px); border-color: var(--primary); }
        .hdr-btn svg { width: 17px; height: 17px; }
        .hdr-btn .icon-sun { display: none; }
        .hdr-btn .icon-moon { display: block; }
        [data-theme="dark"] .hdr-btn { background: rgba(15, 23, 42, 0.7); color: #93c5fd; border-color: #24324a; }
        [data-theme="dark"] .hdr-btn .icon-sun { display: block; }
        [data-theme="dark"] .hdr-btn .icon-moon { display: none; }
        .hdr-btn.is-busy { opacity: 0.6; pointer-events: none; }
        .hdr-btn.is-busy svg { animation: mb-spin 0.8s linear infinite; }

        .section-head p, .lede, .bullet-list, .schedule-list { color: var(--text-muted); }

        .stat-card, .meta-item, .note-box, .mini-card {
            background: rgba(255, 255, 255, 0.86);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .stat-card {
            padding: 18px;
            border-radius: 22px;
        }

        .stat-card-highlight {
            background: linear-gradient(180deg, #f7fbff, #eef6ff);
            border-color: #bfd7ff;
        }

        .stat-label, .stat-note, .meta-item span, .phase-tab-kicker, .timeline-index { color: var(--text-soft); }
        .stat-card strong, .meta-item strong, .section-head h3, .day-header h3, .mini-card h4, .timeline-card h3 { display: block; }
        .stat-card strong { margin: 8px 0; font-size: 1.2rem; }

        .phase-switcher {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 14px;
            margin: 24px 0 28px;
        }

        .phase-tab, .day-tab {
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.84);
            color: var(--text-main);
            border-radius: 22px;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
        }

        .phase-tab {
            padding: 18px 20px;
            text-align: right;
            position: relative;
        }

        .phase-tab strong { display: block; margin-top: 4px; font-size: 1.06rem; }
        .phase-tab small { display: block; margin-top: 4px; color: var(--text-soft); }
        .phase-tab:hover, .day-tab:hover { transform: translateY(-2px); }
        .phase-tab.is-active {
            color: #ffffff;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            border-color: transparent;
            box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
        }

        .phase-tab.is-active .phase-tab-kicker,
        .phase-tab.is-active small {
            color: rgba(255, 255, 255, 0.78);
        }

        .day-tab.is-active { background: linear-gradient(180deg, #ffffff, #eff6ff); border-color: #9dc0ff; box-shadow: var(--shadow-sm); }

        .phase-tab.is-locked {
            color: #475569;
            background: linear-gradient(180deg, #f8fafc, #e5e7eb);
            border-color: #d1d5db;
            filter: grayscale(1);
            opacity: 0.72;
            cursor: default;
        }

        .phase-tab.is-locked:hover {
            transform: none;
            box-shadow: none;
        }

        .phase-tab.is-preview {
            border-style: dashed;
            border-color: #cbd5e1;
            background: repeating-linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.85) 10px, rgba(241,245,249,0.85) 10px, rgba(241,245,249,0.85) 20px);
            color: var(--text-soft);
            opacity: 0.82;
        }
        .phase-tab.is-preview::after {
            content: "🔒 به‌زودی";
            position: absolute;
            top: 8px;
            left: 8px;
            font-size: 0.62rem;
            font-weight: 800;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(245, 158, 11, 0.2);
            color: #92400e;
            line-height: 1;
            letter-spacing: 0.2px;
        }
        .phase-tab.is-preview strong { color: var(--text-muted); }
        .phase-tab.is-preview:hover { opacity: 0.95; }
        .phase-tab.is-preview.is-active {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            border-style: solid;
            border-color: transparent;
            color: #ffffff;
            opacity: 1;
            box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
        }
        .phase-tab.is-preview.is-active::after {
            background: rgba(255, 255, 255, 0.22);
            color: #ffffff;
        }
        .phase-tab.is-preview.is-active strong { color: #ffffff; }
        .phase-tab.is-preview.is-active .phase-tab-kicker,
        .phase-tab.is-preview.is-active small {
            color: rgba(255, 255, 255, 0.85);
        }

        .day-tab.is-active {
            color: #ffffff;
            font-weight: 700;
            border-color: transparent;
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
        }

        .day-tab.accent-red.is-active { background: linear-gradient(135deg, #ef4444, #b91c1c); }
        .day-tab.accent-blue.is-active { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
        .day-tab.accent-green.is-active { background: linear-gradient(135deg, #10b981, #047857); }
        .day-tab.accent-amber.is-active { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .day-tab.accent-violet.is-active { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

        .phase-panel { display: none; }
        .phase-panel.is-active { display: block; }

        /* فازهای گذشته (آرشیو): چون الان داخل این دوره‌ها نیستیم، هم تب و هم کل محتوای زیرش سیاه‌وسفید نمایش داده می‌شود */
        .phase-tab.is-past { filter: grayscale(1); }
        .phase-tab.is-past .phase-tab-kicker { color: var(--text-soft); }
        .phase-panel.is-past { filter: grayscale(1); }
        .phase-panel.is-past .exercise-gif { filter: grayscale(1); opacity: 0.92; }

        .section-card {
            padding: 28px;
            border-radius: var(--radius-md);
            background: var(--bg-card);
            border: 1px solid rgba(219, 231, 243, 0.95);
            box-shadow: var(--shadow-sm);
            backdrop-filter: blur(8px);
        }

        .section-card + .section-card,
        .section-card + .timeline-grid,
        .timeline-grid + .section-card,
        .day-switcher + .day-panel-stack,
        .content-grid + .section-card,
        .phase-panel > * + * { margin-top: 20px; }

        .section-hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; align-items: start; }
        .meta-grid, .note-grid, .compact-grid, .content-grid, .principle-grid, .timeline-grid { display: grid; gap: 18px; }
        .meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .meta-item { padding: 18px; border-radius: 18px; }
        .meta-item strong { margin-top: 10px; font-size: 1.05rem; }
        .timeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .timeline-card { padding: 24px; }
        .timeline-head { margin-bottom: 10px; }
        .timeline-index {
            display: inline-flex;
            padding: 6px 12px;
            border-radius: 999px;
            background: var(--bg-soft);
            font-size: 0.86rem;
            font-weight: 700;
        }

        .section-head {
            display: flex;
            align-items: end;
            justify-content: space-between;
            gap: 18px;
            margin-bottom: 18px;
        }

        .section-head h3, .section-card h2 { margin: 0; }
        .bullet-list, .schedule-list { margin: 0; padding-right: 1.2rem; }
        .bullet-list li, .schedule-list li { margin-bottom: 0.8rem; }
        .bullet-list li:last-child, .schedule-list li:last-child { margin-bottom: 0; }

        .table-wrap {
            overflow-x: auto;
            border-radius: 18px;
            border: 1px solid var(--border);
        }


        /* جدول‌های اطلاعاتی (قانون‌ها، نقطه شروع، جمع تغذیه): ستون اول باریک،
           ستون دوم متن بلند دارد و باید بپیچد، نه اینکه nowrap فشرده‌اش کند */
        .program-table.info-table { min-width: 0; }
        .program-table.info-table th,
        .program-table.info-table td { white-space: normal !important; }
        .program-table.info-table th:first-child,
        .program-table.info-table td:first-child { width: 26%; }
        .program-table.info-table th:nth-child(2),
        .program-table.info-table td:nth-child(2) { width: 74%; line-height: 2; }
        @media (max-width: 560px) {
            .program-table.info-table th:first-child,
            .program-table.info-table td:first-child { width: 34%; }
            .program-table.info-table th:nth-child(2),
            .program-table.info-table td:nth-child(2) { width: 66%; }
            .program-table.info-table th,
            .program-table.info-table td { padding: 12px 10px; }
        }

        /* دارک مود: کادرهای کهربایی در همه‌ی صفحه، نه فقط تغذیه‌ی فاز ۳.
           بدون این، متن روشن روی زمینه‌ی زرد روشن می‌افتد و خوانده نمی‌شود. */
        [data-theme="dark"] [style*="background:#fef3c7"],
        [data-theme="dark"] [style*="background: #fef3c7"],
        [data-theme="dark"] [style*="background:#fffbeb"],
        [data-theme="dark"] [style*="background: #fffbeb"] {
            background: rgba(120, 53, 15, 0.32) !important;
            border-color: #d97706 !important;
            color: #fde68a !important;
        }
        [data-theme="dark"] [style*="background:#fef3c7"] strong,
        [data-theme="dark"] [style*="background: #fef3c7"] strong,
        [data-theme="dark"] [style*="background:#fffbeb"] strong,
        [data-theme="dark"] [style*="background: #fffbeb"] strong {
            color: #fcd34d !important;
        }
        /* برچسب کوچک «موقت» رنگ متنش را inline می‌دهد، پس جدا پوشش داده می‌شود */
        [data-theme="dark"] small.ss-tag[style*="#fef3c7"] {
            background: rgba(120, 53, 15, 0.55) !important;
            color: #fcd34d !important;
        }

        .program-table {
            width: 100%;
            min-width: 720px;
            border-collapse: collapse;
            background: var(--bg-strong);
        }

        .program-table th,
        .program-table td {
            padding: 16px 18px;
            text-align: right;
            border-bottom: 1px solid #e9eef5;
            vertical-align: top;
        }

        .program-table thead th {
            background: #f5f8fc;
            font-size: 0.95rem;
        }

        .program-table th:nth-child(2),
        .program-table td:nth-child(2),
        .program-table th:nth-child(3),
        .program-table td:nth-child(3) {
            white-space: nowrap;
        }

        .program-table tbody tr.exercise-summary-row:hover td,
        .program-table tbody tr.exercise-summary-row.is-open td {
            background: #f8fbff;
        }

        .program-table tbody tr.exercise-detail-row td {
            padding: 0;
            background: #fbfdff;
        }

        .program-table tbody tr:last-child td { border-bottom: 0; }

        .exercise-toggle {
            width: 100%;
            display: inline-flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--text-main);
            font-weight: 700;
            text-align: right;
            cursor: pointer;
        }

        .exercise-toggle:focus-visible {
            outline: 3px solid rgba(37, 99, 235, 0.24);
            outline-offset: 6px;
            border-radius: 12px;
        }

        .caret {
            flex: 0 0 auto;
            width: 28px;
            height: 28px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            background: #eef6ff;
            color: #2563eb;
            transition: transform 0.2s ease;
        }

        .exercise-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

        .exercise-detail {
            margin: 0;
            padding: 18px;
            border-right: 4px solid #2563eb;
            background: linear-gradient(180deg, #fbfdff, #f5f9ff);
            color: var(--text-muted);
        }

        .exercise-detail p {
            margin: 0 0 12px;
            max-width: 980px;
        }

        .exercise-detail p:last-child { margin-bottom: 0; }

        .detail-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .detail-chip {
            padding: 12px 14px;
            border-radius: 14px;
            background: #ffffff;
            border: 1px solid #e4edf8;
        }

        .detail-chip strong { color: var(--text-main); }


        .exercise-detail.full-detail {
            padding: 20px;
            border-right: 4px solid #2563eb;
            background: linear-gradient(180deg, #fbfdff, #f5f9ff);
        }

        .source-detail {
            max-width: 1040px;
            color: var(--text-muted);
            line-height: 2;
        }

        .source-title {
            margin-bottom: 8px;
            color: var(--text-main);
            font-size: 1.1rem;
            font-weight: 700;
        }

        .source-subtitle {
            margin-top: 0;
            font-family: Tahoma, Arial, sans-serif;
        }

        .source-detail p {
            margin: 0 0 14px;
            max-width: none;
        }

        .source-detail p:last-child { margin-bottom: 0; }

        .source-detail .instruction-box {
            margin-top: 14px;
            padding: 16px 18px;
            border-radius: 16px;
            background: #ffffff;
            border: 1px solid #dbeafe;
        }

        .source-detail ul {
            margin: 0;
            padding-right: 1.2rem;
        }

        .source-detail li { margin-bottom: 0.8rem; }
        .source-detail li:last-child { margin-bottom: 0; }

        .source-detail .text-sm { font-size: 0.95rem; }
        .source-detail .text-xs { font-size: 0.8rem; }
        .source-detail .text-muted { color: var(--text-muted); }
        .source-detail .text-light { color: var(--text-soft); }
        .source-detail .font-bold { font-weight: 700; }
        .source-detail .font-mono { font-family: Tahoma, Arial, sans-serif; }
        .source-detail .leading-8 { line-height: 2; }
        .source-detail .space-y-3 > * + * { margin-top: 0.75rem; }
        .source-detail .list-none { list-style: none; padding-right: 0; }
        .source-detail .text-red-600 { color: #dc2626; }
        .source-detail .text-blue-600 { color: #2563eb; }
        .source-detail .tempo-box {
            display: inline-flex;
            margin: 0 0 14px;
            padding: 8px 12px;
            border-radius: 999px;
            background: #fefce8;
            border: 1px solid #fde68a;
            color: #92400e;
            font-size: 0.9rem;
            font-weight: 700;
        }

        .phase3-detail-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 0 0 10px;
        }

        .phase3-detail-meta span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 7px 10px;
            border-radius: 12px;
            background: #eef6ff;
            border: 1px solid #dbeafe;
            color: #1e3a8a;
            font-size: 0.86rem;
            font-weight: 700;
        }

        .safety-card { background: linear-gradient(180deg, rgba(254, 242, 242, 0.82), rgba(255, 255, 255, 0.94)); }
        .note-grid, .compact-grid, .content-grid, .principle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .note-box, .mini-card { padding: 18px; border-radius: 18px; }
        .note-box strong, .mini-card h4 { margin-bottom: 8px; }
        .day-switcher { display: flex; flex-wrap: wrap; gap: 12px; }
        .day-tab { padding: 12px 18px; }
        .day-panel { display: none; }
        .day-panel.is-active { display: block; }
        .day-card { overflow: hidden; }

        .day-header {
            margin: -28px -28px 16px;
            padding: 16px 24px;
            color: #ffffff;
        }

        .day-header p, .day-header .badge { color: inherit; }
        .day-header h3 { margin: 4px 0 2px; line-height: 1.45; }
        .day-header p { margin: 0; line-height: 1.5; opacity: 0.92; }
        .day-header .badge { padding: 6px 10px; }

        #phase-3 > .section-hero,
        #phase-1 > .section-hero,
        #phase-2 > .section-hero { display: none; }

        .phase-status-card { background: linear-gradient(180deg, #ffffff, #f8fafc); }
        .phase-status-grid {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 18px;
            align-items: stretch;
            margin-top: 18px;
        }
        .phase-status-col {
            padding: 18px 20px;
            border-radius: 20px;
            border: 1px solid var(--border);
            background: #ffffff;
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .phase-status-col.is-entry { border-right: 4px solid #94a3b8; }
        .phase-status-col.is-goal { border-right: 4px solid #16a34a; background: linear-gradient(180deg, #f0fdf4, #ffffff); }
        .phase-status-arrow {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            color: var(--text-soft);
            opacity: 0.7;
        }
        .phase-status-label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 999px;
            font-size: 0.82rem;
            font-weight: 800;
            background: #f1f5f9;
            color: var(--text-muted);
            width: fit-content;
        }
        .phase-status-col.is-goal .phase-status-label { background: #dcfce7; color: #166534; }
        .phase-status-stats {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .phase-status-stats > div {
            padding: 10px 12px;
            border-radius: 14px;
            background: #f8fafc;
            border: 1px solid var(--border);
        }
        .phase-status-stats span {
            display: block;
            font-size: 0.78rem;
            color: var(--text-soft);
            margin-bottom: 2px;
        }
        .phase-status-stats strong { font-size: 1.08rem; color: var(--text-main); }
        .phase-status-note {
            margin: 0;
            font-size: 0.92rem;
            color: var(--text-muted);
            line-height: 1.7;
        }
        @media (max-width: 720px) {
            .phase-status-grid { grid-template-columns: 1fr; }
            .phase-status-arrow { transform: rotate(90deg); padding: 4px 0; }
        }

        .below-table-accordion {
            margin-top: 16px;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: rgba(255, 255, 255, 0.9);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
        }

        .below-table-accordion > summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 16px;
            color: var(--text-main);
            cursor: pointer;
            font-weight: 700;
            list-style: none;
        }

        .below-table-accordion > summary::-webkit-details-marker { display: none; }
        .below-table-accordion > summary::after {
            content: "⌄";
            width: 28px;
            height: 28px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            background: #eef6ff;
            color: #2563eb;
            transition: transform 0.2s ease;
        }

        .below-table-accordion[open] > summary::after { transform: rotate(180deg); }

        .below-table-body {
            padding: 0 16px 16px;
        }

        .below-table-body > .compact-grid,
        .below-table-body > .content-grid,
        .below-table-body > .principle-grid {
            margin-top: 0;
        }

        .phase3-full-content {
            color: var(--text-muted);
            line-height: 1.9;
        }

        .phase3-full-content h2,
        .phase3-full-content h3 {
            line-height: 1.45;
        }

        .phase3-full-content > h2,
        .phase3-full-content > .card,
        .phase3-full-content > section.card {
            margin-top: 0 !important;
        }

        .phase3-full-content .grid-2 {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 24px;
        }

        .phase3-full-content .card {
            padding: 24px;
            border-radius: var(--radius-md);
            background: #ffffff;
            border: 1px solid #e2e8f0;
            box-shadow: var(--shadow-sm);
        }

        .phase3-full-content .text-center { text-align: center; }
        .phase3-full-content .text-muted { color: var(--text-muted); }
        .phase3-full-content .text-sm { font-size: 0.95rem; }
        .phase3-full-content .font-bold { font-weight: 700; }
        .phase3-full-content .text-justify { text-align: justify; }
        .phase3-full-content .leading-8 { line-height: 2; }
        .phase3-full-content .list-none { list-style: none; padding-right: 0; }
        .phase3-full-content .space-y-8 > * + * { margin-top: 2rem; }
        .phase3-full-content .mb-8 { margin-bottom: 2rem; }
        .phase3-full-content .mb-10 { margin-bottom: 2.5rem; }
        .phase3-full-content table { width: 100%; }
        .phase3-full-content td { vertical-align: top; }

        .exercise-gif-wrap {
            display: flex;
            justify-content: center;
            margin: 14px 0 18px;
        }
        .exercise-gif {
            max-width: 320px;
            width: 100%;
            height: auto;
            border-radius: 14px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            box-shadow: var(--shadow-sm);
        }
        @media (max-width: 720px) {
            .exercise-gif { max-width: 240px; border-radius: 12px; }
        }

        /* ===== تب سوم: صفحه مکمل / خوردن روزانه ===== */
        .supplement-hero { align-items: center; }
        .supplement-hero-icon {
            width: 84px;
            height: 84px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 22px;
            background: linear-gradient(135deg, #2563eb, #10b981);
            color: #ffffff;
            box-shadow: var(--shadow-sm);
        }
        .supplement-hero-icon svg { width: 42px; height: 42px; }
        .supplement-intro { margin-bottom: 20px; }
        .supplement-intro-lead { margin: 0 0 14px; color: var(--text-muted); line-height: 1.95; }
        .supplement-intro-note { margin: 14px 0 0; font-size: 0.9rem; color: var(--text-soft); line-height: 1.9; }
        .supplement-legend { display: flex; flex-wrap: wrap; gap: 8px; }
        .supplement-legend span {
            padding: 6px 11px;
            border-radius: 999px;
            background: #f1f5f9;
            border: 1px solid var(--border);
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-muted);
        }
        .supplement-page .program-table td:nth-child(3) { white-space: normal; }

        /* دسته‌های درختیِ روز (نشست‌های زمانی) */
        .meal-group { border-right-width: 4px; }
        .meal-group > summary { align-items: center; gap: 10px; }
        .meal-group-head { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
        .meal-group-title { font-size: 1rem; font-weight: 800; color: var(--text-main); }
        .meal-group-preview { font-size: 0.82rem; font-weight: 600; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .meal-group-time {
            flex: 0 0 auto;
            padding: 6px 12px;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb, #10b981);
            color: #ffffff;
            font-weight: 800;
            font-size: 0.85rem;
            white-space: nowrap;
        }
        .meal-group-note {
            margin: 2px 0 12px;
            padding: 10px 12px;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px solid var(--border);
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.85;
        }
        [data-theme="dark"] .meal-group-note { background: #131b2c; border-color: var(--border); color: var(--text-muted); }

        /* تاپ‌بارِ خلاصه و فشرده‌ی صفحه مکمل */
        .supplement-topbar {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 14px;
            padding: 11px 15px;
            border-radius: 16px;
            background:
                linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.12)),
                var(--bg-strong);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }
        .supplement-topbar-icon {
            flex: 0 0 auto;
            width: 40px;
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            background: linear-gradient(135deg, #2563eb, #10b981);
            color: #ffffff;
        }
        .supplement-topbar-icon svg { width: 22px; height: 22px; }
        .supplement-topbar-text { min-width: 0; }
        .supplement-topbar-text h2 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
        .supplement-topbar-text p { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-soft); }

        .nutri-tag {
            display: inline-block;
            margin-right: 6px;
            padding: 2px 8px;
            border-radius: 999px;
            background: #eef2ff;
            border: 1px solid #c7d2fe;
            color: #4338ca;
            font-size: 0.7rem;
            font-weight: 700;
            vertical-align: middle;
        }
        .supplement-page .exercise-summary-row.is-optional .exercise-toggle { color: var(--text-muted); }

        [data-theme="dark"] .supplement-legend span { background: #161f30; border-color: var(--border); color: var(--text-muted); }
        [data-theme="dark"] .nutri-tag { background: #1e1b4b; border-color: #3730a3; color: #c7d2fe; }

        @media (max-width: 720px) {
            .supplement-hero-icon { width: 64px; height: 64px; border-radius: 18px; }
            .supplement-hero-icon svg { width: 32px; height: 32px; }
            .supplement-page .table-wrap { overflow: visible; }
            .supplement-page .program-table {
                width: 100%;
                min-width: 0;
                table-layout: fixed;
            }
            .supplement-page .program-table th:first-child,
            .supplement-page .program-table td:first-child { width: 46%; }
            .supplement-page .program-table th:nth-child(2),
            .supplement-page .program-table td:nth-child(2) { width: 24%; white-space: normal; }
            .supplement-page .program-table th:nth-child(3),
            .supplement-page .program-table td:nth-child(3) { width: 30%; white-space: normal; }
            .supplement-page .program-table th,
            .supplement-page .program-table td {
                padding: 9px 9px;
                font-size: 0.77rem;
                line-height: 1.45;
                white-space: normal;
            }
            .supplement-page .exercise-toggle {
                white-space: normal;
                line-height: 1.45;
                gap: 6px;
            }
        }

        .profile-hero {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 22px;
            align-items: center;
            margin-bottom: 20px;
            background:
                linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.12)),
                rgba(255, 255, 255, 0.94);
        }

        .profile-hero .profile-avatar {
            width: 118px;
            height: 118px;
            border-radius: 30px;
        }

        .profile-hero h2 {
            margin: 8px 0 8px;
            font-size: clamp(1.8rem, 4vw, 2.8rem);
            line-height: 1.25;
        }

        .profile-hero p { margin: 0; color: var(--text-muted); }

        .profile-kpi-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
            margin-bottom: 20px;
        }

        .profile-kpi {
            padding: 18px;
            border-radius: 20px;
            background: #ffffff;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .profile-kpi span {
            display: block;
            color: var(--text-soft);
            font-size: 0.82rem;
        }

        .profile-kpi strong {
            display: block;
            margin-top: 8px;
            font-size: 1.25rem;
        }

        .profile-grid {
            display: grid;
            grid-template-columns: 1.15fr 0.85fr;
            gap: 20px;
        }

        .chart-card,
        .health-card {
            padding: 22px;
            border-radius: var(--radius-md);
            background: rgba(255, 255, 255, 0.94);
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .chart-card h3,
        .health-card h3 {
            margin: 0 0 14px;
        }

        .progress-chart {
            width: 100%;
            height: auto;
            display: block;
            direction: ltr;
        }

        .chart-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 12px;
            color: var(--text-muted);
            font-size: 0.86rem;
        }

        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            display: inline-block;
            margin-left: 6px;
        }

        .health-list {
            margin: 0;
            padding-right: 1.1rem;
            color: var(--text-muted);
        }

        .health-list li { margin-bottom: 0.7rem; }

        .profile-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .profile-kpi.is-positive { background: linear-gradient(180deg, #f0fdf4, #ffffff); border-color: #bbf7d0; }
        .profile-kpi.is-positive strong { color: #15803d; }
        .profile-kpi-delta {
            margin-top: 4px;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 800;
            background: #dcfce7;
            color: #166534;
        }
        /* قانونِ کلیِ «.profile-kpi span { display:block }» (specificity بالاتر) بَج و
           فرزندانش را block می‌کرد و عدد/واحد/علامت را زیرِ هم می‌انداخت. این‌جا با
           specificityِ بالاتر دوباره ردیفِ افقیِ flex می‌سازیم و رنگ/سایز را برمی‌گردانیم. */
        .profile-kpi .profile-kpi-delta {
            display: inline-flex;
            direction: ltr;
            align-items: baseline;
            color: #166534;
            font-size: 0.72rem;
        }
        .profile-kpi .profile-kpi-delta > span {
            color: inherit;
            font-size: inherit;
        }
        /* ترتیبِ نمایش [واحد][علامت][عدد] → واحد سمتِ چپ و «−عدد» سمتِ راست (هم‌تراز با مقدار) */
        .profile-kpi .profile-kpi-delta > span.u { margin-inline-end: 0.3em; }
        /* عدد+علامت در متن‌های دیگر (درصد/کالری): ترتیب قطعی با inline-flex */
        .numsign { display: inline-flex; direction: ltr; align-items: baseline; }
        .numsign > i { font-style: normal; }

        .progress-bars { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
        .progress-row {
            padding: 14px 16px;
            border-radius: 16px;
            background: #f8fafc;
            border: 1px solid var(--border);
        }
        .progress-row-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
        .progress-row-head strong { font-size: 1rem; color: var(--text-main); }
        .progress-row-head span { font-size: 0.85rem; color: var(--text-soft); }
        .progress-row-track {
            position: relative;
            height: 14px;
            background: #e2e8f0;
            border-radius: 999px;
            overflow: visible;
        }
        .progress-row-fill {
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, #2563eb, #16a34a);
            position: relative;
        }
        .progress-row-target {
            position: absolute;
            top: -4px;
            width: 3px;
            height: 22px;
            background: #dc2626;
            border-radius: 2px;
        }
        .progress-row-target::after {
            content: "هدف";
            position: absolute;
            top: -18px;
            right: -10px;
            font-size: 0.68rem;
            font-weight: 800;
            color: #dc2626;
            white-space: nowrap;
        }
        .progress-row-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.78rem; color: var(--text-soft); }

        .clinical-warnings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
        .clinical-warning {
            display: flex;
            gap: 12px;
            padding: 14px 16px;
            background: linear-gradient(180deg, #fef2f2, #ffffff);
            border: 1px solid #fecaca;
            border-right: 4px solid #dc2626;
            border-radius: 16px;
        }
        .clinical-warning-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1.2; }
        .clinical-warning-body { min-width: 0; }
        .clinical-warning h4 { margin: 0 0 4px; color: #b91c1c; font-size: 0.98rem; font-weight: 800; }
        .clinical-warning p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }

        .principle-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
        .principle-card {
            padding: 18px 20px;
            border-radius: 18px;
            background: #ffffff;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .principle-card-icon { font-size: 1.6rem; }
        .principle-card h4 { margin: 0; color: var(--primary); font-size: 1.02rem; font-weight: 900; }
        .principle-card-tag {
            display: inline-block;
            padding: 3px 9px;
            border-radius: 999px;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 0.72rem;
            font-weight: 800;
            width: fit-content;
        }
        .principle-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.75; }

        .profile-section-title {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0 0 12px;
            font-size: 1.15rem;
            font-weight: 900;
            color: var(--text-main);
        }
        .profile-section-title span { font-size: 1.4rem; }

        details.profile-card { padding: 0; overflow: hidden; }
        details.profile-card > summary {
            cursor: pointer;
            list-style: none;
            padding: 18px 22px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            user-select: none;
            transition: background 0.15s ease;
        }
        details.profile-card > summary:hover { background: rgba(248, 250, 252, 0.6); }
        details.profile-card > summary::-webkit-details-marker { display: none; }
        details.profile-card > summary::marker { content: ""; }
        details.profile-card > summary > .profile-section-title { margin: 0; }
        details.profile-card > summary::after {
            content: "⌄";
            font-size: 1.5rem;
            color: var(--text-soft);
            transition: transform 0.25s ease;
            flex-shrink: 0;
            line-height: 1;
        }
        details.profile-card[open] > summary::after { transform: rotate(180deg); }
        details.profile-card > .profile-card-body {
            padding: 0 22px 22px;
            animation: profileCardOpen 0.25s ease;
        }
        details.profile-card[open] > summary {
            border-bottom: 1px solid var(--border);
            margin-bottom: 4px;
        }
        @keyframes profileCardOpen {
            from { opacity: 0; transform: translateY(-4px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @media (max-width: 720px) {
            details.profile-card > summary { padding: 16px 18px; }
            details.profile-card > .profile-card-body { padding: 0 18px 18px; }
        }

        .measurement-form { display: grid; gap: 12px; }
        .measurement-form-row {
            display: grid;
            grid-template-columns: 110px 1fr;
            align-items: center;
            gap: 12px;
        }
        .measurement-form-row > label {
            font-weight: 800;
            color: var(--text-muted);
            font-size: 0.92rem;
        }
        .measurement-form-row input,
        .measurement-form-row select {
            padding: 11px 14px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: #ffffff;
            font-family: "Vazir", Tahoma, Arial, sans-serif;
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-main);
            width: 100%;
            min-width: 0;
            direction: rtl;
            text-align: right;
        }
        .measurement-form-row input:focus,
        .measurement-form-row select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        }
        .measurement-form-row input::placeholder {
            font-family: "Vazir", Tahoma, Arial, sans-serif;
            color: #94a3b8;
            font-weight: 600;
        }
        .measurement-date-group {
            display: grid;
            grid-template-columns: 1fr 1.5fr 1fr auto;
            gap: 8px;
        }
        .measurement-form-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 4px;
        }
        .measurement-btn {
            padding: 11px 18px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: #ffffff;
            color: var(--text-main);
            font: inherit;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .measurement-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
        .measurement-btn.is-primary {
            background: linear-gradient(135deg, var(--primary), #1d4ed8);
            color: #ffffff;
            border-color: transparent;
        }
        .measurement-btn.is-ghost {
            background: transparent;
            color: var(--text-muted);
            border-color: var(--border);
            font-size: 0.85rem;
            padding: 8px 12px;
        }
        .measurement-feedback {
            display: none;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: 0.88rem;
            font-weight: 700;
        }
        .measurement-feedback.is-success { display: block; background: #dcfce7; color: #166534; }
        .measurement-feedback.is-error { display: block; background: #fee2e2; color: #b91c1c; }

        .measurement-history {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 360px;
            overflow-y: auto;
            margin-top: 8px;
        }
        .measurement-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 14px;
            border-radius: 12px;
            background: #f8fafc;
            border: 1px solid var(--border);
            gap: 12px;
        }
        .measurement-item.is-latest { background: linear-gradient(180deg, #f0fdf4, #ffffff); border-color: #bbf7d0; }
        .measurement-item.is-seed { background: #ffffff; }
        .measurement-item-info { min-width: 0; flex: 1; }
        .measurement-item-info strong { display: block; font-size: 0.96rem; color: var(--text-main); margin-bottom: 2px; }
        .measurement-item-info span { font-size: 0.82rem; color: var(--text-soft); }
        .measurement-item-tag {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 800;
            margin-right: 6px;
        }
        .measurement-item-tag.is-latest { background: #dcfce7; color: #15803d; }
        .measurement-item-tag.is-seed { background: #e0e7ff; color: #3730a3; }
        .measurement-item-delete {
            background: transparent;
            border: 1px solid #fecaca;
            color: #b91c1c;
            border-radius: 10px;
            padding: 6px 12px;
            font: inherit;
            font-size: 0.8rem;
            font-weight: 700;
            cursor: pointer;
            flex-shrink: 0;
        }
        .measurement-item-delete:hover { background: #fef2f2; }

        .backup-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 8px;
        }
        .backup-info {
            margin: 0 0 12px;
            font-size: 0.88rem;
            color: var(--text-muted);
            line-height: 1.7;
        }

        @media (max-width: 720px) {
            .measurement-form-row { grid-template-columns: 1fr; gap: 6px; }
            .measurement-date-group { grid-template-columns: 1fr 1.5fr 1fr; }
            .measurement-date-group .measurement-btn { grid-column: 1 / -1; }
        }

        .phase-preview-banner {
            display: flex;
            gap: 14px;
            align-items: center;
            padding: 16px 20px;
            border-radius: 18px;
            background: linear-gradient(135deg, #fef3c7, #fffbeb);
            border: 1px solid #fde68a;
            margin-bottom: 16px;
        }
        .phase-preview-banner-icon { font-size: 2rem; flex-shrink: 0; }
        .phase-preview-banner h3 { margin: 0 0 4px; font-size: 1.05rem; color: #92400e; }
        .phase-preview-banner p { margin: 0; font-size: 0.92rem; color: #78350f; line-height: 1.7; }

        .phase-preview-split {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 12px;
            margin-top: 12px;
        }
        .phase-preview-day {
            padding: 14px 16px;
            border-radius: 16px;
            background: #ffffff;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }
        .phase-preview-day-tag {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 800;
            margin-bottom: 8px;
        }
        .phase-preview-day strong { display: block; font-size: 1rem; color: var(--text-main); margin-bottom: 4px; }
        .phase-preview-day p { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

        .phase-focus-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
        .phase-focus-item {
            display: flex;
            gap: 10px;
            padding: 12px 14px;
            border-radius: 14px;
            background: #f8fafc;
            border: 1px solid var(--border);
        }
        .phase-focus-item span { font-size: 1.4rem; flex-shrink: 0; }
        .phase-focus-item div { min-width: 0; }
        .phase-focus-item strong { display: block; font-size: 0.92rem; color: var(--text-main); margin-bottom: 2px; }
        .phase-focus-item p { margin: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
        @media (max-width: 720px) {
            .phase-focus-list { grid-template-columns: 1fr; }
        }

        /* نوار ناوبریِ پایین — در همه‌ی اندازه‌ها دیده می‌شود (دسکتاپ: پیلِ وسط‌چین) */
        .mobile-app-nav {
            position: fixed;
            bottom: 16px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 80;
            display: flex;
            gap: 6px;
            width: min(420px, calc(100% - 32px));
            padding: 6px;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: var(--bg-strong);
            box-shadow: var(--shadow-md);
        }
        .mobile-app-nav button {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 46px;
            border: 0;
            border-radius: 13px;
            background: transparent;
            color: var(--text-muted);
            font: inherit;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            transition: background 0.18s, color 0.18s, transform 0.12s;
        }
        .mobile-app-nav button svg { width: 18px; height: 18px; }
        .mobile-app-nav button:hover { color: var(--text-main); background: color-mix(in srgb, var(--primary) 7%, transparent); }
        .mobile-app-nav button.is-active {
            background: rgba(37, 99, 235, 0.12);                                /* fallback */
            background: color-mix(in srgb, var(--primary) 13%, transparent);
            color: var(--primary);
        }

        .cooldown-box {
            margin-top: 18px;
            padding: 16px 18px;
            border-radius: 18px;
            background: #f3f8ff;
            color: var(--text-muted);
            border: 1px solid #d7e7ff;
        }

        .pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
        .pill { padding: 10px 14px; background: #fefce8; color: #92400e; border: 1px solid #fde68a; }
        .pill,
        .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            font-weight: 700;
        }

        .badge { padding: 8px 13px; font-size: 0.78rem; }
        .badge-primary { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
        .badge-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
        .badge-warning { background: #fefce8; color: #b45309; border: 1px solid #fde68a; }
        .badge-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
        .badge-warm { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
        .badge-soft-red, .badge-soft-blue, .badge-soft-green, .badge-soft-amber, .badge-soft-violet { background: rgba(255, 255, 255, 0.2); }

        .accent-red { border-color: #fecaca; }
        .accent-blue { border-color: #bfdbfe; }
        .accent-green { border-color: #bbf7d0; }
        .accent-amber { border-color: #fed7aa; }
        .accent-red-bg { background: linear-gradient(135deg, #ef4444, #b91c1c); }
        .accent-blue-bg { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
        .accent-green-bg { background: linear-gradient(135deg, #10b981, #047857); }
        .accent-amber-bg { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .accent-violet-bg { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
        .accent-slate { border-top: 4px solid #334155; }
        .accent-blue-border { border-right: 4px solid #3b82f6; }
        .accent-green-border { border-right: 4px solid #10b981; }
        .accent-amber-border { border-right: 4px solid #f59e0b; }
        .accent-yellow-border { border-right: 4px solid #eab308; }

        @media (max-width: 1080px) {
            .section-hero, .timeline-grid, .meta-grid, .note-grid, .compact-grid, .content-grid, .principle-grid, .detail-grid, .profile-grid, .profile-kpi-grid { grid-template-columns: 1fr; }
        }

        @media (max-width: 720px) {
            .page-shell { width: min(100% - 20px, 100%); padding-top: 18px; padding-bottom: 92px; }
            .program-title { margin-bottom: 12px; padding: 18px; border-radius: 20px; }
            .program-title-main { gap: 12px; }
            .program-title .profile-avatar {
                width: 58px;
                height: 58px;
                border-radius: 18px;
            }
            .program-title h1 { margin: 8px 0 6px; font-size: 1.35rem; }
            .program-title p { font-size: 0.88rem; line-height: 1.8; }
            .hero, .section-card { padding: 22px; border-radius: 24px; }
            .hero { display: none; }
            .phase-switcher {
                display: flex;
                overflow-x: auto;
                gap: 6px;
                margin: 0 0 14px;
                padding: 8px;
                border: 1px solid rgba(219, 231, 243, 0.95);
                border-radius: 18px;
                background: rgba(248, 250, 252, 0.92);
                box-shadow: none;
                scrollbar-width: thin;
            }
            .day-header { margin: -22px -22px 14px; padding: 12px 18px; }
            .day-header h3 { font-size: 1rem; }
            .day-header p { font-size: 0.86rem; }
            .section-head { align-items: start; flex-direction: column; }
            .phase-tab {
                flex: 0 0 136px;
                min-width: 0;
                padding: 9px 7px;
                border-radius: 14px;
                text-align: center;
            }
            .phase-tab-kicker { font-size: 0.68rem; }
            .phase-tab strong { margin-top: 1px; font-size: 0.82rem; line-height: 1.5; }
            .phase-tab small { display: block; font-size: 0.58rem; line-height: 1.45; }
            .day-switcher {
                position: sticky;
                top: 0;
                z-index: 19;
                flex-wrap: nowrap;
                overflow-x: auto;
                gap: 8px;
                margin-top: 0;
                padding: 8px;
                border: 1px solid rgba(219, 231, 243, 0.95);
                border-radius: 16px;
                background: rgba(248, 250, 252, 0.92);
                box-shadow: var(--shadow-sm);
                backdrop-filter: blur(10px);
                scrollbar-width: thin;
            }
            #phase-2 > .section-hero + .section-card + .day-switcher,
            #phase-3 > .section-hero + .day-switcher {
                margin-top: 0;
            }
            .day-tab {
                flex: 0 0 auto;
                width: auto;
                min-width: 84px;
                padding: 9px 12px;
                border-radius: 13px;
                white-space: nowrap;
            }
            .phase3-full-content .grid-2 { grid-template-columns: 1fr; }
            .phase3-full-content .card { padding: 16px; border-radius: 18px; }
            .phase3-full-content h2 { font-size: 1.35rem !important; margin-top: 1.5rem !important; }
            .phase3-full-content h3 { font-size: 1.15rem !important; }
            .phase3-full-content li[style*="display: flex"] {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 0.6rem !important;
            }
            .phase3-full-content table,
            .phase3-full-content tbody,
            .phase3-full-content tr,
            .phase3-full-content td {
                display: block;
                width: 100% !important;
            }
            #phase-3 > .section-hero,
            #phase-1 > .section-hero,
            #phase-2 > .section-hero { display: none; }
            .table-wrap {
                -webkit-overflow-scrolling: touch;
                scrollbar-width: thin;
            }
            .program-table {
                min-width: 900px;
                table-layout: auto;
            }
            .phase3-full-content .program-table {
                display: table;
                width: 100% !important;
            }
            .phase3-full-content .program-table thead { display: table-header-group; }
            .phase3-full-content .program-table tbody { display: table-row-group; }
            .phase3-full-content .program-table tr { display: table-row; }
            .phase3-full-content .program-table th,
            .phase3-full-content .program-table td {
                display: table-cell;
                width: auto !important;
            }
            .below-table-accordion .phase3-full-content {
                font-size: 0.78rem;
                line-height: 1.62;
            }
            .below-table-accordion .phase3-full-content h2 {
                gap: 0.5rem !important;
                margin-bottom: 0.9rem !important;
                padding-bottom: 0.75rem !important;
                font-size: 1rem !important;
                line-height: 1.45 !important;
            }
            .below-table-accordion .phase3-full-content h3 {
                margin-bottom: 0.8rem !important;
                font-size: 0.9rem !important;
                line-height: 1.45 !important;
            }
            .below-table-accordion .phase3-full-content p,
            .below-table-accordion .phase3-full-content li,
            .below-table-accordion .phase3-full-content td,
            .below-table-accordion .phase3-full-content strong {
                font-size: 0.76rem !important;
                line-height: 1.62 !important;
            }
            .below-table-accordion .phase3-full-content .card,
            .below-table-accordion .phase3-full-content section.card,
            .below-table-accordion .phase3-full-content div[style*="padding: 2rem"] {
                padding: 0.85rem !important;
                border-radius: 14px !important;
            }
            .below-table-accordion .phase3-full-content span[style*="padding: 1rem"] {
                padding: 0.7rem !important;
            }
            .below-table-accordion .phase3-full-content .badge,
            .below-table-accordion .phase3-full-content span[style*="font-size: 1rem"],
            .below-table-accordion .phase3-full-content strong[style*="font-size: 1.1rem"],
            .below-table-accordion .phase3-full-content strong[style*="font-size: 1.2rem"] {
                font-size: 0.7rem !important;
            }
            .below-table-accordion .phase3-full-content .badge {
                padding: 6px 9px !important;
            }
            .below-table-accordion .phase3-full-content table {
                font-size: 0.76rem !important;
            }

            /* ============================================
               موبایل: فونت‌های بخش تغذیه و مکمل (هماهنگ با روزهای هفته)
               ============================================ */
            #phase3-day-nutrition .phase3-full-content {
                font-size: 0.78rem !important;
                line-height: 1.62 !important;
            }
            /* h2 اصلی بخش تغذیه (🔬 مهندسی تغذیه و فارماکولوژی) */
            #phase3-day-nutrition .phase3-full-content > h2 {
                font-size: 1.05rem !important;
                line-height: 1.45 !important;
                margin-top: 0.8rem !important;
                margin-bottom: 0.9rem !important;
            }
            /* پاراگراف توضیح زیر h2 اصلی */
            #phase3-day-nutrition .phase3-full-content > p {
                font-size: 0.78rem !important;
                line-height: 1.62 !important;
            }
            /* summary های nutrition-section (مکمل/هیدراتاسیون/فستینگ) */
            #phase3-day-nutrition details.nutrition-section > summary {
                font-size: 0.95rem !important;
                padding: 0.85rem 1rem !important;
            }
            /* h3 داخل کارت‌ها (💊 پروتکل مکمل‌ها، 💧 پروتکل هیدراتاسیون، ⏱️ برنامه فستینگ) */
            #phase3-day-nutrition .card h3 {
                font-size: 1rem !important;
                line-height: 1.45 !important;
                margin-bottom: 0.9rem !important;
            }
            /* summary tier-block ها (Tier 1, 2, 3, ❌, ✅) */
            #phase3-day-nutrition details.tier-block > summary {
                font-size: 0.92rem !important;
                padding: 0.75rem 0.9rem !important;
            }
            /* h4 داخل تیر ها (در صورت وجود — مثل ❌ مکمل‌هایی که نخر) */
            #phase3-day-nutrition .card h4,
            #phase3-day-nutrition details h4 {
                font-size: 0.88rem !important;
                line-height: 1.5 !important;
                margin: 0.6rem 0 !important;
            }
            /* p, li, td, strong عمومی */
            #phase3-day-nutrition .phase3-full-content p,
            #phase3-day-nutrition .phase3-full-content li,
            #phase3-day-nutrition .phase3-full-content td,
            #phase3-day-nutrition .phase3-full-content th,
            #phase3-day-nutrition .phase3-full-content strong,
            #phase3-day-nutrition .phase3-full-content span {
                font-size: 0.76rem !important;
                line-height: 1.62 !important;
            }
            /* استثناء: strong های که font-size مشخص دارند (مثل عنوان داخل box ها) */
            #phase3-day-nutrition strong[style*="font-size: 1.15rem"],
            #phase3-day-nutrition strong[style*="font-size: 1.2rem"],
            #phase3-day-nutrition strong[style*="font-size: 1.1rem"],
            #phase3-day-nutrition strong[style*="font-size: 1.05rem"],
            #phase3-day-nutrition strong[style*="font-size: 1rem"] {
                font-size: 0.82rem !important;
            }
            /* td اصلی Tier ها (که font-size: 1.15rem داشتند) */
            #phase3-day-nutrition td[style*="font-size: 1.15rem"] {
                font-size: 0.8rem !important;
            }
            /* padding درون کارت‌ها و باکس‌ها */
            #phase3-day-nutrition .card {
                padding: 14px !important;
                border-radius: 16px !important;
            }
            #phase3-day-nutrition details.tier-block {
                padding: 0 !important;
                margin-bottom: 1rem !important;
            }
            #phase3-day-nutrition details.tier-block > .tier-block-body {
                padding: 0 0.85rem 0.85rem 0.85rem !important;
            }
            #phase3-day-nutrition details.nutrition-section > .nutrition-section-body {
                padding: 0 0.85rem 0.85rem 0.85rem !important;
            }
            /* جدول‌های داخل Tier ها — fontهای ریز */
            #phase3-day-nutrition table th,
            #phase3-day-nutrition table td {
                padding: 0.55rem 0.6rem !important;
                font-size: 0.74rem !important;
                line-height: 1.55 !important;
            }
            /* پنجره فستینگ - li ها */
            #phase3-day-nutrition .card ul.list-none > li {
                padding-bottom: 0.9rem !important;
            }
            #phase3-day-nutrition .card ul.list-none > li > div > strong {
                font-size: 0.85rem !important;
                line-height: 1.5 !important;
                margin-bottom: 0.4rem !important;
            }
            /* badge داخل فستینگ (۰۸:۳۰ صبح، ۱۴:۰۰ ظهر و غیره) */
            #phase3-day-nutrition .badge,
            #phase3-day-nutrition span[style*="font-size: 1.1rem"][style*="رأس"] {
                font-size: 0.72rem !important;
                padding: 5px 9px !important;
            }
            /* رنگ‌ها و box های ریز با background رنگی */
            #phase3-day-nutrition span[style*="background:"],
            #phase3-day-nutrition div[style*="background:"][style*="padding: 1rem"],
            #phase3-day-nutrition div[style*="background:"][style*="padding: 1.5rem"],
            #phase3-day-nutrition div[style*="background:"][style*="padding: 1.2rem"] {
                padding: 0.65rem 0.8rem !important;
            }
            /* لینک‌ها/کد ها */
            #phase3-day-nutrition code {
                font-size: 0.72rem !important;
                padding: 0.25rem 0.5rem !important;
            }
            /* ============================================
               موبایل: فونت پنل اصلاحی فاز ۴، ۵، ۶
               ============================================ */
            .phase-panel details.panel-critique > summary {
                font-size: 0.95rem !important;
                padding: 0.85rem 1rem !important;
            }
            .phase-panel details.panel-critique > .panel-critique-body {
                font-size: 0.78rem !important;
                line-height: 1.62 !important;
                padding: 0 0.95rem 1rem 0.95rem !important;
            }
            .phase-panel details.panel-critique h4 {
                font-size: 0.88rem !important;
                line-height: 1.5 !important;
                margin: 0.8rem 0 0.5rem 0 !important;
            }
            .phase-panel details.panel-critique p,
            .phase-panel details.panel-critique li,
            .phase-panel details.panel-critique td,
            .phase-panel details.panel-critique th,
            .phase-panel details.panel-critique strong,
            .phase-panel details.panel-critique span {
                font-size: 0.76rem !important;
                line-height: 1.6 !important;
            }
            .phase-panel details.panel-critique p[style*="font-size: 1.05rem"] {
                font-size: 0.78rem !important;
            }
            .phase-panel details.panel-critique table th,
            .phase-panel details.panel-critique table td {
                padding: 0.5rem 0.55rem !important;
                font-size: 0.72rem !important;
                line-height: 1.5 !important;
            }
            .phase-panel details.panel-critique .critique-warning,
            .phase-panel details.panel-critique .critique-positive,
            .phase-panel details.panel-critique .critique-info {
                padding: 0.7rem 0.85rem !important;
                margin: 0.6rem 0 !important;
            }
            .phase-panel details.panel-critique code {
                font-size: 0.74rem !important;
                padding: 0.25rem 0.5rem !important;
            }
            .program-table th,
            .program-table td {
                padding: 10px 12px;
                font-size: 0.82rem;
                line-height: 1.55;
                vertical-align: middle;
                white-space: nowrap;
            }
            .program-table thead th { font-size: 0.78rem; }
            .exercise-toggle {
                gap: 8px;
                white-space: nowrap;
            }
            .caret {
                width: 24px;
                height: 24px;
            }
            .program-table tbody tr.exercise-detail-row td {
                padding: 0;
                white-space: normal;
                vertical-align: top;
            }
            .phase-panel .day-card,
            .phase-panel .table-wrap {
                overflow: visible;
            }
            .phase-panel .program-table {
                width: 100%;
                min-width: 0;
                table-layout: fixed;
            }
            .phase-panel .program-table th:first-child,
            .phase-panel .program-table td:first-child {
                width: 66%;
            }
            .phase-panel .program-table th:nth-child(2),
            .phase-panel .program-table td:nth-child(2) {
                width: 34%;
            }
            .phase-panel .program-table th,
            .phase-panel .program-table td {
                padding: 9px 10px;
                font-size: 0.78rem;
                line-height: 1.45;
                white-space: normal;
            }
            .phase-panel .exercise-toggle {
                white-space: normal;
                line-height: 1.45;
            }
            .phase-panel .program-table tbody tr.exercise-summary-row.is-open {
                position: sticky;
                top: 62px;
                z-index: 18;
            }
            .phase-panel .program-table tbody tr.exercise-summary-row.is-open td {
                position: sticky;
                top: 62px;
                z-index: 18;
                background: #f8fbff;
                box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
            }
            .exercise-detail,
            .exercise-detail.full-detail {
                padding: 10px 11px;
                font-size: 0.78rem;
                line-height: 1.62;
            }
            .source-detail {
                font-size: 0.78rem;
                line-height: 1.62;
            }
            .source-title {
                margin-bottom: 6px;
                font-size: 0.86rem;
            }
            .source-detail p { margin-bottom: 8px; }
            .source-detail .instruction-box {
                margin-top: 8px;
                padding: 10px;
                border-radius: 11px;
            }
            .source-detail .instruction-box > strong {
                font-size: 0.88rem !important;
                margin-bottom: 0.55rem !important;
            }
            .source-detail li { margin-bottom: 0.42rem; }
            .source-detail .text-sm { font-size: 0.78rem; }
            .source-detail .text-xs { font-size: 0.68rem; }
            .source-detail .leading-8 { line-height: 1.62; }
            .source-detail .space-y-3 > * + * { margin-top: 0.4rem; }
            .source-detail .tempo-box {
                margin-bottom: 8px;
                padding: 5px 8px;
                border-radius: 10px;
                font-size: 0.72rem;
                white-space: normal;
            }
            .phase3-detail-meta {
                gap: 6px;
                margin-bottom: 8px;
            }
            .phase3-detail-meta span {
                padding: 5px 8px;
                border-radius: 10px;
                font-size: 0.72rem;
            }
            .detail-grid { gap: 8px; }
            .detail-chip {
                padding: 10px 11px;
                border-radius: 12px;
            }
            .profile-hero {
                grid-template-columns: 1fr;
                gap: 12px;
                padding: 18px;
                text-align: center;
                justify-items: center;
            }
            .profile-hero > div { display: flex; flex-direction: column; align-items: center; }
            .profile-hero .profile-avatar {
                width: 92px;
                height: 92px;
                border-radius: 24px;
            }
            .profile-hero h2 { font-size: 1.45rem; }
            .profile-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
            .profile-kpi { padding: 13px; border-radius: 16px; }
            .profile-kpi strong { font-size: 1rem; }
            .clinical-warnings { grid-template-columns: 1fr; }
            .principle-cards { grid-template-columns: 1fr; }
            .chart-card,
            .health-card {
                padding: 16px;
                border-radius: 18px;
            }
            /* موبایل: نوار از این‌ور تا اون‌ور (لبه‌به‌لبه) به‌جای پیلِ وسط‌چین */
            .mobile-app-nav { left: 16px; right: 16px; transform: none; width: auto; }
        }

        /* ===================== DARK MODE ===================== */
        .theme-toggle {
            position: fixed;
            top: 16px;
            left: 16px;
            z-index: 95;
            width: 46px;
            height: 46px;
            padding: 0;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.92);
            color: #1d4ed8;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
            backdrop-filter: blur(10px);
            transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
        }
        .theme-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18); }
        .theme-toggle:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.4); outline-offset: 3px; }
        .theme-toggle svg { width: 22px; height: 22px; }
        .theme-toggle .icon-sun { display: none; }
        .theme-toggle .icon-moon { display: block; }
        .update-link { display: flex; align-items: center; justify-content: center; gap: 7px; width: fit-content; margin: 22px auto 8px; padding: 9px 16px; font-size: 0.82rem; font-weight: 600; color: var(--text-soft); background: transparent; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: color .18s ease, border-color .18s ease; }
        .update-link:hover { color: var(--primary); border-color: var(--primary); }
        .update-link.is-busy { opacity: 0.6; pointer-events: none; }
        .update-link svg { width: 15px; height: 15px; }
        .update-link.is-busy svg { animation: mb-spin 0.8s linear infinite; }
        @keyframes mb-spin { to { transform: rotate(360deg); } }
        @media (max-width: 720px) {
            .theme-toggle { top: 10px; left: 10px; width: 40px; height: 40px; border-radius: 13px; }
            .theme-toggle svg { width: 19px; height: 19px; }
        }

        [data-theme="dark"] {
            --bg-page: #0b1220;
            --bg-card: rgba(22, 31, 48, 0.86);
            --bg-strong: #161f30;
            --bg-soft: #111827;
            --text-main: #e5edf8;
            --text-muted: #a4b1c6;
            --text-soft: #7b8aa3;
            --border: #243049;
            --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.45);
            --shadow-md: 0 24px 50px rgba(0, 0, 0, 0.55);
            --primary: #3b82f6;
            --secondary: #22c55e;
            --danger: #ef4444;

            /* ── Tier / group-box palette (dark) — سبک A: تینت ملایمِ شفاف + کادر نازک ── */
            --tier-red-bg: rgba(150, 60, 60, 0.16);
            --tier-red-border: #e08a8a;
            --tier-red-ink: #f0b8b8;

            --tier-amber-bg: rgba(150, 110, 50, 0.16);
            --tier-amber-border: #e0b56a;
            --tier-amber-ink: #f0d49a;

            --tier-blue-bg: rgba(70, 120, 160, 0.18);
            --tier-blue-border: #7cb6e0;
            --tier-blue-ink: #aed3f0;

            --tier-green-bg: rgba(60, 130, 95, 0.18);
            --tier-green-border: #6fc69a;
            --tier-green-ink: #a8e0c2;
            color-scheme: dark;
        }

        [data-theme="dark"] body {
            background:
                radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 36%),
                radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.16), transparent 30%),
                linear-gradient(180deg, #070b16 0%, var(--bg-page) 100%);
        }

        [data-theme="dark"] .theme-toggle {
            background: rgba(22, 31, 48, 0.92);
            border-color: rgba(59, 130, 246, 0.3);
            color: #fbbf24;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
        }
        [data-theme="dark"] .theme-toggle .icon-sun { display: block; }
        [data-theme="dark"] .theme-toggle .icon-moon { display: none; }

        [data-theme="dark"] .program-title {
            background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
            border-color: rgba(59, 130, 246, 0.28);
        }

        [data-theme="dark"] .profile-avatar {
            border-color: #1e293b;
            background: #1e293b;
            box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
        }

        [data-theme="dark"] .ambient-a { background: rgba(59, 130, 246, 0.3); }
        [data-theme="dark"] .ambient-b { background: rgba(16, 185, 129, 0.24); }

        [data-theme="dark"] .stat-card,
        [data-theme="dark"] .meta-item,
        [data-theme="dark"] .note-box,
        [data-theme="dark"] .mini-card {
            background: rgba(22, 31, 48, 0.86);
            border-color: var(--border);
        }

        [data-theme="dark"] .stat-card-highlight {
            background: linear-gradient(180deg, #18243d, #131c2e);
            border-color: #2c3b58;
        }

        [data-theme="dark"] .section-card {
            background: var(--bg-card);
            border-color: rgba(36, 48, 73, 0.95);
        }

        [data-theme="dark"] .phase-tab,
        [data-theme="dark"] .day-tab {
            background: rgba(22, 31, 48, 0.85);
            border-color: var(--border);
            color: var(--text-main);
        }

        [data-theme="dark"] .phase-tab.is-active {
            background: linear-gradient(135deg, #3b82f6, #1e3a8a);
            color: #ffffff;
            border-color: transparent;
            box-shadow: 0 18px 38px rgba(59, 130, 246, 0.45), inset 0 0 0 1px rgba(147, 197, 253, 0.25);
        }
        [data-theme="dark"] .phase-tab.is-active .phase-tab-kicker,
        [data-theme="dark"] .phase-tab.is-active small {
            color: rgba(255, 255, 255, 0.88);
        }
        [data-theme="dark"] .phase-tab.is-preview.is-active {
            background: linear-gradient(135deg, #fbbf24, #b45309);
            box-shadow: 0 18px 38px rgba(245, 158, 11, 0.4), inset 0 0 0 1px rgba(253, 224, 71, 0.3);
        }

        [data-theme="dark"] .day-tab.is-active {
            border-color: transparent;
            color: #ffffff;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
        }
        [data-theme="dark"] .day-tab.accent-red.is-active { background: linear-gradient(135deg, #f87171, #991b1b); }
        [data-theme="dark"] .day-tab.accent-blue.is-active { background: linear-gradient(135deg, #60a5fa, #1e3a8a); }
        [data-theme="dark"] .day-tab.accent-green.is-active { background: linear-gradient(135deg, #34d399, #065f46); }
        [data-theme="dark"] .day-tab.accent-amber.is-active { background: linear-gradient(135deg, #fbbf24, #92400e); }
        [data-theme="dark"] .day-tab.accent-violet.is-active { background: linear-gradient(135deg, #a78bfa, #5b21b6); }

        [data-theme="dark"] .phase-tab.is-locked {
            background: linear-gradient(180deg, #0f172a, #1e293b);
            border-color: #1e293b;
            color: var(--text-muted);
        }

        [data-theme="dark"] .phase-tab.is-preview {
            background: repeating-linear-gradient(135deg, rgba(30,41,59,0.85), rgba(30,41,59,0.85) 10px, rgba(15,23,42,0.85) 10px, rgba(15,23,42,0.85) 20px);
            border-color: #334155;
            color: var(--text-soft);
        }

        [data-theme="dark"] .phase-tab.is-preview strong { color: var(--text-muted); }

        [data-theme="dark"] .program-table {
            background: var(--bg-strong);
            color: var(--text-main);
        }

        [data-theme="dark"] .program-table th,
        [data-theme="dark"] .program-table td {
            border-bottom-color: #1f2a3f;
        }

        [data-theme="dark"] .program-table thead th {
            background: #131b2c;
            color: var(--text-main);
        }

        [data-theme="dark"] .program-table tbody tr.exercise-summary-row:hover td,
        [data-theme="dark"] .program-table tbody tr.exercise-summary-row.is-open td {
            background: #1a2336;
        }

        [data-theme="dark"] .program-table tbody tr.exercise-detail-row td {
            background: #131b2c;
        }

        [data-theme="dark"] .exercise-toggle { color: var(--text-main); }

        [data-theme="dark"] .table-wrap { border-color: var(--border); }

        [data-theme="dark"] .exercise-detail,
        [data-theme="dark"] .exercise-detail.full-detail {
            background: linear-gradient(180deg, #131b2c, #0f1626);
            color: var(--text-muted);
            border-right-color: #3b82f6;
        }

        [data-theme="dark"] .detail-chip {
            background: #1a2336;
            border-color: #2a3550;
            color: var(--text-muted);
        }
        [data-theme="dark"] .detail-chip strong { color: var(--text-main); }

        [data-theme="dark"] .source-detail .instruction-box {
            background: #1a2336;
            border-color: #2a3550;
        }

        [data-theme="dark"] .source-title { color: var(--text-main); }

        [data-theme="dark"] .source-detail .tempo-box {
            background: #2d2410;
            border-color: #5a4515;
            color: #fbbf24;
        }

        [data-theme="dark"] .source-detail .text-red-600 { color: #fca5a5; }
        [data-theme="dark"] .source-detail .text-blue-600 { color: #93c5fd; }

        [data-theme="dark"] .phase3-detail-meta span {
            background: #182338;
            border-color: #243456;
            color: #93c5fd;
        }

        [data-theme="dark"] .caret { background: #1a2336; color: #60a5fa; }
        [data-theme="dark"] .below-table-accordion {
            background: rgba(22, 31, 48, 0.86);
            border-color: var(--border);
        }
        [data-theme="dark"] .below-table-accordion > summary { color: var(--text-main); }
        [data-theme="dark"] .below-table-accordion > summary::after {
            background: #1a2336;
            color: #60a5fa;
        }

        [data-theme="dark"] .timeline-index { background: #1a2336; }

        [data-theme="dark"] .phase-status-card { background: linear-gradient(180deg, #161f30, #111827); }
        [data-theme="dark"] .phase-status-col { background: #161f30; border-color: var(--border); }
        [data-theme="dark"] .phase-status-col.is-entry { border-right-color: #475569; }
        [data-theme="dark"] .phase-status-col.is-goal {
            background: linear-gradient(180deg, #0e2719, #161f30);
            border-right-color: #22c55e;
        }
        [data-theme="dark"] .phase-status-label { background: #1f2a3f; color: var(--text-muted); }
        [data-theme="dark"] .phase-status-col.is-goal .phase-status-label { background: #14532d; color: #86efac; }
        [data-theme="dark"] .phase-status-stats > div { background: #131b2c; border-color: #243049; }
        [data-theme="dark"] .phase-status-stats strong { color: var(--text-main); }

        [data-theme="dark"] .principle-card,
        [data-theme="dark"] .profile-kpi,
        [data-theme="dark"] .chart-card,
        [data-theme="dark"] .health-card,
        [data-theme="dark"] .progress-row,
        [data-theme="dark"] .phase3-full-content .card,
        [data-theme="dark"] .phase-preview-day {
            background: #161f30;
            border-color: var(--border);
        }
        [data-theme="dark"] .principle-card h4 { color: #60a5fa; }
        [data-theme="dark"] .principle-card-tag { background: #182338; color: #93c5fd; }

        [data-theme="dark"] .progress-row-track { background: #1f2a3f; }
        [data-theme="dark"] .progress-row-fill { background: linear-gradient(90deg, #3b82f6, #22c55e); }

        [data-theme="dark"] .profile-kpi.is-positive {
            background: linear-gradient(180deg, #0e2719, #161f30);
            border-color: #14532d;
        }
        [data-theme="dark"] .profile-kpi.is-positive strong { color: #4ade80; }
        [data-theme="dark"] .profile-kpi-delta { background: #14532d; color: #86efac; }

        [data-theme="dark"] .clinical-warning {
            background: linear-gradient(180deg, #2d1117, #161f30);
            border-color: #5a1a23;
            border-right-color: #ef4444;
        }
        [data-theme="dark"] .clinical-warning h4 { color: #fca5a5; }

        [data-theme="dark"] .cooldown-box {
            background: #131e36;
            color: var(--text-muted);
            border-color: #1e3a8a;
        }

        [data-theme="dark"] .safety-card {
            background: linear-gradient(180deg, rgba(45, 17, 23, 0.55), rgba(22, 31, 48, 0.9));
        }

        [data-theme="dark"] .profile-hero {
            background:
                linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2)),
                rgba(22, 31, 48, 0.9);
        }

        [data-theme="dark"] .exercise-gif {
            background: #1a2336;
            border-color: #243049;
        }

        [data-theme="dark"] details.profile-card > summary:hover {
            background: rgba(36, 48, 73, 0.45);
        }
        [data-theme="dark"] details.profile-card[open] > summary { border-bottom-color: var(--border); }
        [data-theme="dark"] .profile-section-title { color: var(--text-main); }

        [data-theme="dark"] .measurement-form-row input,
        [data-theme="dark"] .measurement-form-row select,
        [data-theme="dark"] .measurement-btn {
            background: #161f30;
            border-color: var(--border);
            color: var(--text-main);
        }
        [data-theme="dark"] .measurement-form-row input::placeholder { color: #5b6a82; }
        [data-theme="dark"] .measurement-btn.is-ghost { background: transparent; color: var(--text-muted); }
        /* دکمه‌ی ریست رنگش را inline می‌دهد (#b91c1c)، که در دارک مود
           قرمزِ تیره روی سرمه‌ایِ تیره می‌شود و عملا خوانده نمی‌شود */
        [data-theme="dark"] .measurement-btn[style*="#b91c1c"] {
            color: #fca5a5 !important;
            border-color: #7f1d1d !important;
        }
        [data-theme="dark"] .measurement-btn.is-primary {
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: #ffffff;
            border-color: transparent;
        }
        [data-theme="dark"] .measurement-feedback.is-success { background: #0e2719; color: #86efac; }
        [data-theme="dark"] .measurement-feedback.is-error { background: #2d1117; color: #fca5a5; }

        [data-theme="dark"] .measurement-item { background: #161f30; border-color: var(--border); }
        [data-theme="dark"] .measurement-item.is-latest {
            background: linear-gradient(180deg, #0e2719, #161f30);
            border-color: #14532d;
        }
        [data-theme="dark"] .measurement-item.is-seed { background: #131b2c; }
        [data-theme="dark"] .measurement-item-info strong { color: var(--text-main); }
        [data-theme="dark"] .measurement-item-tag.is-latest { background: #14532d; color: #86efac; }
        [data-theme="dark"] .measurement-item-tag.is-seed { background: #1e1b4b; color: #c7d2fe; }
        [data-theme="dark"] .measurement-item-delete {
            border-color: #5a1a23;
            color: #fca5a5;
        }
        [data-theme="dark"] .measurement-item-delete:hover { background: #2d1117; }

        [data-theme="dark"] .phase-preview-banner {
            background: linear-gradient(135deg, #3a2d0a, #2a2010);
            border-color: #5a4515;
        }
        [data-theme="dark"] .phase-preview-banner h3 { color: #fbbf24; }
        [data-theme="dark"] .phase-preview-banner p { color: #fde68a; }

        [data-theme="dark"] .phase-focus-item { background: #131b2c; border-color: var(--border); }
        [data-theme="dark"] .phase-focus-item strong { color: var(--text-main); }

        [data-theme="dark"] .pill { background: #2d2410; color: #fbbf24; border-color: #5a4515; }

        [data-theme="dark"] .badge-primary { background: #182338; color: #93c5fd; border-color: #1e3a8a; }
        [data-theme="dark"] .badge-success { background: #0e2719; color: #86efac; border-color: #14532d; }
        [data-theme="dark"] .badge-warning { background: #2d2410; color: #fbbf24; border-color: #5a4515; }
        [data-theme="dark"] .badge-danger  { background: #2d1117; color: #fca5a5; border-color: #5a1a23; }
        [data-theme="dark"] .badge-warm    { background: #2d1d0a; color: #fdba74; border-color: #5a3315; }

        [data-theme="dark"] .mobile-app-nav button.is-active {
            background: color-mix(in srgb, var(--primary) 24%, transparent);
            color: #bfdbfe;
        }

        @media (max-width: 720px) {
            [data-theme="dark"] .phase-switcher,
            [data-theme="dark"] .day-switcher {
                background: rgba(22, 31, 48, 0.94);
                border-color: rgba(36, 48, 73, 0.95);
            }
            [data-theme="dark"] .phase-panel .program-table tbody tr.exercise-summary-row.is-open td {
                background: #1a2336;
            }
        }

        [data-theme="dark"] .phase3-full-content { color: var(--text-muted); }
        [data-theme="dark"] .phase3-full-content .text-muted { color: var(--text-soft); }

        /* Inline-style overrides: light-pastel cards on dark backgrounds */
        [data-theme="dark"] [style*="background: #f8fafc"],
        [data-theme="dark"] [style*="background:#f8fafc"] {
            background: #131b2c !important;
            color: var(--text-muted) !important;
            border-color: #243049 !important;
        }
        [data-theme="dark"] [style*="background: #fef2f2"],
        [data-theme="dark"] [style*="background:#fef2f2"] {
            background: #2d1117 !important;
            border-color: #5a1a23 !important;
        }

        /* Progress chart SVG — theme-aware via CSS classes */
        .progress-chart .chart-bg { fill: #f8fafc; }
        .progress-chart .chart-grid { stroke: #e2e8f0; }
        .progress-chart .chart-axis { stroke: #cbd5e1; }
        .progress-chart .chart-label { fill: #64748b; }
        .progress-chart text { font-family: "Vazir", Tahoma, Arial, sans-serif; }
        [data-theme="dark"] .progress-chart .chart-bg { fill: #131b2c; }
        [data-theme="dark"] .progress-chart .chart-grid { stroke: #243049; }
        [data-theme="dark"] .progress-chart .chart-axis { stroke: #334155; }
        [data-theme="dark"] .progress-chart .chart-label { fill: #94a3b8; }

        /* ============================================
           Dark mode override برای بخش تغذیه/مکمل/هیدراتاسیون فاز ۳
           inline styles را با !important پوشش می‌دهد
           ============================================ */
        [data-theme="dark"] #phase3-day-nutrition .card,
        [data-theme="dark"] #phase3-day-nutrition .card > div {
            background: rgba(20, 28, 48, 0.6) !important;
            color: #e2e8f0 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition table {
            background: rgba(15, 23, 42, 0.7) !important;
            color: #e2e8f0 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition td,
        [data-theme="dark"] #phase3-day-nutrition th {
            color: #e2e8f0 !important;
            border-color: rgba(148, 163, 184, 0.2) !important;
        }
        [data-theme="dark"] #phase3-day-nutrition td strong,
        [data-theme="dark"] #phase3-day-nutrition td b,
        [data-theme="dark"] #phase3-day-nutrition p strong,
        [data-theme="dark"] #phase3-day-nutrition li strong {
            color: #f1f5f9 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition thead tr {
            background: rgba(8, 47, 73, 0.6) !important;
        }
        [data-theme="dark"] #phase3-day-nutrition thead th {
            color: #67e8f9 !important;
        }
        /* Tier boxes — رنگ‌بندی تیره ولی هنوز معنادار
           selector کلی [style*=...] تا div و details و سایر تگ‌ها را پوشش دهد */
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #fef2f2"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#fef2f2"] {
            background: rgba(127, 29, 29, 0.25) !important;
            border-color: #ef4444 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #fffbeb"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#fffbeb"] {
            background: rgba(120, 53, 15, 0.25) !important;
            border-color: #f59e0b !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #fef3c7"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#fef3c7"] {
            background: rgba(120, 53, 15, 0.3) !important;
            border-color: #d97706 !important;
            color: #fde68a !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #f0f9ff"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#f0f9ff"] {
            background: rgba(7, 89, 133, 0.25) !important;
            border-color: #0284c7 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #ecfeff"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#ecfeff"] {
            background: rgba(8, 51, 68, 0.4) !important;
            border-color: #0e7490 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #ecfdf5"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#ecfdf5"] {
            background: rgba(6, 78, 59, 0.3) !important;
            border-color: #10b981 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #fefce8"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#fefce8"] {
            background: rgba(113, 63, 18, 0.3) !important;
            border-color: #ca8a04 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #eff6ff"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#eff6ff"] {
            background: rgba(30, 58, 138, 0.3) !important;
            border-color: #2563eb !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #f0fdf4"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#f0fdf4"] {
            background: rgba(20, 83, 45, 0.3) !important;
            border-color: #16a34a !important;
        }
        /* جدول‌های سفید داخل Tier ها (background: white) */
        [data-theme="dark"] #phase3-day-nutrition [style*="background: white"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:white"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #fff"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#fff"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #ffffff"] {
            background: rgba(15, 23, 42, 0.85) !important;
            color: #e2e8f0 !important;
        }
        /* Box "شروع همین حالا" با background: #dcfce7 */
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #dcfce7"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#dcfce7"] {
            background: rgba(6, 78, 59, 0.5) !important;
            border-color: #10b981 !important;
            color: #86efac !important;
        }
        /* thead ردیف سبز جدول ترتیب شروع با background: #d1fae5 */
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #d1fae5"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#d1fae5"] {
            background: rgba(6, 78, 59, 0.6) !important;
            color: #86efac !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #d1fae5"] th,
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#d1fae5"] th {
            color: #86efac !important;
        }
        /* ردیف‌های جدول هیدراتاسیون thead با #cffafe (سبز فیروزه‌ای) */
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #cffafe"],
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#cffafe"] {
            background: rgba(8, 51, 68, 0.6) !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="background: #cffafe"] th,
        [data-theme="dark"] #phase3-day-nutrition [style*="background:#cffafe"] th {
            color: #7dd3fc !important;
        }
        /* Gradient warning box اول supplements */
        [data-theme="dark"] #phase3-day-nutrition [style*="linear-gradient(135deg, #fef3c7"] {
            background: linear-gradient(135deg, rgba(120, 53, 15, 0.4), rgba(146, 64, 14, 0.3)) !important;
            border-color: #d97706 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition [style*="linear-gradient(135deg, #fef3c7"] p,
        [data-theme="dark"] #phase3-day-nutrition [style*="linear-gradient(135deg, #fef3c7"] strong {
            color: #fde68a !important;
        }
        /* tier-block summary‌ها: سبک A بدون نوار — تینتِ کارت یکدست دیده شود */
        [data-theme="dark"] #phase3-day-nutrition details.tier-block > summary {
            background: transparent !important;
        }
        [data-theme="dark"] #phase3-day-nutrition details.tier-block > summary:hover {
            background: color-mix(in srgb, var(--t-border) 16%, transparent) !important;
        }
        /* درون ردیف‌های tbody داخل جدول‌های Tier (background:white) */
        [data-theme="dark"] #phase3-day-nutrition details.tier-block table tbody tr {
            background: transparent !important;
        }
        [data-theme="dark"] #phase3-day-nutrition details.tier-block table tbody tr:hover {
            background: rgba(148, 163, 184, 0.08) !important;
        }
        /* رنگ #166534 برای strong در Tier 2 کراتین */
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color:#166534"],
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #166534"] {
            color: #86efac !important;
        }
        [data-theme="dark"] #phase3-day-nutrition div[style*="background: #f8fafc"],
        [data-theme="dark"] #phase3-day-nutrition span[style*="background: #f8fafc"] {
            background: rgba(30, 41, 59, 0.6) !important;
            border-color: rgba(148, 163, 184, 0.2) !important;
            color: #cbd5e1 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition tr[style*="background: #d1fae5"],
        [data-theme="dark"] #phase3-day-nutrition tr[style*="background: #cffafe"],
        [data-theme="dark"] #phase3-day-nutrition tr[style*="background: #ecfdf5"] {
            background: rgba(15, 76, 73, 0.5) !important;
        }
        [data-theme="dark"] #phase3-day-nutrition tr[style*="background: #fef2f2"] {
            background: rgba(127, 29, 29, 0.3) !important;
        }
        /* رنگ‌های متن داخل کادرها */
        [data-theme="dark"] #phase3-day-nutrition h4[style*="color: #dc2626"] { color: #fca5a5 !important; }
        [data-theme="dark"] #phase3-day-nutrition h4[style*="color: #d97706"] { color: #fcd34d !important; }
        [data-theme="dark"] #phase3-day-nutrition h4[style*="color: #0284c7"] { color: #7dd3fc !important; }
        [data-theme="dark"] #phase3-day-nutrition h4[style*="color: #059669"] { color: #6ee7b7 !important; }
        [data-theme="dark"] #phase3-day-nutrition p[style*="color: #7f1d1d"],
        [data-theme="dark"] #phase3-day-nutrition p[style*="color: #78350f"],
        [data-theme="dark"] #phase3-day-nutrition p[style*="color: #075985"],
        [data-theme="dark"] #phase3-day-nutrition p[style*="color: #064e3b"],
        [data-theme="dark"] #phase3-day-nutrition ul[style*="color: #7f1d1d"],
        [data-theme="dark"] #phase3-day-nutrition ul[style*="color: #713f12"],
        [data-theme="dark"] #phase3-day-nutrition ul[style*="color: #155e75"] {
            color: #e2e8f0 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition td[style*="color: #155e75"],
        [data-theme="dark"] #phase3-day-nutrition td[style*="color: #065f46"],
        [data-theme="dark"] #phase3-day-nutrition td[style*="color: #064e3b"] {
            color: #93c5fd !important;
        }
        [data-theme="dark"] #phase3-day-nutrition td[style*="color: #dc2626"] {
            color: #fca5a5 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #166534"],
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #065f46"],
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #064e3b"] {
            color: #86efac !important;
        }
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #b45309"],
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #854d0e"],
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #78350f"] {
            color: #fcd34d !important;
        }
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #0c4a6e"] {
            color: #7dd3fc !important;
        }
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color:#dc2626"],
        [data-theme="dark"] #phase3-day-nutrition strong[style*="color: #dc2626"] {
            color: #fca5a5 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition span[style*="color: var(--text-muted)"] {
            color: #cbd5e1 !important;
        }
        [data-theme="dark"] #phase3-day-nutrition span[style*="color: #2563eb"] {
            color: #93c5fd !important;
        }
        [data-theme="dark"] #phase3-day-nutrition span[style*="color: #16a34a"] {
            color: #86efac !important;
        }
        [data-theme="dark"] #phase3-day-nutrition span[style*="color: #dc2626"] {
            color: #fca5a5 !important;
        }
        /* جدول هیدراتاسیون - ردیف‌های متناوب */
        [data-theme="dark"] #phase3-day-nutrition tr[style*="border-bottom: 1px solid #e0f2fe"] {
            border-color: rgba(148, 163, 184, 0.15) !important;
        }
        [data-theme="dark"] #phase3-day-nutrition tr[style*="border-bottom: 1px solid #d1fae5"] {
            border-color: rgba(148, 163, 184, 0.15) !important;
        }

        /* ============================================
           استایل details/summary collapsible برای پنل تغذیه
           ============================================ */
        /* استفاده از flexbox order برای نشان دادن مکمل اول، بدون جابجایی فیزیکی */
        #phase3-day-nutrition .phase3-full-content {
            display: flex;
            flex-direction: column;
        }
        #phase3-day-nutrition details.nutrition-section.section-supplements { order: 1; }
        #phase3-day-nutrition details.nutrition-section.section-hydration { order: 2; }
        #phase3-day-nutrition details.nutrition-section.section-fasting { order: 3; }

        #phase3-day-nutrition details.nutrition-section {
            margin-top: 1.5rem;
            border-radius: 0.8rem;
            overflow: hidden;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(255, 255, 255, 0.6);
        }
        [data-theme="dark"] #phase3-day-nutrition details.nutrition-section {
            background: rgba(20, 28, 48, 0.5) !important;
            border-color: rgba(148, 163, 184, 0.2);
        }
        #phase3-day-nutrition details.nutrition-section > summary {
            list-style: none;
            cursor: pointer;
            padding: 1.2rem 1.5rem;
            font-size: 1.3rem;
            font-weight: 900;
            display: flex;
            justify-content: space-between;
            align-items: center;
            user-select: none;
            transition: background 0.2s;
        }
        #phase3-day-nutrition details.nutrition-section > summary::-webkit-details-marker { display: none; }
        #phase3-day-nutrition details.nutrition-section > summary::after {
            content: '▼';
            font-size: 0.9rem;
            transition: transform 0.2s;
            opacity: 0.7;
        }
        #phase3-day-nutrition details.nutrition-section[open] > summary::after {
            transform: rotate(180deg);
        }
        #phase3-day-nutrition details.nutrition-section > summary:hover {
            background: rgba(148, 163, 184, 0.1);
        }
        #phase3-day-nutrition details.nutrition-section > .nutrition-section-body {
            padding: 0 1.5rem 1.5rem 1.5rem;
        }
        /* Summary رنگ‌بندی بر اساس کلاس */
        #phase3-day-nutrition details.nutrition-section.section-supplements > summary {
            color: var(--secondary);
            background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), transparent);
        }
        #phase3-day-nutrition details.nutrition-section.section-hydration > summary {
            color: #0284c7;
            background: linear-gradient(90deg, rgba(2, 132, 199, 0.08), transparent);
        }
        #phase3-day-nutrition details.nutrition-section.section-fasting > summary {
            color: var(--primary);
            background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent);
        }
        [data-theme="dark"] #phase3-day-nutrition details.nutrition-section.section-supplements > summary { color: #c4b5fd; }
        [data-theme="dark"] #phase3-day-nutrition details.nutrition-section.section-hydration > summary { color: #7dd3fc; }
        [data-theme="dark"] #phase3-day-nutrition details.nutrition-section.section-fasting > summary { color: #93c5fd; }

        /* Tier ها هم details داخل supplements — سبک A: تینت ملایم + کادر نازک */
        #phase3-day-nutrition details.tier-block {
            /* مقادیر پیش‌فرض؛ کلاس‌های tier-* پایین آن‌ها را override می‌کنند */
            --t-bg: var(--bg-soft);
            --t-border: var(--border);
            --t-ink: var(--text-main);
            margin-bottom: 1.5rem;
            border-radius: 0.9rem;
            overflow: hidden;
            background: var(--t-bg);
            border: 1px solid color-mix(in srgb, var(--t-border) 24%, transparent);
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
        }
        #phase3-day-nutrition details.tier-block.tier-red    { --t-bg: var(--tier-red-bg);   --t-border: var(--tier-red-border);   --t-ink: var(--tier-red-ink); }
        #phase3-day-nutrition details.tier-block.tier-amber  { --t-bg: var(--tier-amber-bg); --t-border: var(--tier-amber-border); --t-ink: var(--tier-amber-ink); }
        #phase3-day-nutrition details.tier-block.tier-blue   { --t-bg: var(--tier-blue-bg);  --t-border: var(--tier-blue-border);  --t-ink: var(--tier-blue-ink); }
        #phase3-day-nutrition details.tier-block.tier-green  { --t-bg: var(--tier-green-bg); --t-border: var(--tier-green-border); --t-ink: var(--tier-green-ink); }
        #phase3-day-nutrition details.tier-block.tier-danger { --t-bg: var(--tier-red-bg);   --t-border: var(--tier-red-border);   --t-ink: var(--tier-red-ink); border-style: dashed; }
        [data-theme="dark"] #phase3-day-nutrition details.tier-block { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32); }
        #phase3-day-nutrition details.tier-block > summary {
            list-style: none;
            cursor: pointer;
            padding: 1rem 1.2rem;
            font-size: 1.15rem;
            font-weight: 900;
            display: flex;
            justify-content: space-between;
            align-items: center;
            user-select: none;
            color: var(--t-ink);
            background: transparent;
            transition: background 0.2s;
        }
        #phase3-day-nutrition details.tier-block > summary:hover { background: color-mix(in srgb, var(--t-border) 12%, transparent); }
        #phase3-day-nutrition details.tier-block > summary::-webkit-details-marker { display: none; }
        #phase3-day-nutrition details.tier-block > summary::after {
            content: '▼';
            font-size: 0.85rem;
            transition: transform 0.2s;
            opacity: 0.7;
        }
        #phase3-day-nutrition details.tier-block[open] > summary::after {
            transform: rotate(180deg);
        }
        #phase3-day-nutrition details.tier-block > .tier-block-body {
            padding: 1.1rem 1.2rem 1.2rem 1.2rem;
        }
        /* بردرهای نازک‌تر در بخش تغذیه/مکمل — تکیه بر تینتِ پس‌زمینه به‌جای خطوطِ کلفت */
        #phase3-day-nutrition .card[style*="border-top"] { border-top-width: 2px !important; }
        #phase3-day-nutrition [style*="border: 2px solid"] { border-width: 1px !important; }
        #phase3-day-nutrition [style*="border-bottom: 2px solid"] { border-bottom-width: 1px !important; }
        /* آیکن‌های SVG جایگزینِ اموجی در بخش تغذیه/مکمل */
        #phase3-day-nutrition .nut-ic {
            width: 1.05em; height: 1.05em; display: inline-block;
            vertical-align: -0.16em; margin-inline-end: 0.38em; flex-shrink: 0;
        }
        /* تا آیکنِ ابتدای تیتر، کنارِ متن بماند (نه آن‌سرِ ردیفِ فلکس) و فلش به انتها برود */
        #phase3-day-nutrition details.nutrition-section > summary,
        #phase3-day-nutrition details.tier-block > summary { justify-content: flex-start; gap: 0; }
        #phase3-day-nutrition details.nutrition-section > summary::after,
        #phase3-day-nutrition details.tier-block > summary::after { margin-inline-start: auto; }

        /* ============================================
           Dark mode برای inline boxes داخل حرکات (روز ۱-۴ فاز ۳)
           پروتکل شروع تدریجی، هشدارها، فلسفه پنل، و غیره
           ============================================ */
        [data-theme="dark"] .phase-panel div[style*="background:#fffbeb"],
        [data-theme="dark"] .phase-panel div[style*="background: #fffbeb"] {
            background: rgba(120, 53, 15, 0.3) !important;
            border-color: #f59e0b !important;
        }
        [data-theme="dark"] .phase-panel div[style*="background:#fffbeb"] strong,
        [data-theme="dark"] .phase-panel div[style*="background: #fffbeb"] strong {
            color: #fcd34d !important;
        }
        [data-theme="dark"] .phase-panel div[style*="background:#fef2f2"],
        [data-theme="dark"] .phase-panel div[style*="background: #fef2f2"] {
            background: rgba(127, 29, 29, 0.25) !important;
            border-color: #ef4444 !important;
            color: #fecaca !important;
        }
        [data-theme="dark"] .phase-panel div[style*="background:#fef2f2"] strong,
        [data-theme="dark"] .phase-panel div[style*="background: #fef2f2"] strong {
            color: #fca5a5 !important;
        }
        [data-theme="dark"] .phase-panel div[style*="background:#ecfdf5"],
        [data-theme="dark"] .phase-panel div[style*="background: #ecfdf5"],
        [data-theme="dark"] .phase-panel div[style*="background:#dcfce7"],
        [data-theme="dark"] .phase-panel div[style*="background: #dcfce7"] {
            background: rgba(6, 78, 59, 0.3) !important;
            border-color: #10b981 !important;
        }
        [data-theme="dark"] .phase-panel div[style*="background:#ecfdf5"] strong,
        [data-theme="dark"] .phase-panel div[style*="background: #ecfdf5"] strong,
        [data-theme="dark"] .phase-panel div[style*="background:#dcfce7"] strong,
        [data-theme="dark"] .phase-panel div[style*="background: #dcfce7"] strong {
            color: #86efac !important;
        }
        /* رنگ متن‌های warning زرد در دارک مود */
        [data-theme="dark"] .phase-panel strong[style*="color:#b45309"],
        [data-theme="dark"] .phase-panel strong[style*="color: #b45309"] {
            color: #fcd34d !important;
        }
        [data-theme="dark"] .phase-panel strong[style*="color:#166534"],
        [data-theme="dark"] .phase-panel strong[style*="color: #166534"] {
            color: #86efac !important;
        }
        /* Phase 4-6 preview banners - dark mode */
        [data-theme="dark"] .phase-preview-banner {
            background: rgba(30, 41, 59, 0.6) !important;
            color: #e2e8f0;
            border-color: rgba(148, 163, 184, 0.2);
        }
        [data-theme="dark"] .phase-preview-day {
            background: rgba(20, 28, 48, 0.6) !important;
            border-color: rgba(148, 163, 184, 0.2);
        }
        [data-theme="dark"] .phase-preview-day-tag {
            background: rgba(30, 58, 138, 0.5) !important;
            color: #93c5fd !important;
        }

        /* ============================================
           استایل details پنل اصلاحی برای فاز ۴، ۵، ۶
           ============================================ */
        .phase-panel details.panel-critique {
            margin-top: 1.5rem;
            border-radius: 0.8rem;
            overflow: hidden;
            border: 2px solid #d97706;
            background: linear-gradient(135deg, rgba(254, 243, 199, 0.6) 0%, rgba(253, 230, 138, 0.4) 100%);
        }
        [data-theme="dark"] .phase-panel details.panel-critique {
            background: linear-gradient(135deg, rgba(120, 53, 15, 0.3) 0%, rgba(146, 64, 14, 0.2) 100%);
            border-color: #d97706;
        }
        .phase-panel details.panel-critique > summary {
            list-style: none;
            cursor: pointer;
            padding: 1.2rem 1.5rem;
            font-size: 1.25rem;
            font-weight: 900;
            color: #92400e;
            display: flex;
            justify-content: space-between;
            align-items: center;
            user-select: none;
        }
        [data-theme="dark"] .phase-panel details.panel-critique > summary {
            color: #fcd34d !important;
        }
        .phase-panel details.panel-critique > summary::-webkit-details-marker { display: none; }
        .phase-panel details.panel-critique > summary::after {
            content: '▼';
            font-size: 0.9rem;
            transition: transform 0.2s;
            opacity: 0.7;
        }
        .phase-panel details.panel-critique[open] > summary::after {
            transform: rotate(180deg);
        }
        .phase-panel details.panel-critique > .panel-critique-body {
            padding: 0 1.5rem 1.5rem 1.5rem;
            line-height: 1.9;
            color: var(--text-main);
        }
        [data-theme="dark"] .phase-panel details.panel-critique > .panel-critique-body {
            color: #e2e8f0 !important;
        }
        .phase-panel details.panel-critique > .panel-critique-body strong {
            color: #92400e;
        }
        [data-theme="dark"] .phase-panel details.panel-critique > .panel-critique-body strong {
            color: #fcd34d !important;
        }
        .phase-panel details.panel-critique .critique-warning {
            background: #fef2f2;
            border: 2px solid #ef4444;
            border-radius: 0.6rem;
            padding: 1rem;
            margin: 0.8rem 0;
            color: #7f1d1d;
        }
        [data-theme="dark"] .phase-panel details.panel-critique .critique-warning {
            background: rgba(127, 29, 29, 0.3) !important;
            color: #fecaca !important;
        }
        [data-theme="dark"] .phase-panel details.panel-critique .critique-warning strong {
            color: #fca5a5 !important;
        }
        .phase-panel details.panel-critique .critique-positive {
            background: #ecfdf5;
            border: 2px solid #10b981;
            border-radius: 0.6rem;
            padding: 1rem;
            margin: 0.8rem 0;
            color: #064e3b;
        }
        [data-theme="dark"] .phase-panel details.panel-critique .critique-positive {
            background: rgba(6, 78, 59, 0.3) !important;
            color: #d1fae5 !important;
        }
        [data-theme="dark"] .phase-panel details.panel-critique .critique-positive strong {
            color: #86efac !important;
        }
        .phase-panel details.panel-critique .critique-info {
            background: #eff6ff;
            border: 2px solid #2563eb;
            border-radius: 0.6rem;
            padding: 1rem;
            margin: 0.8rem 0;
            color: #1e3a8a;
        }
        [data-theme="dark"] .phase-panel details.panel-critique .critique-info {
            background: rgba(30, 58, 138, 0.3) !important;
            color: #bfdbfe !important;
        }
        [data-theme="dark"] .phase-panel details.panel-critique .critique-info strong {
            color: #93c5fd !important;
        }
        .phase-panel details.panel-critique table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 0.5rem;
            overflow: hidden;
        }
        [data-theme="dark"] .phase-panel details.panel-critique table {
            background: rgba(20, 28, 48, 0.5) !important;
        }
        .phase-panel details.panel-critique th,
        .phase-panel details.panel-critique td {
            padding: 0.7rem 0.9rem;
            text-align: right;
            border-bottom: 1px solid rgba(217, 119, 6, 0.2);
        }
        [data-theme="dark"] .phase-panel details.panel-critique th,
        [data-theme="dark"] .phase-panel details.panel-critique td {
            color: #e2e8f0 !important;
            border-color: rgba(148, 163, 184, 0.15) !important;
        }
        .phase-panel details.panel-critique th {
            background: rgba(217, 119, 6, 0.15);
            font-weight: 900;
            color: #92400e;
        }
        [data-theme="dark"] .phase-panel details.panel-critique th {
            background: rgba(120, 53, 15, 0.4) !important;
            color: #fcd34d !important;
        }
        .phase-panel details.panel-critique ul,
        .phase-panel details.panel-critique ol {
            padding-right: 1.5rem;
            line-height: 1.95;
        }
        .phase-panel details.panel-critique li {
            margin-bottom: 0.5rem;
        }

        /* ============================================================
           ✦ LIQUID GLASS — لایه‌ی متریالِ شیشه‌مایع (سبک iOS ۲۶)
           سازگار با آیفون و PWA: شیشه‌ی مات، لبه‌ی نورانی،
           گوشه‌های کپسولی، رنگ‌پذیری از پس‌زمینه‌ی مش، و safe-area
           ============================================================ */
        :root {
            --radius-sm: 18px;
            --radius-md: 26px;
            --radius-lg: 34px;
            --bg-card: rgba(255, 255, 255, 0.58);
            --glass: blur(22px) saturate(185%);
            --glass-soft: blur(16px) saturate(165%);
            --glass-edge: rgba(255, 255, 255, 0.6);
            --glass-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.05);
            --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
            --tap: transform 0.16s cubic-bezier(0.34, 1.56, 0.4, 1), box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
        }
        [data-theme="dark"] {
            --bg-card: rgba(28, 38, 58, 0.5);
            --glass-edge: rgba(255, 255, 255, 0.12);
            --glass-shadow: 0 16px 42px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.4);
            --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
        }

        /* پس‌زمینه‌ی مشِ ثابت تا شیشه‌ها هنگام اسکرول رنگ را بشکنند */
        body::before {
            content: "";
            position: fixed;
            inset: -12%;
            z-index: 0;
            pointer-events: none;
            background:
                radial-gradient(38% 36% at 12% 6%, rgba(37, 99, 235, 0.20), transparent 70%),
                radial-gradient(32% 30% at 90% 4%, rgba(139, 92, 246, 0.17), transparent 70%),
                radial-gradient(42% 40% at 84% 90%, rgba(16, 185, 129, 0.16), transparent 70%),
                radial-gradient(34% 34% at 6% 94%, rgba(244, 114, 182, 0.14), transparent 70%);
            filter: blur(8px);
        }
        [data-theme="dark"] body::before {
            background:
                radial-gradient(38% 36% at 12% 6%, rgba(59, 130, 246, 0.30), transparent 70%),
                radial-gradient(32% 30% at 90% 4%, rgba(139, 92, 246, 0.26), transparent 70%),
                radial-gradient(42% 40% at 84% 90%, rgba(16, 185, 129, 0.22), transparent 70%),
                radial-gradient(34% 34% at 6% 94%, rgba(236, 72, 153, 0.18), transparent 70%);
        }

        /* متریالِ شیشه‌ی مشترک (blur + رنگ‌پذیری) */
        .program-title,
        .section-card,
        .stat-card, .meta-item, .note-box, .mini-card, .timeline-card,
        .chart-card, .health-card, .profile-kpi, .profile-hero,
        .phase-tab, .day-tab,
        .below-table-accordion,
        .table-wrap,
        .theme-toggle,
        .mobile-app-nav {
            -webkit-backdrop-filter: var(--glass-soft);
            backdrop-filter: var(--glass-soft);
        }

        /* کارت‌های محتوا: شیشه‌ی نازکِ خوانا */
        .section-card,
        .stat-card, .meta-item, .note-box, .mini-card, .timeline-card,
        .chart-card, .health-card, .profile-kpi {
            background-color: var(--bg-card);
            border: 1px solid var(--glass-edge);
            box-shadow: var(--glass-shadow), var(--glass-inset);
        }
        .section-card { border-radius: var(--radius-md); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
        .meta-item, .note-box, .mini-card { border-radius: 20px; }
        .stat-card { border-radius: 22px; }
        .timeline-card { border-radius: var(--radius-sm); }

        /* هدر: شیشه‌ی برجسته + درخششِ لبه‌ی بالا */
        .program-title {
            border-radius: var(--radius-lg);
            border: 1px solid var(--glass-edge);
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(239, 246, 255, 0.5));
            box-shadow: var(--glass-shadow), var(--glass-inset);
            -webkit-backdrop-filter: var(--glass);
            backdrop-filter: var(--glass);
            overflow: hidden;
        }
        .program-title::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 42%);
            pointer-events: none;
        }
        [data-theme="dark"] .program-title {
            background: linear-gradient(135deg, rgba(34, 45, 68, 0.6), rgba(20, 28, 45, 0.55));
            border-color: var(--glass-edge);
        }
        [data-theme="dark"] .program-title::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 42%); }

        /* تب‌ها: کپسولِ شیشه‌ای + حالت فعالِ شیشه‌ی رنگی */
        .phase-tab, .day-tab {
            background-color: var(--bg-card);
            border: 1px solid var(--glass-edge);
            box-shadow: var(--glass-shadow), var(--glass-inset);
            transition: var(--tap);
        }
        .day-tab { border-radius: 999px; }
        .phase-tab:active, .day-tab:active { transform: scale(0.96); }
        .phase-tab.is-active {
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(29, 78, 216, 0.88));
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 14px 36px rgba(37, 99, 235, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
        }
        .phase-tab.is-preview.is-active {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(217, 119, 6, 0.9));
            box-shadow: 0 14px 36px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
        }
        .day-tab.is-active { box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
        .day-tab.accent-red.is-active { background: linear-gradient(135deg, rgba(239, 68, 68, 0.94), rgba(185, 28, 28, 0.9)); }
        .day-tab.accent-blue.is-active { background: linear-gradient(135deg, rgba(59, 130, 246, 0.94), rgba(29, 78, 216, 0.9)); }
        .day-tab.accent-green.is-active { background: linear-gradient(135deg, rgba(16, 185, 129, 0.94), rgba(4, 120, 87, 0.9)); }
        .day-tab.accent-amber.is-active { background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(217, 119, 6, 0.9)); }
        .day-tab.accent-violet.is-active { background: linear-gradient(135deg, rgba(139, 92, 246, 0.94), rgba(109, 40, 217, 0.9)); }

        /* نشان‌ها و قرص‌ها: کپسولِ شیشه‌ی رنگی */
        .badge {
            border-radius: 999px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
        }
        .badge-primary { background: rgba(37, 99, 235, 0.13); color: #1d4ed8; border: 1px solid rgba(37, 99, 235, 0.28); }
        .badge-success { background: rgba(22, 163, 74, 0.13); color: #15803d; border: 1px solid rgba(22, 163, 74, 0.28); }
        .badge-warning { background: rgba(202, 138, 4, 0.14); color: #b45309; border: 1px solid rgba(202, 138, 4, 0.3); }
        .badge-danger { background: rgba(220, 38, 38, 0.12); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.28); }
        .badge-warm { background: rgba(234, 88, 12, 0.13); color: #c2410c; border: 1px solid rgba(234, 88, 12, 0.28); }
        .pill {
            border-radius: 999px;
            background: rgba(254, 252, 232, 0.7);
            border: 1px solid rgba(253, 230, 138, 0.7);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
        }
        .timeline-index { background: rgba(255, 255, 255, 0.55); border: 1px solid var(--glass-edge); }

        /* جدول‌ها: قاب شیشه‌ای و گوشه‌های گرد، بدنه‌ی خوانا */
        .table-wrap {
            border-radius: var(--radius-sm);
            border: 1px solid var(--glass-edge);
            box-shadow: var(--glass-shadow);
        }
        .program-table thead th { background: rgba(245, 248, 252, 0.75); }

        /* آکاردئون‌ها و جزئیات */
        .below-table-accordion {
            border-radius: 18px;
            border: 1px solid var(--glass-edge);
            background-color: var(--bg-card);
            box-shadow: var(--glass-shadow), var(--glass-inset);
        }
        .below-table-accordion > summary, .exercise-toggle { transition: var(--tap); }
        .source-detail .tempo-box { border-radius: 14px; }
        .detail-chip { border-radius: 14px; }
        .exercise-gif-wrap { border-radius: 18px; overflow: hidden; }

        /* تاگل تم: دایره‌ی شیشه‌ای */
        .theme-toggle {
            background-color: var(--bg-card);
            border: 1px solid var(--glass-edge);
            border-radius: 18px;
            box-shadow: var(--glass-shadow), var(--glass-inset);
            -webkit-backdrop-filter: var(--glass);
            backdrop-filter: var(--glass);
            transition: var(--tap);
        }
        .theme-toggle:active { transform: scale(0.92); }

        /* نوار ناوبریِ پایین: میکرو-اینترکشنِ لمس */
        .mobile-app-nav button:active { transform: scale(0.96); }

        /* سطوحِ پروفایل */
        .profile-kpi { border-radius: 18px; }

        /* لمسِ ردیف حرکت/فعل */
        .phase-tab, .day-tab, .theme-toggle, .mobile-app-nav button { -webkit-tap-highlight-color: transparent; }

        /* دارک‌مود: شیشه‌ای‌کردنِ سطوحی که قبلاً مقدارِ ثابتِ مات داشتند */
        [data-theme="dark"] .stat-card,
        [data-theme="dark"] .meta-item,
        [data-theme="dark"] .note-box,
        [data-theme="dark"] .mini-card,
        [data-theme="dark"] .chart-card,
        [data-theme="dark"] .health-card,
        [data-theme="dark"] .below-table-accordion,
        [data-theme="dark"] .phase-tab,
        [data-theme="dark"] .day-tab {
            background-color: var(--bg-card);
            border-color: var(--glass-edge);
            box-shadow: var(--glass-shadow), var(--glass-inset);
        }
        [data-theme="dark"] .phase-tab.is-active {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(30, 58, 138, 0.85));
            border-color: rgba(147, 197, 253, 0.3);
            box-shadow: 0 14px 36px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
        }
        [data-theme="dark"] .theme-toggle { background-color: var(--bg-card); border-color: var(--glass-edge); }
        [data-theme="dark"] .program-table thead th { background: rgba(22, 31, 48, 0.7); }

        /* اگر مرورگر شیشه را پشتیبانی نکرد، پس‌زمینه را خواناتر کن */
        @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
            :root { --bg-card: rgba(255, 255, 255, 0.94); }
            [data-theme="dark"] { --bg-card: rgba(26, 35, 54, 0.96); }
        }

        /* ---------- safe-area برای آیفون (ناچ و هوم‌ایندیکیتور) ---------- */
        @media (max-width: 720px) {
            .page-shell {
                padding-top: calc(20px + env(safe-area-inset-top));
                padding-bottom: calc(104px + env(safe-area-inset-bottom));
                padding-right: env(safe-area-inset-right);
                padding-left: env(safe-area-inset-left);
                width: min(1240px, calc(100% - 24px));
            }
            .theme-toggle {
                top: calc(10px + env(safe-area-inset-top));
                left: calc(10px + env(safe-area-inset-left));
            }
            .mobile-app-nav {
                bottom: calc(10px + env(safe-area-inset-bottom));
                right: calc(10px + env(safe-area-inset-right));
                left: calc(10px + env(safe-area-inset-left));
            }
            .day-switcher {
                scroll-margin-top: calc(12px + env(safe-area-inset-top));
                background: var(--bg-card);
                border: 1px solid var(--glass-edge);
                border-radius: 18px;
                box-shadow: var(--glass-shadow), var(--glass-inset);
                -webkit-backdrop-filter: var(--glass);
                backdrop-filter: var(--glass);
            }
        }
    


        .a2hs-root { position: fixed; inset: 0; z-index: 2147483000; display: none; }
        .a2hs-root.is-open { display: block; }
        .a2hs-backdrop {
            position: absolute; inset: 0;
            background: rgba(6, 11, 25, 0.45);
            -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
            opacity: 0; transition: opacity 0.3s ease;
        }
        .a2hs-root.is-in .a2hs-backdrop { opacity: 1; }
        .a2hs-sheet {
            position: absolute; left: 50%; bottom: 0;
            width: min(500px, 100%);
            height: calc(100% - 12px); max-height: 100%;
            display: flex; flex-direction: column;
            transform: translate(-50%, 100%);
            transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
            background: var(--bg-strong); color: var(--text-main);
            border-radius: 26px 26px 0 0;
            box-shadow: 0 -20px 60px rgba(8, 15, 35, 0.28);
            padding: 10px 24px calc(18px + env(safe-area-inset-bottom, 0px));
        }
        .a2hs-root.is-in .a2hs-sheet { transform: translate(-50%, 0); }
        .a2hs-grab { width: 44px; height: 5px; border-radius: 999px; background: var(--border); margin: 0 auto 6px; flex: 0 0 auto; }
        .a2hs-close {
            position: absolute; top: 16px; left: 18px; z-index: 2;
            width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
            border: none; border-radius: 50%; background: var(--bg-soft); color: var(--text-soft);
            cursor: pointer; transition: background 0.2s, color 0.2s;
        }
        .a2hs-close:hover { background: var(--border); color: var(--text-main); }

        .a2hs-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }
        .a2hs-hero { text-align: center; padding: 24px 6px 18px; }
        .a2hs-icon { width: 76px; height: 76px; border-radius: 21px; display: block; margin: 0 auto 18px; box-shadow: 0 16px 34px rgba(8, 15, 35, 0.18); }
        .a2hs-title { margin: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.7; }
        .a2hs-title b { color: var(--primary); font-weight: 700; }
        .a2hs-sub { margin: 12px auto 0; max-width: 32ch; font-size: 0.92rem; color: var(--text-soft); line-height: 1.85; }
        .a2hs-divider { height: 1px; background: var(--border); opacity: 0.7; margin: 6px 4px 24px; flex: 0 0 auto; }

        /* مراحل (iOS): شماره راست · متن وسط · آیکن چپ */
        .a2hs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
        .a2hs-steps li { display: flex; align-items: center; gap: 14px; }
        .a2hs-num {
            flex: 0 0 auto; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
            border-radius: 50%; font-weight: 700; font-size: 0.92rem;
            color: var(--primary); background: rgba(37, 99, 235, 0.12);
        }
        [data-theme="dark"] .a2hs-num { background: rgba(59, 130, 246, 0.20); }
        .a2hs-step-txt { flex: 1 1 auto; font-size: 0.96rem; line-height: 1.85; color: var(--text-main); }
        .a2hs-kbd {
            display: inline-block; direction: ltr; font-weight: 700; color: var(--primary);
            background: rgba(37, 99, 235, 0.10); border-radius: 7px; padding: 1px 7px; margin: 0 2px; white-space: nowrap;
        }
        [data-theme="dark"] .a2hs-kbd { background: rgba(59, 130, 246, 0.18); }
        .a2hs-stepic {
            flex: 0 0 auto; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
            border-radius: 13px; color: var(--primary);
            background: rgba(37, 99, 235, 0.10); border: 1px solid rgba(37, 99, 235, 0.18);
        }
        [data-theme="dark"] .a2hs-stepic { background: rgba(59, 130, 246, 0.16); border-color: rgba(59, 130, 246, 0.28); }
        .a2hs-stepic.is-text { font-size: 0.92rem; font-weight: 700; direction: ltr; }

        /* مزایا (Android) */
        .a2hs-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
        .a2hs-perks li { display: flex; align-items: center; gap: 13px; font-size: 0.97rem; color: var(--text-main); }
        .a2hs-perktxt { flex: 1 1 auto; min-width: 0; line-height: 1.7; }
        .a2hs-perkic {
            flex: 0 0 auto; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
            border-radius: 13px; color: var(--secondary); background: rgba(22, 163, 74, 0.12);
        }
        [data-theme="dark"] .a2hs-perkic { background: rgba(34, 197, 94, 0.16); }

        .a2hs-foot { flex: 0 0 auto; padding-top: 18px; }
        .a2hs-cta {
            width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
            border: none; border-radius: 18px; padding: 17px; font-size: 1.05rem; font-weight: 700;
            color: #fff; cursor: pointer;
            background: linear-gradient(135deg, var(--primary), #1d4ed8);
            box-shadow: 0 16px 32px rgba(37, 99, 235, 0.34);
            transition: transform 0.15s, box-shadow 0.2s;
        }
        .a2hs-cta:hover { transform: translateY(-1px); box-shadow: 0 20px 40px rgba(37, 99, 235, 0.42); }
        .a2hs-cta:active { transform: translateY(0); }
        .a2hs-later {
            width: 100%; margin-top: 10px; border: none; background: transparent;
            color: var(--text-soft); font-size: 0.92rem; font-weight: 600; padding: 11px;
            cursor: pointer; border-radius: 14px; transition: background 0.2s, color 0.2s;
        }
        .a2hs-later:hover { background: var(--bg-soft); color: var(--text-muted); }

        .a2hs-root:not(.is-android) .a2hs-android { display: none; }
        .a2hs-root:not(.is-ios) .a2hs-ios { display: none; }
        @media (prefers-reduced-motion: reduce) { .a2hs-sheet, .a2hs-backdrop { transition: none; } }
        @media (min-height: 740px) { .a2hs-hero { padding-top: 44px; } }
    