/* ============================================================
   INSTRUCTOR TOLU — APP STYLES
   Tokens → base → shell (nav, sheets, toasts) → components → screens.
   Colour comes from the brand mark: ink-navy, one orange dot, a touch of gold.
   The dot is the only loud thing on any screen.
   ============================================================ */
:root{
  color-scheme: light dark;
  --bg:#F1F2F5;
  --surface:#FFFFFF;
  --surface-2:#E8EAEF;
  --surface-3:#DDE0E7;
  --ink:#0E1525;
  --ink-2:#444D60;
  --ink-3:#7C869A;
  --line:rgba(14,21,37,.09);
  --navy:#0E1525;
  --navy-2:#1D2940;
  --on-navy:#F4F6FA;
  --on-navy-2:#A9B4C8;
  --dot:#EA4E27;
  --dot-soft:#FCE7E1;
  --gold:#CEAB3D;
  --gold-soft:#F6EEDA;
  --ok:#2E7D5B;
  --ok-soft:#DDEFE6;
  --danger:#B8402F;
  --post-tint:#E3E8F3;
  --video-tint:#FBE4DC;
  --hero:#0E1525; --hero-ink:#F4F6FA; --hero-ink-2:#A9B4C8;
  --shadow-float:0 10px 30px -8px rgba(14,21,37,.28), 0 2px 6px rgba(14,21,37,.10);
  --shadow-sheet:0 -12px 50px rgba(14,21,37,.25);

  --r-xl:30px; --r-lg:22px; --r-md:16px; --r-sm:11px; --r-pill:999px;
  --ease-out:cubic-bezier(.22,.9,.28,1);
  --ease-spring:cubic-bezier(.34,1.4,.5,1);
  --f-display:"Fraunces",Georgia,"Times New Roman",serif;
  --f-ui:"Figtree","Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-hand:"Caveat","Bradley Hand",cursive;
  --nav-h:84px;
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
}
:root[data-theme="dark"]{
  --bg:#0A0F1B; --surface:#151C2C; --surface-2:#1E2739; --surface-3:#28324A;
  --ink:#F1F3F8; --ink-2:#B4BDCE; --ink-3:#7E889C; --line:rgba(241,243,248,.09);
  --navy:#F1F3F8; --navy-2:#DDE2EE; --on-navy:#0E1525; --on-navy-2:#3B455A;
  --dot-soft:#3A1E18; --gold-soft:#332C17; --ok-soft:#173226;
  --post-tint:#222C44; --video-tint:#3A231D; --hero:#212D49;
  --shadow-float:0 10px 30px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  --shadow-sheet:0 -12px 50px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0A0F1B; --surface:#151C2C; --surface-2:#1E2739; --surface-3:#28324A;
    --ink:#F1F3F8; --ink-2:#B4BDCE; --ink-3:#7E889C; --line:rgba(241,243,248,.09);
    --navy:#F1F3F8; --navy-2:#DDE2EE; --on-navy:#0E1525; --on-navy-2:#3B455A;
    --dot-soft:#3A1E18; --gold-soft:#332C17; --ok-soft:#173226;
    --post-tint:#222C44; --video-tint:#3A231D; --hero:#212D49;
    --shadow-float:0 10px 30px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
    --shadow-sheet:0 -12px 50px rgba(0,0,0,.6);
  }
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; height:100%; }
body{
  margin:0; min-height:100%; background:var(--bg); color:var(--ink);
  font-family:var(--f-ui); font-size:16px; line-height:1.5; font-weight:450;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  -webkit-tap-highlight-color:transparent; overscroll-behavior-y:none;
}
button,input,textarea,select{ font:inherit; color:inherit; }
button{ border:0; background:none; padding:0; cursor:pointer; touch-action:manipulation; }
h1,h2,h3,h4,p{ margin:0; }
a{ color:inherit; text-decoration:none; }
svg.i{ width:1.25em; height:1.25em; flex:none; stroke:currentColor; fill:none; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
:focus-visible{ outline:2.5px solid var(--dot); outline-offset:2px; border-radius:8px; }
::selection{ background:var(--dot-soft); }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
[hidden]{ display:none !important; }
html.locked body > #app{ display:none; }

/* ---------- type ---------- */
.display{ font-family:var(--f-display); font-optical-sizing:auto; font-weight:560; letter-spacing:-.015em; line-height:1.08; }
.hand{ font-family:var(--f-hand); font-weight:500; color:var(--ink-3); }
.t-title{ font-family:var(--f-display); font-weight:580; font-size:30px; letter-spacing:-.02em; line-height:1.08; }
.t-h{ font-family:var(--f-display); font-weight:580; font-size:21px; letter-spacing:-.01em; line-height:1.2; }
.t-body{ font-size:16px; line-height:1.55; }
.t-small{ font-size:14px; color:var(--ink-2); }
.t-tiny{ font-size:12.5px; color:var(--ink-3); font-weight:500; }
.dotp{ color:var(--dot); }

/* ---------- app frame ---------- */
html,body{ overflow-x:clip; }
#app{ position:relative; min-height:100dvh; max-width:520px; margin:0 auto; background:var(--bg); overflow-x:clip; }
@media (min-width:560px){ body{ background:color-mix(in srgb,var(--bg) 82%,var(--ink) 18%); } #app{ box-shadow:0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.18); } }
#view{ min-height:100dvh; padding-bottom:calc(var(--nav-h) + var(--safe-b) + 36px); }
.screen{ padding:calc(var(--safe-t) + 20px) 20px 0; }
.screen.enter{ animation:scr-in .34s var(--ease-out) both; }
.screen.enter-push{ animation:scr-push .38s var(--ease-out) both; }
.screen.enter-back{ animation:scr-back .34s var(--ease-out) both; }
@keyframes scr-in{ from{ opacity:0; transform:translateY(10px);} }
@keyframes scr-push{ from{ opacity:0; transform:translateX(28px);} }
@keyframes scr-back{ from{ opacity:0; transform:translateX(-18px);} }

/* top bar used by every tab screen */
.topbar{ display:flex; align-items:center; gap:12px; min-height:44px; }
.topbar .grow{ flex:1; min-width:0; }
.avatar{ width:46px; height:46px; border-radius:50%; object-fit:cover; background:var(--surface-3); flex:none; box-shadow:0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.iconbtn{ width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:var(--surface); color:var(--ink); transition:transform .18s var(--ease-spring), background .2s; flex:none; }
.iconbtn:active{ transform:scale(.9); }
.iconbtn.plain{ background:transparent; }
.iconbtn.dark{ background:var(--navy); color:var(--on-navy); }
.backbtn{ display:inline-flex; align-items:center; gap:4px; height:44px; padding:0 14px 0 8px; margin-left:-8px; border-radius:var(--r-pill); font-weight:600; color:var(--ink); }
.backbtn:active{ background:var(--surface-2); }

/* ---------- bottom navigation ---------- */
.dock{ position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; justify-content:center; pointer-events:none; padding:0 14px calc(var(--safe-b) + 14px); }
.dock-in{ width:100%; max-width:492px; display:flex; align-items:center; gap:10px; pointer-events:auto; }
.tabs{ flex:1; display:flex; align-items:center; gap:2px; background:color-mix(in srgb,var(--surface) 88%,transparent); backdrop-filter:blur(18px) saturate(1.4); -webkit-backdrop-filter:blur(18px) saturate(1.4); border-radius:var(--r-pill); padding:6px; box-shadow:var(--shadow-float); }
.tab{ position:relative; display:flex; align-items:center; justify-content:center; gap:0; height:48px; min-width:0; padding:0; overflow:hidden; border-radius:var(--r-pill); color:var(--ink-3); font-weight:650; font-size:14.5px; transition:flex-grow .4s var(--ease-out), background .2s ease, color .2s ease; flex:1 1 0; }
.tab span{ max-width:0; opacity:0; overflow:hidden; white-space:nowrap; transition:opacity .25s ease; }
.tab[aria-current="page"]{ flex-grow:2.1; background:var(--navy); color:var(--on-navy); }
.tab[aria-current="page"] span{ max-width:80px; margin-left:8px; opacity:1; }
.tab .pip{ position:absolute; top:9px; right:10px; width:8px; height:8px; border-radius:50%; background:var(--dot); box-shadow:0 0 0 2px var(--surface); }
.fab{ width:62px; height:62px; border-radius:50%; background:var(--navy); color:var(--on-navy); display:grid; place-items:center; box-shadow:var(--shadow-float); flex:none; transition:transform .25s var(--ease-spring); }
.fab svg{ width:26px; height:26px; stroke-width:2.2; transition:transform .3s var(--ease-spring); }
.fab:active{ transform:scale(.92); }
.fab.open svg{ transform:rotate(45deg); }
body.no-dock .dock{ display:none; }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:52px; padding:0 22px; border-radius:var(--r-pill); font-weight:650; font-size:16px; background:var(--navy); color:var(--on-navy); transition:transform .18s var(--ease-spring), opacity .2s, background .2s; position:relative; }
.btn:active{ transform:scale(.96); }
.btn.block{ display:flex; width:100%; }
.btn.soft{ background:var(--surface-2); color:var(--ink); }
.btn.line{ background:transparent; color:var(--ink); box-shadow:inset 0 0 0 1.5px var(--line); }
.btn.danger{ background:var(--danger); color:#fff; }
.btn.dot{ background:var(--dot); color:#fff; }
.btn.sm{ min-height:40px; padding:0 16px; font-size:14.5px; }
.btn[disabled]{ opacity:.45; pointer-events:none; }
.btn .i{ width:1.15em; height:1.15em; }
.btn.ai .i{ color:var(--dot); }
.btn.soft.ai .i,.btn.line.ai .i{ color:var(--dot); }
.btn.working::after{ content:""; width:16px; height:16px; border-radius:50%; border:2.5px solid currentColor; border-right-color:transparent; animation:spin .7s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.linkbtn{ color:var(--ink); font-weight:650; text-decoration:underline; text-decoration-color:var(--dot); text-decoration-thickness:2px; text-underline-offset:4px; }

/* ---------- chips, pills ---------- */
.chip{ display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 11px; border-radius:var(--r-pill); font-size:12.5px; font-weight:650; background:var(--surface-2); color:var(--ink-2); white-space:nowrap; }
.chip.post{ background:var(--post-tint); color:var(--ink); }
.chip.video{ background:var(--video-tint); color:var(--ink); }
.chip .i{ width:14px; height:14px; }
.status{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:650; color:var(--ink-2); }
.status::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--ink-3); }
.status.ready::before{ background:var(--gold); }
.status.posted::before{ background:var(--ok); }
.status.posted{ color:var(--ok); }
.status.rejected::before{ background:var(--surface-3); }
.filters{ display:flex; gap:8px; overflow-x:auto; margin:0 -20px; padding:4px 20px; scrollbar-width:none; scroll-snap-type:x proximity; scroll-padding-inline:20px; }
.filters::-webkit-scrollbar{ display:none; }
.fchip{ flex:none; height:40px; padding:0 16px; border-radius:var(--r-pill); background:var(--surface); font-weight:600; font-size:14.5px; color:var(--ink-2); display:inline-flex; align-items:center; gap:7px; transition:background .25s, color .25s, transform .15s; scroll-snap-align:start; }
.fchip small{ font-size:12px; color:var(--ink-3); font-weight:600; }
.fchip:active{ transform:scale(.95); }
.fchip.on{ background:var(--navy); color:var(--on-navy); }
.fchip.on small{ color:var(--on-navy-2); }

.seg{ position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; background:var(--surface); border-radius:var(--r-pill); padding:4px; }
.seg button{ position:relative; z-index:1; height:42px; border-radius:var(--r-pill); font-weight:650; font-size:15px; color:var(--ink-3); display:flex; align-items:center; justify-content:center; gap:7px; transition:color .25s; }
.seg button[aria-pressed="true"]{ color:var(--on-navy); }
.seg .thumb{ position:absolute; z-index:0; top:4px; bottom:4px; left:4px; border-radius:var(--r-pill); background:var(--navy); transition:transform .4s var(--ease-out); }

/* ---------- cards & rows ---------- */
.card{ background:var(--surface); border-radius:var(--r-xl); padding:20px; }
.card.flat{ background:transparent; padding:0; }
.card.navy{ background:var(--hero); color:var(--hero-ink); }
.card.tint{ background:var(--surface-2); }
.sec-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:28px 2px 12px; }
.sec-head h2{ font-family:var(--f-display); font-weight:580; font-size:21px; letter-spacing:-.01em; }
.sec-head a,.sec-head button{ font-weight:650; font-size:14.5px; color:var(--ink-2); }
.stack{ display:grid; gap:12px; }
.row{ display:flex; align-items:center; gap:14px; }
.grow{ flex:1; min-width:0; }
.clamp2{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.clamp3{ display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

.empty{ text-align:center; padding:36px 24px; color:var(--ink-2); }
.empty h3{ font-family:var(--f-display); font-weight:580; font-size:21px; color:var(--ink); margin-bottom:6px; }
.empty .art{ width:64px; height:64px; margin:0 auto 14px; border-radius:50%; background:var(--surface-2); display:grid; place-items:center; color:var(--ink-3); }
.empty .art svg{ width:28px; height:28px; }
.empty .btn{ margin-top:18px; }

/* ---------- forms ---------- */
.field{ display:grid; gap:7px; }
.field > label,.label{ font-weight:650; font-size:14px; color:var(--ink-2); }
.input,.textarea,.select{ width:100%; min-height:52px; padding:0 16px; border-radius:var(--r-md); background:var(--surface-2); border:2px solid transparent; font-size:16px; transition:border-color .2s, background .2s; appearance:none; -webkit-appearance:none; }
.textarea{ padding:14px 16px; min-height:110px; resize:vertical; line-height:1.5; }
.input:focus,.textarea:focus,.select:focus{ outline:0; border-color:var(--navy); background:var(--surface); }
.searchfield{ position:relative; }
.searchfield .i{ position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--ink-3); pointer-events:none; }
.searchfield .input{ padding-left:46px; background:var(--surface); border-radius:var(--r-pill); }
.switch{ position:relative; width:52px; height:32px; border-radius:var(--r-pill); background:var(--surface-3); transition:background .25s; flex:none; }
.switch::after{ content:""; position:absolute; top:3px; left:3px; width:26px; height:26px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.25); transition:transform .3s var(--ease-spring); }
.switch[aria-checked="true"]{ background:var(--ok); }
.switch[aria-checked="true"]::after{ transform:translateX(20px); }

/* ---------- bottom sheet ---------- */
.scrim{ position:fixed; inset:0; z-index:60; background:rgba(8,12,22,.5); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); opacity:0; transition:opacity .3s; }
.scrim.on{ opacity:1; }
.sheet{ position:fixed; left:50%; bottom:0; z-index:61; width:100%; max-width:520px; max-height:90dvh; display:flex; flex-direction:column; background:var(--bg); border-radius:var(--r-xl) var(--r-xl) 0 0; box-shadow:var(--shadow-sheet); transform:translate(-50%,105%); transition:transform .42s var(--ease-out); will-change:transform; padding-bottom:var(--safe-b); }
.sheet.on{ transform:translate(-50%,0); }
.sheet.drag{ transition:none; }
.sheet.full{ height:92dvh; }
.sheet-grab{ padding:10px 0 4px; display:grid; place-items:center; touch-action:none; cursor:grab; }
.sheet-grab::before{ content:""; width:40px; height:5px; border-radius:3px; background:var(--surface-3); }
.sheet-head{ display:flex; align-items:center; gap:10px; padding:4px 20px 12px; touch-action:none; }
.sheet-head h3{ flex:1; font-family:var(--f-display); font-weight:580; font-size:22px; letter-spacing:-.01em; }
.sheet-body{ padding:4px 20px 22px; overflow-y:auto; overscroll-behavior:contain; flex:1; }
.sheet-foot{ padding:12px 20px 14px; display:grid; gap:10px; border-top:1px solid var(--line); background:var(--bg); }
.selbtn{ display:flex; align-items:center; gap:10px; width:100%; min-height:52px; padding:0 16px; border-radius:var(--r-md); background:var(--surface); text-align:left; font-weight:600; font-size:15px; color:var(--ink); transition:transform .15s; }
.selbtn:active{ transform:scale(.99); }
.selbtn .sel-l{ color:var(--ink-3); font-weight:600; font-size:13px; flex:none; }
.selbtn .sel-l:empty{ display:none; }
.selbtn .sel-v{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.selbtn .sel-n{ color:var(--ink-3); font-size:12.5px; font-weight:600; flex:none; }
.selbtn .i{ width:18px; height:18px; color:var(--ink-3); flex:none; }
.sel-list{ display:grid; gap:4px; }
.sel-opt{ display:flex; align-items:center; gap:10px; width:100%; min-height:54px; padding:0 16px; border-radius:var(--r-md); background:transparent; text-align:left; font-weight:600; font-size:16px; color:var(--ink); transition:background .2s; }
.sel-opt:active{ background:var(--surface-2); }
.sel-opt .sel-name{ flex:1; min-width:0; }
.sel-opt small{ color:var(--ink-3); font-size:13px; font-weight:600; }
.sel-opt .i{ width:18px; height:18px; visibility:hidden; color:var(--dot); stroke-width:3; }
.sel-opt.on{ background:var(--surface-2); }
.sel-opt.on .i{ visibility:visible; }
.menu-item{ display:flex; align-items:center; gap:14px; width:100%; min-height:62px; padding:10px 14px; border-radius:var(--r-lg); background:var(--surface); text-align:left; transition:transform .15s; }
.menu-item:active{ transform:scale(.98); }
.menu-item + .menu-item{ margin-top:10px; }
.menu-item .ic{ width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:var(--surface-2); flex:none; }
.menu-item .ic.dot{ background:var(--dot-soft); color:var(--dot); }
.menu-item b{ display:block; font-weight:650; }
.menu-item small{ display:block; color:var(--ink-3); font-size:13.5px; font-weight:500; line-height:1.3; }

/* ---------- toast ---------- */
.toasts{ position:fixed; left:0; right:0; bottom:calc(var(--nav-h) + var(--safe-b) + 18px); z-index:80; display:grid; justify-items:center; gap:8px; pointer-events:none; padding:0 16px; }
body.no-dock .toasts{ bottom:calc(var(--safe-b) + 24px); }
.toast{ pointer-events:auto; display:flex; align-items:center; gap:10px; max-width:100%; min-height:48px; padding:6px 8px 6px 18px; border-radius:var(--r-pill); background:var(--navy); color:var(--on-navy); font-weight:600; font-size:15px; box-shadow:var(--shadow-float); animation:toast-in .4s var(--ease-spring) both; }
.toast.out{ animation:toast-out .25s ease-in both; }
.toast .i{ color:var(--dot); }
.toast button{ height:36px; padding:0 14px; border-radius:var(--r-pill); background:rgba(255,255,255,.14); font-weight:650; color:inherit; }
:root[data-theme="dark"] .toast button, :root:not([data-theme="light"]) .toast button{ background:rgba(14,21,37,.12); }
@keyframes toast-in{ from{ opacity:0; transform:translateY(16px) scale(.94);} }
@keyframes toast-out{ to{ opacity:0; transform:translateY(8px) scale(.96);} }

/* ---------- check button: tick draws itself, then settles ---------- */
.check{ position:relative; width:32px; height:32px; border-radius:50%; flex:none; box-shadow:inset 0 0 0 2px var(--surface-3); display:grid; place-items:center; transition:background .25s, box-shadow .25s, transform .2s var(--ease-spring); }
.check:active{ transform:scale(.88); }
.check svg{ width:18px; height:18px; stroke:#fff; stroke-width:3; fill:none; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:24; stroke-dashoffset:24; transition:stroke-dashoffset .35s var(--ease-out) .08s; }
.check[aria-checked="true"]{ background:var(--ok); box-shadow:none; }
.check[aria-checked="true"] svg{ stroke-dashoffset:0; }
.check.pop::after{ content:""; position:absolute; inset:-2px; border-radius:50%; border:3px solid var(--ok); animation:ring .6s var(--ease-out) both; }
@keyframes ring{ from{ transform:scale(.8); opacity:.9;} to{ transform:scale(1.9); opacity:0;} }

/* ---------- progress ring ---------- */
.ring{ position:relative; width:84px; height:84px; flex:none; }
.ring svg{ width:100%; height:100%; transform:rotate(-90deg); }
.ring circle{ fill:none; stroke-width:9; stroke-linecap:round; }
.ring .trk{ stroke:rgba(255,255,255,.14); }
.ring .bar{ stroke:var(--dot); stroke-dasharray:var(--c); stroke-dashoffset:var(--c); transition:stroke-dashoffset 1.1s var(--ease-out) .25s; }
.ring .num{ position:absolute; inset:0; display:grid; place-items:center; font-family:var(--f-display); font-weight:600; font-size:24px; }

/* ---------- AI thinking ---------- */
.think{ display:grid; justify-items:center; gap:16px; text-align:center; padding:26px 8px 18px; }
.think .orb{ width:72px; height:72px; border-radius:50%; display:grid; place-items:center; background:var(--navy); color:var(--on-navy); position:relative; }
.think .orb::before,.think .orb::after{ content:""; position:absolute; inset:0; border-radius:50%; border:2px solid var(--dot); animation:pulse 2.2s var(--ease-out) infinite; }
.think .orb::after{ animation-delay:1.1s; }
.think .orb svg{ width:30px; height:30px; color:var(--dot); animation:twinkle 1.8s ease-in-out infinite; }
@keyframes pulse{ from{ transform:scale(1); opacity:.7;} to{ transform:scale(1.9); opacity:0;} }
@keyframes twinkle{ 50%{ transform:scale(1.18) rotate(12deg);} }
.think p{ font-family:var(--f-display); font-size:19px; font-weight:540; min-height:2.6em; max-width:26ch; }
.preview-text{ white-space:pre-wrap; line-height:1.65; font-size:16.5px; background:var(--surface); padding:18px; border-radius:var(--r-lg); }

/* ---------- confetti ---------- */
.confetti{ position:fixed; z-index:90; width:9px; height:9px; border-radius:2px; pointer-events:none; animation:confetti 1s var(--ease-out) forwards; }
@keyframes confetti{ to{ transform:translate(var(--dx),var(--dy)) rotate(var(--rot)); opacity:0; } }

/* ============ SCREENS ============ */

/* ----- welcome / lock ----- */
.welcome{ position:fixed; inset:0; z-index:100; background:var(--bg); display:flex; flex-direction:column; align-items:center; overflow:hidden; }
.welcome .stage{ flex:1; width:100%; position:relative; display:grid; place-items:center; overflow:hidden; }
.welcome .peek{ position:absolute; width:210px; height:130px; border-radius:22px; background:var(--surface); box-shadow:0 8px 30px rgba(14,21,37,.07); padding:16px; display:grid; gap:9px; align-content:start; }
.welcome .peek i{ display:block; height:10px; border-radius:5px; background:var(--surface-2); }
.welcome .peek i:first-child{ width:44%; background:var(--surface-3); }
.welcome .peek i.d{ width:70%; } .welcome .peek i.e{ width:55%; }
.welcome .peek.a{ transform:translate(-110px,-96px) rotate(-8deg); animation:float 7s ease-in-out infinite; }
.welcome .peek.b{ transform:translate(112px,-30px) rotate(7deg); animation:float 8s ease-in-out -2s infinite; }
.welcome .peek.c{ transform:translate(-104px,62px) rotate(5deg); animation:float 9s ease-in-out -4s infinite; }
@keyframes float{ 50%{ translate:0 -10px; } }
.welcome .logo{ position:relative; width:112px; height:112px; display:grid; place-items:center; animation:logo-in .9s var(--ease-spring) both; }
.welcome .logo{ width:76px; height:71px; }
.welcome .logo img{ width:100%; height:100%; object-fit:contain; display:block; }
.welcome .logo img.lm-d{ display:none; }
:root[data-theme="dark"] .welcome .logo img.lm-l{ display:none; } :root[data-theme="dark"] .welcome .logo img.lm-d{ display:block; }
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .welcome .logo img.lm-l{ display:none; } :root:not([data-theme="light"]) .welcome .logo img.lm-d{ display:block; } }
@keyframes logo-in{ from{ transform:scale(.6) rotate(-10deg); opacity:0; } }
.welcome .panel{ width:100%; max-width:520px; background:var(--surface); border-radius:var(--r-xl) var(--r-xl) 0 0; padding:30px 24px calc(26px + var(--safe-b)); display:grid; gap:16px; text-align:center; animation:panel-in .7s var(--ease-out) .15s both; }
@keyframes panel-in{ from{ transform:translateY(40px); opacity:0; } }
.welcome h1{ font-family:var(--f-display); font-weight:580; font-size:30px; letter-spacing:-.02em; line-height:1.1; }
.welcome .msg{ color:var(--danger); font-weight:600; min-height:1.4em; font-size:14.5px; }
.welcome .input{ text-align:center; }

/* ----- today ----- */
.greet{ margin:8px 0 0; }
.greet-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.greet h1{ font-family:var(--f-display); font-weight:580; font-size:30px; letter-spacing:-.02em; line-height:1.08; }
.greet .hand{ font-size:23px; margin-top:6px; transform:rotate(-1.5deg); transform-origin:left; }
.weekstrip{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-top:22px; background:var(--surface); border-radius:var(--r-xl); padding:8px; }
.wday{ display:grid; justify-items:center; gap:2px; padding:10px 0 9px; border-radius:var(--r-lg); color:var(--ink-3); font-size:12px; font-weight:600; position:relative; transition:background .25s, color .25s, transform .15s; }
.wday b{ font-family:var(--f-display); font-size:19px; font-weight:580; color:var(--ink-2); }
.wday:active{ transform:scale(.93); }
.wday.today{ background:var(--navy); color:var(--on-navy-2); }
.wday.today b{ color:var(--on-navy); }
.wday .pips{ height:6px; display:flex; gap:3px; margin-top:3px; }
.wday .pips i{ width:6px; height:6px; border-radius:50%; background:var(--surface-3); }
.wday .pips i.done{ background:var(--ok); }
.wday.today .pips i{ background:rgba(255,255,255,.3); }
.wday.today .pips i.done{ background:var(--dot); }

.task{ display:flex; align-items:center; gap:14px; padding:14px 14px 14px 18px; background:var(--surface); border-radius:var(--r-lg); transition:opacity .3s, transform .3s var(--ease-out); }
.task + .task{ margin-top:10px; }
.task .kind{ width:40px; height:40px; border-radius:13px; display:grid; place-items:center; flex:none; background:var(--post-tint); }
.task .kind.video{ background:var(--video-tint); }
.task .ttl{ font-weight:620; line-height:1.3; }
.task .grow{ min-width:0; }
.task .sub{ display:flex; align-items:baseline; min-width:0; font-size:13px; color:var(--ink-3); font-weight:550; margin-top:2px; }
.task .sub .tp{ flex:0 1 auto; min-width:0; max-width:9.5ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.task .sub .tl{ flex:none; white-space:pre; }
.spark .row{ display:flex; gap:8px; align-items:center; min-width:0; }
.spark .row .chip{ min-width:0; flex:0 1 auto; }
.spark .row .chip:first-child{ flex:none; }
.spark .tchip .ct{ display:block; max-width:9.5ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.task.done .ttl{ color:var(--ink-3); text-decoration:line-through; text-decoration-thickness:1.5px; }
.task.done .kind{ opacity:.55; }

.goal{ display:flex; align-items:center; gap:18px; }
.goal h3{ font-family:var(--f-display); font-weight:560; font-size:22px; line-height:1.15; letter-spacing:-.01em; }
.goal p{ color:var(--hero-ink-2); font-size:14.5px; margin-top:4px; }
.streak{ display:inline-flex; align-items:center; gap:6px; margin-top:10px; height:30px; padding:0 12px; border-radius:var(--r-pill); background:rgba(255,255,255,.1); font-weight:650; font-size:13.5px; }
.streak .i{ color:var(--gold); width:16px; height:16px; }

.spark{ display:grid; gap:12px; }
.spark .q{ font-family:var(--f-display); font-size:22px; font-weight:560; line-height:1.22; letter-spacing:-.01em; }
.spark .why{ font-size:13.5px; color:var(--ink-3); font-weight:550; }
.spark .acts{ display:flex; gap:10px; flex-wrap:wrap; margin-top:4px; }

.steps{ display:grid; gap:2px; }
.stepr{ cursor:pointer; display:flex; align-items:center; gap:14px; padding:12px 0; width:100%; text-align:left; }
.stepr .check{ width:28px; height:28px; pointer-events:none; }
.stepr.done .t{ color:var(--ink-3); text-decoration:line-through; }
.stepr .t{ font-weight:620; }

.rise{ animation:rise .6s var(--ease-out) both; animation-delay:calc(var(--i,0) * 70ms); }
@keyframes rise{ from{ opacity:0; transform:translateY(22px) scale(.985);} }

/* ----- ideas list ----- */
.pagehead{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:8px 0 18px; }
.idea{ display:grid; grid-template-columns:minmax(0,1fr); gap:10px; padding:18px 18px 16px; background:var(--surface); border-radius:var(--r-xl); text-align:left; width:100%; transition:transform .18s var(--ease-out); }
.idea:active{ transform:scale(.985); }
.idea + .idea{ margin-top:12px; }
.idea .q{ font-family:var(--f-display); font-weight:520; font-size:19px; line-height:1.27; letter-spacing:-.005em; min-width:0; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; overflow:hidden; }
.idea .meta{ min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.idea .meta .l{ display:flex; gap:8px; flex-wrap:nowrap; align-items:center; min-width:0; flex:1; }
.idea .meta .l .chip{ min-width:0; flex:0 1 auto; }
.idea .meta .l .chip .ct{ display:block; max-width:9.5ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.idea .meta .l .chip .i{ flex:none; }
.idea .meta .l .status{ flex:none; white-space:nowrap; }
.idea .meta .pips3{ flex:none; }
.pips3{ display:flex; gap:5px; }
.pips3 i{ width:22px; height:6px; border-radius:3px; background:var(--surface-3); }
.pips3 i.on{ background:var(--navy); }
.loadmore{ margin:18px auto 0; display:flex; }

/* ----- idea detail ----- */
.detail-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.hero-q{ font-family:var(--f-display); font-weight:540; font-size:29px; line-height:1.16; letter-spacing:-.02em; margin:10px 0 14px; text-wrap:balance; }
.idea-note{ background:var(--surface-2); border-radius:var(--r-lg); padding:16px 18px; font-size:15px; color:var(--ink-2); line-height:1.6; }
.progress-line{ display:flex; gap:6px; margin:18px 0 4px; }
.progress-line i{ flex:1; height:6px; border-radius:3px; background:var(--surface-3); position:relative; overflow:hidden; }
.progress-line i::after{ content:""; position:absolute; inset:0; background:var(--navy); transform:scaleX(0); transform-origin:left; transition:transform .7s var(--ease-out); }
.progress-line i.on::after{ transform:scaleX(1); }
.step{ margin-top:14px; background:var(--surface); border-radius:var(--r-xl); padding:20px 16px 16px; }
.step-h{ display:flex; align-items:center; gap:12px; padding:0 4px 14px; }
.step-h .n{ width:30px; height:30px; border-radius:50%; background:var(--surface-2); display:grid; place-items:center; font-weight:700; font-size:14px; flex:none; transition:background .3s; }
.step-h .n.done{ background:var(--ok); color:#fff; }
.step-h .n.done svg{ width:16px; height:16px; stroke-width:3; }
.step-h h3{ font-family:var(--f-display); font-weight:580; font-size:20px; flex:1; }
.step-h small{ color:var(--ink-3); font-weight:600; font-size:13px; }
.opt{ display:flex; gap:12px; align-items:flex-start; width:100%; text-align:left; padding:14px; border-radius:var(--r-lg); background:var(--surface-2); margin-top:8px; position:relative; transition:background .25s, box-shadow .25s, transform .15s; }
.opt:active{ transform:scale(.985); }
.opt .rad{ width:24px; height:24px; border-radius:50%; flex:none; margin-top:1px; box-shadow:inset 0 0 0 2px var(--surface-3); display:grid; place-items:center; transition:all .25s var(--ease-spring); }
.opt .rad::after{ content:""; width:12px; height:12px; border-radius:50%; background:var(--dot); transform:scale(0); transition:transform .3s var(--ease-spring); }
.opt.on{ background:var(--surface); box-shadow:inset 0 0 0 2px var(--navy); }
.opt.on .rad{ box-shadow:inset 0 0 0 2px var(--navy); }
.opt.on .rad::after{ transform:scale(1); }
.opt .tx{ flex:1; min-width:0; line-height:1.45; }
.opt .tag{ display:block; font-size:12.5px; font-weight:650; color:var(--ink-3); margin-bottom:3px; }
.opt .acts{ display:flex; flex-direction:column; gap:2px; margin:-6px -6px -6px 0; }
.opt .mini{ width:38px; height:38px; display:grid; place-items:center; border-radius:50%; color:var(--ink-3); }
.opt .mini:active{ background:var(--surface-3); }
.opt .mini .i{ width:18px; height:18px; }
.doc{ background:var(--surface-2); border-radius:var(--r-lg); padding:16px; white-space:pre-wrap; line-height:1.65; font-size:15.5px; max-height:9.5em; overflow:hidden; position:relative; }
.doc::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:56px; background:linear-gradient(transparent, var(--surface-2)); }
.step-acts{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.step-acts .btn{ flex:1 1 auto; }
.locked-note{ color:var(--ink-3); font-size:14.5px; padding:4px 6px 6px; }
.stickybar{ position:sticky; bottom:calc(var(--nav-h) + var(--safe-b) + 6px); z-index:5; margin-top:18px; display:flex; gap:10px; }
.stickybar .btn{ flex:1; box-shadow:var(--shadow-float); white-space:nowrap; }
.stickybar .btn.soft{ flex:0 0 auto; }

/* ----- week ----- */
.daypager{ display:flex; overflow-x:auto; scroll-snap-type:x mandatory; margin:0 -20px; scrollbar-width:none; }
.daypager::-webkit-scrollbar{ display:none; }
.daypage{ flex:0 0 100%; scroll-snap-align:center; padding:0 20px; min-height:260px; }
.daytabs{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-top:6px; }
.dtab{ display:grid; justify-items:center; gap:2px; padding:10px 0; border-radius:var(--r-lg); font-size:12px; font-weight:600; color:var(--ink-3); background:var(--surface); transition:background .3s var(--ease-out), color .3s; }
.dtab b{ font-family:var(--f-display); font-size:19px; font-weight:580; color:var(--ink-2); }
.dtab .cnt{ height:6px; display:flex; gap:3px; margin-top:3px; }
.dtab .cnt i{ width:6px; height:6px; border-radius:50%; background:var(--surface-3); }
.dtab .cnt i.done{ background:var(--ok); }
.dtab.sel{ background:var(--navy); color:var(--on-navy-2); }
.dtab.sel b{ color:var(--on-navy); }
.dtab.sel .cnt i{ background:rgba(255,255,255,.3); } .dtab.sel .cnt i.done{ background:var(--dot); }
.dtab.istoday:not(.sel){ box-shadow:inset 0 0 0 2px var(--dot); }
.day-title{ display:flex; align-items:baseline; justify-content:space-between; margin:22px 2px 12px; }
.day-title h2{ font-family:var(--f-display); font-weight:580; font-size:24px; letter-spacing:-.015em; }
.addrow{ display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:60px; margin-top:10px; border-radius:var(--r-lg); box-shadow:inset 0 0 0 2px var(--surface-3); color:var(--ink-2); font-weight:650; transition:background .2s, transform .15s; background-image:none; border:0; }
.addrow:active{ background:var(--surface); transform:scale(.99); }
.picker-row{ display:flex; gap:12px; align-items:center; width:100%; text-align:left; padding:13px 14px; border-radius:var(--r-lg); background:var(--surface); margin-top:8px; }
.picker-row .grow{ min-width:0; }
.picker-row .t-tiny.trunc{ display:block; max-width:9.5ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-row .t-tiny.ell{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-row:active{ background:var(--surface-2); }
.daychips{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.daychips button{ display:grid; justify-items:center; padding:10px 0; border-radius:var(--r-md); background:var(--surface); font-weight:650; font-size:12.5px; color:var(--ink-3); }
.daychips button b{ font-family:var(--f-display); font-size:18px; color:var(--ink); }
.daychips button.on{ background:var(--navy); color:var(--on-navy-2); } .daychips button.on b{ color:var(--on-navy); }

/* ----- more / settings ----- */
.profile{ display:flex; align-items:center; gap:16px; padding:6px 2px 8px; }
.profile .avatar{ width:72px; height:72px; }
.group{ background:var(--surface); border-radius:var(--r-xl); overflow:hidden; }
.group + .group{ margin-top:14px; }
.li{ display:flex; align-items:center; gap:14px; width:100%; min-height:62px; padding:10px 18px; text-align:left; transition:background .15s; }
.li:active{ background:var(--surface-2); }
.li + .li{ box-shadow:inset 0 1px 0 var(--line); }
.li .ic{ width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--surface-2); flex:none; }
.li b{ display:block; font-weight:620; }
.li small{ display:block; color:var(--ink-3); font-size:13.5px; font-weight:500; line-height:1.3; }
.li .end{ color:var(--ink-3); display:flex; align-items:center; gap:8px; font-weight:600; font-size:14.5px; }
.stepper{ display:inline-flex; align-items:center; gap:6px; background:var(--surface-2); border-radius:var(--r-pill); padding:4px; }
.stepper button{ width:36px; height:36px; border-radius:50%; background:var(--surface); display:grid; place-items:center; }
.stepper output{ min-width:28px; text-align:center; font-weight:700; }
.field > .stepper{ display:flex; width:100%; justify-content:space-between; }
.field > .stepper output{ flex:1; font-size:17px; }
.field > .stepper button{ width:44px; height:44px; }
.status-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--ink-3); margin-right:6px; }
.status-dot.ok{ background:var(--ok); } .status-dot.warn{ background:var(--gold); } .status-dot.bad{ background:var(--danger); }
.guide-steps{ counter-reset:g; display:grid; gap:14px; }
.guide-steps li{ list-style:none; display:grid; grid-template-columns:34px 1fr; gap:12px; align-items:start; }
.guide-steps li::before{ counter-increment:g; content:counter(g); width:34px; height:34px; border-radius:50%; background:var(--navy); color:var(--on-navy); display:grid; place-items:center; font-weight:700; }
.guide-steps ul{ padding:0; margin:0; }
.note-box{ background:var(--gold-soft); border-radius:var(--r-lg); padding:14px 16px; font-size:14.5px; color:var(--ink-2); line-height:1.5; }
.rule-card{ background:var(--surface); border-radius:var(--r-xl); padding:20px; }
.rule-card h3{ font-family:var(--f-display); font-weight:580; font-size:20px; margin-bottom:10px; }
.rule-card ul{ margin:0; padding:0; list-style:none; display:grid; gap:10px; }
.rule-card li{ position:relative; padding-left:20px; line-height:1.5; font-size:15.5px; }
.rule-card li::before{ content:""; position:absolute; left:0; top:.6em; width:8px; height:8px; border-radius:50%; background:var(--navy); }
.rule-card.never li::before{ background:var(--dot); }
.rule-card li b{ font-weight:650; }

/* ----- teleprompter ----- */
.prompter{ position:fixed; inset:0; z-index:95; background:#05070C; color:#F6F7FA; display:flex; flex-direction:column; animation:scr-in .3s var(--ease-out); }
.prompter .pt-scroll{ flex:1; min-height:0; overflow-y:auto; scrollbar-width:none; padding:0 26px; -webkit-overflow-scrolling:touch; }
.prompter .pt-scroll::-webkit-scrollbar{ display:none; }
.prompter .pt-text{ padding:42vh 0 60vh; font-family:var(--f-ui); font-weight:650; line-height:1.38; letter-spacing:-.01em; white-space:pre-wrap; text-wrap:pretty; }
.prompter.mirror .pt-text{ transform:scaleX(-1); }
.prompter .pt-line{ position:absolute; left:0; right:0; top:42vh; height:0; border-top:2px dashed rgba(234,78,39,.7); pointer-events:none; }
.prompter .pt-line::before{ content:""; position:absolute; left:10px; top:-9px; border:8px solid transparent; border-left-color:var(--dot); }
.prompter .pt-fade{ position:absolute; left:0; right:0; height:30vh; pointer-events:none; }
.prompter .pt-fade.t{ top:0; background:linear-gradient(#05070C 18%, transparent); }
.prompter .pt-top{ position:absolute; top:0; left:0; right:0; display:flex; justify-content:space-between; padding:calc(var(--safe-t) + 12px) 14px 0; z-index:2; }
.prompter .pt-top .iconbtn{ background:rgba(255,255,255,.12); color:#fff; backdrop-filter:blur(10px); }
.prompter .pt-bar{ position:relative; z-index:2; display:flex; align-items:center; gap:12px; padding:12px 16px calc(14px + var(--safe-b)); background:rgba(255,255,255,.06); backdrop-filter:blur(16px); }
/* bottom fade is attached to the top edge of the control bar, so it always meets it, whatever the bar's height or the device safe area */
.prompter .pt-bar::before{ content:""; position:absolute; left:0; right:0; bottom:100%; height:20vh; background:linear-gradient(transparent, #05070C 80%); pointer-events:none; }
.prompter .pt-bar .iconbtn{ background:rgba(255,255,255,.12); color:#fff; }
.prompter .pt-play{ width:62px; height:62px; background:var(--dot); color:#fff; }
.prompter .pt-rng{ flex:1; display:grid; gap:2px; font-size:12px; color:#9AA5BB; font-weight:600; }
.prompter input[type=range]{ width:100%; accent-color:var(--dot); height:28px; }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; animation-delay:0s !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
.prompter .pt-bar .pt-play{ background:var(--dot); color:#fff; }
