/* Alterhaven site styles. Tokens first; dark is the default, light follows the system.
   Brand: a haven at dusk. Dusk blue ground, lantern amber, warm paper ink, moss green. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --bg: #0f141b;
  --bg-2: #151c25;
  --bg-3: #1b2430;
  --card: #19212c;
  --card-2: #202a37;
  --line: #2a3646;
  --line-2: #3a4a5e;
  --ink: #f4ecdf;
  --ink-2: #c9c2b4;
  --ink-3: #8f97a3;
  --ember: #f2a93b;
  --ember-2: #f7c062;
  --mint: #8fd19a;
  --sky: #7fb2e5;
  --gold: #f7c062;
  --rose: #e0846f;
  --danger: #ff6b5d;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 12px rgba(5, 3, 12, .25), inset 0 1px 0 rgba(255, 255, 255, .04);
  --shadow: 0 14px 36px rgba(5, 3, 12, .42), 0 2px 8px rgba(0, 0, 0, .24);
  --shadow-lg: 0 22px 54px rgba(5, 3, 12, .55), 0 4px 14px rgba(0, 0, 0, .3);
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f1e6;
    --bg-2: #efe6d6;
    --bg-3: #e4d8c3;
    --card: #fffdf8;
    --card-2: #fbf6ec;
    --line: #e2d6c2;
    --line-2: #cbbba1;
    --ink: #18202a;
    --ink-2: #3f4855;
    --ink-3: #68707d;
    --ember: #b8650f;
    --ember-2: #9a520a;
    --mint: #3c8650;
    --sky: #2f6fa8;
    --gold: #9c6a08;
    --rose: #b5513f;
    --danger: #c9352b;
    --shadow-sm: 0 2px 8px rgba(38, 22, 8, .06);
    --shadow: 0 12px 32px rgba(38, 22, 8, .09), 0 2px 6px rgba(38, 22, 8, .05);
    --shadow-lg: 0 20px 48px rgba(38, 22, 8, .13), 0 4px 12px rgba(38, 22, 8, .06);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f7f1e6;
  --bg-2: #efe6d6;
  --bg-3: #e4d8c3;
  --card: #fffdf8;
  --card-2: #fbf6ec;
  --line: #e2d6c2;
  --line-2: #cbbba1;
  --ink: #18202a;
  --ink-2: #3f4855;
  --ink-3: #68707d;
  --ember: #b8650f;
  --ember-2: #9a520a;
  --mint: #3c8650;
  --sky: #2f6fa8;
  --gold: #9c6a08;
  --rose: #b5513f;
  --danger: #c9352b;
  --shadow-sm: 0 2px 8px rgba(38, 22, 8, .06);
  --shadow: 0 12px 32px rgba(38, 22, 8, .09), 0 2px 6px rgba(38, 22, 8, .05);
  --shadow-lg: 0 20px 48px rgba(38, 22, 8, .13), 0 4px 12px rgba(38, 22, 8, .06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: clip; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 18% -12%, color-mix(in srgb, var(--ember) 11%, transparent), transparent),
    radial-gradient(ellipse 55% 40% at 100% 8%, color-mix(in srgb, var(--sky) 7%, transparent), transparent);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

a { color: var(--ember-2); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }

/* Typography scale */
h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.8vw, 3.5rem); font-weight: 760; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 720; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-weight: 680; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .88em; }
code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
}
pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

/* Layout primitives */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 14px; } }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; line-height: 1.45; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-width: 0; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.grid-2 {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
.grid > *, .grid-2 > * { min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1.35fr 1fr; }
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 850;
  font-size: 1.28rem;
  color: var(--ink);
  letter-spacing: -.03em;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: var(--ember-2); }
.logo img, .logo svg { width: 30px; height: 30px; flex-shrink: 0; transition: transform .2s ease; }
.logo:hover img, .logo:hover svg { transform: rotate(-6deg) scale(1.06); }
.logo svg.wordmark { width: auto; height: 22px; margin-top: 1px; overflow: visible; }
@media (max-width: 480px) {
  .logo svg.wordmark { height: 15px; }
  .logo img { width: 26px; height: 26px; }
  .top .wrap { gap: 8px; }
  .nav a { padding: 7px 8px; }
}
@media (max-width: 360px) { .logo svg.wordmark { display: none; } }
.logo:hover svg.wordmark { transform: none; }
.wordmark .wm-a { fill: var(--ink); }
.wordmark .wm-b { fill: var(--ember); transition: fill .2s ease; }
.logo:hover .wordmark .wm-b { fill: var(--ember-2); }
@media (prefers-reduced-motion: reduce) { .logo:hover img { transform: none; } }
.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--ink-2);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  font-weight: 650;
  font-size: .94rem;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover {
  background: var(--bg-2);
  color: var(--ink);
  text-decoration: none;
}
.nav a.on {
  background: color-mix(in srgb, var(--ember) 15%, var(--bg-2));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ember) 35%, transparent);
  text-decoration: none;
}
.me { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.nav-create { font-weight: 750; }
.nav-create.on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ember) 45%, transparent); }
.nav-create svg { width: 15px; height: 15px; }
@media (max-width: 560px) { .nav-create .nav-create-label { display: none; } .nav-create { padding: 8px 10px; } }
.user-link:hover { text-decoration: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: .81rem;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  line-height: 1.35;
}
.pill.mint {
  color: var(--mint);
  background: color-mix(in srgb, var(--mint) 12%, var(--bg-2));
  border-color: color-mix(in srgb, var(--mint) 42%, var(--line));
}
.pill.ember {
  color: var(--ember-2);
  background: color-mix(in srgb, var(--ember) 13%, var(--bg-2));
  border-color: color-mix(in srgb, var(--ember) 42%, var(--line));
}
.pill.danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--bg-2));
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--card);
  border: 2px solid var(--line-2);
}
.avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember), var(--rose));
  color: #1d1306;
  font-size: 1.6rem;
  font-weight: 850;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .nav a.hide-sm, .me .hide-sm { display: none; }
  .top .wrap { gap: 8px; }
  .nav a { padding: 6px 9px; font-size: .88rem; }
}

/* Buttons and forms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  font-size: .95rem;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--bg-3);
  border-color: var(--ember);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary {
  background: linear-gradient(180deg, #f7c062, #f2a93b 55%, #e8923a);
  color: #1d1306;
  border: 1px solid rgba(120, 70, 10, .35);
  box-shadow: 0 8px 22px rgba(242, 169, 59, .22), inset 0 1px 0 rgba(255, 246, 220, .55);
}
.btn.primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 26px rgba(242, 169, 59, .32), inset 0 1px 0 rgba(255, 246, 220, .6);
}
.btn.mint {
  background: var(--mint);
  color: #072518;
  border: 0;
  font-weight: 800;
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--bg-2);
  border-color: var(--line);
}
.btn.small {
  padding: 7px 12px;
  font-size: .86rem;
  border-radius: 10px;
}
.btn.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}
.btn.danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, var(--bg-2));
  border-color: var(--danger);
}
button:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

label { display: block; font-weight: 650; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=search], input[type=email], input[type=url], input[type=number], input[type=password], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%;
  max-width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, .chip:focus-visible, .scene-btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ember) 20%, transparent);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0;
}
.field { margin-bottom: 16px; }
.hint { color: var(--ink-3); font-size: .85rem; margin-top: 6px; }
.search-form { flex: 0 1 280px; width: 100%; }

/* Cards and Sections */
.section { padding: 48px 0; }
@media (max-width: 640px) { .section { padding: 32px 0; } }
.section-head, .page-head { margin-bottom: 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
@media (max-width: 480px) { .card { padding: 16px; } }
.card.flat {
  box-shadow: none;
  background: color-mix(in srgb, var(--card) 75%, var(--bg-2));
}
.card h3 { margin-bottom: 8px; }
.empty-state { text-align: center; padding: 36px 20px; }

/* Procedural Game Cards */
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
  text-decoration: none;
}
.game-card:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}
.game-card .cover {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 22%, hsl(var(--h3, 190) 90% 70% / .32), transparent 55%),
    linear-gradient(135deg, hsl(var(--h, 20) 78% 46%), hsl(var(--h2, 72) 74% 26%));
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.game-card .cover::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .45) 1px, transparent 1px);
  background-size: 14px 14px;
}
.game-card .cover.cover-pat-1::before {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, .18) 0 2px,
    transparent 2px 12px
  );
  background-size: auto;
}
.game-card .cover.cover-pat-2::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 20px 20px;
}
.game-card .cover.cover-pat-3::before {
  background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, .3) 0, transparent 50%);
  background-size: auto;
}
.game-card .cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 65%;
  background: linear-gradient(to top, rgba(10, 7, 18, .72), transparent);
  pointer-events: none;
}
.game-card .cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform .3s ease;
}
.game-card:hover .cover-art { transform: scale(1.05); }
.game-card .cover-badge {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 11, 24, .48);
  border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(4px);
}
.game-card .cover-title {
  position: relative;
  z-index: 1;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.game-card .meta {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.game-card .meta-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.game-card .meta b {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, var(--bg-2));
  flex-shrink: 0;
}
.card-pitch {
  font-size: .86rem;
  color: var(--ink-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta-foot { margin-top: auto; padding-top: 2px; }
.game-card .cover.has-image::before { display: none; }
.game-card .cover.has-image::after { height: 40%; background: linear-gradient(to top, rgba(10, 7, 18, .45), transparent); }
.game-card .cover-img { object-fit: cover; }
.cover.cover-calm:not(.has-image) {
  background: #F3EBDD !important;
  color: #5B4E45;
  border-bottom: 1.5px solid #B8B2A7;
}
.cover.cover-calm:not(.has-image).cover-pat-1 { background: #8FA98F !important; }
.cover.cover-calm:not(.has-image).cover-pat-2 { background: #8BA3B5 !important; }
.cover.cover-calm:not(.has-image).cover-pat-3 { background: #E9B9A0 !important; }
.cover.cover-calm:not(.has-image)::before,
.cover.cover-calm:not(.has-image)::after {
  display: none;
}
.cover.cover-calm:not(.has-image) .cover-art {
  filter: saturate(0.25) opacity(0.55);
}
.cover.cover-calm:not(.has-image) .cover-badge {
  background: #F3EBDD;
  border: 1.5px solid #B8B2A7;
  color: #5B4E45;
  backdrop-filter: none;
}
.cover.cover-calm:not(.has-image) .cover-title {
  color: #5B4E45;
  text-shadow: none;
  background: rgba(243, 235, 221, .88);
  padding: 4px 10px;
  border-radius: 12px;
  align-self: flex-start;
}
.like-pill { color: var(--ember); background: color-mix(in srgb, var(--ember) 14%, var(--bg-2)); }
.tag-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 750;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
a.tag-pill:hover { color: var(--ink); border-color: var(--line-2); text-decoration: none; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 20px; }
@media (max-width: 640px) {
  .tag-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .tag-filter::-webkit-scrollbar { display: none; }
  .tag-filter .chip { white-space: nowrap; flex-shrink: 0; }
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); text-decoration: none; }
.chip.on, .chip:has(input:checked) { color: var(--ink); border-color: var(--ember); background: color-mix(in srgb, var(--ember) 16%, var(--card)); }
.chip-n { font-size: .74rem; color: var(--ink-3, var(--ink-2)); font-weight: 650; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pick .chip input { margin: 0; }
.like-btn.on { color: var(--ember); border-color: var(--ember); }
.like-btn .like-n { font-variant-numeric: tabular-nums; opacity: .8; }

/* Hero */
.hero {
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}
@media (max-width: 640px) { .hero { padding: 32px 0 28px; } }
.hero::before {
  content: "";
  position: absolute;
  inset: -35% -10% auto auto;
  width: 680px;
  height: 680px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ember) 24%, transparent), transparent);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--mint) 16%, transparent), transparent);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.18fr 0.82fr; gap: 40px; }
}
.hero-badges { margin-bottom: 16px; gap: 8px; }
.hero .lead {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--ink-2);
  max-width: 620px;
  margin-bottom: 22px;
}
.idea-box {
  max-width: 720px;
  background: var(--card);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.idea-box:focus-within {
  border-color: var(--ember);
  box-shadow: var(--shadow-lg), 0 0 0 4px color-mix(in srgb, var(--ember) 18%, transparent);
}
.idea-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.idea-head label {
  margin: 0;
  font-size: .86rem;
  font-weight: 750;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.idea-box textarea {
  border: 0;
  background: transparent;
  min-height: 88px;
  padding: 6px 2px;
  font-size: 1.08rem;
  line-height: 1.5;
}
.idea-box textarea:focus { outline: none; box-shadow: none; }
.idea-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
  .idea-foot .btn.primary { width: 100%; }
}
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  font-weight: 650;
  text-align: left;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.chip:hover {
  color: var(--ink);
  border-color: var(--ember);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.hero-note { margin-top: 14px; margin-bottom: 0; }
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .32));
}

/* Fair Play Promise & Callouts */
.promise {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
}
.promise .card {
  border-top: 3px solid var(--mint);
  display: flex;
  flex-direction: column;
}
.promise .card p { margin-bottom: 0; }
.promise-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--mint) 14%, var(--bg-2));
  color: var(--mint);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.steps-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  counter-reset: step-counter;
}
.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 38px;
  line-height: 1.5;
}
.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ember) 18%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--ember) 45%, var(--line));
  color: var(--ember-2);
  font-size: .82rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.season-callout {
  background:
    radial-gradient(circle at 95% 10%, color-mix(in srgb, var(--ember) 16%, transparent), transparent 60%),
    var(--card);
  border-color: color-mix(in srgb, var(--ember) 35%, var(--line));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Play page */
body.play-mode-open {
  overflow: hidden;
}
.play-head { margin-bottom: 14px; }
.play-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.stage {
  background: #0b0910;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--line-2);
  position: relative;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, opacity .25s ease, border-radius .25s ease;
}
.stage iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  border: 0;
  display: block;
  background: #0b0910;
}
.stage.play-mode,
.stage.full,
.stage:fullscreen,
.stage:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 50;
  border-radius: 0;
  border: 0;
  aspect-ratio: auto;
  animation: stage-grow .25s ease;
}
@keyframes stage-grow {
  from { transform: scale(.96); opacity: .88; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stage,
  .stage.play-mode,
  .stage.full,
  .stage:fullscreen,
  .stage:-webkit-full-screen {
    transition: none;
    animation: none;
  }
}
.stage-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: env(safe-area-inset-top) 12px 0;
  background: #0f141b;
  border-bottom: 1px solid var(--line);
  color: #f6eee6;
  flex-shrink: 0;
  z-index: 3;
}
.stage.play-mode .stage-bar,
.stage.full .stage-bar,
.stage:fullscreen .stage-bar,
.stage:-webkit-full-screen .stage-bar {
  display: flex;
}
.stage-bar-title {
  font-weight: 750;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.stage-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.stage-bar-btn {
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.2;
}
.stage-bar-btn:hover {
  border-color: var(--ember);
  background: var(--bg-3);
}
.stage-bar-exit {
  font-size: 1.05rem;
  padding: 3px 9px;
}
@media (max-width: 640px) {
  .stage-bar {
    height: calc(40px + env(safe-area-inset-top, 0px));
    min-height: 40px;
    padding: env(safe-area-inset-top) 8px 0;
  }
}
.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 35%, rgba(242, 169, 59, .2), rgba(9, 13, 18, .88));
}
.play-cover[hidden],
.stage.play-mode .play-cover {
  display: none;
}
.play-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .42;
  pointer-events: none;
}
.play-cover-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.play-cover-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 850;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .65);
}
.play-start-btn {
  font-size: 1.15rem;
  padding: 14px 32px;
  border-radius: 999px;
}
.play-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(19, 16, 27, .92);
  border: 1px solid var(--line-2);
  color: #f6eee6;
  font-size: .85rem;
  font-weight: 650;
  box-shadow: var(--shadow);
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
}
.play-hint[hidden] { display: none; }
.feedback-backdrop {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(11, 9, 16, .76);
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
}
.feedback-backdrop[hidden] { display: none; }
.feedback-sheet {
  width: 100%;
  max-width: 480px;
}
.feedback-title {
  font-size: 1.2rem;
  margin: 0;
}
.feedback-sheet > .row:first-child {
  flex-wrap: nowrap;
  align-items: flex-start;
}
.feedback-chips .chip {
  position: relative;
}
.feedback-chips .chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.feedback-chips .chip:has(input:checked) {
  background: var(--ember);
  border-color: var(--ember);
  color: #1b0f08;
}
.feedback-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 4px;
  cursor: pointer;
}
.feedback-what summary {
  font-weight: 600;
}
.feedback-what p {
  margin: 6px 0 0;
}
.feedback-status {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--mint) 15%, var(--bg-2));
  color: var(--ink);
}
.feedback-status.bad {
  background: color-mix(in srgb, var(--danger) 15%, var(--bg-2));
  color: var(--danger);
}
.scene-bar { margin-top: 12px; }
.scenes { display: flex; gap: 6px; flex-wrap: wrap; }
.scene-btn {
  font: inherit;
  font-size: .81rem;
  padding: 6px 11px;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 650;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.scene-btn:hover {
  border-color: var(--sky);
  color: var(--ink);
  background: var(--bg-3);
}
.stars {
  display: inline-flex;
  gap: 3px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.stars input { display: none; }
.stars label {
  cursor: pointer;
  font-size: 1.55rem;
  color: var(--line-2);
  margin: 0;
  line-height: 1;
  transition: color .12s ease, transform .1s ease;
}
.stars label:hover { transform: scale(1.12); }
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label { color: var(--gold); }
.badge-fair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mint) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--mint) 38%, transparent);
  color: var(--mint);
  font-weight: 750;
  font-size: .82rem;
  white-space: nowrap;
}
.badge-fair:hover { text-decoration: none; background: color-mix(in srgb, var(--mint) 22%, transparent); }

/* Studio & Admin */
.status { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--ember);
  animation: spin .9s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.steps li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-2);
  word-break: break-word;
}
.steps li:last-child { border-bottom: 0; }
.steps li time {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .78rem;
  margin-right: 8px;
}
.q { margin-bottom: 22px; }
.q .opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.q .opts label { margin: 0; font-weight: 650; }
.q .opts input { display: none; }
.q .opts span {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.q .opts span:hover { border-color: var(--line-2); }
.q .opts input:checked + span {
  border-color: var(--ember);
  background: color-mix(in srgb, var(--ember) 18%, var(--bg-2));
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--ember);
}

/* Tabs & Tables */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 14px;
  color: var(--ink-2);
  font-weight: 700;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on {
  color: var(--ink);
  border-color: var(--ember);
  text-decoration: none;
}

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th {
  color: var(--ink-3);
  font-weight: 750;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}

/* Notices, Secrets, Footer, Prose */
.notice {
  padding: 12px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--sky) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--sky) 35%, var(--line));
}
.notice.warn {
  background: color-mix(in srgb, var(--gold) 12%, var(--card));
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
}
.notice.bad {
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}
.secret {
  font-family: var(--mono);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px dashed var(--ember);
  word-break: break-all;
}
details summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
details summary:hover { color: var(--ink); }

.foot {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 28px 0 40px;
  color: var(--ink-3);
  font-size: .9rem;
  background: color-mix(in srgb, var(--bg-2) 45%, transparent);
}
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.foot-links { gap: 16px; }
.foot a { color: var(--ink-2); font-weight: 600; }
.foot a:hover { color: var(--ink); }

.prose h1 { font-size: clamp(1.8rem, 3.5vw, 2.35rem); }
.prose h2 { margin-top: 1.6em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose li { margin-bottom: .45em; }
.prose table { margin: 16px 0; display: block; overflow-x: auto; }

.kpi {
  font-size: 1.9rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  margin: 4px 0 10px;
  font-variant-numeric: tabular-nums;
}
.bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--rose)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- review room */
.review-filters { margin: 12px 0 18px; gap: 10px; flex-wrap: wrap; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.review-tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: transform .12s ease, border-color .12s ease; }
.review-tile:hover, .review-tile:focus-visible { transform: translateY(-2px); border-color: var(--line-2); }
.review-thumb { position: relative; aspect-ratio: 4/3; background: var(--bg-3); display: grid; place-items: center; overflow: hidden; }
.review-thumb img { width: 100%; height: 100%; object-fit: contain; }
.kind-mark { font-size: 2.2rem; color: var(--ink-3); }
.note-count { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--ember); color: #1b0f08; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.review-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-text { color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.review-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .review-split { grid-template-columns: 1fr; } }
.review-preview { position: sticky; top: 12px; }
@media (max-width: 900px) { .review-preview { position: static; } }
.review-image { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: var(--bg-3); border-radius: var(--radius); }
.review-words { margin-top: 12px; white-space: normal; }
.audio-card audio { width: 100%; }
.pin-wrap { position: relative; cursor: crosshair; }
.pin-dot { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%;
  background: var(--ember); color: #1b0f08; font-weight: 700; font-size: .8rem; display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); text-decoration: none; }
.pin-new { background: var(--mint); }
.note-form textarea { width: 100%; resize: vertical; }
.note-form.drop { outline: 2px dashed var(--mint); outline-offset: 4px; }
.note-form.compact { margin-top: 10px; }
.file-btn { cursor: pointer; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; }
.note header .row { gap: 8px; flex-wrap: wrap; }
.note.flash { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(61, 220, 151, .25); }
.note-done, .note-declined { opacity: .78; }
.note-body { margin-top: 8px; overflow-wrap: anywhere; }
.note-pics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.note-pics img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.note-resolution { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-3); }
.note-reply { margin: 10px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.note-actions { margin-top: 10px; }
.note-actions summary { cursor: pointer; color: var(--ink-2); }
.status-form { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.status-form input[type=text] { flex: 1; min-width: 160px; }
.notes-list { max-width: 860px; }
.note-form .chip { position: relative; }
.note-form .chip input { position: absolute; opacity: 0; pointer-events: none; }
.note-form .chip:has(input:checked) { background: var(--ember); border-color: var(--ember); color: #1b0f08; }
.note-form .chip:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.note-this summary { cursor: pointer; list-style: none; } .note-this { margin-top: 14px; }

/* Review room lenses: storyboard, script, track list */
.storyboard { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.sb-scene { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.sb-head { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.sb-head:hover { text-decoration: none; }
.sb-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-3); font-weight: 800; }
.sb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-stats { display: flex; gap: 8px; align-items: center; color: var(--ink-2); white-space: nowrap; }
.sb-frames { display: flex; gap: 10px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.sb-frame { flex: none; width: 200px; margin: 0; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2);
  border-radius: 10px; }
.sb-frame img { width: 200px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: var(--bg-3); }
.sb-frame .kind-mark { width: 200px; aspect-ratio: 16/9; display: grid; place-items: center; background: var(--bg-3);
  border-radius: 10px; }
.sb-frame.on img { outline: 3px solid var(--ember); }
.item-frames { margin-top: 12px; }
@media (max-width: 640px) { .sb-frame, .sb-frame img, .sb-frame .kind-mark { width: 150px; } }
.script-table audio { width: 220px; max-width: 100%; height: 34px; }
.note-count.inline { position: static; display: inline-grid; }
.unused-flag { position: absolute; left: 8px; bottom: 8px; font-size: .72rem; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--ember) 18%, var(--card)); color: var(--ink); }
.warn-text { color: var(--ember-2); }
.item-facts { margin-top: 12px; }
.item-facts summary { cursor: pointer; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 0; }
.facts dt { color: var(--ink-2); font-size: .85rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; font-size: .9rem; }
.improve { margin-bottom: 14px; }
.improve summary { cursor: pointer; }
.improve textarea { width: 100%; }
/* Repositories: one card per host */
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.host-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--bg-2, var(--card)); }
.host-card summary { cursor: pointer; }
.host-card input { width: 100%; }
.inline-form { display: inline-flex; gap: 4px; align-items: center; margin: 2px 6px 2px 0; }

/* ---------------------------------------------------------------- studios */
.game-card-cover { display: block; color: inherit; text-decoration: none; }
.game-card-cover:hover { text-decoration: none; }
.game-card-title { color: var(--ink); text-decoration: none; }
.game-card-title:hover { color: var(--ember-2); text-decoration: none; }

.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: .82rem;
  font-weight: 750;
  color: var(--ink-2);
  text-decoration: none;
  padding: 2px 0;
}
a.studio-badge:hover { color: var(--ink); text-decoration: underline; }
.studio-mark {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 5px;
  flex-shrink: 0;
}
.studio-logo {
  height: 68px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  flex-shrink: 0;
}
.studio-initial {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--studio-accent, #E09A3E);
  color: #0f141b;
  font-size: .74rem;
  font-weight: 850;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.studio-initial-lg {
  width: 68px;
  height: 68px;
  font-size: 1.85rem;
}
.play-byline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.studio-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  border-top: 3px solid var(--studio-accent, var(--ember));
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.studio-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--studio-accent, var(--ember));
  text-decoration: none;
}
.studio-card .studio-logo { height: 48px; max-width: 190px; }
.studio-card .studio-initial-lg { width: 48px; height: 48px; font-size: 1.35rem; }
.studio-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.studio-card h3 { margin: 0; font-size: 1.2rem; color: var(--ink); }
.studio-card-tagline { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.studio-card-foot { margin-top: auto; padding-top: 4px; }

.studio-hero {
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--studio-accent, #E09A3E) 22%, transparent), transparent 55%),
    linear-gradient(135deg, #1B2238 0%, #14192B 100%);
  border-bottom: 3px solid var(--studio-accent, #E09A3E);
  padding: 44px 0 40px;
  color: #F8F3EC;
}
.studio-hero-inner {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.studio-hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(19, 16, 27, .42);
  border: 1.5px solid color-mix(in srgb, var(--studio-accent, #E09A3E) 55%, rgba(255, 255, 255, .16));
}
.studio-hero-copy { flex: 1; min-width: min(100%, 280px); }
.studio-title {
  color: #F8F3EC;
  margin: 10px 0 6px;
  font-size: clamp(2rem, 4vw, 2.85rem);
}
.studio-tagline {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  font-weight: 750;
  color: color-mix(in srgb, var(--studio-accent, #E09A3E) 68%, #FFFFFF);
  margin: 0 0 12px;
}
.studio-about {
  max-width: 680px;
  color: #EDE6DA;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 18px;
}
.studio-meta-row { gap: 10px; }
.studio-hero .studio-pill {
  background: rgba(248, 243, 236, .1);
  border-color: rgba(248, 243, 236, .25);
  color: #F8F3EC;
}

/* Studio About page and team credits */
.studio-team-strip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding-left: 8px;
  color: inherit;
}
.studio-team-strip:hover { text-decoration: none; }
.studio-team-strip .avatar,
.studio-team-strip .avatar-placeholder {
  width: 30px;
  height: 30px;
  margin-left: -8px;
  font-size: .8rem;
  border: 2px solid #1B2238;
}
.studio-team-strip .small { margin-left: 8px; }
.studio-back-link { color: inherit; opacity: .85; }
.studio-about-section { padding: 28px 0 8px; }
.studio-about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 760px) {
  .studio-about-layout { grid-template-columns: minmax(0, 1fr); }
}
.studio-story-text { max-width: 680px; line-height: 1.7; margin: 0; }
.studio-facts { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.studio-facts dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
}
.studio-facts dt { font-weight: 750; color: var(--ink-2); }
.studio-facts dd { margin: 0; overflow-wrap: anywhere; }
.studio-team-section { padding: 20px 0 28px; }
.studio-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}
.studio-person {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--ink);
}
.studio-person:hover { text-decoration: none; border-color: var(--studio-accent, var(--ember)); }
.studio-person-avatar { width: 56px; height: 56px; font-size: 1.3rem; flex-shrink: 0; }
.studio-person-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.studio-person-handle { overflow-wrap: anywhere; }
.studio-person-credit { font-weight: 700; color: color-mix(in srgb, var(--studio-accent, #E09A3E) 70%, var(--ink)); }
.studio-credits-table input[type="text"] { width: 100%; min-width: 160px; }

/* Pebble Nook studio page: low-saturation palette, round soft cards, zero motion */
.studio-games-section,
.studios-section {
  min-height: 0;
  padding: 28px 0 24px;
}
.studio-foot-note {
  margin: 20px 0 0;
}
body:has(.studio-page),
body:has(.studios-section) {
  min-height: auto;
}
body:has(.studio-page) main,
body:has(.studios-section) main {
  flex: 0 0 auto;
}
body:has(.studio-page) .foot,
body:has(.studios-section) .foot {
  margin-top: 0;
}
body:has(.studio-page-pebble-nook) {
  background: #F3EBDD;
  background-image: none;
}
body:has(.studio-page-pebble-nook) .foot {
  background: #F3EBDD;
  border-top-color: #B8B2A7;
  color: #5B4E45;
}
body:has(.studio-page-pebble-nook) .foot a {
  color: #5B4E45;
}
.studio-page-pebble-nook {
  --pn-moss: #8FA98F;
  --pn-oat: #F3EBDD;
  --pn-pebble: #B8B2A7;
  --pn-dusk: #8BA3B5;
  --pn-peach: #E9B9A0;
  --pn-bark: #5B4E45;
  background: #F3EBDD;
  color: #5B4E45;
  padding-bottom: 16px;
}
.studio-page-pebble-nook,
.studio-page-pebble-nook *,
.studio-page-pebble-nook *::before,
.studio-page-pebble-nook *::after,
body:has(.studio-page-pebble-nook) *,
body:has(.studio-page-pebble-nook) *::before,
body:has(.studio-page-pebble-nook) *::after {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}
.studio-page-pebble-nook .studio-hero {
  background: #F3EBDD;
  border-bottom: 3px solid #8FA98F;
  color: #5B4E45;
}
.studio-page-pebble-nook .studio-hero-inner {
  background: #F3EBDD;
  border: 2.5px solid #B8B2A7;
  border-radius: 28px;
  padding: 28px;
}
.studio-page-pebble-nook .studio-hero-brand {
  background: #F3EBDD;
  border: 2px solid #8FA98F;
  border-radius: 24px;
}
.studio-page-pebble-nook .studio-title,
.studio-page-pebble-nook h2,
.studio-page-pebble-nook h3,
.studio-page-pebble-nook .studio-tagline,
.studio-page-pebble-nook .studio-about,
.studio-page-pebble-nook .muted,
.studio-page-pebble-nook a {
  color: #5B4E45;
}
.studio-page-pebble-nook .badge-fair,
.studio-page-pebble-nook .studio-pill,
.studio-page-pebble-nook .tag-pill {
  background: #E9B9A0;
  border: 1.5px solid #B8B2A7;
  color: #5B4E45;
  border-radius: 999px;
}
.studio-page-pebble-nook .btn {
  background: #E9B9A0;
  border: 2px solid #8BA3B5;
  color: #5B4E45;
  border-radius: 20px;
  box-shadow: none;
}
.studio-page-pebble-nook .card,
.studio-page-pebble-nook .game-card {
  background: #F3EBDD;
  border: 2.5px solid #B8B2A7;
  border-radius: 26px;
  box-shadow: none;
  color: #5B4E45;
}
.studio-page-pebble-nook .game-card .meta b,
.studio-page-pebble-nook .game-card .card-pitch,
.studio-page-pebble-nook .game-card .studio-badge {
  color: #5B4E45;
}

/* studio: feedback and people */
.feedback-banner {
  border-left: 4px solid var(--ember);
}
.feedback-game-pills {
  gap: 8px;
}
.feedback-game-pills .chip {
  text-decoration: none;
}
.game-group-card {
  padding: 0;
  overflow: hidden;
  border-top: 3px solid var(--studio-accent, var(--line-2));
}
.game-group-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 55%, var(--card));
}
.game-group-table th,
.game-group-table td {
  padding: 12px 16px;
}
.studio-manage-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.studio-manage-card {
  border-top: 3px solid var(--studio-accent, var(--ember));
}
.studio-manage-links {
  gap: 8px;
  padding-top: 4px;
}

.role-guide-box summary {
  cursor: pointer;
}
.role-guide {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-top: 12px;
}
.role-dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  margin: 4px 0 0;
}
.role-dl dt {
  font-weight: 750;
  color: var(--ink);
}
.role-dl dd {
  margin: 0;
  color: var(--ink-2);
}
.person-card {
  padding: 16px 18px;
}
.person-head {
  gap: 12px;
}
.person-identity {
  min-width: 0;
  overflow-wrap: anywhere;
}
.person-controls {
  gap: 8px;
}
.person-role-form {
  gap: 8px;
}
.person-games {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.game-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  cursor: default;
}
.game-role-chip a {
  color: var(--ink);
  font-weight: 750;
}
.chip-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  padding: 0 2px;
  margin-left: 2px;
  cursor: pointer;
  border-radius: 4px;
}
.chip-remove:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 15%, transparent);
}
.give-access-form {
  gap: 8px;
  padding-top: 4px;
}
.give-access-label {
  white-space: nowrap;
}

.feedback-filters {
  gap: 10px;
}
.feedback-filters select {
  width: auto;
  flex: 1 1 160px;
  min-width: 140px;
}
.feedback-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feedback-done,
.feedback-declined,
.feedback-spam {
  opacity: .8;
}
.feedback-game-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}
.feedback-body {
  font-size: .98rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.feedback-context {
  gap: 8px;
}
.feedback-errors summary {
  color: var(--danger);
}
.feedback-errors pre {
  margin: 8px 0 0;
  font-size: .8rem;
}
.feedback-actions {
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.feedback-done-group {
  flex: 1 1 220px;
  gap: 6px;
}
.feedback-more {
  position: relative;
}
.feedback-more summary {
  list-style: none;
  cursor: pointer;
}
.feedback-more summary::-webkit-details-marker { display: none; }
.feedback-more[open] > .row {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  left: 0;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.feedback-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
.feedback-tabs::-webkit-scrollbar { display: none; }
.feedback-tabs > * {
  flex-shrink: 0;
}
.person-controls .btn.danger {
  margin-left: 6px;
}
.feedback-done-group input[type=text] {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 6px 10px;
  font-size: .86rem;
}
@media (max-width: 640px) {
  .people-add-form select,
  .people-add-form button,
  .give-access-form select,
  .give-access-form button,
  .feedback-filters select {
    flex: 1 1 100%;
    width: 100%;
  }
  .game-group-table th,
  .game-group-table td {
    padding: 9px 10px;
    font-size: .84rem;
  }
  .play-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }
  .play-actions::-webkit-scrollbar { display: none; }
  .play-actions > * {
    flex-shrink: 0;
  }
}

.studio-page-pebble-nook .studio-team-strip .avatar,
.studio-page-pebble-nook .studio-team-strip .avatar-placeholder { border-color: #F3EBDD; }
/* Bark on Moss is 3.1:1, enough for the large bold initial. Oat on Moss was 2.2:1. */
.studio-page-pebble-nook .avatar-placeholder { background: #8FA98F; color: #5B4E45; }
.studio-page-pebble-nook .studio-person-credit,
.studio-page-pebble-nook .studio-facts dt { color: #5B4E45; }

/* Game stages (docs/specs/community-testing.md section 3). The labels are dark text on a light pill in both themes. */
.game-card .cover-stage {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffe8a3;
  color: #3d2c00;
  border: 1px solid rgba(0, 0, 0, .14);
}
.game-card .cover-stage-early_access { background: #cdeedd; color: #0d3b23; }
.game-card .cover:has(.cover-stage) .cover-badge {
  max-width: calc(100% - 128px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playtest-row {
  margin: 4px 0 30px;
  padding: 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}
.playtest-row-head { align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.playtest-row-head h2 { margin: 0 0 4px; }
.playtest-row-head p { margin: 0; }
.arcade-main-title { margin: 0 0 14px; }
.play-stage-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--gold);
  background: var(--bg-2);
  color: var(--ink);
}
.play-stage-note-early_access { border-left-color: var(--mint); }
.play-stage-note p { margin: 0; }
.play-stage-note .btn { margin-top: 8px; }

/* Community testing (docs/specs/community-testing.md section 4) */
.playtest-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.playtest-how .card p { margin: 4px 0 0; }
.playtest-me { margin: 0; }
.playtest-card .meta { gap: 6px; }
.playtest-card .btn { align-self: flex-start; margin-top: 6px; }
.playtest-reward { margin: 2px 0 0; }
.playtest-focus { margin: 0; color: var(--ink-2); }
.playtest-rules ul { margin: 6px 0 0; padding-left: 20px; }
.playtest-rules li { margin: 2px 0; }
.playtest-form-wrap { max-width: 760px; }
.playtest-brief { margin-bottom: 16px; }
.playtest-brief p { margin: 0 0 6px; }
.playtest-meter { height: 10px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.playtest-meter span { display: block; height: 100%; background: var(--mint); }
.playtest-form label { display: block; margin: 14px 0 6px; }
.playtest-form textarea { width: 100%; }
.playtest-choice { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.playtest-choice legend { margin-bottom: 6px; padding: 0; }
.playtest-choice .chip { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.playtest-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.playtest-stats .card { display: flex; flex-direction: column; gap: 4px; }
.playtest-stats b { font-size: 1.5rem; }
.test-answers { margin: 0; display: grid; gap: 4px 0; }
.test-answers dt { font-weight: 750; color: var(--ink-2); margin-top: 8px; }
.test-answers dd { margin: 0; overflow-wrap: anywhere; }
.test-mark details summary { cursor: pointer; }
@media (max-width: 700px) {
  .playtest-how, .playtest-stats { grid-template-columns: 1fr; }
}
.test-boost { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Game discussions (docs/specs/community-testing.md section 6) */
.talk-wrap { max-width: 860px; }
.talk-list { padding: 0; overflow: hidden; }
.talk-row {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.talk-row:last-child { border-bottom: 0; }
.talk-row:hover, .talk-row:focus-visible { background: var(--bg-2); }
.talk-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.talk-row-title { overflow-wrap: anywhere; }
.talk-row-counts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.talk-hidden { opacity: .62; }
.team-label {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--mint);
  border: 1px solid color-mix(in srgb, var(--mint) 45%, var(--line));
}
.talk-post { display: flex; flex-direction: column; gap: 8px; }
.talk-title { margin: 0; font-size: 1.6rem; overflow-wrap: anywhere; }
.talk-byline { margin: 0; }
.talk-body { line-height: 1.6; overflow-wrap: anywhere; }
.talk-tools { gap: 8px; align-items: center; flex-wrap: wrap; }
.talk-tools form { margin: 0; }
.talk-tools .btn.on { border-color: var(--mint); color: var(--mint); }
.talk-report summary { cursor: pointer; }
.talk-report form { margin-top: 8px; min-width: min(320px, 80vw); }
.talk-rules { color: var(--ink-2); }
@media (max-width: 700px) {
  .talk-row { flex-direction: column; align-items: flex-start; }
  .talk-row-counts { flex-direction: row; gap: 10px; }
}
.test-flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* Bot rules, batches 2 and 3 (docs/specs/community-testing.md section 7) */
.human-check { margin: 4px 0; min-height: 65px; }
.agents-page { max-width: 860px; }
.agents-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.agents-page pre { margin: 0; overflow-x: auto; }
