:root {
  --bg: #000000;
  --bg2: #0a0000;
  --red: #8b0000;
  --red2: #ff1a1a;
  --red3: #c40000;
  --blood: #4a0000;
  --gold: #ffd36a;
  --text: #f0e0e0;
  --muted: #8a6a6a;
  --card: rgba(8, 0, 0, 0.94);
  --line: rgba(255, 26, 26, 0.45);
  --radius: 4px;
  --font: "Inter", system-ui, sans-serif;
  --display: "Orbitron", "Inter", sans-serif;
  --horror: "Creepster", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
main, .nav, footer {
  position: relative;
  z-index: 1;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #000000;
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}

.hellscape-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -5;
  opacity: 0.85;
}
.hell-mountains {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -4;
  background:
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(255,40,0,.22), transparent 55%),
    linear-gradient(180deg, transparent 45%, rgba(20,0,0,.35) 100%);
}
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: -3;
  background:
    radial-gradient(900px 450px at 50% -5%, rgba(139,0,0,.28), transparent 55%),
    radial-gradient(700px 400px at 85% 25%, rgba(255,26,26,.12), transparent 55%),
    radial-gradient(600px 350px at 10% 80%, rgba(74,0,0,.25), transparent 60%),
    radial-gradient(400px 400px at 50% 100%, rgba(139,0,0,.18), transparent 50%);
}

.pentagram-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: -2;
  opacity: 0.14;
  background:
    repeating-conic-gradient(from 0deg at 50% 45%,
      transparent 0deg 36deg,
      rgba(255,26,26,.12) 36deg 37deg,
      transparent 37deg 72deg),
    radial-gradient(circle at 50% 45%,
      transparent 18%,
      rgba(139,0,0,.25) 19%,
      transparent 20%,
      transparent 32%,
      rgba(255,26,26,.15) 33%,
      transparent 34%,
      transparent 48%,
      rgba(139,0,0,.2) 49%,
      transparent 50%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
}

.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: radial-gradient(ellipse at center,
    transparent 30%,
    rgba(0,0,0,.55) 70%,
    rgba(0,0,0,.92) 100%);
  box-shadow: inset 0 0 120px 40px rgba(0,0,0,.85),
              inset 0 0 60px 20px rgba(80,0,0,.35);
}

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 51;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.18) 2px,
    rgba(0,0,0,.18) 4px
  );
  opacity: 0.55;
  mix-blend-mode: multiply;
}

a { color: var(--red2); text-decoration: none; }
a:hover { color: #ff6666; }

.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.25rem;
  backdrop-filter: blur(14px);
  background: rgba(0,0,0,.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0 30px rgba(139,0,0,.35);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-family: var(--display); font-weight: 900; letter-spacing: .06em; }
.logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,26,26,.55);
  box-shadow: 0 0 10px rgba(255,26,26,.45);
}
.nav nav { display: flex; gap: 1rem; margin-left: auto; }
.nav nav a { color: var(--muted); font-size: .92rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.nav nav a:hover { color: var(--red2); text-shadow: 0 0 12px rgba(255,26,26,.6); }
@media (max-width: 760px) {
  .nav nav { display: none; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.35rem; border-radius: 2px;
  background: linear-gradient(180deg, #ff1a1a 0%, #8b0000 45%, #2a0000 100%);
  color: white !important; font-weight: 800; border: 1px solid #ff3333;
  cursor: pointer;
  box-shadow:
    0 0 20px rgba(255,26,26,.5),
    inset 0 1px 0 rgba(255,100,100,.4),
    inset 0 -2px 8px rgba(0,0,0,.5);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  text-transform: uppercase;
  letter-spacing: .06em;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow:
    0 0 40px rgba(255,26,26,.75),
    inset 0 1px 0 rgba(255,100,100,.5),
    inset 0 -2px 8px rgba(0,0,0,.5);
  color: white !important;
}
.btn-ghost {
  background: linear-gradient(180deg, rgba(40,0,0,.9), rgba(0,0,0,.95));
  border: 1px solid var(--line);
  box-shadow: 0 0 12px rgba(139,0,0,.3);
  color: var(--text) !important;
}
.btn-ghost:hover {
  border-color: var(--red2);
  color: var(--red2) !important;
}
.btn-sm { padding: .45rem .9rem; font-size: .8rem; clip-path: none; border-radius: 2px; }

.hero {
  text-align: center;
  padding: 4.5rem 1.25rem 3rem;
  max-width: 900px; margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; color: var(--red2);
  font-size: .72rem; font-weight: 700;
  text-shadow: 0 0 16px rgba(255,26,26,.7);
}
h1 {
  font-family: var(--horror);
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  margin: .4rem 0 0; line-height: 1;
  color: var(--red2);
}
.glow-text {
  text-shadow:
    0 0 10px rgba(255,26,26,1),
    0 0 30px rgba(255,26,26,.9),
    0 0 60px rgba(139,0,0,.7),
    0 0 100px rgba(139,0,0,.4);
  animation: flicker 3.2s infinite;
}
@keyframes flicker {
  0%, 100% {
    opacity: 1;
    text-shadow:
      0 0 10px rgba(255,26,26,1),
      0 0 30px rgba(255,26,26,.9),
      0 0 60px rgba(139,0,0,.7),
      0 0 100px rgba(139,0,0,.4);
  }
  7% {
    opacity: .85;
    text-shadow:
      0 0 4px rgba(255,26,26,.5),
      0 0 12px rgba(139,0,0,.3);
  }
  8% {
    opacity: 1;
    text-shadow:
      0 0 14px rgba(255,26,26,1),
      0 0 40px rgba(255,26,26,1),
      0 0 80px rgba(255,0,0,.8);
  }
  70% { opacity: 1; }
  72% {
    opacity: .7;
    text-shadow: 0 0 6px rgba(139,0,0,.4);
  }
  73% {
    opacity: 1;
    text-shadow:
      0 0 12px rgba(255,26,26,1),
      0 0 35px rgba(255,26,26,.95),
      0 0 70px rgba(139,0,0,.75);
  }
  90% { opacity: .95; }
  92% { opacity: 1; }
}
.ticker {
  font-family: var(--display);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  letter-spacing: .2em; margin: .4rem 0 1rem; color: #ff4444;
  text-shadow: 0 0 20px rgba(255,26,26,.5);
}
.tagline {
  font-size: 1.15rem; color: var(--muted); margin: 0 auto 1.5rem; max-width: 30rem;
  line-height: 1.65;
}
.chant {
  display: block;
  margin-top: .55rem;
  font-family: var(--horror);
  font-size: 1.35rem;
  color: var(--red2);
  letter-spacing: .04em;
  text-shadow: 0 0 18px rgba(255,26,26,.65);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-bottom: 1.5rem; }

.ca-box {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); max-width: 640px; margin: 0 auto;
  box-shadow: 0 0 24px rgba(139,0,0,.35), inset 0 0 30px rgba(80,0,0,.25);
}
.ca-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--red2); width: 100%; text-align: center; }
#ca { font-family: ui-monospace, monospace; font-size: .85rem; color: var(--text); word-break: break-all; }

.panel { padding: 2.5rem 1.25rem; max-width: 1000px; margin: 0 auto; }
.panel h2 {
  font-family: var(--display); letter-spacing: .1em; font-size: 1.45rem;
  margin: 0 0 1rem; color: var(--red2);
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255,26,26,.55);
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: 0 0 20px rgba(80,0,0,.3), inset 0 0 40px rgba(40,0,0,.4);
}
.lore-card p { margin-top: 0; }
.lore-card p + p { margin-top: .85rem; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 1rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.card h3 { margin: 0 0 .4rem; font-size: 1.05rem; color: #ff6666; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.road span { color: var(--red2); font-family: var(--display); font-weight: 900; font-size: .85rem; text-shadow: 0 0 10px rgba(255,26,26,.5); }

.steps { margin: 0; padding-left: 1.2rem; }
.steps li { margin: .7rem 0; color: var(--muted); }
.steps strong { color: var(--text); }

.footer {
  margin-top: 2rem; padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line); text-align: center;
  box-shadow: 0 -20px 40px rgba(80,0,0,.2);
}
.socials { display: flex; gap: 1.25rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
.disclaimer { max-width: 640px; margin: 0 auto .75rem; color: var(--muted); font-size: .8rem; }
.copy { color: #5a3030; font-size: .75rem; margin: 0; }
.byline { color: var(--muted); font-size: .8rem; margin: 0 0 .75rem; }
.byline a { color: var(--gold, #e8b64c); text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.tip-addr { font-family: ui-monospace, monospace; font-size: .72rem; word-break: break-all; }

.portrait-wrap {
  position: relative;
  width: min(280px, 70vw);
  margin: 0 auto 1.25rem;
}
.horns {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  width: 120%;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(255,26,26,.85));
}
.horns-svg { width: 100%; height: auto; display: block; }
.portrait-ring {
  position: relative;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(145deg, #ff1a1a, #1a0000 50%, #8b0000);
  box-shadow:
    0 0 30px rgba(255,26,26,.7),
    0 0 70px rgba(139,0,0,.55),
    0 0 120px rgba(80,0,0,.35);
  animation: ring-pulse 2.4s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(255,26,26,.7),
      0 0 70px rgba(139,0,0,.55),
      0 0 120px rgba(80,0,0,.35);
  }
  50% {
    box-shadow:
      0 0 50px rgba(255,26,26,1),
      0 0 100px rgba(255,0,0,.7),
      0 0 160px rgba(139,0,0,.5);
  }
}
.portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  filter: contrast(1.15) saturate(0.35) brightness(0.55) hue-rotate(-8deg);
}
.portrait-vignette {
  position: absolute; inset: 5px; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 60px 24px rgba(0,0,0,.75);
  background: radial-gradient(circle at 50% 30%, transparent 35%, rgba(40,0,0,.65) 100%);
  mix-blend-mode: multiply;
}
.portrait-embers {
  position: absolute; inset: 5px; border-radius: 50%; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(255,26,26,.45) 100%);
}
/* —— Judgment / Cast Into the Pit mini-game —— */
.judgment-panel { max-width: 720px; }
.judgment-intro {
  margin: 0 0 1.1rem;
  text-align: center;
  font-size: .98rem;
  line-height: 1.55;
}

.hell-game {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20,0,0,.95) 0%, rgba(0,0,0,.98) 55%, rgba(40,0,0,.9) 100%);
  box-shadow:
    0 0 30px rgba(139,0,0,.4),
    inset 0 0 60px rgba(60,0,0,.35);
  overflow: hidden;
  padding: .85rem .85rem 1rem;
}

.hell-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
  min-height: 2rem;
}
.hell-score {
  font-family: var(--display);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hell-score strong {
  color: var(--red2);
  text-shadow: 0 0 12px rgba(255,26,26,.7);
  font-size: 1.1rem;
}

.hell-stage {
  position: relative;
  height: min(420px, 72vw);
  min-height: 340px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255,40,0,.18), transparent 60%),
    linear-gradient(180deg, #0a0000 0%, #120000 40%, #1a0500 100%);
  border: 1px solid rgba(255,26,26,.25);
}

.hell-drag-hint {
  position: absolute;
  top: 118px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,100,80,.65);
  pointer-events: none;
  z-index: 2;
  animation: hint-pulse 2s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: .9; }
}

.hell-face {
  position: absolute;
  width: clamp(84px, 22vw, 110px);
  height: clamp(84px, 22vw, 110px);
  border-radius: 50%;
  z-index: 10;
  cursor: grab;
  touch-action: none;
  will-change: left, top, transform;
  padding: 3px;
  background: linear-gradient(145deg, #ff1a1a, #1a0000 55%, #8b0000);
  box-shadow:
    0 0 22px rgba(255,26,26,.75),
    0 8px 24px rgba(0,0,0,.55);
}
.hell-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  pointer-events: none;
  filter: contrast(1.15) saturate(0.4) brightness(0.6);
}
.hell-face-glow {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0,0,0,.6);
  background: radial-gradient(circle at 50% 30%, transparent 40%, rgba(40,0,0,.5) 100%);
}
.hell-face.is-dragging {
  cursor: grabbing;
  z-index: 20;
  box-shadow:
    0 0 30px rgba(255,26,26,.95),
    0 12px 32px rgba(0,0,0,.7);
  filter: brightness(1.1);
}
.hell-face.is-flying {
  cursor: grabbing;
  z-index: 20;
}
.hell-face.is-cast {
  z-index: 5;
}
.hell-face:focus-visible {
  outline: 2px solid var(--red2);
  outline-offset: 3px;
}

.hell-pit {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(92%, 420px);
  height: 48%;
  z-index: 4;
  pointer-events: none;
}
.hell-pit canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 8px 8px / 30% 30% 8px 8px;
}
.hell-pit-rim {
  position: absolute;
  inset: 8% 6% 0;
  border-radius: 50% 50% 12px 12px / 35% 35% 12px 12px;
  border: 2px solid rgba(255,80,20,.35);
  box-shadow:
    0 0 30px rgba(255,40,0,.35),
    inset 0 0 40px rgba(255,60,0,.15);
  pointer-events: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.hell-pit.is-hot .hell-pit-rim,
.hell-pit.is-feeding .hell-pit-rim {
  border-color: rgba(255,120,40,.85);
  box-shadow:
    0 0 50px rgba(255,60,0,.7),
    0 0 90px rgba(255,26,26,.45),
    inset 0 0 50px rgba(255,80,0,.3);
}
.hell-pit.is-feeding {
  filter: brightness(1.25) saturate(1.3);
}
.hell-pit-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  text-align: center;
  font-family: var(--horror);
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  letter-spacing: .12em;
  color: rgba(255,40,20,.55);
  text-shadow: 0 0 16px rgba(255,26,26,.5);
  pointer-events: none;
  z-index: 2;
}

.hell-splash {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 8;
  pointer-events: none;
}
.hell-splash .ember {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 8px);
  height: var(--size, 8px);
  border-radius: 50%;
  background: hsl(var(--hue, 20), 100%, 55%);
  box-shadow: 0 0 10px hsl(var(--hue, 20), 100%, 50%);
  opacity: 0;
}
.hell-splash.burst .ember {
  animation: ember-fly .7s ease-out var(--delay, 0s) forwards;
}
@keyframes ember-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
.hell-splash .flame-bloom {
  position: absolute;
  left: -60px;
  top: -60px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,220,100,.9) 0%, rgba(255,80,0,.7) 35%, rgba(255,20,0,.3) 60%, transparent 75%);
  opacity: 0;
  pointer-events: none;
}
.hell-splash.burst .flame-bloom {
  animation: bloom-pop .65s ease-out forwards;
}
@keyframes bloom-pop {
  0% { transform: scale(0.2); opacity: 1; }
  60% { transform: scale(1.4); opacity: .85; }
  100% { transform: scale(1.8); opacity: 0; }
}

.hell-toast {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 30;
  font-family: var(--horror);
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  letter-spacing: .06em;
  color: #ff1a1a;
  text-shadow:
    0 0 10px rgba(255,26,26,1),
    0 0 30px rgba(255,80,0,.9),
    0 0 60px rgba(139,0,0,.8),
    0 2px 0 #000;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  transition: none;
}
.hell-toast.show {
  animation: toast-slam 1.7s ease-out forwards;
}
@keyframes toast-slam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2) rotate(-8deg); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(2deg); }
  20% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.9); }
}

@media (max-width: 480px) {
  .hell-stage { min-height: 360px; height: 420px; }
  .hell-face { width: 92px; height: 92px; }
}


/* Hell ambient music mute control */
.music-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-left: .25rem;
  padding: .45rem .75rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 26, 26, .45);
  background: rgba(20, 0, 0, .75);
  color: var(--text);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(139, 0, 0, .35);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}
.music-toggle:hover {
  border-color: rgba(255, 80, 80, .8);
  box-shadow: 0 0 16px rgba(255, 26, 26, .45);
  background: rgba(40, 0, 0, .9);
}
.music-toggle.is-muted {
  opacity: .75;
  border-color: rgba(120, 80, 80, .5);
  box-shadow: none;
}
.music-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}
@media (max-width: 520px) {
  .music-toggle-label { display: none; }
  .music-toggle { padding: .45rem .55rem; }
}

/* Floating fallback if nav is crowded — keep nav-integrated primary */
.music-toggle-float {
  position: fixed;
  bottom: 1.1rem;
  right: 1.1rem;
  z-index: 70;
}


/* Non-blocking autoplay unlock hint */
.music-unlock-hint {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: .55rem 1rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 26, 26, .4);
  background: rgba(12, 0, 0, .88);
  color: #f0c8c8;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(139, 0, 0, .45);
  pointer-events: none;
  white-space: nowrap;
  animation: music-hint-pulse 2.4s ease-in-out infinite;
}
.music-unlock-hint[hidden] {
  display: none !important;
}
@keyframes music-hint-pulse {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}
@media (max-width: 520px) {
  .music-unlock-hint {
    font-size: .7rem;
    padding: .45rem .75rem;
    bottom: 1rem;
    white-space: normal;
    text-align: center;
    max-width: calc(100vw - 2rem);
  }
}
