/* نَبْتة — بوابة الوالدين. Nabta design system 1.0 */
:root {
    --g: #286C50;
    --g2: #1D5540;
    --g-deep: #16241D;
    --g-mid: #4E9B74;
    --m: #A8D9B0;
    --m2: #DDF0E0;
    --y: #F5C86A;
    --y2: #FCEBC4;
    --y-text: #8A6200;
    --y-text-dark: #5B4510;
    --coral: #E6896B;
    --cream: #FBF8EF;
    --ink: #1E3229;
    --mute: #5D7268;
    --faint: #8A9A91;
    --disabled: #7C8C84;
    --line: #E3E8DF;
    --line-strong: #C9D3CC;
    --surface: #ffffff;
    --surface-muted: #F6F8F4;
    --surface-btn: #F1F4EF;
    --track: #E3E8DF;
    --warn-bg: #FFF4E6;
    --warn-border: #F2B868;
    --warn-text: #A25B10;
    --danger: #B54A32;
    --on-primary-muted: #CDE8D5;
    --shadow-sm: 0 4px 12px rgba(30, 50, 41, .08);
    --shadow-md: 0 16px 34px rgba(30, 50, 41, .18);
    --shadow-logo: 0 18px 40px rgba(40, 108, 80, .20);
    --font: "IBM Plex Sans Arabic", Tajawal, "Segoe UI", Tahoma, sans-serif;
    --display: Tajawal, "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    --radius: 22px;
    --radius-md: 14px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.7;
    font-size: 16px;
}
h1, h2, h3, .t, .brand-name, .page-title, .btn, .badge, .stat-value, .pairing-code {
    font-family: var(--display);
}
a { color: var(--g2); }
::selection { background: var(--m); color: var(--g2); }

/* ---------- Splash ---------- */
#splash {
    --bg-top: #eaf6d6;
    --bg-bottom: #d9f3f8;
    position: fixed; inset: 0; z-index: 80;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
    transition: opacity .5s ease, visibility .5s ease;
}
#splash.done { opacity: 0; visibility: hidden; }
#splash.done .logo-wrap { transform: scale(1.18); transition: transform .5s ease; }
body.splashing { overflow: hidden; }
#splash .logo-wrap { width: min(46vw, 200px); animation: sp-pop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
#splash .logo-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
#splash .bounce { transform-box: view-box; transform-origin: 512px 940px; animation: sp-bounce 1.6s ease-in-out infinite; }
#splash .shadow { transform-box: fill-box; transform-origin: center; animation: sp-shadow 1.6s ease-in-out infinite; }
#splash .sprout { transform-box: view-box; transform-origin: 512px 335px; animation: sp-sway 1.6s ease-in-out infinite; }
#splash .leaf-l { transform-box: view-box; transform-origin: 512px 300px; animation: sp-flapL 1.6s ease-in-out infinite; }
#splash .leaf-r { transform-box: view-box; transform-origin: 512px 300px; animation: sp-flapR 1.6s ease-in-out infinite; }
#splash .eye { transform-box: fill-box; transform-origin: center; animation: sp-blink 3.2s infinite; }
#splash .cheek { animation: sp-blush 1.6s ease-in-out infinite; }
#splash .sp-name { font-family: var(--display); font-weight: 800; font-size: 28px; color: #4d5c1a; margin-top: -6px; }
#splash .sp-label { color: #4d5c1a; font-family: var(--display); font-size: 16px; font-weight: 700; }
#splash .dots span { display: inline-block; animation: sp-dot 1.2s infinite; }
#splash .dots span:nth-child(2) { animation-delay: .2s; }
#splash .dots span:nth-child(3) { animation-delay: .4s; }
#splash .sp-bar { width: min(60vw, 200px); height: 8px; border-radius: 99px; background: #ffffffaa; overflow: hidden; }
#splash .sp-bar i {
    display: block; height: 100%; width: 0; border-radius: inherit;
    background: linear-gradient(90deg, #a3b23f, #5a6b1f);
    animation: sp-fill 1.7s linear forwards;
}
@keyframes sp-fill { to { width: 100%; } }
@keyframes sp-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sp-bounce {
    0%, 100% { transform: translateY(0) scale(1.06, .94); }
    15% { transform: translateY(0) scale(1, 1); }
    50% { transform: translateY(-70px) scale(.97, 1.03); }
    85% { transform: translateY(0) scale(1, 1); }
}
@keyframes sp-shadow { 0%, 100% { transform: scale(1); opacity: .35; } 50% { transform: scale(.6); opacity: .15; } }
@keyframes sp-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes sp-flapL { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-10deg); } }
@keyframes sp-flapR { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
@keyframes sp-blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes sp-blush { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes sp-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    #splash .bounce, #splash .shadow, #splash .sprout, #splash .leaf-l, #splash .leaf-r,
    #splash .eye, #splash .cheek, #splash .dots span, #splash .logo-wrap { animation: none; }
    #splash .sp-bar i { width: 100%; animation: none; }
}

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 248px; flex-shrink: 0;
    background: var(--surface);
    color: var(--ink);
    border-inline-start: 1px solid var(--line);
    display: flex; flex-direction: column;
    padding: 22px 14px 18px;
}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 0 8px 18px; }
.brand-center { flex-direction: column; text-align: center; padding: 0 0 8px; gap: 4px; }
.brand-logo {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    box-shadow: var(--shadow-logo); background: #fff; flex: none;
}
.brand-logo-lg { width: 92px; height: 92px; margin-bottom: 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 22px; color: var(--g2); }
.brand-tag { font-size: 12px; color: var(--mute); font-weight: 500; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--g); color: #fff; font-size: .8rem; flex: none;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: var(--radius-md);
    color: var(--mute); text-decoration: none;
    font-family: var(--display); font-weight: 700; font-size: 15px;
    transition: background .15s, color .15s, transform .15s;
}
.nav-item:hover { background: var(--surface-muted); color: var(--g2); }
.nav-item.is-active { background: var(--g); color: #fff; }
.nav-item.is-disabled { color: var(--disabled); cursor: default; }
.nav-item.is-disabled:hover { background: transparent; color: var(--disabled); transform: none; }
.nav-item small {
    margin-inline-start: auto;
    background: var(--y); color: var(--g2);
    font-size: 11px; font-weight: 800;
    padding: 2px 8px; border-radius: 999px;
}
.nav-ico { width: 22px; height: 22px; display: inline-flex; flex: none; }
.nav-ico svg { width: 22px; height: 22px; }
.sidebar-slogan {
    margin-top: auto; padding: 16px 10px 0;
    color: var(--faint); font-size: 13px; line-height: 1.6;
}

/* ---------- Topbar ---------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 64px; padding: 10px 24px;
    background: rgba(251, 248, 239, .92);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
    backdrop-filter: blur(10px);
}
.page-title { font-size: 18px; font-weight: 800; margin: 0; color: var(--g2); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.user-name { color: var(--mute); font-size: 14px; }
.logout-form { margin: 0; }

/* ---------- Content ---------- */
.content { padding: 24px; max-width: 1180px; width: 100%; margin-inline: auto; }
.page-intro { margin: 0 0 18px; }
.kicker { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--g); margin: 0 0 4px; }
.lede { margin: 6px 0 0; color: var(--mute); font-size: 15px; max-width: 640px; }
.page-intro h2 { margin: 0; font-size: 28px; font-weight: 800; color: var(--g2); line-height: 1.3; }

/* ---------- Cards / stats ---------- */
.cards, .stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px; margin-bottom: 18px;
}
.card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card { padding: 18px 20px; }
.stat { display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--m); }
.stat-value { font-size: 30px; font-weight: 800; color: var(--g2); line-height: 1.15; }
.stat-label { color: var(--mute); font-size: 13px; }
.stat-warn { border-top-color: var(--y); background: var(--y2); }
.stat-warn .stat-value { color: var(--y-text-dark); }
.stat-link { text-decoration: none; color: inherit; display: flex; transition: transform .15s, box-shadow .15s; }
.stat-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.panel { padding: 20px 22px; }
.panel + .panel, .stack > .panel + .panel { margin-top: 16px; }
.panel-title { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: var(--g2); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head .panel-title { margin: 0; }
.empty { color: var(--mute); margin: 0; }

.layout-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 16px; align-items: start; }
.side-note {
    background: var(--y2); color: var(--y-text-dark);
    border-radius: 18px; padding: 16px 18px; margin-bottom: 14px;
}
.side-note b { display: block; font-family: var(--display); color: var(--y-text); margin-bottom: 4px; }
.side-note p { margin: 0; font-size: 14px; line-height: 1.7; }
.quick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quick-list a {
    display: flex; align-items: center; justify-content: space-between;
    text-decoration: none; background: var(--surface-muted);
    border-radius: var(--radius-lg); padding: 12px 14px;
    font-family: var(--display); font-weight: 700; color: var(--g2);
}
.quick-list a:hover { background: var(--m2); }

/* ---------- Watch cards ---------- */
.watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.watch-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface-muted); border-radius: var(--radius-lg); padding: 12px 14px;
}
.watch-card.is-hero { background: var(--g); color: #fff; }
.watch-thumb, .recent-thumb {
    width: 92px; height: 56px; border-radius: 10px; object-fit: cover;
    background: var(--track); flex-shrink: 0;
}
.watch-thumb--empty, .recent-thumb--empty { display: inline-block; }
.watch-kicker { font-size: 12px; color: var(--mute); }
.watch-card.is-hero .watch-kicker { color: var(--m); }
.watch-title, .recent-title { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--g2); }
.watch-card.is-hero .watch-title { color: #fff; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.recent-item { display: flex; align-items: center; gap: 12px; }
.recent-meta { display: flex; flex-direction: column; min-width: 0; }
.recent-sub { color: var(--mute); font-size: 13px; }

/* ---------- Alerts ---------- */
.alert { margin: 16px 24px 0; padding: 12px 14px; border-radius: var(--radius-lg); font-size: 14px; }
.auth-card .alert { margin: 0 0 12px; }
.alert-success { background: var(--m2); color: var(--g); border: 1px solid var(--m); }
.alert-error { background: var(--warn-bg); color: var(--warn-text); border: 1.5px solid var(--warn-border); }

/* ---------- Auth ---------- */
.auth-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 24px;
    background: linear-gradient(180deg, #C5DF86, #A6E3EF);
}
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--surface); border-radius: 26px;
    box-shadow: var(--shadow-logo); padding: 28px 26px 26px;
}
.auth-title { margin: 8px 0 4px; font-size: 22px; font-weight: 800; text-align: center; color: var(--g2); }
.auth-links { display: flex; justify-content: center; gap: 16px; margin: 14px 0 0; font-size: 14px; }
.auth-links a { color: var(--g); font-weight: 700; }
.auth-dev-link {
    margin-top: 14px; padding: 12px; border-radius: 12px;
    background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text);
    font-size: 13px;
}
.auth-dev-link p { margin: 0 0 8px; }
.auth-dev-link a { font-weight: 800; color: var(--g2); }
.auth-subtitle { margin: 0 0 18px; color: var(--mute); font-size: 14px; text-align: center; }
.auth-download {
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--line); text-align: center;
}
.auth-download p { margin: 0 0 10px; color: var(--mute); font-size: 13px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: var(--mute); font-weight: 600; }
.input {
    width: 100%; padding: 11px 12px;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    font-size: 15px; font-family: inherit; background: var(--surface); color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--g); box-shadow: 0 0 0 3px var(--m); }
.input-small { padding: 7px 10px; font-size: 13px; }

.btn {
    cursor: pointer; border: none; border-radius: var(--radius-md);
    min-height: 44px; padding: 10px 18px;
    font-size: 15px; font-family: var(--display); font-weight: 700;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m); }
.btn-primary { background: var(--g); color: #fff; }
.btn-primary:hover { background: var(--g2); }
.btn-block { width: 100%; }
.btn-ghost, .btn-secondary { background: var(--surface-btn); color: var(--g2); }
.btn-ghost:hover, .btn-secondary:hover { background: var(--m2); }
.btn-reject { background: var(--surface-btn); color: var(--warn-text); }
.btn-reject:hover { background: var(--warn-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .92; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-tiny { min-height: 32px; padding: 4px 9px; font-size: 13px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table-wide { min-width: 920px; }
.table th, .table td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--mute); font-weight: 700; font-size: 13px; font-family: var(--display); }
.table tbody tr:hover { background: var(--surface-muted); }
.row-muted { opacity: .55; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.table .row-actions { flex-wrap: nowrap; }
.row-actions form { margin: 0; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block; padding: 3px 12px; border-radius: 999px;
    font-family: var(--display); font-weight: 700; font-size: 13px;
    background: var(--m2); color: var(--g);
}
.badge-ok { background: var(--m2); color: var(--g); }
.badge-off { background: var(--surface-btn); color: var(--disabled); }
.badge-warn { background: var(--y2); color: var(--y-text); }
.badge-soon { background: var(--y); color: var(--g2); }

/* ---------- Inline form ---------- */
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.form-inline .field { flex: 1; min-width: 160px; }

/* ---------- Pairing ---------- */
.pairing-banner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    background: var(--y2); color: var(--y-text-dark);
    border-radius: 18px; padding: 18px 20px; margin-bottom: 16px;
}
.pairing-label { display: block; font-size: 13px; color: var(--y-text); font-family: var(--display); font-weight: 700; }
.pairing-code { font-size: 36px; font-weight: 800; letter-spacing: .45rem; color: var(--g2); }
.pairing-hint { font-size: 14px; }

/* ---------- Channels ---------- */
.decision-card {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: 16px; padding: 14px;
    background: var(--surface-muted); border-radius: var(--radius-lg);
}
.preview-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.preview-thumb, .ch-thumb {
    width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: linear-gradient(135deg, var(--y), var(--coral));
}
.preview-body, .channel-id { flex: 1; min-width: 160px; }
.preview-title { font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--g2); }
.preview-sub { color: var(--mute); font-size: 12px; }
.preview-actions, .decision-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint {
    margin: 12px 0 0; font-size: 13px; color: var(--mute);
    background: var(--surface-muted); border-radius: 12px; padding: 10px 12px;
}

.channel-list { display: flex; flex-direction: column; gap: 12px; }
.channel-card {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 18px;
}
.channel-card.is-off { opacity: .62; }
.channel-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.channel-main a { font-family: var(--display); font-weight: 800; color: var(--g2); text-decoration: none; }
.channel-main a:hover { text-decoration: underline; }
.channel-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--mute); font-size: 13px; }
.inline-form { margin: 0; }
.cell-channel { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.v-thumb { width: 84px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--track); flex: none; }
.v-title {
    font-weight: 700; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; max-width: 340px;
}
.reason { display: block; color: var(--faint); font-size: 12px; }

/* ---------- Filters / bulk / pagination ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.filters .input { width: auto; flex: 0 1 auto; }
.filters input[type="search"] { flex: 1; min-width: 180px; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.bulk-select { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 14px; }
.bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.page-info { color: var(--mute); font-size: 14px; }

/* ---------- Children ---------- */
.child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.child-card { display: flex; flex-direction: column; gap: 12px; }
.child-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.child-name { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--g2); margin: 0; }
.child-meta { display: flex; gap: 14px; color: var(--mute); font-size: 13px; margin: 0; }
.child-meta b { color: var(--ink); font-weight: 700; }

/* ---------- Family screens ---------- */
.child-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    border: 1px solid var(--line); background: var(--surface);
    color: var(--g2); border-radius: 999px; padding: 6px 14px 6px 8px;
    font-family: var(--display); font-weight: 800; font-size: 14px; cursor: pointer;
}
.chip.is-on { background: var(--g); color: #fff; border-color: var(--g); }
.avatar-letter {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--m2); color: var(--g2); font-size: 13px;
}
.chip.is-on .avatar-letter { background: rgba(255,255,255,.2); color: #fff; }
.avatar-letter.alt { background: var(--y2); color: var(--y-text); }

.limit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.limit-tile {
    background: var(--surface-muted); border-radius: var(--radius-lg); padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.limit-tile .stat-value { font-size: 28px; }
.limit-tile small { font-size: 16px; font-weight: 700; }
.subhead { margin: 18px 0 10px; font-family: var(--display); font-size: 15px; color: var(--g2); }
.day-track { display: flex; height: 36px; border-radius: 12px; overflow: hidden; background: var(--track); }
.day-track .seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-family: var(--display); font-weight: 800; }
.day-track .rest { flex: 6; background: var(--y2); color: var(--y-text); }
.day-track .off { flex: 6; background: var(--surface-btn); color: var(--disabled); }
.day-track .on { flex: 4; background: var(--g); color: #fff; }
.day-track.youssef .off { flex: 10; }
.day-track.youssef .on { flex: 5; }
.day-labels { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; }

.activity-list, .challenge-list, .video-picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.activity-row, .challenge-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 12px;
}
.activity-name, .challenge-row strong { font-family: var(--display); font-weight: 800; color: var(--g2); flex: 1; min-width: 120px; }
.challenge-row { justify-content: space-between; }
.challenge-row .watch-kicker { display: block; }
.activity-reward { font-family: var(--display); font-weight: 800; color: var(--g); }
.audio-btn {
    width: 36px; height: 36px; border-radius: 50%; background: var(--m2); color: var(--g);
    display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.audio-btn svg { width: 18px; height: 18px; }
.switch {
    appearance: none; width: 46px; height: 26px; border-radius: 999px; border: 0;
    background: var(--track); position: relative; cursor: pointer; flex: none; margin-inline-start: auto;
}
.switch::after {
    content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    transition: inset-inline-start .15s;
}
.switch:checked { background: var(--g); }
.switch:checked::after { inset-inline-start: 23px; }
.switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m); }

.activity-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.activity-edit { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; flex: 1; }
.activity-edit .field { margin: 0; min-width: 140px; }
.field-narrow { max-width: 120px; }
.decision-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.decision-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.request-list, .occasion-list { display: flex; flex-direction: column; gap: 12px; }
.request-card, .occasion-card { display: flex; flex-direction: column; gap: 8px; }
.occasion-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px;
}
.request-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.request-title { margin: 0; font-size: 18px; font-weight: 800; color: var(--g2); }
.request-body { margin: 0; color: var(--ink); }
.occasion-card.is-off { opacity: .7; }
.occasion-card .video-picks { max-height: 240px; overflow: auto; }
.occasion-card.is-proposed { background: var(--y2); border-color: #F1DDA8; }
.meter { height: 8px; border-radius: 9px; background: var(--track); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--g); border-radius: inherit; }
.meter-caption { display: flex; justify-content: space-between; color: var(--mute); font-size: 13px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pick {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface-muted); border-radius: 999px; padding: 6px 12px;
    font-family: var(--display); font-weight: 700; color: var(--g2); cursor: pointer;
}
.pick:has(input:checked) { background: var(--m2); outline: 2px solid var(--g); }
.pick input { accent-color: var(--g); }
.task-box, .video-picks { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; background: var(--surface); }
.task-box legend { font-family: var(--display); font-weight: 800; color: var(--g2); padding: 0 6px; }
.check-line { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; cursor: pointer; }
.check-line input { accent-color: var(--g); margin-top: 4px; }
.preview-child { background: var(--m2); border-radius: var(--radius-lg); padding: 12px 14px; }
.preview-child ul { margin: 6px 0 0; padding-inline-start: 18px; }
.nav-count {
    margin-inline-start: auto; background: var(--y); color: var(--g2);
    min-width: 22px; height: 22px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
}
.nav-item.is-active .nav-count { background: #fff; color: var(--g); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch {
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 0 1px var(--line); border: 3px solid #fff;
}
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--g2); }
.swatch input { opacity: 0; width: 0; height: 0; position: absolute; }
.color-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.check-grid { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 12px; }

.community-alert, .community-calm {
    background: var(--warn-bg); border: 1px solid var(--warn-border);
    color: var(--warn-text); border-radius: var(--radius-md); padding: 10px 12px;
    font-size: 13px;
}
.community-calm { background: var(--surface-muted); border-color: var(--line); color: var(--ink); }
.community-title { font-family: var(--display); font-weight: 800; margin-bottom: 4px; }
.community-disclaimer, .community-empty { margin: 4px 0 0; color: var(--mute); font-size: 12px; }
.community-flags, .community-quotes { margin: 6px 0; padding-inline-start: 18px; }
.community-quotes span { color: var(--faint); }
.community-foot { display: flex; gap: 12px; flex-wrap: wrap; font-weight: 700; margin-top: 6px; }
.community-form { margin-top: 8px; }
.community-form textarea { min-height: 64px; margin-top: 6px; }
.community-choices { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; font-size: 13px; }
.community-slot { margin-top: 8px; max-width: 360px; }
.community-preview { flex: 1 0 100%; }
.growth-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-value.is-text { font-size: 18px; }
.category-bars { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.category-bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 4px; }
.category-bar-track { height: 14px; border-radius: 4px; background: #F0F3EE; overflow: hidden; }
.category-bar-track span { display: block; height: 100%; border-radius: 4px; }
.chip-row { list-style: none; padding: 0; }
.quick-list > li > span {
    display: block; background: var(--surface-muted); border-radius: var(--radius-lg);
    padding: 12px 14px; font-weight: 700; color: var(--g2);
}
.quick-list small { display: block; font-weight: 500; margin-top: 4px; }
.community-slot .community-flags { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .cards, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .layout-split, .limit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%; flex-direction: row; align-items: center;
        padding: 10px 12px; gap: 8px; overflow-x: auto;
        border-inline-start: 0; border-bottom: 1px solid var(--line);
    }
    .brand { padding: 0 8px 0 0; }
    .brand-tag, .sidebar-slogan { display: none; }
    .nav { flex-direction: row; }
    .nav-item { white-space: nowrap; padding: 8px 10px; }
    .content { padding: 16px; }
    .topbar { padding: 10px 16px; }
    .alert { margin-inline: 16px; }
    .pairing-code { font-size: 28px; letter-spacing: .28rem; }
    .cards, .stat-grid { grid-template-columns: 1fr; }
}
