:root {
  color-scheme: dark;
  --bg: #121214;
  --bg2: #16161a;
  --nav: #18181c;
  --panel: #1d1d22;
  --panel-hover: #23232a;
  --spot-bg: linear-gradient(155deg, #211f24, #17171b);
  --line: #2c2c34;
  --line-strong: #3d3d48;
  --ink: #f3f3f5;
  --muted: #9898a6;
  --accent: #ff6b2c;
  --accent-hover: #ff7f47;
  --accent-fg: #ffffff;
  --accent-soft: rgba(255, 107, 44, 0.16);
  --star: #f5b942;
  --chip-bg: #24242b;
  --chip-ink: #c8c8d4;
  --input-bg: #111114;
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14.5px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(24, 24, 28, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1320px, 94%);
  margin: 0 auto;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--muted);
}

.main-nav a {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.14s, border-color 0.14s;
}

.main-nav a:hover,
.main-nav a.nav-active {
  color: var(--ink);
}

.main-nav a.nav-active {
  border-bottom-color: var(--accent);
}

.header-search {
  margin-left: auto;
  flex: 0 1 240px;
}

.header-search input {
  width: 100%;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 11px;
  font: inherit;
  font-size: 13px;
}

.header-search input::placeholder {
  color: var(--muted);
}

/* Main Container */
main#app {
  width: min(1320px, 94%);
  margin: 0 auto;
  min-height: 75vh;
  padding: 20px 0 80px;
  overflow-wrap: anywhere;
}

.loading-msg {
  color: var(--muted);
  padding: 24px 0;
}

/* Genre / Category Strip */
.genre-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.gchip {
  background: var(--chip-bg);
  color: var(--chip-ink);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.gchip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.gchip.active {
  background: var(--accent);
  color: var(--accent-fg);
}

.gchip-random {
  margin-left: auto;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.gchip-random:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Featured Spotlight */
.spotlight {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: var(--spot-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}

.spot-art {
  position: relative;
  min-height: 300px;
  background: #0d0e12;
  overflow: hidden;
}

.spot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spot-info {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.spot-info h1,
.spot-info h2 {
  margin: 6px 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.spot-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
}

.spot-desc strong {
  color: var(--ink);
}

.spot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.stag {
  font-size: 11.5px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
}

.mini-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}

.mini-thumb {
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0d0e12;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.14s, border-color 0.14s;
}

.mini-thumb:hover,
.mini-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.button,
button {
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s, border-color 0.14s;
}

.button:hover,
button:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button.secondary,
button.secondary {
  background: var(--chip-bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover,
button.secondary:hover:not(:disabled) {
  background: var(--panel-hover);
  border-color: var(--accent);
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.text-link:hover {
  text-decoration: underline;
}

/* Shelves & Grids */
.shelf {
  margin-top: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Game & Benchmark Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.14s, border-color 0.14s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #101116;
  overflow: hidden;
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: linear-gradient(145deg, #25222b 0%, #15151a 100%);
  color: var(--ink);
}

.card-placeholder.cat-tactics {
  background: linear-gradient(145deg, #1b2a34 0%, #11161c 100%);
}
.card-placeholder.cat-puzzle {
  background: linear-gradient(145deg, #2b241d 0%, #161414 100%);
}
.card-placeholder.cat-action {
  background: linear-gradient(145deg, #321d1f 0%, #161214 100%);
}
.card-placeholder.cat-story {
  background: linear-gradient(145deg, #231e33 0%, #13121a 100%);
}
.card-placeholder.cat-simulation {
  background: linear-gradient(145deg, #1c2c24 0%, #111714 100%);
}
.card-placeholder.cat-exploration {
  background: linear-gradient(145deg, #262b1c 0%, #131612 100%);
}

.ph-cat {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.ph-title {
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.badge-tl {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-fg);
}

.badge-tl.archive {
  background: rgba(18, 18, 22, 0.85);
  color: var(--chip-ink);
  border: 1px solid var(--line-strong);
}

.card-body {
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.card-body h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.25;
  color: var(--ink);
}

.card-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.card-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.vision {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--muted);
  border: 1px solid var(--line);
  vertical-align: middle;
}

/* Benchmark cards */
.benchmark {
  padding: 14px 16px;
  gap: 8px;
}

.benchmark .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}

.benchmark h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.benchmark p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

.benchmark .card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* Sidebar Catalog Layout (Results & Archive) */
.catalog-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.filter-rail {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.rail-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-sec h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 210px;
  overflow-y: auto;
}

.rail-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--chip-ink);
  cursor: pointer;
}

.rail-check-row:hover {
  background: var(--panel);
  color: var(--ink);
}

.rail-check-row.checked {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 650;
}

.rail-check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-check-row input[type="checkbox"] {
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}

.rail-cnt {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.rail-check-row.checked .rail-cnt {
  color: var(--accent);
}

.rail-search-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail-input {
  width: 100%;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fpill {
  background: var(--chip-bg);
  color: var(--chip-ink);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.fpill:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.fpill.active {
  background: var(--accent);
  color: var(--accent-fg);
}

.cost-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.cost-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cost-field label {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
}

.cost-field input {
  width: 100%;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 5px 7px;
  font: inherit;
  font-size: 12px;
}

.cost-sliders {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.cost-sliders input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin: 0;
}

.cost-readout {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.bar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-title h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.count-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
}

.bar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sort-pill {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.sort-pill:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.sort-pill.active {
  background: var(--chip-bg);
  border-color: var(--accent);
  color: var(--ink);
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.achip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.clear-filters-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.clear-filters-btn:hover {
  background: transparent;
  border: 0;
  color: var(--ink);
  text-decoration: underline;
}

/* Page headers for Benchmark Detail */
.page-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin: 6px 0;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lede {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 70ch;
}

#count,
#result-count {
  margin: 0;
}

/* Theater-First Game Detail Page */
.theater-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}

.play.theater-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
}

.stage-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 360px;
  background: #0a0b0f;
  overflow: hidden;
}

.stage-viewport.playing {
  aspect-ratio: auto;
  height: min(74vh, 720px);
}

.stage-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(10, 10, 14, 0.25), rgba(10, 10, 14, 0.72));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
}

.stage-overlay.hidden-overlay {
  display: none;
}

.stage-note {
  margin: 0;
  font-size: 12.5px;
  color: #d6d9e2;
}

#game-slot {
  width: 100%;
  height: 100%;
}

#game-slot iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.stage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--nav);
  border-top: 1px solid var(--line);
}

.stage-title-block h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stage-meta-line {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.stage-bar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stage-bar .button,
.stage-bar button {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* Right Sidebar: Other Models on Same Prompt */
.theater-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.side-card h2,
.side-card h3 {
  margin: 4px 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.side-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.alt-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 310px;
  overflow-y: auto;
}

.alt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  transition: border-color 0.14s;
}

.alt-item:hover {
  border-color: var(--accent);
}

.alt-item.current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.alt-model {
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.alt-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.alt-cta {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--accent);
  white-space: nowrap;
}

/* Facts & Prompt Pre */
.details-block {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.details-block h2 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.facts div {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.facts dt {
  font-size: 11px;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.facts dd {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 500;
}

.prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.empty {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 16px;
}

.empty h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty p {
  margin: 0 0 14px;
  color: var(--muted);
}

/* Account Bar & Auth Drawer */
.account-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-btn {
  padding: 6px 12px;
  font-size: 12.5px;
}

.account-pill {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--chip-bg);
}

.badge-admin,
.badge-played {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-played {
  background: rgba(63, 185, 80, 0.16);
  color: #5cd675;
}

.drawer {
  width: min(1320px, 94%);
  margin: 14px auto 0;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.drawer[hidden] {
  display: none;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.drawer h2,
.drawer h3 {
  margin-top: 0;
}

.drawer label {
  display: block;
  margin: 12px 0 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drawer input,
.drawer select,
.community-section textarea {
  width: 100%;
  max-width: 500px;
  background: var(--input-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--ink);
  font: inherit;
}

.community-section textarea {
  max-width: 100%;
  resize: vertical;
  min-height: 84px;
}

.drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}

.status-msg {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.status-msg.error {
  color: #ff7b7b;
}

.invite-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  border-top: 1px solid var(--line);
}

.invite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.invite-code {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  color: var(--accent);
}

.drawer-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

/* Community Ratings & Reviews */
.community-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.score-hero {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.score-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--star);
  letter-spacing: -0.03em;
}

.score-count {
  color: var(--muted);
  font-size: 13.5px;
}

.star-picker,
.tag-picker {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}

.star-btn,
.tag-btn {
  background: var(--bg2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
}

.star-btn[aria-pressed="true"],
.tag-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

.tag-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  margin: 0 6px 6px 0;
}

.review-form-card,
.review-card {
  background: var(--panel);
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.review-form-card {
  margin-bottom: 18px;
}

.reviews-list {
  display: grid;
  gap: 12px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 800;
}

.review-lineage {
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}

.review-score {
  color: var(--star);
  font-weight: 900;
}

.review-comment {
  white-space: pre-wrap;
  color: var(--ink);
  margin: 8px 0;
}

.card-rating {
  display: inline-block;
  color: var(--star);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.top-tags-row {
  margin-bottom: 14px;
}

.review-delete-btn {
  margin-left: 8px;
}

.meta-sm {
  color: var(--muted);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .spotlight,
  .theater-layout,
  .catalog-shell {
    grid-template-columns: 1fr;
  }
  .spot-art {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px 14px;
  }
  .header-search {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }
  .grid,
  .grid-3,
  .facts,
  .drawer-grid {
    grid-template-columns: 1fr;
  }
  .stage-viewport {
    min-height: 240px;
  }
  .gchip-random {
    margin-left: 0;
  }
}
