/* ============================================================================
   projectv2.css — "Level file" project page template
   Loaded AFTER mechproject.css, which still supplies:
     · per-project colour tokens  ([data-project] → --gc-tl/tr/bl/br, --acc)
     · background / scanline / orb canvases
     · top bar, back link, links, tags, lightbox, grade bar
   Everything new is prefixed .pv- so legacy pages are unaffected.

   Page structure (top → bottom):
     Hero (live media stage + title card + grade)  →  Stat HUD  →
     Chapter select (sticky)  →  Chapters  →  Trophies  →  Gallery  →
     Level select (prev / next)
   ============================================================================ */

/* Scrolling happens on the viewport. Overflow is set on <html> only: if <body>
   also had overflow it would become its own scroll container and
   position:sticky (the chapter bar) would stick to it instead of the viewport. */
html.pv2 {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-top: 8.4rem;          /* top bar + pinned chapter bar */
}
html.pv2 body {
  height: auto;
  min-height: 100%;
  overflow: visible;
}

html.pv2 {
  --pv-gold:   #e8c84a;
  --pv-ink:    #e6ebf2;
  --pv-mute:   rgba(214, 224, 238, 0.62);
  --pv-faint:  rgba(214, 224, 238, 0.38);
  --pv-line:   rgba(var(--acc), 0.22);
  --pv-panel:  rgba(8, 10, 20, 0.62);
  --pv-panel-2:rgba(12, 16, 30, 0.78);
  --pv-radius: 6px;
  --pv-mono:   'JetBrains Mono', ui-monospace, monospace;
  --pv-outline: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  --pv-outline-2: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

.pv-page {
  position: relative;
  z-index: 3;                          /* above bg (0), scanlines (1), orb (2) */
  max-width: 1240px;
  margin: 0 auto;
  padding: 6.2rem 2rem 3rem;
  color: var(--pv-ink);
}

/* ── Top bar: title pinned to the true centre, exploration XP on the right ── */
/* Title centred on the bar itself. The space to reserve either side is the
   width of the widest neighbour (Back link vs XP meter), measured by
   projectv2.js into --pv-topbar-side, so a long title truncates instead of
   ever running underneath them. */
html.pv2 .mp-topbar__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* neighbour width + the bar's own 3rem side padding + 1rem breathing room */
  max-width: calc(100% - 2 * (var(--pv-topbar-side, 13rem) + 4rem));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.pv-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-family: var(--pv-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pv-mute);
}
.pv-xp {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pv-xp__bar {
  position: relative;
  width: 140px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(var(--acc), 0.25);
}
.pv-xp__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(var(--acc), 0.55), rgba(var(--acc), 1));
  box-shadow: 0 0 10px rgba(var(--acc), 0.7);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.pv-xp__label { min-width: 3.2em; text-align: right; color: var(--pv-ink); }

/* ── Shared bits ───────────────────────────────────────────────────────────── */
.pv-eyebrow {
  font-family: var(--pv-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(var(--acc), 0.95);
  text-shadow: var(--pv-outline);
}
.pv-panel {
  background: var(--pv-panel);
  border: 1px solid var(--pv-line);
  border-radius: var(--pv-radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pv-prose p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(230, 236, 244, 0.86);
  font-weight: 600;
  margin-bottom: 1rem;
}
.pv-prose p:last-child { margin-bottom: 0; }
.pv-prose strong { color: #fff; font-weight: 800; }
.pv-prose em { color: rgba(var(--acc), 1); font-style: normal; }

/* Clickable media (image or clip) — opens the lightbox */
.pv-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-line);
  background: #05070d;
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
}
.pv-media img, .pv-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}
.pv-media:hover img, .pv-media:hover video,
.pv-media:focus-visible img { transform: scale(1.045); }
.pv-media:focus-visible { outline: 2px solid rgba(var(--acc), 0.9); outline-offset: 3px; }
.pv-media__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.6rem 0.9rem 0.6rem;
  font-family: var(--pv-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* ══ 1. HERO ══════════════════════════════════════════════════════════════════
   Full-bleed backdrop: the shot slideshow (or a clip) auto-plays behind the
   hero, blurred and darkened, with the title, pitch, tags, grade and actions
   sitting directly on top of it.                                              */
.pv-hero {
  position: relative;
  isolation: isolate;
  /* break out of the page column to the full viewport width, and up under the top bar */
  margin: -6.2rem calc(50% - 50vw) 0;
  padding: 9rem max(2rem, calc(50vw - 620px + 2rem)) 3.2rem;
  min-height: min(80vh, 780px);
  display: flex;
  align-items: flex-end;
}

/* Backdrop stage */
.pv-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #000;
  /* fade the bottom edge into the page's animated background */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.pv-stage__slide, .pv-stage__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) brightness(0.48) saturate(1.15);
}
.pv-stage__slide {
  opacity: 0;
  transform: scale(1.08);               /* always >1 so the blur never shows a hard edge */
  transition: opacity 1.6s ease;
}
.pv-stage__slide.is-on {
  opacity: 1;
  animation: pv-kenburns 8s ease-out forwards;
}
.pv-stage__slide:nth-child(even).is-on { animation-name: pv-kenburns-b; }
@keyframes pv-kenburns   { from { transform: scale(1.08) translate(0, 0); }      to { transform: scale(1.18) translate(-1.5%, -1%); } }
@keyframes pv-kenburns-b { from { transform: scale(1.18) translate(1.2%, 0.8%); } to { transform: scale(1.08) translate(0, 0); } }

/* Legibility wash (darker behind the text column) + CRT scanlines + accent tint */
.pv-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.16) 2px 3px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.1) 100%),
    radial-gradient(ellipse at 75% 40%, rgba(var(--acc), 0.10), transparent 60%);
}

/* Current shot caption + dots, bottom-right of the hero */
.pv-stage__caption {
  position: absolute;
  z-index: 3;
  right: max(2rem, calc(50vw - 620px + 2rem));
  bottom: 3.6rem;
  max-width: 34ch;
  text-align: right;
  font-family: var(--pv-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
  text-shadow: var(--pv-outline);
  pointer-events: none;
}
.pv-stage__dots {
  position: absolute;
  z-index: 3;
  right: max(2rem, calc(50vw - 620px + 2rem));
  bottom: 2.6rem;
  display: flex;
  gap: 5px;
}
.pv-stage__dots button {
  width: 18px; height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 0;
}
.pv-stage__dots button.is-on { background: rgba(var(--acc), 1); box-shadow: 0 0 6px rgba(var(--acc), 0.8); }

/* Hero content (on top of the backdrop) */
.pv-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}
.pv-title {
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--pv-gold);
  text-shadow: var(--pv-outline-2), 0 0 26px rgba(232, 200, 74, 0.4), 0 6px 30px rgba(0, 0, 0, 0.6);
}
.pv-pitch {
  max-width: 38rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: rgba(236, 240, 246, 0.9);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}
.pv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pv-chip {
  padding: 0.28rem 0.6rem;
  font-family: var(--pv-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pv-ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pv-chip--acc { color: rgba(var(--acc), 1); border-color: rgba(var(--acc), 0.5); background: rgba(var(--acc), 0.1); }

/* Grade */
.pv-rank {
  max-width: 30rem;
  padding-top: 0.4rem;
}
.pv-rank .mp-grade-wrap { margin: 0; padding: 0 0 1.2rem; }

.pv-cta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  max-width: 30rem;
}
.pv-cta .mp-link { flex: 1 1 10rem; justify-content: center; background: rgba(0, 0, 0, 0.4); }
.pv-cta .mp-link--primary {
  background: rgba(var(--acc), 0.18);
  border-color: rgba(var(--acc), 0.75);
  color: #fff;
}

/* ══ 2. STAT HUD ══════════════════════════════════════════════════════════════ */
.pv-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0 0;
}
.pv-stat {
  position: relative;
  padding: 1rem 1.1rem 0.9rem;
  overflow: hidden;
}
.pv-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: rgba(var(--acc), 0.9);
  box-shadow: 0 0 10px rgba(var(--acc), 0.8);
}
.pv-stat__val {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: var(--pv-outline-2), 0 0 16px rgba(var(--acc), 0.45);
  font-variant-numeric: tabular-nums;
}
.pv-stat__label {
  margin-top: 0.45rem;
  font-family: var(--pv-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pv-mute);
}

/* ══ 3. CHAPTER SELECT (sticky) ═══════════════════════════════════════════════ */
.pv-chapters {
  position: sticky;
  top: 4.2rem;
  z-index: 50;                         /* sits in normal flow, then pins under the top bar (200) */
  margin: 1.8rem -2rem 0;
  padding: 0.55rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.82);
  border-bottom: 1px solid var(--pv-line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pv-chapters__lead {
  flex: none;
  margin-right: 0.5rem;
  font-family: var(--pv-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pv-faint);
}
.pv-chapters a {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  color: var(--pv-mute);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pv-chapters a:hover, .pv-chapters a:focus-visible { color: #fff; outline: none; border-color: rgba(var(--acc), 0.35); }
.pv-chapters__num {
  font-family: var(--pv-mono);
  font-size: 0.62rem;
  color: var(--pv-faint);
}
.pv-chapters__tick {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.pv-chapters a.is-cleared .pv-chapters__tick {
  background: rgba(var(--acc), 1);
  border-color: rgba(var(--acc), 1);
  box-shadow: 0 0 8px rgba(var(--acc), 0.8);
}
.pv-chapters a.is-cleared .pv-chapters__tick::after {
  content: '';
  width: 5px; height: 3px;
  border-left: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(-45deg) translate(0.5px, -0.5px);
}
.pv-chapters a.is-current { color: #fff; background: rgba(var(--acc), 0.12); border-color: rgba(var(--acc), 0.4); }
.pv-chapters a.is-current .pv-chapters__num { color: rgba(var(--acc), 1); }

/* ══ 4. CHAPTERS ══════════════════════════════════════════════════════════════ */
.pv-chapter {
  padding: 3.4rem 0 0.4rem;
}
.pv-chapter__head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.1rem;
  align-items: end;
  margin-bottom: 1.6rem;
}
.pv-chapter__num {
  grid-row: span 2;
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(var(--acc), 0.7);
  text-shadow: 0 0 18px rgba(var(--acc), 0.25);
}
.pv-chapter__title {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-shadow: var(--pv-outline-2);
}

/* Feature row: text + one media, alternating sides */
.pv-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.2rem;
}
.pv-feature--flip > :first-child { order: 2; }
.pv-feature--wide-media { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); }

/* Callouts styled as game loading-screen tips */
.pv-tip {
  position: relative;
  margin-top: 1.2rem;
  padding: 0.95rem 1.1rem 0.95rem 3.2rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(230, 236, 244, 0.86);
  background: rgba(var(--acc), 0.06);
  border: 1px solid rgba(var(--acc), 0.28);
  border-radius: var(--pv-radius);
}
.pv-tip::before {
  content: 'TIP';
  position: absolute;
  left: 0.85rem; top: 1rem;
  font-family: var(--pv-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #000;
  background: rgba(var(--acc), 1);
  padding: 0.12rem 0.3rem;
  border-radius: 2px;
}
.pv-tip strong { display: block; color: #fff; margin-bottom: 0.2rem; }

/* ── Bestiary ── */
.pv-bestiary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.pv-foe {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.pv-foe:hover { transform: translateY(-4px); border-color: rgba(var(--acc), 0.6); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(var(--acc), 0.18); }
.pv-foe .pv-media { border: 0; border-radius: 0; aspect-ratio: 4 / 3; }
/* Undiscovered portrait (no image supplied) */
.pv-foe__unknown {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(var(--acc), 0.35);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px),
    radial-gradient(circle at 50% 60%, rgba(var(--acc), 0.14), transparent 65%);
  text-shadow: 0 0 20px rgba(var(--acc), 0.4);
}
.pv-foe__body { padding: 0.9rem 1rem 1.05rem; display: flex; flex-direction: column; gap: 0.5rem; }
.pv-foe__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.pv-foe__name { font-size: 1.08rem; font-weight: 900; color: #fff; }
.pv-foe__class {
  flex: none;
  font-family: var(--pv-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.14rem 0.4rem;
  border-radius: 2px;
  color: rgba(var(--acc), 1);
  border: 1px solid rgba(var(--acc), 0.45);
}
.pv-foe__class--boss { color: #ffb347; border-color: rgba(255, 179, 71, 0.55); }
.pv-foe__desc { font-size: 0.88rem; line-height: 1.55; color: rgba(230, 236, 244, 0.78); font-weight: 600; }

/* ── Zone select (world map) ── */
.pv-zones {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.4fr);
  gap: 1.2rem;
  align-items: start;
}
.pv-zones__list { display: flex; flex-direction: column; gap: 0.45rem; }
.pv-zone {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.8rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--pv-mute);
  background: var(--pv-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--pv-radius);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pv-zone__idx { grid-row: span 2; font-family: var(--pv-mono); font-size: 0.66rem; color: var(--pv-faint); padding-top: 0.2rem; }
.pv-zone__name { font-weight: 900; font-size: 0.98rem; color: inherit; }
.pv-zone__blurb {
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 600;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.pv-zone:hover { color: #fff; border-color: rgba(var(--acc), 0.3); }
.pv-zone.is-on {
  color: #fff;
  background: var(--pv-panel-2);
  border-color: rgba(var(--acc), 0.6);
  box-shadow: inset 3px 0 0 rgba(var(--acc), 1);
}
.pv-zone.is-on .pv-zone__idx { color: rgba(var(--acc), 1); }
.pv-zone.is-on .pv-zone__blurb { max-height: 12em; opacity: 1; color: rgba(230, 236, 244, 0.8); }
.pv-zones__view { position: sticky; top: 9rem; }
.pv-zones__view .pv-media { aspect-ratio: 16 / 10; }
.pv-zones__view .pv-media img { transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.pv-zones__view .pv-media.is-swapping img { opacity: 0; }

/* ── Monitor wall (CRT tiles) ── */
.pv-monitors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
  margin-top: 1.4rem;
}
.pv-monitor {
  position: relative;
  padding: 10px 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1b1f2a, #0d1017);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.5);
}
.pv-monitor .pv-media {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  border: 0;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8);
}
.pv-monitor .pv-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
}
.pv-monitor:hover .pv-media img { animation: pv-flicker 0.35s steps(3) 1; }
@keyframes pv-flicker { 0% { filter: brightness(1.6) hue-rotate(20deg); } 50% { filter: brightness(0.7); } 100% { filter: none; } }
.pv-monitor__label {
  display: block;
  margin-top: 0.6rem;
  padding-right: 14px;
  font-family: var(--pv-mono);
  font-size: 0.64rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--pv-mute);
}
.pv-monitor__led {
  position: absolute;
  right: 12px; bottom: 14px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #39ff88;
  box-shadow: 0 0 6px #39ff88;
}

/* ── Cut content ── */
.pv-cut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.pv-cut {
  position: relative;
  padding: 1rem 1.1rem 1.1rem;
  overflow: hidden;
  border-style: dashed;
  border-color: rgba(255, 90, 100, 0.35);
}
.pv-cut__name { font-weight: 900; color: rgba(255, 255, 255, 0.72); margin-bottom: 0.35rem; }
.pv-cut__why { font-size: 0.86rem; line-height: 1.5; color: var(--pv-mute); font-weight: 600; }
.pv-cut::after {
  content: 'CUT';
  position: absolute;
  top: 0.7rem; right: -0.2rem;
  padding: 0.1rem 0.9rem;
  font-family: var(--pv-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #ff5a64;
  border: 1.5px solid #ff5a64;
  transform: rotate(12deg);
  opacity: 0.85;
}

/* ── Post-mortem crash counter ── */
.pv-crash {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  align-items: center;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  border-color: rgba(255, 90, 100, 0.35);
  background: linear-gradient(90deg, rgba(60, 5, 15, 0.55), var(--pv-panel));
}
.pv-crash__num {
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 900;
  line-height: 0.9;
  color: #ff5a64;
  text-shadow: var(--pv-outline-2), 0 0 26px rgba(255, 60, 80, 0.55);
  font-variant-numeric: tabular-nums;
}
.pv-crash.is-in .pv-crash__num { animation: pv-glitch 2.8s steps(1) 1.2s infinite; }
@keyframes pv-glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: translate(-3px, 1px) skewX(-8deg); }
  95% { transform: translate(3px, -1px); }
  97% { transform: translate(-1px, 0) skewX(6deg); }
}
.pv-crash__label { font-family: var(--pv-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 140, 150, 0.9); margin-bottom: 0.4rem; }

/* ══ 5. TROPHIES ══════════════════════════════════════════════════════════════ */
.pv-trophies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}
.pv-trophy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  align-items: center;
  padding: 0.9rem 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}
.pv-trophies.is-in .pv-trophy { opacity: 1; transform: none; }
.pv-trophy:hover { border-color: rgba(var(--acc), 0.55); }
.pv-trophy__icon {
  grid-row: span 2;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.25rem;
}
.pv-trophy__icon--gold   { background: radial-gradient(circle at 35% 30%, #fff3b0, #d7a92a 55%, #6d4f08); box-shadow: 0 0 14px rgba(232, 200, 74, 0.45); }
.pv-trophy__icon--silver { background: radial-gradient(circle at 35% 30%, #ffffff, #aab4c3 55%, #4a5363); box-shadow: 0 0 12px rgba(200, 210, 225, 0.35); }
.pv-trophy__icon--bronze { background: radial-gradient(circle at 35% 30%, #ffd9b0, #c07a3a 55%, #5a2f0c); box-shadow: 0 0 12px rgba(200, 120, 60, 0.35); }
.pv-trophy__name { font-weight: 900; color: #fff; font-size: 0.98rem; }
.pv-trophy__desc { font-size: 0.82rem; line-height: 1.45; color: var(--pv-mute); font-weight: 600; }

/* ══ 6. GALLERY ═══════════════════════════════════════════════════════════════ */
.pv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.pv-filter {
  padding: 0.38rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--pv-mute);
  background: var(--pv-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pv-filter:hover { color: #fff; border-color: rgba(var(--acc), 0.35); }
.pv-filter.is-on { color: #000; background: rgba(var(--acc), 1); border-color: rgba(var(--acc), 1); }
.pv-filter__count { font-family: var(--pv-mono); font-size: 0.64rem; opacity: 0.7; margin-left: 0.3rem; }
.pv-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.6rem;
}
.pv-gallery .pv-media { aspect-ratio: 16 / 10; }
.pv-gallery .pv-media.is-hidden { display: none; }
.pv-gallery .pv-media.is-seen::before {
  content: '';
  position: absolute;
  top: 0.45rem; right: 0.45rem;
  z-index: 2;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(var(--acc), 1);
  box-shadow: 0 0 6px rgba(var(--acc), 0.9);
}
.pv-gallery__meta {
  margin: 0.8rem 0 0;
  font-family: var(--pv-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pv-faint);
}

/* ══ 7. LEVEL SELECT (prev / next) ════════════════════════════════════════════ */
.pv-levelnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
}
.pv-levelnav__item {
  position: relative;
  display: block;
  min-height: 8.5rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-line);
  background: #05070d;
}
.pv-levelnav__item img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.pv-levelnav__item:hover img, .pv-levelnav__item:focus-visible img { opacity: 0.7; transform: scale(1.05); }
.pv-levelnav__item:focus-visible { outline: 2px solid rgba(var(--acc), 0.9); outline-offset: 3px; }
.pv-levelnav__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 8.5rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}
.pv-levelnav__item--next .pv-levelnav__text { align-items: flex-end; text-align: right; }
.pv-levelnav__dir { font-family: var(--pv-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(var(--acc), 1); }
.pv-levelnav__name { font-size: 1.35rem; font-weight: 900; text-shadow: var(--pv-outline-2); }
.pv-levelnav__empty { border-style: dashed; display: grid; place-items: center; color: var(--pv-faint); font-family: var(--pv-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; }

.pv-foot {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-family: var(--pv-mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pv-faint);
}

/* ══ Achievement toast ════════════════════════════════════════════════════════ */
.pv-toast {
  position: fixed;
  z-index: 400;
  left: 1.4rem;
  bottom: 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.8rem;
  align-items: center;
  min-width: 260px;
  max-width: 340px;
  padding: 0.75rem 1rem 0.75rem 0.8rem;
  background: rgba(10, 12, 22, 0.94);
  border: 1px solid rgba(232, 200, 74, 0.55);
  border-radius: var(--pv-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(232, 200, 74, 0.18);
  transform: translateX(calc(-100% - 2rem));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.pv-toast.is-in { transform: none; }
.pv-toast .pv-trophy__icon { width: 38px; height: 38px; font-size: 1.05rem; }
.pv-toast__head { font-family: var(--pv-mono); font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pv-gold); }
.pv-toast__name { font-weight: 900; color: #fff; }

/* ══ Lightbox extras (counter + filmstrip) ════════════════════════════════════ */
#pv-lightbox video { max-width: 88vw; max-height: 78vh; border-radius: 4px; display: none; }
#pv-lightbox.is-video video { display: block; }
#pv-lightbox.is-video img { display: none; }
.pv-lb-counter {
  position: absolute;
  top: 1.1rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--pv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
}
.pv-lb-film {
  position: absolute;
  bottom: 0.9rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  max-width: 80vw;
  overflow-x: auto;
  padding: 4px 2px;
}
.pv-lb-film img {
  width: 54px; height: 36px;
  object-fit: cover;
  flex: none;
  border-radius: 3px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  opacity: 0.55;
  cursor: pointer;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}
.pv-lb-film img.is-on { border-color: rgba(var(--acc), 0.95); opacity: 1; }

/* ══ Scroll reveal ════════════════════════════════════════════════════════════ */
.pv-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.pv-reveal.is-in { opacity: 1; transform: none; }

/* ══ Responsive ═══════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .pv-feature, .pv-feature--wide-media, .pv-zones { grid-template-columns: 1fr; }
  .pv-feature--flip > :first-child { order: 0; }
  .pv-zones__view { position: static; order: -1; }
  .pv-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-xp__bar { width: 80px; }
}
@media (max-width: 620px) {
  .pv-page { padding: 5.4rem 1rem 2rem; }
  .pv-hero { margin-top: -5.4rem; padding: 7rem 1rem 3.4rem; min-height: 0; }
  .pv-stage__caption { display: none; }
  .pv-stage__dots { right: 1rem; bottom: 1.4rem; }
  .pv-chapters { margin: 1.4rem -1rem 0; padding: 0.5rem 1rem; }
  .pv-chapters__lead { display: none; }
  html.pv2 .mp-topbar { padding: 0 1rem; gap: 0.8rem; }
  html.pv2 .mp-topbar__title { font-size: 1rem; letter-spacing: 0.08em; }
  .pv-xp > span:first-child { display: none; }        /* drop the "Explored" word */
  .pv-xp__bar { width: 54px; }
  .pv-topbar-right { gap: 0.5rem; }
  .pv-levelnav { grid-template-columns: 1fr; }
  .pv-crash { grid-template-columns: 1fr; }
  .pv-chapter__num { font-size: 2.6rem; }
  .pv-toast { left: 0.8rem; right: 0.8rem; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pv-stage__slide.is-on { animation: none; }
  .pv-reveal, .pv-trophy { opacity: 1; transform: none; transition: none; }
  .pv-stage__slide { transition: none; }
  .pv-crash.is-in .pv-crash__num { animation: none; }
  html.pv2, html.pv2 body { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   EXTRA COMPONENTS — for projects that are not shaped like MechHead
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero facts (compact key/value row under the pitch) ── */
.pv-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin: 0;
}
.pv-facts > div { display: flex; flex-direction: column; gap: 0.15rem; }
.pv-facts dt {
  font-family: var(--pv-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pv-faint);
}
.pv-facts dd { font-size: 0.92rem; font-weight: 800; color: #fff; text-shadow: var(--pv-outline); }

/* ── Hero backdrop with no screenshots: drifting project-colour glow over a PS2 grid ── */
.pv-stage--empty {
  background:
    radial-gradient(ellipse 60% 70% at 20% 30%, rgba(var(--gc-tl), 0.34), transparent 70%),
    radial-gradient(ellipse 55% 65% at 85% 25%, rgba(var(--gc-tr), 0.30), transparent 70%),
    radial-gradient(ellipse 60% 60% at 25% 90%, rgba(var(--gc-bl), 0.26), transparent 70%),
    radial-gradient(ellipse 60% 60% at 90% 85%, rgba(var(--gc-br), 0.26), transparent 70%),
    #04050a;
  background-size: 160% 160%;
  animation: pv-drift 22s ease-in-out infinite alternate;
}
@keyframes pv-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.pv-stage--empty::after {
  content: "";
  position: absolute;
  left: -20%; right: -20%; bottom: -10%;
  height: 70%;
  z-index: 1;
  background:
    linear-gradient(rgba(var(--acc), 0.22) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(var(--acc), 0.22) 1px, transparent 1px) 0 0 / 44px 100%;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%);
          mask-image: linear-gradient(to top, #000, transparent 85%);
  animation: pv-grid 3.2s linear infinite;
}
@keyframes pv-grid { from { background-position: 0 0, 0 0; } to { background-position: 0 44px, 0 0; } }
.pv-stage__glyph {
  position: absolute;
  z-index: 1;
  right: max(2rem, calc(50vw - 620px + 2rem));
  top: 50%;
  transform: translateY(-58%);
  font-family: var(--pv-mono);
  font-size: clamp(6rem, 18vw, 15rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--acc), 0.28);
  text-shadow: 0 0 40px rgba(var(--acc), 0.18);
  pointer-events: none;
  user-select: none;
}

/* ── Systems / mechanics / features: card grid ── */
.pv-systems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}
.pv-sys {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.1rem 1.1rem;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}
.pv-sys:hover { transform: translateY(-3px); border-color: rgba(var(--acc), 0.55); }
.pv-sys__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.pv-sys__name { font-size: 1.02rem; font-weight: 900; color: #fff; }
.pv-sys__tag {
  flex: none;
  font-family: var(--pv-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.14rem 0.4rem;
  border-radius: 2px;
  color: rgba(var(--acc), 1);
  border: 1px solid rgba(var(--acc), 0.45);
}
.pv-sys__desc { font-size: 0.88rem; line-height: 1.55; color: rgba(230, 236, 244, 0.8); font-weight: 600; }
.pv-sys__desc p { margin-bottom: 0.5rem; }
.pv-sys__desc p:last-child { margin-bottom: 0; }
.pv-sys__desc ul { margin: 0.3rem 0 0 1.1rem; }
.pv-sys > .pv-media { margin: -1rem -1.1rem 0.2rem; border: 0; border-radius: 0; }

/* ── Inventory: files / scripts / assets as item slots ── */
.pv-inv {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  padding: 0;
}
.pv-inv li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  font-family: var(--pv-mono);
  font-size: 0.72rem;
  color: var(--pv-ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-inv li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: rgba(var(--acc), 0.9);
  box-shadow: 0 0 6px rgba(var(--acc), 0.7);
}
.pv-inv li small { color: var(--pv-faint); font-size: 0.64rem; margin-left: auto; }

/* ── Quest log: sprints / milestones / dev phases ── */
.pv-log {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0 0 0 2rem;
}
.pv-log::before {
  content: "";
  position: absolute;
  left: 0.55rem; top: 0.4rem; bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(var(--acc), 0.8), rgba(var(--acc), 0.1));
}
.pv-log__item { position: relative; padding: 0 0 1.5rem; }
.pv-log__item:last-child { padding-bottom: 0; }
.pv-log__item::before {
  content: "";
  position: absolute;
  left: -1.78rem; top: 0.3rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #05070d;
  border: 2px solid rgba(var(--acc), 0.9);
  box-shadow: 0 0 10px rgba(var(--acc), 0.5);
  transition: background 0.4s ease;
}
.pv-log.is-in .pv-log__item::before { background: rgba(var(--acc), 1); }
.pv-log__tag {
  font-family: var(--pv-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--acc), 1);
}
.pv-log__title { font-size: 1.05rem; font-weight: 900; color: #fff; margin: 0.15rem 0 0.35rem; }
.pv-log__body { font-size: 0.94rem; line-height: 1.65; color: rgba(230, 236, 244, 0.82); font-weight: 600; }
.pv-log__body p { margin-bottom: 0.6rem; }
.pv-log__body p:last-child { margin-bottom: 0; }
.pv-log__body ul { margin: 0.4rem 0 0 1.1rem; }

/* ── Bestiary stat bars (only for real, documented stats) ── */
.pv-foe__stats { display: grid; gap: 0.3rem; margin: 0.2rem 0 0; }
.pv-foe__stats > div { display: grid; grid-template-columns: 3.4rem 1fr auto; align-items: center; gap: 0.5rem; }
.pv-foe__stats dt { font-family: var(--pv-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pv-faint); }
.pv-foe__stats dd { display: contents; }
.pv-foe__bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pv-foe__bar i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); background: rgba(var(--acc), 1); box-shadow: 0 0 6px rgba(var(--acc), 0.7); }
.pv-foe__stats b { font-family: var(--pv-mono); font-size: 0.66rem; color: #fff; font-weight: 600; min-width: 2.5em; text-align: right; }

/* ── Before / after comparison slider ── */
.pv-compare {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-line);
  background: #000;
  user-select: none;
  touch-action: pan-y;
  --pos: 50%;
}
.pv-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pv-compare__after { clip-path: inset(0 0 0 var(--pos)); }
.pv-compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(var(--acc), 1);
  box-shadow: 0 0 12px rgba(var(--acc), 0.9);
  pointer-events: none;
}
.pv-compare__handle::after {
  content: "\25C0  \25B6";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.35rem 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: #000;
  background: rgba(var(--acc), 1);
  border-radius: 20px;
  white-space: nowrap;
}
.pv-compare__label {
  position: absolute;
  top: 0.7rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  font-family: var(--pv-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  pointer-events: none;
}
.pv-compare__label--before { left: 0.7rem; }
.pv-compare__label--after  { right: 0.7rem; }
.pv-compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.pv-compare:focus-within { outline: 2px solid rgba(var(--acc), 0.9); outline-offset: 3px; }
.pv-compare-cap { margin-top: 0.5rem; font-family: var(--pv-mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--pv-mute); }

/* ── Local video (recordings shipped with the site) ── */
.pv-video { margin: 0; }
.pv-video video {
  display: block;
  width: 100%;
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-line);
  background: #000;
}
.pv-video figcaption { margin-top: 0.5rem; font-family: var(--pv-mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--pv-mute); }
.pv-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }

/* ── YouTube link card (thumbnail + play) ── */
.pv-yt {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--pv-radius);
  border: 1px solid var(--pv-line);
  background: #000;
  color: #fff;
  text-decoration: none;
}
.pv-yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.pv-yt:hover img, .pv-yt:focus-visible img { opacity: 1; transform: scale(1.04); }
.pv-yt__play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem 0.7rem 0.85rem;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(var(--acc), 0.7);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pv-yt__play svg { width: 22px; height: 22px; fill: rgba(var(--acc), 1); }
.pv-yt-cap { margin-top: 0.5rem; font-family: var(--pv-mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--pv-mute); }

/* ── Playable web build: "Press Start" launcher that loads the build on demand ── */
.pv-play {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--pv-radius);
  border: 1px solid rgba(var(--acc), 0.45);
  background: #000;
  box-shadow: 0 0 40px rgba(var(--acc), 0.12);
}
.pv-play > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(3px) brightness(0.5); transform: scale(1.05); }
.pv-play iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.pv-play__start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.pv-play__label {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pv-gold);
  text-shadow: var(--pv-outline-2), 0 0 20px rgba(232, 200, 74, 0.5);
  animation: pv-pulse 1.6s ease-in-out infinite;
}
@keyframes pv-pulse { 50% { opacity: 0.45; } }
.pv-play__hint { font-family: var(--pv-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pv-mute); }
.pv-play__bar {
  position: absolute;
  right: 0.6rem; top: 0.6rem;
  z-index: 2;
  display: none;
  gap: 0.4rem;
}
.pv-play.is-running .pv-play__bar { display: flex; }
.pv-play__bar button {
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(var(--acc), 0.6);
  border-radius: 3px;
  cursor: pointer;
}

/* ── Code snippet ── */
.pv-code {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--pv-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #d8e4f0;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(var(--acc), 0.9);
  border-radius: var(--pv-radius);
  white-space: pre;
}
.pv-prose code, .pv-sys__desc code, .pv-log__body code, .pv-foe__desc code, .pv-tip code {
  font-family: var(--pv-mono);
  font-size: 0.85em;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  color: rgba(var(--acc), 1);
  background: rgba(var(--acc), 0.1);
}

/* ── Callout variants (TIP is the default) ── */
.pv-tip--warn { background: rgba(255, 80, 90, 0.07); border-color: rgba(255, 90, 100, 0.35); }
.pv-tip--warn::before { content: "WARN"; background: #ff5a64; }
.pv-tip--note { background: rgba(232, 200, 74, 0.06); border-color: rgba(232, 200, 74, 0.35); }
.pv-tip--note::before { content: "NOTE"; background: var(--pv-gold); }

/* ── Lists and sub-headings inside prose ── */
.pv-prose ul, .pv-prose ol { margin: 0 0 1rem 1.2rem; color: rgba(230, 236, 244, 0.86); font-weight: 600; line-height: 1.7; }
.pv-prose li { margin-bottom: 0.35rem; }
.pv-prose li::marker { color: rgba(var(--acc), 1); }
.pv-prose h3 { font-size: 1.12rem; font-weight: 900; color: #fff; margin: 1.4rem 0 0.5rem; }
.pv-prose a, .pv-sys__desc a, .pv-log__body a { color: rgba(var(--acc), 1); }

/* ── Simple data table ── */
.pv-table-wrap { overflow-x: auto; padding: 0.3rem 0.4rem; }
.pv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pv-table th, .pv-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.07); vertical-align: top; }
.pv-table th { font-family: var(--pv-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(var(--acc), 1); font-weight: 600; }
.pv-table td { color: rgba(230, 236, 244, 0.85); font-weight: 600; }

@media (max-width: 620px) {
  .pv-stage__glyph { font-size: 6rem; right: 1rem; opacity: 0.6; }
  .pv-videos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pv-stage--empty, .pv-stage--empty::after, .pv-play__label { animation: none; }
}

/* ── Long content must not stretch the page ──────────────────────────────────
   Grid and flex children default to min-width:auto, so a wide <pre> or table
   inside a feature column pushes the whole page sideways instead of scrolling
   inside its own box. */
.pv-feature > *, .pv-zones > *, .pv-systems > *, .pv-bestiary > *,
.pv-hero > *, .pv-chapter > *, .pv-log__item > *, .pv-sys > * {
  min-width: 0;
}
.pv-prose, .pv-log__body, .pv-sys__desc { min-width: 0; max-width: 100%; }
.pv-code, .pv-table-wrap, .pv-inv { max-width: 100%; }
.pv-prose pre, .pv-log__body pre { max-width: 100%; }
/* very long unbroken strings (paths, URLs) wrap instead of widening the page */
.pv-prose p, .pv-sys__desc, .pv-foe__desc, .pv-log__body, .pv-table td, .pv-tip {
  overflow-wrap: anywhere;
}
