/* Stumble-Bot — one cohesive dark, warm aesthetic. Tokens first, components after. */
:root {
  --bg: #151210; --bg-2: #1d1814; --panel: #241e19; --panel-2: #2d2520; --line: #3b312a; --line-2: #4b3f36;
  --text: #f4ede3; --muted: #a99d91; --faint: #7a6f65;
  --accent: #ff5a1f; --accent-hi: #ff7a3d; --accent-lo: #c93f0e; --amber: #ffb347; --link: #ffd0a6;
  --like: #6fe3a0; --dislike: #ff6b6b; --info: #7cc4ff;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px; --radius-s: 9px; --bar-h: 52px;
  --shadow: 0 10px 30px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.04) inset;
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
body.page { background:
  radial-gradient(1200px 600px at 10% -10%, rgba(255,90,31,.10), transparent 60%),
  radial-gradient(900px 500px at 100% 0%, rgba(255,179,71,.07), transparent 60%),
  var(--bg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: 1.1; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .9rem; }
.tiny { font-size: .78rem; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.container { width: min(1200px, 100% - 32px); margin: 0 auto; padding: 28px 0 60px; flex: 1; }
.narrow { width: min(560px, 100% - 32px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.inline { display: inline; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: #352c26; border-color: #5a4c41; text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn.small { padding: 7px 13px; font-size: .9rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn.danger { border-color: #6b2b2b; color: #ffb3b3; }
.btn.danger:hover { background: #3a1d1d; }
.btn-stumble { background: linear-gradient(135deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo)); border: 0; color: #fff; font-family: var(--display); font-weight: 800; letter-spacing: .01em; box-shadow: 0 6px 18px rgba(255,90,31,.35), 0 1px 0 rgba(255,255,255,.25) inset; text-shadow: 0 1px 0 rgba(0,0,0,.2); }
.btn-stumble:hover { filter: brightness(1.06); box-shadow: 0 8px 24px rgba(255,90,31,.45), 0 1px 0 rgba(255,255,255,.25) inset; }
.btn-stumble.big { font-size: 1.25rem; padding: 14px 30px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.iconbtn { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn.liked { color: var(--like); border-color: rgba(111,227,160,.5); background: rgba(111,227,160,.12); }
.iconbtn.disliked { color: var(--dislike); border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.12); }
.iconbtn.liked svg, .iconbtn.disliked svg { fill: currentColor; fill-opacity: .25; }

/* forms */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=email], select, textarea { width: 100%; padding: 11px 13px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: #1a1512; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px rgba(255,179,71,.18); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field { margin-bottom: 16px; }
.help { color: var(--muted); font-size: .85rem; margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.alert { padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid; margin-bottom: 16px; font-size: .95rem; }
.alert.error { border-color: #7a2e2e; background: #2a1616; color: #ffc9c9; }
.alert.ok { border-color: #2f6b47; background: #15291e; color: #c6f5d9; }
.alert.info { border-color: #2f4f6b; background: #15202a; color: #cfe6ff; }

/* cards & panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s var(--ease), border-color .2s; position: relative; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, #2a221d, #1b1613); display: grid; place-items: center; overflow: hidden; color: var(--faint); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .thumb .glyph { font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: rgba(255,255,255,.07); letter-spacing: -.04em; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .title { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .title a { color: var(--text); }
.card .desc { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: var(--faint); font-size: .78rem; display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.card .meta .kind { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .68rem; padding: 2px 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.card .actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.chip.active, .chip:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .display { font-size: 1.6rem; color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
tr:hover td { background: rgba(255,255,255,.02); }
code, kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: #1a1512; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
kbd { color: var(--amber); }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; }
.stat .n { font-family: var(--display); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat .l { color: var(--muted); font-size: .8rem; margin-top: 4px; }

/* top nav (inner pages) */
.topnav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: var(--bar-h); background: rgba(21,18,16,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 210deg, var(--amber), var(--accent), #ff2d55, var(--amber)); box-shadow: 0 0 0 2px rgba(255,255,255,.08) inset, 0 4px 12px rgba(255,90,31,.4); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 3px rgba(0,0,0,.25); }
.topnav-links { display: flex; gap: 4px; align-items: center; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topnav-links a { color: var(--muted); padding: 7px 11px; border-radius: 999px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.topnav-links a:hover, .topnav-links a.active { color: var(--text); background: rgba(255,255,255,.06); text-decoration: none; }
.topnav-links a.btn-stumble { color: #fff; margin-right: 8px; }
.topnav-user { display: flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--text); padding: 4px 10px 4px 4px; border-radius: 999px; }
.user-chip:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--accent)); color: #1a0f08; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
.site-footer a { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #2b231e; border: 1px solid var(--line-2); color: var(--text); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); z-index: 100; font-size: .92rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- landing ---------- */
body.landing { background: var(--bg); overflow-x: hidden; }
.landing .container { padding-top: 0; }
.hero { position: relative; min-height: 86vh; display: grid; align-items: center; padding: 70px 0 40px; }
.hero-bg { position: absolute; inset: -10% -10% 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-bg canvas { width: 100%; height: 100%; display: block; }
.hero-bg::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60% 50% at 20% 30%, rgba(255,90,31,.28), transparent 70%),
  radial-gradient(50% 40% at 80% 20%, rgba(255,179,71,.18), transparent 70%),
  radial-gradient(40% 40% at 60% 90%, rgba(255,45,85,.14), transparent 70%);
  filter: blur(40px) saturate(1.1); animation: drift 24s ease-in-out infinite alternate; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, var(--bg)); }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 3%, 0) scale(1.06); } }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--amber); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; letter-spacing: -.03em; line-height: .98; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--amber), var(--accent-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 54ch; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-cta .note { color: var(--faint); font-size: .85rem; }
.demo-bar { background: linear-gradient(180deg, #221c17, #1a1512); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; transform: rotate(-1.5deg); }
.demo-bar .bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.demo-bar .bar .pill { flex: 1; height: 28px; border-radius: 999px; background: #2a221d; border: 1px solid var(--line); color: var(--faint); font-size: .8rem; display: flex; align-items: center; padding: 0 12px; }
.demo-bar .screen { aspect-ratio: 4/3; position: relative; background: #0f0c0a; overflow: hidden; }
.demo-bar .screen .site { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.demo-bar .screen .site.on { opacity: 1; transform: none; }
.demo-bar .screen .site .ttl { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.demo-bar .screen .site .ln { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); }
.demo-bar .screen .site .ln.w60 { width: 60%; } .demo-bar .screen .site .ln.w80 { width: 80%; } .demo-bar .screen .site .ln.w40 { width: 40%; }
.demo-bar .screen .site .img { flex: 1; border-radius: 10px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0 50px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,90,31,.12); color: var(--accent-hi); margin-bottom: 14px; font-family: var(--display); font-weight: 800; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.topic-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 40px; }
.topic-cloud span { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .9rem; }
.topic-cloud span:nth-child(5n+1) { border-color: rgba(255,90,31,.4); color: var(--text); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; margin-bottom: 40px; }
.howto div { position: relative; padding: 20px 20px 20px 62px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.howto div::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--amber), var(--accent)); color: #1a0f08; font-family: var(--display); font-weight: 800; }
.howto strong { display: block; color: var(--text); margin-bottom: 4px; }
.landing-stats { display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); font-size: .95rem; margin-top: 30px; }
.landing-stats b { color: var(--text); font-family: var(--display); font-size: 1.3rem; display: block; }
.landing-nav { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.landing-nav .links { display: flex; gap: 8px; align-items: center; }

/* ---------- auth ---------- */
.auth { width: min(440px, 100% - 32px); margin: 8vh auto; }
.auth .panel { padding: 30px; }
.auth h1 { font-size: 1.9rem; margin-bottom: 4px; }
.auth .brand { margin-bottom: 26px; }
.auth .btn { width: 100%; }

/* ---------- interests picker ---------- */
.picker-head { position: sticky; top: var(--bar-h); z-index: 10; background: rgba(21,18,16,.92); backdrop-filter: blur(12px); padding: 14px 0; margin-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.picker-head input { max-width: 320px; }
.picker-count { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.cat { margin: 26px 0; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cat-head .btn { font-size: .8rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .face { display: flex; flex-direction: column; justify-content: flex-end; min-height: 86px; padding: 12px 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--tile-a, #2a221d), var(--tile-b, #1c1714)); transition: transform .15s var(--ease), border-color .15s, box-shadow .15s; }
.tile:hover .face { transform: translateY(-2px); border-color: var(--line-2); }
.tile .name { font-weight: 650; line-height: 1.25; }
.tile .count { color: var(--faint); font-size: .75rem; margin-top: 3px; }
.tile .mark { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: .8rem; color: transparent; transition: all .15s; }
.tile input:checked + .face { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,90,31,.35), 0 8px 22px rgba(255,90,31,.2); background: linear-gradient(160deg, rgba(255,90,31,.28), rgba(255,179,71,.12)); }
.tile input:checked + .face .mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile input:focus-visible + .face { outline: 2px solid var(--amber); outline-offset: 2px; }
.tile.dim { display: none; }
.picker-foot { position: sticky; bottom: 0; background: rgba(21,18,16,.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 14px 0; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 20px; }
.cat[data-hue="0"] .face { --tile-a: #33221b; } .cat[data-hue="1"] .face { --tile-a: #2b2423; } .cat[data-hue="2"] .face { --tile-a: #2a2a1e; } .cat[data-hue="3"] .face { --tile-a: #1f2a24; }
.cat[data-hue="4"] .face { --tile-a: #1e262e; } .cat[data-hue="5"] .face { --tile-a: #2a1f2e; } .cat[data-hue="6"] .face { --tile-a: #302220; }

/* ---------- stumble screen ---------- */
body.stumble { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: #0e0b09; }
.sbar { height: var(--bar-h); flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: linear-gradient(180deg, #221c17, #18130f); border-bottom: 1px solid var(--line-2); box-shadow: 0 2px 12px rgba(0,0,0,.4); z-index: 5; }
.sbar .brand-name { display: none; }
.sbar .sep { width: 1px; height: 26px; background: var(--line-2); margin: 0 4px; }
.sbar .spacer { flex: 1; }
.sbar .mode { max-width: 220px; min-width: 150px; padding: 8px 34px 8px 12px; border-radius: 999px; font-size: .9rem; background-color: #1a1512; }
.sbar .upnext { color: var(--faint); font-size: .8rem; white-space: nowrap; }
.sbar .upnext b { color: var(--muted); }
.sbar .nav-menu { position: relative; }
.sbar .menu { position: absolute; right: 0; top: 46px; min-width: 200px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 30; }
.sbar .menu.open { display: block; }
.sbar .menu a, .sbar .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.sbar .menu a:hover, .sbar .menu button:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sbar .menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
main.stage-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.stage { flex: 1; position: relative; min-height: 0; background: #0e0b09; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.stage iframe.video { background: #000; }
.stage .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: #0e0b09; z-index: 2; }
.stage .loading .orb { width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(from 0deg, var(--amber), var(--accent), #ff2d55, var(--amber)); animation: spin 1.2s linear infinite; margin: 0 auto 14px; filter: drop-shadow(0 0 18px rgba(255,90,31,.5)); position: relative; }
.stage .loading .orb::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0e0b09; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage .preview { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 30px 16px; background:
  radial-gradient(900px 500px at 50% 0%, rgba(255,90,31,.14), transparent 60%), #0e0b09; }
.preview-card { width: min(760px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.preview-card .hero-img { aspect-ratio: 2/1; background: #1a1512; overflow: hidden; }
.preview-card .hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-card .pbody { padding: 26px 28px 28px; }
.preview-card .host { color: var(--amber); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.preview-card h2 { font-size: 1.8rem; margin-bottom: 10px; }
.preview-card p { color: var(--muted); }
.preview-card .why { font-size: .85rem; color: var(--faint); margin-top: 16px; }
.stage .photo { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; background: #0a0807; }
.stage .photo img { width: 100%; height: 100%; object-fit: contain; display: block; min-height: 0; }
.stage .photo figcaption { padding: 12px 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: #141110; color: var(--muted); font-size: .9rem; }
.stage .photo figcaption b { color: var(--text); }
.stage .hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(36,30,25,.92); border: 1px solid var(--line-2); color: var(--text); padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-size: .9rem; z-index: 3; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: var(--panel); border-left: 1px solid var(--line-2); box-shadow: -10px 0 30px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .25s var(--ease); z-index: 4; overflow: auto; padding: 20px; }
.drawer.open { transform: none; }
.drawer h3 { font-size: 1.3rem; }
.drawer .close { position: absolute; top: 10px; right: 10px; }
.drawer .thumb { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #1a1512; margin: 12px 0; }
.drawer .thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .9rem; color: var(--muted); }
.drawer dt { color: var(--faint); }
.kbd-help { color: var(--faint); font-size: .8rem; margin-top: 18px; line-height: 1.9; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active, .tabs a:hover { color: var(--text); border-bottom-color: var(--accent); text-decoration: none; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 24px; }
.setting { padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting .k { font-size: .75rem; color: var(--faint); }
.setting input[type=text], .setting input[type=number] { margin-top: 6px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { color: var(--like); } .badge.warn { color: var(--amber); } .badge.err { color: var(--dislike); }
.scroll-x { overflow-x: auto; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: auto; padding: 6px 9px; font-size: .85rem; }
.inline-form .btn { padding: 5px 10px; font-size: .8rem; }

/* ---------- legal ---------- */
.legal { width: min(760px, 100% - 32px); }
.legal h1 { margin-top: 20px; }
.legal h2 { margin-top: 32px; font-size: 1.3rem; }
.legal p, .legal li { color: #d9d0c6; }
.legal .updated { color: var(--faint); font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .demo-bar { transform: none; max-width: 520px; }
  .topnav { gap: 10px; padding: 0 12px; }
  .topnav .user-name { display: none; }
}
@media (max-width: 640px) {
  .sbar { gap: 5px; padding: 0 8px; }
  .sbar .brand { display: none; }
  .sbar .btn-stumble { padding: 8px 14px; font-size: .95rem; }
  .sbar .iconbtn { width: 34px; height: 34px; }
  .sbar .iconbtn svg { width: 18px; height: 18px; }
  .sbar .mode { min-width: 0; width: 104px; max-width: 104px; padding: 7px 26px 7px 9px; font-size: .82rem; background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; }
  .sbar .upnext, .sbar .hide-sm, .sbar #btn-share, .sbar #btn-open { display: none; }
  .sbar .spacer { flex: 0 0 0; }
  .drawer { width: 100%; }
  .preview-card .pbody { padding: 18px; }
  .preview-card h2 { font-size: 1.4rem; }
  .hero { min-height: auto; padding-top: 90px; }
  .container { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
