/* Wanderer — game reviews. Layered on site.css (tokens, header, footer, buttons) and
   blog.css (breadcrumbs, tables, empty state), so the section reads as part of the site
   rather than a bolt-on. Server-rendered by server/src/reviews.js; site/reviews.js is
   enhancement only, so everything here must look finished with JavaScript switched off.
   Mobile-first: every grid starts as one column. */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- ten-star rating ---------- */
/* Two identical rows of ten glyphs; the gold row is clipped to the score. Letter-spacing is
   deliberately 0 so a percentage width lands exactly on a glyph boundary — that is what makes
   decimal scores (8.5) show as a true half star. The glyphs are decorative: the accessible
   name on .stars carries the score, and every caller prints the number in text as well. */
.stars {
  position: relative; display: inline-block; flex: none;
  font-size: 15px; line-height: 1; letter-spacing: 0; white-space: nowrap;
  font-family: 'Segoe UI Symbol', 'Apple Color Emoji', sans-serif;
}
.stars-track { color: #3d4a63; }
.stars-fill {
  position: absolute; inset: 0 auto 0 0; overflow: hidden;
  color: var(--gold); text-shadow: 0 0 10px #e8c46955;
}
.score { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.score-num { color: var(--ink-dim); font-size: 14px; }
.score-num strong { color: var(--gold); font-family: var(--font-display); font-size: 20px; }
.score-lg .stars { font-size: clamp(19px, 4.4vw, 26px); }
.score-lg .score-num { font-size: 16px; }
.score-lg .score-num strong { font-size: clamp(28px, 6vw, 36px); }

/* ---------- chips + sample flag ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  border: 1px solid #e8c46944; color: var(--gold);
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.chip-plain { color: var(--ink-dim); border-color: var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; }
.sample-flag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #7fb06922; border: 1px dashed var(--moss); color: var(--moss);
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.sample-flag.sm { padding: 1px 7px; font-size: 10px; }
.sample-banner {
  margin: 22px 0; padding: 14px 18px; border-radius: 0 10px 10px 0;
  border-left: 3px solid var(--moss); background: #7fb06914; color: #cfcaba; font-size: 15px;
}
.sample-banner strong { color: var(--moss); }

/* ---------- landing hero ---------- */
.reviews-hero {
  position: relative; overflow: hidden; margin: 0 0 34px;
  border: 1px solid var(--line); border-radius: 18px; background: #09111d;
  box-shadow: 0 16px 44px #0008;
}
.reviews-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 260px at 88% -40px, #e8c46926, transparent 62%),
    radial-gradient(520px 300px at 4% 120%, #14532d3d, transparent 60%);
}
/* A row of faint stars along the top edge — the section's one decorative flourish. */
.reviews-hero::after {
  content: '★ ★ ★ ★ ★ ★ ★ ★ ★ ★'; position: absolute; top: 10px; right: 18px;
  color: #e8c46920; font-size: 13px; letter-spacing: 4px; pointer-events: none;
}
.reviews-hero-copy { position: relative; padding: clamp(26px, 5vw, 46px); }
.reviews-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 7vw, 54px); line-height: 1.04; }
.page .reviews-hero p.lede { max-width: 640px; margin-top: 12px; color: #d7d2c3; font-size: 17px; }
.review-eyebrow {
  color: var(--gold); text-transform: uppercase; letter-spacing: .2em;
  font-size: 12px; font-weight: 800; margin-bottom: 7px;
}
.reviews-honesty {
  max-width: 640px; margin-top: 16px; padding: 13px 16px;
  border-left: 3px solid var(--gold-deep); background: #e8c4690f; border-radius: 0 10px 10px 0;
  color: var(--ink-dim); font-size: 14.5px;
}

/* ---------- featured review ---------- */
.review-featured {
  display: grid; gap: 0; overflow: hidden; margin: 0 0 40px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(150deg, #16223a, #0b1220);
  box-shadow: 0 16px 42px #0008;
}
/* Any space the art does not fill stays part of the panel, so a non-16:9 cover reads as
   letterboxing rather than a seam. */
.review-featured-art { display: flex; align-items: center; justify-content: center; }
.review-featured-art img { width: 100%; height: 100%; max-height: 340px; object-fit: contain; background: #070d17; }
.review-featured-copy { display: flex; flex-direction: column; gap: 12px; padding: clamp(20px, 4vw, 32px); }
.review-featured-copy h2 { font-family: var(--font-display); font-size: clamp(24px, 4.6vw, 34px); line-height: 1.15; }
.review-featured-copy h2 a { color: var(--ink); }
.review-featured-copy h2 a:hover { color: var(--gold); text-decoration: none; }
.review-featured-copy .summary { color: #cfcaba; }
.featured-verdict { color: var(--ink-dim); font-size: 15px; border-left: 2px solid var(--gold-deep); padding-left: 13px; }
.card-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.card-cta .btn { padding: 11px 22px; font-size: 15px; }

/* ---------- controls ---------- */
.review-controls {
  display: grid; gap: 14px; margin: 0 0 24px; padding: 18px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.review-search label, .review-filters label {
  display: block; color: var(--ink-dim); font-size: 13px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.review-search input {
  width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; font-size: 16px;
  color: var(--ink); background: #0a0f1a; border: 1px solid var(--line); border-radius: 10px;
}
.review-filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); align-items: end; }
.review-filters select {
  width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-size: 15px;
  color: var(--ink); background: #0a0f1a; border: 1px solid var(--line); border-radius: 10px;
}
.review-search input:focus, .review-filters select:focus {
  outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px #e8c46922;
}
.review-filters .btn { padding: 11px 20px; font-size: 15px; text-align: center; }
.review-count { color: var(--ink-dim); font-size: 14px; }
/* With JavaScript running, filters apply as you type — the submit button is then noise.
   Without it, the form is the whole mechanism, so it stays. */
.js .review-controls .btn[type="submit"] { display: none; }

/* ---------- review grid ---------- */
.review-grid {
  display: grid; gap: 18px; margin-top: 4px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}
.review-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 #ffffff0a, 0 6px 24px #00000040;
  transition: border-color .15s ease, transform .15s ease;
}
.review-card:hover { border-color: var(--gold-deep); transform: translateY(-3px); }
.review-card[hidden] { display: none; }
.review-card .media { display: block; background: var(--night-2); border-bottom: 1px solid var(--line); }
.review-card .media img { width: 100%; height: 172px; object-fit: cover; }
.review-card .body { display: flex; flex-direction: column; gap: 9px; padding: 16px 17px 18px; flex: 1; }
.review-card h3 { font-family: var(--font-display); font-size: 20px; line-height: 1.3; }
.review-card h3 a { color: var(--ink); }
.review-card h3 a:hover { color: var(--gold); text-decoration: none; }
.review-card .summary { color: var(--ink-dim); font-size: 14.5px; line-height: 1.55; }
.review-card .card-meta { color: #6f7a8d; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.review-card .card-cta { margin-top: auto; padding-top: 4px; }
.review-card .card-cta .btn { padding: 9px 18px; font-size: 14px; }

/* Cards and the featured panel fall back to a pattern when a game has no art yet. */
.ph {
  display: grid; place-items: center; height: 172px; border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, #16223a 25%, transparent 25%, transparent 50%, #16223a 50%, #16223a 75%, transparent 75%) 0 0 / 22px 22px,
    var(--night-2);
}
.ph span { color: var(--gold); font-family: var(--font-display); font-size: 15px; letter-spacing: 2px; }
.review-featured-art .ph { height: 100%; min-height: 240px; }

.pager-pos { color: var(--ink-dim); font-size: 14px; align-self: center; }
.review-more { display: flex; justify-content: center; margin: 26px 0 0; }
.review-more[hidden] { display: none; }

/* ---------- invitation to Wanderer ---------- */
.review-invite {
  margin: 46px 0 0; padding: 24px 26px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold-deep);
  border-radius: 0 14px 14px 0; background: #0d1526;
}
.review-invite h2 { font-family: var(--font-display); font-size: 21px; color: var(--gold); margin-bottom: 8px; }
.review-invite p { color: var(--ink-dim); font-size: 15px; margin-bottom: 12px; }
.review-invite p:last-child { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.review-invite .btn { padding: 10px 20px; font-size: 15px; }

/* ---------- review page ---------- */
article.review { max-width: 860px; margin-inline: auto; }
.review-head { display: grid; gap: 20px; margin-bottom: 8px; }
.review-head-art {
  overflow: hidden; border: 1px solid var(--line); border-radius: 14px;
  background: var(--night-2); box-shadow: 0 14px 38px #0008;
}
.review-head-art img { width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #070d17; }
.review-head-copy { display: flex; flex-direction: column; gap: 11px; }
.review-head-copy h1 { font-family: var(--font-display); font-size: clamp(30px, 6vw, 46px); line-height: 1.08; }
.review-byline { color: var(--ink-dim); font-size: 14px; }
.review-byline .upd { color: var(--moss); }
.review-facts {
  display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line);
}
.review-facts dt { color: #6f7a8d; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.review-facts dd { color: var(--ink); font-size: 14.5px; margin-top: 2px; }

/* Quick verdict — the panel a reader who wants the answer and nothing else stops at. */
.quick-verdict {
  margin: 30px 0; padding: 22px 24px;
  border: 1px solid #e8c46940; border-radius: 14px;
  background: linear-gradient(150deg, #1a2032, #0d1422);
  box-shadow: 0 12px 34px #0007;
}
.quick-verdict h2 { font-family: var(--font-display); font-size: 23px; color: var(--gold); margin-bottom: 10px; }
.verdict-lead { color: var(--ink); font-size: 16.5px; line-height: 1.7; margin-bottom: 12px; }
.qv-cols { display: grid; gap: 16px; margin: 16px 0 6px; }
.qv-col h3 { font-size: 14px; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.qv-col ul { margin: 0 0 0 18px; color: #cfcaba; font-size: 15px; }
.qv-col li { margin-bottom: 4px; }
.qv-line { color: #cfcaba; font-size: 15px; margin-top: 8px; }
.qv-line strong { color: var(--ink); }
.quick-verdict .score { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e8c46926; }

/* Contents */
.review-toc { margin: 30px 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: #0b1320; }
.review-toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-dim); margin-bottom: 8px; }
.review-toc ol { display: grid; gap: 4px 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 0 0 0 18px; }
.review-toc li { color: var(--ink-dim); font-size: 14.5px; }

/* Body prose. blog.css scopes its prose rules to `.post .prose`; these are the equivalents
   for the review body so both sections read identically. */
.review .prose h2 { position: relative; font-family: var(--font-display); font-size: 25px; margin: 42px 0 12px; padding-top: 5px; color: var(--gold); border-top: 1px solid #e8c46920; scroll-margin-top: 78px; }
.review .prose h3 { font-size: 18px; margin: 24px 0 6px; color: var(--ink); }
.review .prose p { margin: 0 0 16px; color: #cfcaba; line-height: 1.75; }
.review .prose ul, .review .prose ol { margin: 0 0 16px 22px; color: #cfcaba; }
.review .prose li { margin-bottom: 6px; }
.review .prose a { text-decoration: underline; text-underline-offset: 2px; }
.review .prose strong { color: var(--ink); }
.review .prose blockquote {
  margin: 0 0 18px; padding: 12px 18px; color: var(--ink); font-style: italic;
  border-left: 3px solid var(--gold-deep); background: #ffffff08; border-radius: 0 8px 8px 0;
}
.review .prose figure { margin: 0 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); }
.review .prose img { width: 100%; }

/* ---------- pros and cons ---------- */
.pros-cons { margin: 40px 0; }
.pros-cons h2, .cat-ratings h2, .review-gallery h2, .game-info h2, .review-related h2 {
  font-family: var(--font-display); font-size: 25px; color: var(--gold);
  margin-bottom: 14px; padding-top: 5px; border-top: 1px solid #e8c46920;
}
.pros-cons-grid { display: grid; gap: 16px; }
.pros-cons-grid > div { padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.pros-cons-grid .pros { border-left: 3px solid var(--moss); }
.pros-cons-grid .cons { border-left: 3px solid #c96a5a; }
.pros-cons-grid h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.pros-cons-grid .pros h3 { color: var(--moss); }
.pros-cons-grid .cons h3 { color: #e08b7c; }
.pros-cons-grid ul { list-style: none; margin: 0; }
.pros-cons-grid li { position: relative; margin-bottom: 8px; padding-left: 24px; color: #cfcaba; font-size: 15px; line-height: 1.55; }
.pros-cons-grid li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.pros-cons-grid .pros li::before { content: '+'; color: var(--moss); }
.pros-cons-grid .cons li::before { content: '−'; color: #e08b7c; }

/* ---------- category scores ---------- */
.cat-ratings { margin: 40px 0; }
.cat-note { color: var(--ink-dim); font-size: 14px; margin-bottom: 14px; }
.cat-list { list-style: none; margin: 0; display: grid; gap: 10px; }
.cat-list li { display: grid; grid-template-columns: minmax(96px, 1fr) 2fr auto; align-items: center; gap: 12px; }
.cat-label { color: var(--ink); font-size: 14.5px; }
.cat-bar { height: 9px; border-radius: 999px; background: #0a0f1a; border: 1px solid var(--line); overflow: hidden; }
.cat-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.cat-score { color: var(--gold); font-family: var(--font-display); font-size: 16px; white-space: nowrap; }
.cat-of { color: var(--ink-dim); font-family: var(--font-body); font-size: 12px; }

/* ---------- screenshot gallery ---------- */
.review-gallery { margin: 40px 0; }
.shot-grid { list-style: none; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.shot-item figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #0a121e; }
.shot-link { display: block; position: relative; background: #070d17; }
/* `contain` keeps portrait and landscape captures in the same grid without cropping either. */
.shot-link img { width: 100%; height: clamp(160px, 34vw, 220px); object-fit: contain; background: #070d17; }
.shot-link::after {
  content: '⤢'; position: absolute; right: 8px; bottom: 8px;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: #07101bcc; color: var(--gold); font-size: 14px;
  opacity: 0; transition: opacity .15s ease;
}
.shot-link:hover::after, .shot-link:focus-visible::after { opacity: 1; }
.shot-item figcaption { padding: 9px 12px; border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 13px; }
.shot-credit { display: block; margin-top: 3px; color: #6f7a8d; font-size: 11.5px; font-style: italic; }

/* Lightbox. Created by reviews.js; without JavaScript the thumbnails are plain links to the
   full image, which is a perfectly good fallback. */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: #05090ffa; backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox-stage { flex: 1; display: grid; place-items: center; min-height: 0; padding: 12px; }
.lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.lightbox-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #07101bd9; }
.lightbox-count { color: var(--ink-dim); font-size: 14px; margin-right: auto; }
.lightbox-caption { padding: 12px 16px 20px; color: var(--ink-dim); font-size: 14px; text-align: center; border-top: 1px solid var(--line); }
.lightbox-caption .shot-credit { text-align: center; }
.lightbox button {
  display: grid; place-items: center; width: 42px; height: 42px; cursor: pointer;
  color: var(--ink); background: #14203288; border: 1px solid var(--line); border-radius: 10px;
  font-size: 19px; line-height: 1;
}
.lightbox button:hover { color: var(--gold); border-color: var(--gold-deep); }
.lightbox button[disabled] { opacity: .35; cursor: default; }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev { left: 10px; }
.lightbox .lb-next { right: 10px; }

/* ---------- game information ---------- */
.game-info { margin: 40px 0; padding: 4px 0 0; }
.game-info dl { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--panel); }
.info-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: #8b93a4; font-size: 13px; }
.info-row dd { color: var(--ink); font-size: 14.5px; }
.info-row a.ext::after { content: ' ↗'; color: var(--gold); font-size: 12px; }
.info-note { margin-top: 10px; color: #6f7a8d; font-size: 13px; }

/* ---------- related ---------- */
.review-related { margin: 46px 0 0; }
.related-cols { display: grid; gap: 18px; }
.related-cols h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); margin-bottom: 8px; }
.related-list { list-style: none; margin: 0; display: grid; gap: 8px; }
.related-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #0b1320; }
.related-list a { flex: 1 1 auto; }
.related-score { color: var(--gold); font-family: var(--font-display); font-size: 14px; }
.related-empty { color: var(--ink-dim); font-size: 14px; }
.related-all { margin-top: 18px; }

/* ---------- wider screens ---------- */
@media (min-width: 620px) {
  .qv-cols { grid-template-columns: 1fr 1fr; }
  .pros-cons-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .review-featured { grid-template-columns: 1.05fr 1fr; }
  /* A 16:9 frame that the art is fitted into: wide cover images fill it exactly, and an
     unusually shaped one is shown whole rather than cropped. */
  .review-featured-art { aspect-ratio: 16 / 9; align-self: center; }
  .review-featured-art img { max-height: 100%; }
  .review-controls { grid-template-columns: minmax(230px, 1fr) 2.4fr; align-items: end; }
  .review-controls .review-count { grid-column: 1 / -1; margin: 0; }
  .related-cols { grid-template-columns: repeat(3, 1fr); }
  .review-head { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .lightbox-stage { padding: 20px 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .review-card, .shot-link::after { transition: none; }
  .review-card:hover { transform: none; }
}
