:root {
  --bg: #0b1220;
  --bg-soft: #111a2b;
  --bg-panel: rgba(8, 15, 32, 0.78);
  --panel: rgba(255,255,255,0.06);
  --text: #ecf2ff;
  --muted: #aab6d3;
  --line: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.2);
  --accent: #d97706;
  --accent-2: #1d4ed8;
  --accent-soft: rgba(217,119,6,0.16);
  --accent-2-soft: rgba(29,78,216,0.18);
  --shadow: 0 20px 50px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(217,119,6,0.16), transparent 24%),
    radial-gradient(circle at top, rgba(29,78,216,0.15), transparent 28%),
    linear-gradient(180deg, #07101f 0%, #0b1220 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.site-header, .site-footer { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: relative;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff7df;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 10, 24, 0.56);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle span:nth-child(1) { transform: translateY(-6px); }
.nav-toggle span:nth-child(3) { transform: translateY(6px); }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg); }
nav { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
nav a, nav button { color: var(--text); text-decoration: none; background: transparent; border: 0; cursor: pointer; font: inherit; }
nav a {
  position: relative;
  padding-bottom: 0.12rem;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(248,194,109,0), rgba(248,194,109,0.9), rgba(248,194,109,0));
  transform: scaleX(0);
  transition: transform 0.18s ease;
}
nav a:hover::after { transform: scaleX(1); }
.hero-wrap, .dashboard-yard-wrap { position: relative; overflow: hidden; }
.cinematic-hero, .dashboard-yard-wrap { min-height: 92vh; }
#trainCanvas, #yardCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(2,8,23,0.03) 0%, rgba(2,8,23,0.1) 28%, rgba(2,8,23,0.42) 64%, rgba(2,8,23,0.68) 100%),
    radial-gradient(circle at 78% 28%, rgba(255, 196, 110, 0.1), transparent 24%);
  pointer-events: none;
}
.hero { position: relative; z-index: 2; display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; align-items: center; min-height: 88vh; padding: 2rem 0 4rem; }
.hero-train-stage {
  grid-template-columns: minmax(240px, 320px) minmax(320px, 520px);
  justify-content: space-between;
  align-items: start;
  min-height: 100vh;
  padding: 6.5rem 0 13rem;
}
.hero-train-stage .hero-media {
  align-self: end;
  transform: translateY(1.25rem);
}
.hero-train-stage .sales-panel {
  justify-self: end;
  max-width: 470px;
  background: rgba(4, 10, 24, 0.2);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}
.hero-first-person .hero-media {
  opacity: 0.28;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.hero-first-person .sales-panel {
  background: rgba(4, 10, 24, 0.28);
}
.dashboard-panel-wrap {
  position: relative;
  z-index: 2;
  min-height: calc(92vh - 80px);
  display: grid;
  place-items: center;
  padding: 2rem 0 4rem;
}
.dashboard-panel {
  width: min(760px, 100%);
  background:
    linear-gradient(180deg, rgba(13, 22, 44, 0.9) 0%, rgba(7, 14, 29, 0.82) 100%);
  border-color: var(--line-strong);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.product-stack {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.35rem;
}
.glass-panel { background: rgba(4, 10, 24, 0.34); border: 1px solid rgba(255,255,255,0.12); border-radius: 24px; padding: 1.35rem; backdrop-filter: blur(6px); box-shadow: var(--shadow); }
.cover { width: 100%; max-width: 320px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); background: #1a2235; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; color: #f8c26d; font-size: 0.78rem; }
.hero-text h1, .auth-card h1, .section-card h1, .reading-card h1 { font-size: clamp(2.3rem, 5vw, 4.5rem); line-height: 0.95; margin: 0.25rem 0 1rem; }
.section-card h2, .feature-card h3 { margin-top: 0; }
.tagline { font-size: clamp(1.05rem, 2vw, 1.35rem); color: #d7e1f8; max-width: 58ch; }
.hero-text p, .feature-card p, .section-card p, .auth-card p, .reading-card p { color: var(--muted); line-height: 1.8; }
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.btn, .ghost-btn {
  border-radius: 999px; padding: 0.85rem 1.25rem; font-weight: 700; transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: white; background: linear-gradient(135deg, var(--accent), #ea580c); border: 0; cursor: pointer; box-shadow: var(--shadow);
}
.btn.secondary { background: linear-gradient(135deg, #1e3a8a, var(--accent-2)); }
.ghost-btn { border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.btn:hover, .ghost-btn:hover { transform: translateY(-1px); opacity: 0.96; }
.music-start-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  min-height: 3rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,210,126,0.96), rgba(249,115,22,0.94));
  color: #07101f;
  font-weight: 900;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.42),
    0 0 30px rgba(248,194,109,0.28);
  cursor: pointer;
}
.music-start-btn.is-hidden {
  display: none;
}
.music-start-btn-memorial {
  right: 50%;
  top: 4.7rem;
  bottom: auto;
  transform: translateX(50%);
  min-width: min(18rem, calc(100vw - 2rem));
  border-color: rgba(255,255,255,0.32);
  background: linear-gradient(135deg, #ffe65c, #ffb21f);
  color: #111827;
}
.memorial-scroll-top {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: 3.4rem;
  height: 3.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(8, 14, 28, 0.9);
  color: #fff1cc;
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 18px 42px rgba(0,0,0,0.42),
    0 0 24px rgba(248,194,109,0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.55rem);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}
.memorial-scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.memorial-scroll-top:hover {
  background: rgba(17, 27, 48, 0.96);
}
.section-card, .feature-card, .auth-card, .reading-card {
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(8px); border-radius: 24px; box-shadow: var(--shadow);
}
.section-card, .reading-card { padding: 1.6rem; margin: 1.25rem auto; }
.section-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.04));
}
.journey-board {
  display: grid;
  gap: 1.15rem;
  margin-top: -5.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 3;
}
.journey-board h2 {
  max-width: 760px;
  margin: 0.2rem 0 0;
  color: #fff5d8;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.05;
}
.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}
.journey-card {
  min-height: 12.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(3,7,18,0.06), rgba(3,7,18,0.82)),
    var(--journey-image) center / cover;
  box-shadow: 0 22px 48px rgba(0,0,0,0.32);
  isolation: isolate;
}
.journey-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 24% 18%, rgba(255,226,170,0.24), transparent 34%),
    linear-gradient(135deg, rgba(248,194,109,0.18), transparent 42%, rgba(96,165,250,0.14));
  opacity: 0.74;
  transition: opacity 180ms ease, transform 180ms ease;
}
.journey-card:hover::before,
.journey-card:focus-visible::before {
  opacity: 1;
  transform: scale(1.04);
}
.journey-card span {
  color: #f8c26d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.journey-card strong {
  max-width: 13rem;
  color: #fff7df;
  font-size: 1.08rem;
  line-height: 1.2;
}
.journey-card-sample { --journey-image: url("trainmap.jpg"); }
.journey-card-community { --journey-image: url("tracks.jpg"); }
.journey-card-memorial { --journey-image: url("assets/memorial/memorial-62.jpg"); }
.journey-card-board { --journey-image: url("trainyard.jpg"); }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-bottom: 3rem; }
.feature-card {
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.035));
}
.auth-shell, .simple-center { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card {
  width: min(520px, 100%);
  padding: 2rem;
  background:
    linear-gradient(180deg, rgba(13, 22, 44, 0.9) 0%, rgba(7, 14, 29, 0.82) 100%);
}
.auth-card label { display: block; margin: 1rem 0 0.35rem; font-weight: 600; }
.auth-card input {
  width: 100%; padding: 0.9rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--text); outline: none;
}
.auth-card input:focus { border-color: rgba(248,194,109,0.85); }
.signup-ride-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2,6,17,0.24), rgba(2,6,17,0.92)),
    url("tracks.jpg") center / cover;
}
.signup-ride-shell::before,
.signup-ride-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.signup-ride-shell::before {
  background:
    radial-gradient(circle at 50% 38%, rgba(255,234,188,0.38), transparent 11rem),
    radial-gradient(circle at 24% 22%, rgba(96,165,250,0.18), transparent 20rem),
    linear-gradient(100deg, rgba(248,194,109,0.12), transparent 40%, rgba(14,165,233,0.12));
  mix-blend-mode: screen;
}
.signup-ride-shell::after {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 120px),
    linear-gradient(180deg, transparent 0 58%, rgba(0,0,0,0.72));
  opacity: 0.64;
}
.signup-ride-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  perspective: 900px;
}
.rail-sky {
  position: absolute;
  inset: -18% -8% auto;
  height: 58%;
  background:
    radial-gradient(ellipse at center, rgba(255,245,222,0.26), transparent 34%),
    linear-gradient(180deg, rgba(7,16,38,0.18), transparent);
  transform: skewY(-5deg);
}
.rail-light {
  position: absolute;
  width: 34vw;
  height: 18vh;
  min-width: 260px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255,225,169,0.34), rgba(255,225,169,0.06) 46%, transparent 72%);
  filter: blur(10px);
  opacity: 0.74;
}
.rail-light-one {
  --light-tilt: 16deg;
  left: 9%;
  top: 30%;
  transform: rotate(16deg);
}
.rail-light-two {
  --light-tilt: -14deg;
  right: 3%;
  top: 18%;
  transform: rotate(-14deg);
  background: radial-gradient(ellipse at center, rgba(125,211,252,0.26), rgba(125,211,252,0.04) 50%, transparent 72%);
}
.rail-track {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: min(920px, 120vw);
  height: 72vh;
  transform: translateX(-50%) rotateX(64deg);
  transform-origin: center bottom;
  overflow: hidden;
}
.rail-track::before,
.rail-track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,247,219,0.9), rgba(112,79,46,0.72), rgba(255,255,255,0.42));
  box-shadow: 0 0 24px rgba(255,216,151,0.32);
}
.rail-track::before {
  left: 31%;
}
.rail-track::after {
  right: 31%;
}
.rail-track span {
  position: absolute;
  left: 22%;
  right: 22%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,229,176,0.88), transparent);
  box-shadow: 0 0 18px rgba(255,218,150,0.24);
  animation: railRush 1.35s linear infinite;
}
.rail-track span:nth-child(1) {
  animation-delay: -0.68s;
}
.signup-ride-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  border-color: rgba(255,232,187,0.25);
  background:
    linear-gradient(145deg, rgba(255,241,204,0.1), rgba(12,20,38,0.72) 36%, rgba(5,9,20,0.9)),
    rgba(8,14,28,0.86);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.52),
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 55px rgba(248,194,109,0.16);
}
.signup-ride-card h1 {
  max-width: 8ch;
  color: #fff5d8;
  text-shadow: 0 0 28px rgba(248,194,109,0.26);
}
.signup-soundtrack {
  display: grid;
  gap: 0.85rem;
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248,194,109,0.12), rgba(59,130,246,0.08)),
    rgba(255,255,255,0.035);
}
.signup-soundtrack h2 {
  margin: 0.1rem 0 0;
  color: #fff1cc;
  font-size: 1.15rem;
}
.signup-soundtrack .eyebrow {
  margin: 0;
}
.signup-soundtrack audio {
  width: 100%;
}
.signup-ride-moving .rail-track span {
  animation-duration: 0.76s;
}
.signup-ride-moving .rail-light {
  animation: headlightPulse 2.8s ease-in-out infinite;
}
.login-return-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.08), rgba(2,6,17,0.88) 64%, rgba(0,0,0,0.96)),
    url("trainyard.jpg") center / cover;
}
.login-return-shell::before,
.login-return-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-return-shell::before {
  background:
    radial-gradient(circle at 50% 12%, rgba(255,240,203,0.34), transparent 11rem),
    radial-gradient(circle at 18% 48%, rgba(248,194,109,0.2), transparent 20rem),
    radial-gradient(circle at 78% 44%, rgba(96,165,250,0.2), transparent 22rem),
    linear-gradient(120deg, rgba(248,194,109,0.12), transparent 38%, rgba(14,165,233,0.14));
  mix-blend-mode: screen;
}
.login-return-shell::after {
  background:
    repeating-linear-gradient(100deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 94px),
    linear-gradient(180deg, transparent 0 58%, rgba(0,0,0,0.76));
  opacity: 0.72;
}
.login-return-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1100px;
}
.return-moon {
  position: absolute;
  top: 7%;
  left: 50%;
  width: clamp(7rem, 14vw, 12rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #fff9df, #ffd99a 38%, rgba(248,194,109,0.16) 68%, transparent 72%);
  box-shadow:
    0 0 56px rgba(255,220,158,0.38),
    0 0 130px rgba(147,197,253,0.18);
  transform: translateX(-50%);
}
.return-signal {
  position: absolute;
  bottom: 28%;
  width: 0.55rem;
  height: 34vh;
  min-height: 210px;
  background: linear-gradient(180deg, rgba(255,255,255,0.64), rgba(64,45,30,0.9));
  box-shadow: 0 0 18px rgba(0,0,0,0.42);
}
.return-signal-left {
  left: 13%;
}
.return-signal-right {
  right: 12%;
  transform: scale(0.82);
  opacity: 0.76;
}
.return-signal span {
  position: absolute;
  left: 50%;
  width: 2.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(255,255,255,0.18);
  background: radial-gradient(circle, rgba(255,46,46,0.95), rgba(127,29,29,0.8) 42%, rgba(0,0,0,0.72));
  box-shadow: 0 0 26px rgba(248,113,113,0.7);
}
.return-signal span:first-child {
  top: 12%;
  animation: signalGlow 3.8s ease-in-out infinite;
}
.return-signal span:last-child {
  top: calc(12% + 3.1rem);
  background: radial-gradient(circle, rgba(34,197,94,0.96), rgba(22,101,52,0.82) 42%, rgba(0,0,0,0.72));
  box-shadow: 0 0 30px rgba(74,222,128,0.72);
  animation: signalGlow 3.8s ease-in-out infinite reverse;
}
.return-train {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: 31%;
  height: 5.2rem;
  opacity: 0.82;
  transform: skewX(-8deg);
}
.return-train span {
  position: absolute;
  bottom: 0;
  width: 28%;
  height: 100%;
  border-radius: 8px 8px 2px 2px;
  background:
    linear-gradient(90deg, rgba(255,216,151,0.2), rgba(2,6,17,0.92) 30% 72%, rgba(96,165,250,0.18)),
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(0,0,0,0.54));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 26px 52px rgba(0,0,0,0.48);
  animation: trainDrift 18s linear infinite;
}
.return-train span:nth-child(1) {
  left: 3%;
}
.return-train span:nth-child(2) {
  left: 36%;
  animation-delay: -6s;
}
.return-train span:nth-child(3) {
  left: 69%;
  animation-delay: -12s;
}
.return-rails {
  position: absolute;
  left: 50%;
  bottom: -20%;
  width: min(940px, 118vw);
  height: 76vh;
  transform: translateX(-50%) rotateX(66deg);
  transform-origin: center bottom;
}
.return-rails::before,
.return-rails::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,247,219,0.92), rgba(90,61,36,0.9), rgba(255,255,255,0.38));
  box-shadow: 0 0 30px rgba(255,216,151,0.3);
}
.return-rails::before {
  left: 29%;
}
.return-rails::after {
  right: 29%;
}
.return-rails span {
  position: absolute;
  left: 18%;
  right: 18%;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,231,187,0.86), transparent);
  animation: railRush 1.5s linear infinite;
}
.return-rails span:nth-child(2) {
  animation-delay: -0.75s;
}
.login-return-card {
  position: relative;
  z-index: 1;
  width: min(580px, 100%);
  border-color: rgba(255,232,187,0.25);
  background:
    linear-gradient(145deg, rgba(255,241,204,0.12), rgba(15,23,42,0.78) 38%, rgba(4,8,18,0.94)),
    rgba(8,14,28,0.9);
  box-shadow:
    0 34px 90px rgba(0,0,0,0.58),
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 65px rgba(248,194,109,0.18),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.login-return-card h1 {
  max-width: 9ch;
  color: #fff5d8;
  text-shadow:
    0 0 28px rgba(248,194,109,0.28),
    0 0 70px rgba(59,130,246,0.18);
}
.login-return-card .btn {
  background:
    linear-gradient(135deg, #ffd27e, #f97316 52%, #2563eb);
  color: #07101f;
  box-shadow: 0 16px 32px rgba(248,194,109,0.18);
}
.login-return-card input {
  background: rgba(3,7,18,0.48);
  border-color: rgba(255,255,255,0.16);
}
.login-return-card input:focus {
  border-color: rgba(255,218,150,0.92);
  box-shadow: 0 0 0 3px rgba(248,194,109,0.12);
}
.login-soundtrack {
  margin-bottom: 1rem;
}
.login-return-moving .return-rails span {
  animation-duration: 0.92s;
}
.login-return-moving .return-moon {
  box-shadow:
    0 0 72px rgba(255,220,158,0.46),
    0 0 160px rgba(147,197,253,0.22);
}
.reading-page { padding-bottom: 3rem; }
.reading-card {
  max-width: 850px;
  background:
    linear-gradient(180deg, rgba(13, 22, 44, 0.88) 0%, rgba(7, 14, 29, 0.78) 100%);
}
.download-area { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.text-link { color: #f8c26d; }
.full { width: 100%; margin-top: 1.15rem; }
.muted { color: var(--muted); }
.switch-link { margin-top: 1rem; }
.message { margin-top: 1rem; min-height: 1.3rem; }
.purchase-status { font-weight: 700; }
.centered-card { max-width: 680px; text-align: center; }
.site-footer { padding: 2rem 0 3rem; text-align: center; color: var(--muted); }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.footer-links a {
  color: #d8e2f7;
  text-decoration: none;
}
.footer-links a:hover {
  color: #f8c26d;
}
.trust-page {
  padding: 1.25rem 0 3rem;
}
.trust-card {
  max-width: 900px;
}
.trust-card h1 {
  max-width: 14ch;
}
.trust-card h2 {
  margin: 1.6rem 0 0.4rem;
}
.trust-card ul {
  color: var(--muted);
  line-height: 1.8;
}
.trust-card li + li {
  margin-top: 0.35rem;
}
.trust-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}
.trust-list article {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
}
.trust-list h2,
.trust-list h3 {
  margin-top: 0;
}
.trust-updated {
  color: #9fb0ce;
  font-size: 0.92rem;
}
.trust-inline-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
  color: #d8e2f7;
  font-size: 0.94rem;
}
.trust-inline-links a {
  color: #f8c26d;
}
.sales-panel { max-width: 700px; }
.small { min-height: 2.55rem; padding: 0.65rem 1rem; font-size: 0.92rem; }
.ride-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.2rem; }
.ride-controls-label { color: #d8e1f5; font-size: 0.92rem; font-weight: 600; }
.weather-label {
  position: absolute;
  top: 5.6rem;
  right: 1rem;
  z-index: 3;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(4, 10, 24, 0.52);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f6f8ff;
  backdrop-filter: blur(8px);
}
.chapter-hotspots { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hotspot {
  position: absolute;
  pointer-events: auto;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(248,194,109,0.18);
  color: #fff7df;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 0 rgba(248,194,109,0.28);
  cursor: pointer;
  overflow: visible;
  animation: hotspotPulse 2.2s ease-in-out infinite;
}
.hotspot:nth-child(1) { top: 71%; left: 43%; }
.hotspot:nth-child(2) { top: 71%; left: 48%; }
.hotspot:nth-child(3) { top: 71%; left: 53%; }
.hotspot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 0.2rem);
  width: 2px;
  height: 1.6rem;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(248,194,109,0.9), rgba(248,194,109,0));
  pointer-events: none;
}
.hotspot::before {
  content: "";
  position: absolute;
  inset: -0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(248,194,109,0.26);
  opacity: 0.7;
  pointer-events: none;
}
.hotspot:hover {
  transform: translateY(-2px) scale(1.04);
}
@keyframes hotspotPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(248,194,109,0.12);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(248,194,109,0);
  }
}
.chapter-popup {
  position: absolute;
  right: 1rem;
  bottom: 1.5rem;
  z-index: 4;
  width: min(360px, calc(100% - 2rem));
  padding: 1.1rem 1.15rem;
  border-radius: 20px;
  background: rgba(7, 14, 29, 0.88);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.popup-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.hidden { display: none; }
.bio-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 1.5rem; align-items: stretch; }
.bio-quote {
  display: grid;
  align-items: center;
  padding: 1.4rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(217,119,6,0.13), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
}
.bio-quote blockquote {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.45;
  color: #fff7df;
}
.thankyou-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 210px));
  justify-content: center;
  gap: 1rem;
  margin: 1.35rem 0 1.65rem;
}
.thankyou-photo-card {
  margin: 0;
  padding: 0.45rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 34px rgba(0,0,0,0.24);
  min-height: 292px;
  display: flex;
}
.thankyou-photo-card:first-child { transform: rotate(-2deg) translateY(6px); }
.thankyou-photo-card:last-child { transform: rotate(2deg) translateY(-4px); }
.thankyou-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
}
.thankyou-photo-shift-right {
  object-fit: contain;
  object-position: center;
  background: rgba(7, 14, 29, 0.88);
  padding: 0.15rem;
  transform: scale(1.06);
  transform-origin: center;
}
.thankyou-actions {
  justify-content: center;
}
.dashboard-yard-wrap .hero-overlay {
  background:
    linear-gradient(180deg, rgba(2,8,23,0.18) 0%, rgba(2,8,23,0.34) 30%, rgba(2,8,23,0.88) 100%),
    radial-gradient(circle at 82% 16%, rgba(217,119,6,0.18), transparent 24%),
    linear-gradient(90deg, rgba(4,10,24,0.16) 0%, rgba(4,10,24,0) 24%, rgba(4,10,24,0.22) 100%);
}
.dashboard-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  pointer-events: none;
}
.dashboard-panel > * { position: relative; z-index: 1; }
.dashboard-panel h1 { margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.dashboard-panel > p { max-width: 60ch; }
.dashboard-note-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.dashboard-note-card {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
}
.dashboard-note-card p { margin: 0; }
.dashboard-note-label {
  color: #fff4da;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem !important;
}
#userEmail { color: #fff7df; }
#purchaseStatus {
  margin-top: 1.25rem;
  margin-bottom: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: #f4f7ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
#ebookStatus, #paperbackStatus {
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #dbe6ff;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}
.product-stack form {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.product-stack form:hover {
  transform: translateY(-2px);
  border-color: rgba(248,194,109,0.26);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
}
.product-stack form:first-of-type {
  background:
    linear-gradient(180deg, rgba(217,119,6,0.12), rgba(255,255,255,0.03));
}
.product-stack form:last-of-type {
  background:
    linear-gradient(180deg, rgba(29,78,216,0.13), rgba(255,255,255,0.03));
}
.product-stack form .btn { width: 100%; min-height: 3.35rem; font-size: 1rem; letter-spacing: 0.01em; }
.product-stack form h2 { margin-bottom: 0; color: #fff7df; }
.product-stack form p { margin-top: 0; }
.shipping-fields {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8, 14, 24, 0.32);
}
.shipping-fields-title {
  margin: 0;
  font-weight: 700;
  color: #fff3cf;
}
.shipping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.shipping-grid label {
  display: grid;
  gap: 0.38rem;
  color: #dbe6ff;
  font-size: 0.92rem;
}
.shipping-grid label span {
  font-weight: 600;
}
.shipping-grid input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f5f7ff;
  font: inherit;
  box-sizing: border-box;
}
.shipping-grid input:focus {
  outline: none;
  border-color: rgba(248,194,109,0.58);
  box-shadow: 0 0 0 3px rgba(248,194,109,0.12);
}
.shipping-grid input::placeholder {
  color: rgba(219,230,255,0.52);
}
.shipping-span-2 {
  grid-column: 1 / -1;
}
.shipping-help {
  margin: 0;
  color: #c5d2ea;
  font-size: 0.9rem;
}
.download-area {
  margin-top: 1.6rem;
  padding: 1.35rem 1.1rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(180deg, rgba(88, 214, 141, 0.05), rgba(255,255,255,0));
  border-radius: 18px;
}
.download-area h2 { margin-bottom: 0.5rem; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.download-area p { max-width: 52ch; }
#secureDownloadBtn { min-width: min(100%, 320px); margin-top: 0.4rem; }
#downloadMessage { margin-bottom: 0; }
.dashboard-paypal-support {
  margin: 1.4rem 0 0;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
}
.dashboard-paypal-support .dashboard-note-label {
  margin-bottom: 0.8rem;
}
#paypal-container-5RENS6KFLBYTE {
  max-width: 360px;
}
.community-page {
  padding: 1.25rem 0 3rem;
}
.memorial-page {
  padding-bottom: 4rem;
  --memorial-beat: 0;
  color-scheme: dark;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,214,155,0.12), transparent 28rem),
    radial-gradient(circle at 82% 38%, rgba(123,178,255,0.1), transparent 30rem),
    linear-gradient(180deg, rgba(3,7,18,0), rgba(3,7,18,0.58) 45%, rgba(3,7,18,0.82));
}
.memorial-page {
  cursor: grab;
}
.memorial-page.memorial-drag-scrolling {
  cursor: grabbing;
  user-select: none;
}
.memorial-page a,
.memorial-page button,
.memorial-page audio,
.memorial-page iframe {
  cursor: auto;
}
.memorial-hero {
  min-height: 58vh;
  display: flex;
  align-items: end;
  padding: 6rem 0 3.4rem;
  background:
    linear-gradient(180deg, rgba(2,8,23,0.1), rgba(2,8,23,0.78)),
    linear-gradient(115deg, rgba(217,119,6,0.18), rgba(29,78,216,0.16) 48%, rgba(10,20,34,0.9)),
    url("assets/memorial/memorial-09.jpg") center 38% / cover;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.memorial-hero-inner {
  max-width: 920px;
}
.memorial-hero h1 {
  max-width: 13ch;
  margin: 0.35rem 0 1rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
}
.memorial-lede {
  max-width: 62ch;
  color: #e7edf8;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.75;
}
.memorial-slow-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin-top: 1.25rem;
  padding: 0.78rem 1.08rem;
  border: 1px solid rgba(255, 243, 111, 0.82);
  border-radius: 999px;
  background:
    linear-gradient(135deg, #fff36f, #ffd43b 58%, #f59e0b);
  color: #111827;
  font: inherit;
  font-weight: 850;
  box-shadow:
    0 14px 32px rgba(0,0,0,0.26),
    0 0 24px rgba(255, 212, 59, 0.34);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.memorial-slow-scroll-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 218, 150, 0.46);
  background:
    linear-gradient(135deg, #fff8a8, #ffd43b 58%, #f59e0b);
}
.memorial-slow-scroll-btn.is-scrolling {
  border-color: rgba(255, 218, 150, 0.58);
  background:
    linear-gradient(135deg, rgba(255,210,126,0.92), rgba(249,115,22,0.84));
  color: #07101f;
}
.memorial-slow-scroll-btn.is-hidden-after-click {
  display: none;
}
.memorial-letter {
  margin-top: 2rem;
  padding: 2rem;
  border-left: 3px solid rgba(248,194,109,0.72);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.035));
  border-radius: 0 22px 22px 0;
}
.memorial-letter p {
  max-width: 78ch;
  color: #dce6f8;
  font-size: 1.05rem;
  line-height: 1.9;
}
.memorial-letter p:first-child {
  margin-top: 0;
}
.memorial-letter p:last-child {
  margin-bottom: 0;
}
.memorial-audio {
  margin-top: 1.4rem;
}
.memorial-audio-card {
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,241,204,0.1), rgba(99,102,241,0.07)),
    rgba(15,23,42,0.76);
  box-shadow:
    0 18px 38px rgba(0,0,0,0.18),
    0 0 calc(18px + (var(--memorial-beat) * 36px)) rgba(255,205,132,calc(0.1 + (var(--memorial-beat) * 0.18)));
}
.memorial-audio-card h2 {
  margin: 0.15rem 0 1rem;
  color: #fff1cc;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.15;
}
.memorial-audio-card audio {
  width: 100%;
  display: block;
}
.memorial-soundtrack-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}
.memorial-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0.9rem;
  margin-top: 2rem;
  perspective: 1400px;
}
.memorial-photo {
  --photo-beat: 0;
  --drift: 0;
  min-height: 210px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.04);
  box-shadow:
    0 18px 38px rgba(0,0,0,0.26),
    0 0 calc(16px + (var(--photo-beat) * 42px)) rgba(255,210,142,calc(0.1 + (var(--photo-beat) * 0.28)));
  position: relative;
  isolation: isolate;
  opacity: 1;
  transform:
    translateY(calc(var(--photo-beat) * -7px))
    rotateZ(calc(var(--drift) * 0.18deg))
    scale(calc(1 + (var(--photo-beat) * 0.026)));
  transition:
    opacity 180ms ease,
    box-shadow 260ms ease,
    transform 260ms ease,
    border-color 260ms ease;
}
.memorial-photo::before,
.memorial-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.memorial-photo::before {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255,244,214,0.22), transparent 32%, rgba(147,197,253,0.12) 68%, transparent),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,calc(0.1 + (var(--photo-beat) * 0.28))), transparent 38%);
  mix-blend-mode: screen;
  opacity: 0.24;
}
.memorial-photo::after {
  z-index: 2;
  border: 1px solid rgba(255,255,255,calc(0.1 + (var(--photo-beat) * 0.28)));
  box-shadow: inset 0 0 40px rgba(255,232,188,calc(0.08 + (var(--photo-beat) * 0.16)));
}
.memorial-music-active .memorial-photo {
  animation: memorialBreath 4.8s ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
  opacity: calc(0.58 + (var(--photo-beat) * 0.42));
}
.memorial-music-active .memorial-photo:nth-child(3n + 1) {
  animation-duration: 5.6s;
}
.memorial-music-active .memorial-photo:nth-child(4n + 2) {
  animation-duration: 6.2s;
}
.memorial-photo-large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 430px;
}
.memorial-photo-tall {
  grid-row: span 2;
  min-height: 430px;
}
.memorial-photo-wide {
  grid-column: span 2;
  min-height: 300px;
}
.memorial-photo-featured {
  grid-column: span 2;
  min-height: clamp(300px, 34vw, 440px);
  border-color: rgba(255, 218, 150, 0.42);
  box-shadow:
    0 26px 62px rgba(0,0,0,0.42),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 calc(34px + (var(--photo-beat) * 58px)) rgba(255, 181, 87, calc(0.17 + (var(--photo-beat) * 0.23)));
}
.memorial-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter:
    saturate(1)
    contrast(1.05)
    brightness(calc(0.82 + (var(--photo-beat) * 0.28)));
  transform: scale(calc(1.035 + (var(--photo-beat) * 0.034)));
  transition:
    filter 180ms ease,
    transform 260ms ease;
}
.memorial-photo:nth-child(5n + 1) img {
  object-position: 50% 42%;
}
.memorial-photo:nth-child(5n + 2) img {
  object-position: 42% 50%;
}
.memorial-photo:nth-child(5n + 3) img {
  object-position: 58% 48%;
}
.memorial-photo-featured img {
  object-position: center 44%;
  filter:
    grayscale(0.34)
    contrast(1.14)
    brightness(calc(0.88 + (var(--photo-beat) * 0.28)));
}
.memorial-photo-rail img {
  object-position: center 36%;
  filter:
    saturate(1.08)
    contrast(1.08)
    brightness(calc(0.88 + (var(--photo-beat) * 0.28)));
}
@keyframes memorialBreath {
  0%, 100% {
    filter: drop-shadow(0 12px 18px rgba(0,0,0,0.18));
  }
  45% {
    filter: drop-shadow(0 22px 34px rgba(255,206,143,0.2));
  }
  62% {
    filter: drop-shadow(0 14px 24px rgba(147,197,253,0.14));
  }
}
@keyframes railRush {
  0% {
    transform: translateY(-14vh) scaleX(0.28);
    opacity: 0;
  }
  22% {
    opacity: 0.72;
  }
  100% {
    transform: translateY(78vh) scaleX(1.12);
    opacity: 0;
  }
}
@keyframes headlightPulse {
  0%, 100% {
    opacity: 0.56;
    transform: scale(0.96) rotate(var(--light-tilt, 0deg));
  }
  50% {
    opacity: 0.92;
    transform: scale(1.08) rotate(var(--light-tilt, 0deg));
  }
}
@keyframes signalGlow {
  0%, 100% {
    opacity: 0.7;
    filter: saturate(0.9);
  }
  50% {
    opacity: 1;
    filter: saturate(1.3);
  }
}
@keyframes trainDrift {
  0% {
    transform: translateX(-8vw);
  }
  100% {
    transform: translateX(8vw);
  }
}
.memorial-closing {
  margin-top: 2.2rem;
  padding: 2rem 0 0;
  text-align: center;
}
.memorial-closing p {
  max-width: 760px;
  margin: 0 auto;
  color: #fff1cc;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  line-height: 1.35;
  font-weight: 800;
}
.memorial-video {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}
.memorial-video-frame {
  width: min(267px, 100%);
  aspect-ratio: 267 / 476;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(4, 10, 24, 0.38);
  box-shadow: 0 18px 38px rgba(0,0,0,0.26);
}
.memorial-video-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
}
.memorial-video-rotated {
  width: min(476px, 100%);
  aspect-ratio: 476 / 267;
  position: relative;
}
.memorial-video-rotated iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56.092%;
  height: 178.278%;
  max-width: none;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}
.memorial-video-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(4, 10, 24, 0.18);
  color: #fff7dc;
  font: inherit;
  font-size: 0;
  font-weight: 800;
  cursor: pointer;
}
.memorial-video-play::before {
  content: "";
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: rgba(0,0,0,0.58);
  box-shadow: 0 16px 34px rgba(0,0,0,0.34);
}
.memorial-video-play::after {
  content: "";
  position: absolute;
  left: calc(50% - 8px);
  top: calc(50% - 15px);
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 24px solid #fff7dc;
}
.memorial-video-started .memorial-video-play {
  display: none;
}
.community-hero {
  background:
    radial-gradient(circle at top left, rgba(217,119,6,0.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}
.community-hero h1 {
  max-width: 14ch;
}
.community-status-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.moderator-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(217,119,6,0.15);
  border: 1px solid rgba(248,194,109,0.28);
  color: #fff1cc;
  font-size: 0.88rem;
  font-weight: 700;
}
.community-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.community-composer-card {
  position: sticky;
  top: 1rem;
}
.community-form,
.community-form label {
  display: grid;
  gap: 0.55rem;
}
.community-form {
  margin-top: 1rem;
}
.community-form label span {
  font-weight: 600;
  color: #e7eefc;
}
.community-form input,
.community-form select,
.community-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  outline: none;
}
.community-form textarea {
  resize: vertical;
  min-height: 12rem;
}
.community-form input:focus,
.community-form select:focus,
.community-form textarea:focus,
.reply-form textarea:focus {
  border-color: rgba(248,194,109,0.8);
  box-shadow: 0 0 0 3px rgba(248,194,109,0.1);
}
.community-form input:disabled,
.community-form select:disabled,
.community-form textarea:disabled,
.reply-form textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.community-feed-wrap {
  display: grid;
  gap: 1rem;
}
.community-feed-head {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.community-feed {
  display: grid;
  gap: 1rem;
}
.community-empty {
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  color: #d8e2f7;
}
.small-empty {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.94rem;
}
.review-card {
  padding: 1.2rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(13, 22, 44, 0.88) 0%, rgba(7, 14, 29, 0.78) 100%);
  box-shadow: var(--shadow);
}
.review-card-hidden {
  opacity: 0.82;
  border-style: dashed;
}
.review-card h3 {
  margin: 0.4rem 0 0.7rem;
  color: #fff5d9;
}
.review-card-head,
.reply-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.review-author,
.reply-author {
  margin: 0;
  font-weight: 700;
  color: #fff7df;
}
.review-meta,
.reply-meta {
  margin: 0.2rem 0 0;
  color: #9fb0ce;
  font-size: 0.9rem;
}
.review-rating {
  color: #f8c26d;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.review-body,
.reply-card p {
  white-space: pre-wrap;
}
.review-body {
  margin-bottom: 0;
}
.review-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.action-chip {
  min-height: 2.3rem;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
}
.liked-chip {
  border-color: rgba(248,194,109,0.4);
  background: rgba(248,194,109,0.12);
  color: #fff1cc;
}
.danger-chip {
  border-color: rgba(248,113,113,0.28);
  color: #ffd3d3;
}
.review-thread {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 0.8rem;
}
.review-thread-label {
  margin: 0;
  color: #fff1cc;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.reply-card {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
}
.reply-card p {
  margin-bottom: 0;
}
.reply-form,
.reply-form label {
  display: grid;
  gap: 0.4rem;
}
.reply-form {
  gap: 0.65rem;
}
.reply-form label {
  color: #dbe6ff;
  font-size: 0.95rem;
}
.reply-form textarea {
  width: 100%;
  min-height: 6.2rem;
  padding: 0.85rem 0.95rem;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  resize: vertical;
  outline: none;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: auto; padding-top: 2rem; }
  .hero-train-stage { padding: 2rem 0 8rem; }
  .hero-media { display: flex; justify-content: center; }
  .hero-text p, .tagline { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .journey-board { margin-top: 1.5rem; }
  .journey-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features-grid { grid-template-columns: 1fr; }
  .bio-card { grid-template-columns: 1fr; }
  .dashboard-panel { padding: 1.5rem; }
  .dashboard-panel-wrap { padding: 1.5rem 0 3rem; }
  .dashboard-note-row { grid-template-columns: 1fr; }
  .thankyou-photo { width: 100%; }
  .thankyou-gallery { grid-template-columns: repeat(2, minmax(0, 160px)); gap: 0.75rem; }
  .thankyou-photo-card { min-height: 236px; }
  .thankyou-photo-card:first-child,
  .thankyou-photo-card:last-child { transform: none; }
  .shipping-grid { grid-template-columns: 1fr; }
  .shipping-span-2 { grid-column: auto; }
  .community-layout { grid-template-columns: 1fr; }
  .community-composer-card { position: static; }
  .memorial-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memorial-photo,
  .memorial-photo-large,
  .memorial-photo-tall,
  .memorial-photo-wide { min-height: 260px; }
  .memorial-photo-featured {
    grid-column: 1 / -1;
    min-height: 390px;
  }
}

@media (max-width: 640px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.9rem 0 0.5rem;
    align-items: center;
  }
  .brand { max-width: 18ch; line-height: 1.1; }
  .nav-toggle { display: inline-flex; position: relative; }
  .site-header > nav {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(4, 10, 24, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    justify-content: stretch;
    gap: 0.45rem;
  }
  .site-header.nav-open > nav { display: grid; }
  .site-header > nav a,
  .site-header > nav button {
    width: 100%;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
  }
  .site-header > nav a::after { display: none; }
  .cinematic-hero { min-height: 132vh; }
  #trainCanvas {
    height: 78vh;
    bottom: auto;
  }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(2,8,23,0) 0%, rgba(2,8,23,0.04) 34%, rgba(2,8,23,0.34) 62%, rgba(2,8,23,0.76) 100%),
      radial-gradient(circle at 78% 22%, rgba(255, 196, 110, 0.08), transparent 28%);
  }
  .hero-train-stage {
    min-height: 126vh;
    padding: clamp(18rem, 52vh, 27rem) 0 6.5rem;
    gap: 1rem;
  }
  .hero-train-stage .hero-media {
    transform: none;
  }
  .hero-train-stage .sales-panel {
    max-width: 100%;
    background: rgba(4, 10, 24, 0.58);
    backdrop-filter: blur(4px);
  }
  .cover { max-width: min(190px, 58vw); border-radius: 18px; }
  .weather-label {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    width: fit-content;
    margin: 0;
    background: rgba(4, 10, 24, 0.34);
  }
  .hotspot:nth-child(1) { top: auto; bottom: 2.35rem; left: 32%; }
  .hotspot:nth-child(2) { top: auto; bottom: 2.35rem; left: 50%; }
  .hotspot:nth-child(3) { top: auto; bottom: 2.35rem; left: 68%; }
  .chapter-popup { left: 1rem; right: 1rem; bottom: 1rem; width: auto; }
  .dashboard-panel { border-radius: 22px; padding: 1.2rem; }
  #purchaseStatus, #ebookStatus, #paperbackStatus, .product-stack form, .download-area { border-radius: 16px; }
  .dashboard-paypal-support { border-radius: 16px; }
  #paypal-container-5RENS6KFLBYTE { max-width: 100%; }
  .product-stack form .btn, #secureDownloadBtn { min-height: 3.15rem; width: 100%; }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-card { min-height: 10rem; }
  .auth-shell {
    padding: 1.25rem 0.85rem;
  }
  .signup-ride-card,
  .login-return-card {
    padding: 1.35rem;
  }
  .signup-ride-card h1,
  .login-return-card h1 {
    max-width: 11ch;
  }
  .rail-track,
  .return-rails {
    width: 150vw;
  }
  .return-signal {
    opacity: 0.54;
  }
  .return-train {
    bottom: 25%;
  }
  .memorial-hero {
    min-height: 62vh;
    padding: 4.5rem 0 2.4rem;
  }
  .memorial-hero h1 { max-width: 11ch; }
  .memorial-slow-scroll-btn {
    position: fixed;
    top: 7.45rem;
    right: 0.85rem;
    z-index: 70;
    min-height: 2.55rem;
    max-width: calc(100vw - 1.7rem);
    margin-top: 0;
    padding: 0.66rem 0.88rem;
    box-shadow:
      0 14px 34px rgba(0,0,0,0.42),
      0 0 24px rgba(255, 212, 59, 0.42);
  }
  .music-start-btn-memorial {
    top: 4.25rem;
    right: 0.85rem;
    bottom: auto;
    left: auto;
    z-index: 72;
    min-width: 9.2rem;
    max-width: calc(100vw - 1.7rem);
    min-height: 2.55rem;
    padding: 0.66rem 0.88rem;
    transform: none;
  }
  .memorial-letter {
    padding: 1.25rem;
    border-radius: 0 18px 18px 0;
  }
  .memorial-gallery {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .memorial-photo,
  .memorial-photo-large,
  .memorial-photo-tall,
  .memorial-photo-wide,
  .memorial-photo-featured {
    grid-column: auto;
    grid-row: auto;
    min-height: 300px;
  }
  .memorial-photo-featured {
    min-height: 330px;
  }
  .memorial-music-active .memorial-photo {
    animation: none;
  }
  .memorial-photo,
  .memorial-photo img {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .memorial-music-active .memorial-photo {
    animation: none;
  }
  .rail-track span,
  .signup-ride-moving .rail-light,
  .return-signal span,
  .return-train span,
  .return-rails span {
    animation: none;
  }
  .memorial-photo,
  .memorial-photo img {
    transition: none;
    transform: none;
  }
}
