/* Wipeout AI prototype - components. Colours, type and radii come only from tokens.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.show-xs { display: none; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- the logo: the WipeoutLabs mark + "wipeout AI" lockup
   (design/logo/build_logo.py, since 2026-10-19), the light-ground file in the light theme; .on-art keeps the dark-ground
   one over pictures; .logo-sym is the mark alone */
.wordmark { display: inline-flex; align-items: center; flex: none; line-height: 0; border-radius: 8px; }
.wordmark img { height: 36px; width: auto; }
.wordmark .logo-l, .wordmark .logo-sym { display: none; }
:root[data-theme="light"] .wordmark:not(.on-art) .logo-d { display: none; }
:root[data-theme="light"] .wordmark:not(.on-art) .logo-l { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .wordmark:not(.on-art) .logo-d { display: none; }
  :root:not([data-theme="dark"]) .wordmark:not(.on-art) .logo-l { display: block; }
}
.wordmark.symbol-only .logo-d, .wordmark.symbol-only .logo-l { display: none !important; }
.wordmark.symbol-only .logo-sym { display: block; }
/* over a picture the white lettering has no ground of its own (the old gold "AI" cartridge carried one): a soft shadow
   keeps "wipeout AI" readable over pale stone and sky */
.wordmark.on-art img { filter: drop-shadow(0 1px 2px rgba(10, 11, 16, 0.55)) drop-shadow(0 2px 10px rgba(10, 11, 16, 0.35)); }
.h6 { margin: 0 0 4px; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }

/* ---------------------------------------------------------------- buttons, pills, chips, badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-pill); border: 1px solid transparent; cursor: pointer;
  font-weight: 700; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; transition: filter .15s, background .15s, border-color .15s, transform .1s;
  background: var(--surface-2); color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 3px 0 rgba(36, 23, 3, 0.28); }
.btn-gold:hover { filter: brightness(1.07); }
.btn-teal { background: var(--teal); color: var(--teal-ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-sm { padding: 8px 15px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn[disabled], .btn.is-off { opacity: .55; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[disabled] { opacity: .35; cursor: default; background: none; }
.icon-btn .ic { width: 20px; height: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill .ic { width: 14px; height: 14px; }
.pill-teal { background: var(--teal-soft); color: var(--teal); }
.pill-gold { background: var(--gold-soft); color: var(--gold-text); }
.pill-coral { background: var(--coral-soft); color: var(--coral-text); }
.pill-red { background: var(--danger-soft); color: var(--danger); }
.pill-live { background: rgba(61, 220, 132, 0.12); color: var(--live); }
.pill-live::before, .dot-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .ic { width: 15px; height: 15px; }
.credits-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 9px; border-radius: var(--r-pill);
  background: var(--gold-soft); color: var(--gold-text); border: 1px solid rgba(240, 180, 60, 0.35); font-size: var(--fs-sm); white-space: nowrap;
}
.credits-pill b { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text); }
.credits-pill span { color: var(--muted); font-size: var(--fs-xs); }
.credits-pill .ic { width: 19px; height: 19px; }
.av {
  --h: 200; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; color: #fff;
  background: linear-gradient(140deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 40) 65% 42%));
  box-shadow: 0 0 0 2px var(--bg);
}
.av.lg { width: 56px; height: 56px; font-size: 20px; }
.av.xl { width: 112px; height: 112px; font-size: 40px; box-shadow: 0 0 0 5px var(--bg); }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.kicker { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text); display: inline-flex; gap: 8px; align-items: center; }
.kicker .ic { width: 15px; height: 15px; }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 60; height: var(--head); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-row { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 13px; border-radius: 9px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: inset 0 -2px 0 var(--gold); }
.search { flex: 1; max-width: 380px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--dim); margin-left: auto; }
.search:focus-within { border-color: var(--teal); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: var(--fs-sm); color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.burger { display: none; }
.menu-wrap { position: relative; }
.avatar-btn { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 70;
}
.menu-wrap.open .menu { opacity: 1; visibility: visible; transform: none; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 8px; border: 0; background: none; font-size: var(--fs-sm); color: var(--text); cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu a .ic, .menu button .ic { color: var(--muted); }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head small { display: block; color: var(--muted); }

/* ---------------------------------------------------------------- footer */
.foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 28px; color: var(--muted); font-size: var(--fs-sm); }
.foot-row { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot-brand p { margin: 14px 0 16px; max-width: 360px; }
.foot-brand a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); }
.foot nav { display: flex; flex-direction: column; gap: 9px; }
.foot nav a:hover { color: var(--text); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--dim); }

/* ---------------------------------------------------------------- home: hero */
/* the game-maker pitch: the first screen of the homepage */
.make-hero { margin-top: 20px; padding: 26px 32px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; text-align: center; }
.make-hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(110deg, var(--teal), transparent 30%, transparent 70%, var(--gold)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.make-hero h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -0.02em; margin: 10px auto 8px; max-width: 28ch; text-wrap: balance; }
.make-hero .lead { color: var(--muted); font-size: var(--fs-md); max-width: 64ch; margin: 0 auto 16px; }
.make-box { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; max-width: 760px; margin: 0 auto; padding: 8px 8px 8px 10px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); text-align: left; }
.make-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.make-box input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-md); padding: 8px 4px; outline: none; }
.make-box input::placeholder { color: var(--muted); }
.make-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.make-points { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; color: var(--muted); font-size: var(--fs-sm); }
.make-points li { display: inline-flex; align-items: center; gap: 8px; }
.make-points .ic { color: var(--teal); }
.make-box .ai-orb { width: 40px; height: 40px; border-radius: 12px; }
@media (max-width: 640px) { .make-hero { padding: 20px 16px 18px; } .make-box { grid-template-columns: 1fr; } .make-box .ai-orb { display: none; } .make-box .btn { width: 100%; justify-content: center; } }
.hero .hero-title { font-size: var(--fs-4xl); font-weight: 700; margin: 14px 0 14px; letter-spacing: -0.02em; }
.hero { position: relative; margin-top: 20px; border-radius: 22px; overflow: hidden; min-height: 520px; display: flex; align-items: flex-end; isolation: isolate; box-shadow: var(--shadow); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 11, 16, 0.9) 0%, rgba(10, 11, 16, 0.62) 38%, rgba(10, 11, 16, 0) 68%), linear-gradient(0deg, rgba(10, 11, 16, 0.75) 0%, transparent 40%); }
.hero-copy { padding: 48px; max-width: 620px; color: #f6f4ef; }
.hero h1 { font-size: var(--fs-4xl); font-weight: 700; margin: 14px 0 14px; letter-spacing: -0.02em; }
.hero p.lead { color: #d9dbe0; font-size: var(--fs-lg); margin-bottom: 24px; max-width: 520px; }
.hero .meta-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; font-size: var(--fs-sm); color: #c9ccd3; }
.hero .meta-row span { display: inline-flex; gap: 6px; align-items: center; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.hero-side { position: absolute; right: 24px; bottom: 24px; display: flex; gap: 10px; }
.hero-side img { width: 116px; height: 70px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255, 255, 255, 0.5); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.built-on { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border-radius: var(--r-pill); background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(6px); color: #f2f3f5; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- home: the prompt strip */
.ask { margin-top: 28px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 18px 18px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.ask::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(110deg, var(--teal), transparent 30%, transparent 70%, var(--gold)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.ai-orb { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); flex: none; }
.ai-orb .ic { width: 26px; height: 26px; }
.ask-text h2 { font-size: var(--fs-xl); }
.ask-field { margin-top: 8px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-md); }
.ask-field .typed { color: var(--text); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--teal); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- sections */
.section { margin-top: 64px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-3xl); }
.section-head p { color: var(--muted); margin-top: 6px; }
.link-more { color: var(--muted); font-weight: 700; font-size: var(--fs-sm); display: inline-flex; gap: 4px; align-items: center; }
.link-more:hover { color: var(--text); }

/* ---------------------------------------------------------------- game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 20px; }
.gcard { display: block; border-radius: var(--r-lg); }
.gcover { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.gcover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gcover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.gcard:hover .gcover img { transform: scale(1.06); }
.badge { position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.badge .ic { width: 13px; height: 13px; }
.badge.hot { background: var(--coral); color: #fff; }
.badge.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); }
.kit-tag { position: absolute; z-index: 2; bottom: 10px; left: 10px; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; background: rgba(10, 11, 16, 0.7); color: #e9eaee; backdrop-filter: blur(4px); }
.play-hover { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(10, 11, 16, 0.25); }
.play-hover .ic { width: 58px; height: 58px; padding: 16px 14px 16px 18px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.gcard:hover .play-hover, .gcard:focus-visible .play-hover { opacity: 1; }
/* card snippets (app.js W.snippets): the clip lies exactly over the poster and fades in once it is really playing */
video.snip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .35s ease; }
.snip-on video.snip { opacity: 1; }
.gcard:hover .gcover video.snip { transform: scale(1.06); }
.our-art:hover video.snip { transform: scale(1.03); }
.gcard.snip-on .play-hover { opacity: 0; }
.gbody { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.gtext { min-width: 0; }
.gtext h3 { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtext p { font-size: var(--fs-sm); color: var(--muted); }
.gstats { display: flex; gap: 14px; margin-top: 8px; padding-left: 44px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.gstats span { display: inline-flex; gap: 5px; align-items: center; }
.gstats .ic { width: 14px; height: 14px; }
.gstats span:first-child .ic { color: var(--coral); }
.gstats .online { margin-left: auto; color: var(--live); }
.gstats .online i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); }
/* THE CARD's panel (app.js W.card): an <article> whose cover and title are links; under the cover the facts that are
   always there, and THE PANEL that opens over the card on hover or keyboard focus (pointer devices) - the cover stays
   uncovered, so the clip keeps playing above it. On a touch screen the panel is the sheet (the "..." button or a long
   press) and the first tags sit under the card instead. */
.gcard.has-panel { position: relative; cursor: pointer; }
.gcard.has-panel .gcover { display: block; }
.gunder { position: relative; }
.gtext h3 a, .gtext p a { color: inherit; }
.gtext h3 a:focus-visible { outline: none; }
.gcard.has-panel:focus-within .gcover { box-shadow: 0 0 0 3px var(--gold), var(--shadow-sm); }
.gav { flex: none; line-height: 0; }
.gby { color: var(--muted); }
.gby:hover { color: var(--text); text-decoration: underline; }
.gmore { display: none; flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; place-items: center; color: var(--muted); background: transparent; border: 0; }
.gmore:hover, .gmore:focus-visible { background: var(--surface-2); color: var(--text); }
.gmore .ic { width: 20px; height: 20px; }
.gstats .live { color: var(--live); }
.gstats .live i, .gp-stats .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); }
.gp-stats .live.zero { color: var(--muted); }
.gp-stats .live.zero i { background: var(--dim); box-shadow: none; }
.gtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.gtags li { padding: 3px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; line-height: 1.4; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.gtags li:first-child { background: var(--gold-soft); color: var(--text); border-color: transparent; }
.gtags-under { display: none; margin-top: 8px; }
.badge.ribbon { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.gpanel { position: absolute; z-index: 6; top: -6px; left: -10px; right: -10px; display: grid; gap: 10px; padding: 14px 14px 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
@media (hover: hover) {
  .gcard.has-panel:hover, .gcard.has-panel:focus-within { z-index: 6; }
  .gcard.has-panel:hover .gpanel { opacity: 1; visibility: visible; transform: none; transition-delay: .18s, .18s, .18s; }
}
.gcard.has-panel:focus-within .gpanel { z-index: 6; opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.gcard.flip .gpanel { top: auto; bottom: calc(100% - 6px); border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(4px); }
.gcard.flip:hover .gpanel, .gcard.flip:focus-within .gpanel { transform: none; }
.gp-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gp-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.2; }
.gp-by { display: inline-flex; gap: 7px; align-items: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); width: max-content; max-width: 100%; }
.gp-by:hover { color: var(--text); }
.gp-desc { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gp-remix { display: flex; gap: 6px; align-items: center; font-size: var(--fs-xs); color: var(--muted); }
.gp-remix .ic { width: 14px; height: 14px; color: var(--teal); flex: none; }
.gp-remix a, .remix-credit a { color: var(--text); font-weight: 700; }
.gp-remix a:hover, .remix-credit a:hover { text-decoration: underline; }
.gp-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.gp-stats span { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.gp-stats .ic { width: 13px; height: 13px; }
.gp-stats .live { color: var(--live); }
.gp-stats .dim { color: var(--dim); font-weight: 600; }
.gp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gp-actions .btn { flex: none; }
.gp-actions .gp-play { flex: 1 1 auto; justify-content: center; min-width: 96px; }
.gp-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); }
.gp-icon:hover, .gp-icon:focus-visible { border-color: var(--gold); }
.gp-icon .ic { width: 17px; height: 17px; }
.gp-icon.on { color: var(--coral); border-color: var(--coral); background: var(--coral-soft); }
.gp-icon:disabled { opacity: .6; }
.gp-last { font-size: var(--fs-xs); color: var(--dim); }
/* the game page's own line (game.html) */
.remix-credit { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: var(--fs-sm); color: var(--muted); }
.remix-credit .ic { width: 15px; height: 15px; color: var(--teal); }
.gp-tags { margin-top: 10px; }
.gp-tags:empty { display: none; }
/* the phone sheet: the same panel, from the bottom */
.overlay.sheet-overlay { place-items: end center; padding: 0; }
.sheet { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow); padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform .2s ease; }
.overlay.on .sheet { transform: none; }
.sheet-grab { width: 44px; height: 5px; margin: 2px auto 8px; border-radius: 3px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { font-size: var(--fs-xl); }
.sheet-body { display: grid; gap: 12px; }
.sheet-cover { display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.sheet-cover img { width: 100%; height: 100%; object-fit: cover; }
.gpanel-sheet .gp-title { display: none; }
.gpanel-sheet .gp-desc { -webkit-line-clamp: 4; line-clamp: 4; }
.gpanel-sheet .gp-actions .btn, .gpanel-sheet .gp-icon { min-height: 44px; }
.gpanel-sheet .gp-icon { width: 44px; }
@media (hover: none) {
  .gpanel { display: none; }
  .gmore { display: inline-grid; }
  .gtags-under { display: flex; }
  .gcard.has-panel:focus-within .gcover { box-shadow: var(--shadow-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .gpanel, .gcard.has-panel:hover .gpanel, .sheet { transition: none; transform: none; }
  .gcard.has-panel:hover .gcover img, .gcard.has-panel:hover .gcover video.snip { transform: none; }
}

/* how it works */
/* the studio's own games (index.html #our-games), its news and about */
.ours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.our-game { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.our-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.our-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.our-art:hover img { transform: scale(1.03); }
.our-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.our-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.our-tags .ic { width: 14px; height: 14px; }
.our-body h3 { font-size: var(--fs-2xl); }
.our-body > p { color: var(--muted); }
.our-body .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.our-note { font-size: var(--fs-sm); color: var(--dim); }
.our-note a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.our-note a:hover { text-decoration-color: currentColor; }
.news { display: grid; gap: 12px; }
.news article { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.news time { color: var(--gold-text); font-weight: 700; font-size: var(--fs-sm); padding-top: 3px; }
.news h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.news p { color: var(--muted); margin-bottom: 6px; }
.news a { font-weight: 700; font-size: var(--fs-sm); }
.about > div { max-width: 760px; }
.about h2 { font-size: var(--fs-3xl); margin-bottom: 12px; }
.about p { color: var(--muted); font-size: var(--fs-lg); margin-bottom: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; right: 20px; font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--surface-3); }
.step .ai-orb { margin-bottom: 16px; }
.step:nth-child(2) .ai-orb { background: var(--gold-soft); color: var(--gold-text); }
.step:nth-child(3) .ai-orb { background: var(--coral-soft); color: var(--coral-text); }
.step h3 { font-size: var(--fs-xl); margin-bottom: 6px; }
.step p { color: var(--muted); }
.step .mini { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }

/* kits on the way */
.kits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kit { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 8; display: flex; align-items: flex-end; isolation: isolate; }
.kit img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(.75); }
.kit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10, 11, 16, 0.9), rgba(10, 11, 16, 0.15) 70%); }
.kit div { padding: 18px; color: #f2f3f5; }
.kit h3 { font-size: var(--fs-xl); }
.kit p { font-size: var(--fs-sm); color: #c8cbd2; }
.kit .pill { position: absolute; top: 14px; left: 14px; background: rgba(10, 11, 16, 0.7); color: #e9eaee; }

/* creator spotlight */
.spot { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.spot-art { position: relative; min-height: 320px; }
.spot-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spot-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.spot-body h3 { font-size: var(--fs-2xl); }
.quote { font-size: var(--fs-lg); color: var(--text); border-left: 3px solid var(--teal); padding-left: 14px; }
.who { display: flex; gap: 12px; align-items: center; }
.who small { display: block; color: var(--muted); }

/* ---------------------------------------------------------------- game page */
.gp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 24px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: var(--shadow); isolation: isolate; }
.player > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.player::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 50%, rgba(10, 11, 16, 0.05), rgba(10, 11, 16, 0.55)); }
.player-play { position: absolute; inset: 0; margin: auto; width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 0 0 10px rgba(240, 180, 60, 0.22), 0 18px 40px rgba(0, 0, 0, 0.5); transition: transform .15s; }
.player-play:hover { transform: scale(1.05); }
.player-play .ic { width: 42px; height: 42px; margin-left: 6px; }
.player-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; }
.player-top .pill { background: rgba(10, 11, 16, 0.7); color: #eceef2; backdrop-filter: blur(4px); }
.player-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between; align-items: center; color: #eceef2; font-size: var(--fs-sm); }
.player-bar .icon-btn { background: rgba(10, 11, 16, 0.6); color: #eceef2; }
.player.playing::before { background: none; }
.player.playing .player-play { display: none; }
.boot { position: absolute; inset: 0; display: none; place-items: center; background: rgba(10, 11, 16, 0.7); color: #eceef2; z-index: 3; }
.player.booting .boot { display: grid; }
.boot div { text-align: center; }
.boot .barbox { width: 220px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); margin: 14px auto 0; overflow: hidden; }
.boot .barbox i { display: block; height: 100%; width: 0; background: var(--gold); animation: load 1.4s ease forwards; }
@keyframes load { to { width: 100%; } }
.gp-title { margin-top: 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.gp-title h1 { font-size: var(--fs-3xl); font-weight: 700; }
.gp-sub { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm); }
.gp-sub a b { color: var(--text); }
.gp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.like.liked { background: var(--coral-soft); color: var(--coral-text); border-color: transparent; }
.gp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.stat { padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stat small { display: block; font-size: var(--fs-xs); color: var(--dim); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 28px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 14px; font-weight: 700; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.tabpanel { padding-top: 20px; }
.about p { color: var(--muted); max-width: 720px; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.shots img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 18px; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment b { font-size: var(--fs-sm); }
.comment small { color: var(--dim); margin-left: 6px; }
.comment p { color: var(--muted); font-size: var(--fs-sm); margin-top: 3px; }
.comment-box { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.comment-box input { flex: 1; border: 0; background: none; outline: none; min-width: 0; }
.side-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.side-card + .side-card { margin-top: 16px; }
.side-card h3 { font-size: var(--fs-lg); margin-bottom: 12px; }
.mini-game { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 10px; }
.mini-game:hover { background: var(--surface-2); }
.mini-game img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }
.mini-game b { display: block; font-size: var(--fs-sm); }
.mini-game small { color: var(--muted); font-size: var(--fs-xs); display: flex; gap: 8px; align-items: center; }
.mini-game small .ic { width: 12px; height: 12px; }
.remix-card { background: linear-gradient(150deg, var(--gold-soft), transparent 60%), var(--surface); border-color: rgba(240, 180, 60, 0.35); }
.remix-card p { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 14px; }
.used-assets { display: flex; gap: 8px; flex-wrap: wrap; }
.used-assets img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }

/* ---------------------------------------------------------------- studio (full-screen app) */
body.app { height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); }
.studio { height: 100%; display: grid; grid-template-rows: 58px minmax(0, 1fr); }
.st-bar { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); min-width: 0; }
.st-bar .wordmark img { height: 30px; }
.st-sep { width: 1px; height: 26px; background: var(--line); flex: none; }
.st-project { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-project img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; }
.st-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; border: 1px solid transparent; background: none; padding: 3px 6px; border-radius: 7px; min-width: 0; width: 13ch; }
.st-name:hover { border-color: var(--line-2); }
.st-name:focus { outline: none; border-color: var(--teal); background: var(--surface); }
.st-saved { font-size: var(--fs-xs); color: var(--dim); display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.st-saved .ic { width: 13px; height: 13px; color: var(--teal); }
.st-tools { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.st-tools .ver { font-size: var(--fs-xs); font-weight: 800; color: var(--muted); padding: 4px 8px; border-radius: 7px; background: var(--surface); margin: 0 6px; }
.st-right { display: flex; align-items: center; gap: 8px; }
.st-main { display: grid; grid-template-columns: 420px minmax(0, 1fr); min-height: 0; }
.chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border-right: 1px solid var(--line); background: var(--bg-2); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head b { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); display: flex; gap: 8px; align-items: center; }
.chat-head b .ic { color: var(--teal); }
.msgs { overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; max-width: 100%; }
.msg .who-ai { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); flex: none; }
.msg .who-ai .ic { width: 18px; height: 18px; }
.bubble { padding: 11px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; min-width: 0; }
.msg.me { justify-content: flex-end; }
.msg.me .bubble { background: var(--surface-3); border-bottom-right-radius: 4px; max-width: 86%; }
.msg.ai .bubble { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; box-shadow: inset 3px 0 0 var(--teal); }
.msg.ai .bubble p + p, .msg.ai .bubble p + .build, .msg.ai .bubble .build + p { margin-top: 10px; }
.msg time { display: block; font-size: 12px; color: var(--dim); margin-top: 4px; }
.msg.me time { text-align: right; }
.build { border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; font-size: 13px; }
.build-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--muted); }
.build-row:last-child { border-bottom: 0; }
.build-row .ic { width: 15px; height: 15px; color: var(--teal); }
.build-row b { color: var(--text); font-weight: 600; }
.build-row .r { margin-left: auto; font-weight: 700; color: var(--text); white-space: nowrap; }
.build-row.fail .ic { color: var(--danger); }
.build-row.spin .ic { animation: spin 1s linear infinite; color: var(--gold-text); }
@keyframes spin { to { transform: rotate(360deg); } }
.build-foot { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface-2); flex-wrap: wrap; }
.build-foot .pill { padding: 3px 8px; }
.build-foot .undo-this { margin-left: auto; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.build-foot .undo-this:hover { color: var(--text); background: var(--surface-3); }
.build-foot .undo-this .ic { width: 13px; height: 13px; }
.thumbs { display: flex; gap: 6px; margin-top: 10px; }
.thumbs img { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: bob 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.composer { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.suggest { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }
.suggest button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: var(--r-pill); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.suggest button:hover { color: var(--text); border-color: var(--teal); }
.suggest .ic { width: 13px; height: 13px; color: var(--teal); }
.prompt { border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); padding: 10px 10px 8px 14px; transition: border-color .15s, box-shadow .15s; }
.prompt:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.prompt textarea { width: 100%; border: 0; background: none; outline: none; resize: none; min-height: 48px; max-height: 160px; font-size: 15px; line-height: 1.5; }
.prompt-row { display: flex; align-items: center; gap: 4px; }
.prompt-row .est { margin-left: auto; font-size: 12px; color: var(--dim); display: inline-flex; gap: 4px; align-items: center; margin-right: 8px; }
.prompt-row .est .ic { width: 13px; height: 13px; color: var(--gold-text); }
.send { width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer; display: grid; place-items: center; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); }
.send .ic { width: 18px; height: 18px; }
.prompt .icon-btn { width: 34px; height: 34px; }
.preview { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; padding: 14px; gap: 12px; background: var(--bg); }
.pv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-bar .seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.pv-bar .seg button { border: 0; background: none; padding: 5px 9px; border-radius: 7px; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.pv-bar .seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.pv-bar .seg .ic { width: 17px; height: 17px; }
.stage { position: relative; min-height: 0; border-radius: 18px; overflow: hidden; background: #0b0c10; border: 1px solid var(--line); display: grid; place-items: center; }
.stage.phone-frame #engine-mount { width: min(100%, 380px); aspect-ratio: 9 / 16; height: auto; max-height: 100%; border-radius: 26px; border: 8px solid #1b1d24; }
#engine-mount { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0b0c10; }
#engine-mount canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#engine-mount .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .4s; }
.mount-note { position: absolute; bottom: 14px; left: 14px; padding: 5px 12px; border-radius: var(--r-pill); background: rgba(10, 11, 16, 0.72); color: #cfd2d8; font-size: 12px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; border: 1px dashed rgba(255, 255, 255, 0.25); }
.mount-note .ic { width: 14px; height: 14px; color: var(--teal); }
.hud { position: absolute; inset: 0; pointer-events: none; color: #fff; font-family: var(--font-display); }
.hud-hp { position: absolute; left: 16px; top: 16px; display: flex; gap: 10px; align-items: center; }
.hud-hp .face { width: 46px; height: 46px; border-radius: 50%; background: #2a3a4f url("../img/assets/chibi-knight.jpg") center / cover; border: 3px solid #ffd47a; }
.hud-hp .bars { display: flex; flex-direction: column; gap: 4px; }
.hud-hp .bar { width: 150px; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.5); overflow: hidden; border: 2px solid rgba(0, 0, 0, 0.5); }
.hud-hp .bar i { display: block; height: 100%; width: 78%; background: linear-gradient(180deg, #ff8a7a, #e8463a); }
.hud-hp .bar.mp i { width: 56%; background: linear-gradient(180deg, #7fd0ff, #2f8ee0); }
.hud-wave { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.5); font-weight: 600; font-size: 18px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); white-space: nowrap; }
.hud-gems { position: absolute; right: 16px; top: 16px; padding: 6px 12px 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; }
.hud-gems i { width: 22px; height: 22px; border-radius: 6px; background: url("../img/assets/purple-crystal.jpg") center / 160%; }
.hud-skills { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hud-skills span { width: 46px; height: 46px; border-radius: 12px; background: rgba(0, 0, 0, 0.55); border: 2px solid rgba(255, 212, 122, 0.7); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.stage-veil { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 11, 16, 0.55); backdrop-filter: blur(2px); color: #eef0f3; opacity: 0; pointer-events: none; transition: opacity .25s; }
.stage.building .stage-veil { opacity: 1; }
.stage.building .poster { filter: saturate(.4) brightness(.8); }
.stage-veil div { text-align: center; font-weight: 700; }
.stage-veil .ring { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.15); border-top-color: var(--teal); animation: spin 0.9s linear infinite; }
.stage-veil small { display: block; font-weight: 600; color: #b9bdc6; margin-top: 4px; }
.testbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.testbar .ok { color: var(--teal); font-weight: 800; display: inline-flex; gap: 6px; align-items: center; }
.testbar .ok .ic { width: 16px; height: 16px; }
.testbar .m { color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.testbar .m b { color: var(--text); }
.testbar .m .ic { width: 14px; height: 14px; }
.testbar .grow { flex: 1; }
.phone-tabs { display: none; }

/* drawer (history) + dialogs */
.overlay { position: fixed; inset: 0; z-index: 100; background: var(--scrim); opacity: 0; transition: opacity .18s; display: grid; place-items: center; padding: 16px; }
.overlay.on { opacity: 1; }
.overlay[hidden] { display: none; }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(10px) scale(.98); transition: transform .18s; }
.overlay.on .dialog { transform: none; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: var(--fs-xl); }
.dialog-body { padding: 20px; display: grid; gap: 16px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 20px 20px; }
.overlay.drawer { place-items: stretch end; padding: 0; }
.drawer .panel { width: min(420px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line); display: grid; grid-template-rows: auto minmax(0, 1fr); transform: translateX(30px); transition: transform .18s; }
.drawer.on .panel { transform: none; }
.versions { overflow-y: auto; padding: 10px 14px 20px; }
.ver-item { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 12px 8px; border-radius: 10px; }
.ver-item:hover { background: var(--surface-2); }
.ver-item::before { content: ""; position: absolute; left: 18px; top: 30px; bottom: -12px; width: 2px; background: var(--line); }
.ver-item:last-child::before { display: none; }
.ver-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); display: grid; place-items: center; position: relative; z-index: 1; }
.ver-item.current .ver-dot { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.ver-dot .ic { width: 12px; height: 12px; }
.ver-item b { font-size: var(--fs-sm); }
.ver-item p { font-size: 13px; color: var(--muted); }
.ver-item small { font-size: 12px; color: var(--dim); }
.ver-item .btn { align-self: center; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 700; }
.field small { color: var(--dim); font-size: var(--fs-xs); }
.input, .field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); outline: none; font-size: 15px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.covers-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.covers-pick label { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.covers-pick input { position: absolute; opacity: 0; }
.covers-pick img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.covers-pick label:has(input:checked) { border-color: var(--gold); }
.vis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vis label { display: grid; gap: 2px; padding: 11px; border-radius: 11px; border: 1px solid var(--line-2); cursor: pointer; font-size: var(--fs-sm); }
.vis label small { color: var(--muted); font-size: 12px; }
.vis input { position: absolute; opacity: 0; }
.vis label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.published { text-align: center; padding: 34px 24px 26px; }
/* the card clip being recorded in the publish dialog (studio.js recordSnippet): the frame drawn at 640x360, scaled to fit */
.snip-rec { display: grid; gap: 8px; padding: 0 20px 20px; }
.snip-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #05060a; }
.snip-stage:empty { display: none; }
.snip-frame { position: absolute; left: 0; top: 0; width: 640px; height: 360px; border: 0; transform-origin: 0 0; }
.snip-preview { display: block; width: 100%; height: 100%; object-fit: cover; }
.snip-rec .row-btns { justify-content: flex-start; }
.published .burst { width: 86px; height: 86px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 0 0 12px var(--gold-soft), 0 0 0 26px rgba(240, 180, 60, 0.06); }
.published .burst .ic { width: 40px; height: 40px; }
.published h2 { font-size: var(--fs-2xl); margin-bottom: 6px; }
.linkbox { display: flex; gap: 8px; align-items: center; margin: 18px 0 6px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: var(--fs-sm); text-align: left; }
.linkbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* toasts */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; }
.toast { display: flex; gap: 8px; align-items: center; padding: 11px 16px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-weight: 700; font-size: var(--fs-sm); box-shadow: var(--shadow); animation: up .2s ease; transition: opacity .4s, transform .4s; }
.toast .ic { width: 16px; height: 16px; color: var(--teal); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- asset browser */
.lib { display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px; gap: 22px; margin-top: 24px; align-items: start; }
.lib-side { position: sticky; top: calc(var(--head) + 20px); display: grid; gap: 4px; }
.lib-side a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.lib-side a:hover { background: var(--surface); color: var(--text); }
.lib-side a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.lib-side a span { margin-left: auto; font-size: 12px; color: var(--dim); }
.lib-side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }
.lib-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.lib-top .search { margin: 0; max-width: none; flex: 1 1 280px; height: 46px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.acard { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: 8px; cursor: pointer; text-align: left; transition: border-color .15s, transform .15s; }
.acard:hover { transform: translateY(-2px); border-color: var(--line-2); }
.acard[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.acard img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }
.acard b { display: block; font-size: var(--fs-sm); margin: 9px 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard small { display: flex; justify-content: space-between; gap: 6px; margin: 2px 4px 2px; font-size: 12px; color: var(--muted); }
.acard .gen { color: var(--teal); }
.adetail { position: sticky; top: calc(var(--head) + 20px); padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.adetail .turn { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--bg-2); }
.adetail .turn img { width: 100%; height: 100%; object-fit: cover; }
.adetail .turn .seg3d { position: absolute; bottom: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.adetail .turn .seg3d span { padding: 4px 9px; border-radius: 8px; background: rgba(10, 11, 16, 0.65); color: #e9eaee; font-size: 12px; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.adetail .turn .seg3d .ic { width: 13px; height: 13px; }
.adetail h2 { font-size: var(--fs-xl); margin: 14px 0 2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 14px 0; font-size: var(--fs-sm); }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.gen-cta { margin-top: 18px; padding: 16px; border-radius: 16px; background: linear-gradient(150deg, var(--teal-soft), transparent 70%), var(--bg-2); border: 1px solid var(--line); }
.gen-cta h3 { font-size: var(--fs-lg); display: flex; gap: 8px; align-items: center; }
.gen-cta h3 .ic { color: var(--teal); }
.gen-cta p { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.pipeline { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; margin: 8px 0 4px; }
.pipeline span { padding: 3px 8px; border-radius: 7px; background: var(--surface-2); }
.pipeline .ic { width: 12px; height: 12px; }

/* ---------------------------------------------------------------- profile */
.pf-banner { height: 240px; border-radius: 22px; overflow: hidden; margin-top: 20px; position: relative; }
.pf-banner img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.pf-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 16, 0.55), transparent 60%); }
.pf-head { display: flex; gap: 22px; align-items: flex-end; margin-top: -56px; padding: 0 28px; position: relative; z-index: 2; flex-wrap: wrap; }
.pf-who { flex: 1; min-width: 240px; padding-bottom: 6px; }
.pf-who h1 { font-size: var(--fs-2xl); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pf-who p { color: var(--muted); }
.pf-actions { display: flex; gap: 8px; padding-bottom: 8px; }
.pf-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; margin-top: 28px; align-items: start; }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-side p { color: var(--muted); font-size: var(--fs-sm); margin: 14px 0; }
.badges-row { display: flex; gap: 6px; flex-wrap: wrap; }
.earn { margin-top: 16px; }
.earn .meter { margin-top: 10px; }

/* ---------------------------------------------------------------- account */
.acc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; margin-top: 24px; align-items: start; }
.card { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.card + .card { margin-top: 22px; }
.card h2 { font-size: var(--fs-xl); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.balance { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 22px; border-radius: 18px; background: linear-gradient(135deg, var(--gold-soft), transparent 65%), var(--bg-2); border: 1px solid rgba(240, 180, 60, 0.3); }
.coin-big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold) 70%); color: var(--gold-ink); box-shadow: inset 0 -5px 0 rgba(36, 23, 3, 0.2), 0 6px 18px rgba(240, 180, 60, 0.3); }
.coin-big .ic { width: 40px; height: 40px; }
.balance b { font-family: var(--font-display); font-weight: 700; font-size: 46px; line-height: 1; }
.balance small { color: var(--muted); }
.meter { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.meter-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pack { padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-2); display: grid; gap: 4px; position: relative; }
.pack b { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); }
.pack small { color: var(--muted); }
.pack .btn { margin-top: 10px; }
.pack.best { border-color: var(--gold); }
.pack.best::before { content: "Best value"; position: absolute; top: -10px; right: 12px; padding: 2px 9px; border-radius: var(--r-pill); background: var(--gold); color: var(--gold-ink); font-size: 12px; font-weight: 800; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); }
.plan.current { border-color: var(--teal); background: var(--teal-soft); }
.plan h3 { font-size: var(--fs-lg); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: var(--fs-sm); }
.plan li { margin: 4px 0; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.t th { text-align: left; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
table.t .neg { color: var(--coral-text); }
table.t .pos { color: var(--teal); }
.t-game { display: flex; gap: 10px; align-items: center; }
.t-game img { width: 44px; height: 33px; border-radius: 6px; object-fit: cover; }
.t-wrap { overflow-x: auto; margin: 0 -10px; }
.t-wrap table.t { min-width: 540px; }
.adm > *, .acc > *, .lib > *, .pf-grid > *, .gp > *, .st-main > * { min-width: 0; }
.signins { display: grid; gap: 10px; }
.signin-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.signin-row .ic { color: var(--muted); }
.signin-row span { flex: 1; }

/* ---------------------------------------------------------------- admin */
.adm { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; margin-top: 24px; align-items: start; }
.adm-side { position: sticky; top: calc(var(--head) + 20px); display: grid; gap: 4px; }
.adm-side a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); }
.adm-side a:hover { background: var(--surface); color: var(--text); }
.adm-side a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.adm-side a .count { margin-left: auto; padding: 1px 8px; border-radius: var(--r-pill); background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.kpi small { font-size: var(--fs-xs); color: var(--dim); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.kpi b { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); margin: 4px 0 2px; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi .up { color: var(--coral-text); font-weight: 700; }
.kpi .down { color: var(--teal); font-weight: 700; }
.chart { margin-top: 6px; overflow-x: auto; }
.chart svg { min-width: 560px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridl { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--dim); font-size: 11px; font-family: var(--font-body); }
.chart .val { fill: var(--muted); font-size: 11px; font-weight: 700; font-family: var(--font-body); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.sev { display: inline-flex; padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.sev.high { background: var(--danger-soft); color: var(--danger); }
.sev.med { background: var(--gold-soft); color: var(--gold-text); }
.sev.low { background: var(--surface-3); color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.feat-list { display: grid; gap: 8px; }
.feat { display: grid; grid-template-columns: 20px 80px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.feat img { width: 80px; height: 50px; border-radius: 8px; object-fit: cover; }
.feat .grip { color: var(--dim); cursor: grab; }
.feat small { color: var(--muted); font-size: 12px; display: block; }
.invite-gen { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.invite-gen .field { flex: 1 1 180px; }
code.code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; padding: 3px 8px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- sign-in (invite gate) */
body.gate { min-height: 100vh; display: grid; }
.gate-wrap { position: relative; display: grid; grid-template-columns: 1fr minmax(0, 520px); min-height: 100vh; }
.gate-art { position: relative; overflow: hidden; }
.gate-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 11, 16, 0.1), rgba(10, 11, 16, 0.55)), linear-gradient(0deg, rgba(10, 11, 16, 0.7), transparent 45%); }
.gate-art .caption { position: absolute; left: 36px; bottom: 32px; z-index: 2; color: #f2f3f5; max-width: 460px; }
.gate-art .caption h2 { font-size: var(--fs-3xl); font-weight: 700; margin: 10px 0 8px; }
.gate-art .caption p { color: #d0d3d9; }
.gate-art .wordmark { position: absolute; top: 26px; left: 32px; z-index: 2; }
.gate-art .wordmark img { height: 40px; }
.gate-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px 48px 32px; background: var(--bg); gap: 18px; }
.gate-panel .top-actions { position: absolute; top: 18px; right: 18px; }
.gate-panel h1 { font-size: var(--fs-3xl); font-weight: 700; }
.gate-panel .lead { color: var(--muted); font-size: var(--fs-lg); }
.lock-chip { display: inline-flex; gap: 8px; align-items: center; align-self: flex-start; padding: 6px 12px; border-radius: var(--r-pill); background: var(--teal-soft); color: var(--teal); font-size: var(--fs-sm); font-weight: 700; }
.lock-chip .ic { width: 15px; height: 15px; }
.code-in { display: flex; gap: 8px; }
.code-in input { flex: 1; min-width: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; outline: none; }
.code-in input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.code-ok { display: none; gap: 8px; align-items: center; color: var(--teal); font-weight: 700; font-size: var(--fs-sm); }
.code-ok .ic { width: 16px; height: 16px; }
.gate-panel.valid .code-ok { display: flex; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-btns { display: grid; gap: 10px; }
.auth-btns .btn { justify-content: flex-start; border-radius: 14px; padding: 13px 16px; }
.auth-btns .btn .r { margin-left: auto; color: var(--dim); }
.gate-panel.locked .auth-btns { opacity: .45; pointer-events: none; }
.play-free { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; gap: 12px; align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.play-free b { color: var(--text); }
.play-free .ic { color: var(--gold-text); width: 22px; height: 22px; }
.wait { font-size: var(--fs-sm); color: var(--muted); }
.wait a { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line-2); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .lib { grid-template-columns: 190px minmax(0, 1fr); }
  .adetail { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
  .adetail .turn { grid-row: span 3; }
  .adetail h2 { margin-top: 0; }
  .st-main { grid-template-columns: 360px minmax(0, 1fr); }
  .nav a { padding: 8px 9px; }
}
@media (max-width: 1020px) {
  .top-row { gap: 14px; }
  .search { max-width: 260px; }
  .gp { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .acc { grid-template-columns: 1fr; }
  .st-saved, .st-tools .ver { display: none; }
}
/* THE HEADER between the phone menu and a wide window (861-1280 px): four tabs (Devlog since 2026-10-14), the search
   and the actions share one row, signed out, signed in and as staff. Before the fourth tab the row already ran off
   the page by ~50 px at 900 px (the search held its width) and, signed in, up to ~1110 px. Here the search may narrow
   to 100 px, "New game" is its + icon (named by aria-label and title), the credits pill shows the number alone, and
   the staff's Admin tab steps back into the account menu (where it always is) up to 1400 px - measured with no
   overflow of the page or the header row from 861 to 1500 px in all three states. */
@media (max-width: 1280px) and (min-width: 861px) {
  .top-row > .search { min-width: 100px; }
  .new-game .btn-word, .credits-pill .cr-word { display: none; }
  .new-game { padding-left: 10px; padding-right: 10px; }
}
/* the staff's fifth tab needs ~70 px more: below 1400 px it is the account menu's Admin item only */
@media (max-width: 1400px) and (min-width: 861px) {
  .nav a[href="admin.html"] { display: none; }
}
@media (max-width: 1100px) and (min-width: 861px) {
  .top-row { gap: 10px; }
  .nav a { padding: 8px 7px; letter-spacing: 0.02em; font-size: 13px; }
}
@media (max-width: 960px) and (min-width: 861px) {
  .top-row { gap: 8px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 5px; }
  .top-row > .search { min-width: 84px; }
}
@media (max-width: 860px) {
  .burger { display: inline-grid; }
  .nav { position: fixed; top: var(--head); left: 0; right: 0; flex-direction: column; padding: 10px var(--gutter) 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
  .top.nav-open .nav { display: flex; }
  .nav a { padding: 13px 10px; }
  .top .search { display: none; }
  .top-actions { margin-left: auto; }
  .hide-sm { display: none !important; }
  .hero { min-height: 560px; border-radius: 18px; }
  .hero { min-height: 640px; }
  .hero > img { height: 46%; object-position: 30% 50%; }
  .hero { background: #0f1015; }
  .hero::before { background: linear-gradient(0deg, #0f1015 54%, rgba(15, 16, 21, 0.55) 70%, rgba(15, 16, 21, 0) 100%); }
  .hero-copy { padding: 26px 22px; }
  .hero-side { display: none; }
  .ask { grid-template-columns: auto 1fr; }
  .ask .btn { grid-column: 1 / -1; }
  .steps, .kits, .ours { grid-template-columns: 1fr; }
  .news article { grid-template-columns: 1fr; gap: 6px; }
  .spot { grid-template-columns: 1fr; }
  .spot-art { min-height: 220px; }
  .spot-body { padding: 24px; }
  .foot-row { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .gp-stats { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .lib { grid-template-columns: 1fr; }
  .lib-side { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .lib-side hr, .lib-side .eyebrow { display: none; }
  .lib-side a span { display: none; }
  .adetail { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-head { padding: 0 8px; }
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .gate-wrap { grid-template-columns: 1fr; }
  .gate-art { min-height: 240px; }
  .gate-art .caption { display: none; }
  .gate-panel { padding: 28px var(--gutter) 32px; }

  /* studio on a phone: Chat | Preview tabs */
  .st-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
  .studio { grid-template-rows: 56px auto minmax(0, 1fr); }
  .phone-tabs { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
  .phone-tabs button { flex: 1; border: 0; padding: 9px; border-radius: 10px; background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
  .phone-tabs button[aria-selected="true"] { background: var(--teal); color: var(--teal-ink); }
  .phone-tabs .ic { width: 16px; height: 16px; }
  .studio[data-view="chat"] .preview { display: none; }
  .studio[data-view="preview"] .chat { display: none; }
  .chat { border-right: 0; }
  .st-bar { gap: 6px; padding: 0 8px; }
  .st-bar .st-sep, .st-tools .hide-phone { display: none; }
  .st-bar .wordmark .logo-d, .st-bar .wordmark .logo-l { display: none !important; }
  .st-bar .wordmark .logo-sym { display: block; height: 30px; }
  .st-name { width: 10ch; min-width: 8ch; font-size: 15px; }
  .st-project { flex: 1 1 auto; }
  .st-tools { margin: 0 0 0 auto; }
  .st-right .credits-pill span { display: none; }
  .st-right .btn { padding: 8px 12px; }
  .preview { padding: 10px; }
  .hud-hp .bar { width: 96px; }
  .mount-note { display: none; }
  .hud-skills span { width: 38px; height: 38px; }
}
@media (max-width: 520px) {
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .gtext h3 { font-size: 14px; }
  .gbody .av { display: none; }
  .gstats { padding-left: 0; gap: 10px; }
  .gstats .online { display: none; }
  .gpanel { left: -6px; right: -6px; }
  .gstats { flex-wrap: wrap; row-gap: 4px; }
  .gstats .live { order: 3; flex-basis: 100%; white-space: nowrap; }
  .gstats .when { white-space: nowrap; }
  .gtags-under li:nth-child(n+3) { display: none; }
  .kit-tag { display: none; }
  .hide-xs { display: none !important; }
  .show-xs { display: inline; }
  .top .wordmark img { height: 30px; }
  .gp-title h1 { font-size: 30px; }
  .packs { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .balance { padding: 16px; gap: 14px; align-items: start; }
  .coin-big { width: 52px; height: 52px; }
  .coin-big .ic { width: 28px; height: 28px; }
  .balance b { font-size: 38px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .foot-row { grid-template-columns: 1fr; }
  .covers-pick, .vis { grid-template-columns: 1fr 1fr; }
  .pf-stats { grid-template-columns: 1fr 1fr; }
  .feat { grid-template-columns: 64px 1fr; }
  .feat img { width: 64px; height: 42px; }
  .feat .grip, .feat .row-actions { display: none; }
  .st-right .credits-pill { padding: 5px 9px 5px 6px; }
  .hud-wave { font-size: 14px; top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ================================================================ PHASE 3: the real pages (accounts, my games, the
   game page, search, admin, the live studio). Tokens only, as above. */
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: var(--r); background: var(--gold); color: var(--gold-ink); font-weight: 800; }
.skip:focus { top: 10px; }
.demo-flag { white-space: nowrap; }
.grow { flex: 1; }
.tiny { font-size: 12px; }
.tiny-p { font-size: 13px; }
.b18 { font-size: 18px !important; }
.h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin: 0; }
.h4 { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; margin: 0 0 8px; }
.neg { color: var(--coral-text); } .pos { color: var(--teal); }
.btn-block { width: 100%; }
.row-ic { display: flex; gap: 8px; align-items: center; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-btns.center { justify-content: center; margin-top: 16px; }
.stack { display: grid; gap: 14px; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm); font-weight: 600; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--teal-soft); color: var(--text); font-size: var(--fs-sm); margin: 0; }
.notice .ic { color: var(--teal); flex: none; margin-top: 2px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.link-like { color: var(--sky); text-decoration: underline; cursor: pointer; font-weight: 700; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-size: var(--fs-sm); font-weight: 700; margin-bottom: 6px; padding: 0; }
.pill-onart { background: rgba(10, 11, 16, 0.55); color: #f2f3f5; backdrop-filter: blur(6px); }
.wrap.narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.prose { margin-top: 32px; }
.prose h1 { font-size: var(--fs-3xl); margin: 12px 0; }
.prose h2 { font-size: var(--fs-xl); margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose p.lead { font-size: var(--fs-lg); color: var(--text); }
.prose ul { padding-left: 20px; }
.prose a:not(.btn) { color: var(--sky); text-decoration: underline; }

/* the header's extras: the email nag */
.verify-bar { position: absolute; left: 0; right: 0; top: 100%; background: var(--gold-soft); border-bottom: 1px solid rgba(240, 180, 60, 0.35); backdrop-filter: blur(12px); font-size: var(--fs-sm); }
.verify-bar .wrap { display: flex; gap: 10px; align-items: center; padding: 8px 0; flex-wrap: wrap; }
.verify-bar .ic { color: var(--gold-text); }
.top:has(.verify-bar) ~ main { margin-top: 52px; }

/* page heads, empty and missing states */
.page-head { margin-top: 28px; margin-bottom: 18px; }
.page-head h1 { font-size: var(--fs-2xl); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.state-page { max-width: 520px; margin: 72px auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.state-page.inline { margin: 40px auto; grid-column: 1 / -1; }
.state-page h1, .state-page h2 { font-size: var(--fs-2xl); }
.empty { grid-column: 1 / -1; }
.sec-title { margin: 28px 0 14px; }
.small-print { font-size: 13px; margin-top: 14px; }
.small-print a { color: var(--sky); }
.ph { display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, var(--surface-3), var(--surface)); color: var(--dim); }

/* cards while loading */
.gcard.sk .gcover { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.sk-line { height: 12px; border-radius: 6px; background: var(--surface); margin: 14px 0 0 44px; width: 70%; }
.sk-line.short { width: 40%; margin-top: 8px; }
@keyframes shimmer { to { background-position: -300% 0; } }
.gstats .when { margin-left: auto; color: var(--dim); font-weight: 600; }
.gstats .free { color: var(--teal); }
.gstats .free .ic { color: var(--teal) !important; }

/* home: the plans */
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card { position: relative; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.plan-card.hot { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.plan-card .tag { position: absolute; top: -11px; right: 16px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--gold); color: var(--gold-ink); font-size: 12px; font-weight: 800; }
.plan-card h3 { font-size: var(--fs-xl); }
.plan-card .price { margin-top: 6px; color: var(--muted); }
.plan-card .price b { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--text); }
.plan-card .cr { color: var(--gold-text); font-weight: 700; font-size: var(--fs-sm); }
.plan-card .cr span { color: var(--dim); font-weight: 600; }
.plan-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: var(--fs-sm); }
.plan-card li { margin: 4px 0; }

/* search */
.search.big { max-width: 640px; height: 54px; margin: 14px 0 0; padding-right: 7px; }
.search.big input { font-size: var(--fs-md); }
.inline-search { margin: 0; max-width: 420px; }
.creator-row { display: flex; gap: 10px; flex-wrap: wrap; }
.creator-chip { display: inline-flex; gap: 10px; align-items: center; padding: 8px 14px 8px 8px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.creator-chip:hover { border-color: var(--teal); }
.creator-chip span { display: grid; line-height: 1.25; }
.creator-chip small { color: var(--muted); font-size: 12px; }

/* the game page */
.status-banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--gold-soft); font-size: var(--fs-sm); font-weight: 600; }
.status-banner.taken_down { background: var(--danger-soft); color: var(--danger); }
.status-banner.unlisted { background: var(--teal-soft); }
.play-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 2; }
.player.playing .player-top, .player.playing > img { display: none; }
.player .player-bar { z-index: 3; }
.player.playing .player-bar { left: auto; right: 10px; bottom: 10px; }
.player.playing .open-full { display: none; }
.open-full { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(10, 11, 16, 0.6); color: #eceef2; font-weight: 700; font-size: 13px; }
.gp-sub .by { display: inline-flex; gap: 8px; align-items: center; }
.trailer-video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 16 / 9; }
.trailer-soon { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.trailer-soon img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.5) brightness(.6); }
.trailer-soon > div { position: absolute; inset: auto 16px 16px 16px; color: #f2f3f5; display: grid; gap: 8px; justify-items: start; }
.trailer-soon .pill { background: rgba(10, 11, 16, 0.7); color: #f2f3f5; }
.dl-grid { display: grid; gap: 10px; }
.dl { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.dl > div { flex: 1; display: grid; }
.dl small { color: var(--muted); }
.dl-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); flex: none; }
.dl.off .dl-ic { background: var(--surface-2); color: var(--dim); }

/* the full-screen player */
body.play-only { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 48px minmax(0, 1fr); background: #000; overflow: hidden; }
.play-bar { display: flex; align-items: center; gap: 10px; padding: 0 10px; background: #0b0c10; color: #eceef2; border-bottom: 1px solid #1f222b; }
.play-bar .icon-btn { color: #eceef2; }
.play-bar .wordmark img { height: 28px; }
.play-stage { position: relative; }
.play-msg { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa0ad; }

/* sign-in, verify, reset */
.gate-panel { position: relative; }
.gate-panel > section { display: grid; gap: 16px; }
.gate-art .wordmark img { height: 40px; }
.google-btn { justify-content: center !important; }
[data-google-slot] { min-height: 44px; }
.otp { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 22px !important; letter-spacing: 0.3em; text-align: center; }
.outbox { border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px; display: grid; gap: 6px; }
.outbox a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface); font-size: var(--fs-sm); }
.outbox a:hover { background: var(--surface-2); }
.outbox a span { display: grid; }
.outbox small { color: var(--muted); }
.ai-orb.ok { background: var(--teal-soft); color: var(--teal); }
.ai-orb.bad { background: var(--danger-soft); color: var(--danger); }
body.mini-page { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); }
.mini-card { width: min(460px, 100%); padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 16px; justify-items: start; }
.mini-card > div { display: grid; gap: 14px; justify-items: start; width: 100%; }
.mini-card h1 { font-size: var(--fs-2xl); }
.mini-card form { width: 100%; }
.ring { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--teal); animation: spin .9s linear infinite; }

/* my games */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.proj { display: grid; grid-template-rows: auto 1fr auto; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.proj-cover { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: var(--bg-2); }
.proj-cover img, .proj-cover .ph { width: 100%; height: 100%; object-fit: cover; }
.proj-cover .ph .ic { width: 40px; height: 40px; }
.proj-body { padding: 14px 16px 4px; display: grid; gap: 4px; }
.proj-body h2 a:hover { color: var(--gold-text); }
.proj-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.proj-actions { display: flex; gap: 8px; align-items: center; padding: 12px 16px 14px; }
.proj-actions .menu-wrap { margin-left: auto; }
.proj-actions .menu { min-width: 180px; }

/* account */
.t .sub.indent { margin-left: 34px; }
.signin-row small { display: block; }
.signin-row .pill, .signin-row .btn { flex: none; }
.sessions { display: grid; gap: 8px; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 14px; width: max-content; margin: 4px auto; }
.qr svg { display: block; width: 168px; height: 168px; }
.recovery { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.danger-zone { border-color: rgba(255, 93, 93, 0.35); }
.switch { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; margin: 10px 0; }
.switch input, .check-row input { width: 18px; height: 18px; accent-color: var(--teal); }
.check-row { display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); cursor: pointer; }

/* admin */
.mfa-card { width: min(420px, 100%); margin: 48px auto; padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; justify-items: center; text-align: center; }
.mfa-card .field { width: 100%; }
.queue { display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.q-item > img, .q-item > .ph { width: 96px; height: 60px; border-radius: 10px; object-fit: cover; }
.q-why { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.q-reports { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.t-game > span { display: grid; }
.t-game a:hover b { color: var(--gold-text); }
label.feat { cursor: pointer; }
.feat input { width: 18px; height: 18px; accent-color: var(--gold); }
.tip { position: fixed; z-index: 90; pointer-events: none; padding: 7px 10px; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); font-size: 12px; color: var(--text); opacity: 0; transition: opacity .1s; }
.tip b { display: block; font-size: 14px; }
details.tbl summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 10px; }
.adm section.card { margin-top: 22px; }

/* the studio */
.st-project { flex: 1 1 auto; }
.st-project img { background: var(--surface); }
.studio-logo img { height: 30px; }
.sys-line { align-self: center; font-size: 12px; color: var(--dim); padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface); text-align: center; max-width: 90%; }
.msg.warn .bubble { box-shadow: inset 3px 0 0 var(--coral); }
.msg.warn .who-ai { background: var(--coral-soft); color: var(--coral-text); }
.prompt-row .stop { margin-right: 6px; padding: 6px 12px; }
.send[disabled] { opacity: .5; cursor: not-allowed; }
.stage .play-frame { z-index: 1; }
.stage .stage-veil { z-index: 2; }
#engine-mount .poster { z-index: 1; }
.lib-drawer .panel { width: min(1100px, 100%); }
.lib-drawer .dialog-head { gap: 12px; }
.lib-drawer .dialog-head h2 { margin-right: auto; }
.lib-frame { min-height: 0; }
.lib-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.docpanel .vers .cur { box-shadow: inset 3px 0 0 var(--teal); }
.docpanel.shared { display: flex; margin-top: 28px; border: 1px solid var(--line); border-radius: 20px; }
.docpanel.shared h1 { font-size: var(--fs-2xl); }
.step-shots:empty { display: none; }

@media (max-width: 1020px) {
  .plan-cards { grid-template-columns: 1fr; }
  .q-item { grid-template-columns: 72px minmax(0, 1fr); }
  .q-item .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .q-item > img, .q-item > .ph { width: 72px; height: 48px; }
}
@media (max-width: 860px) {
  .verify-bar { position: static; }
  .top:has(.verify-bar) { height: auto; min-height: var(--head); }
  .top:has(.verify-bar) .top-row { height: var(--head); }
  .top:has(.verify-bar) ~ main { margin-top: 0; }
  .demo-flag { display: none; }
  .st-project img, .st-saved { display: none; }
  .st-name { width: 100%; }
  .st-right .btn-ghost { display: none; }
  .lib-drawer .panel { width: 100%; }
  .recovery { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .st-tools .icon-btn[data-history] { display: none; }
  .st-right { gap: 6px; }
  .gp-actions .btn { padding: 10px 14px; }
  .dl { flex-wrap: wrap; }
  .mini-card { padding: 20px; }
}
.doc-back { display: none; }
.studio[data-doc="on"] .doc-back { display: inline-flex; }
@media (min-width: 1500px) { .studio[data-doc="on"] .doc-back { display: none; } }
@media (max-width: 760px) { .studio .doc-back { display: none !important; } }
.done-shots:empty { display: none; }
.signin-row > span { min-width: 0; overflow-wrap: anywhere; }
.signin-row { flex-wrap: wrap; }
.chat, .preview, .docpanel { grid-template-columns: minmax(0, 1fr); min-width: 0; }
@media (max-width: 860px) { .st-bar .hide-phone { display: none; } .st-project { min-width: 0; } }

/* ================================================================ THE 2026-10 DESIGN QA: what every page shares */
/* the footer sits at the bottom of a short page (no band of page colour under it) */
body:has(> footer.foot) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> footer.foot) > main { flex: 1 0 auto; }
body:has(> footer.foot) > .foot { flex: none; }
/* text over the dark sign-in art keeps the bright gold */
.gate-art .kicker { color: var(--gold); }
/* the phone menu: Search and Sign in / Join inside it, over a backdrop that closes it */
.show-sm { display: none !important; }
.nav-backdrop { display: none; }
@media (max-width: 860px) {
  .nav a.show-sm { display: flex !important; gap: 10px; align-items: center; text-transform: none; letter-spacing: 0; font-size: var(--fs-md); }
  .nav .nav-search.show-sm { display: flex !important; max-width: none; margin: 4px 0 8px; height: 46px; }
  .nav a.nav-join { color: var(--gold-text); }
  .nav { z-index: 61; box-shadow: var(--shadow); }
  /* the header's backdrop-filter makes it the box fixed children are placed in: so a size, not insets to the screen */
  .top.nav-open .nav-backdrop { display: block; position: fixed; top: var(--head); left: 0; width: 100%; height: 100vh; background: var(--scrim); z-index: 59; }
  /* tap targets: 44 px on a phone */
  .icon-btn { width: 44px; height: 44px; }
  .btn-sm { min-height: 44px; }
  .chip { min-height: 44px; }
  .foot nav { gap: 0; }
  .foot nav a { display: flex; align-items: center; min-height: 44px; }
  .wait a, .small-print a, .our-note a { display: inline-block; padding: 10px 0; }
}
/* sign-in and join: Google first (gold, the G on its white tile), the carried idea, the invite tucked away */
.google-btn { gap: 12px; }
.google-btn .g-tile { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(36, 23, 3, 0.25); flex: none; }
.legal-line { font-size: 13px; color: var(--muted); margin-top: -6px; }
.legal-line a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.idea-carry { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--teal-soft); border: 1px solid var(--line); }
.idea-carry > .ic { color: var(--teal); margin-top: 3px; }
.idea-carry q { display: block; font-weight: 700; color: var(--text); margin: 2px 0; quotes: "\201C" "\201D"; }
.idea-carry small { color: var(--muted); font-size: 13px; }
.invite-more { border-top: 1px solid var(--line); padding-top: 12px; }
.invite-more summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: var(--fs-sm); min-height: 44px; display: flex; align-items: center; }
.invite-more[open] summary { margin-bottom: 8px; }
.invite-more .field { display: grid; gap: 8px; }
@media (max-width: 860px) {
  .gate-panel { padding-top: 76px; }
  .gate-panel .top-actions { top: 14px; right: 12px; }
}
.gate-panel > section > .lock-chip { justify-self: start; }
@media (max-width: 860px) {
  .top .wordmark, .foot .wordmark { min-height: 44px; }
  .make-box input { min-height: 44px; }
  .search input { align-self: stretch; }
  .invite-more label { display: block; padding: 11px 0; }
}
/* the library's shelf tabs are drawn by its script: their row is reserved, so the whole library does not jump down
   when they arrive (the QA's library CLS 0.72) */
[data-libtabs] { min-height: 48px; }
/* pages whose content arrives after load keep the footer below the first screen (a footer pushed down while in view
   is a layout shift) */
body[data-page="assets"] > main, body[data-page="search"] > main { min-height: 100vh; }
