/* ==========================================================================
   مشوار ندى — design system v2
   Soft pastel "study aesthetic": cream paper, lavender ink, mint success,
   glassy surfaces, springy motion. Mobile first.
   ========================================================================== */

:root {
    --bg: #FDF8F5;
    --surface: #FFFFFF;
    --surface-2: #F7F1EE;
    --glass: rgba(255, 255, 255, .74);
    --ink: #3A3A3A;
    --ink-2: #7C7480;
    --ink-3: #AFA8B2;
    --line: rgba(58, 58, 58, .07);
    --line-2: rgba(58, 58, 58, .13);

    --primary: #9B89B3;
    --primary-2: #BBAED0;
    --primary-ink: #6E5C8A;
    --primary-soft: #F1ECF6;
    --mint: #4FA374;
    --mint-base: #A8D5BA;
    --mint-ink: #24513A;
    --mint-soft: #E4F3EA;
    --peach: #EE8458;
    --peach-soft: #FFEBE1;
    --pink: #D97A6C;
    --pink-soft: #FBEAE6;
    --sky: #4A90DE;
    --sky-soft: #E2EEFC;
    --sun: #D99A10;
    --sun-soft: #FFF3D2;

    --grad: linear-gradient(135deg, #9B89B3 0%, #B09FC8 55%, #E8B3AA 100%);
    --grad-mint: linear-gradient(135deg, #7CC39B, #A8D5BA);

    --shadow-sm: 0 1px 2px rgba(45, 35, 64, .05), 0 2px 10px rgba(45, 35, 64, .05);
    --shadow: 0 1px 3px rgba(45, 35, 64, .05), 0 14px 34px -12px rgba(45, 35, 64, .16);
    --shadow-lg: 0 16px 36px -14px rgba(123, 104, 150, .6);
    --ring: 0 0 0 4px rgba(155, 137, 179, .25);

    --r-xl: 30px;
    --r-lg: 24px;
    --r: 16px;
    --r-sm: 13px;

    --font: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
    --display: "Cairo", system-ui, sans-serif;
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --nav-h: 74px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #14101C; --surface: #1F1A2A; --surface-2: #282236; --glass: rgba(31, 26, 42, .78);
        --ink: #F3EEFB; --ink-2: #B5AACA; --ink-3: #7D7392; --line: rgba(255, 255, 255, .06); --line-2: rgba(255, 255, 255, .12);
        --primary: #B3A2D0; --primary-2: #C9BDDD; --primary-ink: #D5CAE8; --primary-soft: #2E2738; --mint-ink: #CFEFDC;
        --mint-soft: #16382C; --peach-soft: #3B251B; --pink-soft: #3B1E2C; --sky-soft: #172B42; --sun-soft: #372C10;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 14px 34px -12px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #14101C; --surface: #1F1A2A; --surface-2: #282236; --glass: rgba(31, 26, 42, .78);
    --ink: #F3EEFB; --ink-2: #B5AACA; --ink-3: #7D7392; --line: rgba(255, 255, 255, .06); --line-2: rgba(255, 255, 255, .12);
    --primary: #B3A2D0; --primary-2: #C9BDDD; --primary-ink: #D5CAE8; --primary-soft: #2E2738; --mint-ink: #CFEFDC;
    --mint-soft: #16382C; --peach-soft: #3B251B; --pink-soft: #3B1E2C; --sky-soft: #172B42; --sun-soft: #372C10;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 14px 34px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0; min-height: 100vh; min-height: 100dvh;
    font-family: var(--font); font-size: 15.5px; line-height: 1.65; color: var(--ink);
    background: var(--bg);
    padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
    overflow-x: hidden;
}
body.is-wizard, body.no-nav { padding-bottom: 24px; }
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(60vmax 50vmax at 100% -10%, rgba(167, 148, 236, .30), transparent 60%),
        radial-gradient(50vmax 45vmax at -10% 30%, rgba(255, 196, 170, .28), transparent 60%),
        radial-gradient(55vmax 45vmax at 90% 110%, rgba(134, 221, 184, .22), transparent 60%);
}
:root[data-theme="dark"] body::before { opacity: .45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: .45; } }

a { color: var(--primary-ink); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
.icon { width: 22px; height: 22px; flex: none; }

.display { font-family: var(--display); font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.h-hero { font-size: clamp(2.2rem, 9vw, 3rem); font-weight: 800; }
.h-xl { font-size: clamp(1.8rem, 7vw, 2.4rem); }
.h-lg { font-size: clamp(1.45rem, 5.6vw, 1.8rem); }
.h-md { font-family: var(--display); font-size: 1.22rem; font-weight: 700; line-height: 1.35; }
.eyebrow { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.lead { font-size: 1.08rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.page { width: 100%; max-width: 480px; margin: 0 auto; padding: 4px 16px 24px; display: grid; gap: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 2px 0; }
.page-head > div { display: grid; gap: 2px; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    max-width: 480px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.topbar::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(var(--bg) 35%, transparent); opacity: .92;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
    background: var(--grad); color: #fff; font-size: 1rem; box-shadow: var(--shadow-lg);
    transition: transform .5s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.08); }
.topbar-actions { display: flex; gap: 6px; }
.topbar-actions form { margin: 0; }
.icon-btn {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--line); border-radius: 14px; background: var(--glass); color: var(--ink-2);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm);
    transition: transform .25s var(--spring), color .2s;
}
.icon-btn:hover { color: var(--primary); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .icon { width: 20px; height: 20px; }
.i-sun, .i-mute { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .i-sun { display: block; }
    :root:not([data-theme="light"]) .i-moon { display: none; }
}
:root[data-muted] .i-mute { display: block; }
:root[data-muted] .i-volume { display: none; }

/* bottom tab bar */
.bottom-nav {
    position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(calc(100% - 24px), 480px); height: var(--nav-h);
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; padding: 8px;
    background: var(--glass); border: 1px solid var(--line); border-radius: 26px;
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 10px 40px -10px rgba(45, 35, 64, .3);
}
.bottom-nav a {
    position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 4px;
    border-radius: 18px; color: var(--ink-3); font-size: .72rem; font-weight: 500;
    transition: color .2s, background .3s var(--ease);
}
.bottom-nav a .icon { width: 23px; height: 23px; transition: transform .35s var(--spring); }
.bottom-nav a:hover { color: var(--ink-2); }
.bottom-nav a.active { color: var(--primary-ink); background: var(--primary-soft); font-weight: 600; }
.bottom-nav a.active .icon { transform: translateY(-1px) scale(1.08); }

.fab {
    position: fixed; z-index: 41; left: max(18px, calc(50% - 222px));
    bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
    display: grid; place-items: center; width: 58px; height: 58px; border: 0; border-radius: 20px;
    background: var(--grad); color: #fff; box-shadow: var(--shadow-lg);
    transition: transform .3s var(--spring);
}
.fab .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.fab:hover { transform: translateY(-3px) rotate(90deg); }
.fab:active { transform: scale(.92); }

/* ---------- surfaces ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow); padding: 18px;
}
.card-soft { background: var(--surface-2); box-shadow: none; }
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
    background: var(--primary-soft); color: var(--primary-ink); border-radius: 999px;
    font-weight: 600; font-size: .82rem; white-space: nowrap;
}
.pill-mint { background: var(--mint-soft); color: var(--mint); }
.pill-sun { background: var(--sun-soft); color: var(--sun); }

.bar { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i {
    display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad);
    transition: width 1s var(--ease);
}
.bar-mint i { background: var(--grad-mint); }

.ring {
    --p: 0; --size: 64px; --c: var(--primary);
    position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0);
    transition: --p 1s var(--ease);
}
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; font-weight: 700; font-size: .86rem; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 10px 20px; border-radius: 16px; border: 1px solid var(--line-2);
    background: var(--surface); color: var(--ink); font-weight: 600; font-size: .98rem;
    transition: transform .25s var(--spring), box-shadow .25s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { border: 0; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { box-shadow: 0 22px 46px -14px rgba(123, 104, 150, .75); }
.btn-ghost { background: var(--surface-2); border-color: transparent; }
.btn-danger { background: var(--pink-soft); color: var(--pink); border-color: transparent; }
.btn-text { background: none; border: 0; min-height: 40px; padding: 6px 10px; color: var(--ink-2); font-weight: 500; }
.btn-text:hover { color: var(--primary); box-shadow: none; }
.btn-big { min-height: 58px; font-size: 1.08rem; border-radius: 20px; padding-inline: 26px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .88rem; border-radius: 12px; }
.btn .icon { width: 20px; height: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.stack { display: grid; gap: 10px; }

/* ---------- inputs ---------- */
.input {
    width: 100%; min-height: 50px; padding: 12px 15px;
    background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--r-sm);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:hover { border-color: var(--line-2); }
.input:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: var(--ring); }
.input::placeholder { color: var(--ink-3); }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.6; }
input[type="time"].input, input[type="date"].input, .input-num { direction: ltr; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
input[type="time"].input::-webkit-calendar-picker-indicator, input[type="date"].input::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
select.input {
    appearance: none; -webkit-appearance: none; padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23776A8C' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 14px 50%; background-size: 18px;
}
.alert { padding: 12px 15px; border-radius: var(--r-sm); background: var(--pink-soft); color: var(--pink); font-weight: 500; }

/* ---------- question cards (wizard) ---------- */
.fields { display: flex; flex-wrap: wrap; gap: 12px; }
.q-card {
    flex: 1 1 100%; display: grid; gap: 12px; align-content: start;
    padding: 16px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
    animation: rise .5s var(--ease) both;
}
.q-card.half { flex: 1 1 calc(50% - 6px); min-width: 0; }
.q-card[hidden] { display: none; }
.q-card.bare { padding: 0; background: none; border: 0; box-shadow: none; }
.fields > :nth-child(2) { animation-delay: .04s; } .fields > :nth-child(3) { animation-delay: .08s; }
.fields > :nth-child(4) { animation-delay: .12s; } .fields > :nth-child(5) { animation-delay: .16s; }
.fields > :nth-child(n+6) { animation-delay: .2s; }
.q-label { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1.06rem; line-height: 1.35; }
.q-label .q-emoji { font-size: 1.15rem; }
.q-hint { margin-top: -6px; font-size: .84rem; color: var(--ink-2); }
.req { color: var(--pink); }

/* pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 15px;
    background: var(--surface-2); border: 1.5px solid transparent; border-radius: 999px;
    font-weight: 500; font-size: .93rem; cursor: pointer; user-select: none;
    transition: transform .3s var(--spring), background .2s, color .2s, border-color .2s;
}
.chip:hover span { border-color: var(--line-2); }
.chip:active span { transform: scale(.94); }
.chip input:focus-visible + span { box-shadow: var(--ring); }
.chips-sm .chip span { min-height: 36px; padding: 5px 12px; font-size: .85rem; }

/* option rows (list style) — like a settings list */
.opts { display: grid; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
    display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 16px;
    background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 16px;
    font-weight: 500; cursor: pointer; user-select: none;
    transition: background .2s, border-color .2s, transform .3s var(--spring);
}
.opt span::after {
    content: ""; margin-inline-start: auto; flex: none; width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--line-2); background: var(--surface) center / 14px no-repeat;
    transition: background-color .2s, border-color .2s, transform .35s var(--spring);
}
.opt:hover span { border-color: var(--primary-2); }
.opt:active span { transform: scale(.98); }
.opt input:checked + span { background: var(--mint-soft); border-color: var(--mint); color: var(--ink); font-weight: 600; }
.opt input:checked + span::after {
    border-color: var(--mint); transform: scale(1.08);
    background-color: var(--mint);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.opt input:focus-visible + span { box-shadow: var(--ring); }

/* range */
.range-wrap { display: flex; align-items: center; gap: 14px; }
.range-wrap input[type="range"] { flex: 1; min-width: 0; height: 32px; accent-color: var(--primary); }
.range-out {
    min-width: 88px; padding: 8px 12px; text-align: center; border-radius: 14px;
    background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; font-variant-numeric: tabular-nums;
}

/* subject rows */
.subject-rows { display: grid; gap: 10px; }
.subject-row {
    display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r);
    background: color-mix(in srgb, var(--c) 10%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
}
.subject-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.subject-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.faces { display: flex; justify-content: space-between; gap: 4px; }
.face { position: relative; flex: 1; }
.face input { position: absolute; opacity: 0; pointer-events: none; }
.face span {
    display: grid; place-items: center; height: 46px; border-radius: 14px; font-size: 1.45rem;
    background: var(--surface); filter: grayscale(.9); opacity: .55; cursor: pointer;
    transition: transform .35s var(--spring), filter .2s, opacity .2s, box-shadow .2s;
}
.face:hover span { opacity: .85; }
.face input:checked + span { filter: none; opacity: 1; transform: translateY(-3px) scale(1.06); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--c) 80%, transparent); outline: 2px solid var(--c); }

/* ---------- wizard ---------- */
.wizard { width: 100%; max-width: 480px; margin: 0 auto; display: grid; gap: 14px; }
.wz-top { display: grid; gap: 10px; padding: 0 2px; }
.wz-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--ink-2); }
.wz-meta b { color: var(--ink); font-weight: 600; }
.wz-steps { position: relative; }
.wz-steps summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink-2); }
.wz-steps summary::-webkit-details-marker { display: none; }
.wz-steps-menu {
    position: absolute; z-index: 20; top: calc(100% + 8px); inset-inline-end: 0; width: 250px;
    display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r); box-shadow: var(--shadow); animation: rise .25s var(--ease);
}
.wz-steps-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: var(--ink); font-size: .92rem; }
.wz-steps-menu a:hover { background: var(--surface-2); }
.wz-steps-menu a.current { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.wz-steps-menu .tick { margin-inline-start: auto; color: var(--mint); font-weight: 700; }
.bar-wizard { height: 8px; }
.wz-title { display: grid; gap: 6px; padding: 4px 2px 2px; }
.wz-title h1 { font-size: clamp(1.55rem, 6.4vw, 2rem); font-weight: 800; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: -4px; }
.wz-dock {
    position: sticky; bottom: 0; z-index: 20; display: grid; gap: 10px;
    margin: 6px -16px 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--bg) 26%);
}
.coach-tip { display: flex; align-items: flex-end; gap: 6px; }
.coach-tip .mascot { width: 62px; flex: none; }
.bubble {
    position: relative; padding: 9px 14px; margin-bottom: 18px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px;
    box-shadow: var(--shadow-sm); font-size: .9rem; font-weight: 500;
    animation: bubbleIn .6s var(--spring) .2s both;
}

/* repeaters (teachers, weekly commitments) */
.repeater { display: grid; gap: 12px; }
.subject-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; margin-inline: -2px; }
.subject-tabs::-webkit-scrollbar { display: none; }
.subject-tab {
    flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 7px 14px;
    border: 1.5px solid transparent; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm);
    font-weight: 500; transition: transform .3s var(--spring), background .2s;
}
.subject-tab.active { background: var(--c); color: #fff; box-shadow: 0 8px 20px -8px var(--c); }
.subject-tab .count { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: .74rem; font-weight: 700; }
.subject-tab:not(.active) .count { background: var(--c); color: #fff; }
.r-card {
    display: grid; gap: 14px; padding: 16px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--c, var(--primary));
}
.r-card-head { display: flex; gap: 8px; align-items: center; }
.r-card-head .input { flex: 1; font-weight: 600; }
.r-section { display: grid; gap: 8px; }
.r-section-title { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.r-row {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; align-items: end;
    padding: 12px; border-radius: var(--r); background: var(--surface-2);
}
.r-row .x-btn { justify-self: end; align-self: center; }
label.mini { display: grid; gap: 4px; font-size: .76rem; font-weight: 500; color: var(--ink-2); }
label.mini .input { min-height: 44px; padding: 8px 10px; background: var(--surface); }
label.mini.wide { grid-column: 1 / -1; }
.x-btn {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 12px; background: var(--pink-soft); color: var(--pink);
    transition: transform .25s var(--spring);
}
.x-btn:active { transform: scale(.9); }
.x-btn .icon { width: 18px; height: 18px; }
.add-btn {
    justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px;
    border: 1.5px dashed var(--primary-2); border-radius: 13px; background: transparent; color: var(--primary-ink); font-weight: 600;
    transition: background .2s, transform .3s var(--spring);
}
.add-btn:hover { background: var(--primary-soft); }
.add-btn.big { justify-self: stretch; justify-content: center; min-height: 56px; font-size: 1rem; border-radius: var(--r); }
.add-btn .icon { width: 18px; height: 18px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-hint { text-align: center; padding: 18px; color: var(--ink-2); background: var(--surface-2); border-radius: var(--r); }

/* curriculum rows (wizard + map page) */
.topic-card { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.topic-card-head { display: flex; align-items: center; gap: 10px; }
.topic-card-head h3 { font-family: var(--display); font-size: 1.12rem; font-weight: 700; }
.topic-card-head .ring { --size: 46px; margin-inline-start: auto; }
.topic-card-head .ring::before { inset: 5px; }
.topic-card-head .ring > * { font-size: .74rem; }
.subj-badge { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-size: 1.3rem; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
    display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 4px 6px;
    border-radius: 11px; font-size: .82rem; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
    transition: background .25s, color .25s, transform .3s var(--spring);
}
.seg label:active span { transform: scale(.94); }
.seg input:checked + span { color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.seg input[value="todo"]:checked + span { background: var(--surface-2); }
.seg input[value="doing"]:checked + span { background: #FFE7A8; color: #6B4A00; }
.seg input[value="done"]:checked + span { background: var(--mint); color: #fff; }
.provisional { font-size: .8rem; color: var(--ink-2); background: var(--sun-soft); padding: 8px 12px; border-radius: 12px; }

/* ---------- home ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px 0; }
.home-head > div { display: grid; gap: 0; }
.home-head .pill { justify-self: start; margin-bottom: 6px; }
.wave { display: inline-block; animation: wave 2.6s ease-in-out infinite; transform-origin: 70% 75%; }
.coach-card { display: flex; align-items: flex-end; gap: 4px; padding: 14px 14px 0; overflow: hidden; background: linear-gradient(160deg, var(--surface) 30%, var(--primary-soft)); }
.coach-card .mascot { width: 86px; flex: none; margin-bottom: -6px; }
.coach-card .bubble { margin-bottom: 26px; font-size: .95rem; }

.hero-count {
    position: relative; overflow: hidden; color: #fff; border: 0; padding: 20px;
    background: var(--grad); box-shadow: var(--shadow-lg);
}
.hero-count::after {
    content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -90px; left: -60px;
    background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%);
}
.hero-count .eyebrow, .hero-count .muted { color: rgba(255, 255, 255, .86); }
.count-row { display: flex; align-items: baseline; gap: 10px; }
.count-num { font-family: var(--display); font-size: 4rem; font-weight: 800; line-height: 1; }
.count-unit { font-size: 1.1rem; font-weight: 600; }
.hero-count .bar { background: rgba(255, 255, 255, .28); margin: 14px 0 6px; }
.hero-count .bar i { background: #fff; }
.motto { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .25); font-weight: 500; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { display: grid; gap: 4px; align-content: start; padding: 16px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: .84rem; font-weight: 500; }
.stat-emoji { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 1.15rem; }
.stat-num { font-family: var(--display); font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.stat-sub { font-size: .82rem; color: var(--ink-2); }
.stat-streak .stat-emoji { background: var(--peach-soft); }
.stat-streak .stat-num { color: var(--peach); }
.stat-level .stat-emoji { background: var(--sun-soft); }
.stat-level .stat-title { font-weight: 700; font-family: var(--display); font-size: 1.05rem; line-height: 1.4; }
.stat.bump { animation: bump .7s var(--spring); }

.cta-card { display: flex; align-items: center; gap: 14px; color: var(--ink); background: linear-gradient(135deg, var(--sun-soft), var(--pink-soft)); transition: transform .3s var(--spring); }
.cta-card:hover { transform: translateY(-2px); }
.cta-card .ring { --size: 60px; --c: var(--peach); }
.cta-go { margin-inline-start: auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface); color: var(--ink-2); }

.map-mini { display: grid; gap: 12px; color: var(--ink); }
.map-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-mini-bars { display: grid; gap: 9px; }
.mini-bar { display: grid; grid-template-columns: 74px 1fr 38px; align-items: center; gap: 10px; font-size: .84rem; }
.mini-bar .bar { height: 7px; }
.mini-bar .bar i { background: var(--c); }
.mini-bar b { font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }

.now-card { display: grid; gap: 14px; background: linear-gradient(160deg, var(--surface) 40%, var(--mint-soft)); }
.now-row { display: flex; align-items: center; gap: 14px; }
.now-ring { --size: 74px; --c: var(--mint); }
.now-ring > * { font-size: .78rem; line-height: 1.2; text-align: center; }
.now-main { display: grid; gap: 2px; min-width: 0; }
.now-main h2 { font-family: var(--display); font-size: 1.3rem; font-weight: 700; line-height: 1.35; }
.now-next { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); font-size: .9rem; }
.now-next b { font-weight: 600; }
.now-next .muted { margin-inline-start: auto; white-space: nowrap; font-size: .82rem; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; }
.tl { --c: var(--primary-2); display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start; }
.tl-time { padding-top: 15px; font-size: .78rem; font-weight: 600; color: var(--ink-2); text-align: center; font-variant-numeric: tabular-nums; }
.tl-card {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow-sm); cursor: pointer;
    transition: transform .35s var(--spring), background .3s, box-shadow .3s, opacity .3s;
}
.tl-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
[dir="rtl"] .tl-card::before { border-radius: 4px 0 0 4px; }
.tl-card:hover { transform: translateY(-1px); }
.tl-emoji { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; font-size: 1.25rem; background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.tl-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.tl-text strong { font-weight: 600; line-height: 1.45; }
.tl-text small { color: var(--ink-2); font-size: .8rem; }
.tl-goal { margin-top: 3px; font-size: .84rem; color: var(--ink); opacity: .85; }
.tl-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.check-btn, .half-btn {
    display: grid; place-items: center; padding: 0; border: 2px solid var(--line-2); background: var(--surface); color: transparent;
    transition: transform .35s var(--spring), background .25s, border-color .25s, color .25s;
}
.check-btn { width: 40px; height: 40px; border-radius: 50%; }
.check-btn .icon { width: 20px; height: 20px; stroke-width: 3; }
.half-btn { width: 40px; height: 24px; border-radius: 8px; font-size: .72rem; font-weight: 700; color: var(--ink-3); border-width: 1.5px; }
.check-btn:hover { border-color: var(--mint); color: var(--mint); }
.check-btn:active, .half-btn:active { transform: scale(.85); }
.tl.is-done .check-btn { background: var(--mint); border-color: var(--mint); color: #fff; animation: pop .45s var(--spring); }
.tl.is-done .tl-card { background: var(--mint-soft); box-shadow: none; }
.tl.is-done .tl-text strong { text-decoration: line-through; text-decoration-color: var(--mint); text-decoration-thickness: 2px; opacity: .7; }
.tl.is-partial .half-btn { background: #FFE7A8; border-color: #F2C64B; color: #6B4A00; }
.tl.is-partial .tl-card { background: var(--sun-soft); }
.tl.is-now .tl-card { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent), var(--shadow); }
.tl.is-now .tl-time { color: var(--primary-ink); }
.tl.is-now .tl-time::after { content: "الآن"; display: block; margin: 4px auto 0; width: fit-content; padding: 1px 7px; border-radius: 99px; background: var(--primary); color: #fff; font-size: .66rem; }
.tl.is-past:not(.is-done):not(.is-partial) .tl-card { opacity: .6; }
.tl.routine .tl-card { background: transparent; border-style: dashed; box-shadow: none; padding-block: 8px; }
.tl.routine .tl-emoji { width: 34px; height: 34px; font-size: 1.05rem; background: var(--surface-2); }
.tl.routine .tl-card::before { display: none; }
.tl.routine .tl-time { padding-top: 10px; }

.empty-state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 20px; }
.empty-state .mascot { width: 120px; }

/* ---------- schedule ---------- */
.page-head .week-nav { display: flex; align-items: center; gap: 6px; }
.week-nav .icon-btn { width: 36px; height: 36px; }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-pill {
    display: grid; justify-items: center; gap: 2px; padding: 9px 2px 8px; border: 1px solid var(--line);
    border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink-2);
    font-size: .72rem; transition: transform .3s var(--spring), background .2s, color .2s;
}
.day-pill b { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.day-pill .dots { display: flex; gap: 2px; height: 5px; }
.day-pill .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--primary-2); }
.day-pill.is-today { border-color: var(--primary-2); }
.day-pill.active { background: var(--grad); color: rgba(255, 255, 255, .9); border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.day-pill.active b { color: #fff; }
.day-pill.active .dots i { background: #fff; }
.week { display: grid; }
.day-col { display: none; gap: 10px; align-content: start; }
.day-col.active { display: grid; animation: rise .4s var(--ease); }
.day-col-head { display: none; }
.wk-block { --c: var(--primary-2); }
.wk-block .tl-card { cursor: pointer; }
.once-tag { display: inline-block; margin-inline-start: 6px; padding: 0 7px; border-radius: 99px; background: var(--sky-soft); color: var(--sky); font-size: .7rem; font-weight: 600; vertical-align: middle; }
.note-card { display: grid; gap: 6px; background: var(--sun-soft); border-color: transparent; box-shadow: none; }

/* ---------- bottom sheet ---------- */
.sheet {
    width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0;
    border: 0; border-radius: 28px 28px 0 0; background: var(--surface); color: var(--ink);
    box-shadow: 0 -20px 60px -20px rgba(45, 35, 64, .45); overflow: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheetUp .45s var(--ease); }
.sheet::backdrop { background: rgba(26, 18, 40, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .3s; }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 28px; } .sheet[open] { animation: popIn .4s var(--spring); } }
.sheet-body { display: grid; gap: 16px; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-grip { width: 44px; height: 5px; margin: 10px auto 0; border-radius: 99px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); margin-bottom: -6px; }
.kind-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kind-grid .chip span { flex-direction: column; justify-content: center; gap: 0; width: 100%; min-height: 62px; padding: 6px 2px; border-radius: 16px; font-size: .74rem; text-align: center; line-height: 1.3; }
.kind-grid .chip span em { font-style: normal; font-size: 1.35rem; line-height: 1.2; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 15px; background: var(--surface-2); }
.seg2 label { position: relative; }
.seg2 input { position: absolute; opacity: 0; }
.seg2 span { display: grid; place-items: center; min-height: 42px; border-radius: 12px; font-weight: 500; cursor: pointer; transition: background .2s; }
.seg2 input:checked + span { background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; color: var(--primary-ink); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn-primary { flex: 1; }
.sheet-error { display: none; }
.sheet-error.show { display: block; }

/* ---------- map page ---------- */
.map-hero { display: flex; align-items: center; gap: 16px; }
.map-hero .ring { --size: 96px; --c: var(--mint); }
.map-hero .ring::before { inset: 9px; }
.map-hero .ring > * { font-family: var(--display); font-size: 1.4rem; }

/* ---------- admin, auth, celebrate ---------- */
.admin-grid { display: grid; gap: 14px; }
.admin-grid .card { display: grid; gap: 12px; align-content: start; }
@media (min-width: 900px) {
    .page.page-admin { max-width: 980px; }
    .admin-grid { grid-template-columns: 1fr 1fr; }
    .admin-wide { grid-column: 1 / -1; }
}
.invite { display: flex; align-items: center; gap: 12px; }
.invite b { font-family: var(--display); font-size: 1.9rem; letter-spacing: 5px; padding: 2px 16px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-ink); cursor: copy; }
.code-line code { direction: ltr; display: inline-block; padding: 5px 10px; background: var(--surface-2); border-radius: 10px; word-break: break-all; font-size: .85rem; }
.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.error-list { margin: 0; padding: 12px 28px; background: var(--pink-soft); color: var(--pink); border-radius: var(--r-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 9px 6px; text-align: start; border-bottom: 1px solid var(--line); }

.auth { width: 100%; max-width: 420px; margin: 12px auto 0; display: grid; gap: 12px; padding: 22px; }
.auth h1 { text-align: center; }
.auth-mascot { display: grid; place-items: center; }
.auth-mascot .mascot { width: 110px; }
.field-label { font-weight: 600; font-size: .92rem; margin-bottom: -4px; }
.code-input { text-transform: uppercase; letter-spacing: 8px; font-weight: 700; font-size: 1.3rem; text-align: center; direction: ltr; }
.celebrate { max-width: 520px; width: 100%; margin: 20px auto 0; display: grid; gap: 14px; justify-items: center; text-align: center; padding: 30px 22px; }
.celebrate .mascot { width: 150px; animation: jump 1.1s var(--spring) infinite alternate; }

/* ---------- mascot ---------- */
.mascot { display: block; overflow: visible; }
.mascot .m-body { animation: float 3.6s ease-in-out infinite; transform-origin: 60px 120px; transform-box: view-box; }
.mascot .m-eyes { animation: blink 5s infinite; transform-origin: 60px 57px; transform-box: view-box; }
.mascot .m-eyes-happy { display: none; }
.mascot.happy .m-eyes { display: none; }
.mascot.happy .m-eyes-happy { display: block; }
.mascot.sleepy .m-eyes { animation: none; transform: scaleY(.12); }
.mascot.sad .m-mouth { transform: rotate(180deg); transform-origin: 60px 69px; transform-box: view-box; }
.mascot .m-spark { animation: twinkle 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.mascot .m-spark-2 { animation-delay: -1.2s; }

/* ---------- toasts & confetti ---------- */
.toast-stack { position: fixed; z-index: 80; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 400px); pointer-events: none; }
.toast {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 18px;
    background: var(--ink); color: var(--bg); font-weight: 600; text-align: center; box-shadow: var(--shadow);
    animation: toastIn .5s var(--spring), toastOut .4s ease-in 3.6s forwards;
}
.toast-error { background: var(--pink); color: #fff; }
.toast-level { background: var(--grad); color: #fff; font-size: 1.05rem; }
#confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; width: 100%; height: 100%; }

/* ---------- v3: reference look (lessons, map rows, matrix, today) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .22s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .28s var(--ease) both; }
.bottom-nav { view-transition-name: tabbar; }
.topbar { view-transition-name: topbar; }
@keyframes vtOut { to { opacity: 0; transform: translateX(18px); } }
@keyframes vtIn { from { opacity: 0; transform: translateX(-18px); } }

.icon-btn-primary { background: var(--primary); color: #fff; border-color: transparent; }
.icon-btn-primary:hover { color: #fff; }
.icon-btn-sm { width: 34px; height: 34px; border-radius: 11px; }
.icon-btn-sm .icon { width: 18px; height: 18px; }

/* wizard header like the reference */
.wizard { gap: 16px; }
.wz-top { gap: 8px; }
.wz-meta { justify-content: flex-start; }
.wz-steps { flex: 1; min-width: 0; }
.wz-steps summary { font-size: .9rem; color: var(--ink-2); }
.wz-pct { margin-inline-start: auto; font-weight: 700; color: var(--primary-ink); white-space: nowrap; }
.wz-q { font-size: clamp(1.4rem, 6vw, 1.75rem); font-weight: 800; line-height: 1.4; padding: 2px; }
.wz-saved { text-align: center; font-size: .76rem; color: var(--ink-3); margin-top: -4px; transition: color .3s; }
.wz-saved.flash { color: var(--mint); }
.wz-dock {
    margin-inline: -16px; padding-top: 10px; border-radius: 26px 26px 0 0;
    background: color-mix(in srgb, var(--surface) 88%, var(--bg)); box-shadow: 0 -12px 30px -14px rgba(58, 58, 58, .22);
}
.wz-dock .coach-tip { margin-top: -46px; }
.wz-dock .bubble { margin-bottom: 30px; }
.wz-dock .btn-primary { background: var(--primary); }

/* pills: selected = lavender (reference) */
.chip input:checked + span { background: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 8px 18px -10px rgba(123, 104, 150, .9); }
.chip span { border-color: var(--line-2); background: var(--surface); }

/* rows: selected = mint (already .opt) */
.opt span { min-height: 52px; font-weight: 600; }
.opt input:checked + span { background: var(--mint-base); border-color: var(--mint-base); color: var(--mint-ink); }
.opt input:checked + span::after { background-color: transparent; border-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324513A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background-size: 18px; }

/* multi-select cards (obstacles) */
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-card { position: relative; }
.pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card span {
    display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 108px; padding: 14px 10px;
    border: 1.5px solid var(--line-2); border-radius: 18px; background: var(--surface); text-align: center;
    font-weight: 600; font-size: .9rem; line-height: 1.45; cursor: pointer;
    transition: transform .3s var(--spring), background .2s, border-color .2s;
}
.pick-card em { font-style: normal; font-size: 2rem; line-height: 1; transition: transform .4s var(--spring); }
.pick-card:active span { transform: scale(.97); }
.pick-card input:checked + span { background: var(--mint-base); border-color: var(--mint-base); color: var(--mint-ink); }
.pick-card input:checked + span em { transform: scale(1.15) rotate(-8deg); }

/* lessons builder */
.lessons { display: grid; gap: 10px; }
.day-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.day-sec-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; background: none; text-align: start; }
.day-sec-head b { font-size: 1.05rem; font-weight: 700; }
.day-sec-head .count { color: var(--ink-2); font-size: .84rem; }
.day-sec-head .add { margin-inline-start: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-ink); transition: transform .3s var(--spring); }
.day-sec-head .add .icon { width: 20px; height: 20px; }
.day-sec.picking .day-sec-head .add { transform: rotate(45deg); }
.day-sec-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.day-sec-body:empty { display: none; }
.subj-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; border-radius: 16px; background: var(--surface-2); animation: rise .3s var(--ease); }
.subj-pick p { grid-column: 1 / -1; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.subj-pick button { display: grid; justify-items: center; gap: 2px; min-height: 62px; padding: 6px 2px; border: 0; border-radius: 14px; background: var(--surface); font-size: .78rem; font-weight: 600; transition: transform .3s var(--spring); }
.subj-pick button em { font-style: normal; font-size: 1.35rem; }
.subj-pick button:active { transform: scale(.94); }
.lesson-card { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); animation: popIn .35s var(--spring); }
.lesson-card.settled { animation: none; }
.lesson-head { display: flex; align-items: center; gap: 8px; }
.lesson-head b { font-weight: 700; }
.lesson-head .x-btn { margin-inline-start: auto; width: 34px; height: 34px; }
.lesson-row { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-row .chip span { min-height: 38px; padding: 6px 12px; font-size: .86rem; }
.lesson-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lesson-times .input { min-height: 46px; background: var(--surface); }

/* curriculum rows (reference: name pill + status pill) */
.topics { display: grid; gap: 12px; }
.topic-legend { font-size: .8rem; color: var(--ink-2); text-align: center; padding: 0 8px; }
.topic-rows { display: grid; gap: 8px; }
.topic {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 7px 8px;
    border: 0; border-radius: 16px; background: var(--surface-2); text-align: start;
    transition: background .25s, transform .3s var(--spring);
}
.topic:active { transform: scale(.97); }
.topic-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 14px; border: 1.5px solid var(--primary-2); background: var(--primary-soft); font-weight: 600; font-size: .88rem; line-height: 1.4; }
.topic-name small { flex: none; font-size: .68rem; font-weight: 700; color: var(--primary-ink); opacity: .8; }
.topic-status { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); transition: background .25s, color .25s, border-color .25s; }
.topic-status i { font-style: normal; }
.topic.is-doing .topic-status { background: var(--peach-soft); border-color: #F3B796; color: #B35A2F; }
.topic.is-done .topic-status { background: var(--mint-soft); border-color: var(--mint-base); color: var(--mint-ink); }
.topic.is-done { background: color-mix(in srgb, var(--mint-base) 22%, var(--surface)); }
.topic.bump .topic-status { animation: pop .45s var(--spring); }
[data-readonly] .topic { pointer-events: none; }

/* subject matrix */
.mx-card { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); }
.mx-card + .mx-card { margin-top: 12px; }
.mx-head { display: flex; align-items: center; gap: 10px; }
.mx-head h3 { font-size: 1.1rem; font-weight: 700; }
.mx-q { display: grid; gap: 6px; }
.mx-label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.seg { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); }
.seg span { min-height: 42px; font-size: .78rem; text-align: center; white-space: normal; line-height: 1.3; }
.seg input:checked + span { background: var(--primary); color: #fff; }

/* today */
.coach-card { padding: 12px 14px 0; background: linear-gradient(160deg, var(--surface) 35%, var(--primary-soft)); }
.today-card { display: grid; gap: 14px; }
.today-top { display: flex; align-items: center; gap: 14px; }
.ring-day { --size: 70px; --c: var(--mint); }
.ring-day > * { font-size: .9rem; }
.now-box { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--mint-soft); }
.now-dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(79, 163, 116, .5); animation: pulse 2s infinite; }
.now-box .now-main { flex: 1; display: grid; gap: 3px; }
.now-box h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.4; }
.now-box .bar { background: rgba(255, 255, 255, .7); margin-top: 6px; }
.now-next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: .9rem; padding: 0 2px; }
.now-next b { font-weight: 700; }
.tl-edit { color: var(--ink-3); display: grid; }
.tl-edit .icon { width: 18px; height: 18px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(79, 163, 116, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 163, 116, 0); } }

/* coach report */
.report-title { margin: 4px 2px 10px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.report-card { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); border-top: 6px solid var(--line-2); font-size: .86rem; }
.report-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.report-card header .pill { margin-inline-start: auto; }
.report-card .subj-badge { width: 34px; height: 34px; font-size: 1.05rem; }
.risk-ok { border-top-color: #7CC39B; background: color-mix(in srgb, #A8D5BA 18%, var(--surface)); }
.risk-warn { border-top-color: #F2C64B; background: color-mix(in srgb, #FFE7A8 25%, var(--surface)); }
.risk-hot { border-top-color: #F0965E; background: color-mix(in srgb, #FFD2B8 28%, var(--surface)); }
.risk-bad { border-top-color: #D9534F; background: color-mix(in srgb, #F6B3B0 30%, var(--surface)); }
.pill-hot { background: var(--pink-soft); color: var(--pink); }
.report-head .ring { --size: 64px; --c: var(--mint); }

/* ---------- motion ---------- */
.pop-in { animation: popIn .55s var(--spring) both; }
.rise { animation: rise .55s var(--ease) both; }
.rise-2 { animation-delay: .06s; } .rise-3 { animation-delay: .12s; } .rise-4 { animation-delay: .18s; } .rise-5 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.6) translateY(10px); transform-origin: bottom left; } }
@keyframes float { 50% { transform: translateY(-4px) rotate(-1.5deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes twinkle { 50% { transform: scale(.55) rotate(45deg); opacity: .5; } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-9deg); } }
@keyframes bump { 35% { transform: scale(1.05); } 65% { transform: scale(.98); } }
@keyframes pop { 40% { transform: scale(1.22); } }
@keyframes jump { to { transform: translateY(-14px); } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-18px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   v4 — مشواري (road), lock ladder, reviews, coach chat, coach report
   ========================================================================== */
.pill-peach { background: var(--peach-soft); color: #B35A2F; }
.eta { color: var(--mint-ink); font-weight: 600; }
:root[data-theme="dark"] .eta { color: var(--mint-base); }

/* bottom nav: 5 tabs + unread badge */
.bottom-nav a { padding-inline: 2px; }
.nav-badge {
    position: absolute; top: 2px; inset-inline-end: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px;
    display: grid; place-items: center; border-radius: 99px; background: var(--pink); color: #fff;
    font-size: .66rem; font-style: normal; font-weight: 800; box-shadow: 0 0 0 2px var(--surface); animation: pop .5s var(--spring);
}

/* today extras */
.letter-card { display: grid; gap: 8px; background: linear-gradient(160deg, var(--surface) 40%, var(--pink-soft)); }
.letter { font-size: 1rem; line-height: 1.85; }
.focus-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; font-weight: 600; }
.focus-list li::marker { color: var(--primary); font-weight: 800; }
.cta-emoji { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--surface); font-size: 1.8rem; animation: wiggle 3.5s ease-in-out infinite; }
.cta-path { background: linear-gradient(135deg, var(--primary-soft), var(--mint-soft)); }
.tl.is-smart .tl-emoji { box-shadow: 0 0 0 2px var(--primary-2); }
.tl.is-smart .tl-text strong::after { content: " ✨"; }

.reviews-card { display: grid; gap: 10px; background: linear-gradient(160deg, var(--surface) 45%, var(--sun-soft)); }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--ease), opacity .35s;
}
.review.leaving { transform: translateX(-30px); opacity: 0; }
.review-subj { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); font-size: 1.1rem; }
.review-text { flex: 1; min-width: 0; display: grid; }
.review-text b { font-weight: 600; font-size: .9rem; line-height: 1.4; }
.review-text small { color: var(--ink-2); font-size: .74rem; }
.review-later { flex: none; border: 0; background: none; color: var(--ink-3); font-size: .78rem; font-weight: 600; padding: 6px; }
.reviews-done { text-align: center; font-weight: 700; color: var(--mint-ink); padding: 10px; }

.bar-stack { position: relative; }
.bar-stack i { position: absolute; inset-block: 0; inset-inline-start: 0; }
.bar-stack i.studied { background: color-mix(in srgb, var(--c) 35%, transparent); }
.late { color: #B35A2F; font-size: .8rem; }

/* ---------- path hero + subject switch ---------- */
.path-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(150deg, var(--surface) 35%, var(--mint-soft)); }
.ring-hero { --size: 104px; }
.ring-hero::before { inset: 9px; }
.ring-hero > span { display: grid; justify-items: center; line-height: 1.1; }
.ring-hero b { font-size: 1.9rem; font-weight: 900; }
.ring-hero small { font-size: .74rem; color: var(--ink-2); font-weight: 600; }
.path-hero-text { display: grid; gap: 6px; min-width: 0; }
.hero-chips { gap: 6px; }

.path { display: grid; gap: 12px; }
.subj-switch {
    position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 15; display: flex; gap: 8px; overflow-x: auto;
    padding: 8px 2px; margin-inline: -2px; scrollbar-width: none; background: linear-gradient(var(--bg) 70%, transparent);
}
.subj-switch::-webkit-scrollbar { display: none; }
.subj-chip {
    flex: none; position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 7px 14px;
    border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm);
    font-weight: 600; transition: transform .3s var(--spring), background .2s;
}
.subj-chip:active { transform: scale(.95); }
.subj-chip.active { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 10px 22px -10px var(--c); }
.chip-badge { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; font-style: normal; font-size: .72rem; font-weight: 800; background: var(--peach-soft); color: #B35A2F; }
.chip-badge.zero { background: var(--mint-soft); color: var(--mint-ink); }
.subj-chip.active .chip-badge { background: rgba(255, 255, 255, .92); }
.panel-wrap { display: none; }
.panel-wrap.active { display: block; animation: rise .35s var(--ease); }

.path-panel { display: grid; gap: 12px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-top: 5px solid var(--c); }
.panel-head > div { flex: 1; min-width: 0; }
.ring-sm { --size: 48px; }
.ring-sm::before { inset: 5px; }
.panel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.track { display: grid; gap: 8px; }
.track-title { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 800; padding: 8px 2px 0; }
.track-hint { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--sun-soft); font-size: .88rem; border: 1.5px dashed #F2C64B; }
.track-hint.soft { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-2); }
.track-hint .btn { justify-self: start; }

/* ---------- the road ---------- */
.road { list-style: none; margin: 0; padding: 0; display: grid; }
.stop, .road-sign { position: relative; }
.stop::before, .road-sign::before {
    content: ""; position: absolute; inset-inline-start: 25px; top: 0; bottom: 0; width: 6px; border-radius: 3px;
    background: var(--rail, var(--line-2));
}
.road-sign { padding: 14px 0 6px; padding-inline-start: 66px; }
.road-sign span { display: inline-flex; padding: 4px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .76rem; font-weight: 700; line-height: 1.5; }
.stop.stage-2, .stop.stage-3, .stop.stage-4 { --rail: var(--primary-2); }
.stop.stage-5 { --rail: var(--mint-base); }
.stop.is-backlog::before { background: repeating-linear-gradient(to bottom, #F3B796 0 9px, transparent 9px 15px); }
.stop.is-ahead { opacity: .5; }
.stop-btn { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 0; border: 0; background: none; text-align: start; }
.stop-node {
    position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--line-2); box-shadow: var(--shadow-sm); font-size: 1.35rem;
    transition: transform .35s var(--spring), box-shadow .3s;
}
.stop-btn:active .stop-node { transform: scale(.88); }
.stop-btn:hover .stop-node { transform: translateY(-2px); }
.stage-0 .stop-node { filter: grayscale(.6); }
.stage-1 .stop-node { background: var(--sky-soft); border-color: #9CC6F0; }
.stage-2 .stop-node { background: var(--primary-soft); border-color: var(--primary-2); }
.stage-3 .stop-node { background: var(--peach-soft); border-color: #F3B796; }
.stage-4 .stop-node { background: var(--sun-soft); border-color: #F2C64B; }
.stage-5 .stop-node { background: var(--mint-base); border-color: var(--mint); box-shadow: 0 0 0 5px rgba(168, 213, 186, .35), var(--shadow-sm); }
.is-backlog .stop-node { border-color: #F3B796; border-style: dashed; }
.is-me .stop-node { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 32%, transparent), var(--shadow); animation: meGlow 2.2s ease-in-out infinite; }
.is-teacher .stop-node::after { content: "🚩"; position: absolute; top: -12px; inset-inline-end: -8px; font-size: 1.15rem; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15)); animation: wave 3s ease-in-out infinite; }
.stop-card {
    flex: 1; min-width: 0; display: grid; gap: 1px; padding: 9px 12px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.stop-card b { font-weight: 700; font-size: .9rem; line-height: 1.5; }
.stop-card small { color: var(--ink-2); font-size: .74rem; }
.is-backlog .stop-card { background: color-mix(in srgb, var(--peach-soft) 55%, var(--surface)); border-color: #F6CDB4; }
.stage-5 .stop-card { background: color-mix(in srgb, var(--mint-base) 20%, var(--surface)); border-color: var(--mint-base); }
.stop-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.tag-teacher, .tag-me { padding: 2px 9px; border-radius: 99px; font-size: .72rem; font-weight: 800; }
.tag-teacher { background: var(--peach-soft); color: #B35A2F; }
.tag-me { background: var(--primary); color: #fff; }
@keyframes meGlow { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow); } }

/* ---------- lesson sheet ---------- */
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rung {
    display: grid; justify-items: center; gap: 2px; min-height: 66px; padding: 8px 4px; border-radius: 16px;
    border: 1.5px solid var(--line-2); background: var(--surface); font-size: .78rem; font-weight: 700; color: var(--ink-2);
    transition: transform .3s var(--spring), background .2s, border-color .2s;
}
.rung em { font-style: normal; font-size: 1.4rem; line-height: 1.2; }
.rung:active { transform: scale(.94); }
.rung.current { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 10px 22px -10px rgba(123, 104, 150, .9); }
.rung-5 { border-style: dashed; border-color: var(--mint); }
.rung-5.current { background: var(--mint); border-color: var(--mint); }
.lock-panel { display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: var(--mint-soft); animation: rise .3s var(--ease); }
.lock-panel[hidden] { display: none; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.score { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 800; transition: transform .25s var(--spring); }
.score.is-lock { border-color: var(--mint); color: var(--mint-ink); }
.score:active { transform: scale(.92); }
.ls-info { font-size: .84rem; color: var(--ink-2); min-height: 1em; }
.mark-btn.active { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-2); }

/* lock celebration */
.lock-burst { position: fixed; inset: 0; z-index: 88; display: grid; place-content: center; justify-items: center; gap: 8px; pointer-events: none;
    background: radial-gradient(circle at 50% 45%, rgba(168, 213, 186, .55), transparent 55%); animation: fade .25s, fadeOut .4s ease-in 1.5s forwards; }
.lock-burst svg { width: 130px; height: 130px; animation: lockPop .8s var(--spring) both; filter: drop-shadow(0 16px 30px rgba(79, 163, 116, .45)); }
.lock-burst .shackle { animation: shackle .45s .45s var(--spring) both; }
.lock-burst p { padding: 8px 18px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow); font-weight: 800; font-size: 1.05rem; animation: rise .4s .5s var(--ease) both; }
@keyframes lockPop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
@keyframes shackle { from { transform: translateY(-16px); } }
@keyframes fadeOut { to { opacity: 0; } }

/* small "ask" sheet */
.ask-body { display: grid; gap: 12px; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
.ask-body .btn { width: 100%; }

/* ---------- coach chat ---------- */
.chat { display: grid; gap: 12px; padding-bottom: 8px; }
.msg { display: flex; align-items: flex-end; gap: 8px; animation: rise .4s var(--ease) both; }
.msg-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); overflow: hidden; display: grid; place-items: end center; }
.msg-avatar .mascot { width: 44px; margin-bottom: -6px; }
.msg-bubble { max-width: 84%; display: grid; gap: 6px; padding: 12px 14px; border-radius: 20px; box-shadow: var(--shadow-sm); line-height: 1.75; }
.from-coach .msg-bubble { background: var(--surface); border: 1px solid var(--line); border-end-start-radius: 6px; }
.from-nada { flex-direction: row-reverse; }
.from-nada .msg-bubble { margin-inline-start: auto; background: var(--primary); color: #fff; border-end-end-radius: 6px; }
.msg-tag { justify-self: start; padding: 1px 9px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: .72rem; font-weight: 700; }
.msg-quote { padding: 4px 10px; border-inline-start: 3px solid var(--primary-2); background: var(--surface-2); border-radius: 8px; font-size: .78rem; color: var(--ink-2); }
.msg-meta { display: flex; align-items: center; gap: 8px; font-size: .7rem; opacity: .75; }
.from-nada .msg-meta { justify-content: flex-end; }
.inline-form { display: inline; margin: 0; }
.resolve-btn { border: 0; background: rgba(255, 255, 255, .22); color: inherit; border-radius: 99px; padding: 1px 9px; font-size: .7rem; font-weight: 700; }
.msg.is-resolved .msg-bubble { opacity: .78; }

.composer {
    position: sticky; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); z-index: 12; display: grid; gap: 8px;
    padding: 10px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 34px -12px rgba(58, 58, 58, .3);
}
.composer-cats, .composer-subjects { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.composer-cats::-webkit-scrollbar, .composer-subjects::-webkit-scrollbar { display: none; }
.composer-cats .chip span, .composer-subjects .chip span { white-space: nowrap; }
.composer-subjects[hidden] { display: none; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-row textarea { flex: 1; min-height: 46px; max-height: 160px; resize: none; background: var(--surface); }
.send-btn { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 16px; background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); transition: transform .3s var(--spring); }
.send-btn:active { transform: scale(.9) rotate(-12deg); }
.suggest { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }
.suggest-chip { flex: none; padding: 7px 12px; border-radius: 14px; border: 1.5px dashed var(--primary-2); background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--primary-ink); white-space: nowrap; }

/* ---------- coach report ---------- */
.track-line { font-size: .8rem; line-height: 1.6; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .55); }
:root[data-theme="dark"] .track-line { background: rgba(0, 0, 0, .15); }
.note-item { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--surface-2); border-inline-start: 4px solid var(--peach); }
.note-item.is-resolved { border-inline-start-color: var(--mint); opacity: .75; }
.note-body { font-weight: 600; }
.note-reply { padding: 6px 10px; border-radius: 10px; background: var(--surface); font-size: .88rem; }
.reply-form { display: grid; gap: 6px; }
.reply-form .btn { justify-self: start; }
.commit-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 150px; }
.commit-day { display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 2px; height: 100%; font-size: .62rem; }
.commit-day i { align-self: end; width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px; background: var(--line-2); }
.commit-day.good i { background: var(--mint); }
.commit-day.mid i { background: #F2C64B; }
.commit-day.low i { background: var(--peach); }
.commit-day b { font-size: .58rem; color: var(--ink-2); }

/* grid children must be allowed to shrink, or horizontal scrollers (subject chips) widen the page */
.page > *, .path > *, .wizard > *, .fields > *, .track > * { min-width: 0; }
.stop-node i { font-style: normal; font-size: .95rem; font-weight: 800; color: var(--ink-3); }
.is-backlog .stop-node i { color: #C46A3E; }
