/* Banger website. Matches the launcher (launcher/src/theme.rs): a monochrome dark UI where colour comes from the game
   covers; white is the primary action; the ruby mark and Play button are the brand accents. */
:root {
  --bg: #121216;
  --rail: #0e0e11;
  --panel: #18181d;
  --card: #202027;
  --hover: #2a2a32;
  --border: #2c2c35;
  --text: #f2f2f4;
  --dim: #9a9aa6;
  --faint: #6c6c78;
  --ruby: #ff5a7a;
  --ruby-deep: #b8304f;
  --ok: #6fd39a;
  --bad: #ff8a8a;
  --radius: 14px;
  --gutter: clamp(16px, 3vw, 48px);
  --max: 1840px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 64px; outline: none; }
a { color: inherit; }
a:hover { color: #fff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
.dim { color: var(--dim); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; color: #d6d6dc; max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.error { color: var(--bad); }
.note { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.wordmark { font-weight: 800; letter-spacing: -.02em; font-size: 1.3rem; }
.wordmark.small { font-size: 1rem; }

/* shell: the Epic web store's two top bars (no rail on the website): a global bar across the window, then the store
   bar (search, tabs) over a centred content column of --max */
.globalbar { position: sticky; top: 0; z-index: 20; background: var(--rail); }
.globalbar-in { display: flex; align-items: center; gap: 32px; height: 56px; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand .wordmark { font-size: 1.15rem; }
.global-nav { display: flex; gap: 24px; }
.global-link { color: #cfcfd6; text-decoration: none; font-size: .875rem; white-space: nowrap; }
.global-link:hover, .global-link[aria-current="page"] { color: #fff; }
.globalbar .btn.get { min-height: 32px; padding: 0 14px; border-radius: 6px; font-size: .85rem; }
.icon { flex: none; }
.account { display: flex; align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; font-size: .875rem; color: #cfcfd6; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--panel); color: #fff; }
.menu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 6px; min-width: 220px; display: grid; box-shadow: 0 12px 40px rgba(0,0,0,.5); z-index: 30; }
.menu-list a, .menu-list button { text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 8px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--hover); }
.avatar-badge { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(140deg, var(--ruby), #7a2bff); font-weight: 800; font-size: 1.4rem; flex: none; }
.avatar-badge.small { width: 28px; height: 28px; font-size: .85rem; }

.topbar-in { display: flex; align-items: center; gap: 24px; width: 100%; max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 24px; }
.topbar-search { display: flex; align-items: center; gap: 8px; width: 220px; max-width: 100%; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); color: var(--dim); }
.topbar-search:focus-within { box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.topbar .topbar-search input[type="search"] { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: .875rem; outline: none; }
.topbar-search input::placeholder { color: var(--dim); }
.tabs-line { display: flex; gap: 24px; }
.tab { padding: 6px 0; color: var(--dim); font-size: .875rem; text-decoration: none; }
.tab:hover, .tab[aria-current="page"] { color: var(--text); }
.topbar-fill { flex: 1; }
@media (max-width: 899px) {
  /* the links drop under the mark and account as a row that scrolls sideways */
  .globalbar-in { flex-wrap: wrap; gap: 0 16px; height: auto; padding: 10px var(--gutter) 0; }
  .global-nav { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: 4px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .global-nav::-webkit-scrollbar { display: none; }
  .global-link { display: inline-flex; align-items: center; min-height: 44px; }
  .topbar-in { flex-wrap: wrap; gap: 4px 20px; padding: 12px var(--gutter) 8px; }
  .topbar-search { width: 100%; height: 44px; }
  .topbar .topbar-fill { display: none; }
  .tabs-line .tab { display: inline-flex; align-items: center; min-height: 44px; }
  body:not([data-route="home"]):not([data-route="browse"]):not([data-route="store"]) .topbar { display: none; }
}
@media (max-width: 560px) { .menu-name { display: none; } }

/* footer */
.foot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 24px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); border-top: 1px solid var(--border); background: var(--rail); color: var(--dim); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; flex: 1; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  background: #fff; color: #111; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #e4e4ea; color: #111; }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.35); }
.btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255,138,138,.4); }
.btn.disabled, .btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.btn-play {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 34px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 1.1rem; color: #fff;
  background: linear-gradient(180deg, #ff8fa6 0%, #ff5a7a 18%, #c23a5c 60%, #ff6d8b 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 8px rgba(80,0,20,.35), 0 6px 24px rgba(255,90,122,.35);
  text-shadow: 0 1px 2px rgba(80,0,20,.5);
}
.btn-play:hover { filter: brightness(1.08); color: #fff; }
.btn-play.small { min-height: 40px; padding: 0 22px; font-size: 1rem; }
.btn-play .tri { font-size: .8em; }

/* home: the launcher's Home (hero + featured list, poster row, spotlight, compact columns) */
.eyebrow { margin: 0 0 8px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.rt-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: rgba(18,18,22,.7); color: var(--text); border: 1px solid rgba(255,255,255,.25); white-space: nowrap; }
.rt-badge.solid { background: #fff; color: #111114; border-color: #fff; }
.carousel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; }
.hero { position: relative; min-width: 0; }
.slides { position: relative; isolation: isolate; aspect-ratio: 16 / 9; max-height: 68vh; min-height: 360px; width: 100%; overflow: hidden; border-radius: 16px; background: var(--panel); }
.slide { position: absolute; inset: 0; display: flex; align-items: flex-end; visibility: hidden; }
.slide.on, .slide.leaving { visibility: visible; }
.slide.leaving { pointer-events: none; }
/* the art bleeds 48px past each side (the launcher's BANNER_M) so its slide never shows an edge */
.slide-bg { position: absolute; top: 0; bottom: 0; left: -48px; right: -48px; z-index: 0; background-size: cover; background-position: center; }
.slide.on .slide-bg { z-index: 1; }
/* one scrim over every slide's art, so a crossfade never brightens the left */
.slides-scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(18,18,22,.91) 0%, rgba(18,18,22,0) 65%), linear-gradient(0deg, rgba(18,18,22,.55), transparent 45%); }
.slide-text { position: relative; z-index: 3; padding: clamp(20px, 3.5vw, 44px); max-width: 560px; }
.slide-title-art { display: block; max-width: min(380px, 70vw); max-height: 120px; object-fit: contain; object-position: left bottom; margin-bottom: 12px; filter: drop-shadow(0 4px 20px rgba(0,0,0,.6)); }
.slide-title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; }
.slide-blurb { color: #e6e6ea; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.slide-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 16px 0 10px; }
.slide-by { color: #cfcfd6; font-size: .9rem; margin: 0; }

/* The slide change, after the launcher (launcher/src/ui.rs `home`; fractions of TRANS_SECS = --trans-ms): the
   outgoing art slides left and blurs out over 0.08–0.55, its four text parts leaving 0.04 apart (0–0.3 …
   0.12–0.42); the incoming art comes in from the right, sharpening, over 0.28–0.82, its parts at 0.5–0.82,
   0.55–0.87, 0.6–0.92 and 0.66–0.98. Ease in out, ease out in. */
.slide { --t: var(--trans-ms, 1150ms); --in: cubic-bezier(.33, 1, .68, 1); --out: cubic-bezier(.32, 0, .67, 0); }
.slide.leaving .slide-bg { animation: bg-out calc(.47 * var(--t)) var(--out) calc(.08 * var(--t)) both; }
.slide.enter .slide-bg { animation: bg-in calc(.54 * var(--t)) var(--in) calc(.28 * var(--t)) both; }
.slide.leaving .part { animation: part-out calc(.3 * var(--t)) var(--out) both; }
.slide.leaving .part:nth-child(2) { animation-delay: calc(.04 * var(--t)); }
.slide.leaving .part:nth-child(3) { animation-delay: calc(.08 * var(--t)); }
.slide.leaving .part:nth-child(4) { animation-delay: calc(.12 * var(--t)); }
.slide.enter .part { animation: part-in calc(.32 * var(--t)) var(--in) calc(.5 * var(--t)) both; }
.slide.enter .part:nth-child(2) { animation-delay: calc(.55 * var(--t)); }
.slide.enter .part:nth-child(3) { animation-delay: calc(.6 * var(--t)); }
.slide.enter .part:nth-child(4) { animation-delay: calc(.66 * var(--t)); }
@keyframes bg-out { from { transform: none; filter: blur(0); opacity: 1; } to { transform: translateX(-48px); filter: blur(24px); opacity: 0; } }
@keyframes bg-in { from { transform: translateX(48px); filter: blur(24px); opacity: 0; } to { transform: none; filter: blur(0); opacity: 1; } }
@keyframes part-out { from { transform: none; opacity: 1; } to { transform: translateX(-56px); opacity: 0; } }
@keyframes part-in { from { transform: translateX(56px); opacity: 0; } to { transform: none; opacity: 1; } }

/* the featured list beside the hero: Epic's thumb and title rows, filling the hero's height */
.features { display: none; }
.feature { position: relative; flex: 1 1 0; min-height: 0; display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 0; border-radius: 12px; overflow: hidden; background: none; color: var(--text); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; }
.feature:hover { background: var(--panel); }
.feature[aria-current="true"] { background: var(--panel); }
.feature-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--hover); }
.feature[aria-current="true"] .feature-fill { animation: feature-fill var(--slide-ms, 8s) linear forwards; }
.carousel.paused .feature[aria-current="true"] .feature-fill { animation-play-state: paused; }
.carousel.still .feature .feature-fill { animation: none; }
@keyframes feature-fill { from { width: 0; } to { width: 100%; } }
.thumb { display: block; flex: none; border-radius: 8px; background-size: cover; background-position: center; background-color: var(--card); }
.feature .thumb { position: relative; align-self: stretch; aspect-ratio: 3 / 4; max-height: 76px; border-radius: 6px; }
.feature-title { position: relative; min-width: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carousel-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.carousel-controls .dots { margin-right: auto; }
.dots { display: flex; gap: 2px; }
.dot { width: 28px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.dot::after { content: ""; position: absolute; left: 6px; right: 6px; top: 20px; height: 4px; border-radius: 2px; background: var(--border); }
.dot[aria-current="true"]::after { background: #fff; }
@media (min-width: 1100px) {
  .carousel { grid-template-columns: minmax(0, 1fr) clamp(200px, 17%, 240px); }
  .features { display: flex; flex-direction: column; gap: 6px; }
  .carousel-controls { grid-column: 2; }
  .carousel-controls .dots { display: none; }
}

.shelf { margin-top: 40px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.row-title { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.row-title h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.row-title .icon { color: var(--dim); }
.row-arrows { display: flex; gap: 8px; }
.round { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--panel); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.round:hover { background: var(--hover); }
.poster-track { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.poster-track::-webkit-scrollbar { display: none; }
.poster { flex: 0 0 196px; scroll-snap-align: start; }
.poster-link { display: grid; gap: 2px; text-decoration: none; }
.poster-link:hover { opacity: .85; }
.poster-art { position: relative; display: block; aspect-ratio: 196 / 262; margin-bottom: 8px; border-radius: 12px; overflow: hidden; background-size: cover; background-position: center; background-color: var(--card); }
.poster-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.66), transparent 55%); }
.poster-art .rt-badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.poster-soon { position: absolute; top: 8px; right: 8px; z-index: 1; }
.poster-title { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; font-size: 1.25rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.poster-name { font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-by { font-size: .75rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.spotlight { position: relative; margin-top: 40px; min-height: 300px; border-radius: 16px; overflow: hidden; background-size: cover; background-position: center; background-color: var(--panel); display: flex; align-items: center; }
.spotlight::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,18,22,.91) 0%, rgba(18,18,22,0) 65%); }
.spotlight-text { position: relative; display: grid; gap: 12px; justify-items: start; padding: 32px clamp(20px, 3.5vw, 44px); max-width: 480px; }
.spotlight-text .eyebrow { margin: 0; }
.spotlight-title { margin: 0; font-size: 2rem; }
.spotlight-title a { text-decoration: none; }
.spotlight-title-art { max-width: 300px; max-height: 110px; object-fit: contain; object-position: left center; }
.spotlight-blurb { margin: 0; color: rgba(255,255,255,.8); }
.spotlight-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 4px; }

.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin-top: 40px; }
.compact h2 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 600; }
.compact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.compact-item { display: flex; align-items: center; gap: 16px; padding: 8px; border-radius: 12px; text-decoration: none; }
.compact-item:hover { background: var(--panel); }
.compact-item .thumb { width: 56px; height: 72px; }
.compact-text { display: grid; gap: 2px; min-width: 0; }
.compact-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-by { font-size: .85rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-price { display: flex; align-items: center; gap: 8px; padding-top: 2px; font-size: .85rem; }
@media (max-width: 1099px) { .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .slides { aspect-ratio: auto; height: 480px; max-height: none; }
  .slides-scrim { background: linear-gradient(0deg, rgba(18,18,22,.95) 15%, rgba(18,18,22,.4) 60%, rgba(18,18,22,.1)); }
  .slide-title-art { max-height: 90px; }
  .btn-play { padding: 0 26px; }
  .poster { flex-basis: 148px; }
  .poster-track { gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scroll-padding: 0 var(--gutter); }
  .row-arrows { display: none; }
  .spotlight { align-items: flex-end; min-height: 380px; }
  .spotlight::before { background: linear-gradient(0deg, rgba(18,18,22,.95) 20%, rgba(18,18,22,.2) 75%); }
}

.pitch { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(20px, 3vw, 36px); border-radius: 16px; background: var(--panel); border: 1px solid var(--border); }
.pitch h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 6px; }
.pitch p { color: var(--dim); max-width: 60ch; margin: 0; }
.pitch-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.more { color: var(--dim); text-decoration: none; font-size: .9rem; }
.kind-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kind-tile { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--card); text-decoration: none; border: 1px solid var(--border); }
.kind-tile:hover { background: var(--hover); }
.kind-tile span { color: var(--dim); }

/* grid of cards */
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card-link { display: block; text-decoration: none; border-radius: var(--radius); }
.card-art { aspect-ratio: 16 / 10; border-radius: var(--radius); background-size: cover; background-position: center; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.06); transition: transform .2s ease; }
.card-link:hover .card-art { transform: translateY(-2px); }
.card-art-title { font-weight: 800; font-size: 1.2rem; text-align: center; padding: 8px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.card-meta { display: grid; padding: 8px 2px 0; }
.card-title { font-weight: 650; }
.card-sub { color: var(--dim); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* browse */
.browse h1 { margin-top: 32px; }
.search input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; border: 0; }
.filter-row:empty { display: none; }
.pill { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--dim); font: inherit; cursor: pointer; }
.pill:hover { color: var(--text); background: var(--card); }
.pill.on { background: #fff; color: #111; border-color: #fff; }
.tabs .pill { font-weight: 650; }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; color: var(--dim); }
.check:has(input:checked) { color: var(--text); border-color: #fff; }
.check input { accent-color: #fff; }
.count { margin: 16px 0 12px; }

/* game page */
.game-hero { position: relative; margin: 0 calc(-1 * var(--gutter)); min-height: 380px; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
@media (min-width: 900px) { .game-hero { margin: 24px 0 0; border-radius: 20px; overflow: hidden; min-height: clamp(380px, 28vw, 520px); } }
.game-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18,18,22,1) 0%, rgba(18,18,22,.5) 45%, transparent 75%), linear-gradient(90deg, rgba(10,10,14,.6), transparent 60%); }
.game-hero-text { position: relative; padding: clamp(20px, 4vw, 40px); }
.game-body { display: grid; gap: 32px; margin-top: 24px; }
@media (min-width: 900px) { .game-body { grid-template-columns: minmax(0, 1fr) 300px; } }
.chips { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 4px 12px; border-radius: 999px; background: var(--card); color: var(--dim); font-size: .85rem; }
.side-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
.side-box h2 { font-size: 1rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.stats dt { color: var(--dim); font-size: .8rem; }
.stats dd { margin: 0; font-size: 1.4rem; font-weight: 700; }
.review-summary { margin-bottom: 12px; }
.reviews { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.review { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.review-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 6px; }
.verdict { font-weight: 700; }
.verdict.yes { color: var(--ok); }
.verdict.no { color: var(--bad); }
.who { font-weight: 600; }
.write-review { margin: 12px 0; }
.write-review summary { cursor: pointer; color: var(--dim); }
.stack { display: grid; gap: 10px; margin-top: 10px; max-width: 560px; }
.stack .btn { justify-self: start; }
.row { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.row legend { margin-bottom: 6px; }
textarea, input:not([type="checkbox"]):not([type="radio"]), select {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { width: 100%; resize: vertical; }
.field { display: grid; gap: 6px; }
.inline { display: inline-flex; align-items: center; gap: 8px; }

/* creator */
.creator-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; }
.creator-head > div:nth-child(2) { flex: 1; min-width: 200px; }
.creator-head h1 { margin: 0; }
.creator-head p { margin: 0; }

/* sign-in, empty */
.signin, .empty { max-width: 760px; margin-top: 32px; }

/* download (after Epic's download page) */
.download { margin-top: 8px; }
.dl-hero { display: grid; gap: 32px; align-items: center; padding: clamp(20px, 4vw, 48px); border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, rgba(255,90,122,.16), transparent 55%), var(--panel); border: 1px solid var(--border); }
@media (min-width: 1100px) { .dl-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.dl-mark { display: block; width: 112px; height: 112px; margin: -12px 0 4px -12px; }
.dl-copy h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; }
.dl-primary { display: grid; gap: 10px; justify-items: start; margin: 24px 0 8px; }
.btn-big { min-height: 56px; padding: 0 28px; font-size: 1.1rem; border-radius: 14px; }
.btn-big.disabled { opacity: 1; background: var(--card); color: var(--dim); border-color: var(--border); }
.dl-others { color: var(--dim); }
.dl-others a { color: var(--text); }
.dl-soon { color: var(--dim); }
.dl-shot { min-width: 0; }
.dl-install, .dl-features, .dl-reqs, .dl-faq { margin-top: 48px; }
.dl-install h2, .dl-features h2, .dl-reqs h2, .dl-faq h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; }
.cmd { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 12px; background: #0b0b0e; border: 1px solid var(--border); max-width: 760px; }
.cmd code { flex: 1; min-width: 0; font: 600 .95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #fff; overflow-x: auto; white-space: nowrap; overflow-wrap: normal; scrollbar-width: thin; }
.copy { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; flex: none; }
.copy:hover { background: var(--hover); }
.dl-install > p { max-width: 760px; }
.dl-install code { overflow-wrap: normal; }
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature-grid li { padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.feature-grid h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.feature-grid p { color: var(--dim); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--card); }
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.req { padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.req-head h3 { margin: 0; font-size: 1.1rem; }
.req dl { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: .92rem; }
.req dt { color: var(--dim); }
.req dd { margin: 0; }
.req-files { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 6px; overflow-wrap: anywhere; }
.req-files a svg { vertical-align: -2px; margin-right: 4px; }
.dl-faq { max-width: 860px; }
.faq { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style-position: inside; }
.faq p { color: var(--dim); margin: 0 0 16px; }

/* the app's Home in miniature (download page): launcher/src/ui.rs proportions, scaled to the box */
.mock { border-radius: 14px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.55); font-size: 9px; line-height: 1.3; user-select: none; }
.mock-bar { display: flex; gap: 6px; padding: 9px 10px; background: var(--rail); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }
.mock-app { display: flex; aspect-ratio: 16 / 9.4; }
.mock-rail { width: 18%; flex: none; background: var(--rail); border-right: 1px solid var(--panel); padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.mock-brand { display: flex; align-items: center; gap: 4px; padding: 2px 4px 8px; font-size: 1.25em; }
.mock-brand img { width: 14px; height: 14px; }
.mock-nav { display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 4px; color: var(--dim); white-space: nowrap; }
.mock-nav.on { background: var(--card); color: var(--text); }
.mock-rule { height: 1px; background: var(--panel); margin: 4px; }
.mock-main { flex: 1; min-width: 0; padding: 0 3.5% 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.mock-top { display: flex; align-items: center; gap: 12px; height: 26px; flex: none; }
.mock-search { display: inline-flex; align-items: center; gap: 4px; width: 32%; padding: 3px 6px; border-radius: 4px; background: var(--panel); border: 1px solid var(--border); color: var(--dim); }
.mock-tab { color: var(--dim); padding: 2px 1px; }
.mock-tab.on { color: var(--text); border-bottom: 1px solid var(--text); }
.mock-hero-row { display: flex; gap: 6px; flex: none; }
.mock-hero { position: relative; flex: 5; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background-size: cover; background-position: center; background-color: var(--panel); display: flex; align-items: flex-end; }
.mock-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,18,22,.9), rgba(18,18,22,0) 65%); }
.mock-hero-text { position: relative; display: grid; gap: 4px; justify-items: start; padding: 8%; }
.mock-hero-text img { max-width: 110px; max-height: 34px; object-fit: contain; object-position: left; }
.mock-hero-text b { font-size: 1.8em; }
.mock-eyebrow { font-size: .8em; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.mock-play { padding: 3px 10px; border-radius: 999px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #ff8fa6, #c23a5c); }
.mock-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mock-item { flex: 1; display: flex; align-items: center; gap: 4px; padding: 2px; border-radius: 4px; color: var(--dim); overflow: hidden; white-space: nowrap; }
.mock-item span:last-child { overflow: hidden; text-overflow: ellipsis; }
.mock-item.on { background: var(--panel); color: var(--text); }
.mock-thumb { flex: none; width: 16px; height: 20px; border-radius: 3px; background-size: cover; background-position: center; background-color: var(--card); }
.mock-row-title { font-weight: 600; font-size: 1.1em; margin-top: 4px; }
.mock-posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mock-poster { position: relative; aspect-ratio: 196 / 262; border-radius: 5px; overflow: hidden; background-size: cover; background-position: center; background-color: var(--card); }
.mock-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.66), transparent 55%); }
.mock-poster em { position: absolute; top: 4px; left: 4px; z-index: 1; font-style: normal; font-size: .75em; font-weight: 600; text-transform: uppercase; padding: 0 3px; border-radius: 2px; border: 1px solid rgba(255,255,255,.3); background: rgba(18,18,22,.7); }
.mock-poster b { position: absolute; left: 5px; right: 5px; bottom: 5px; z-index: 1; font-size: 1.15em; }
@media (max-width: 700px) {
  .dl-hero { padding: 20px 16px; border-radius: 16px; margin: 0 calc(-1 * var(--gutter) + 8px); }
  .mock { font-size: 6px; }
  .mock-brand img { width: 10px; height: 10px; }
  .btn-big { width: 100%; }
  .dl-primary { justify-items: stretch; }
  .cmd { flex-wrap: wrap; }
  .cmd code { flex-basis: 100%; }
}

.signin-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 16px; }
.signin-box .stack { max-width: none; }
.signin-box input { width: 100%; }

/* dashboard */
.dash { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 900px) { .dash { grid-template-columns: 220px minmax(0, 1fr); } }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 899px) { .dash-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; } .dash-nav a { white-space: nowrap; } }
.dash-nav a { text-decoration: none; color: var(--dim); padding: 8px 12px; border-radius: 8px; }
.dash-nav a[aria-current="page"], .dash-nav a:hover { color: var(--text); background: var(--card); }
.dash-nav .group { color: var(--faint); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: 12px 12px 4px; }
@media (max-width: 899px) { .dash-nav .group { display: none; } }
.dash-main h1 { margin-top: 0; }
.tabs-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; overflow-x: auto; }
.panel h2 { font-size: 1.05rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k { color: var(--dim); font-size: .8rem; }
.kpi .v { font-size: 1.35rem; font-weight: 750; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--dim); font-weight: 600; font-size: .8rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; background: var(--card); color: var(--dim); white-space: nowrap; }
.badge.ok { background: rgba(111,211,154,.15); color: var(--ok); }
.badge.warn { background: rgba(255,200,90,.15); color: #ffd27a; }
.badge.bad { background: rgba(255,138,138,.15); color: var(--bad); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sample { border: 1px dashed #ffd27a; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.bars .bar { flex: 1; background: linear-gradient(180deg, #fff, #9a9aa6); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars .bar.hidden { height: 100%; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.12) 4px 6px); }
.bars-x { display: flex; justify-content: space-between; color: var(--faint); font-size: .75rem; margin-top: 4px; }
.hbars { display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: 70px 1fr 40px; gap: 8px; align-items: center; font-size: .85rem; }
.hbar .track { height: 10px; background: var(--card); border-radius: 5px; overflow: hidden; }
.hbar .fill { height: 100%; background: #fff; }

/* avatar */
.avatar-page { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 900px) { .avatar-page { grid-template-columns: minmax(0, 1fr) 380px; } }
.stage { aspect-ratio: 1; max-height: 70vh; width: 100%; border-radius: var(--radius); background: radial-gradient(circle at 50% 35%, #2a2a32, #121216 70%); border: 1px solid var(--border); position: relative; overflow: hidden; }
.stage canvas { width: 100% !important; height: 100% !important; display: block; }
.stage .stage-note { position: absolute; left: 12px; bottom: 10px; color: var(--faint); font-size: .8rem; }
.options { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; }
.option:has(input:checked) { border-color: #fff; }
.option img { width: 48px; height: 48px; border-radius: 8px; background: var(--card); object-fit: cover; }
.option .grow { flex: 1; display: grid; }
.option.locked { opacity: .6; cursor: default; }
input.swatch { width: 44px !important; height: 36px !important; min-height: 0 !important; padding: 2px !important; border-radius: 8px; cursor: pointer; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #fff; color: #111; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); z-index: 50; font-weight: 600; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* keep the dashboard inside phone widths: grid children may shrink, wide controls wrap */
.dash > *, .game-body > *, .avatar-page > * { min-width: 0; }
.inline { flex-wrap: wrap; }
select, input, textarea { max-width: 100%; }
.review-head { min-width: 0; }
.review-head strong { overflow-wrap: anywhere; }
.reviews { grid-template-columns: minmax(0, 1fr); }
.actions select { min-width: 0; flex: 1 1 160px; }
pre { overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

/* avatar creator */
.stage-wrap { min-width: 0; }
@media (min-width: 900px) { .stage-wrap { position: sticky; top: 80px; align-self: start; } .stage { aspect-ratio: 4 / 5; max-height: calc(100vh - 100px); } }
/* phones: the preview stays in view (under the header) while the controls scroll */
@media (max-width: 899px) { .stage-wrap { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding-bottom: 8px; } .stage { aspect-ratio: auto; height: 38vh; min-height: 220px; } }
.stage { touch-action: pan-y; cursor: grab; }
.creator-controls { display: grid; gap: 12px; align-content: start; }
.starters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.creator-tabs { margin: 0; gap: 4px; }
.creator-tabs .tab { font: inherit; color: var(--dim); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
.creator-tabs .tab[aria-selected="true"] { color: #111; background: #fff; border-color: #fff; }
.creator-panel { margin: 0; overflow: visible; display: grid; gap: 4px; }
.creator-panel fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.creator-panel legend { color: var(--dim); font-size: .85rem; margin-bottom: 8px; padding: 0; }
.creator-panel fieldset.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: .9rem; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.chip:hover { border-color: rgba(255,255,255,.35); }
.chip[aria-pressed="true"] { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-colour { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); cursor: pointer; padding: 0; }
.chip-colour[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #fff; }
.slider { display: grid; gap: 4px; margin: 0 0 14px; }
.slider-head { display: flex; justify-content: space-between; font-size: .9rem; }
.slider-head .value { color: var(--dim); font-variant-numeric: tabular-nums; }
.slider input[type="range"] { width: 100%; min-height: 28px; padding: 0; border: 0; background: transparent; accent-color: #fff; }
.slider .ends { display: flex; justify-content: space-between; color: var(--faint); font-size: .75rem; }
.creator-panel .slot .options { margin-bottom: 8px; }
.creator-panel .slot .swatches { margin-top: 8px; }

/* clips */
.clip-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
@media (max-width: 520px) { .clip-grid { grid-template-columns: minmax(0, 1fr); } }
.clip-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.clip-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; border: 0; }
.clip-novideo { display: grid; place-items: center; background-color: var(--card); }
.clip-meta { padding: 12px 14px 14px; display: grid; gap: 4px; min-width: 0; }
.clip-meta p { margin: 0; overflow-wrap: anywhere; }
.clip-title { font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.clip-title:hover { text-decoration: underline; }
.clip-why { color: #d6d6dc; }
.clip-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 8px; }
.report-form { display: grid; gap: 8px; width: 100%; min-width: 0; }
.report-form select, .report-form input { width: 100%; min-width: 0; }
.clip-page { margin-top: 24px; }
.clip-stage { margin: 0 calc(-1 * var(--gutter)); background: #000; }
@media (min-width: 900px) { .clip-stage { margin: 0; border-radius: 20px; overflow: hidden; } }
.clip-stage .clip-video { max-height: 72vh; }
.clip-info { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .clip-info { grid-template-columns: minmax(0, 1fr) 300px; } }
.clip-info h1 { overflow-wrap: anywhere; }
.clip-info-side { display: grid; gap: 10px; align-content: start; justify-items: start; }
.feed { margin-top: 32px; }
.feed-more { margin-top: 20px; }
.clip-card.flagged { border-color: rgba(255,138,138,.5); }
ul.plain { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }

/* events */
.events-page { margin-top: 32px; }
.events-list { margin-top: 8px; }
.event-day { margin-top: 28px; }
.event-day h2 { font-size: 1rem; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.event { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.event.featured { border-color: rgba(255,255,255,.55); }
.event.live { border-color: var(--ruby); box-shadow: 0 0 0 1px rgba(255,90,122,.25); }
.event-when { display: grid; gap: 2px; }
.event-when strong { font-size: 1.1rem; }
.event-what h3 { margin: 6px 0 4px; font-size: 1.15rem; overflow-wrap: anywhere; }
.event-what p { margin: 0 0 4px; }
.event-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.event-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 700px) {
  .event { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .event-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
.host-panel { margin-top: 36px; overflow: visible; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
[hidden] { display: none !important; }
.host-panel input, .host-panel select { width: 100%; min-width: 0; }
.origins { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.origins li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.origins code { overflow-wrap: anywhere; background: var(--card); padding: 2px 8px; border-radius: 6px; }
.origins li.added code { outline: 1px solid #ffd27a; }
.origins li.removed code { text-decoration: line-through; color: var(--dim); }
code { overflow-wrap: anywhere; }

/* asset store */
.asset-art { background: radial-gradient(circle at 50% 40%, #2a2a32, #16161b 75%); overflow: hidden; aspect-ratio: 16 / 10; }
.asset-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-price { font-size: .9rem; font-weight: 650; margin-top: 2px; }
.asset-price.big { font-size: 1.5rem; font-weight: 750; }
.store .sort select { min-height: 36px; border-radius: 999px; padding: 0 12px; }
.store-foot { margin-top: 32px; }
.asset-page { margin-top: 24px; }
.asset-top { display: grid; gap: 24px; }
@media (min-width: 900px) { .asset-top { grid-template-columns: minmax(0, 1fr) 380px; } .asset-stage { aspect-ratio: 4 / 3; max-height: calc(100vh - 120px); } }
@media (max-width: 899px) { .asset-stage { aspect-ratio: auto; height: 42vh; min-height: 240px; } }
.asset-top > *, .asset-body > *, .review-grid > * { min-width: 0; }
.asset-side h1 { margin: 4px 0 4px; overflow-wrap: anywhere; }
.crumbs { margin: 0; }
.crumbs a { color: var(--dim); }
.verified { margin-left: 8px; }
.buy-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 12px 0; display: grid; gap: 6px; justify-items: start; }
.buy-box p { margin: 0; }
.params-panel { overflow: visible; }
.params { display: grid; gap: 4px; }
.params .btn { justify-self: start; margin-top: 6px; }
.param-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: .9rem; }
.param-row select, .param-row input:not(.swatch) { flex: 0 1 60%; min-width: 0; }
.param-check { margin: 0 0 12px; justify-self: start; }
.asset-body { display: grid; gap: 0; }
@media (min-width: 900px) { .asset-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; } .asset-body > section:nth-child(2) { grid-row: span 3; } }
.asset-stats dd { font-size: 1.25rem; }
.asset-stats > div { display: grid; }
.install { display: grid; gap: 14px; }
.install-block { min-width: 0; }
.install-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.install-head h3 { margin: 0; font-size: 1rem; }
.install-block p { margin: 6px 0; }
pre.code { background: var(--rail); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 6px 0 0; font-size: .82rem; line-height: 1.5; }
.mcp-config summary { cursor: pointer; color: var(--dim); font-size: .9rem; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; }
.facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.facts dt { color: var(--dim); font-size: .85rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.table-wrap { overflow-x: auto; max-width: 100%; }
.yank-reason { display: block; margin-top: 4px; }
/* dashboard: assets */
.asset-dash-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.asset-dash-head img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--card); flex: none; }
.asset-dash-head h2 { margin: 0; overflow-wrap: anywhere; }
.asset-dash-head p { margin: 0; }
.versions td { vertical-align: middle; }
.mod-note { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(255,138,138,.08); border: 1px solid rgba(255,138,138,.25); font-size: .88rem; max-width: 46ch; }
.render-job { margin-top: 6px; max-width: 46ch; overflow-wrap: anywhere; }
.render-job.warn { color: #ffd27a; }
.render-job.bad { color: var(--bad); }
.render-job.ok { color: var(--ok); }
div.render-job:has(> p) { padding: 8px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
div.render-job > p { margin: 0; flex: 1 1 18ch; }
.yank summary { list-style: none; display: inline-flex; }
.yank summary::-webkit-details-marker { display: none; }
.yank[open] summary { margin-bottom: 6px; }
.yank p { margin: 0 0 6px; max-width: 36ch; }
.yank-form { display: flex; flex-wrap: wrap; gap: 6px; }
.yank-form input { flex: 1 1 160px; min-width: 0; }
.steps { padding-left: 20px; display: grid; gap: 6px; }
/* dashboard: review */
.review-item-head h2 { overflow-wrap: anywhere; }
.review-item-head h2 code { color: var(--dim); font-weight: 500; }
.review-grid { display: grid; gap: 18px; margin: 12px 0 16px; }
@media (min-width: 760px) { .review-grid { grid-template-columns: 300px minmax(0, 1fr); } }
.review-media { display: grid; gap: 8px; justify-items: start; }
.review-shot img { width: 100%; border-radius: 10px; display: block; background: var(--card); }
.review-shot { width: 100%; }
.review-stage { aspect-ratio: 16 / 10; width: 100%; }
.review-facts h3, .review-item h3 { font-size: 1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; font-size: .9rem; }
.checks li { display: block; padding-left: 26px; position: relative; }
.checks .mark { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .7rem; font-weight: 800; }
.check-pass .mark { background: rgba(111,211,154,.18); color: var(--ok); }
.check-fail .mark { background: rgba(255,138,138,.2); color: var(--bad); }
.check-warn .mark { background: rgba(255,200,90,.2); color: #ffd27a; }
.check-skip .mark { background: var(--card); color: var(--dim); }
table.diff code { font-size: .8rem; }
.diff-added td:last-child code { color: var(--ok); }
.diff-removed td code { text-decoration: line-through; color: var(--dim); }
tr.flagged { background: rgba(255,200,90,.06); }
tr.flagged .badge { margin-left: 6px; }
.review-actions { display: grid; gap: 8px; margin-top: 14px; max-width: 640px; }
.versions td:nth-child(2), .versions td:first-child { white-space: nowrap; }
.stage.still { cursor: default; }
.stage-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.code-read-wrap { margin-top: 12px; display: grid; gap: 6px; justify-items: start; }
.code-box { width: 100%; }
pre.code-read { max-height: 420px; overflow: auto; white-space: pre; }
.skip-render { justify-self: start; }
.code-read-wrap > .code-box { justify-self: stretch; min-width: 0; }
pre.code-read { max-width: 100%; }
.asset-body td:nth-child(-n+2) { white-space: nowrap; }
/* the sandboxed preview frame fills its stage; notes sit on top without catching the pointer */
.stage .preview-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: dark; display: block; }
.stage .stage-note { pointer-events: none; z-index: 1; }

/* wave 6: coming soon, tips, release */
.coming-soon { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.card-soon { margin-top: 4px; }
.tip-box { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.tip-box .btn { justify-self: start; }
.dash-links { margin: 0 0 16px; }
.release-panel .small-v { font-size: 1rem; }
.release-panel form.actions { align-items: center; margin: 8px 0 12px; }
.release-panel form.actions input { min-height: 36px; }
.switch-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; margin-top: 8px; }
.switch-row label { font-weight: 650; }
.switch-row p { grid-column: 1 / -1; margin: 0; }
input[role="switch"] { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); position: relative; cursor: pointer; margin: 0; }
input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--dim); transition: transform .15s ease; }
input[role="switch"]:checked { background: var(--ok); border-color: var(--ok); }
input[role="switch"]:checked::after { transform: translateX(18px); background: #111; }
input[role="switch"]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.handle-claim .field input { max-width: 320px; }
.handle-status { min-height: 1.4em; margin: 4px 0 0; }

/* wave 6: analytics charts. The site is dark; each chart card carries its own tokens, with selected (validated)
   steps for the dark panel and, when the viewer prefers light, a light card of its own. */
.viz {
  --viz-surface: var(--panel);
  --viz-ink: #f2f2f4;
  --viz-ink-2: #c3c2cc;
  --viz-muted: #9a9aa6;
  --viz-grid: #2a2a32;
  --viz-base: #4a4a55;
  --viz-gap: rgba(255,255,255,.06);
  --viz-s1: #3987e5;
  --viz-s2: #d95926;
  --viz-tip: #0e0e11;
  --viz-border: rgba(255,255,255,.10);
  background: var(--viz-surface);
  color: var(--viz-ink);
  overflow: visible;
}
@media (prefers-color-scheme: light) {
  :root:where(:not([data-theme="dark"])) .viz {
    color-scheme: light;
    --viz-surface: #fcfcfb;
    --viz-ink: #0b0b0b;
    --viz-ink-2: #52514e;
    --viz-muted: #6b6a66;
    --viz-grid: #e1e0d9;
    --viz-base: #c3c2b7;
    --viz-gap: rgba(11,11,11,.05);
    --viz-s1: #2a78d6;
    --viz-s2: #eb6834;
    --viz-tip: #ffffff;
    --viz-border: rgba(11,11,11,.12);
    border-color: var(--viz-border);
  }
}
.viz h2 { color: var(--viz-ink); }
.viz .dim, .viz .viz-note { color: var(--viz-ink-2); }
.viz-note { font-size: .85rem; color: var(--dim); margin: 8px 0 0; }
.viz-chart { position: relative; width: 100%; margin-top: 8px; }
.viz-svg { display: block; max-width: 100%; touch-action: pan-y; }
.viz-svg:focus-visible { outline: 2px solid var(--viz-ink); outline-offset: 2px; border-radius: 6px; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-base { stroke: var(--viz-base); stroke-width: 1; shape-rendering: crispEdges; }
.viz-tick { fill: var(--viz-ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.viz-unit { fill: var(--viz-ink-2); font-size: 12px; }
.viz-label { fill: var(--viz-ink); font-size: 12px; font-weight: 650; }
.viz-note-text { fill: var(--viz-ink-2); font-size: 11px; }
.viz-gap { fill: var(--viz-gap); }
.viz-bar.s1 { fill: var(--viz-s1); }
.viz-bar.on { filter: brightness(1.2); }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line.s1 { stroke: var(--viz-s1); }
.viz-line.s2 { stroke: var(--viz-s2); }
.viz-dot { stroke: var(--viz-surface); stroke-width: 2; }
.viz-dot.s1 { fill: var(--viz-s1); }
.viz-dot.s2 { fill: var(--viz-s2); }
.viz-cross { stroke: var(--viz-base); stroke-width: 1; }
.viz-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--viz-tip); color: var(--viz-ink); border: 1px solid var(--viz-border); border-radius: 8px; padding: 6px 10px; font-size: .82rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); white-space: nowrap; }
.viz-tip-head { color: var(--viz-ink-2); font-size: .75rem; }
.viz-tip-row { display: flex; align-items: center; gap: 6px; }
.viz-tip-name { color: var(--viz-ink-2); }
.viz-key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; }
.viz-key.s1 { background: var(--viz-s1); }
.viz-key.s2 { background: var(--viz-s2); }
.viz-legend { list-style: none; display: flex; gap: 16px; padding: 0; margin: 4px 0 0; font-size: .85rem; color: var(--viz-ink-2); }
.viz-legend li { display: flex; align-items: center; gap: 6px; }
.viz-table { margin-top: 10px; font-size: .85rem; }
.viz-table summary { cursor: pointer; color: var(--viz-ink-2); }
.viz-table table { margin-top: 8px; }
.viz-table th, .viz-table td { color: var(--viz-ink); border-color: var(--viz-grid); }
.viz-body.refreshing { opacity: .55; transition: opacity .2s ease; }

.nowrap { white-space: nowrap; }
