/* Webinar Hub — Xuân Hiếu tokens (tokens.json v0.10.0): Graphite Luxe dark by default, Light Authority light.
   Theme is set on <html data-theme="dark|light">; "auto" resolves to one of them in the head script. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080A; --surface: #111317; --surface-2: #16191E; --surface-hover: #1A1D22;
  --text: #F4F5F7; --text-strong: #F4F5F7; --text-muted: #A7ADB7; --text-faint: #626A76; --heading-2: #C6CED9;
  --primary: #9DCDFF; --primary-strong: #C4E2FF;
  --gold: #C9A46A; --warm-text: #E2C799;
  --danger: #FFAAA5; --positive: #8AD9B6;
  --border: #22262C; --border-strong: #626A76; --border-input: #6B7380; --focus: #9DCDFF;
  --btn-bg: #F4F5F7; --btn-fg: #07080A; --btn-hover: #DADDE2;
  --btn2-bg: #111317; --btn2-fg: #F4F5F7; --btn2-hover: #1A1D22;
  --glass: rgba(255, 255, 255, .045); --glass-border: rgba(255, 255, 255, .09); --glass-hi: rgba(255, 255, 255, .16);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04), 0 20px 48px rgba(0, 0, 0, .55);
  --shadow-glass: 0 24px 60px rgba(0, 0, 0, .55);
  --scrim: rgba(7, 8, 10, .78);
  --sticky-bg: rgba(17, 19, 23, .94);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F8FAFD; --surface: #FFFFFF; --surface-2: #DCEBFA; --surface-hover: #DCEBFA;
  --text: #10233A; --text-strong: #10233A; --text-muted: #52647A; --text-faint: #6E7E94; --heading-2: #123A63;
  --primary: #1258A8; --primary-strong: #0D467E;
  --gold: #C59B62; --warm-text: #73511C;
  --danger: #B42318; --positive: #1B6B49;
  --border: #CAD6E4; --border-strong: #6E7E94; --border-input: #6E7E94; --focus: #1258A8;
  --btn-bg: #1258A8; --btn-fg: #FFFFFF; --btn-hover: #0D467E;
  --btn2-bg: #FFFFFF; --btn2-fg: #1258A8; --btn2-hover: #DCEBFA;
  --glass: rgba(255, 255, 255, .72); --glass-border: rgba(16, 35, 58, .10); --glass-hi: rgba(255, 255, 255, .95);
  --shadow-card: 0 8px 28px rgba(8, 21, 37, .07);
  --shadow-glass: 0 12px 40px rgba(16, 35, 58, .10);
  --scrim: rgba(8, 21, 37, .6);
  --sticky-bg: rgba(255, 255, 255, .94);
}
:root {
  --r-sm: 8px; --r-ctl: 12px; --r-card: 16px; --r-feature: 24px; --r-bento: 28px; --r-full: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --dur-1: 150ms; --dur-2: 250ms; --dur-3: 350ms;
  --z-sticky: 50; --z-toast: 90;
  --fs-cap: 13px; --fs-label: 14px; --fs-btn: 15px; --fs-body: 16px; --fs-h4: 20px;
  --fs-h3: clamp(22px, 2vw, 28px); --fs-h2: clamp(26px, 2.6vw, 40px); --fs-hero: clamp(38px, 4.1vw, 64px);
  --sans: "Be Vietnam Pro", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", SFMono-Regular, Consolas, monospace;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-body)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 17px; line-height: 1.72; } }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; color: var(--text-strong); }
h1 { font-size: var(--fs-hero); line-height: 1.13; font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; font-weight: 700; letter-spacing: -.022em; }
h3 { font-size: var(--fs-h3); line-height: 1.28; font-weight: 700; letter-spacing: -.016em; }
h4 { font-size: var(--fs-h4); line-height: 1.35; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-strong); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s4); }
@media (min-width: 640px) { .wrap { padding-inline: var(--s6); } }
@media (min-width: 1024px) { .wrap { padding-inline: var(--s10); } }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-label); }
.cap { font-size: var(--fs-cap); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: -60px; background: var(--surface); padding: var(--s2) var(--s3); border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: var(--s2); }
mark.ph { background: transparent; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 0 4px; font-weight: 500; font-size: .92em; }
.mono { font-family: var(--mono); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2); width: fit-content;
  font: 700 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--heading-2);
}
.eyebrow.is-live { color: var(--danger); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot.gold { background: var(--gold); }
.is-live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s6); border-radius: var(--r-ctl); border: 1px solid transparent;
  font-size: var(--fs-btn); font-weight: 600; line-height: 1.35; text-decoration: none; cursor: pointer;
  transition: background var(--dur-1), border-color var(--dur-1);
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-hover); color: var(--btn-fg); text-decoration: underline; }
.btn-lg { min-height: 52px; font-size: 16px; padding-inline: var(--s8); }
.btn-secondary { background: var(--btn2-bg); color: var(--btn2-fg); border-color: var(--border-input); min-height: 44px; }
.btn-secondary:hover { background: var(--btn2-hover); color: var(--btn2-fg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-input); min-height: 44px; }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn[aria-busy="true"]::after {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 64px; }
@media (min-width: 1024px) { .topbar .wrap { min-height: 72px; } .topbar { position: sticky; top: 0; z-index: var(--z-sticky); } }
.brand { display: flex; align-items: center; gap: var(--s3); color: var(--text-strong); text-decoration: none; min-width: 0; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand .name { font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.brand .cat { display: block; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
.top-actions { display: flex; align-items: center; gap: var(--s2); flex: none; }
.top-actions .btn { min-height: 44px; padding-inline: var(--s4); white-space: nowrap; }
.theme-btn { min-width: 44px; padding-inline: var(--s3) !important; font-size: var(--fs-cap) !important; }
@media (max-width: 479px) { .brand .cat { display: none; } #topCta { display: none; } }

/* Demo bar */
.demobar { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-cap); }
.demobar .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; padding-block: var(--s2); }
.demobar strong { font-family: var(--mono); }

/* Banner for invitees */
.invite { border: 1px solid var(--glass-border); background: var(--glass); border-radius: var(--r-card); padding: var(--s3) var(--s4); font-size: var(--fs-label); }

/* Sections */
section { padding-block: var(--s16); }
@media (min-width: 1024px) { section { padding-block: var(--s20); } }
.section-head { display: grid; gap: var(--s2); margin-bottom: var(--s8); max-width: 75ch; }
.band { background: var(--surface); border-block: 1px solid var(--border); }

/* Hero: one dominant bento cell + supporting cells */
.hero { padding-top: var(--s8); }
.bento { display: grid; gap: 12px; }
@media (min-width: 768px) { .bento { gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cell {
  border-radius: var(--r-bento); padding: var(--s6); background: var(--surface);
  border: 1px solid var(--border);
}
.cell.glass {
  background: var(--glass); border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-glass);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.cell-main { display: grid; gap: var(--s6); align-content: start; }
@media (min-width: 768px) { .cell-main { grid-column: span 6; padding: var(--s10); } }
@media (min-width: 1024px) { .cell-main { grid-column: span 4; grid-row: span 2; padding: var(--s12); } }
.cell-visual { padding: 0; overflow: hidden; display: grid; }
.cell-visual img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.cell-visual figcaption { padding: var(--s2) var(--s4); font-size: var(--fs-cap); color: var(--text-muted); border-top: 1px solid var(--border); }
@media (min-width: 768px) { .cell-visual { grid-column: span 3; } .cell-facts { grid-column: span 3; } }
@media (min-width: 1024px) { .cell-visual, .cell-facts { grid-column: span 2; } }
.hero h1 { max-width: 16ch; }
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.58; color: var(--text-muted); max-width: 66ch; }
.facts { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.facts li { display: grid; gap: 2px; padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts .k { font: 700 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.facts .v { font-weight: 600; color: var(--text-strong); }
.facts .local { font-size: var(--fs-cap); color: var(--text-muted); }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); max-width: 66ch; }
.bullets li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s3); }
.bullets li::before { content: ""; width: 12px; height: 2px; margin-top: .8em; background: var(--primary); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.transparency { font-size: var(--fs-label); color: var(--text-muted); max-width: 66ch; border-left: 2px solid var(--border-strong); padding-left: var(--s3); }

/* Cards */
.grid-2 { display: grid; gap: 12px; }
@media (min-width: 768px) { .grid-2 { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-4 { display: grid; gap: 12px; }
@media (min-width: 768px) { .grid-4 { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s6); }
.band .card { background: var(--bg); }
.card h3 { font-size: var(--fs-h4); line-height: 1.35; margin-bottom: var(--s2); }
.outcomes { counter-reset: o; margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s4); max-width: 75ch; }
.outcomes li { counter-increment: o; display: grid; grid-template-columns: 44px 1fr; gap: var(--s4); align-items: start; }
.outcomes li::before {
  content: counter(o, decimal-leading-zero); font: 700 13px/44px var(--mono); text-align: center;
  width: 44px; height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--border-strong); color: var(--text-strong);
}
.system { display: grid; gap: var(--s2); position: relative; overflow: hidden; }
.system::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent-color, var(--border-strong)); }
.system .domain { font: 500 12px/1.4 var(--mono); color: var(--text-muted); }
.status { display: inline-flex; width: fit-content; font: 600 12px/1.4 var(--sans); padding: 2px 10px; border-radius: var(--r-full); border: 1px solid var(--border-strong); color: var(--text-muted); }
.status.ok { color: var(--positive); border-color: currentColor; }

/* Speaker */
.speaker { display: grid; grid-template-columns: 72px 1fr; gap: var(--s4); align-items: start; max-width: 860px; }
.speaker .mark { width: 72px; height: 72px; border-radius: var(--r-card); background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--border); }
.speaker .mark img { width: 44px; height: 44px; }
.speaker blockquote { margin: var(--s4) 0 0; padding-left: var(--s3); border-left: 2px solid var(--border-strong); color: var(--text-muted); }

/* Register */
#register { scroll-margin-top: 88px; }
.reg-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-feature); box-shadow: var(--shadow-card); padding: var(--s6); max-width: 680px; margin-inline: auto; }
@media (min-width: 768px) { .reg-card { padding: var(--s10); } }
.band .reg-card { background: var(--bg); }
.reg-card h2 { font-size: var(--fs-h3); }
.form { display: grid; gap: var(--s5); margin-top: var(--s6); }
.field { display: grid; gap: var(--s1); }
.field label { font-size: var(--fs-label); font-weight: 600; }
.field .hint { font-size: var(--fs-cap); color: var(--text-muted); }
.field input {
  width: 100%; min-height: 48px; padding: 0 var(--s4); font-size: 16px; border-radius: var(--r-ctl);
  border: 1px solid var(--border-input); background: var(--surface); color: var(--text);
}
.field input:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field-err { color: var(--danger); font-size: var(--fs-cap); font-weight: 600; display: none; }
.field-err:not(:empty) { display: block; }
.field-err:not(:empty)::before { content: "Lỗi: "; }
.suggest { justify-self: start; border: 1px solid var(--border-input); background: var(--surface-2); color: var(--text); border-radius: var(--r-sm); padding: 6px var(--s3); font-size: var(--fs-cap); cursor: pointer; min-height: 36px; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; font-size: var(--fs-label); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.banner { border-radius: var(--r-card); padding: var(--s3) var(--s4); font-size: var(--fs-label); display: grid; gap: var(--s2); border: 1px solid var(--border-strong); background: var(--surface-2); }
.banner.error { border-color: var(--danger); color: var(--text); }
.banner.error > p:first-child::before { content: "Lỗi: "; font-weight: 700; color: var(--danger); }

/* Step 2 */
.step2 { display: grid; gap: var(--s6); }
.step2 h2:focus { outline: none; }
.confirm { display: grid; gap: var(--s2); }
.confirm .ok { display: flex; gap: var(--s3); align-items: center; }
.confirm .ok::before {
  content: ""; width: 28px; height: 28px; border-radius: 50%; flex: none; border: 2px solid var(--positive);
  background: linear-gradient(var(--positive), var(--positive)) center / 10px 2px no-repeat;
}
.skeleton { border-radius: var(--r-sm); background: var(--surface-2); height: 16px; animation: pulse 1.4s ease-in-out infinite; }
details.help { font-size: var(--fs-label); }
details.help summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.tools { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tools .btn { padding-inline: var(--s4); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); padding: var(--s1); background: var(--surface-2); border-radius: var(--r-ctl); border: 1px solid var(--border); }
.seg button { min-height: 52px; border: 1px solid transparent; border-radius: 10px; background: transparent; font-weight: 600; cursor: pointer; display: grid; line-height: 1.25; color: var(--text); }
.seg button small { font-weight: 500; color: var(--text-muted); font: 500 12px/1.3 var(--mono); }
.seg button[aria-checked="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.seg button[aria-checked="true"] small { color: inherit; }
.panel { display: grid; gap: var(--s4); }
.progress { display: grid; gap: var(--s2); }
.progress .bar { height: 8px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; border: 1px solid var(--border-strong); }
.progress .bar span { display: block; height: 100%; background: var(--primary); width: 0; transition: width var(--dur-3) var(--ease-out); }
.reflink { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); }
.reflink input { min-height: 48px; padding: 0 var(--s3); border: 1px solid var(--border-input); border-radius: var(--r-ctl); font: 13px var(--mono); background: var(--surface-2); color: var(--text); min-width: 0; }
.post { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-sm); padding: var(--s3); font-size: var(--fs-label); margin: var(--s2) 0; }
.includes { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s1); }
.price { font-size: var(--fs-h4); font-weight: 700; color: var(--text-strong); }
.qr-wrap { display: grid; justify-items: center; gap: var(--s2); }
.qr-box { background: #FFFFFF; padding: 12px; border-radius: var(--r-card); width: 264px; height: 264px; display: grid; place-items: center; }
.qr-box img { width: 240px; height: 240px; }
.qr-box .skeleton { width: 240px; height: 240px; background: #DCEBFA; }
.paytable { width: 100%; border-collapse: collapse; font-size: var(--fs-label); }
.paytable th { text-align: left; color: var(--text-muted); font-weight: 400; padding: var(--s2) 0; width: 34%; vertical-align: middle; }
.paytable td { padding: 0; }
.paytable tr + tr { border-top: 1px solid var(--border); }
.copy-row { width: 100%; min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: var(--s2); background: none; border: 0; cursor: pointer; font-weight: 600; text-align: left; padding: var(--s2) 0; color: var(--text); }
.copy-row::after { content: "Sao chép"; font: 600 12px/1 var(--sans); color: var(--primary); border: 1px solid var(--border-input); border-radius: var(--r-sm); padding: 6px 10px; flex: none; }
.copy-row.static::after { content: none; }
.note { background: var(--surface-2); border-radius: var(--r-sm); padding: var(--s3); font-size: var(--fs-label); }
.status-line { display: flex; gap: var(--s2); align-items: center; font-size: var(--fs-label); color: var(--text-muted); }
.status-line .dot { color: var(--primary); animation: pulse 1.6s ease-in-out infinite; }
.status-line.stopped .dot { animation: none; color: var(--text-faint); }
.success-box { border: 1px solid var(--positive); border-radius: var(--r-card); padding: var(--s6); display: grid; gap: var(--s3); text-align: center; justify-items: center; }
.success-box h3 { color: var(--positive); font-size: var(--fs-h4); }
.join { border: 1px solid var(--primary); border-radius: var(--r-card); padding: var(--s4); display: grid; gap: var(--s2); }

/* Tiers */
.tiers { display: grid; gap: 12px; }
@media (min-width: 768px) { .tiers { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tier { display: grid; gap: var(--s3); align-content: start; }
.tier .how { font-size: var(--fs-label); color: var(--text-muted); }
.tier.vip { border-color: var(--border-strong); }

/* Roadmap */
.episodes { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ep { display: grid; gap: var(--s2); }
.ep .meta { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; font: 500 12px/1.4 var(--mono); color: var(--text-muted); }
.ep.is-past { opacity: .8; }
.ep.is-current { border-color: var(--primary); }
.tag { font: 600 12px/1.4 var(--sans); padding: 2px 10px; border-radius: var(--r-full); border: 1px solid var(--border-strong); color: var(--text-muted); }
.tag.on { color: var(--primary); border-color: var(--primary); }
.tag.live { color: var(--danger); border-color: var(--danger); }
.next-season { margin-top: var(--s8); }
.next-season ol { margin: var(--s3) 0 0; padding-left: 1.3em; display: grid; gap: var(--s1); }

/* FAQ */
.faq { display: grid; gap: var(--s2); max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 0 var(--s5); }
.band .faq details { background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 600; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 20px/1 var(--mono); color: var(--primary); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: var(--s5); color: var(--text-muted); }

/* Footer */
footer { border-top: 1px solid var(--border); padding-block: var(--s10) calc(var(--s16) + 24px); font-size: var(--fs-label); color: var(--text-muted); }
footer .wrap { display: grid; gap: var(--s3); }
footer nav { display: flex; flex-wrap: wrap; gap: var(--s4); }
footer a { min-height: 44px; display: inline-flex; align-items: center; }

/* Sticky CTA (mobile) */
.sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-sticky);
  padding: var(--s2) var(--s4) calc(var(--s2) + env(safe-area-inset-bottom));
  background: var(--sticky-bg); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  transform: translateY(110%); transition: transform var(--dur-2) var(--ease-out);
}
.sticky-cta.show { transform: none; }
.sticky-cta .t { font-weight: 700; font-size: var(--fs-label); line-height: 1.3; }
.sticky-cta .t span { display: block; font-weight: 400; color: var(--text-muted); font-size: var(--fs-cap); }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: var(--z-toast);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text-strong); color: var(--bg); padding: var(--s3) var(--s4); border-radius: var(--r-ctl);
  font-size: var(--fs-label); font-weight: 600; max-width: calc(100vw - 32px);
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Dialogs */
dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; color: var(--text); }
dialog::backdrop { background: var(--scrim); }
dialog[open] { animation: dlg-in var(--dur-2) var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px); } }
.dlg-inner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-feature); padding: var(--s6); width: min(480px, calc(100vw - 32px)); display: grid; gap: var(--s4); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.sheet { margin: auto auto 0; width: 100%; }
.sheet .dlg-inner { width: 100%; max-width: 560px; margin-inline: auto; border-radius: var(--r-feature) var(--r-feature) 0 0; padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom)); max-height: 85dvh; overflow: auto; overscroll-behavior: contain; }
@media (min-width: 768px) { .sheet { margin: auto; } .sheet .dlg-inner { border-radius: var(--r-feature); } }
.channels { display: grid; gap: var(--s2); }
.channels a, .channels button { min-height: 56px; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; cursor: pointer; width: 100%; text-align: left; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--border-input);
  background: var(--surface); color: var(--text); cursor: pointer; display: inline-grid; place-items: center; font-size: 18px; line-height: 1;
}
.lightbox .dlg-inner { width: min(1000px, calc(100vw - 16px)); padding: var(--s3); }
.lightbox img { width: 100%; max-height: 72dvh; object-fit: contain; border-radius: var(--r-sm); }
.lightbox .lb-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.lightbox .lb-cap { font-size: var(--fs-label); color: var(--text-muted); }
.zoomable { padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; display: block; }

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