/* ============================================================
   Zheng Arcade — platform shell components (Neon Arcade Hall)
   ============================================================ */

/* ---------- Home shell ---------- */
.home {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 44px) 80px;
}

/* ---------- Masthead / neon marquee ---------- */
.masthead {
  text-align: center;
  margin-bottom: clamp(28px, 5vw, 52px);
}
.marquee {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}
.sign {
  margin: 0;
  font-family: var(--font-sign);
  font-weight: 400;
  font-size: clamp(34px, 8vw, 78px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: linear-gradient(92deg, var(--cyan) 0%, #fff 42%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 0 7px rgba(25, 240, 228, 0.55))
    drop-shadow(0 0 18px rgba(255, 46, 151, 0.45));
  animation: flicker 7s linear infinite;
}
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.72; }
  23% { opacity: 0.45; }
}
.open-tag {
  margin-top: 0.6em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--magenta);
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--magenta) 55%, transparent);
  border-radius: 99px;
  box-shadow: var(--glow-magenta);
  text-shadow: 0 0 8px color-mix(in srgb, var(--magenta) 80%, transparent);
  white-space: nowrap;
}
.open-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 8px var(--magenta);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.sub {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.6vw, 14px);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.foot-changelog {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  transition: all var(--dur) var(--ease);
}
.foot-changelog:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ---------- Controls bar ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: clamp(26px, 4vw, 40px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
/* desktop: search + sort on row 1, chips get their own full row below */
@media (min-width: 561px) {
  .controls .tag-row { order: 3; flex-basis: 100%; margin-top: 4px; }
  .controls .counter { order: 2; margin-left: auto; }
  .sortbox { order: 1; }
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  flex: 1 1 240px;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-faint);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.search:focus-within {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  color: var(--cyan);
}
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
}
.search input::placeholder { color: var(--ink-faint); }

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--violet); color: var(--ink); }
.chip[aria-selected="true"] {
  color: #06121a;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  font-weight: 700;
}
.counter {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-shadow: 0 0 10px color-mix(in srgb, var(--amber) 60%, transparent);
  white-space: nowrap;
}

/* sort dropdown */
.sortbox {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sortbox::after {
  content: "▾";
  position: absolute;
  right: 12px;
  color: var(--ink-dim);
  pointer-events: none;
  font-size: 11px;
}
.sortbox select {
  appearance: none;
  -webkit-appearance: none;
  height: 46px;
  padding: 0 30px 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.sortbox select:focus { outline: none; border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.sortbox option { background: var(--bg); color: var(--ink); }

/* ---------- Cabinet wall ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: clamp(16px, 2.2vw, 26px);
}

/* Each card is an arcade cabinet lit in its own neon (--neon set in JS) */
.cabinet {
  --neon: var(--cyan);
  display: flex;
  flex-direction: column;
  text-align: left;
  color: inherit;
  background: linear-gradient(180deg, var(--panel) 0%, #0b0b15 100%);
  border: 1px solid color-mix(in srgb, var(--neon) 30%, var(--line));
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  animation: cab-in 0.55s var(--ease) backwards;
}
@keyframes cab-in {
  from { opacity: 0; transform: translateY(18px); }
}
.cabinet:hover {
  transform: translateY(-7px);
  border-color: var(--neon);
  box-shadow:
    0 0 0 1px var(--neon),
    0 0 26px color-mix(in srgb, var(--neon) 45%, transparent),
    0 22px 50px -22px #000;
}
.cabinet:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

/* marquee (lit title bar) */
.cab-marquee {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--neon) 30%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--neon) 16%, transparent), transparent);
}
.cab-emoji { font-size: 18px; filter: saturate(1.2); }
.cab-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 0 12px color-mix(in srgb, var(--neon) 60%, transparent);
}

/* screen (glowing CRT showing the cover art) */
.cab-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: #04040a;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--neon) 35%, transparent),
    inset 0 0 30px color-mix(in srgb, var(--neon) 22%, transparent);
}
.cab-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transition: transform var(--dur) var(--ease);
}
.cab-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 58px;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--neon) 70%, transparent));
}
.cabinet:hover .cab-art { transform: scale(1.05); }
/* glass: scanlines + diagonal glare over the screen */
.cab-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.1) 0%, transparent 28%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.22) 3px, rgba(0,0,0,0.22) 3px);
  opacity: 0.6;
  transition: opacity var(--dur) var(--ease);
}
.cabinet:hover .cab-glass { opacity: 0.32; }

/* favorite heart overlaid on the screen */
.cab-fav {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 5, 11, 0.55);
  border: 1px solid var(--border);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.cab-fav svg { fill: none; stroke: currentColor; stroke-width: 2; }
.cab-fav:hover { color: var(--magenta); border-color: var(--magenta); }
.cab-fav.on { color: var(--magenta); border-color: var(--magenta); }
.cab-fav.on svg { fill: var(--magenta); stroke: var(--magenta); }
.cab-fav.on { animation: fav-pop 0.32s var(--ease); }
@keyframes fav-pop { 40% { transform: scale(1.3); } }

/* "玩过 N" badge bottom-left of the screen */
.cab-plays {
  position: absolute;
  bottom: 7px;
  left: 7px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(5, 5, 11, 0.6);
  border: 1px solid var(--border);
  color: var(--ink-dim);
}

/* personal best in the footer */
.cab-best {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 55%, transparent);
  font-variant-numeric: tabular-nums;
}

/* active state for player-bar icon buttons (favorite/mute) */
.icon-btn.on { border-color: var(--magenta); color: var(--magenta); box-shadow: 0 0 0 1px var(--magenta), 0 0 14px color-mix(in srgb, var(--magenta) 45%, transparent); }
.icon-btn.on svg path { stroke: var(--magenta); }
#favBtn.on svg path { fill: var(--magenta); }

/* control panel (footer) */
.cab-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 16px 16px;
  flex: 1;
}
.cab-tagline {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-dim);
  flex: 1;
}
.cab-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cab-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-faint);
}
.cab-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
.cab-diff {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}
.cab-diff b { color: var(--neon); text-shadow: 0 0 8px color-mix(in srgb, var(--neon) 70%, transparent); }
.cab-play {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--neon);
  border: 1px solid color-mix(in srgb, var(--neon) 55%, transparent);
  background: color-mix(in srgb, var(--neon) 8%, transparent);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.cabinet:hover .cab-play,
.cab-play:hover {
  color: #06121a;
  background: var(--neon);
  box-shadow: 0 0 20px color-mix(in srgb, var(--neon) 55%, transparent);
}
.cab-play:hover { transform: translateY(-1px); }
.cab-play:active { transform: translateY(0); }

/* ---------- Empty / footer ---------- */
.empty {
  text-align: center;
  padding: 90px 20px;
  color: var(--ink-dim);
}
.empty-emoji { font-size: 46px; display: block; margin-bottom: 12px; }

.site-foot {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Player ---------- */
.player {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: fade-in 0.25s var(--ease);
}
.player[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }

.player-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(12px, 3vw, 24px);
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 30%, var(--line));
  background: rgba(5, 5, 11, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--cyan) 18%, transparent);
}
.player-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto 0 4px;
}
.player-emoji { font-size: 20px; }

.player-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  font-variant-numeric: tabular-nums;
}
.stat-value.alt { color: var(--amber); text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 60%, transparent); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--dur) var(--ease);
}
.icon-btn:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); color: var(--cyan); }
.icon-btn.ghost { padding: 0 11px; }

/* player content scrolls: game fills the first screen, reviews sit below it */
.player-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.frame-wrap {
  position: relative;
  height: 100%;
  min-height: 60vh;
}
.game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--void);
}
.frame-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--void);
  transition: opacity var(--dur) var(--ease);
}
.frame-loading.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Review score: chip (player bar) + badge (cabinet card) ---------- */
.player-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.player-rating:hover { background: color-mix(in srgb, var(--amber) 22%, transparent); }
.player-rating b { font-weight: 700; }

.cab-rating {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 55%, transparent);
  white-space: nowrap;
}

/* ---------- Review panel verdicts (under the game) ---------- */
.reviews {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px) clamp(14px, 3vw, 24px) 56px;
}
.reviews[hidden] { display: none; }
.reviews-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.reviews-title {
  font-weight: 800;
  font-size: clamp(17px, 2.4vw, 21px);
  letter-spacing: 0.01em;
}
.reviews-agg {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  text-shadow: 0 0 10px color-mix(in srgb, var(--amber) 50%, transparent);
}
/* flat reviewer list (no cards) — divider lines between reviewers */
.reviews-list {
  display: flex;
  flex-direction: column;
}
.review {
  padding: 16px 2px;
  border-top: 1px solid var(--line-soft);
}
.review:first-child { border-top: 0; }
.review-who {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.review-ava {
  flex-shrink: 0;
  font-size: 17px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
}
.review-name { font-weight: 700; font-size: 14px; }
.review-score {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}
.review-score small { font-size: 11px; color: var(--ink-faint); text-shadow: none; }
.review-comment {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.review-sugg {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-faint);
}
.reviews-foot {
  margin-top: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- Mobile (phones) ---------- */
@media (max-width: 560px) {
  .home { padding: 16px 12px 56px; }
  .masthead { margin-bottom: 18px; }
  .sign { font-size: clamp(30px, 13vw, 48px); }

  /* controls stack: search row, scrollable chips row, count */
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 14px;
  }
  .search { max-width: none; height: 46px; }
  /* 33 chips wrapped into a wall → one horizontally-scrollable row */
  .tag-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;            /* let it clip+scroll instead of widening the page */
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -12px;
    padding: 2px 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  }
  .tag-row::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .counter { align-self: flex-end; font-size: 12px; }

  /* 2-column dense game grid instead of one giant card per row */
  .wall { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .cabinet { border-radius: 14px; }
  .cabinet:hover { transform: none; }
  .cab-marquee { padding: 8px 9px; gap: 6px; }
  .cab-emoji { font-size: 15px; }
  .cab-name { font-size: 12.5px; }
  .cab-rating { font-size: 10px; padding: 1px 5px; }
  .cab-screen { margin: 8px; }
  .cab-panel { padding: 2px 9px 10px; gap: 6px; }
  .cab-tagline { font-size: 11.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .cab-tags { display: none; }
  .cab-foot { gap: 6px; }
  .cab-diff { font-size: 10px; }
  .cab-play { height: 30px; padding: 0 9px; font-size: 11px; border-radius: 7px; }

  /* player chrome */
  .player-title { display: none; }
  .player-stats { gap: 14px; }
  .player-rating { display: none; }
  .back span { display: none; }

  .site-foot { flex-direction: column; gap: 6px; }
}

/* very small phones: keep cards readable */
@media (max-width: 340px) {
  .cab-name { font-size: 11.5px; }
  .cab-tagline { -webkit-line-clamp: 1; }
}

/* ============ Game detail page ============ */
.detail {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: fade-in 0.25s var(--ease);
}
.detail[hidden] { display: none; }
.detail-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(12px, 3vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 11, 0.7);
  backdrop-filter: blur(12px);
}
.detail-bar-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 6px;
}
.detail-bar-play {
  flex-shrink: 0;
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #06121a;
  background: var(--brand-grad);
  cursor: pointer;
  box-shadow: 0 0 20px -4px var(--cyan);
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.detail-bar-play:hover { filter: brightness(1.08); transform: translateY(-1px); }
.detail-bar-play:active { transform: translateY(0); }
@media (max-width: 480px) {
  .detail-bar-title { display: none; }
  .detail-bar-play { padding: 0 16px; font-size: 14px; }
}
.detail-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.detail-inner { max-width: 920px; margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(16px, 4vw, 40px) 72px; }

/* hero */
.d-hero {
  --neon: var(--cyan);
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(16px, 3vw, 30px);
  align-items: start;
  margin-bottom: 36px;
}
.d-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #04040a;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--neon) 35%, transparent),
    inset 0 0 30px color-mix(in srgb, var(--neon) 22%, transparent),
    0 18px 50px -22px #000;
}
.d-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 76px; }
.d-meta { min-width: 0; }
.d-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-emoji { font-size: 26px; }
.d-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.d-version {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  color: var(--neon);
  border: 1px solid color-mix(in srgb, var(--neon) 50%, transparent);
  background: color-mix(in srgb, var(--neon) 10%, transparent);
}
.d-tagline { margin: 12px 0 16px; color: var(--ink-dim); font-size: 15px; line-height: 1.6; }
.d-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.d-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
}
.d-diff { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.d-rating {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--amber);
  text-shadow: 0 0 10px color-mix(in srgb, var(--amber) 55%, transparent);
}
.d-rating small { color: var(--ink-faint); font-size: 10px; }
.d-best { font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); margin-bottom: 16px; }
.d-best b { color: var(--amber); }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.d-play {
  height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #06121a;
  background: var(--brand-grad);
  cursor: pointer;
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.d-play:hover { filter: brightness(1.08); transform: translateY(-1px); }
.d-fav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.d-fav svg { fill: none; stroke: currentColor; stroke-width: 2; }
.d-fav:hover { color: var(--magenta); border-color: var(--magenta); }
.d-fav.on { color: var(--magenta); border-color: var(--magenta); }
.d-fav.on svg { fill: var(--magenta); stroke: var(--magenta); }

/* sections */
.d-section { margin-top: 30px; }
.d-h2 { font-size: 18px; font-weight: 800; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* version timeline */
.d-timeline { display: flex; flex-direction: column; gap: 26px; }
.d-ver { position: relative; }
.d-ver-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.d-ver-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink-faint); }
.d-ver.latest .d-ver-dot { background: var(--cyan); box-shadow: var(--glow-cyan); }
.d-ver-head b { font-family: var(--font-mono); font-size: 15px; }
.d-ver-now {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  color: #06121a;
  background: var(--cyan);
  font-weight: 700;
}
.d-ver-date { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.d-ver-score {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--amber);
  text-shadow: 0 0 8px color-mix(in srgb, var(--amber) 50%, transparent);
}
.d-noreview { color: var(--ink-dim); font-size: 14px; }

/* per-game version changelog */
.d-cl-list { position: relative; padding-left: 22px; }
.d-cl-list::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--cyan), transparent);
  opacity: 0.25;
}
.d-cl { position: relative; margin-bottom: 20px; }
.d-cl:last-child { margin-bottom: 0; }
.d-cl-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.d-cl-dot {
  position: absolute;
  left: -22px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.d-cl.latest .d-cl-dot { background: var(--cyan); box-shadow: var(--glow-cyan); }
.d-cl-head b { font-family: var(--font-mono); font-size: 15px; }
.d-cl-now {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  color: #06121a;
  background: var(--cyan);
  font-weight: 700;
}
.d-cl-date { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.d-cl-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.d-cl-notes li { font-size: 13.5px; line-height: 1.55; color: var(--ink-dim); }
.d-cl-notes li::marker { color: var(--cyan); }

/* comments */
.d-cc { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); font-weight: 400; }
.d-cform {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.d-cname, .d-cbody {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.d-cname { max-width: 220px; height: 40px; }
.d-cbody { resize: vertical; min-height: 44px; line-height: 1.5; }
.d-cname:focus, .d-cbody:focus { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.d-cform-foot { display: flex; align-items: center; gap: 12px; }
.d-cerr { color: var(--bad); font-size: 12.5px; flex: 1; }
.d-csend {
  height: 38px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #06121a;
  background: var(--cyan);
  cursor: pointer;
  transition: filter var(--dur) var(--ease);
}
.d-csend:hover { filter: brightness(1.08); }
.d-csend:disabled { opacity: 0.6; cursor: default; }
/* flat comment list (no cards) */
.d-clist { display: flex; flex-direction: column; }
.d-cempty { color: var(--ink-faint); font-size: 14px; padding: 8px 0; }
.d-comment {
  display: flex;
  gap: 12px;
  padding: 14px 2px;
  border-top: 1px solid var(--line-soft);
}
.d-comment:first-child { border-top: 0; }
.d-comment-ava {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #06121a;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
}
.d-comment-main { flex: 1; min-width: 0; }
.d-comment-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.d-comment-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.d-comment-ver { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }
.d-comment-time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.d-comment-body { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-dim); word-break: break-word; }

@media (max-width: 620px) {
  .d-hero { grid-template-columns: 1fr; }
  .d-cover { max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .sign, .open-tag .dot, .cabinet { animation: none; }
}
