:root {
  --bg: #050509;
  --bg-soft: #0d0e14;
  --panel: rgba(19, 21, 31, 0.78);
  --panel-solid: #151722;
  --text: #f6f3ec;
  --muted: #a8a8b3;
  --line: rgba(255,255,255,0.12);
  --red: #e50914;
  --gold: #c9a66b;
  --blue: #7cb7ff;
  --shadow: 0 30px 80px rgba(0,0,0,0.55);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 0%, #15172a 0%, var(--bg) 42%, #020204 100%);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: linear-gradient(to bottom, rgba(0,0,0,.86), rgba(0,0,0,0));
}
.site-header.compact { background: rgba(5,5,9,.86); backdrop-filter: blur(18px); }
.brand { font-weight: 900; letter-spacing: .08em; font-size: 16px; }
.brand span { color: var(--red); }
nav { display: flex; gap: 26px; color: #dedee8; font-size: 14px; }
nav a { opacity: .82; }
nav a:hover { opacity: 1; color: #fff; }

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 150px 48px 70px;
  overflow: hidden;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #050509;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(5,5,9,.96) 0%, rgba(5,5,9,.68) 44%, rgba(5,5,9,.12) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(5,5,9,0) 42%),
    url('images/hero-background.svg') center/cover no-repeat;
  transform: scale(1.02);
}
.video-hero:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to right, rgba(5,5,9,.96) 0%, rgba(5,5,9,.62) 42%, rgba(5,5,9,.16) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(5,5,9,0) 45%),
    radial-gradient(circle at 78% 30%, rgba(229,9,20,.18), transparent 30%);
}
.fallback-bg { z-index: -1; }
.hero-content { position: relative; z-index: 1; max-width: 820px; }
.eyebrow, .mini-label { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
h1 { margin: 12px 0 18px; font-size: clamp(48px, 8vw, 108px); line-height: .88; letter-spacing: -.06em; }
h1 span { color: var(--red); }
.hero-copy { color: #e5e1d7; font-size: clamp(18px, 2vw, 23px); line-height: 1.45; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 800; border: 1px solid var(--line); transition: transform .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--red); border-color: var(--red); color: white; }
.btn.secondary { background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; color: var(--muted); }
.meta-row span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.055); }

.section { padding: 46px 48px 72px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section h2 { font-size: clamp(28px, 4vw, 48px); margin: 0 0 10px; letter-spacing: -.04em; }
.section p { color: var(--muted); line-height: 1.65; max-width: 680px; }
.trailer-frame { border-radius: 30px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.trailer-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.episode-rail-section { padding-right: 0; }
.rail-title { padding-right: 48px; }
.rail-controls { display: flex; gap: 10px; flex-shrink: 0; }
.rail-btn { width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.1); color: white; font-size: 34px; line-height: 1; cursor: pointer; }
.rail-btn:hover { background: rgba(229,9,20,.8); }
.rail-shell { position: relative; overflow: hidden; }
.episode-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 22vw); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 48px 28px 0; scrollbar-width: none; }
.episode-rail::-webkit-scrollbar { display: none; }
.episode-card { min-height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; transition: transform .22s ease, border-color .22s ease; scroll-snap-align: start; }
.episode-card:hover { transform: translateY(-7px) scale(1.01); border-color: rgba(229,9,20,.7); }
.episode-card-image { height: 210px; background-size: cover; background-position: center; position: relative; }
.episode-card-image:after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--panel-solid), transparent 65%); }
.episode-card-content { padding: 18px; }
.episode-card h3 { margin: 10px 0 8px; font-size: 22px; }
.episode-card p { font-size: 14px; line-height: 1.55; margin: 0; color: #c9c9d2; }
.card-meta { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: rgba(229,9,20,.16); color: #ffb0b4; border: 1px solid rgba(229,9,20,.35); font-size: 12px; font-weight: 800; }
.pill.muted { background: rgba(255,255,255,.08); color: #cacad6; border-color: var(--line); }
.split-section { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: start; }
.lore-preview, .cast-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.lore-card, .cast-card { padding: 18px; border-radius: 18px; background: rgba(255,255,255,.055); border: 1px solid var(--line); }
.lore-card h3, .cast-card h3 { margin: 0 0 8px; }
.cast-card { overflow: hidden; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.cast-card:hover { transform: translateY(-4px); border-color: rgba(229,9,20,.48); background: rgba(255,255,255,.075); }
.cast-portraits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: -6px -6px 16px; }
.cast-portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #232536, #4a2030); border: 1px solid rgba(255,255,255,.10); }
.cast-portrait.character { background: linear-gradient(135deg, #192033, #3d5670); }
.cast-portrait.actor { background: linear-gradient(135deg, #2c1d28, #654050); }
.cast-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-portrait span { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(0,0,0,.58); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(8px); }
.cast-copy p { margin: 0; color: var(--muted); }


.makers-section { padding-top: 30px; }
.makers-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.maker-card { min-height: 430px; border-radius: 30px; overflow: hidden; background: rgba(255,255,255,.055); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; grid-template-columns: .85fr 1fr; }
.maker-image { min-height: 100%; background-size: cover; background-position: center; position: relative; }
.maker-image:after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(5,5,9,0), rgba(5,5,9,.18)); }
.maker-copy { padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.maker-copy h3 { margin: 10px 0 12px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
.maker-copy p { color: #d7d4dd; line-height: 1.7; margin: 0; }

.pitch-box { margin: 0 48px 70px; padding: 34px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-radius: 28px; background: linear-gradient(135deg, rgba(229,9,20,.22), rgba(124,183,255,.1)); border: 1px solid var(--line); }

.episode-hero { position: relative; min-height: 55vh; display: flex; align-items: flex-end; padding: 120px 48px 48px; overflow: hidden; }
.episode-backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; }
.episode-backdrop:after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(5,5,9,.96), rgba(5,5,9,.48)), linear-gradient(to top, var(--bg), transparent 55%); }
.episode-info { position: relative; z-index: 1; max-width: 820px; }
.episode-info h1 { font-size: clamp(46px, 7vw, 84px); }
.episode-info p { color: #dfdce2; font-size: 19px; line-height: 1.55; }
.player-shell { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(340px, .8fr); gap: 22px; padding: 0 48px 50px; margin-top: -18px; position: relative; z-index: 5; }
.player-panel, .xray-panel { border-radius: 28px; background: rgba(18,20,30,.86); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(18px); padding: 24px; }
.player-topline, .xray-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
audio { width: 100%; accent-color: var(--red); }
.audio-note { color: var(--muted); font-size: 13px; }
.xray-panel { min-height: 290px; }
.xray-panel h2 { margin: 5px 0 0; font-size: 30px; }
.xray-panel p { color: #dedee8; line-height: 1.65; }
.xray-extra { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.episode-details { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #eee; border-radius: 999px; padding: 9px 12px; }

@media (max-width: 1100px) {
  .player-shell, .split-section, .episode-details, .makers-grid, .maker-card { grid-template-columns: 1fr; }
  .maker-image { min-height: 360px; }
  .episode-rail { grid-auto-columns: minmax(270px, 36vw); }
}
@media (max-width: 680px) {
  .site-header { padding: 18px 22px; }
  nav { display: none; }
  .hero, .section, .episode-hero, .player-shell { padding-left: 22px; padding-right: 22px; }
  .rail-title { padding-right: 22px; align-items: flex-start; }
  .episode-rail { grid-auto-columns: 82vw; padding-right: 22px; }
  .lore-preview, .cast-grid, .makers-grid { grid-template-columns: 1fr; }
  .maker-card { min-height: auto; }
  .maker-image { min-height: 320px; }
  .maker-copy { padding: 24px; }
  .pitch-box { margin-left: 22px; margin-right: 22px; flex-direction: column; align-items: flex-start; }
}

/* v0.5 — Storyworld Update */
.hero-bg {
  background:
    linear-gradient(to right, rgba(5,5,9,.96) 0%, rgba(5,5,9,.68) 44%, rgba(5,5,9,.12) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(5,5,9,0) 42%),
    url('images/hero-background.png') center/cover no-repeat;
}
.world-section { padding-top: 54px; }
.world-title p { max-width: 880px; }
.world-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding: 2px 0 26px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.world-gallery::-webkit-scrollbar { display: none; }
.mood-card {
  min-width: 280px;
  min-height: 430px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  scroll-snap-align: start;
  transition: transform .22s ease, border-color .22s ease;
}
.mood-card:hover { transform: translateY(-6px); border-color: rgba(201,166,107,.55); }
.mood-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.04) contrast(1.03);
}
.mood-card:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,9,.95) 0%, rgba(5,5,9,.62) 38%, rgba(5,5,9,.1) 72%);
}
.mood-copy {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
}
.mood-copy h3 { margin: 8px 0 8px; font-size: 23px; letter-spacing: -.03em; }
.mood-copy p { margin: 0; color: #d8d5df; font-size: 14px; line-height: 1.55; }
.lore-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.lore-card .mini-label { display: inline-block; margin-bottom: 10px; }

@media (max-width: 1100px) {
  .world-gallery { grid-template-columns: repeat(6, minmax(280px, 1fr)); }
  .lore-wide { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .world-gallery { padding-right: 22px; }
  .lore-wide { grid-template-columns: 1fr; }
}


/* V07 · SHM Tech Demo */
.tech-section { position: relative; }
.tech-title .eyebrow { margin-bottom: 0.65rem; }

.shm-lab {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 1.6rem;
  align-items: stretch;
  padding: 1.2rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 28%, rgba(250, 196, 90, 0.22), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(63, 198, 255, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: 0 28px 80px rgba(0,0,0,0.38);
  overflow: hidden;
}

.shm-device {
  min-height: 420px;
  border-radius: 24px;
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(8,10,16,0.2), rgba(8,10,16,0.72)),
    radial-gradient(circle at center, rgba(255,185,75,0.22), transparent 42%),
    radial-gradient(circle at 64% 20%, rgba(35,179,255,0.16), transparent 30%);
  border: 1px solid rgba(255,255,255,0.1);
}

.shm-core {
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  color: #fff6d8;
  letter-spacing: 0.28em;
  font-weight: 800;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)),
    radial-gradient(circle at 50% 18%, rgba(255,208,105,0.88), rgba(213,126,24,0.22) 46%, rgba(0,0,0,0.28) 74%);
  border: 1px solid rgba(255,213,117,0.55);
  box-shadow: 0 0 44px rgba(255,181,58,0.42), inset 0 0 28px rgba(255,222,136,0.16);
  position: relative;
  z-index: 3;
}

.shm-core::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.32);
}

.shm-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,196,86,0.4);
  box-shadow: 0 0 30px rgba(255,183,62,0.18);
  animation: shmPulse 4.2s ease-in-out infinite;
}

.orbit-one { width: 245px; height: 245px; }
.orbit-two { width: 330px; height: 330px; border-color: rgba(74,203,255,0.28); animation-delay: -1.4s; }

@keyframes shmPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.55; }
  50% { transform: scale(1.04); opacity: 1; }
}

.shm-panel {
  border-radius: 24px;
  padding: 1.3rem;
  background: rgba(5,7,13,0.56);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.shm-screen {
  min-height: 166px;
  border-radius: 22px;
  padding: 1.2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), rgba(0,0,0,0.34);
  border: 1px solid rgba(255,255,255,0.1);
}

.shm-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f7c96b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.signal-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #72e6ff;
  box-shadow: 0 0 16px rgba(114,230,255,0.9);
}

#shmOutput {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  line-height: 1.45;
}

.shm-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.shm-filter {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
  border-radius: 999px;
  padding: 0.72rem 0.95rem;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.shm-filter:hover, .shm-filter.active {
  transform: translateY(-1px);
  border-color: rgba(255,205,96,0.7);
  background: rgba(255,188,66,0.16);
  color: #fff;
}

.shm-slider-wrap { display: grid; gap: 0.55rem; color: rgba(255,255,255,0.72); }
.shm-slider-wrap label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; }
#shmIntensity { width: 100%; accent-color: #f7bd4b; }

.shm-meter {
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

.shm-meter span {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5dd9ff, #f7bd4b);
  box-shadow: 0 0 18px rgba(247,189,75,0.45);
}

.shm-caption { color: rgba(255,255,255,0.64); font-size: 0.94rem; line-height: 1.55; }
.shm-caption strong { color: rgba(255,255,255,0.86); }

@media (max-width: 860px) {
  .shm-lab { grid-template-columns: 1fr; }
  .shm-device { min-height: 280px; }
}


/* V09 · SHM real function upgrade */
.shm-lab-v2 .shm-core {
  background: transparent;
  border: none;
  box-shadow: none;
  width: min(78%, 420px);
  height: auto;
  border-radius: 0;
  letter-spacing: normal;
}

.shm-lab-v2 .shm-core::before {
  display: none;
}

.shm-core-image img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 45px rgba(0,0,0,0.58));
}

.shm-controls-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.75rem;
}

.shm-controls-v2 .shm-filter {
  border-radius: 18px;
  padding: 0.82rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: flex-start;
}

.shm-filter strong {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  color: #fff;
  flex: 0 0 auto;
}

.shm-filter span {
  font-size: 0.98rem;
}

.shm-filter-f strong { background: rgba(62,162,255,0.24); border: 1px solid rgba(62,162,255,0.72); box-shadow: 0 0 16px rgba(62,162,255,0.35); }
.shm-filter-b strong { background: rgba(255,88,88,0.22); border: 1px solid rgba(255,88,88,0.72); box-shadow: 0 0 16px rgba(255,88,88,0.30); }
.shm-filter-a strong { background: rgba(255,216,77,0.22); border: 1px solid rgba(255,216,77,0.72); box-shadow: 0 0 16px rgba(255,216,77,0.32); color: #fff1ae; }
.shm-filter-s strong { background: rgba(87,228,106,0.20); border: 1px solid rgba(87,228,106,0.70); box-shadow: 0 0 16px rgba(87,228,106,0.28); }

.shm-filter-f.active, .shm-filter-f:hover { border-color: rgba(62,162,255,0.75); background: rgba(62,162,255,0.14); }
.shm-filter-b.active, .shm-filter-b:hover { border-color: rgba(255,88,88,0.75); background: rgba(255,88,88,0.14); }
.shm-filter-a.active, .shm-filter-a:hover { border-color: rgba(255,216,77,0.75); background: rgba(255,216,77,0.14); }
.shm-filter-s.active, .shm-filter-s:hover { border-color: rgba(87,228,106,0.75); background: rgba(87,228,106,0.14); }

.shm-example,
.shm-response {
  border-radius: 22px;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), rgba(0,0,0,0.34);
  border: 1px solid rgba(255,255,255,0.1);
}

.shm-example-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.58);
  margin-bottom: 0.5rem;
}

.shm-example blockquote {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: 1.04rem;
  line-height: 1.55;
  font-style: italic;
}

#shmResponse {
  margin: 0;
  color: rgba(255,255,255,0.9);
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
  line-height: 1.45;
}

@media (max-width: 560px) {
  .shm-controls-v2 {
    grid-template-columns: 1fr;
  }
}


/* V10 · Contact Section */
.contact-section {
  padding-top: clamp(3rem, 7vw, 6rem);
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 196, 90, 0.18), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(74, 203, 255, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}

.contact-card h2 {
  margin: 0 0 0.7rem;
}

.contact-card p {
  margin: 0;
  max-width: 680px;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .contact-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

/* World Modal · Explainer Video Pop-up */
.mood-card.has-video {
  cursor: pointer;
}

.mood-card.has-video::before {
  content: "▶ Explainer";
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.58);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  opacity: 0.86;
}

.mood-card.has-video:hover::before {
  border-color: rgba(201,166,107,.65);
  background: rgba(201,166,107,.18);
}

.world-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.world-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.world-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(14px);
}

.world-modal-card {
  position: relative;
  width: min(980px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at 50% 0%, rgba(201,166,107,0.14), transparent 38%),
    rgba(5,7,12,0.96);
  box-shadow: 0 30px 100px rgba(0,0,0,0.62);
  transform: translateY(10px) scale(.985);
  transition: transform 220ms ease;
}

.world-modal.open .world-modal-card {
  transform: translateY(0) scale(1);
}

.world-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  background: rgba(0,0,0,0.52);
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.world-modal-close:hover {
  border-color: rgba(201,166,107,.7);
  background: rgba(201,166,107,.18);
}

.world-modal-video-wrap {
  width: 100%;
  background: #000;
  border-radius: 30px 30px 0 0;
  overflow: hidden;
}

.world-modal-video-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.world-modal-content {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.world-modal-content h2 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: -0.045em;
}

.world-modal-content p {
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  max-width: 760px;
}

body.world-modal-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .world-modal {
    padding: 0.75rem;
  }

  .world-modal-card {
    max-height: 88vh;
    border-radius: 24px;
  }

  .world-modal-video-wrap {
    border-radius: 24px 24px 0 0;
  }

  .world-modal-close {
    top: 0.65rem;
    right: 0.65rem;
  }
}

/* Lore Cards · Mood Image + Audio Explainer */
.lore-card-media {
  overflow: hidden;
  padding: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 190px;
}

.lore-card-image {
  min-height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.lore-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(5,5,9,0.04), rgba(5,5,9,0.58)),
    linear-gradient(to top, rgba(5,5,9,0.55), transparent 64%);
}

.lore-card-body {
  padding: 18px;
  min-width: 0;
}

.lore-card-media h3 {
  margin: 0 0 8px;
}

.lore-card-media p {
  margin: 0;
}

.lore-audio {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.lore-audio span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 900;
}

.lore-audio audio {
  width: 100%;
  height: 34px;
  accent-color: var(--red);
}

@media (max-width: 900px) {
  .lore-card-media {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .lore-card-media {
    grid-template-columns: 1fr;
  }

  .lore-card-image {
    min-height: 160px;
  }
}

/* Lore Audio · Custom ComTool Mini Player */
.lore-audio-ui {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.lore-audio-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.12), transparent 48%),
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025));
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  box-shadow:
    inset 0 0 18px rgba(255,255,255,0.025),
    0 12px 28px rgba(0,0,0,0.22);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.lore-audio-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(201,166,107,0.70);
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.16), transparent 48%),
    linear-gradient(145deg, rgba(201,166,107,0.16), rgba(255,255,255,0.035));
  box-shadow:
    inset 0 0 18px rgba(255,255,255,0.035),
    0 0 22px rgba(201,166,107,0.18),
    0 12px 28px rgba(0,0,0,0.24);
}

.lore-audio-btn.play {
  color: rgba(125, 218, 255, 0.96);
}

.lore-audio-btn.stop {
  color: rgba(242, 195, 107, 0.96);
}

.lore-audio-ui.is-playing .lore-audio-btn.play {
  border-color: rgba(125, 218, 255, 0.78);
  background:
    radial-gradient(circle at 50% 30%, rgba(125, 218, 255, 0.24), transparent 54%),
    linear-gradient(145deg, rgba(125,218,255,0.13), rgba(255,255,255,0.025));
  box-shadow:
    0 0 24px rgba(125,218,255,0.24),
    inset 0 0 18px rgba(125,218,255,0.08);
}

.lore-audio-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 9px 11px;
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.58);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.lore-audio-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lore-audio-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 rgba(125,218,255,0);
}

.lore-audio-ui.is-playing .lore-audio-dot {
  background: rgba(125, 218, 255, 0.98);
  box-shadow: 0 0 16px rgba(125,218,255,0.9);
  animation: loreAudioPulse 1.4s ease-in-out infinite;
}

@keyframes loreAudioPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.72; }
  50% { transform: scale(1.18); opacity: 1; }
}

.lore-audio-ui audio {
  display: none;
}

/* Hide previous native lore audio styling if older CSS is still present */
.lore-audio {
  display: none;
}

@media (max-width: 560px) {
  .lore-audio-ui {
    grid-template-columns: 40px 40px minmax(0, 1fr);
    gap: 8px;
  }

  .lore-audio-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .lore-audio-status {
    font-size: 0.62rem;
    padding: 8px 10px;
  }
}

/* Episode Smart Player · Chapters + Listen Modes */
.smart-player-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
  gap: 22px;
  padding: 0 48px 50px;
  margin-top: -18px;
  position: relative;
  z-index: 5;
}

.smart-player-panel,
.chapter-panel {
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(201,166,107,.11), transparent 36%),
    rgba(18,20,30,.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
}

.smart-player-topline,
.chapter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.smart-player-topline h2,
.chapter-header h2 {
  margin: 5px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -.04em;
}

.smart-time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  margin-top: 5px;
}

.listen-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.listen-mode {
  text-align: left;
  border: 1px solid rgba(255,255,255,.13);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.08), transparent 52%),
    rgba(255,255,255,.045);
  color: rgba(255,255,255,.82);
  border-radius: 18px;
  padding: 13px 14px;
  cursor: pointer;
  font: inherit;
  display: grid;
  gap: 4px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.listen-mode strong { color: #fff; font-size: 14px; }
.listen-mode span { color: var(--muted); font-size: 12px; }

.listen-mode:hover,
.listen-mode.active {
  transform: translateY(-1px);
  border-color: rgba(201,166,107,.65);
  background:
    radial-gradient(circle at 50% 0%, rgba(201,166,107,.18), transparent 58%),
    rgba(255,255,255,.065);
  box-shadow: 0 0 22px rgba(201,166,107,.12);
}

.smart-transport {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 18px 0 22px;
}

.smart-play-btn {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 50% 25%, rgba(124,183,255,.24), transparent 52%),
    linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(255,255,255,.035), 0 14px 32px rgba(0,0,0,.28);
}

.smart-play-btn:hover {
  border-color: rgba(124,183,255,.72);
  box-shadow: inset 0 0 18px rgba(124,183,255,.08), 0 0 24px rgba(124,183,255,.18), 0 14px 32px rgba(0,0,0,.28);
}

.smart-timeline { position: relative; height: 18px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); cursor: pointer; overflow: visible; box-shadow: inset 0 0 18px rgba(0,0,0,.24); }
.smart-timeline:focus { outline: 2px solid rgba(201,166,107,.42); outline-offset: 5px; }
.smart-progress { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: inherit; background: linear-gradient(90deg, rgba(124,183,255,.92), rgba(201,166,107,.94)); box-shadow: 0 0 20px rgba(201,166,107,.25); pointer-events: none; }
.chapter-markers { position: absolute; inset: 0; pointer-events: none; }
.chapter-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 13px; height: 28px; border-radius: 999px; border: 1px solid rgba(255,255,255,.34); background: rgba(5,5,9,.86); cursor: pointer; pointer-events: auto; box-shadow: 0 0 15px rgba(201,166,107,.18); }
.chapter-marker:hover { border-color: rgba(201,166,107,.85); background: rgba(201,166,107,.28); }

.smart-current-chapter { border-radius: 22px; padding: 18px; background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025)), rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.10); }
.smart-current-chapter strong { display: block; margin: 6px 0 6px; font-size: clamp(18px, 2.2vw, 25px); }
.smart-current-chapter p { margin: 0; color: rgba(255,255,255,.68); line-height: 1.55; }

.chapter-panel { min-height: 320px; }
.chapter-list { display: grid; gap: 10px; }
.chapter-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; width: 100%; text-align: left; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.045); color: #fff; border-radius: 18px; padding: 12px; cursor: pointer; font: inherit; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.chapter-item:hover, .chapter-item.active { transform: translateY(-1px); border-color: rgba(201,166,107,.62); background: rgba(201,166,107,.095); }
.chapter-time { color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .08em; margin-top: 2px; }
.chapter-copy { min-width: 0; display: grid; gap: 4px; }
.chapter-copy strong { font-size: 15px; line-height: 1.2; }
.chapter-copy small { color: var(--muted); line-height: 1.35; }
.chapter-empty { color: var(--muted); border: 1px dashed rgba(255,255,255,.16); border-radius: 18px; padding: 1rem; }

@media (max-width: 1100px) {
  .smart-player-shell { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .smart-player-shell { padding-left: 22px; padding-right: 22px; }
  .listen-mode-switch { grid-template-columns: 1fr; }
  .smart-transport { grid-template-columns: 50px minmax(0, 1fr); gap: 12px; }
  .smart-play-btn { width: 50px; height: 50px; border-radius: 17px; }
  .chapter-item { grid-template-columns: 52px minmax(0, 1fr); }
}



/* Stage 2: Seasons, DRT shelf, treasury and support */
.season-block{margin:1.6rem 0 2.8rem}.season-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.season-header h3{font-size:clamp(1.45rem,3vw,2.2rem);margin:.25rem 0}.season-header p{margin:0;opacity:.7}.season-header .eyebrow{letter-spacing:.22em}
.drt-shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(.5rem,1.5vw,1.25rem);padding:clamp(.65rem,2vw,1.75rem);border:1px solid rgba(139,202,225,.23);background:linear-gradient(160deg,rgba(38,69,86,.35),rgba(8,20,31,.8));box-shadow:inset 0 0 35px rgba(97,178,205,.08);border-radius:16px}.drt-slot{min-width:0;min-height:145px;border:1px solid rgba(132,201,221,.29);border-radius:9px;background:linear-gradient(150deg,rgba(57,94,112,.33),rgba(8,23,32,.55));color:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:12px 6px;cursor:pointer;transition:transform .2s,border-color .2s}.drt-slot.is-filled:hover,.drt-slot.is-filled:focus-visible{transform:translateY(-5px);border-color:#8ad7e8}.drt-slot.is-empty{opacity:.38;cursor:default;border-style:dashed}.drt-slot strong{font-size:.76rem;text-align:center;overflow-wrap:anywhere}.drt-slot small{font-size:.66rem;letter-spacing:.16em;opacity:.6}.drt-cartridge{width:56px;height:70px;border:1px solid #9dd6df;border-radius:6px;background:linear-gradient(130deg,rgba(109,199,208,.24),rgba(17,33,49,.7));display:flex;align-items:center;justify-content:center;font-size:.7rem;letter-spacing:.09em;box-shadow:inset 0 0 14px rgba(95,191,203,.18)}.drt-reader[hidden]{display:none}.drt-reader{margin-top:2rem;border:1px solid rgba(136,206,225,.35);border-radius:16px;background:rgba(9,24,37,.95);padding:clamp(1rem,3vw,2rem)}.drt-reader-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.drt-reader h3{margin:.5rem 0}.drt-kicker,.drt-tag{color:#9acdd9;letter-spacing:.1em}.drt-close{background:transparent;color:inherit;border:1px solid currentColor;border-radius:5px;padding:.6rem .8rem;cursor:pointer}.drt-image{display:block;max-width:100%;max-height:480px;object-fit:contain;margin:1.2rem auto;border-radius:8px}.drt-player{width:100%;max-height:520px;margin:1rem 0}.treasury-section .tech-title h3{margin-top:1rem}.contact-card p+p{margin-top:1rem}
@media(max-width:650px){.drt-shelf{grid-template-columns:repeat(3,minmax(0,1fr))}.drt-slot{min-height:125px}.season-header{align-items:flex-end}.season-header .rail-controls{flex-shrink:0}}
@media(prefers-reduced-motion:reduce){.drt-slot{transition:none}}

/* Stage 3: Joyce's treasury, artwork slots and Pay it Forward */
.treasury-wall{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(8px,1.4vw,18px);padding:clamp(12px,2.5vw,28px);margin:1.4rem 0;background:linear-gradient(150deg,rgba(225,229,229,.12),rgba(17,28,39,.8));border:1px solid rgba(222,227,230,.25);border-radius:16px;box-shadow:inset 0 0 45px rgba(230,237,248,.045)}
.treasury-exhibit{min-width:0;color:inherit;min-height:180px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:8px;padding:10px 5px 13px;border:1px solid rgba(203,218,225,.21);border-radius:9px;background:linear-gradient(180deg,rgba(222,235,239,.075),rgba(12,24,33,.62));font:inherit;cursor:pointer;transition:transform .2s,border-color .2s}
.treasury-exhibit.is-occupied:hover,.treasury-exhibit.is-occupied:focus-visible{transform:translateY(-4px);border-color:rgba(228,201,146,.85)}.treasury-exhibit.is-vacant{opacity:.23;cursor:default}.treasury-exhibit strong{font-size:clamp(.65rem,1.1vw,.85rem);text-align:center;overflow-wrap:anywhere}.treasury-exhibit small{font-size:.59rem;text-transform:uppercase;letter-spacing:.08em;opacity:.6;text-align:center}
.treasury-case{position:relative;display:grid;place-items:center;width:78%;min-height:94px;max-width:140px;border:1px solid rgba(230,241,244,.42);border-radius:7px;background:linear-gradient(120deg,rgba(218,230,234,.18),rgba(18,38,48,.15) 50%,rgba(255,255,255,.08));box-shadow:inset 0 0 25px rgba(217,235,242,.07),0 6px 20px rgba(0,0,0,.13);overflow:hidden}.treasury-case:before{content:'';position:absolute;top:0;left:22%;width:18%;height:100%;transform:skew(-22deg);background:rgba(255,255,255,.06)}.treasury-object{display:grid;place-items:center;width:49px;height:57px;clip-path:polygon(18% 0,82% 0,100% 25%,100% 75%,82% 100%,18% 100%,0 75%,0 25%);background:linear-gradient(140deg,#c9a66b,#526c7c 65%,#263747);font-weight:800;color:#091722;font-size:.9rem;box-shadow:0 0 20px rgba(201,166,107,.2)}
.treasury-reader[hidden],#treasuryShmDemo[hidden]{display:none!important}.treasury-reader{margin:1.5rem 0;padding:clamp(16px,3vw,30px);background:rgba(11,27,37,.96);border:1px solid rgba(201,166,107,.5);border-radius:16px}.treasury-reader-head{display:flex;align-items:start;justify-content:space-between;gap:1rem}.treasury-reader-head h3{font-size:clamp(1.4rem,3vw,2rem);margin:.45rem 0}.treasury-kicker{letter-spacing:.16em;color:#d4b682}.treasury-close{border:1px solid rgba(255,255,255,.4);background:transparent;color:inherit;border-radius:8px;padding:.7rem;cursor:pointer}.treasury-art-dummy{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;max-width:360px;min-height:165px;margin:20px auto;border:1px solid rgba(201,166,107,.34);border-radius:12px;background:radial-gradient(circle at 50% 30%,rgba(201,166,107,.16),transparent 66%),rgba(255,255,255,.025);text-align:center}.treasury-art-dummy span{color:#d4b682;letter-spacing:.1em;font-size:.7rem}.treasury-art-dummy strong{font-size:1.4rem}.treasury-art-image{display:block;max-width:100%;max-height:280px;object-fit:contain}.treasury-description{max-width:66ch;line-height:1.75}.treasury-media{display:block;max-width:100%;width:100%;margin:1rem 0}.treasury-try-shm{display:inline-flex;margin:1rem 0}#treasuryShmDemo{margin-top:2rem}
.drt-shelf-art{width:100%;height:100%;object-fit:contain;border-radius:5px}.drt-cartridge:has(.drt-shelf-art){padding:2px}
.support-card{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:clamp(18px,3vw,45px);align-items:start}.support-intro h2{font-size:clamp(1.65rem,3.5vw,3.3rem);line-height:1.1}.support-intro p{max-width:65ch;line-height:1.65}.support-partners{display:grid;gap:10px}.support-partner{display:grid;gap:5px;padding:16px;border:1px solid rgba(201,166,107,.22);background:rgba(255,255,255,.035);border-radius:12px}.support-partner strong{color:#ecd5ac}.support-partner span{opacity:.78;line-height:1.5;font-size:.88rem}.support-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:12px}
@media(max-width:850px){.treasury-wall{grid-template-columns:repeat(3,minmax(0,1fr))}.support-card{grid-template-columns:1fr}}
@media(max-width:500px){.treasury-wall{grid-template-columns:repeat(2,minmax(0,1fr))}.treasury-exhibit{min-height:145px}.treasury-case{min-height:76px}.treasury-reader-head{flex-direction:column}.support-actions{display:grid}}
@media(prefers-reduced-motion:reduce){.treasury-exhibit{transition:none}}
