/* Proving Ground: a shelf of game cartridges. */
:root {
  --night: #1c1936;
  --deck: #262246;
  --deck-2: #312c5a;
  --line: #463f7a;
  --text: #f1eeff;
  --muted: #aaa4d2;
  --token: #ffd24a;          /* primary action: arcade-token yellow */
  --token-ink: #2a2100;
  --testing: #ff9f43;
  --early_access: #4fd1c5;
  --released: #a493ff;
  --danger: #ff7a8a;
  --ok: #7be3a4;
  --radius: 10px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.55 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration-color: color-mix(in srgb, var(--token) 70%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--token); }
:focus-visible { outline: 3px solid var(--token); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: absolute; top: 8px; left: 8px; background: var(--token); color: var(--token-ink); padding: 8px 12px; z-index: 10; }

/* ---------- Header / footer ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.logo-mark { width: 30px; height: 30px; color: var(--token); }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav .btn { color: var(--token-ink); }
.nav-user { color: var(--text) !important; }
.site-footer { margin-top: auto; padding: 28px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.site-footer a { margin-right: 16px; color: var(--muted); }
.main { width: 100%; max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }
.main.wide { max-width: 1240px; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--token); color: var(--token-ink); border: 2px solid var(--token);
  font: 700 1rem/1 var(--body); padding: 11px 18px; border-radius: 8px; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 #b8901c;
}
.btn:hover { color: var(--token-ink); filter: brightness(1.06); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8901c; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-big { padding: 15px 24px; font-size: 1.08rem; }
.btn-small { padding: 7px 12px; font-size: .9rem; box-shadow: 0 2px 0 #b8901c; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--token); }
.btn-ghost:active { box-shadow: none; }
.btn-play { font-size: 1.15rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }
.danger, .linkish.danger { color: var(--danger); }
.btn-ghost.danger { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
form.inline { display: inline; }

.stack > * + * { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field-label, legend { font-weight: 700; }
.field small, .hint { color: var(--muted); font-size: .9rem; }
.hint.ok { color: var(--ok); }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], select, textarea {
  font: inherit; color: var(--text); background: var(--deck); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--token); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--token) 35%, transparent); }
input[type=file] { font: inherit; color: var(--muted); }
input[type=file]::file-selector-button { font: 700 .9rem var(--body); background: var(--deck-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin-right: 12px; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-family: var(--display); font-size: 1.15rem; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 5px; accent-color: var(--token); }
.form-section { background: var(--deck); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 24px; }
.form-section > * + * { margin-top: 14px; }
.form-section legend { float: left; width: 100%; margin-bottom: 14px; }
.form-section legend + * { clear: both; }
.form-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.upload-progress { color: var(--token); }
.form-errors { border: 2px solid var(--danger); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; }
.form-errors p { margin: 0 0 6px; font-weight: 700; }
.form-errors ul { margin: 0; padding-left: 20px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; }
.option-card > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 2px solid var(--line); border-radius: 8px; }
.option-card small { color: var(--muted); }
.option-card input:checked + span { border-color: var(--token); background: color-mix(in srgb, var(--token) 9%, transparent); }
.option-card input:focus-visible + span { outline: 3px solid var(--token); outline-offset: 2px; }
.ai-parts { display: grid; gap: 8px; padding: 14px; border-left: 3px solid var(--line); }
.ai-parts[hidden] { display: none; }

.flash { max-width: 1240px; margin: 16px auto 0; width: calc(100% - 32px); padding: 12px 16px; border-radius: 8px; font-weight: 700; }
.flash-ok { background: color-mix(in srgb, var(--ok) 18%, var(--deck)); border: 1px solid var(--ok); }
.flash-error { background: color-mix(in srgb, var(--danger) 18%, var(--deck)); border: 1px solid var(--danger); }
.notice { background: var(--deck-2); padding: 12px 16px; border-radius: 8px; border-left: 4px solid var(--token); }

/* ---------- Tags ---------- */
.stage, .ai, .badge, .genre {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; line-height: 1.3; white-space: nowrap;
}
.stage { color: #1a1530; }
.stage-testing { background: var(--testing); }
.stage-early_access { background: var(--early_access); }
.stage-released { background: var(--released); }
.genre { border: 1px solid var(--line); color: var(--muted); }
/* AI labels look like stickers: square-ish with a shape that differs per label. */
.ai { border-radius: 4px; border: 1.5px solid currentColor; background: var(--night); }
.ai::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.ai-human { color: #e9e5ff; }
.ai-human::before { border-radius: 50%; }
.ai-assisted { color: #8fd3ff; }
.ai-assisted::before { clip-path: polygon(0 0, 100% 0, 0 100%); }
.ai-ai { color: #ff8ee0; }
.ai-ai::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.badge { background: var(--deck-2); color: var(--muted); }
.badge-verified { background: color-mix(in srgb, var(--ok) 20%, var(--deck)); color: var(--ok); }
.badge-paid { background: color-mix(in srgb, var(--token) 20%, var(--deck)); color: var(--token); }
.badge-warn { background: color-mix(in srgb, var(--danger) 22%, var(--deck)); color: var(--danger); }
.playable { color: var(--early_access); font-weight: 700; margin-left: 4px; }

.stars { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stars-track {
  position: relative; display: inline-block; width: 5.4em; height: 1em; font-size: .95em;
  background: var(--line);
  -webkit-mask: url("/static/star5.svg") 0 0 / 100% 100%; mask: url("/static/star5.svg") 0 0 / 100% 100%;
}
.stars-fill { position: absolute; inset: 0 auto 0 0; background: var(--token); }
.stars b { font-weight: 700; }
.stars-none { color: var(--muted); font-size: .9rem; }

/* ---------- Cartridge cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 26px 22px; }
.cart {
  --stage-c: var(--testing);
  position: relative;
  background: var(--deck-2);
  border-radius: 14px 14px 6px 6px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transition: transform .15s ease;
}
.cart-early_access { --stage-c: var(--early_access); }
.cart-released { --stage-c: var(--released); }
.cart:hover { transform: translateY(-4px); }
.cart-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.cart-link:hover { color: inherit; }
.cart-link:focus-visible { outline-offset: -4px; }
.cart-label { margin: 12px 12px 0; border-radius: 6px; overflow: hidden; border-top: 6px solid var(--stage-c); }
.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--deck); }
.cover-ph {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / .07) 14px 28px),
    linear-gradient(135deg, var(--ph-a), var(--ph-b));
}
.cover-ph span { font-family: var(--display); font-weight: 800; font-size: 3rem; color: rgb(255 255 255 / .9); text-shadow: 0 3px 0 rgb(0 0 0 / .2); }
.cart-body { padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 6px; flex: 1; position: relative; }
/* grip ridges along the bottom edge of the cartridge */
.cart-body::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 10px; height: 8px;
  background: repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 9px);
  opacity: .8;
}
.cart h3 { margin: 4px 0 0; font-size: 1.2rem; }
.cart .tagline { color: var(--muted); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cart-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 0; font-size: .92rem; }
.cart-genre { margin-left: auto; }
.cart-dev { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 28px 0 48px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; max-width: 12ch; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { margin-top: 20px; }
.hero-shelf { position: relative; height: 380px; }
.shelf-cart {
  --stage-c: var(--testing);
  position: absolute; width: 230px; height: 290px; padding: 20px 18px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 12px; align-items: flex-start;
  background: var(--deck-2); text-decoration: none;
  border-radius: 16px 16px 8px 8px; border-top: 70px solid var(--stage-c);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  box-shadow: 0 18px 30px rgb(0 0 0 / .35);
}
.shelf-cart.cart-early_access { --stage-c: var(--early_access); }
.shelf-cart.cart-released { --stage-c: var(--released); }
.shelf-cart::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 16px; height: 12px; background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 11px); }
.shelf-title { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.shelf-0 { left: 4%; top: 40px; transform: rotate(-7deg); z-index: 1; }
.shelf-1 { left: 38%; top: 0; transform: rotate(2deg); z-index: 2; }
.shelf-2 { left: 66%; top: 60px; transform: rotate(9deg); z-index: 1; }
.shelf-cart:hover { color: var(--text); transform: rotate(0) translateY(-10px); z-index: 3; transition: transform .2s ease; }

.stage-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 56px; }
.stage-card { display: block; text-decoration: none; padding: 22px; border-radius: var(--radius); background: var(--deck); border-left: 6px solid; }
.stage-card h2 { margin-bottom: 6px; }
.stage-card p { color: var(--muted); margin: 0; }
.stage-card-testing { border-color: var(--testing); }
.stage-card-early_access { border-color: var(--early_access); }
.stage-card-released { border-color: var(--released); }
.stage-card:hover { background: var(--deck-2); color: var(--text); }

.shelf-section { margin-bottom: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h1, .section-head h2 { margin: 0; }

.ai-explainer { background: var(--deck); border-radius: var(--radius); padding: 28px; }
.ai-explainer > p { color: var(--muted); }
.ai-explainer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.ai-explainer-item { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-decoration: none; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.ai-explainer-item span:last-child { color: var(--muted); }
.ai-explainer-item:hover { border-color: var(--token); color: var(--text); }

.empty-state { text-align: center; padding: 48px 16px; background: var(--deck); border-radius: var(--radius); border: 2px dashed var(--line); }
.empty-state p:last-child { margin: 0; }

/* ---------- Browse ---------- */
.browse { display: grid; grid-template-columns: 270px 1fr; gap: 36px; align-items: start; }
.filters { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 20px; }
.filters-title { font-size: 2rem; margin: 0; }
.filters fieldset { display: flex; flex-wrap: wrap; gap: 8px; }
.filters legend { font-size: 1rem; margin-bottom: 8px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .92rem; }
.chip input:checked + span { background: var(--token); border-color: var(--token); color: var(--token-ink); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--token); outline-offset: 2px; }
.filters .hint { width: 100%; margin: 0; }
.filter-actions { display: flex; gap: 14px; align-items: center; margin: 0; }
.results-count { color: var(--muted); margin-bottom: 16px; }

/* ---------- Game page ---------- */
.game-hero { --stage-c: var(--testing); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: center; margin-bottom: 40px; }
.game-hero.cart-early_access { --stage-c: var(--early_access); }
.game-hero.cart-released { --stage-c: var(--released); }
.game-cover { border-top: 8px solid var(--stage-c); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px rgb(0 0 0 / .35); }
.game-intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-top: 12px; letter-spacing: -0.025em; }
.play-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.game-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.game-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.trailer { aspect-ratio: 16 / 9; margin-bottom: 32px; border-radius: 10px; overflow: hidden; background: var(--deck); }
.trailer iframe { width: 100%; height: 100%; border: 0; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.4em; }
.prose h1 + h2, .prose > h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .4em; }

.rating-panel { background: var(--deck); border-radius: var(--radius); padding: 20px; }
.score-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.big-score { font-family: var(--display); font-weight: 800; font-size: 3.4rem; line-height: 1; margin: 0 0 6px; }
.mid-score { font-family: var(--display); font-weight: 800; font-size: 1.8rem; line-height: 1; margin: 0 0 4px; color: var(--stage-c, var(--token)); }
.current-score { text-align: right; max-width: 110px; }
.current-score .muted { font-size: .85rem; }
.rating-panel .muted { font-size: .9rem; margin: 6px 0 0; }
.dist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 4px; font-size: .9rem; }
.dist li { display: grid; grid-template-columns: 30px 1fr 28px; gap: 8px; align-items: center; }
.bar { height: 8px; background: var(--deck-2); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--token); }
.sub-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; font-size: .92rem; }
.sub-list li { display: flex; justify-content: space-between; }

.ai-box { border-radius: var(--radius); padding: 18px 20px; border: 1.5px solid var(--line); }
.ai-box h3 { display: flex; align-items: center; gap: 8px; }
.ai-box-human h3 { color: #e9e5ff; }
.ai-box-assisted h3 { color: #8fd3ff; }
.ai-box-ai h3 { color: #ff8ee0; }
.ai-box p { margin: 0 0 8px; font-size: .95rem; }
.ai-box p:last-child { margin: 0; }
.ai-notes { color: var(--muted); font-style: italic; }
.report summary { cursor: pointer; color: var(--muted); }
.report[open] summary { margin-bottom: 12px; }

.reviews { margin-top: 48px; }
.sort-links { display: flex; gap: 14px; }
.sort-links a { color: var(--muted); }
.sort-links a[aria-current] { color: var(--text); font-weight: 700; text-decoration: none; }
.review-gate, .review-form { background: var(--deck); border-radius: var(--radius); padding: 20px; }
.review-gate p { margin: 0; }
.review-form h3 { margin: 0; }
.review-form + form.inline { display: block; margin-top: 10px; }
.sub-scores { display: flex; flex-wrap: wrap; gap: 14px; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.field-inline select { width: auto; }
/* Star picker: radios in reverse order so hover can fill to the left. */
.star-pick { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-pick legend { width: 100%; }
.star-pick input { position: absolute; opacity: 0; }
.star-pick label { font-size: 2.2rem; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; }
.star-pick label:hover, .star-pick label:hover ~ label,
.star-pick input:checked ~ label { color: var(--token); }
.star-pick input:focus-visible + label { outline: 3px solid var(--token); border-radius: 4px; }
.star-pick { position: relative; }
.star-pick legend { position: absolute; top: -1.6em; left: 0; }
.review-form .star-pick { margin-top: 36px; }

.review-list { list-style: none; padding: 0; margin: 24px 0 0; }
.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.review-author { font-weight: 700; }
.review-date { margin-left: auto; font-size: .88rem; }
.review-subs { font-size: .9rem; margin: 6px 0 0; }
.review-body { margin: 10px 0 0; white-space: pre-wrap; max-width: 70ch; }

/* ---------- Player ---------- */
body.bare { height: 100vh; overflow: hidden; }
body.bare .main { max-width: none; padding: 0; height: 100%; }
.player { display: flex; flex-direction: column; height: 100vh; }
.player-bar { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--deck); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.player-back { font-weight: 700; }
.player-status { color: var(--muted); font-size: .92rem; flex: 1; }
.player-tools { display: flex; gap: 8px; }
.player-frame { flex: 1; width: 100%; border: 0; background: #000; }

/* ---------- Dashboard ---------- */
.slots-panel { background: var(--deck); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; }
.slots { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.slot { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 8px; font-weight: 700; }
.slot-n { font-size: .8rem; color: var(--muted); font-weight: 400; }
.slot.used { background: var(--token); color: var(--token-ink); }
.slot.used .slot-n { color: #5c4a00; }
.slot.open { border: 2px dashed var(--token); }
.slot.locked { border: 2px dashed var(--line); color: var(--muted); }
.slots-panel p { margin: 0; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.dash-table th, .dash-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dash-table thead th { color: var(--muted); font-weight: 400; font-size: .88rem; }
.dash-table tbody th { font-weight: 700; }
.dash-table tr.archived { opacity: .6; }
.price-card { background: var(--deck); border-radius: var(--radius); padding: 24px; border: 2px solid var(--token); margin: 24px 0; max-width: 420px; }
.price { font-family: var(--display); font-size: 2.4rem; font-weight: 800; margin: 0; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); font-family: var(--body); }
.plain-list { padding-left: 20px; }
.plain-list li { margin-bottom: 8px; }

/* ---------- Auth & profile ---------- */
.auth-card { max-width: 460px; margin: 20px auto; background: var(--deck); padding: 30px; border-radius: var(--radius); border-top: 6px solid var(--token); }
.profile-head { margin-bottom: 32px; }
.profile-head .bio { max-width: 65ch; white-space: pre-wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero, .game-hero, .game-columns, .browse { grid-template-columns: 1fr; }
  .hero-shelf { height: 320px; max-width: 520px; }
  .filters, .game-side { position: static; }
  .stage-picker, .ai-explainer-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-shelf { height: 260px; }
  .shelf-cart { width: 170px; height: 215px; border-top-width: 52px; }
  .shelf-title { font-size: 1.15rem; }
  .slots { grid-template-columns: repeat(3, 1fr); }
  .dash-table thead { display: none; }
  .dash-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .dash-table th, .dash-table td { border: 0; padding: 4px 6px; }
  .dash-table tbody th { grid-column: 1 / -1; }
  .player-status { flex-basis: 100%; order: 3; }
  .review-date { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .cart:hover, .shelf-cart:hover { transform: none; }
}

/* ---------- Avatars & image editors ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--deck-2); }
.avatar-ph { background: var(--av, var(--deck-2)); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.avatar-sm { width: 26px; height: 26px; font-size: .8rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.8rem; border: 3px solid var(--token); }
.nav-user, .review-author, .dev-link { display: inline-flex; align-items: center; gap: 8px; }
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: 4px; }
.avatar-editor { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.avatar-editor .stack { flex: 1; min-width: 220px; }
.auth-card h2 { font-size: 1.2rem; margin: 0; }
.name-form { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
input:disabled, button:disabled { opacity: .55; cursor: not-allowed; }
.cover-editor-row { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 22px; align-items: start; }
.cover-preview { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.cover-editor .stack p { margin: 0; }
@media (max-width: 640px) { .cover-editor-row { grid-template-columns: 1fr; } }

/* ---------- v0.2: header menu, notices ---------- */
.verify-banner { background: color-mix(in srgb, var(--token) 16%, var(--deck)); border-bottom: 1px solid var(--token); padding: 10px clamp(16px, 4vw, 40px); font-size: .95rem; }
.verify-banner a, .verify-banner .linkish { color: var(--text); margin-left: 8px; }
.bell { position: relative; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; color: var(--muted) !important; }
.bell svg { width: 22px; height: 22px; }
.bell:hover { color: var(--text) !important; }
.bell-n { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; color: var(--text); }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 210px; display: flex; flex-direction: column; background: var(--deck); border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: 0 16px 30px rgb(0 0 0 / .4); }
.menu-list a, .menu-list .linkish { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text) !important; text-decoration: none; text-align: left; width: 100%; }
.menu-list a:hover, .menu-list .linkish:hover { background: var(--deck-2); }
.menu-list form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* ---------- Tags, gallery, updates ---------- */
.cart-tag-list, .tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; font-size: .78rem; }
.cart-tag-list span, .tag-list a { padding: 2px 8px; border-radius: 4px; background: var(--deck); color: var(--muted); text-decoration: none; }
.tag-list { font-size: .85rem; margin-top: 10px; }
.tag-list a:hover { color: var(--text); }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-picker input:disabled + span { opacity: .4; cursor: not-allowed; }
.playtest-callout a { display: inline-block; margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--token) 15%, var(--deck)); border: 1px solid var(--token); font-weight: 700; text-decoration: none; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 46%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 28px; padding-bottom: 6px; }
.gallery-item { scroll-snap-align: start; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.updates { margin-top: 36px; }
.devlog { padding: 16px 0; border-bottom: 1px solid var(--line); max-width: 70ch; }
.devlog h2, .devlog h3 { margin-bottom: 2px; }
.devlog h3 a { text-decoration: none; }

/* ---------- Reviews ---------- */
.review-foot { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.helpful { font: inherit; font-size: .88rem; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.helpful:hover { color: var(--text); border-color: var(--muted); }
.helpful.on { color: var(--token-ink); background: var(--token); border-color: var(--token); font-weight: 700; }
.dev-reply { margin: 12px 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--early_access); background: var(--deck); border-radius: 0 8px 8px 0; max-width: 66ch; }
.dev-reply p { margin: 0 0 4px; white-space: pre-wrap; }
.badge-fixed { background: color-mix(in srgb, var(--early_access) 22%, var(--deck)); color: var(--early_access); }
.badge-planned { background: color-mix(in srgb, var(--released) 22%, var(--deck)); color: var(--released); }

/* ---------- Dashboard tools ---------- */
.manage-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.manage-links a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .92rem; }
.manage-links a:hover, .manage-links a[aria-current] { border-color: var(--token); color: var(--text); }
.manage-links a[aria-current] { background: var(--deck-2); font-weight: 700; }
.shot-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.shot-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.shot-grid form { margin-top: 4px; }
.inline-filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin: 16px 0 24px; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form input { width: auto; min-width: 180px; padding: 6px 10px; }
.inbox { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.inbox-item { background: var(--deck); border-radius: var(--radius); padding: 18px; border-left: 4px solid var(--line); }
.inbox-item.status-new { border-left-color: var(--token); }
.inbox-item.status-planned { border-left-color: var(--released); }
.inbox-item.status-fixed { border-left-color: var(--early_access); }
.inbox-form { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.inbox-form .field:not(.field-inline) { flex: 1 1 100%; }
.inbox-form input[name=fixed_in] { width: 110px; }
.stat-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-row li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--deck-2); border-radius: 8px; }
.stat-row b { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; }
.stat-row b a { text-decoration: none; }
.stat-row span { color: var(--muted); font-size: .85rem; }
.chart { width: 100%; height: auto; }
.chart .bar-fill { fill: var(--token); }
.chart .axis { fill: var(--muted); font: 11px var(--body); }
.chart .axis-line { stroke: var(--line); }
.dist-wide { grid-template-columns: 160px 1fr 44px !important; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 14px; }

/* ---------- Billing & checkout ---------- */
.price-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.price-row .price-card { margin: 0; max-width: none; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.price-row .price-card h3 { margin: 0; }
.price-row .price-card p { margin: 0; }
.checkout { text-align: center; }
.checkout form { align-items: center; }
.checkout .btn { width: 100%; }

/* ---------- Playtests ---------- */
.board-head { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: 24px; align-items: start; margin-bottom: 20px; }
.board-side { background: var(--deck); border-radius: var(--radius); padding: 18px; border-top: 4px solid var(--token); }
.board-side p { margin: 0 0 8px; }
.tier-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.tier-explainer div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.tier-explainer span { color: var(--muted); font-size: .9rem; }
.playtest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.playtest-card { --stage-c: var(--testing); display: flex; flex-direction: column; background: var(--deck-2); border-radius: 10px; overflow: hidden; text-decoration: none; border-top: 6px solid var(--stage-c); }
.playtest-card.cart-early_access { --stage-c: var(--early_access); }
.playtest-card.cart-released { --stage-c: var(--released); }
.playtest-card:hover { color: var(--text); outline: 2px solid var(--token); }
.playtest-body { padding: 14px 16px 18px; }
.playtest-body h2 { margin: 8px 0 6px; font-size: 1.3rem; }
.pay-line { margin: 0 0 4px; }
.pay-line b { color: var(--token); font-size: 1.2rem; }
.playtest-detail { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 28px; align-items: center; margin-bottom: 8px; }
.playtest-detail .cover { border-radius: 10px; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 6px; }
.playbar { width: 100%; height: 14px; accent-color: var(--token); }
.report { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; margin: 14px 0; }
.report div.wide { grid-column: 1 / -1; }
.report dt { color: var(--muted); font-size: .85rem; }
.report dd { margin: 2px 0 0; white-space: pre-wrap; }
.report-card { background: var(--deck); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; border-left: 4px solid var(--line); }
.report-card.report-submitted { border-left-color: var(--token); }
.report-card.report-accepted { border-left-color: var(--ok); }
.report-card.report-disputed { border-left-color: var(--danger); }
.report-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.dispute summary { cursor: pointer; color: var(--danger); }
.campaign-total { font-weight: 700; color: var(--token); margin: 8px 0 0; }

/* ---------- Notifications & feed ---------- */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif-list li.unread a { font-weight: 700; }
.notif-list li.unread::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--token); }
.notif-list li > :first-child { flex: 1; }
.feed-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.grid-tight { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.dev-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mail { background: var(--deck); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.mail h2 { font-size: 1.1rem; }
.mail pre { white-space: pre-wrap; font: .95rem/1.5 var(--body); margin: 0; }
.notify-form { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }

@media (max-width: 960px) {
  .board-head, .feed-columns, .playtest-detail { grid-template-columns: 1fr; }
  .tier-explainer { grid-template-columns: 1fr; }
  .report { grid-template-columns: 1fr; }
  .menu-list { right: auto; left: 0; }
}
.play-actions { align-items: center; }
.game-side > * { width: 100%; }

/* Desktop playtests: show only the fields for the chosen way of getting the game */
.access-choice .only-keys, .access-choice .only-link, .access-choice .only-desktop, .access-choice .only-browser { display: none; }
.access-choice:has(input[value="browser"]:checked) .only-browser { display: block; }
.access-choice:has(input[value="steam_keys"]:checked) .only-keys,
.access-choice:has(input[value="link"]:checked) .only-link,
.access-choice:has(input[value="steam_keys"]:checked) .only-desktop,
.access-choice:has(input[value="link"]:checked) .only-desktop { display: block; }
.access-choice:has(input[value="steam_keys"]:checked) .field.only-keys,
.access-choice:has(input[value="link"]:checked) .field.only-link { display: flex; }
.access-choice .only-desktop .field + .field { margin-top: 12px; }
.access-choice .only-keys, .access-choice .only-link, .access-choice .only-desktop, .access-choice .only-browser { margin-top: 12px; }
.steam-key code { display: inline-block; padding: 10px 14px; font-size: 1.15rem; letter-spacing: .06em; border: 1px dashed var(--line); border-radius: 8px; user-select: all; }
.keys-box { margin-top: 10px; }
.warn-text { color: var(--warn, #e0a030); }
.access-line { margin: 6px 0 0; }
.proof-grid img { max-height: 180px; }

/* Playtest board platform filter and platform checkboxes */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
a.chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; text-decoration: none; color: inherit; }
a.chip.chip-on { background: var(--token); border-color: var(--token); color: var(--token-ink); font-weight: 700; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
fieldset.field { border: 0; padding: 0; margin: 12px 0 0; }
fieldset.field legend { font-weight: 600; margin-bottom: 6px; }
