/* ════════════════════════════════════════════════════════════════════
   SymposiON — Home Revamp · STUDENT layer
   First-visit onboarding · Homework inbox · Guide (assistant) mode.
   Token-driven; matches the Synthesis language.
   ════════════════════════════════════════════════════════════════════ */

/* ── ONBOARDING overlay ─────────────────────────────────────────── */
.ob-ov { position:fixed; inset:0; z-index:9000; display:grid; place-items:center; padding:20px;
  background:color-mix(in srgb, var(--bg) 72%, #000 28%); backdrop-filter:blur(7px);
  opacity:0; transition:opacity .28s ease; overflow:auto; }
.ob-ov.in { opacity:1; }
.ob-card { position:relative; width:min(560px,100%); background:var(--card); color:var(--fg);
  border:1px solid var(--line-bold); border-radius:24px; box-shadow:0 40px 100px rgba(0,0,0,.5);
  padding:clamp(22px,4vw,40px); transform:translateY(14px) scale(.98); transition:transform .3s cubic-bezier(.2,.7,.2,1); }
.ob-ov.in .ob-card { transform:none; }
.ob-skip { position:absolute; top:16px; right:18px; background:none; border:0; color:var(--muted);
  font-family:var(--sans); font-weight:600; font-size:13px; cursor:pointer; padding:6px; }
.ob-skip:hover { color:var(--fg); }
.ob-mark { width:42px; height:42px; color:var(--fg); margin-bottom:14px; }
.ob-mark svg { width:100%; height:100%; }
.ob-eyebrow { font-family:var(--disp); font-weight:500; letter-spacing:.22em; text-transform:uppercase;
  font-size:11px; color:var(--terra); margin:0 0 8px; }
.ob-ttl { font-family:var(--serif); font-weight:800; font-size:clamp(24px,4vw,32px); line-height:1.1; margin:0 0 8px; }
.ob-ttl em { font-style:italic; color:var(--terra-dk); }
.ob-sub { margin:0 0 22px; color:var(--fg-70); font-size:14.5px; line-height:1.55; }
.ob-dots { display:flex; gap:7px; margin-bottom:20px; }
.ob-dots span { width:26px; height:4px; border-radius:999px; background:var(--line-bold); transition:background .2s; }
.ob-dots span.on { background:var(--terra); }

/* role / generic choice cards */
.ob-roles { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ob-role { display:flex; flex-direction:column; align-items:flex-start; gap:8px; text-align:left;
  padding:18px; border-radius:16px; border:1.5px solid var(--line-bold); background:var(--bg); cursor:pointer;
  transition:border-color .16s, transform .16s, box-shadow .16s; min-height:44px; }
.ob-role:hover { border-color:var(--terra); transform:translateY(-2px); box-shadow:0 12px 26px var(--shadow); }
.ob-role.sel { border-color:var(--terra); background:var(--terra-soft); }
.ob-role__ic { width:34px; height:34px; color:var(--terra-dk); } .ob-role__ic svg { width:100%; height:100%; }
.ob-role__nm { font-family:var(--sans); font-weight:800; font-size:16px; }
.ob-role__ds { font-size:12.5px; color:var(--fg-70); line-height:1.4; }
.ob-role--soon { opacity:.55; cursor:not-allowed; }
.ob-role--soon:hover { transform:none; border-color:var(--line-bold); box-shadow:none; }
.ob-soon { font-family:var(--disp); font-weight:600; font-size:9.5px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--gold); background:var(--gold-soft); padding:2px 8px; border-radius:999px; }

/* grade groups */
.ob-gradegrp { margin-bottom:14px; }
.ob-gradegrp__h { font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--muted); margin:0 0 9px; }
.ob-grades { display:flex; flex-wrap:wrap; gap:9px; }
.ob-grade { display:inline-flex; align-items:center; gap:9px; padding:9px 15px 9px 9px; border-radius:999px;
  border:2px solid var(--line-bold); background:var(--bg); color:var(--fg); cursor:pointer; font-family:var(--sans);
  font-weight:700; font-size:13.5px; transition:.16s; min-height:44px; }
.ob-grade:hover { transform:translateY(-2px); }
.ob-grade__rom { display:grid; place-items:center; width:26px; height:26px; border-radius:50%;
  font-family:var(--disp); font-weight:600; font-size:12px; color:#fff; }
.ob-grade.sel { color:#fff; }

/* finish */
.ob-guide-row { display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:14px;
  background:var(--bg); border:1px solid var(--line); margin-bottom:20px; }
.ob-guide-row__b { flex:1; } .ob-guide-row__t { font-weight:700; font-size:14px; }
.ob-guide-row__d { font-size:12.5px; color:var(--fg-70); margin-top:2px; }
.ob-switch { flex:none; width:50px; height:28px; border-radius:999px; border:0; background:var(--line-bold);
  position:relative; cursor:pointer; transition:background .18s; }
.ob-switch::after { content:''; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%;
  background:#fff; transition:transform .2s cubic-bezier(.2,.7,.2,1); box-shadow:0 2px 5px rgba(0,0,0,.3); }
.ob-switch.on { background:var(--terra); } .ob-switch.on::after { transform:translateX(22px); }
.ob-foot { display:flex; gap:12px; justify-content:flex-end; align-items:center; }
.ob-back { background:none; border:0; color:var(--muted); font-family:var(--sans); font-weight:600;
  font-size:14px; cursor:pointer; margin-right:auto; padding:8px; }
.ob-back:hover { color:var(--fg); }

@media (max-width:480px){
  .ob-roles { grid-template-columns:1fr; }
}

/* ── HOMEWORK INBOX ─────────────────────────────────────────────── */
.hw-fil { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.hw-list { display:flex; flex-direction:column; gap:12px; }
.hw-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:16px;
  background:var(--card); border:1px solid var(--line); border-left:4px solid var(--ca,var(--terra));
  border-radius:16px; padding:16px 18px; transition:border-color .16s, box-shadow .16s, transform .16s; }
.hw-card:hover { box-shadow:0 12px 28px var(--shadow); transform:translateY(-2px); }
.hw-card.done { opacity:.62; }
.hw-card.done .hw-card__ttl { text-decoration:line-through; text-decoration-color:var(--muted); }
.hw-card__ic { display:grid; place-items:center; width:48px; height:48px; border-radius:13px;
  background:var(--ca-soft,var(--terra-soft)); color:var(--ca-ink,var(--terra-dk)); }
.hw-card__ic .sc-gl, .hw-card__ic [data-illu] { width:28px; height:28px; } .hw-card__ic svg { width:100%; height:100%; }
.hw-card__b { min-width:0; }
.hw-card__meta { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; margin-bottom:3px; }
.hw-card__subj { font-family:var(--disp); font-weight:600; font-size:10.5px; letter-spacing:.13em;
  text-transform:uppercase; color:var(--ca-ink,var(--terra-dk)); }
.hw-card__from { font-size:11.5px; color:var(--muted); }
.hw-card__ttl { font-family:var(--sans); font-weight:700; font-size:16px; line-height:1.25; margin:0 0 8px;
  overflow-wrap:anywhere; }
.hw-card__bar { height:6px; border-radius:999px; background:var(--sink); overflow:hidden; max-width:240px; }
.hw-card__barf { display:block; height:100%; border-radius:999px; background:var(--ca,var(--terra)); }
.hw-card__r { display:flex; flex-direction:column; align-items:flex-end; gap:9px; flex:none; }
.hw-due { font-family:var(--disp); font-weight:500; font-size:12px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); white-space:nowrap; }
.hw-due--soon { color:var(--terra-dk); } .hw-due--over { color:#C2553A; }
.hw-badge { font-family:var(--disp); font-weight:600; font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  padding:4px 10px; border-radius:999px; white-space:nowrap; }
.hw-badge--todo { background:var(--terra-soft); color:var(--terra-dk); }
.hw-badge--done { background:color-mix(in srgb,var(--sage) 18%,transparent); color:var(--sage); }
.hw-badge--over { background:color-mix(in srgb,#C2553A 16%,transparent); color:#C2553A; }
.hw-go { font-family:var(--sans); font-weight:700; font-size:13px; padding:10px 18px; border-radius:999px;
  border:0; cursor:pointer; background:var(--ca,var(--terra-dk)); color:#fff; min-height:44px; white-space:nowrap; }
.hw-go:hover { filter:brightness(1.06); }
.hw-go--undo { background:var(--sink); color:var(--fg); }
/* empty state */
.hw-empty { text-align:center; padding:60px 24px; border:1.5px dashed var(--line-bold); border-radius:20px; }
.hw-empty__ic { width:64px; height:64px; margin:0 auto 16px; color:var(--sage); opacity:.7; }
.hw-empty__ic svg { width:100%; height:100%; }
.hw-empty__t { font-family:var(--serif); font-weight:700; font-size:20px; margin:0 0 6px; }
.hw-empty__d { color:var(--fg-70); font-size:14px; margin:0 auto; max-width:36ch; line-height:1.55; }

@media (max-width:600px){
  .hw-card { grid-template-columns:auto 1fr; }
  .hw-card__r { grid-column:1 / -1; flex-direction:row; align-items:center; justify-content:space-between; width:100%; }
  .hw-card__bar { max-width:none; }
}

/* ── GUIDE (assistant) mode ─────────────────────────────────────── */
.guide-fab { position:fixed; right:18px; bottom:18px; z-index:8000; display:inline-flex; align-items:center; gap:8px;
  height:50px; padding:0 18px 0 14px; border-radius:999px; border:1px solid var(--line-bold); cursor:pointer;
  background:var(--card); color:var(--fg); box-shadow:0 14px 34px var(--shadow); font-family:var(--sans);
  font-weight:700; font-size:14px; transition:transform .16s, border-color .16s; }
.guide-fab:hover { transform:translateY(-2px); border-color:var(--terra); }
.guide-fab.on { background:var(--terra-dk); color:#fff; border-color:var(--terra-dk); }
.guide-fab__q { display:grid; place-items:center; width:26px; height:26px; border-radius:50%;
  background:var(--terra-soft); color:var(--terra-dk); font-family:var(--serif); font-weight:800; font-size:15px; }
.guide-fab.on .guide-fab__q { background:rgba(255,255,255,.22); color:#fff; }
.guide-tip { position:fixed; right:18px; bottom:80px; z-index:8000; width:min(320px,calc(100vw - 36px));
  background:var(--card); color:var(--fg); border:1px solid var(--line-bold); border-radius:18px; box-shadow:0 24px 56px var(--shadow);
  padding:16px 18px; transform:translateY(10px); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; }
.guide-tip.show { transform:none; opacity:1; pointer-events:auto; }
.guide-tip__hd { display:flex; align-items:center; gap:9px; margin-bottom:8px; }
.guide-tip__dot { width:9px; height:9px; border-radius:50%; background:var(--terra); flex:none; }
.guide-tip__where { font-family:var(--disp); font-weight:600; font-size:10.5px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--muted); flex:1; }
.guide-tip__x { background:none; border:0; color:var(--muted); font-size:18px; cursor:pointer; line-height:1; padding:0 2px; }
.guide-tip__x:hover { color:var(--fg); }
.guide-tip__t { font-family:var(--serif); font-weight:700; font-size:16px; margin:0 0 5px; }
.guide-tip__d { font-size:13.5px; line-height:1.5; color:var(--fg-70); margin:0 0 12px; }
.guide-tip__foot { display:flex; align-items:center; gap:10px; }
.guide-tip__go { font-family:var(--sans); font-weight:700; font-size:12.5px; padding:8px 14px; border-radius:999px;
  border:0; cursor:pointer; background:var(--terra-dk); color:#fff; }
.guide-tip__off { font-family:var(--sans); font-weight:600; font-size:12.5px; color:var(--muted);
  background:none; border:0; cursor:pointer; margin-left:auto; }
.guide-tip__off:hover { color:var(--fg); }
@media (max-width:560px){
  .guide-fab span.guide-fab__lbl { display:none; }
  .guide-fab { padding:0 12px; }
}
/* on desktop the nav instructor avatar is the toggle; keep the FAB only where the nav collapses */
@media (min-width:941px){ .guide-fab { display:none; } }

/* ── NAV INSTRUCTOR / GUIDE AVATAR ──────────────────────────────── */
.syn-mentor-wrap { position:relative; flex:none; }
.syn-mentor { position:relative; display:grid; place-items:center; width:40px; height:40px; padding:0; border-radius:50%;
  background:var(--gold-soft); border:2px solid color-mix(in srgb,var(--gold) 55%, transparent); cursor:pointer; transition:transform .18s, border-color .18s, box-shadow .18s; }
.syn-mentor:hover { transform:translateY(-1px); border-color:var(--gold); }
.syn-mentor__av { width:23px; height:23px; color:var(--terra-dk); } .syn-mentor__av svg { width:100%; height:100%; }
.syn-mentor__dot { position:absolute; right:-1px; bottom:-1px; width:12px; height:12px; border-radius:50%;
  background:var(--muted); border:2px solid var(--card); }
.syn-mentor.on { background:var(--terra-soft); border-color:var(--terra); }
.syn-mentor.on .syn-mentor__dot { background:var(--sage); }
@media (prefers-reduced-motion: no-preference){ .syn-mentor.on { animation:syn-mentor-pulse 2.4s ease-in-out infinite; } }
@keyframes syn-mentor-pulse { 0%,100%{ box-shadow:0 0 0 0 color-mix(in srgb,var(--terra) 32%,transparent); } 50%{ box-shadow:0 0 0 7px color-mix(in srgb,var(--terra) 7%,transparent); } }

.syn-mentor__pop { position:absolute; top:calc(100% + 12px); right:0; width:290px; z-index:80;
  background:var(--card); color:var(--fg); border:1px solid var(--line-bold); border-radius:16px; padding:15px 16px;
  box-shadow:0 24px 56px var(--shadow); opacity:0; transform:translateY(-6px); pointer-events:none; transition:opacity .16s, transform .16s; }
.syn-mentor-wrap:hover .syn-mentor__pop, .syn-mentor:focus-visible ~ .syn-mentor__pop { opacity:1; transform:none; pointer-events:auto; }
.syn-mentor__pop::before { content:''; position:absolute; top:-6px; right:15px; width:12px; height:12px; background:var(--card);
  border-left:1px solid var(--line-bold); border-top:1px solid var(--line-bold); transform:rotate(45deg); }
.syn-mentor__phd { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.syn-mentor__pav { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--gold-soft); color:var(--terra-dk); flex:none; }
.syn-mentor__pav svg { width:20px; height:20px; }
.syn-mentor__pname { font-family:var(--sans); font-weight:800; font-size:13.5px; }
.syn-mentor__pstate { font-family:var(--disp); font-weight:500; font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.syn-mentor__pstate.on { color:var(--sage); }
.syn-mentor__pt { font-family:var(--serif); font-weight:700; font-size:16px; margin-bottom:4px; }
.syn-mentor__pd { font-size:13px; line-height:1.5; color:var(--fg-70); margin-bottom:10px; }
.syn-mentor__pmore { margin:0 0 12px; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.syn-mentor__pmore li { position:relative; padding-left:15px; font-size:12.5px; line-height:1.4; color:var(--fg-70); }
.syn-mentor__pmore li::before { content:'›'; position:absolute; left:2px; color:var(--terra); font-weight:700; }
.syn-mentor__ptoggle { width:100%; font-family:var(--sans); font-weight:700; font-size:13px; padding:10px; border-radius:11px;
  border:1px solid var(--line-bold); background:var(--bg); color:var(--fg); cursor:pointer; min-height:42px; transition:.16s; }
.syn-mentor__ptoggle:hover { border-color:var(--terra); }
.syn-mentor__ptoggle.on { background:var(--terra-dk); color:#fff; border-color:var(--terra-dk); }
/* "what is this" — orientation over the main parts of the site */
.syn-mentor__plbl { font-family:var(--disp); font-weight:600; font-size:9.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin:12px 0 6px; }
.syn-mentor__parts { display:flex; flex-direction:column; gap:2px; margin-bottom:12px; }
.syn-mentor__part { display:flex; flex-direction:column; gap:1px; text-align:left; padding:7px 9px; border:0; background:none; border-radius:9px; cursor:pointer; transition:background .14s; }
.syn-mentor__part:hover { background:var(--sink); }
.syn-mentor__part.here { background:var(--terra-soft); }
.syn-mentor__partn { font-family:var(--sans); font-weight:700; font-size:12.5px; color:var(--fg); }
.syn-mentor__partd { font-size:11px; color:var(--fg-70); line-height:1.35; }
/* in the mobile drawer the avatar still toggles, but the hover popover is suppressed (no hover on touch) */
@media (max-width:940px){ .syn-mentor__pop { display:none; } .syn-mentor-wrap { align-self:flex-start; } }

/* ── PARENT DASHBOARD ───────────────────────────────────────────── */
.par-child { display:flex; align-items:center; gap:16px; background:var(--card); border:1px solid var(--line);
  border-left:4px solid var(--ca,var(--terra)); border-radius:16px; padding:16px 18px; margin-bottom:6px; }
.par-child__av { display:grid; place-items:center; width:52px; height:52px; border-radius:14px;
  background:var(--ca-soft,var(--terra-soft)); color:var(--ca-ink,var(--terra-dk)); flex:none; }
.par-child__av svg { width:30px; height:30px; }
.par-child__b { flex:1; min-width:0; }
.par-child__n { font-family:var(--serif); font-weight:700; font-size:20px; line-height:1.1; }
.par-child__m { font-size:13px; color:var(--muted); margin-top:2px; }
.par-switch { flex:none; font-family:var(--sans); font-weight:600; font-size:13px; padding:9px 15px;
  border-radius:999px; border:1px solid var(--line-bold); background:var(--bg); color:var(--fg); cursor:pointer; min-height:40px; }
.par-switch:hover { border-color:var(--ca,var(--terra)); color:var(--ca-ink,var(--terra-dk)); }

.par-mastery { display:flex; flex-direction:column; gap:12px; margin-bottom:8px; }
.par-mrow { display:grid; grid-template-columns:130px 1fr 46px; align-items:center; gap:14px; }
.par-mrow__s { font-family:var(--sans); font-weight:700; font-size:13.5px; }
.par-mrow__bar { height:9px; border-radius:999px; background:var(--sink); overflow:hidden; }
.par-mrow__f { display:block; height:100%; border-radius:999px; }
.par-mrow__v { font-family:var(--disp); font-weight:600; font-size:13px; color:var(--muted); text-align:right; }

.par-hw { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; }
.par-hwrow { display:flex; align-items:center; gap:12px; background:var(--card); border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; }
.par-hwrow__dot { width:9px; height:9px; border-radius:50%; flex:none; }
.par-hwrow__t { flex:1; min-width:0; font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.par-remind { flex:none; font-family:var(--sans); font-weight:600; font-size:12px; padding:7px 13px; border-radius:999px;
  border:1px solid var(--line-bold); background:var(--bg); color:var(--fg); cursor:pointer; min-height:36px; }
.par-remind:hover { border-color:var(--terra); color:var(--terra-dk); }
.par-remind:disabled { opacity:.7; cursor:default; }
.par-remind--ok { border:0; background:none; color:var(--sage); font-size:15px; }

.par-bill { display:flex; align-items:center; gap:16px; background:var(--card); border:1px solid var(--line);
  border-left:4px solid var(--ca,var(--terra)); border-radius:16px; padding:18px; }
.par-bill__b { flex:1; min-width:0; }
.par-bill__plan { font-family:var(--serif); font-weight:700; font-size:18px; }
.par-bill__m { font-size:13px; color:var(--fg-70); margin-top:3px; line-height:1.45; }

@media (max-width:600px){
  .par-mrow { grid-template-columns:96px 1fr 40px; gap:10px; }
  .par-mrow__s { font-size:12.5px; }
  .par-bill { flex-direction:column; align-items:stretch; }
  .par-hwrow__t { white-space:normal; }
}

/* ── CONSENT / AGE-GATE / COOKIES ───────────────────────────────── */
.cg-year { width:100%; font-family:var(--sans); font-weight:600; font-size:15px; padding:13px 15px;
  border-radius:14px; border:1.5px solid var(--line-bold); background:var(--bg); color:var(--fg); margin-bottom:18px; }
.cg-year:focus { outline:none; border-color:var(--terra); }
.cg-err { border-color:#C2553A; }
.cg-sent { font-size:13px; color:var(--sage); margin:-8px 0 16px; }
.cg-check { display:flex; align-items:flex-start; gap:11px; padding:11px 0; font-size:14px; line-height:1.45; cursor:pointer; }
.cg-check input { width:20px; height:20px; margin-top:1px; accent-color:var(--terra-dk); flex:none; cursor:pointer; }
.cg-link { color:var(--terra-dk); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.cg-link:hover { color:var(--terra); }
.cg-legal { max-height:46vh; overflow:auto; margin-bottom:18px; }
.cg-legal h4 { font-family:var(--disp); font-weight:600; font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--terra); margin:16px 0 5px; }
.cg-legal p { margin:0; font-size:14px; line-height:1.6; color:var(--fg-70); }
.cg-legal__note { font-style:italic; color:var(--muted); margin-top:18px !important; font-size:12.5px !important; }

/* While the cookie banner is visible, reserve space at the bottom of the page so
   the fixed bar never covers page content (e.g. the home primary CTA / first card).
   The class is toggled by consent.js and removed when the banner is dismissed. */
body.ck-bar-open { padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px)); }
@media (max-width:560px){
  body.ck-bar-open { padding-bottom: calc(260px + env(safe-area-inset-bottom, 0px)); }
}

.ck-bar { position:fixed; left:16px; right:16px; bottom:16px; z-index:7500; display:flex; align-items:center; gap:18px;
  flex-wrap:wrap; background:var(--card); border:1px solid var(--line-bold); border-radius:18px; padding:16px 20px;
  box-shadow:0 24px 60px var(--shadow); transform:translateY(20px); opacity:0; transition:opacity .25s, transform .25s; }
.ck-bar.in { transform:none; opacity:1; }
.ck-bar__t { flex:1; min-width:240px; font-size:13.5px; line-height:1.5; color:var(--fg-70); }
.ck-bar__t b { color:var(--fg); }
.ck-bar__btns { display:flex; gap:10px; flex:none; }
.ck-btn { font-family:var(--sans); font-weight:700; font-size:13px; padding:11px 18px; border-radius:999px;
  cursor:pointer; border:1px solid var(--line-bold); min-height:44px; }
.ck-btn--ghost { background:var(--bg); color:var(--fg); }
.ck-btn--ghost:hover { border-color:var(--terra); }
.ck-btn--solid { background:var(--terra-dk); color:#fff; border-color:var(--terra-dk); }
.ck-btn--solid:hover { filter:brightness(1.07); }
@media (max-width:560px){
  .ck-bar { flex-direction:column; align-items:stretch; gap:12px; }
  .ck-bar__btns { justify-content:stretch; } .ck-btn { flex:1; }
}

/* ════════════════════════════════════════════════════════════════
   SymposiON · Level-Up Banner  (Grand variant)
   Reskinned onto the live Synthesis theme tokens (--disp/--serif/--sans
   for type; --gold/--fg/--card/--muted for colour) so the banner follows
   the active theme instead of a hardcoded dark-bronze. Fallbacks inside
   each var() keep it legible if a token is ever missing. Driven by
   showLevelUp() in js/progression.js.
   ════════════════════════════════════════════════════════════════ */
#lvlup {
  position: fixed; inset: 0; z-index: 9200;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* ── Dimming backdrop ── */
.lu-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 44%, rgba(40,26,12,0) 0%, rgba(8,5,2,0) 100%);
  transition: background .5s ease;
}
#lvlup.is-in  .lu-backdrop {
  background: radial-gradient(ellipse at 50% 44%, rgba(40,26,12,0.72) 0%, rgba(8,5,2,0.86) 100%);
}
#lvlup.is-out .lu-backdrop { background: rgba(8,5,2,0); transition: background .55s ease; }

/* ── Card ── */
.lu-card {
  position: relative;
  width: min(420px, 90vw);
  padding: 3.2rem 3rem 2.4rem;
  text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 6%, var(--card)) 0%, var(--card) 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.85), 0 0 0 1px rgba(0,0,0,0.4);
  transform: translateY(34px) scale(0.92);
  opacity: 0;
  transition: transform .62s cubic-bezier(0.16,1,0.3,1), opacity .42s ease;
}
#lvlup.is-in  .lu-card { transform: translateY(0) scale(1); opacity: 1; }
#lvlup.is-out .lu-card {
  transform: translateY(-20px) scale(0.97); opacity: 0;
  transition: transform .5s ease, opacity .4s ease;
}

/* corner ticks — SymposiON frame motif */
.lu-card::before, .lu-card::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--gold, #C4A448); opacity: .6;
}
.lu-card::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.lu-card::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.lu-glow {
  position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 130%; height: 90%; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(196,164,72,0.16), transparent 62%);
}

/* ── Emblem: ray burst + laurel disc ── */
.lu-emblem {
  position: relative; width: 116px; height: 116px;
  margin: 0 auto 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.lu-rays {
  position: absolute; inset: -34px; pointer-events: none; opacity: 0;
  background:
    conic-gradient(from 0deg,
      var(--gold,#C4A448) 0 3deg, transparent 3deg 30deg,
      var(--gold,#C4A448) 30deg 33deg, transparent 33deg 60deg,
      var(--gold,#C4A448) 60deg 63deg, transparent 63deg 90deg,
      var(--gold,#C4A448) 90deg 93deg, transparent 93deg 120deg,
      var(--gold,#C4A448) 120deg 123deg, transparent 123deg 150deg,
      var(--gold,#C4A448) 150deg 153deg, transparent 153deg 180deg,
      var(--gold,#C4A448) 180deg 183deg, transparent 183deg 210deg,
      var(--gold,#C4A448) 210deg 213deg, transparent 213deg 240deg,
      var(--gold,#C4A448) 240deg 243deg, transparent 243deg 270deg,
      var(--gold,#C4A448) 270deg 273deg, transparent 273deg 300deg,
      var(--gold,#C4A448) 300deg 303deg, transparent 303deg 330deg,
      var(--gold,#C4A448) 330deg 333deg, transparent 333deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 40%, #000 42%, #000 72%, transparent 76%);
          mask: radial-gradient(circle, transparent 40%, #000 42%, #000 72%, transparent 76%);
}
#lvlup.is-in .lu-rays { animation: lu-rays 1.1s .15s ease-out both; }
@keyframes lu-rays {
  0%   { opacity: 0; transform: scale(.4) rotate(0deg); }
  35%  { opacity: .9; }
  100% { opacity: 0; transform: scale(1.55) rotate(46deg); }
}

.lu-disc {
  position: relative; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #2E2113, #1B130A);
  border: 1px solid rgba(196,164,72,0.28);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,235,180,0.08), 0 6px 18px rgba(0,0,0,0.5);
}
.lu-disc svg { width: 52px; height: 52px; color: var(--gold, #C4A448); }
#lvlup.is-in .lu-disc { animation: lu-stamp .6s .1s cubic-bezier(.2,1.4,.3,1) both; }
@keyframes lu-stamp {
  0%   { transform: scale(2.1) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(.95) rotate(2deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* ── Text block ── */
.lu-eyebrow {
  font-family: var(--disp, 'Cinzel', serif); font-weight: 600;
  font-size: 12px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--gold, #C4A448); margin-bottom: 0.2rem;
}
.lu-eyebrow .en {
  display: block; font-family: var(--sans, 'Inter', sans-serif); font-weight: 500;
  font-size: 9.5px; letter-spacing: 3.5px; color: var(--muted, #867660); margin-top: 4px;
}
.lu-line {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0.7rem 0 0.1rem;
}
.lu-line .rule { width: 26px; height: 1px; background: rgba(196,164,72,0.20); }
.lu-line .dot  { width: 4px; height: 4px; background: var(--gold,#C4A448); transform: rotate(45deg); }
.lu-number {
  font-family: var(--serif, 'Cormorant Garamond', serif); font-weight: 300;
  font-size: clamp(82px, 16vw, 116px); line-height: 0.9; letter-spacing: -4px;
  color: var(--fg, #F6F2EB);
  text-shadow: 0 2px 30px rgba(196,164,72,0.25);
}
.lu-title {
  font-family: var(--serif, 'Cormorant Garamond', serif); font-style: italic; font-weight: 500;
  font-size: 24px; color: var(--gold, #C4A448); margin-top: 0.1rem;
}
.lu-title .gr { font-style: normal; }
.lu-flavor {
  font-size: 12.5px; color: var(--muted, #867660); line-height: 1.5; margin-top: 0.5rem;
}

/* ── Reward chips ── */
.lu-rewards { display: flex; justify-content: center; gap: 10px; margin: 1.5rem 0 0.4rem; }
.lu-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  background: rgba(196,164,72,0.06);
  border: 1px solid rgba(196,164,72,0.20);
  font-size: 13px; font-weight: 600; color: var(--fg, #F0EBE0);
  opacity: 0; transform: translateY(10px);
}
#lvlup.is-in .lu-chip { animation: lu-chip .5s cubic-bezier(0.16,1,0.3,1) both; }
#lvlup.is-in .lu-chip:nth-child(1) { animation-delay: .42s; }
#lvlup.is-in .lu-chip:nth-child(2) { animation-delay: .54s; }
@keyframes lu-chip { to { opacity: 1; transform: translateY(0); } }
.lu-chip .ic { color: var(--gold,#C4A448); display: flex; }
.lu-chip .ic svg { width: 15px; height: 15px; }
.lu-chip b { color: var(--gold, #C4A448); }

.lu-hint {
  margin-top: 1.5rem; font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted, #867660);
  opacity: 0; transition: opacity .4s ease .8s;
}
#lvlup.is-in .lu-hint { opacity: .75; }

/* ── Confetti / pottery shards ── */
.lu-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lu-bit { position: absolute; top: 38%; width: 7px; height: 10px; opacity: 0; }
#lvlup.is-in .lu-bit { animation: lu-rise 1.25s ease-out forwards; }
@keyframes lu-rise {
  0%   { opacity: 0; transform: translateY(0) rotate(0); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-220px) rotate(300deg); }
}

/* ── Reduced motion: skip burst/stamp/confetti, keep a clean fade ── */
@media (prefers-reduced-motion: reduce) {
  .lu-card, .lu-rays, .lu-disc, .lu-chip, .lu-bit { animation: none !important; }
  .lu-card  { transform: none !important; opacity: 1; transition: opacity .35s ease !important; }
  #lvlup .lu-chip { opacity: 1; transform: none; }
  #lvlup .lu-hint { opacity: .75; }
  .lu-rays, .lu-bit { display: none; }
}
