
@font-face{
  font-family:"WonkyCustom";
  src:url("assets/fonts/wonkyfont-wowthatswonky-webfont.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"InterCustom";
  src:url("assets/fonts/inter-regular-webfont.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

:root {
  --bg: #04050a;
  --bg-soft: #0d1120;
  --panel: rgba(14, 20, 36, 0.72);
  --panel-strong: rgba(17, 23, 41, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f7ff;
  --muted: #9ca8c7;
  --accent: #57d8ff;
  --accent-2: #b56dff;
  --gold: #ffcb69;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  --radius: 28px;
  --content-width: min(1200px, calc(100vw - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,191,94,0.10), transparent 18%),
    radial-gradient(circle at 78% 22%, rgba(99,178,255,0.10), transparent 20%),
    linear-gradient(180deg, #121116 0%, #18152b 48%, #121925 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  --page-backdrop-image: none;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8,10,18,0.42), rgba(8,10,18,0.72)),
    var(--page-backdrop-image);
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.08);
  transform: scale(1.08);
  opacity: .55;
}
body::after {
  z-index: -1;
  background-image:
    url("assets/stars/star_lvl1.webp"), url("assets/stars/star_lvl2.webp"), url("assets/stars/star_lvl3.webp"),
    url("assets/stars/star_lvl2.webp"), url("assets/stars/star_lvl1.webp"), url("assets/stars/star_lvl3.webp"),
    url("assets/stars/star_lvl1.webp"), url("assets/stars/star_lvl2.webp"), url("assets/stars/star_lvl3.webp"),
    radial-gradient(circle at 14% 16%, rgba(255,255,255,0.10), transparent 16%),
    radial-gradient(circle at 85% 24%, rgba(135,186,255,0.08), transparent 18%),
    radial-gradient(circle at 50% 78%, rgba(255,199,120,0.08), transparent 20%);
  background-repeat: no-repeat;
  background-size:
    14px 14px, 20px 20px, 28px 28px,
    20px 20px, 14px 14px, 28px 28px,
    14px 14px, 20px 20px, 28px 28px,
    auto, auto, auto;
  background-position:
    6% 12%, 18% 42%, 31% 18%,
    47% 68%, 59% 27%, 72% 14%,
    84% 54%, 92% 22%, 76% 82%,
    0 0, 0 0, 0 0;
  opacity: .72;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(rgba(255,255,255,0.18) 0.7px, transparent 0.7px),
    radial-gradient(rgba(255,255,255,0.08) 0.7px, transparent 0.7px);
  background-size: 18px 18px, 24px 24px;
  background-position: 0 0, 9px 9px;
  mix-blend-mode: soft-light;
}

.site-header,
.site-footer,
.hero-shell,
.section-intro,
.carousel-section,
.notes-grid,
.detail-main {
  width: var(--content-width);
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0 16px;
  position: relative;
  z-index: 2;
}

.logo-block { display: flex; flex-direction: column; gap: 6px; }
.logo {
  font-family: Orbitron, sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}
.logo span { color: var(--accent); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold);
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
    max-width: 65px;
}
.main-nav a:hover { color: var(--text); }

.hero-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  padding: 48px 0 42px;
  align-items: center;
}
.hero-copy h1,
.section-intro h2,
.detail-hero-copy h1 {
  margin: 0;
  line-height: 0.98;
  font-weight: 800;
}
.hero-copy h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); max-width: 10ch; }
.hero-copy p,
.section-intro p,
.info-card p,
.detail-hero-copy p,
.detail-section p,
.character-copy p,
.gallery-caption {
  color: var(--muted);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.btn {
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8ef2ff);
  color: #06111a;
  font-weight: 800;
  border-color: transparent;
}
.btn-secondary {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
}
.hero-stage {
  min-height: 420px;
  border-radius: 36px;
  position: relative;
  overflow: visible;
  background:
    radial-gradient(circle at 70% 20%, rgba(87,216,255,0.28), transparent 24%),
    radial-gradient(circle at 30% 75%, rgba(181,109,255,0.22), transparent 28%),
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.floating-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.65;
  animation: floaty 8s ease-in-out infinite;
}
.orb-a { width: 220px; height: 220px; background: rgba(87,216,255,0.22); top: 24px; left: 24px; }
.orb-b { width: 160px; height: 160px; background: rgba(255,203,105,0.14); bottom: 50px; right: 68px; animation-delay: -2s; }
.orb-c { width: 110px; height: 110px; background: rgba(181,109,255,0.20); top: 120px; right: 56px; animation-delay: -4s; }
.mini-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 76%);
}

.section-intro {
  text-align: center;
  padding: 42px 0 18px;
}
.section-intro h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-top: 10px;
}
.section-intro p {
  width: min(800px, 100%);
  margin: 18px auto 0;
}

.carousel-section { padding: 22px 0 30px; }
.carousel-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}
.carousel-btn {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}
.carousel-btn:hover { border-color: rgba(87,216,255,0.5); }
.carousel-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 92px;
  justify-content: center;
  color: var(--muted);
}
.divider { width: 24px; height: 1px; background: var(--line); }
.carousel-viewport {
  overflow: hidden;
  padding: 40px 10px 72px;
}
.carousel-track {
  display: flex;
  gap: 22px;
  transition: transform 360ms cubic-bezier(.2,.75,.2,1);
  will-change: transform;
}

.game-slide {
  min-width: min(300px, 72vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

.game-box-link {
  display: block;
  perspective: 2200px;
  min-height: 500px;
}
.game-box {
  --box-depth: 56px;
  position: relative;
  width: 100%;
  height: 430px;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(8deg);
  transition: transform 800ms cubic-bezier(.2,.85,.2,1), filter 280ms ease;
  filter: drop-shadow(0 34px 50px rgba(0,0,0,0.42));
}
.game-box::after {
  content: "";
  position: absolute;
  left: 12%;
  width: 76%;
  bottom: -40px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  filter: blur(18px);
  transform: translateZ(-80px) rotateX(90deg);
  pointer-events: none;
}
.game-box-link:hover .game-box,
.game-box-link:focus-visible .game-box {
  transform: rotateY(-160deg) rotateX(8deg);
}
.box-face {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.09);
  overflow: hidden;
  backface-visibility: hidden;
}
.box-front,
.box-back {
  inset: 0 calc(var(--box-depth) / 2);
  border-radius: 18px;
}
.box-front {
  transform: translateZ(calc(var(--box-depth) / 2));
  background: var(--cover, linear-gradient(135deg,#19324b,#2c1d53 50%, #0f0f18));
}
.box-back {
  transform: rotateY(180deg) translateZ(calc(var(--box-depth) / 2));
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(3,7,13,0.28), rgba(3,7,13,0.92)),
    var(--cover, linear-gradient(135deg,#19324b,#2c1d53 50%, #0f0f18));
}
.box-left,
.box-right {
  width: var(--box-depth);
  top: 0;
  bottom: 0;
  border-radius: 10px;
}
.box-left {
  left: calc(var(--box-depth) / 2);
  transform-origin: left center;
  transform: rotateY(-90deg);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(0,0,0,0.35)), var(--spine, linear-gradient(180deg,#101522,#2a3358));
}
.box-right {
  right: calc(var(--box-depth) / 2);
  transform-origin: right center;
  transform: rotateY(90deg);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.45)), var(--spine, linear-gradient(180deg,#101522,#2a3358));
}
.box-top,
.box-bottom {
  left: calc(var(--box-depth) / 2);
  right: calc(var(--box-depth) / 2);
  height: var(--box-depth);
  border-radius: 10px;
}
.box-top {
  top: 0;
  transform-origin: center top;
  transform: rotateX(-90deg);
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.02)), var(--top, linear-gradient(90deg,#1c2947,#46336f));
}
.box-bottom {
  bottom: 0;
  transform-origin: center bottom;
  transform: rotateX(90deg);
  background: linear-gradient(180deg, rgba(0,0,0,0.34), rgba(0,0,0,0.62)), var(--top, linear-gradient(90deg,#151d30,#2a2e43));
}
.box-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.22), transparent 28%, transparent 62%, rgba(255,255,255,0.08));
  mix-blend-mode: screen;
}
.box-front::before,
.box-back::before,
.box-left::before,
.box-right::before,
.box-top::before,
.box-bottom::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.045) 0 4px, transparent 4px 8px),
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.25), transparent 18%),
    radial-gradient(circle at 75% 30%, rgba(255,255,255,0.12), transparent 14%);
  opacity: 0.7;
  pointer-events: none;
}
.cover-content,
.back-content,
.spine-content,
.top-content {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.side-accent {
  position: absolute;
  inset: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent 20%, rgba(0,0,0,0.35));
}
.cover-content { justify-content: space-between; }
.back-content { justify-content: space-between; }
.cover-badge,
.top-badge {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(4,8,18,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cover-title {
  font-family: Orbitron, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 0.98;
  max-width: 7ch;
  margin: 0;
  text-shadow: 0 10px 20px rgba(0,0,0,0.35);
}
.cover-footer,
.back-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(4,8,18,0.45);
  border-radius: 999px;
  padding: 8px 12px;
  color: #dce5ff;
  font-size: 0.9rem;
}
.back-content p {
  color: rgba(244,247,255,0.92);
  line-height: 1.65;
  margin: 14px 0 0;
}
.back-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.back-stat {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 10px;
}
.back-stat strong { display: block; font-size: 0.78rem; color: #d3ddff; margin-bottom: 6px; }
.back-stat span { font-size: 0.95rem; color: #fff; }
.spine-content {
  justify-content: center;
  align-items: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 18px 8px;
}
.spine-title {
  font-family: Orbitron, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
}
.top-content {
  align-items: flex-end;
  justify-content: center;
  padding: 12px 18px;
}

.slide-copy {
  display: grid;
  gap: 12px;
  padding: 0 2px;
}
.slide-copy h3 {
  margin: 0;
  font-size: 1.4rem;
}
.slide-copy p { margin: 0; color: var(--muted); line-height: 1.65; }
.slide-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.slide-link {
  color: var(--accent);
  font-weight: 700;
}
.release {
  display: inline-flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 56px 0 56px;
}
.info-card,
.detail-panel,
.gallery-shot,
.character-card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.info-card { padding: 26px; }
.info-card h3 { margin: 10px 0 8px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
}
.site-footer code { color: var(--text); }
.muted { color: var(--muted); }

.detail-main {
  display: grid;
  gap: 26px;
  padding: 12px 0 56px;
}
.detail-hero {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 26px;
  align-items: stretch;
}
.detail-visual,
.detail-hero-copy,
.detail-section,
.character-card,
.gallery-shot {
  min-width: 0;
}
.detail-visual {
  min-height: 680px;
  perspective: 2200px;
  padding: 28px;
  position: relative;
  overflow: visible;
  background: var(--cover, linear-gradient(135deg,#1b2439,#2b1342 48%, #0b0f15));
}
.detail-visual::after { content:none; }
.hero-cover-box {
  --box-depth: 68px;
  position: absolute;
  z-index: 1;
  left: 50%;
  width: min(340px, 56vw);
  height: 510px;
  bottom: 26px;
  transform: translateX(-36%) rotateY(-24deg) rotateX(8deg);
  transform-style: preserve-3d;
}
.hero-cover-box .box-front,
.hero-cover-box .box-back { border-radius: 22px; }
.hero-cover-box .box-left,
.hero-cover-box .box-right,
.hero-cover-box .box-top,
.hero-cover-box .box-bottom { border-radius: 12px; }
.detail-hero-copy {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.detail-hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-top: 10px;
  max-width: 9ch;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 16px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.detail-section { padding: 28px; }
.detail-section h2 { margin-top: 0; font-size: 1.6rem; }
.features-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}
.features-list li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--muted);
}
.features-list strong { color: var(--text); display: block; margin-bottom: 4px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gallery-shot { overflow: hidden; }
.gallery-art {
  height: 240px;
  position: relative;
  background: var(--shot, linear-gradient(135deg,#183654,#41165e));
}
.gallery-art::before,
.gallery-art::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
}
.gallery-art::before {
  width: 120px;
  height: 120px;
  top: 18px;
  left: 18px;
  background: rgba(255,255,255,0.15);
}
.gallery-art::after {
  width: 160px;
  height: 160px;
  right: 10px;
  bottom: 4px;
  background: rgba(0,0,0,0.18);
}
.gallery-caption { padding: 16px; margin: 0; }
.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.character-card { overflow: hidden; }
.character-portrait {
  height: 260px;
  background: var(--portrait, linear-gradient(135deg,#2b2f4a,#111829));
  position: relative;
}
.character-portrait::before {
  content: attr(data-char);
  position: absolute;
  inset: auto 16px 16px 16px;
  font-family: Orbitron, sans-serif;
  font-size: 1.8rem;
  line-height: 0.98;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.character-copy { padding: 18px; }
.character-copy h3 { margin: 0 0 10px; }
.detail-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.btn-steam{
  width:100%;
  justify-content:center;
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.btn-steam .steam-icon-image{
  width:20px;
  height:20px;
  filter:brightness(0) invert(1);
}

@keyframes floaty {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(0,-12px,0); }
}

@media (max-width: 1080px) {
  .hero-shell,
  .detail-hero,
  .detail-grid,
  .notes-grid,
  .gallery-grid,
  .characters-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy h1 { max-width: 13ch; }
  .detail-visual { min-height: 520px; }
  .hero-cover-box { left: 50%; width: min(300px, 60vw); height: 450px; transform: translateX(-38%) rotateY(-24deg) rotateX(8deg); }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer { flex-direction: column; align-items: flex-start; }
  .hero-shell { padding-top: 24px; }
  .game-slide { min-width: min(300px, 88vw); }
  .game-box-link { min-height: 430px; }
  .game-box { --box-depth: 44px; height: 370px; }
  .cover-title { max-width: 9ch; }
  .detail-hero-copy,
  .detail-section,
  .info-card { padding: 22px; }
  .detail-visual { min-height: 420px; }
  .hero-cover-box { left: 50%; width: 220px; height: 330px; transform: translateX(-40%) rotateY(-24deg) rotateX(8deg); }
}

/* Three.js box renderer */
.game-box-link {
  display: block;
  position: relative;
  min-height: 420px;
  overflow: visible;
}

.game-box-three {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: visible;
  z-index: 1;
}

.game-box-three canvas,
.hero-cover-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.detail-visual {
  min-height: 620px;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-cover-box {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: visible;
  z-index: 1;
}

@media (max-width: 720px) {
  .game-slide { min-width: min(260px, 78vw); }
  .game-box-link { min-height: 360px; }
  .game-box-three { height: 360px; }
  .detail-visual { min-height: 440px; }
  .hero-cover-box { height: 360px; }
}

/* Placeholder texture workflow:
   Replace the PNG files in assets/textures/<slug>/front.png, back.png, spine.png, top.png, bottom.png
   with your own exported artwork. The JS will load those files automatically. */


/* v5 sizing fixes */
.carousel-section,
.carousel-viewport,
.carousel-track,
.game-slide {
  overflow: visible;
}

.game-box-link,
.game-box-three,
.hero-cover-box,
.detail-visual {
  isolation: isolate;
}

.game-box-link::before,
.game-box-link::after,
.hero-cover-box::before,
.hero-cover-box::after {
  content: none !important;
}

.slide-copy {
  margin-top: -8px;
}

.detail-panel.detail-visual {
  align-self: start;
}

/* v6 hard fix cropping */
.carousel-viewport{
overflow:visible !important;
}

.carousel-track{
overflow:visible !important;
}

.game-slide{
overflow:visible !important;
}

.game-box-link{
min-height:340px !important;
}

.game-box-three{
height:340px !important;
overflow:visible !important;
}

.hero-cover-box{
height:420px !important;
overflow:visible !important;
}

/* v7 definitive crop fix */
.carousel-viewport,
.carousel-track,
.game-slide,
.game-box-link,
.game-box-three,
.detail-visual,
.hero-cover-box{
  overflow: visible !important;
}

.game-slide{
  min-width: min(280px, 68vw) !important;
  gap: 2px !important;
}

.game-box-link{
  min-height: 300px !important;
}

.game-box-three{
  height: 300px !important;
}

.hero-cover-box{
  height: 360px !important;
}

.detail-visual{
  min-height: 420px !important;
}


/* v8 enlarge boxes dramatically */
.game-box-link{
min-height:520px !important;
}

.game-box-three{
height:520px !important;
}

.hero-cover-box{
height:720px !important;
}

.game-slide{
min-width: min(420px, 78vw) !important;
}

@media (max-width:900px){
.game-box-link{
min-height:420px !important;
}
.game-box-three{
height:420px !important;
}
}









/* v15 home layout: hard safe zone + true right-edge carousel */
.wst-home{
  background:
    linear-gradient(180deg, #161616 0%, #221d40 72%, #1d3e45 100%);
  overflow-x:hidden;
}

.wst-featured{
  --safe-zone: 430px;
  width:100vw;
  margin:10px 0 46px;
  min-height:880px;
  position:relative;
  overflow:hidden;
  padding:40px 0 36px;
}

.wst-grid-line{
  background-color: #171618;
  /* position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:45%;
  background:
    linear-gradient(rgba(118,82,255,0.22), rgba(118,82,255,0.22)) top/100% 1px no-repeat,
    linear-gradient(90deg, rgba(118,82,255,0.16) 1px, transparent 1px) 0 0/38px 38px,
    linear-gradient(rgba(118,82,255,0.16) 1px, transparent 1px) 0 0/38px 38px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 24%);
  pointer-events:none; */
}

.wst-sidebar{
  position:absolute;
  left:40px;
  bottom:120px;
  width:min(360px, calc(100vw - 80px));
  z-index:6;
}

.wst-arrows{
  display:flex;
  gap:14px;
  margin-bottom:28px;
}

.wst-arrow{
  width:48px;
  height:48px;
  border-radius:999px;
  border:1px solid #ffbb00;
  background:transparent;
  color:#ffbb00;
  font-size:28px;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}
.wst-arrow:hover:not(:disabled){ transform:translateY(-1px); }
.wst-arrow-active,
.wst-arrow:not(:disabled):hover{ background:#ffbb00; color:#0c1020; }
.wst-arrow:disabled{ opacity:.36; cursor:default; }

.wst-sidebar h1{
  font-family:Orbitron, sans-serif;
  color:#ffbb00;
  font-size:clamp(3rem, 5vw, 4.8rem);
  line-height:.94;
  margin:0 0 18px;
}

.wst-sidebar p{
  max-width:320px;
  color:#cbe19a;
  line-height:1.55;
  font-size:1.05rem;
  margin:0 0 24px;
}

.wst-browse{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:0 22px;
  border-radius:999px;
  border:2px solid #ffbb00;
  color:#ffbb00;
  font-family:Orbitron, sans-serif;
  letter-spacing:.05em;
}

.wst-carousel-shell{
  position:relative;
  z-index:2;
  margin-left:var(--safe-zone);
  width:calc(100vw - var(--safe-zone));
  overflow:hidden;
  padding:10px 0 0 0;
}

.wst-carousel{
  display:flex;
  align-items:flex-end;
  gap:34px;
  transition:transform 420ms cubic-bezier(.2,.75,.2,1);
  will-change:transform;
  cursor:grab;
  user-select:none;
  touch-action:pan-y;
  margin:0;
  padding:0;
}

.wst-carousel.is-dragging{ cursor:grabbing; }

.wst-slide{
  width:min(430px, 28vw);
  min-width:min(430px, 28vw);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
}

.wst-slide-link{
  display:block;
  width:100%;
  -webkit-user-drag:none;
}

.wst-box-wrap{
  position:relative;
  width:100%;
  height:640px;
  overflow:visible;
}

.wst-box-render{
  width:100%;
  height:100%;
}

.wst-box-render canvas{
  display:block;
  width:100% !important;
  height:100% !important;
  pointer-events:none;
}

.wst-meta{
  width:100%;
  padding:0 8px;
  display:flex;
  flex-direction:column;
  align-items: center;
  gap:10px;
}

.wst-release{
  font-size:.88rem;
  color:#ffbb00;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.wst-icons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.wst-icons .meta-pill{
  color:#d4d8e8;
  border-color:rgba(125,87,255,.36);
  background:rgba(16,18,34,.56);
}

@media (min-width: 1600px){
  .wst-featured{ --safe-zone: 470px; }
  .wst-slide{
    width:min(460px, 27vw);
    min-width:min(460px, 27vw);
  }
  .wst-box-wrap{ height:680px; }
}

@media (max-width: 1500px){
  .wst-featured{
    --safe-zone: 370px;
    min-height:860px;
  }
  .wst-sidebar{
    width:320px;
    left:32px;
    bottom:105px;
  }
  .wst-slide{
    width:min(390px, 34vw);
    min-width:min(390px, 34vw);
  }
  .wst-box-wrap{ height:560px; }
}

@media (max-width: 980px){
  .wst-featured{
    --safe-zone: 0px;
    min-height:auto;
    padding:20px 0 30px;
  }
  .wst-sidebar{
    position:relative;
    left:auto;
    bottom:auto;
    width:min(680px, calc(100vw - 40px));
    margin:0 auto 18px;
  }
  .wst-sidebar p{ max-width:none; }
  .wst-carousel-shell{
    margin-left:0;
    width:100%;
    padding:0 20px;
    overflow:hidden;
  }
  .wst-slide{
    width:min(320px, 76vw);
    min-width:min(320px, 76vw);
  }
  .wst-box-wrap{ height:460px; }
}

@media (max-width: 640px){
  .wst-sidebar{
    width:calc(100vw - 28px);
    margin:0 14px 16px;
  }
  .wst-arrows{ margin-bottom:18px; }
  .wst-carousel-shell{ padding:0 14px; }
  .wst-slide{
    width:min(280px, 78vw);
    min-width:min(280px, 78vw);
  }
  .wst-box-wrap{ height:390px; }
}


/* v16 hard home fix: structural safe zone + clickable carousel */
.wst-featured{
  --safe-zone: 430px !important;
  width:100vw !important;
  display:grid !important;
  grid-template-columns: var(--safe-zone) minmax(0, 1fr) !important;
  align-items:end !important;
  column-gap:0 !important;
  min-height:880px !important;
  position:relative !important;
  overflow:hidden !important;
  padding:40px 0 36px 0 !important;
  margin:10px 0 0 0 !important;
  background-color: #171618;
}

.wst-sidebar{
  position:relative !important;
  grid-column:1 !important;
  left:auto !important;
  bottom:auto !important;
  width:360px !important;
  margin-left:40px !important;
  margin-bottom:120px !important;
  z-index:6 !important;
}

.wst-carousel-shell{
  grid-column:2 !important;
  width:100% !important;
  margin-left:0 !important;
  padding:10px 0 0 0 !important;
  overflow:hidden !important;
}

.wst-carousel{
  gap:34px !important;
  margin:0 !important;
  padding:0 !important;
  cursor:grab !important;
  user-select:none !important;
  touch-action:pan-y !important;
}

.wst-carousel.is-dragging{
  cursor:grabbing !important;
}

.wst-slide{
  width:min(430px, 28vw) !important;
  min-width:min(430px, 28vw) !important;
}

.wst-box-wrap{
  height:640px !important;
}

.wst-slide-link,
.wst-slide-link *{
  pointer-events:auto !important;
}

.wst-box-render canvas{
  pointer-events:none !important;
}

@media (min-width: 1600px){
  .wst-featured{
    --safe-zone: 470px !important;
  }
  .wst-sidebar{
    width:390px !important;
    margin-left:40px !important;
  }
  .wst-slide{
    width:min(460px, 27vw) !important;
    min-width:min(460px, 27vw) !important;
  }
  .wst-box-wrap{
    height:680px !important;
  }
}

@media (max-width: 1500px){
  .wst-featured{
    --safe-zone: 370px !important;
    min-height:860px !important;
  }
  .wst-sidebar{
    width:320px !important;
    margin-left:32px !important;
    margin-bottom:105px !important;
  }
  .wst-slide{
    width:min(390px, 34vw) !important;
    min-width:min(390px, 34vw) !important;
  }
  .wst-box-wrap{
    height:560px !important;
  }
}

@media (max-width: 980px){
  .wst-featured{
    display:block !important;
    min-height:auto !important;
    padding:20px 0 30px 0 !important;
  }
  .wst-sidebar{
    width:min(680px, calc(100vw - 40px)) !important;
    margin:0 auto 18px !important;
  }
  .wst-carousel-shell{
    width:100% !important;
    padding:0 20px !important;
  }
  .wst-slide{
    width:min(320px, 76vw) !important;
    min-width:min(320px, 76vw) !important;
  }
  .wst-box-wrap{
    height:460px !important;
  }
}

@media (max-width: 640px){
  .wst-sidebar{
    width:calc(100vw - 28px) !important;
    margin:0 14px 16px !important;
  }
  .wst-carousel-shell{
    padding:0 14px !important;
  }
  .wst-slide{
    width:min(280px, 78vw) !important;
    min-width:min(280px, 78vw) !important;
  }
  .wst-box-wrap{
    height:390px !important;
  }
}




/* v18 fonts, steam icon, CTA fixes */
body,
p,
span,
a,
button,
input,
textarea,
li{
  font-family:"InterCustom", Inter, sans-serif !important;
  font-weight:400;
}

.logo,
.wst-sidebar h1,
.detail-hero-copy h1,
.detail-section h2,
.discord-cta h2{
  font-family:"WonkyCustom", Orbitron, sans-serif !important;
  letter-spacing:0.01em;
}

.platform-icon-pill{
  width:52px;
  height:52px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(125,87,255,.36);
  background:rgba(16,18,34,.56);
  color:#d4d8e8;
}
.wst-featured .steam-icon-image{
  filter: invert(1);
}
.steam-icon-image{
  width:24px;
  height:24px;
  display:block;
  object-fit:contain;
}

.discord-cta{
  width:min(1200px, calc(100vw - 40px));
  margin:60px auto 28px;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  gap:40px;
  padding:40px;
  padding-bottom: 0!important;
  border-radius:28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(110,72,255,0.18), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  overflow:hidden;
  text-decoration:none;
}

.discord-cta-copy h2{
  margin:6px 0 10px;
  font-size:clamp(2rem, 4vw, 3.2rem);
  line-height:0.95;
}

.discord-cta-copy p{
  max-width:540px;
  color:var(--muted);
  margin:0 0 18px;
}

.discord-cta-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border-radius:999px;
  border:1px solid rgba(125,87,255,.55);
  color:#ffbb00;
  font-family:"WonkyCustom", Orbitron, sans-serif !important;
}

.discord-cta-art{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:320px;
}

.discord-cta-art img{
  width:100%;
  max-width:420px;
  height:auto;
  object-fit:contain;
  display:block;
}

.site-footer{
  display:block !important;
}

.site-footer > p{
  width:min(1200px, calc(100vw - 40px));
  margin:0 auto 10px;
}

@media (max-width: 900px){
  .discord-cta{
    grid-template-columns:1fr;
    width:calc(100vw - 28px);
    padding:20px;
    gap:20px;
  }
  .discord-cta-art{
    min-height:auto;
  }
  .discord-cta-art img{
    width:min(100%, 320px);
  }
}

/* v7 fixes */
.main-nav img{max-width:100%;height:auto;display:block;}
.wst-slide, .wst-box-wrap, .wst-box-render{overflow:visible;}
.wst-box-render canvas{display:block;width:100% !important;height:100% !important;}

/* v6 manual detail layout, cleaned so it does not affect index */
.manual-detail{
  position:relative;
  display:grid;
  gap:32px;
  padding:16px 0 64px;
}
.manual-stage{
  position:relative;
  display:grid;
  grid-template-columns:minmax(360px, .86fr) minmax(0, 1.14fr);
  gap:28px;
  align-items:start;
  min-height:760px;
}
.manual-backdrop{
  display:none;
}
.manual-backdrop::before,
.manual-backdrop::after{content:'';position:absolute;inset:0;}
.manual-backdrop::before{
  backdrop-filter: blur(22px) saturate(0.9);
  background:
    radial-gradient(circle at 18% 30%, rgba(255,214,128,.22), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(113,174,255,.16), transparent 22%),
    linear-gradient(135deg, rgba(5,8,16,.34), rgba(5,8,16,.74));
}
.manual-backdrop::after{
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), transparent 18%),
    linear-gradient(0deg, rgba(2,4,8,.42), rgba(2,4,8,.2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  border-radius:34px;
}
.manual-visual-shell,
.manual-dossier,
.manual-lower-grid,
.paper-cast{position:relative;z-index:1;}
.manual-visual-shell{display:flex;align-items:stretch;min-width:0;}
.manual-visual-glass{
  position:relative;
  width:100%;
  min-height:760px;
  padding:28px;
  border-radius:32px;
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(20px) saturate(1.08);
  box-shadow:0 24px 80px rgba(0,0,0,.36);
  overflow:hidden;
}
.manual-visual-glass::before{
  content:'';position:absolute;inset:16px;border-radius:24px;border:1px solid rgba(255,255,255,.08);pointer-events:none;
}
.manual-detail .hero-cover-box{
  position:absolute;
  inset:84px 18px 18px 18px;
  width:auto;
  height:auto;
  transform:none;
}
.manual-dossier{
  display:grid;
  grid-template-columns:1fr;
  align-content:start;
  gap:18px;
  padding:28px 10px 12px 0;
}
.manual-paper{
  position:relative;
  padding:30px 30px 28px;
  border-radius:18px;
  color:#1a1f29;
  background:
    linear-gradient(90deg, rgba(196,44,44,.12) 0 3px, transparent 3px 100%),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(66,106,170,.10) 31px 32px),
    linear-gradient(180deg, #f6f1de 0%, #ede5cf 100%);
  border:1px solid rgba(109,89,58,.22);
  box-shadow:0 22px 48px rgba(0,0,0,.22), 0 3px 0 rgba(255,255,255,.36) inset;
  overflow:hidden;
}
.manual-paper::after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 15% 18%, rgba(255,255,255,.32), transparent 18%), radial-gradient(circle at 78% 84%, rgba(98,76,42,.10), transparent 22%);pointer-events:none;}
.paper-hero{ transform:rotate(-1.2deg); }
.paper-summary{ transform:rotate(.6deg); margin-top:0; }
.paper-story{ transform:rotate(-0.9deg); }
.paper-gallery{ transform:rotate(0.7deg); }
.paper-cast{ transform:rotate(-0.4deg); }
.paper-kicker{display:inline-block;margin-bottom:10px;color:#8a5f18;text-transform:uppercase;letter-spacing:.12em;font-size:.78rem;font-weight:800;}
.manual-paper h1,.manual-paper h2,.manual-paper h3{color:#181d25;margin:0 0 14px;}
.manual-paper h1{font-size:clamp(2.1rem, 4.1vw, 2.8rem);line-height:.94;max-width:100%;letter-spacing:-.03em;}
.manual-paper h2{font-size:1.8rem;}
.manual-paper p{color:#313846;line-height:1.72;margin:0 0 14px;}
.paper-lead{font-size:1.07rem;color:#212838;max-width:42ch;}
.paper-tape{position:absolute;width:96px;height:24px;top:-10px;background:linear-gradient(180deg, rgba(255,244,194,.78), rgba(229,204,141,.62));box-shadow:0 4px 8px rgba(0,0,0,.08);opacity:.92;}
.tape-a{ right:34px; transform:rotate(6deg); }
.tape-b{ left:40px; transform:rotate(-5deg); }
.tape-c{ right:48px; transform:rotate(4deg); }
.tape-d{ left:48px; transform:rotate(-3deg); }
.tape-e{ left:calc(50% - 48px); transform:rotate(2deg); }
.paper-pin{position:absolute;top:14px;right:16px;width:12px;height:12px;border-radius:999px;background:#b33d36;box-shadow:0 0 0 3px rgba(255,255,255,.35), 0 4px 10px rgba(0,0,0,.18);}
.manual-meta .meta-pill{color:#2a3040;background:rgba(255,255,255,.52);border-color:rgba(78,92,122,.22);}
.manual-feature-list{gap:14px;}
.manual-feature-list li{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;border:1px dashed rgba(90,84,68,.24);background:rgba(255,255,255,.38);}
.manual-feature-list li p{margin:4px 0 0;}
.feature-index{display:inline-grid;place-items:center;min-width:40px;height:40px;border-radius:999px;background:#1c2430;color:#f4eddb;font-size:.78rem;font-weight:800;}
.manual-lower-grid{position:relative;z-index:1;display:grid;grid-template-columns:.92fr 1.08fr;gap:24px;}
.manual-gallery-grid,.manual-characters-grid{display:grid;gap:18px;}
.manual-gallery-grid{grid-template-columns:repeat(3, minmax(0, 1fr));}
.manual-characters-grid{grid-template-columns:repeat(3, minmax(0, 1fr));}
.manual-shot,.manual-character{padding:16px;transform:none;}
.manual-shot .gallery-caption,.manual-character .character-copy{padding:14px 2px 2px;}
.manual-shot .gallery-art,.manual-character .character-portrait{border-radius:14px;overflow:hidden;border:1px solid rgba(76,63,46,.12);}
.manual-detail .detail-cta .btn-primary{background:#6fdcff;color:#07131c;}
.manual-detail .detail-cta .btn-secondary{background:rgba(16,24,34,.08);color:#1a2230;border-color:rgba(52,63,86,.18);}
@media (max-width: 1180px){
  .manual-stage,.manual-lower-grid,.manual-dossier{grid-template-columns:1fr;}
  .manual-stage{min-height:unset;}
  .manual-visual-glass{min-height:620px;}
  .paper-summary{margin-top:0;}
}
@media (max-width: 780px){
  .manual-visual-glass{min-height:500px;padding:18px;}
  .manual-detail .hero-cover-box{inset:70px 8px 12px 8px;}
  .manual-paper{padding:22px 20px 20px;}
  .manual-gallery-grid,.manual-characters-grid{grid-template-columns:1fr;}
}


/* v10 polish */
:root{
  --paper-base:#d8d8f8;
  --paper-base-2:#cfcff3;
  --paper-line:rgba(90,98,158,.24);
  --paper-margin:rgba(182,120,142,.18);
  --paper-text:#1f2433;
  --paper-muted:#394055;
}

body.wst-home{
  background:
    radial-gradient(circle at 15% 10%, rgba(255,192,120,.10), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(109,140,255,.12), transparent 24%),
    linear-gradient(180deg, #090b13 0%, #0d1020 42%, #0b0f19 100%);
}

body.wst-home::before{
  opacity:.42;
}

body.wst-home .site-header{
  padding-bottom:26px;
}

body.wst-home .site-header::after{content:none;}

.wst-featured{
  position:relative;
  isolation:isolate;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,197,111,.10), transparent 18%),
    radial-gradient(circle at 84% 22%, rgba(114,154,255,.10), transparent 22%),
    linear-gradient(180deg, rgba(9,11,18,.52), rgba(10,11,18,.68));
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  border:1px solid rgba(255,255,255,.06);
  border-radius:34px;
  box-shadow:0 22px 56px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.03);
  margin-top:8px;
}

.wst-featured::before,
.wst-featured::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
}

.wst-featured::before{
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.10), transparent 24%),
    radial-gradient(circle at 72% 16%, rgba(129,172,255,.10), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
  filter: blur(34px) saturate(1.08);
  transform:none;
  opacity:.62;
}

.wst-featured::after{
  background-image:
    url("assets/stars/star_lvl1.webp"), url("assets/stars/star_lvl2.webp"), url("assets/stars/star_lvl3.webp"),
    url("assets/stars/star_lvl2.webp"), url("assets/stars/star_lvl1.webp"), url("assets/stars/star_lvl3.webp");
  background-repeat:no-repeat;
  background-size:14px 14px, 20px 20px, 28px 28px, 20px 20px, 14px 14px, 28px 28px;
  background-position:8% 18%, 21% 54%, 48% 16%, 67% 62%, 82% 20%, 92% 42%;
  opacity:.38;
}

.manual-stage{
  align-items:start;
}

.manual-visual-shell{
  align-self:stretch;
  min-width:0;
}

.manual-visual-sticky{
  position:sticky;
  top:24px;
  height:calc(100vh - 48px);
  display:block;
}

.manual-visual-glass{
  position:relative;
  height:100%;
  min-height:760px;
  padding:78px 22px 22px;
  display:block;
}

.manual-detail .hero-cover-box{
  position:absolute;
  inset:84px 20px 20px 20px;
  width:auto;
  height:auto;
}

.manual-paper{
  color:var(--paper-text);
  background:
    linear-gradient(90deg, var(--paper-margin) 0 3px, transparent 3px 100%),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-line) 31px 32px),
    linear-gradient(180deg, var(--paper-base) 0%, var(--paper-base-2) 100%);
  border:1px solid rgba(92,96,148,.24);
  box-shadow:0 22px 48px rgba(0,0,0,.22), 0 3px 0 rgba(255,255,255,.32) inset;
}

.manual-paper::after{
  background:radial-gradient(circle at 15% 18%, rgba(255,255,255,.26), transparent 18%), radial-gradient(circle at 78% 84%, rgba(103,106,160,.10), transparent 22%);
}

.paper-kicker{
  color:#7a66a8;
}

.manual-paper h1,.manual-paper h2,.manual-paper h3{
  color:#181d2a;
}

.manual-paper p, .paper-lead{
  color:var(--paper-muted);
}

.manual-meta .meta-pill{
  color:#2a3040;
  background:rgba(255,255,255,.42);
  border-color:rgba(88,98,144,.22);
}

.manual-feature-list li{
  border:1px dashed rgba(88,94,145,.24);
  background:rgba(255,255,255,.28);
}

.feature-index{
  background:#6f73b8;
  color:#f6f7ff;
}

@media (max-width: 1180px){
  .manual-visual-sticky{position:relative; top:auto; height:auto;}
  .manual-visual-glass{min-height:620px; height:auto; padding:78px 18px 18px;}
  .manual-detail .hero-cover-box{position:absolute; inset:84px 18px 18px 18px;}
}

@media (max-width: 780px){
  .manual-visual-glass{min-height:500px; padding:70px 14px 14px;}
  .manual-detail .hero-cover-box{inset:74px 12px 12px 12px;}
}


/* v12 fixes */
body.wst-home .site-header{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.wst-featured{
  margin-top: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.wst-featured::before{
  opacity: .72 !important;
}

.wst-grid-line{display:none !important;}

.manual-stage{
  grid-template-columns: minmax(420px, .96fr) minmax(0, 1.04fr) !important;
  gap: 24px !important;
}

.manual-visual-shell{
  min-width: 420px;
}

.manual-visual-sticky{
  top: 20px !important;
  height: calc(100vh - 40px) !important;
}

.manual-visual-glass{
  min-height: calc(100vh - 40px) !important;
  height: calc(100vh - 40px) !important;
  padding: 84px 24px 24px !important;
}

.manual-detail .hero-cover-box{
  inset: 88px 16px 28px 16px !important;
}

.manual-detail .hero-cover-box canvas{
  display:block;
  width:100% !important;
  height:100% !important;
}

@media (max-width: 1260px){
  .manual-stage{grid-template-columns:1fr !important;}
  .manual-visual-shell{min-width:0;}
  .manual-visual-sticky{position:relative !important; top:auto !important; height:auto !important;}
  .manual-visual-glass{min-height:640px !important; height:640px !important;}
}

@media (max-width: 780px){
  .manual-visual-glass{min-height:520px !important; height:520px !important; padding:72px 14px 16px !important;}
  .manual-detail .hero-cover-box{inset:78px 10px 16px 10px !important;}
}


/* v13 fixes */
.manual-stage{
  grid-template-columns:minmax(560px, 1.02fr) minmax(0, .98fr) !important;
  gap:28px !important;
}
.manual-visual-shell{
  width:100%;
  min-width:560px;
}
.manual-visual-sticky{
  width:100%;
}
.manual-visual-glass{
  width:100%;
}
.manual-detail .hero-cover-box{
  inset:88px 12px 24px 12px !important;
}
@media (max-width: 1440px){
  .manual-stage{grid-template-columns:minmax(460px,.96fr) minmax(0,1.04fr) !important;}
  .manual-visual-shell{min-width:460px;}
}
@media (max-width: 1260px){
  .manual-stage{grid-template-columns:1fr !important;}
  .manual-visual-shell{min-width:0;}
}


/* v15 ribbon + wonky 500 + dark manual notes */
.site-header{
  position: relative;
  z-index: 3;
}

.studio-ribbon{
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto 0;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}

.studio-ribbon__stripe{
  height: 11px;
}

.studio-ribbon__stripe--gold{
  background: #ffbb00;
}

.studio-ribbon__stripe--peach{
  background: #ed8677;
}

.studio-ribbon__stripe--violet{
  background: #7575fa;
}

.studio-ribbon p{
  margin: 0;
  padding: 16px 22px 18px;
  text-align: center;
  background: rgba(8,10,18,.92);
  color: #f5f1df;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: .88rem;
  font-weight: 700;
}

@media (max-width: 780px){
  .studio-ribbon{
    width: calc(100vw - 28px);
    margin-bottom: 10px;
    border-radius: 18px;
  }
  .studio-ribbon__stripe{height: 16px;}
  .studio-ribbon p{
    padding: 12px 16px 14px;
    letter-spacing: .18em;
    font-size: .74rem;
  }
}

/* Ensure Wonky titles render at medium weight everywhere */
.logo,
.wst-sidebar h1,
.detail-hero-copy h1,
.detail-section h2,
.discord-cta h2,
.manual-paper h1,
.manual-paper h2,
.manual-paper h3,
.paper-kicker,
.discord-cta-button{
  font-family:"WonkyCustom", Orbitron, sans-serif !important;
  font-weight:500 !important;
}

/* Dark-mode friendly collector notes */
:root{
  --paper-base:#22253c;
  --paper-base-2:#1b1e33;
  --paper-line:rgba(151,161,225,.18);
  --paper-margin:rgba(112,124,222,.20);
  --paper-text:#eff1ff;
  --paper-muted:#c5cbe9;
}

.manual-paper{
  color: var(--paper-text) !important;
  background:
    linear-gradient(90deg, var(--paper-margin) 0 3px, transparent 3px 100%),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-line) 31px 32px),
    linear-gradient(180deg, var(--paper-base) 0%, var(--paper-base-2) 100%) !important;
  border: 1px solid rgba(145,156,231,.20) !important;
  box-shadow:
    0 26px 52px rgba(0,0,0,.36),
    inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.manual-paper::after{
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.08), transparent 18%),
    radial-gradient(circle at 78% 84%, rgba(120,129,211,.10), transparent 22%) !important;
}

.paper-kicker{
  color:#b7b0f3 !important;
}

.manual-paper h1,
.manual-paper h2,
.manual-paper h3{
  color:#f5f6ff !important;
}

.manual-paper p,
.paper-lead{
  color: var(--paper-muted) !important;
}

.manual-meta .meta-pill{
  color:#eef1ff !important;
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(153,162,225,.24) !important;
}

.manual-feature-list li{
  border:1px dashed rgba(153,162,225,.22) !important;
  background:rgba(255,255,255,.04) !important;
}

.feature-index{
  background:#868de0 !important;
  color:#111526 !important;
}

.manual-detail .detail-cta .btn-secondary{
  background:rgba(255,255,255,.06) !important;
  color:#edf0ff !important;
  border-color:rgba(158,170,238,.18) !important;
}

.manual-paper .gallery-caption,
.manual-paper .character-copy{
  color: var(--paper-muted);
}


/* v21 typography + buttons cleanup */
:root{
  --brand-violet:#7778fa;
  --brand-gradient:linear-gradient(to right, #ffbb00, #ed8677, #7575fa 70%);
}

/* Wonky headings at medium weight without scattered overrides */
.logo,
.wst-sidebar h1,
.detail-hero-copy h1,
.detail-section h2,
.discord-cta h2,
.manual-paper h1,
.manual-paper h2,
.manual-paper h3,
.paper-kicker,
.discord-cta-button{
  font-family:"WonkyCustom", Orbitron, sans-serif;
  font-weight:500;
}

/* Gradient titles */
.wst-sidebar h1,
.discord-cta-copy h2{
  background:var(--brand-gradient);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* Unified buttons */
.btn,
.wst-browse,
.discord-cta-button,
.manual-detail .detail-cta a,
.manual-detail .detail-cta .btn-primary,
.manual-detail .detail-cta .btn-secondary{
  background:#7778fa;
  color:#fff;
  border:1px solid #7778fa;
  box-shadow:none;
}

.btn:hover,
.wst-browse:hover,
.discord-cta-button:hover,
.manual-detail .detail-cta a:hover,
.manual-detail .detail-cta .btn-primary:hover,
.manual-detail .detail-cta .btn-secondary:hover{
  background:#6b6cf0;
  border-color:#6b6cf0;
  color:#fff;
}

.btn-primary,
.btn-secondary{
  font-weight:600;
  backdrop-filter:none;
}

/* Keep carousel arrows visually distinct */
.carousel-btn,
.wst-arrow{
  box-shadow:none;
}

/* Dark manual papers, without !important noise */
.manual-paper{
  color:var(--paper-text);
  background:
    linear-gradient(90deg, var(--paper-margin) 0 3px, transparent 3px 100%),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-line) 31px 32px),
    linear-gradient(180deg, var(--paper-base) 0%, var(--paper-base-2) 100%);
  border:1px solid rgba(145,156,231,.20);
  box-shadow:0 26px 52px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.06);
}

.manual-paper::after{
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.08), transparent 18%),
    radial-gradient(circle at 78% 84%, rgba(120,129,211,.10), transparent 22%);
}

.paper-kicker{ color:#b7b0f3; }
.manual-paper h1,
.manual-paper h2,
.manual-paper h3{ color:#f5f6ff; }
.manual-paper p,
.paper-lead,
.manual-paper .gallery-caption,
.manual-paper .character-copy{ color:var(--paper-muted); }
.manual-meta .meta-pill{
  color:#eef1ff;
  background:rgba(255,255,255,.08);
  border-color:rgba(153,162,225,.24);
}
.manual-feature-list li{
  border:1px dashed rgba(153,162,225,.22);
  background:rgba(255,255,255,.04);
}
.feature-index{
  background:#868de0;
  color:#111526;
}

.characters-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.manual-character {
  min-height: 100%;
}

.character-portrait-image {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.manual-characters-grid {
  align-items: stretch;
}

.manual-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
/* game page fixes: sticky about, optional characters carousel, full-width gallery */
.manual-lower-grid{
  display:grid;
  grid-template-columns:minmax(280px, .42fr) minmax(0, .58fr);
  gap:24px;
  align-items:start;
  margin-top:24px;
}

.manual-lower-main,
.manual-lower-side{
  min-width:0;
}

.paper-story-sticky{
  position:sticky;
  top:24px;
  height:auto;
  align-self:start;
}

.paper-story-sticky p:last-child,
.paper-cast .character-copy p:last-child,
.gallery-caption:last-child{
  margin-bottom:0;
}

.characters-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.characters-controls{
  display:flex;
  gap:10px;
  flex-shrink:0;
}

.characters-controls[hidden]{
  display:none;
}

.characters-nav{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(153,162,225,.24);
  background:rgba(255,255,255,.06);
  color:var(--paper-text);
  cursor:pointer;
}

.characters-nav:hover{
  background:rgba(255,255,255,.12);
}

.characters-scroller{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(240px, 320px);
  gap:18px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:8px;
  scroll-snap-type:x proximity;
  scrollbar-width:thin;
}

.characters-scroller > *{
  scroll-snap-align:start;
}

.manual-character{
  min-height:100%;
}

.character-portrait-image{
  display:block;
  width:100%;
  height:320px;
  object-fit:cover;
  border-radius:16px;
  margin-bottom:14px;
  background:rgba(255,255,255,.04);
}

.character-portrait-image.is-gradient{
  background-size:cover;
  background-position:center;
}

.manual-gallery-band{
  width:100%;
  margin-top:28px;
}

.manual-gallery-band-inner{
  width:min(100%, 100vw);
  margin-left:50%;
  transform:translateX(-50%);
  padding:0 clamp(16px, 3vw, 32px) 32px;
}

.manual-gallery-heading{
  width:var(--content-width);
  max-width:100%;
  margin:0 auto 18px;
}

.manual-gallery-heading h2{
  margin:8px 0 0;
  font-size:clamp(1.8rem, 4vw, 2.4rem);
}

.manual-gallery-grid{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(420px, 72vw);
  gap:18px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:4px clamp(0px, 1vw, 8px) 10px;
  scroll-snap-type:x proximity;
  scrollbar-width:thin;
}

.manual-shot{
  padding: 0;
  position:relative;
  min-height:clamp(320px, 42vw, 520px);
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.04);
  scroll-snap-align:start;
}

.gallery-art{
  position:relative;
  min-height:inherit;
  background-position:center;
  background-size:cover;
}

.gallery-art::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(6,10,18,.06) 0%, rgba(6,10,18,.12) 35%, rgba(6,10,18,.72) 100%);
}

.gallery-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:1;
  padding:24px;
}

.gallery-caption{
  max-width:min(420px, 85%);
  margin:0;
  color:#eef1ff;
}

.gallery-caption strong{
  display:block;
  margin-bottom:8px;
  color:#fff;
  font-size:1.05rem;
}

.gallery-caption span{
  display:block;
  color:rgba(238,241,255,.86);
  line-height:1.65;
}

@media (max-width: 1260px){
  .manual-lower-grid{
    grid-template-columns:1fr;
  }

  .paper-story-sticky{
    position:relative;
    top:auto;
  }
}

@media (max-width: 780px){
  .characters-scroller{
    grid-auto-columns:minmax(220px, 82vw);
  }

  .manual-gallery-grid{
    grid-auto-columns:minmax(280px, 88vw);
  }

  .gallery-overlay{
    padding:18px;
  }

  .gallery-caption{
    max-width:100%;
  }
}


.gallery-trigger{
  display:block;
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}

.manual-shot{
  min-height:auto;
  aspect-ratio:16 / 9;
}

.gallery-art{
  min-height:0;
  height:100%;
}

.gallery-image,
.gallery-image-fallback{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.gallery-image-fallback{
  background:linear-gradient(145deg, #122844, #2d7dba 45%, #7140e6);
}

.gallery-trigger:hover .gallery-image,
.gallery-trigger:focus-visible .gallery-image{
  transform:scale(1.02);
}

.gallery-image{
  transition:transform 240ms ease;
}

.gallery-lightbox[hidden]{
  display:none;
}

.gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:120;
}

.gallery-lightbox-backdrop{
  position:absolute;
  inset:0;
  border:0;
  background:rgba(5, 8, 16, .82);
  backdrop-filter:blur(8px);
  cursor:pointer;
}

.gallery-lightbox-dialog{
  position:relative;
  z-index:1;
  width:min(1100px, calc(100vw - 32px));
  margin:clamp(16px, 4vh, 32px) auto;
}

.gallery-lightbox-close{
  position:absolute;
  top:12px;
  right:12px;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(12,16,28,.72);
  color:#fff;
  cursor:pointer;
  z-index:2;
}

.gallery-lightbox-figure{
  margin:0;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(12,16,28,.94);
  box-shadow:0 30px 80px rgba(0,0,0,.45);
}

.gallery-lightbox-image{
  display:block;
  width:100%;
  aspect-ratio:16 / 9;
  object-fit:contain;
  background:#070b14;
}

.gallery-lightbox-caption{
  display:grid;
  gap:8px;
  padding:18px 20px 22px;
  color:#eef1ff;
}

.gallery-lightbox-caption strong{
  font-size:1.05rem;
}

.gallery-lightbox-caption span{
  color:rgba(238,241,255,.82);
  line-height:1.65;
}

body.lightbox-open{
  overflow:hidden;
}

/* Gallery wrap + charted heading */
.manual-gallery-band{
  width:min(100%, var(--content-width));
  margin:28px auto 0;
}

.manual-gallery-band-inner.manual-gallery-sheet{
  width:100%;
  margin:0;
  transform:none;
  padding:clamp(22px, 3vw, 30px);
}

.manual-gallery-heading{
  width:100%;
  margin:0 0 22px;
}

.manual-gallery-heading .paper-kicker{
  display:inline-block;
  margin-bottom:10px;
}

.manual-gallery-heading h2{
  margin:0;
  font-size:clamp(1.8rem, 4vw, 2.35rem);
  line-height:1;
}

.manual-gallery-grid{
  display:grid;
  grid-auto-flow:row;
  grid-auto-columns:auto;
  grid-template-columns:repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap:18px;
  overflow:visible;
  padding:0;
  scroll-snap-type:none;
}

.manual-shot{
  min-height:auto;
  aspect-ratio:16 / 9;
}

@media (max-width: 780px){
  .manual-gallery-band{
    width:100%;
  }

  .manual-gallery-band-inner.manual-gallery-sheet{
    padding:22px 18px;
  }

  .manual-gallery-grid{
    grid-template-columns:1fr;
  }
}
