:root {
  --bg: #f4f0e8;
  --ink: #1f2430;
  --muted: #50586b;
  --primary: #0c6f63;
  --accent: #d35f3f;
  --card: rgba(255, 255, 255, 0.7);
  --border: rgba(31, 36, 48, 0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 7.5rem;
}

.hidden {
  display: none !important;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(12, 111, 99, 0.12), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(211, 95, 63, 0.16), transparent 45%),
    var(--bg);
  color: var(--ink);
  font-family: "Archivo", "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-page {
  --site-bg: #090104;
  --site-surface: rgba(24, 5, 12, 0.78);
  --site-surface-strong: rgba(36, 6, 14, 0.9);
  --site-line: rgba(255, 96, 96, 0.18);
  --site-line-strong: rgba(255, 110, 110, 0.42);
  --site-ink: #ffe4da;
  --site-muted: #f3a390;
  --site-primary: #ff3b57;
  --site-accent: #ff9a3d;
  --site-accent-soft: rgba(255, 154, 61, 0.16);
  --site-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
  color: var(--site-ink);
  font-family: "Space Grotesk", "Archivo", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 45, 93, 0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(255, 140, 60, 0.14), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(255, 52, 84, 0.18), transparent 36%),
    linear-gradient(180deg, #0a0105 0%, #140108 42%, #090104 100%);
}

.site-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.26;
  mix-blend-mode: screen;
}

.site-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 84, 84, 0.1) 46%, rgba(255, 192, 120, 0.08) 50%, transparent 56%),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 112px,
      rgba(255, 102, 102, 0.08) 112px,
      rgba(255, 102, 102, 0.08) 118px,
      transparent 118px,
      transparent 220px
    );
  mix-blend-mode: screen;
  animation: pageGlitchFlash 11s steps(2) infinite;
}

.site-page.page-glitch-burst::after {
  opacity: 0.22;
  transform: translate3d(-4px, 0, 0);
}

.site-page.page-horror-burst::after {
  opacity: 0.34;
  transform: translate3d(-10px, 0, 0) skewX(-8deg);
  filter: saturate(140%);
}

.site-page .section,
.site-page .site-nav {
  width: min(1180px, 92vw);
}

.site-page .site-nav {
  position: sticky;
  top: 0.85rem;
  z-index: 20;
  margin-top: 1rem;
  margin-bottom: 1.35rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--site-line-strong);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(31, 5, 13, 0.98), rgba(17, 4, 10, 0.965));
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  isolation: isolate;
  overflow: clip;
  box-shadow:
    0 0 0 1px rgba(255, 70, 70, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.46);
}

.site-page .brand,
.site-page .nav-link,
.site-page footer p {
  color: var(--site-ink);
}

.site-page .brand {
  font-family: "Orbitron", "Archivo", sans-serif;
  letter-spacing: 0.14em;
}

.site-page .nav-link {
  border-color: transparent;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.site-page .nav-link:hover,
.site-page .nav-link.active {
  border-color: var(--site-line-strong);
  background: linear-gradient(135deg, rgba(255, 56, 88, 0.18), rgba(255, 154, 61, 0.08));
  color: #fff4ee;
  transform: translateY(-1px);
}

.site-page h1,
.site-page h2,
.site-page h3,
.site-page h4 {
  font-family: "Orbitron", "Archivo", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-page h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.9rem, 7vw, 6rem);
  color: #fff3ee;
  text-shadow: 0 0 24px rgba(255, 72, 99, 0.2);
}

.glitch-title {
  position: relative;
  display: inline-block;
  animation: glitchTitleJitter 8.5s infinite;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch-title::before {
  color: rgba(255, 87, 120, 0.62);
  text-shadow: -2px 0 rgba(255, 87, 120, 0.38);
  animation: glitchTitleSliceA 8.5s infinite;
}

.glitch-title::after {
  color: rgba(255, 178, 114, 0.66);
  text-shadow: 2px 0 rgba(255, 178, 114, 0.34);
  animation: glitchTitleSliceB 8.5s infinite;
}

.word-glitch-active {
  color: #fff3ee !important;
  text-shadow: 0 0 10px rgba(255, 82, 112, 0.34);
  animation: wordGlitchShake 0.16s steps(2) 6;
}

.word-glitch-horror {
  position: relative;
  display: inline-block;
  color: #fff1f1 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 77, 108, 0.48),
    0 0 26px rgba(255, 77, 108, 0.28),
    0 0 44px rgba(255, 159, 92, 0.16);
  animation: horrorTextWarp 1.05s steps(2) infinite;
}

.word-glitch-horror::after {
  content: attr(data-horror-echo);
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  opacity: 0.14;
  color: rgba(255, 92, 132, 0.82);
  transform: translateY(0.06em) scaleX(-1);
  transform-origin: center top;
  filter: blur(0.6px);
  pointer-events: none;
}

.site-page h2 {
  font-size: clamp(1.45rem, 3vw, 2.25rem);
}

.site-page h3 {
  font-size: 1rem;
}

.site-page .hero {
  padding-top: 5rem;
  padding-bottom: 2rem;
}

.home-page .hero-copy {
  min-width: 0;
}

.home-page .hero-copy .eyebrow {
  margin-bottom: 0.65rem;
}

.home-page .hero-copy h1 {
  max-width: 9.5ch;
  font-size: clamp(2.35rem, 5.6vw, 4.9rem);
  line-height: 0.96;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.site-page .eyebrow {
  font-family: "Orbitron", "Archivo", sans-serif;
  color: var(--site-accent);
  letter-spacing: 0.24em;
}

.site-page .lead,
.site-page p,
.site-page li,
.site-page .note {
  color: var(--site-muted);
}

.site-page a {
  color: #ffd2c2;
}

.site-page a:hover {
  color: #fff4ee;
}

.site-page .btn {
  border-radius: 14px;
  padding: 0.74rem 1.1rem;
  font-family: "Orbitron", "Archivo", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.site-page .btn:hover {
  transform: translateY(-2px);
}

.site-page .btn-primary {
  background: linear-gradient(135deg, var(--site-primary), #ff5f4d);
  box-shadow: 0 0 24px rgba(255, 60, 87, 0.22);
}

.site-page .btn-outline {
  border-color: var(--site-line-strong);
  color: var(--site-ink);
  background: rgba(255, 255, 255, 0.02);
}

.page-grid,
.page-noise,
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-grid {
  z-index: -3;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(255, 88, 88, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 88, 88, 0.08) 1px, transparent 1px);
  background-size: 74px 74px;
  transform: perspective(900px) rotateX(76deg) translateY(-12%);
  transform-origin: top center;
}

.page-noise {
  z-index: -2;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 150, 120, 0.36) 0 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, rgba(255, 70, 100, 0.25) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255, 110, 70, 0.2) 0 1px, transparent 1px);
  background-size: 220px 220px, 280px 280px, 320px 320px;
  animation: pageNoiseShift 8s linear infinite;
}

.page-glow {
  z-index: -1;
  filter: blur(50px);
  opacity: 0.6;
}

.page-glow-a {
  background: radial-gradient(circle, rgba(255, 58, 86, 0.24), transparent 62%);
  top: -20%;
  left: -10%;
}

.page-glow-b {
  background: radial-gradient(circle, rgba(255, 146, 61, 0.18), transparent 58%);
  bottom: -25%;
  right: -12%;
}

.cyber-hero {
  position: relative;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.hero-copy,
.hero-panel,
.neon-card,
.launch-card,
.protocol-card,
.patch-block,
.patch-panel,
.patch-metric,
.vector-card,
.warning-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--site-line);
  background: linear-gradient(180deg, var(--site-surface), rgba(12, 3, 8, 0.78));
  box-shadow: var(--site-shadow);
}

.hero-copy,
.hero-panel,
.neon-card,
.patch-block,
.warning-banner {
  border-radius: 24px;
}

.hero-copy::before,
.hero-panel::before,
.neon-card::before,
.launch-card::before,
.protocol-card::before,
.patch-block::before,
.patch-panel::before,
.patch-metric::before,
.vector-card::before,
.warning-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.06) 48%, transparent 60%);
  transform: translateX(-120%);
  animation: cardSweep 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-copy,
.hero-panel {
  padding: 1.45rem;
}

.panel-kicker,
.card-kicker,
.launch-label,
.table-summary-label,
.patch-chip,
.protocol-code,
.vector-index {
  font-family: "Orbitron", "Archivo", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-kicker,
.card-kicker,
.launch-label {
  color: var(--site-accent);
  font-size: 0.8rem;
}

.status-stack,
.metric-stack,
.standards-ladder {
  display: grid;
  gap: 0.55rem;
}

.status-stack div,
.metric-stack div,
.standards-ladder div {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 0.85rem;
}

.status-stack span,
.metric-stack span {
  color: var(--site-muted);
}

.status-stack strong,
.metric-stack strong,
.standards-ladder span {
  color: var(--site-ink);
}

.signal-ribbon {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.signal-ribbon span,
.protocol-index a,
.patch-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--site-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--site-ink);
  text-decoration: none;
}

.launch-grid,
.vector-grid,
.patch-dashboard,
.patch-columns,
.protocol-grid,
.dossier-grid,
.dual-grid,
.dossier-pillars {
  display: grid;
  gap: 1rem;
}

.launch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.launch-card {
  border-radius: 22px;
  padding: 1.15rem;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.launch-card h2,
.launch-card p {
  margin: 0;
}

.launch-card h2 {
  margin: 0.45rem 0 0.5rem;
  color: #fff3ee;
  font-size: 1.25rem;
}

.launch-card:hover {
  transform: translateY(-4px);
  border-color: var(--site-line-strong);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42), 0 0 26px rgba(255, 69, 92, 0.12);
}

.dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.neon-card {
  padding: 1.25rem;
}

.accent-card {
  background: linear-gradient(180deg, rgba(44, 6, 15, 0.92), rgba(24, 5, 10, 0.86));
  border-color: rgba(255, 157, 76, 0.28);
}

.vector-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vector-card {
  border-radius: 20px;
  padding: 1.1rem;
}

.vector-card h3,
.vector-card p {
  margin: 0;
}

.vector-card h3 {
  margin: 0.45rem 0 0.35rem;
  color: #fff1ea;
}

.vector-index,
.protocol-code {
  color: var(--site-accent);
  font-size: 0.82rem;
}

.dossier-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
}

.dossier-pillars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.cyber-chips {
  gap: 0.7rem;
}

.site-page .cyber-chips li {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--site-line-strong);
  color: var(--site-ink);
}

.standards-ladder {
  margin-top: 1rem;
}

.standards-ladder div {
  align-items: center;
}

.standards-ladder p {
  margin: 0;
}

.protocol-index {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.warning-banner {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 18px;
}

.protocol-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.protocol-card {
  border-radius: 20px;
  padding: 1.25rem;
}

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

.protocol-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.2rem;
}

.patch-dashboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.patch-metric {
  border-radius: 18px;
  padding: 1rem 1.1rem;
}

.patch-metric span {
  display: block;
  color: var(--site-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
}

.patch-metric strong {
  display: block;
  margin-top: 0.3rem;
  color: #fff3ec;
  font-family: "Orbitron", "Archivo", sans-serif;
  font-size: 1.4rem;
}

.patch-block {
  padding: 1.35rem;
}

.patch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.patch-head h2 {
  margin: 0;
}

.patch-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.patch-panel {
  border-radius: 18px;
  padding: 1rem;
}

.patch-panel + .patch-panel {
  margin-top: 0;
}

.patch-panel h3 {
  margin-top: 0;
  color: #fff2ec;
}

.site-page footer {
  padding-bottom: 2.5rem;
}

.site-page footer p {
  border-top: 1px solid var(--site-line);
  padding-top: 1rem;
}

.home-page .page-glow-a {
  background: radial-gradient(circle, rgba(255, 60, 88, 0.3), transparent 62%);
}

.home-page .page-grid {
  animation: homeGridDrift 18s ease-in-out infinite;
}

.home-page .page-grid::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 116, 116, 0.18) 48%, transparent 52%);
  transform: skewX(-18deg) translateX(-120%);
  animation: homeBeamSweep 8.4s linear infinite;
}

.home-page .page-noise {
  animation: homeNoisePulse 10s ease-in-out infinite;
}

.home-page::after {
  animation-duration: 12s;
}

.home-page .page-glow-a,
.home-page .page-glow-b {
  animation: homeGlowFloat 12s ease-in-out infinite;
}

.home-page .launch-card:nth-child(3n + 1) {
  transform: rotate(-0.2deg);
}

.home-page .launch-card:nth-child(3n + 2) {
  transform: rotate(0.2deg);
}

.home-page .launch-card:nth-child(3n + 3) {
  transform: rotate(-0.1deg);
}

.about-page {
  background:
    linear-gradient(90deg, rgba(255, 80, 80, 0.06) 0, rgba(255, 80, 80, 0.06) 1px, transparent 1px, transparent 100px),
    linear-gradient(180deg, #090104 0%, #130108 44%, #080104 100%);
}

.about-page .page-grid {
  animation: aboutGridBreath 16s ease-in-out infinite;
}

.about-page .page-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 110, 110, 0.1) 0,
      rgba(255, 110, 110, 0.1) 2px,
      transparent 2px,
      transparent 120px
    );
  opacity: 0.26;
  animation: aboutColumnScroll 20s linear infinite;
}

.about-page .page-glow-a,
.about-page .page-glow-b {
  animation: aboutGlowShift 14s ease-in-out infinite;
}

.about-page::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 110, 110, 0.08) 48%, transparent 54%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 140px,
      rgba(255, 148, 110, 0.08) 140px,
      rgba(255, 148, 110, 0.08) 146px,
      transparent 146px,
      transparent 260px
    );
  animation-duration: 14s;
}

.about-page .hero-panel,
.about-page .accent-card {
  border-color: rgba(255, 174, 96, 0.28);
}

.rules-page {
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 86, 86, 0.18), transparent 40%),
    linear-gradient(180deg, #060103 0%, #130105 48%, #060103 100%);
}

.rules-page .page-grid {
  animation: rulesGridFlicker 9s steps(2) infinite;
}

.rules-page .page-noise::before {
  content: "";
  position: absolute;
  inset: -10% 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 78, 78, 0.16) 46%, rgba(255, 154, 84, 0.12) 52%, transparent 58%);
  transform: translateY(-120%);
  animation: rulesScanDrop 7.2s linear infinite;
}

.rules-page .page-glow-a,
.rules-page .page-glow-b {
  animation: rulesGlowAlarm 9.5s ease-in-out infinite;
}

.rules-page::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 70, 70, 0.14) 48%, rgba(255, 184, 96, 0.08) 50%, transparent 54%),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 84px,
      rgba(255, 78, 78, 0.1) 84px,
      rgba(255, 78, 78, 0.1) 90px,
      transparent 90px,
      transparent 180px
    );
  animation-duration: 8.5s;
}

.rules-page .protocol-card,
.rules-page .warning-banner {
  border-color: rgba(255, 90, 90, 0.24);
  background: linear-gradient(180deg, rgba(26, 4, 9, 0.88), rgba(12, 2, 6, 0.9));
}

.updates-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 76, 111, 0.2), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 72, 72, 0.03) 0, rgba(255, 72, 72, 0.03) 2px, transparent 2px, transparent 14px),
    linear-gradient(180deg, #090104 0%, #140208 46%, #090104 100%);
}

.updates-page .page-grid {
  animation: updatesGridSlide 18s linear infinite;
}

.updates-page .page-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 18%,
      rgba(255, 124, 92, 0.12) 18%,
      rgba(255, 124, 92, 0.12) 20%,
      transparent 20%,
      transparent 42%,
      rgba(255, 82, 104, 0.12) 42%,
      rgba(255, 82, 104, 0.12) 44%,
      transparent 44%,
      transparent 100%
    );
  opacity: 0.4;
  animation: updatesPatchBars 10s linear infinite;
}

.updates-page .page-noise::before {
  content: "";
  position: absolute;
  inset: -15%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 120, 84, 0.14) 48%, transparent 54%);
  transform: translateX(-120%);
  animation: updatesFeedSweep 9s ease-in-out infinite;
}

.updates-page .page-glow-a,
.updates-page .page-glow-b {
  animation: updatesGlowPulse 11s ease-in-out infinite;
}

.updates-page::after {
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 126, 84, 0.12) 48%, transparent 52%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 180px,
      rgba(255, 85, 110, 0.08) 180px,
      rgba(255, 85, 110, 0.08) 188px,
      transparent 188px,
      transparent 320px
    );
  animation-duration: 10s;
}

.updates-page .patch-metric:nth-child(2),
.updates-page .patch-chip {
  border-color: rgba(255, 150, 74, 0.38);
}

@keyframes cardSweep {
  0%, 84%, 100% {
    transform: translateX(-120%);
  }
  92% {
    transform: translateX(140%);
  }
}

@keyframes pageNoiseShift {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, -10px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes pageGlitchFlash {
  0%, 87%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  88% {
    opacity: 0.22;
    transform: translate3d(-6px, 0, 0);
  }
  89% {
    opacity: 0.08;
    transform: translate3d(4px, 0, 0);
  }
  90% {
    opacity: 0.18;
    transform: translate3d(-2px, 0, 0);
  }
  91% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes wordGlitchShake {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1px, 0);
  }
  50% {
    transform: translate(1px, -1px);
  }
  75% {
    transform: translate(0, 1px);
  }
}

@keyframes horrorTextWarp {
  0%, 100% {
    transform: translate(0, 0) skewX(0deg);
  }
  18% {
    transform: translate(-1px, 0) skewX(-10deg);
  }
  36% {
    transform: translate(1px, -1px) skewX(8deg);
  }
  54% {
    transform: translate(-1px, 1px) skewX(-6deg);
  }
  72% {
    transform: translate(1px, 0) skewX(6deg);
  }
}

@keyframes glitchTitleJitter {
  0%, 90%, 100% {
    transform: translate(0, 0);
  }
  91% {
    transform: translate(-1px, 0);
  }
  92% {
    transform: translate(1px, -1px);
  }
  93% {
    transform: translate(0, 1px);
  }
  94% {
    transform: translate(0, 0);
  }
}

@keyframes glitchTitleSliceA {
  0%, 89%, 100% {
    opacity: 0;
    transform: translate(0, 0);
  }
  90% {
    opacity: 0.55;
    transform: translate(-3px, 0);
    clip-path: inset(0 0 58% 0);
  }
  91% {
    opacity: 0.2;
    transform: translate(-1px, -1px);
    clip-path: inset(36% 0 28% 0);
  }
  92% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

@keyframes glitchTitleSliceB {
  0%, 88%, 100% {
    opacity: 0;
    transform: translate(0, 0);
  }
  89% {
    opacity: 0.45;
    transform: translate(3px, 0);
    clip-path: inset(62% 0 0 0);
  }
  90% {
    opacity: 0.18;
    transform: translate(1px, 1px);
    clip-path: inset(18% 0 46% 0);
  }
  91% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

@keyframes homeGridDrift {
  0%, 100% {
    transform: perspective(900px) rotateX(76deg) translateY(-12%) translateX(0);
  }
  50% {
    transform: perspective(900px) rotateX(76deg) translateY(-10%) translateX(1.4%);
  }
}

@keyframes homeBeamSweep {
  0% {
    transform: skewX(-18deg) translateX(-130%);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  52% {
    opacity: 0.9;
  }
  100% {
    transform: skewX(-18deg) translateX(130%);
    opacity: 0;
  }
}

@keyframes homeNoisePulse {
  0%, 100% {
    opacity: 0.16;
  }
  50% {
    opacity: 0.24;
  }
}

@keyframes homeGlowFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, -3%, 0) scale(1.08);
  }
}

@keyframes aboutGridBreath {
  0%, 100% {
    transform: perspective(900px) rotateX(76deg) translateY(-12%) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: perspective(900px) rotateX(76deg) translateY(-11%) scale(1.02);
    opacity: 0.52;
  }
}

@keyframes aboutColumnScroll {
  0% {
    transform: translateX(0);
    opacity: 0.18;
  }
  50% {
    opacity: 0.28;
  }
  100% {
    transform: translateX(-80px);
    opacity: 0.18;
  }
}

@keyframes aboutGlowShift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2%, 2%, 0) scale(1.06);
  }
}

@keyframes rulesGridFlicker {
  0%, 100% {
    opacity: 0.38;
  }
  10% {
    opacity: 0.46;
  }
  11% {
    opacity: 0.28;
  }
  12% {
    opacity: 0.5;
  }
  46% {
    opacity: 0.4;
  }
  47% {
    opacity: 0.26;
  }
  48% {
    opacity: 0.48;
  }
}

@keyframes rulesScanDrop {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  56% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(120%);
    opacity: 0;
  }
}

@keyframes rulesGlowAlarm {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate3d(0, -2%, 0) scale(1.05);
    opacity: 0.8;
  }
}

@keyframes updatesGridSlide {
  0% {
    transform: perspective(900px) rotateX(76deg) translateY(-12%) translateX(0);
  }
  100% {
    transform: perspective(900px) rotateX(76deg) translateY(-12%) translateX(-4%);
  }
}

@keyframes updatesPatchBars {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-18%);
  }
}

@keyframes updatesFeedSweep {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }
  20% {
    opacity: 0.85;
  }
  60% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes updatesGlowPulse {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, -1%, 0) scale(1.09);
  }
}

@media (max-width: 980px) {
  .hero-split,
  .dossier-grid,
  .dual-grid,
  .patch-columns {
    grid-template-columns: 1fr;
  }

  .launch-grid,
  .vector-grid,
  .patch-dashboard,
  .protocol-grid,
  .dossier-pillars {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .site-page .site-nav {
    border-radius: 18px;
  }

  .launch-grid,
  .vector-grid,
  .patch-dashboard,
  .protocol-grid,
  .dossier-pillars {
    grid-template-columns: 1fr;
  }

  .protocol-index,
  .signal-ribbon {
    gap: 0.45rem;
  }

  .status-stack div,
  .metric-stack div,
  .standards-ladder div,
  .warning-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.casino-page {
  --bg: #13070c;
  --ink: #f9e5a7;
  --muted: #d7b777;
  --primary: #cb1f3f;
  --accent: #f4bd29;
  --card: rgba(50, 12, 20, 0.78);
  --border: rgba(244, 189, 41, 0.35);
  background:
    radial-gradient(circle at 20% 20%, rgba(203, 31, 63, 0.3), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(244, 189, 41, 0.22), transparent 50%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 8px, transparent 8px, transparent 18px),
    var(--bg);
}

.casino-page .site-nav {
  background: linear-gradient(135deg, rgba(31, 5, 12, 0.96), rgba(13, 4, 8, 0.94));
  backdrop-filter: blur(14px) saturate(0.96);
  -webkit-backdrop-filter: blur(14px) saturate(0.96);
  box-shadow:
    0 0 0 1px rgba(244, 189, 41, 0.35),
    0 14px 30px rgba(0, 0, 0, 0.44);
}

.casino-page .nav-link.active,
.casino-page .nav-link:hover {
  background: rgba(244, 189, 41, 0.15);
}

.casino-page .card {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.casino-hero h1 {
  color: #ffe9ab;
  text-shadow: 0 0 10px rgba(244, 189, 41, 0.45), 0 0 20px rgba(203, 31, 63, 0.22);
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.45;
}

.bg-shape-a {
  width: 340px;
  height: 340px;
  background: #80cdb7;
  top: -100px;
  right: -90px;
}

.bg-shape-b {
  width: 280px;
  height: 280px;
  background: #f2a889;
  bottom: -90px;
  left: -70px;
}

.section {
  width: min(920px, 90vw);
  margin: 0 auto;
}

.site-nav {
  width: min(920px, 90vw);
  margin: 1rem auto 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  row-gap: 0.45rem;
  justify-content: flex-end;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.8);
}

.hero {
  padding-top: 3.2rem;
  padding-bottom: 2.3rem;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

h1 {
  margin: 0.45rem 0 0.7rem;
  font-size: clamp(2.4rem, 8vw, 4.9rem);
}

h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.centered-title {
  text-align: center;
}

.lead {
  margin: 0;
  max-width: 63ch;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-cta {
  margin-top: 1.3rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  background: transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
}

.card {
  background: var(--card);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.9rem;
}

.grid,
.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.project {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 0.8rem;
}

.project h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.project p {
  margin: 0;
  color: var(--muted);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chips li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.simple-list {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

.simple-list li {
  margin: 0.35rem 0;
}

.note {
  margin-bottom: 0;
  color: var(--muted);
}

.pillars {
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.pillar {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  padding: 0.7rem;
}

.pillar h3 {
  margin: 0;
  font-size: 1.1rem;
}

.pillar p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.quote {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.3;
  margin: 0;
}

.slot-machine {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(43, 8, 17, 0.92), rgba(23, 4, 9, 0.94));
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 122, 0.2), 0 14px 24px rgba(0, 0, 0, 0.35);
}

.machine-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0.8rem;
}

.casino-page:not(.death-wheel-page) .machine-layout {
  grid-template-columns: 1fr;
}

.marquee-lights {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.7rem;
}

.marquee-lights span {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #ffd777;
  box-shadow: 0 0 8px #ffd777;
  animation: blink 1.2s infinite alternate;
}

.marquee-lights span:nth-child(odd) {
  animation-delay: 0.35s;
  background: #ff8b69;
  box-shadow: 0 0 8px #ff8b69;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
}

.stat-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem;
  background: rgba(255, 238, 198, 0.1);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 900;
}

.casino-page:not(.death-wheel-page) .stats-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  padding-bottom: 0.1rem;
}

.casino-page:not(.death-wheel-page) .stats-grid .stat-box {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
  min-height: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.casino-page:not(.death-wheel-page) .stats-grid .stat-label {
  font-size: 0.62rem;
  line-height: 1;
  margin: 0;
}

.casino-page:not(.death-wheel-page) .stats-grid .stat-value {
  font-size: 0.76rem;
  line-height: 1;
}

.bet-panel {
  margin-top: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 238, 198, 0.07);
  padding: 0.6rem;
}

.bet-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.difficulty-row {
  grid-template-columns: 110px 1fr;
  align-items: stretch;
}

.bet-row input[type="number"] {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(20, 4, 9, 0.9);
  color: var(--ink);
  padding: 0.5rem 0.55rem;
  font-weight: 700;
}

.bet-row input[type="range"] {
  width: 100%;
  accent-color: #f4bd29;
}

.bet-row select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(20, 4, 9, 0.9);
  color: var(--ink);
  padding: 0.5rem 0.55rem;
  font-weight: 700;
}

.difficulty-pill {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  color: #ffe7a1;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 238, 198, 0.1);
}

.difficulty-note {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  color: #ffd18a;
  font-size: 0.85rem;
  background: rgba(255, 238, 198, 0.08);
}

.reels {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}

.reel-slot {
  border: 1px solid rgba(244, 189, 41, 0.35);
  border-radius: 12px;
  background: rgba(255, 238, 198, 0.06);
  padding: 0.45rem;
}

.reel-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd89a;
  margin-bottom: 0.28rem;
  text-align: center;
}

.reel {
  min-height: 86px;
  display: grid;
  place-items: center;
  font-size: 2.45rem;
  font-weight: 900;
  border: 1px solid rgba(244, 189, 41, 0.5);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff2cf, #ffd77f);
  color: #2a1a00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.skip-toggle {
  margin-top: 0.65rem;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: #ffe7a1;
  font-size: 0.92rem;
}

.skip-toggle input {
  accent-color: #f4bd29;
}

.quick-toggle-row {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.quick-toggle-row .skip-toggle {
  margin-top: 0;
}

#dwShopModal .shop-meta,
#dwShopModal .shop-desc,
#dwShopModal .shop-extra-info {
  margin: 0.22rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#dwShopModal .shop-desc {
  color: #fff0c8;
}

body:not(.dw-show-shop-info) #dwShopModal .shop-extra-info {
  display: none;
}

.game-btn {
  cursor: pointer;
}

.game-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.event-log {
  margin: 0.85rem 0 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 238, 198, 0.08);
  padding: 0.65rem;
  color: #f2d58d;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.upgrade-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 238, 198, 0.08);
  padding: 0.8rem;
}

.upgrade-card h3 {
  margin: 0;
}

#dwShopOffers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upgrade-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.payout-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(43, 8, 17, 0.9), rgba(22, 5, 11, 0.94));
  padding: 0.85rem;
}

.payout-card h3 {
  margin: 0;
}

.payout-scroll {
  margin-top: 0.65rem;
  border: 1px solid rgba(244, 189, 41, 0.35);
  border-radius: 10px;
}

.payout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.payout-table th,
.payout-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(244, 189, 41, 0.2);
  text-align: left;
}

.payout-table thead th {
  position: sticky;
  top: 0;
  background: rgba(24, 5, 9, 0.95);
}

.balance-table-wrap {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.88);
}

.balance-table {
  min-width: 860px;
  font-size: 0.92rem;
}

.balance-table th,
.balance-table td {
  color: #1b160f;
  white-space: nowrap;
}

.balance-table thead th {
  background: #2f1d08;
  color: #ffebba;
}

.concept-table-wrap {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  background: rgba(255, 238, 198, 0.06);
}

.concept-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.concept-table th,
.concept-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(244, 189, 41, 0.22);
  text-align: left;
}

.concept-table thead th {
  background: rgba(24, 5, 9, 0.95);
  color: #ffe8b0;
}

.blackjack-screen {
  margin-top: 0.7rem;
  border: 1px solid rgba(244, 189, 41, 0.4);
  border-radius: 16px;
  background: linear-gradient(180deg, #163b29, #0f2f21);
  box-shadow: inset 0 0 0 2px rgba(255, 236, 185, 0.12), 0 14px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.death-blackjack-page {
  background:
    radial-gradient(circle at 50% -6%, rgba(255, 220, 153, 0.18), transparent 18%),
    radial-gradient(circle at 18% 14%, rgba(255, 95, 43, 0.22), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 120, 50, 0.16), transparent 20%),
    radial-gradient(circle at 50% 104%, rgba(112, 5, 20, 0.62), transparent 38%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 28%),
    repeating-linear-gradient(150deg, rgba(255, 255, 255, 0.018) 0 7px, transparent 7px 18px),
    linear-gradient(180deg, #260308 0%, #120205 42%, #090103 72%, #170306 100%);
}

.death-blackjack-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 193, 94, 0.08), transparent 22%),
    linear-gradient(90deg, transparent 0 10%, rgba(255, 160, 77, 0.03) 10% 11%, transparent 11% 89%, rgba(255, 160, 77, 0.03) 89% 90%, transparent 90% 100%);
  opacity: 0.95;
}

.death-blackjack-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 100%, rgba(255, 85, 33, 0.12), transparent 22%),
    radial-gradient(circle at 88% 100%, rgba(255, 85, 33, 0.12), transparent 22%),
    linear-gradient(180deg, transparent 0 62%, rgba(255, 94, 46, 0.06) 76%, transparent 100%);
  mix-blend-mode: screen;
}

.death-blackjack-page .bg-shape-a {
  width: 420px;
  height: 420px;
  top: -60px;
  left: -70px;
  background: radial-gradient(circle, rgba(255, 108, 52, 0.5), rgba(117, 7, 23, 0.08) 62%, transparent 74%);
  opacity: 0.42;
  filter: blur(68px);
}

.death-blackjack-page .bg-shape-b {
  width: 360px;
  height: 360px;
  right: -40px;
  bottom: -20px;
  background: radial-gradient(circle, rgba(255, 196, 91, 0.22), rgba(148, 14, 29, 0.18) 54%, transparent 72%);
  opacity: 0.4;
  filter: blur(72px);
}

.death-blackjack-page .card {
  background:
    radial-gradient(circle at top, rgba(255, 170, 91, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(45, 8, 15, 0.94), rgba(18, 4, 7, 0.96));
  border-color: rgba(255, 185, 75, 0.38);
}

.death-blackjack-page .section {
  width: min(1280px, 96vw);
}

.death-blackjack-page .boss-gallery-card {
  display: grid;
  gap: 0.95rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top, rgba(255, 164, 74, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(54, 8, 15, 0.95), rgba(16, 3, 7, 0.98));
}

.death-blackjack-page .boss-gallery-copy {
  display: grid;
  gap: 0.25rem;
}

.death-blackjack-page .boss-gallery-copy h2 {
  margin: 0;
  color: #ffe7b4;
}

.death-blackjack-page .boss-gallery-copy .note {
  margin: 0;
  color: #ffcf98;
}

.death-blackjack-page .boss-gallery-figure {
  margin: 0;
  border: 1px solid rgba(255, 181, 85, 0.42);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(33, 4, 10, 0.94), rgba(14, 2, 6, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 170, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.death-blackjack-page .boss-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.death-blackjack-page .blackjack-screen {
  position: relative;
  border-color: rgba(255, 168, 71, 0.55);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 105, 58, 0.16), transparent 22%),
    radial-gradient(circle at 50% 78%, rgba(0, 0, 0, 0.28), transparent 42%),
    linear-gradient(180deg, #4b0712 0%, #28050b 18%, #120408 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 224, 170, 0.09),
    inset 0 0 90px rgba(255, 84, 38, 0.08),
    0 20px 42px rgba(0, 0, 0, 0.45);
}

.death-blackjack-page .inferno-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 211, 132, 0.18), transparent 24%),
    radial-gradient(circle at 12% 100%, rgba(255, 72, 0, 0.12), transparent 26%),
    radial-gradient(circle at 88% 100%, rgba(255, 72, 0, 0.12), transparent 26%),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(255, 232, 181, 0.018) 84px 88px);
  mix-blend-mode: screen;
}

.death-blackjack-page .inferno-marquee {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.18rem;
  justify-items: center;
  padding: 0.9rem 1rem 0.35rem;
  text-align: center;
}

.death-blackjack-page .inferno-marquee-main {
  color: #ffe9b3;
  font-family: "Newsreader", serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 177, 64, 0.45),
    0 0 24px rgba(255, 67, 28, 0.28);
}

.death-blackjack-page .inferno-marquee-sub {
  color: #ffca84;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.92;
}

.home-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.home-screen.hidden {
  display: none;
}

.home-screen-standalone {
  position: relative;
  inset: auto;
  padding: 0;
  place-items: stretch;
}

.home-screen-standalone .home-screen-backdrop {
  display: none;
}

.home-screen-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 122, 54, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(10, 0, 0, 0.68), rgba(4, 0, 0, 0.88));
  backdrop-filter: blur(6px);
}

.home-screen-card {
  position: relative;
  z-index: 1;
  width: min(1140px, 100%);
  border: 1px solid rgba(255, 192, 111, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(40, 8, 7, 0.96), rgba(16, 2, 2, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.death-blackjack-home-page .home-screen-card {
  gap: 0.55rem;
}

.death-blackjack-home-page #bjHomeStatus {
  display: none;
}

.home-screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.home-kicker {
  margin: 0 0 0.2rem;
  color: #ffbf7a;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.home-screen-head h3 {
  margin: 0;
  color: #fff0c9;
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
}

.home-screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.home-screen-grid {
  display: grid;
  grid-template-columns: 0.88fr 0.96fr 1.08fr;
  gap: 0.55rem;
}

.home-screen-grid-compact {
  align-items: start;
}

.home-screen-grid-duo {
  grid-template-columns: 0.92fr 1.08fr;
}

.home-top-route {
  margin-top: 0;
}

.utility-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-card {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 12px;
  background: rgba(24, 7, 7, 0.52);
  padding: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.home-card-summary {
  align-content: start;
}

.home-card-wide {
  min-height: 100%;
}

.home-card-scroll {
  max-height: 220px;
  overflow: hidden;
}

.home-run-log-card {
  min-height: auto;
}

.home-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.home-progress-stat {
  border: 1px solid rgba(255, 236, 185, 0.12);
  border-radius: 10px;
  padding: 0.38rem 0.45rem;
  background: rgba(11, 4, 4, 0.38);
}

.home-progress-stat strong {
  display: block;
  color: #fff0c9;
  font-size: 0.84rem;
}

.home-progress-stat span {
  color: #d7b182;
  font-size: 0.66rem;
  line-height: 1.3;
}

.home-title-collection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-content: start;
  max-height: 180px;
  overflow: auto;
  padding-right: 0.2rem;
}

.home-run-log {
  display: grid;
  gap: 0.35rem;
  max-height: 112px;
  overflow: auto;
  padding-right: 0.15rem;
}

.home-run-log-empty {
  border: 1px dashed rgba(255, 236, 185, 0.18);
  border-radius: 10px;
  padding: 0.48rem 0.55rem;
  color: #cfa36f;
  font-size: 0.72rem;
  line-height: 1.35;
  background: rgba(13, 4, 4, 0.32);
}

.home-run-log-entry {
  border: 1px solid rgba(255, 236, 185, 0.12);
  border-radius: 10px;
  padding: 0.42rem 0.5rem;
  background: rgba(12, 4, 4, 0.4);
  display: grid;
  gap: 0.12rem;
}

.home-run-log-entry strong {
  color: #fff0c9;
  font-size: 0.74rem;
}

.home-run-log-entry span,
.home-run-log-entry small {
  color: #d7b182;
  font-size: 0.66rem;
  line-height: 1.28;
}

.home-title-chip {
  border: 1px solid rgba(255, 236, 185, 0.15);
  border-radius: 10px;
  background: rgba(14, 4, 4, 0.42);
  padding: 0.48rem 0.52rem;
  display: grid;
  gap: 0.14rem;
}

.home-title-chip strong {
  color: #ffe2a1;
  font-size: 0.84rem;
}

.home-title-chip small,
.home-title-chip span {
  color: #d7b182;
  font-size: 0.72rem;
  line-height: 1.35;
}

.home-title-chip.locked {
  opacity: 0.66;
  filter: saturate(0.72);
}

.achievement-progress {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.18rem;
}

.achievement-progress-bar {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 236, 185, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 185, 0.08);
}

.achievement-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7f4d 0%, #ffd06b 100%);
  box-shadow: 0 0 10px rgba(255, 157, 79, 0.28);
}

.achievement-progress small {
  color: #e0b788;
  font-size: 0.64rem;
  line-height: 1.25;
}

.home-title-chip.equipped {
  box-shadow: 0 0 0 1px rgba(255, 171, 73, 0.24);
}

.home-level-card {
  display: grid;
  gap: 0.75rem;
}

.home-level-card-compact {
  gap: 0.42rem;
  padding: 0.52rem 0.6rem;
}

.home-level-track {
  display: grid;
  gap: 0.45rem;
}

.home-level-summary {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: end;
  flex-wrap: wrap;
}

.home-level-summary strong {
  display: block;
  color: #fff0c9;
  font-size: clamp(0.88rem, 1.35vw, 1.12rem);
}

.home-level-summary span,
.home-level-kicker {
  color: #d7b182;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-level-kicker {
  margin: 0 0 0.18rem;
}

.home-level-rank {
  text-align: right;
}

.home-level-bar {
  position: relative;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 236, 185, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 185, 0.08);
}

.home-level-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7f4d 0%, #ffd06b 100%);
  box-shadow: 0 0 16px rgba(255, 157, 79, 0.45);
}

.home-level-unlocks {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.15rem;
  scroll-snap-type: x proximity;
}

.home-unlock-chip {
  border: 1px solid rgba(255, 236, 185, 0.12);
  border-radius: 10px;
  padding: 0.36rem 0.42rem;
  background: rgba(12, 4, 4, 0.34);
  display: grid;
  gap: 0.16rem;
  min-width: 190px;
  flex: 0 0 190px;
  scroll-snap-align: start;
}

.home-unlock-chip span {
  color: #ffbf7a;
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-unlock-chip strong {
  color: #fff0c9;
  font-size: 0.78rem;
}

.home-unlock-chip small {
  color: #d7b182;
  font-size: 0.66rem;
  line-height: 1.28;
}

.home-unlock-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.1rem;
}

.home-unlock-rewards em {
  font-style: normal;
  color: #fff0c9;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 208, 107, 0.18);
  background: rgba(255, 208, 107, 0.08);
  border-radius: 999px;
  padding: 0.14rem 0.34rem;
  white-space: nowrap;
}

.loss-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(140, 0, 0, 0.35), transparent 35%),
    linear-gradient(180deg, #180000 0%, #090000 100%);
  transition: filter 0.06s linear, transform 0.06s linear;
}

.loss-overlay-card {
  position: absolute;
  top: 8%;
  left: 10%;
  width: 80%;
  max-width: 900px;
  z-index: 3;
  color: #ff5a5a;
  text-shadow: 0 0 10px rgba(255, 70, 70, 0.28);
  pointer-events: auto;
}

.loss-grid,
.loss-noise,
.loss-scanlines,
.loss-bg-errors,
.loss-flash,
.loss-suits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.loss-grid {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 40, 40, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 40, 40, 0.05) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
}

.loss-scanlines::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 70, 70, 0.035) 0px,
    rgba(255, 70, 70, 0.035) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: lossScan 7s linear infinite;
}

.loss-noise {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 60, 60, 0.25) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(255, 60, 60, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 60, 60, 0.15) 0 1px, transparent 1px);
  background-size: 160px 160px, 220px 220px, 260px 260px;
  animation: lossNoiseShift 0.35s steps(2) infinite;
}

.loss-bg-errors {
  z-index: 1;
  overflow: hidden;
}

.loss-bg-errors span {
  position: absolute;
  color: rgba(255, 70, 70, 0.15);
  font-size: clamp(10px, 1vw, 15px);
  letter-spacing: 0.1em;
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 0 8px rgba(255, 50, 50, 0.15);
  animation: lossDrift 10s linear infinite;
}

.loss-suits {
  z-index: 1;
  opacity: 0.08;
  font-size: 48px;
  color: #ff4d4d;
}

.loss-suits span {
  position: absolute;
  user-select: none;
}

.loss-flash {
  background: rgba(255, 50, 50, 0);
  mix-blend-mode: screen;
  transition: background 0.05s linear;
}

.loss-terminal {
  position: relative;
  z-index: 3;
}

.loss-line {
  margin: 0 0 12px;
  color: #ff7070;
  font-size: clamp(22px, 2.2vw, 38px);
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.loss-divider {
  width: min(720px, 88%);
  height: 2px;
  margin: 20px 0 34px;
  background: linear-gradient(90deg, rgba(255, 80, 80, 0.95), rgba(255, 80, 80, 0.12));
  box-shadow: 0 0 8px rgba(255, 70, 70, 0.4);
}

.loss-gap-sm {
  height: 20px;
}

.loss-gap-md {
  height: 36px;
}

.glitch-line {
  position: relative;
  display: inline-block;
  animation: lossTextJitter 3.5s infinite;
}

.glitch-line::before,
.glitch-line::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch-line::before {
  color: rgba(255, 140, 140, 0.6);
  transform: translate(-2px, 0);
  animation: glitchSliceA 4s infinite;
}

.glitch-line::after {
  color: rgba(255, 0, 0, 0.7);
  transform: translate(2px, 0);
  animation: glitchSliceB 4s infinite;
}

.loss-actions {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

.loss-note {
  color: #ff9c9c;
  font-size: 0.82rem;
}

.table-rail {
  height: 14px;
  background: linear-gradient(90deg, #9a6727, #d2a14b, #9a6727);
  border-bottom: 1px solid rgba(30, 12, 3, 0.55);
}

.table-inner {
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  position: relative;
}

.death-blackjack-page .table-rail {
  height: 16px;
  background:
    linear-gradient(90deg, #4f090f, #f08a2c 18%, #ffd17c 48%, #f08a2c 82%, #4f090f),
    linear-gradient(180deg, rgba(255, 241, 196, 0.18), transparent);
  box-shadow:
    inset 0 -1px 0 rgba(31, 3, 5, 0.8),
    0 0 18px rgba(255, 103, 48, 0.2);
}

.death-blackjack-page .table-inner {
  padding: 0.8rem 1rem 1.1rem;
  gap: 0.75rem;
}

.table-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.table-summary-card {
  border: 1px solid rgba(255, 188, 108, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(52, 9, 16, 0.84), rgba(16, 4, 8, 0.92));
  padding: 0.55rem 0.75rem 0.6rem;
  box-shadow: inset 0 1px 0 rgba(255, 228, 184, 0.05);
}

.table-summary-label {
  display: block;
  color: #ffcb7e;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.table-summary-value {
  display: block;
  margin-top: 0.2rem;
  color: #fff0c8;
  font-size: 0.92rem;
  line-height: 1.3;
}

.command-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
  gap: 0.75rem;
  align-items: stretch;
}

.command-main {
  border: 1px solid rgba(255, 188, 108, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(46, 8, 14, 0.86), rgba(18, 5, 8, 0.94));
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.table-intel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
  gap: 0.75rem;
}

.table-panel {
  border: 1px solid rgba(255, 188, 108, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(46, 8, 14, 0.82), rgba(18, 5, 8, 0.94));
  padding: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 228, 184, 0.04);
}

.table-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.table-panel-kicker {
  color: #ffd978;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.table-panel-meta {
  color: #cda16f;
  font-size: 0.77rem;
}

.combat-log-list,
.dealer-intel-list {
  display: grid;
  gap: 0.45rem;
}

.combat-log-entry,
.dealer-intel-entry {
  border: 1px solid rgba(255, 188, 108, 0.14);
  border-radius: 12px;
  background: rgba(22, 5, 9, 0.8);
  padding: 0.5rem 0.6rem;
}

.combat-log-entry {
  color: #ffe9bf;
  font-size: 0.86rem;
  line-height: 1.35;
}

.combat-log-entry.is-latest {
  border-color: rgba(255, 201, 113, 0.34);
  background: linear-gradient(180deg, rgba(79, 16, 19, 0.78), rgba(27, 6, 9, 0.88));
}

.dealer-intel-entry-title {
  display: block;
  color: #ffe2a3;
  font-size: 0.84rem;
  font-weight: 800;
}

.dealer-intel-entry-copy {
  display: block;
  margin-top: 0.12rem;
  color: #e6c895;
  font-size: 0.8rem;
  line-height: 1.35;
}

.dealer-intel-entry-copy strong {
  color: #fff1cd;
}

.table-panel-empty {
  border: 1px dashed rgba(255, 188, 108, 0.18);
  border-radius: 12px;
  padding: 0.7rem;
  color: #cfa776;
  font-size: 0.84rem;
  background: rgba(18, 5, 8, 0.55);
}

.table-advice {
  justify-self: stretch;
  max-width: none;
  border: 1px solid rgba(255, 216, 126, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(59, 19, 12, 0.78), rgba(18, 7, 6, 0.7));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  padding: 0.7rem 0.85rem;
  pointer-events: none;
  opacity: 0.95;
  min-height: 100%;
  animation: none;
}

.table-advice-kicker {
  display: block;
  color: #ffd978;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.table-advice-text {
  margin: 0.18rem 0 0;
  color: #fff0c8;
  font-size: 0.83rem;
  line-height: 1.4;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 260ms ease;
  will-change: opacity, transform, filter;
}

.table-advice-text.tip-switching {
  opacity: 0.18;
  transform: translateY(-6px) scale(0.985);
  filter: blur(1.2px);
}

.table-advice-text.tip-entered {
  animation: tipSettle 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.game-tip-panel {
  margin-top: 0.45rem;
}

.slot-machine > .game-tip-panel {
  justify-self: stretch;
  max-width: none;
}

.game-tip-panel-center {
  justify-self: center;
  width: min(460px, 100%);
}

.hand-row {
  border: 1px solid rgba(255, 236, 185, 0.2);
  border-radius: 12px;
  background: rgba(10, 25, 18, 0.42);
  padding: 0.7rem;
}

.death-blackjack-page .hand-row,
.death-blackjack-page .count-helper,
.death-blackjack-page .run-info-panel,
.death-blackjack-page .table-hand-tile {
  border-color: rgba(255, 186, 92, 0.24);
  background:
    linear-gradient(180deg, rgba(54, 8, 15, 0.72), rgba(16, 4, 8, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 214, 156, 0.04);
}

.death-blackjack-page .danger-badge {
  border-color: rgba(255, 164, 77, 0.56);
  background:
    linear-gradient(90deg, rgba(79, 8, 18, 0.92), rgba(118, 17, 26, 0.94));
  color: #ffe4a7;
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 145, 0.08),
    0 0 24px rgba(180, 18, 30, 0.18);
}

.death-blackjack-page .dealer-face {
  filter: drop-shadow(0 0 10px rgba(255, 118, 62, 0.22));
}

.death-blackjack-page .chip-zone {
  border-color: rgba(255, 176, 84, 0.28);
  background:
    radial-gradient(circle at top, rgba(255, 122, 54, 0.12), transparent 46%),
    rgba(34, 6, 11, 0.72);
}

.death-blackjack-page .btn-primary {
  background:
    linear-gradient(180deg, #ffb14c, #de531f);
  color: #250204;
  box-shadow:
    0 8px 18px rgba(255, 102, 41, 0.22),
    inset 0 1px 0 rgba(255, 238, 198, 0.35);
}

.death-blackjack-page .btn-outline {
  border-color: rgba(255, 178, 83, 0.42);
  background: rgba(42, 7, 12, 0.9);
  color: #ffe5ab;
}

.death-blackjack-page .btn-outline:hover {
  background: rgba(71, 10, 16, 0.96);
}

.dealer-row {
  position: relative;
  min-height: 230px;
  padding: 0.9rem 8.8rem 0.9rem 0.9rem;
  overflow: hidden;
}

.dealer-row .hand-meta {
  position: absolute;
  top: 0.8rem;
  left: 0.9rem;
  z-index: 2;
  padding-right: 0;
}

.dealer-row .playing-cards {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
}

.dealer-row .deck-box {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.dealer-pool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem;
}

.dealer-pool:empty {
  display: none;
}

.dealer-pool-hand {
  border: 1px solid rgba(255, 192, 108, 0.2);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(46, 9, 14, 0.78), rgba(16, 4, 8, 0.86));
  padding: 0.38rem 0.45rem 0.45rem;
}

.dealer-pool-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: #ffdba0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dealer-pool-cards {
  min-height: 56px;
}

.dealer-pool-cards .playing-card {
  width: 38px;
  padding: 0.22rem;
}

.dealer-pool-cards .playing-card .rank {
  font-size: 0.8rem;
}

.dealer-pool-cards .playing-card .suit {
  font-size: 0.82rem;
}

.dealer-impact {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(170px, 24vw, 290px);
  max-width: none;
  pointer-events: none;
  z-index: 4;
  image-rendering: pixelated;
  opacity: 0.98;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.44));
  transform: translate(-50%, -50%);
}

.dealer-impact.hidden {
  display: none !important;
}

.dealer-row.boss-impact-active .dealer-face[data-boss-face="lord-asmodeus"] {
  opacity: 0;
}

.dealer-impact-break {
  width: clamp(240px, 31vw, 380px);
}

.dealer-impact-final {
  transform: translate(-50%, -50%) scale(1.08);
}

.dealer-face {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 227, 158, 0.35);
  background: rgba(16, 9, 4, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 220, 130, 0.1);
  animation: dealerIdle 2.8s ease-in-out infinite;
}

.dealer-row .dealer-face {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-bottom: 0;
  translate: -50% -50%;
  z-index: 1;
}

.dealer-face[data-boss-face] {
  width: clamp(156px, 22vw, 260px);
  height: clamp(156px, 22vw, 260px);
  border-radius: 28px;
  border-color: rgba(255, 183, 91, 0.52);
  background-color: rgba(22, 4, 8, 0.92);
  background-image: url("./games/death-blackjack/Demonic casino bosses in pixel art.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  box-shadow:
    0 0 0 1px rgba(255, 222, 166, 0.14),
    0 18px 30px rgba(0, 0, 0, 0.34);
  animation:
    bossDealerIdle 3.2s ease-in-out infinite,
    bossDealerGlow 2.8s ease-in-out infinite;
  transform-origin: center 85%;
}

.dealer-face[data-character-face="true"] {
  width: clamp(132px, 18vw, 210px);
  height: clamp(132px, 18vw, 210px);
  border-radius: 24px;
  border-color: rgba(255, 183, 91, 0.5);
  background-color: rgba(22, 4, 8, 0.9);
  background-image: var(--dealer-face-image);
  background-repeat: no-repeat;
  background-size: var(--dealer-face-size, cover);
  background-position: var(--dealer-face-position, center);
  box-shadow:
    0 0 0 1px rgba(255, 222, 166, 0.14),
    0 16px 28px rgba(0, 0, 0, 0.34);
  animation:
    bossDealerIdle 3.2s ease-in-out infinite,
    bossDealerGlow 2.8s ease-in-out infinite;
}

.dealer-face[data-boss-face="lord-asmodeus"] { background-position: 0% 0%; }
.dealer-face[data-boss-face="jack-of-lies"] { background-position: 50% 0%; }
.dealer-face[data-boss-face="mammon"] { background-position: 100% 0%; }
.dealer-face[data-boss-face="mortis"] { background-position: 0% 100%; }
.dealer-face[data-boss-face="lilith"] { background-position: 50% 100%; }
.dealer-face[data-boss-face="belial"] { background-position: 100% 100%; }

.dealer-row.dealer-acting .dealer-face {
  animation: dealerAct 0.65s ease-in-out 2;
}

.dealer-row.dealer-acting .dealer-face[data-boss-face] {
  animation:
    dealerAct 0.65s ease-in-out 2,
    bossDealerGlow 1.1s ease-in-out infinite;
}

.dealer-row.dealer-acting .dealer-face[data-character-face="true"] {
  animation:
    dealerAct 0.65s ease-in-out 2,
    bossDealerGlow 1.1s ease-in-out infinite;
}

@keyframes bossDealerIdle {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-2px) scale(1.015);
  }
  55% {
    transform: translateY(1px) scale(0.995);
  }
  75% {
    transform: translateY(-1px) scale(1.01);
  }
}

@keyframes bossDealerGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 222, 166, 0.14),
      0 18px 30px rgba(0, 0, 0, 0.34),
      0 0 14px rgba(255, 114, 52, 0.12);
    filter: saturate(1) brightness(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 222, 166, 0.18),
      0 20px 34px rgba(0, 0, 0, 0.38),
      0 0 22px rgba(255, 114, 52, 0.22);
    filter: saturate(1.08) brightness(1.04);
  }
}

@media (max-width: 720px) {
  .dealer-row {
    min-height: 180px;
    padding-right: 6.3rem;
  }

  .dealer-row .hand-meta {
    left: 0.7rem;
  }

  .dealer-row .playing-cards {
    left: 0.7rem;
    bottom: 0.7rem;
  }

  .dealer-row .deck-box {
    right: 0.7rem;
  }

  .dealer-impact {
    left: 50%;
    top: 50%;
    width: min(42vw, 220px);
  }

  .dealer-impact-break {
    width: min(54vw, 280px);
  }

  .dealer-face[data-boss-face] {
    width: 120px;
    height: 120px;
    border-radius: 22px;
  }

  .dealer-face[data-character-face="true"] {
    width: 104px;
    height: 104px;
    border-radius: 20px;
  }
}

@media (max-width: 980px) {
  .table-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .command-deck {
    grid-template-columns: 1fr;
  }

  .table-intel-grid {
    grid-template-columns: 1fr;
  }
}

.hand-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.hand-title {
  color: #ffe2a1;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hand-total {
  color: #e7c985;
  font-weight: 700;
  font-size: 0.85rem;
}

.playing-cards {
  position: relative;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.deck-box {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 62px;
  height: 84px;
  border-radius: 10px;
  border: 1px solid rgba(244, 189, 41, 0.55);
  background:
    repeating-linear-gradient(45deg, rgba(255, 227, 156, 0.13) 0, rgba(255, 227, 156, 0.13) 7px, transparent 7px, transparent 14px),
    linear-gradient(180deg, #521123, #270711);
  color: #ffdca0;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 0;
  z-index: 2;
}

.deal-fly-card {
  position: fixed;
  width: 48px;
  height: 68px;
  border-radius: 8px;
  border: 1px solid rgba(38, 22, 7, 0.3);
  background: linear-gradient(180deg, #fff7e2, #e8d6a8);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.35);
  z-index: 80;
  pointer-events: none;
  transform-origin: center center;
}

.playing-card {
  width: 76px;
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff8e7, #f2e3bf);
  border: 1px solid rgba(34, 20, 6, 0.25);
  color: #1e1406;
  display: grid;
  align-content: space-between;
  padding: 0.4rem;
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3);
}

.playing-card.slam-in {
  animation: cardSlam 0.28s cubic-bezier(.15,.9,.2,1), cardDropTilt 0.28s ease-out;
}

.playing-card .rank {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.playing-card .suit {
  justify-self: end;
  font-size: 1.2rem;
  line-height: 1;
}

.playing-card .suit.red-suit {
  color: #9e1229;
}

.playing-card.special-card {
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(255, 238, 187, 0.2), 0 10px 18px rgba(0, 0, 0, 0.35);
}

.playing-card.shop-card {
  border-color: rgba(244, 189, 41, 0.72);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 224, 145, 0.18), transparent 46%),
    linear-gradient(180deg, #fff3df, #efd7b2);
}

.playing-card.special-card .rank,
.playing-card.special-card .suit {
  text-shadow: 0 0 6px rgba(255, 232, 150, 0.2);
}

.playing-card.golden-ace {
  border-color: #c29123;
  background: linear-gradient(180deg, #fff6dd, #ebd18b);
}

.playing-card.chaos-joker {
  border-color: #aa2c48;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 214, 122, 0.25), transparent 46%),
    linear-gradient(180deg, #ffe8d8, #f2bad0);
}

.playing-card.wild-card {
  border-color: #2d69c4;
  background:
    linear-gradient(135deg, rgba(50, 89, 171, 0.15), rgba(173, 57, 110, 0.15)),
    linear-gradient(180deg, #f1f5ff, #d5e3ff);
}

.playing-card.curse-card {
  border-style: dashed;
}

.playing-card.burn-card {
  border-color: #b33a25;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 142, 92, 0.25), transparent 45%),
    linear-gradient(180deg, #ffe9df, #ffc9ae);
}

.playing-card.greed-card {
  border-color: #a67a1c;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 215, 122, 0.35), transparent 42%),
    linear-gradient(180deg, #fff5d8, #f0dd98);
}

.playing-card.mirror-card {
  border-color: #60728e;
  background:
    linear-gradient(135deg, rgba(96, 114, 142, 0.2), rgba(211, 221, 234, 0.15)),
    linear-gradient(180deg, #edf2fb, #cfd8ea);
}

.playing-card.frozen {
  border-color: #55b0d8;
  box-shadow: 0 0 0 1px rgba(85, 176, 216, 0.35), 0 8px 16px rgba(0, 0, 0, 0.35);
}

.special-badge {
  justify-self: start;
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 900;
  border-radius: 999px;
  border: 1px solid rgba(25, 16, 5, 0.35);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.08rem 0.3rem;
}

.playing-card.facedown {
  background:
    repeating-linear-gradient(45deg, rgba(255, 227, 156, 0.16) 0, rgba(255, 227, 156, 0.16) 8px, transparent 8px, transparent 16px),
    linear-gradient(180deg, #601026, #2f0715);
  border-color: rgba(244, 189, 41, 0.45);
  color: #ffd989;
  place-items: center;
  align-content: center;
}

.playing-card.reveal-flip {
  animation: dealerRevealFlip 0.42s ease-out;
  transform-origin: center;
}

.card-back-mark {
  font-size: 1.4rem;
  font-weight: 900;
}

.danger-badge {
  border: 1px solid rgba(229, 81, 92, 0.7);
  border-radius: 999px;
  background: rgba(116, 16, 30, 0.45);
  color: #ffb5bd;
  padding: 0.35rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 800;
  justify-self: center;
}

.chip-zone {
  border: 1px solid rgba(255, 236, 185, 0.25);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: rgba(10, 25, 18, 0.36);
}

.chip-zone-label {
  display: block;
  font-size: 0.75rem;
  color: #f0d395;
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chip-stack {
  min-height: 34px;
  display: flex;
  align-items: flex-end;
  gap: 0.2rem;
}

.chip {
  width: 12px;
  border-radius: 5px;
  border: 1px solid rgba(20, 7, 2, 0.45);
  background: linear-gradient(180deg, #ffd88d, #cf8b2f);
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.3);
  transform-origin: bottom center;
}

.chip.grow {
  animation: chipGrow 0.24s ease-out;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ability-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.utility-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.table-controls .btn,
.utility-controls .btn {
  min-width: 128px;
}

.command-main {
  display: grid;
  gap: 0.75rem;
}

.command-subtools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.count-helper {
  border: 1px solid rgba(255, 236, 185, 0.28);
  border-radius: 10px;
  background: rgba(10, 25, 18, 0.36);
  padding: 0.45rem 0.55rem;
}

.command-subtools .count-helper {
  min-width: min(100%, 320px);
}

.casino-page {
  --game-gold: rgba(244, 189, 41, 0.34);
  --game-gold-strong: rgba(255, 220, 128, 0.7);
  --game-crimson: rgba(203, 31, 63, 0.52);
  --game-panel-bg: linear-gradient(180deg, rgba(46, 8, 14, 0.88), rgba(16, 4, 8, 0.96));
  --game-panel-soft: rgba(255, 238, 198, 0.06);
}

.casino-page .section,
.casino-page .site-nav {
  width: min(1180px, 94vw);
}

.game-hero {
  padding-top: 3.35rem;
  padding-bottom: 2rem;
}

.game-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.game-hero-copy,
.game-hero-panel,
.game-stage-card,
.game-brief-card {
  position: relative;
  overflow: hidden;
}

.game-hero-copy,
.game-hero-panel {
  border: 1px solid var(--game-gold);
  border-radius: 24px;
  background: var(--game-panel-bg);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 242, 202, 0.05);
  padding: 1.35rem 1.4rem;
}

.game-hero-copy::before,
.game-hero-panel::before,
.game-stage-card::before,
.game-brief-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 58%);
  transform: translateX(-120%);
  animation: gameCardSweep 9s ease-in-out infinite;
  pointer-events: none;
}

.game-panel-kicker {
  display: inline-block;
  color: #ffd68b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.game-panel-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.game-panel-grid div {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid rgba(255, 235, 184, 0.08);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

.game-panel-grid span {
  color: #d8af75;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
}

.game-panel-grid strong {
  color: #fff0c9;
  text-align: right;
  font-size: 0.92rem;
}

.game-signal-bar {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.game-signal-bar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 222, 166, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #fff0c9;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.game-brief-card,
.game-stage-card {
  border-color: rgba(255, 213, 141, 0.24);
  background:
    radial-gradient(circle at top, rgba(255, 210, 125, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(45, 8, 15, 0.92), rgba(16, 4, 8, 0.96));
}

.game-stage-card {
  padding: 1.35rem;
  border-radius: 24px;
}

.game-stage-card h2,
.game-brief-card h2 {
  position: relative;
  z-index: 1;
}

.gambling-king-page {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 168, 70, 0.18), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(203, 31, 63, 0.24), transparent 26%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 20%),
    repeating-linear-gradient(90deg, rgba(255, 225, 160, 0.02) 0 1px, transparent 1px 90px),
    linear-gradient(180deg, #19050c 0%, #0f0409 45%, #15070d 100%);
}

.gambling-king-page::before,
.gambling-king-page::after,
.death-wheel-page::before,
.death-wheel-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.gambling-king-page::before {
  z-index: -1;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 223, 146, 0.14), transparent 22%),
    repeating-linear-gradient(90deg, transparent 0 116px, rgba(255, 214, 145, 0.025) 116px 120px);
  opacity: 0.9;
}

.gambling-king-page::after {
  z-index: -1;
  inset: auto -8% 18% -8%;
  height: 180px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 198, 93, 0.2) 48%, transparent 52%);
  filter: blur(28px);
  animation: kingSweep 12s linear infinite;
}

.gambling-king-page .game-hero-copy,
.gambling-king-page .game-hero-panel {
  background:
    radial-gradient(circle at top, rgba(255, 208, 119, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(71, 12, 22, 0.92), rgba(21, 5, 10, 0.96));
  border-color: rgba(255, 204, 112, 0.28);
}

.gambling-king-page .game-signal-bar span {
  background: linear-gradient(180deg, rgba(102, 22, 36, 0.9), rgba(46, 8, 14, 0.92));
}

.casino-page.gambling-king-page .machine-layout {
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.88fr);
  align-items: start;
  gap: 1rem;
}

.gambling-king-page .slot-machine--king {
  position: relative;
  border-radius: 20px;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 220, 137, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(78, 14, 26, 0.96), rgba(24, 5, 10, 0.98));
  border: 1px solid rgba(255, 212, 123, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 198, 0.07),
    0 24px 44px rgba(0, 0, 0, 0.42);
}

.gambling-king-page .slot-machine--king::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 198, 109, 0.16);
  box-shadow: inset 0 0 42px rgba(255, 185, 60, 0.07);
  pointer-events: none;
}

.casino-page.gambling-king-page .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  overflow: visible;
  padding-bottom: 0;
}

.casino-page.gambling-king-page .stats-grid .stat-box {
  min-height: 76px;
  padding: 0.6rem;
  white-space: normal;
  display: block;
}

.casino-page.gambling-king-page .stats-grid .stat-label {
  font-size: 0.7rem;
  line-height: 1.25;
}

.casino-page.gambling-king-page .stats-grid .stat-value {
  margin-top: 0.2rem;
  font-size: 1rem;
  line-height: 1.15;
}

.gambling-king-page .reels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.gambling-king-page .reel-slot {
  background: linear-gradient(180deg, rgba(255, 241, 204, 0.08), rgba(84, 16, 27, 0.5));
}

.gambling-king-page .reel {
  min-height: 110px;
  font-size: clamp(2.55rem, 4vw, 3.2rem);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 16px 22px rgba(0, 0, 0, 0.24);
}

.gambling-king-page .payout-card--king {
  position: sticky;
  top: 6.2rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 213, 122, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(66, 12, 22, 0.94), rgba(20, 5, 10, 0.98));
}

.gambling-king-page .controls .btn {
  flex: 1 1 160px;
  justify-content: center;
}

.death-wheel-page {
  background:
    radial-gradient(circle at 50% -4%, rgba(255, 226, 132, 0.08), transparent 20%),
    radial-gradient(circle at 16% 16%, rgba(255, 70, 98, 0.22), transparent 22%),
    radial-gradient(circle at 82% 14%, rgba(255, 123, 64, 0.16), transparent 18%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 82px),
    linear-gradient(180deg, #150309 0%, #0e0207 44%, #16040a 100%);
}

.death-wheel-page::before {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 71, 102, 0.1), transparent 34%),
    repeating-radial-gradient(circle at 50% 40%, rgba(255, 179, 103, 0.028) 0 10px, transparent 10px 28px);
  opacity: 0.86;
}

.death-wheel-page::after {
  z-index: -1;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 88, 116, 0.08) 46%, transparent 58%);
  transform: translateX(-120%);
  animation: wheelSignalSweep 11s linear infinite;
}

.death-wheel-page .game-hero-copy,
.death-wheel-page .game-hero-panel {
  background:
    radial-gradient(circle at top, rgba(255, 135, 86, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(57, 9, 18, 0.92), rgba(16, 4, 8, 0.96));
  border-color: rgba(255, 153, 106, 0.28);
}

.death-wheel-page .game-signal-bar span {
  background: linear-gradient(180deg, rgba(86, 14, 28, 0.9), rgba(35, 7, 13, 0.92));
}

.death-wheel-page .death-wheel-stage {
  background:
    radial-gradient(circle at top, rgba(255, 170, 96, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(46, 7, 16, 0.94), rgba(18, 3, 8, 0.98));
}

.death-wheel-page .dw-runbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.death-wheel-page .death-main {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 173, 111, 0.24);
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 106, 106, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(53, 8, 16, 0.94), rgba(18, 4, 8, 0.98));
  padding: 1rem 1rem 0.95rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 173, 0.05),
    0 22px 42px rgba(0, 0, 0, 0.42);
}

.death-wheel-page .death-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 184, 92, 0.08), transparent 20%),
    repeating-linear-gradient(90deg, transparent 0 96px, rgba(255, 208, 145, 0.018) 96px 100px);
  pointer-events: none;
}

.death-wheel-page .wheel-wrap {
  position: relative;
  margin: 0 auto;
}

.death-wheel-page .wheel-wrap::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 183, 102, 0.16);
  box-shadow:
    0 0 24px rgba(255, 89, 110, 0.12),
    inset 0 0 18px rgba(255, 204, 128, 0.08);
  animation: wheelHaloPulse 3.6s ease-in-out infinite;
}

.death-wheel-page .roulette-wheel {
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.38),
    inset 0 0 0 3px rgba(255, 214, 145, 0.1);
}

.dw-toggle-bank {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 0.9rem;
}

.dw-toggle-bank .skip-toggle {
  margin-top: 0;
}

.death-wheel-page .death-layout-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.death-wheel-page .death-wheel-card {
  min-height: 100%;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(61, 10, 21, 0.9), rgba(18, 4, 8, 0.96));
}

.death-blackjack-page .game-hero-copy,
.death-blackjack-page .game-hero-panel {
  background:
    radial-gradient(circle at top, rgba(255, 191, 111, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(65, 10, 17, 0.94), rgba(18, 4, 8, 0.98));
  border-color: rgba(255, 179, 88, 0.3);
  box-shadow:
    0 26px 54px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 232, 181, 0.07);
}

.death-blackjack-page .game-signal-bar span {
  background: linear-gradient(180deg, rgba(83, 12, 18, 0.9), rgba(38, 7, 11, 0.94));
}

.death-blackjack-page .blackjack-stage-card {
  border-color: rgba(255, 170, 83, 0.3);
  background:
    radial-gradient(circle at top, rgba(255, 180, 97, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(50, 7, 14, 0.95), rgba(16, 3, 7, 0.98));
}

.death-blackjack-page .blackjack-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 199, 110, 0.08), transparent 16%),
    linear-gradient(180deg, transparent 0%, rgba(255, 97, 38, 0.05) 74%, transparent 100%);
  mix-blend-mode: screen;
}

.death-blackjack-home-page .home-screen-card {
  background:
    radial-gradient(circle at top, rgba(255, 177, 92, 0.09), transparent 26%),
    linear-gradient(180deg, rgba(44, 8, 7, 0.96), rgba(16, 2, 2, 0.98));
  border-color: rgba(255, 191, 111, 0.3);
}

.death-blackjack-page .command-main,
.death-blackjack-page .table-panel,
.death-blackjack-page .table-summary-card {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

@keyframes gameCardSweep {
  0%, 86%, 100% {
    transform: translateX(-120%);
  }
  93% {
    transform: translateX(135%);
  }
}

@keyframes kingSweep {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  18% {
    opacity: 0.85;
  }
  58% {
    opacity: 0.42;
  }
  100% {
    transform: translateX(110%);
    opacity: 0;
  }
}

@keyframes wheelSignalSweep {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  64% {
    opacity: 0.35;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes wheelHaloPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.018);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .game-hero-shell,
  .casino-page.gambling-king-page .machine-layout,
  .death-wheel-page .death-layout-bottom {
    grid-template-columns: 1fr;
  }

  .gambling-king-page .payout-card--king {
    position: static;
  }
}

@media (max-width: 820px) {
  .death-wheel-page .dw-runbar,
  .casino-page.gambling-king-page .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .casino-page .section,
  .casino-page .site-nav {
    width: min(96vw, 96vw);
  }

  .game-hero-copy,
  .game-hero-panel,
  .game-stage-card {
    padding: 1rem;
  }

  .game-signal-bar {
    gap: 0.45rem;
  }

  .game-signal-bar span {
    min-height: 34px;
    padding-inline: 0.7rem;
    font-size: 0.76rem;
  }

  .game-panel-grid div {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .death-wheel-page .dw-runbar,
  .casino-page.gambling-king-page .stats-grid,
  .death-wheel-page .death-layout-bottom {
    grid-template-columns: 1fr;
  }
}

.table-hand-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.run-info-panel {
  border: 1px solid rgba(255, 236, 185, 0.28);
  border-radius: 12px;
  background: rgba(10, 25, 18, 0.38);
  padding: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 214, 132, 0.04);
}

.table-intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.table-panel {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 12px;
  background: rgba(10, 25, 18, 0.3);
  padding: 0.7rem;
}

.table-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.table-panel-kicker {
  color: #ffe2a1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 800;
}

.table-panel-meta {
  color: #d1af80;
  font-size: 0.74rem;
}

#bjTableStatus {
  margin-top: -0.1rem;
  font-size: 0.86rem;
  color: #ffcf8a;
}

.run-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.run-info-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1fr;
  gap: 0.75rem;
}

.home-settings-grid {
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.settings-card {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 10px;
  background: rgba(26, 10, 7, 0.32);
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.settings-fold {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.settings-fold[open] {
  padding: 0;
}

.settings-fold-head {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, rgba(46, 13, 10, 0.55), rgba(22, 8, 8, 0.36));
}

.settings-fold-head::-webkit-details-marker {
  display: none;
}

.settings-fold-head::after {
  content: "+";
  color: #ffcf8a;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.settings-fold[open] .settings-fold-head {
  border-bottom: 1px solid rgba(255, 236, 185, 0.1);
}

.settings-fold[open] .settings-fold-head::after {
  content: "-";
}

.settings-fold-head span {
  color: #ffe2a1;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.settings-fold-head small {
  color: #d7b182;
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: right;
}

.settings-fold-body {
  padding: 0.7rem 0.8rem 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.settings-card h4 {
  margin: 0;
  color: #ffe2a1;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dev-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dev-tool-grid .game-btn {
  width: 100%;
  justify-content: center;
}

.title-settings-grid {
  display: grid;
  gap: 0.45rem;
}

.death-blackjack-home-page .title-settings-grid {
  max-height: 300px;
  overflow: auto;
  padding-right: 0.2rem;
}

.home-card-summary .title-settings-grid {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.home-card-summary .title-option {
  padding: 0.42rem 0.48rem;
  gap: 0.14rem;
}

.home-card-summary .title-option strong {
  font-size: 0.76rem;
}

.home-card-summary .title-option small,
.home-card-summary .title-option .title-option-meta {
  font-size: 0.66rem;
  line-height: 1.28;
}

.title-option {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 10px;
  background: rgba(19, 7, 8, 0.34);
  padding: 0.55rem;
  display: grid;
  gap: 0.25rem;
}

.title-option.active {
  border-color: rgba(255, 171, 73, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 171, 73, 0.2);
}

.title-option[data-rarity="1"] {
  border-color: rgba(190, 182, 168, 0.22);
}

.title-option[data-rarity="2"] {
  border-color: rgba(255, 145, 84, 0.32);
}

.title-option[data-rarity="3"] {
  border-color: rgba(255, 101, 80, 0.42);
}

.title-option[data-rarity="4"] {
  border-color: rgba(255, 87, 122, 0.48);
  box-shadow: inset 0 0 18px rgba(255, 87, 122, 0.06);
}

.title-option[data-rarity="5"] {
  border-color: rgba(255, 210, 120, 0.52);
  box-shadow: inset 0 0 18px rgba(255, 210, 120, 0.08);
}

.title-option small {
  color: #d7b182;
}

.title-option-meta {
  color: #ffd8a5;
  font-size: 0.75rem;
}

.keybind-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.keybind-setting {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 10px;
  background: rgba(26, 10, 7, 0.32);
  padding: 0.55rem;
  display: grid;
  gap: 0.35rem;
}

.keybind-setting-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.keybind-setting strong {
  color: #ffe2a1;
}

.keybind-setting small {
  color: #ffd3a0;
}

.keybind-bind-btn.waiting {
  border-color: rgba(255, 171, 73, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 171, 73, 0.25);
}

.save-code-panel {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 10px;
  background: rgba(15, 4, 8, 0.42);
  padding: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.save-code-panel.hidden {
  display: none;
}

#bjSaveCodeInput {
  width: 100%;
  min-height: 92px;
  border: 1px solid rgba(244, 189, 41, 0.35);
  border-radius: 10px;
  background: rgba(15, 3, 8, 0.82);
  color: #ffe9b2;
  padding: 0.55rem 0.65rem;
  font: 0.8rem/1.35 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  resize: vertical;
}

#bjSaveCodeInput:focus {
  outline: 1px solid rgba(255, 171, 73, 0.68);
  border-color: rgba(255, 171, 73, 0.68);
}

.save-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.danger-btn {
  border-color: rgba(230, 90, 108, 0.54);
  color: #ffb7c0;
  background: rgba(70, 12, 23, 0.38);
}

.danger-btn:hover,
.danger-btn:focus-visible {
  border-color: rgba(255, 122, 142, 0.74);
  background: rgba(92, 16, 31, 0.5);
}

.run-info-head h3,
.run-info-column h4 {
  margin: 0;
}

.run-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.status-rail {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.status-pill {
  margin: 0;
  border: 1px solid rgba(255, 236, 185, 0.2);
  border-radius: 999px;
  background: rgba(18, 7, 8, 0.46);
  padding: 0.42rem 0.72rem;
}

.status-pill-primary {
  border-color: rgba(255, 171, 73, 0.38);
  background: rgba(61, 12, 18, 0.42);
}

.run-info-column {
  display: grid;
  gap: 0.4rem;
}

.run-info-list {
  display: grid;
  gap: 0.35rem;
}

.run-info-item {
  border: 1px solid rgba(255, 236, 185, 0.18);
  border-radius: 10px;
  background: rgba(26, 10, 7, 0.32);
  padding: 0.45rem 0.55rem;
}

.run-info-item strong {
  display: block;
  color: #ffe2a1;
}

.run-info-short,
.run-info-long,
.run-info-empty {
  margin: 0.16rem 0 0;
  color: #f0d7a1;
  font-size: 0.78rem;
}

.run-info-long {
  display: none;
  color: #ffefcc;
}

.run-info-panel.show-long .run-info-long {
  display: block;
}

.table-hand-tile {
  border: 1px solid rgba(255, 236, 185, 0.28);
  border-radius: 10px;
  background: rgba(10, 25, 18, 0.36);
  padding: 0.5rem;
}

.table-hand-tile h3 {
  margin: 0;
  font-size: 0.82rem;
}

.table-hand-tile p {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #f0d7a1;
}

.hand-mini-total {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #ffdca4;
  font-weight: 700;
}

.mini-cards {
  margin-top: 0.35rem;
  min-height: 70px;
}

.table-hand-tile .playing-card {
  width: 48px;
  padding: 0.26rem;
}

.table-hand-tile .playing-card .rank {
  font-size: 0.88rem;
}

.table-hand-tile .playing-card .suit {
  font-size: 0.92rem;
}

.hand-select-btn {
  margin-top: 0.35rem;
  padding: 0.32rem 0.55rem;
  font-size: 0.72rem;
  width: 100%;
}

.deck-upgrade {
  position: fixed;
  inset: 0;
  background: rgba(7, 3, 2, 0.62);
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.deck-upgrade.hidden {
  display: none;
}

.deck-upgrade-card {
  width: min(860px, 95vw);
  border: 1px solid rgba(244, 189, 41, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(44, 8, 15, 0.96), rgba(19, 4, 8, 0.98));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  padding: 0.8rem;
}

.death-blackjack-page .deck-upgrade-card,
.death-blackjack-page .battle-map-card {
  border-color: rgba(255, 171, 73, 0.58);
  background:
    radial-gradient(circle at top, rgba(255, 154, 83, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(58, 10, 18, 0.97), rgba(19, 4, 8, 0.99));
}

.deck-upgrade-card > h3,
.deck-upgrade-card > p {
  margin: 0;
}

.deck-upgrade-card > h3 {
  padding: 0.25rem 0.3rem 0.2rem;
  color: #ffe2a1;
}

.deck-upgrade-card > p {
  padding: 0 0.3rem 0.55rem;
  color: #ffd7a6;
}

.card-market {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 0.65rem;
}

.free-draw-panel {
  border: 1px solid rgba(244, 189, 41, 0.5);
  border-radius: 10px;
  background: rgba(15, 3, 8, 0.6);
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.free-draw-panel h4,
.market-title {
  margin: 0;
  color: #ffe2a1;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forge-target-block {
  display: grid;
  gap: 0.35rem;
}

.forge-target-block h5 {
  margin: 0;
  color: #ffe2a1;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forge-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.forge-mode-row .btn[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(179, 18, 53, 0.92), rgba(126, 6, 34, 0.96));
  color: #fff4c9;
  box-shadow: 0 0 0 1px rgba(255, 198, 120, 0.34), 0 0 16px rgba(255, 88, 88, 0.18);
}

.forge-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.45rem;
}

.forge-target-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(244, 189, 41, 0.28);
  border-radius: 10px;
  background: rgba(17, 4, 8, 0.72);
  color: #ffe8ba;
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.16rem;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}

.forge-target-btn:hover,
.forge-target-btn:focus-visible {
  border-color: rgba(255, 196, 102, 0.6);
  transform: translateY(-1px);
  outline: none;
}

.forge-target-btn.is-selected {
  border-color: rgba(255, 196, 102, 0.78);
  background: linear-gradient(180deg, rgba(92, 13, 23, 0.9), rgba(45, 6, 11, 0.98));
  box-shadow: 0 0 0 1px rgba(255, 196, 102, 0.2), 0 0 14px rgba(255, 119, 62, 0.16);
}

.forge-target-btn.is-selected-secondary {
  border-color: rgba(255, 128, 96, 0.62);
  background: linear-gradient(180deg, rgba(76, 17, 33, 0.88), rgba(33, 7, 15, 0.96));
  box-shadow: 0 0 0 1px rgba(255, 128, 96, 0.18), 0 0 12px rgba(255, 90, 70, 0.12);
}

.forge-target-btn strong {
  color: #fff0c9;
  font-size: 0.84rem;
}

.forge-target-btn small,
.forge-target-btn span {
  color: #d8b98e;
  font-size: 0.68rem;
  line-height: 1.32;
}

.forge-action-hint {
  min-height: 2.35rem;
}

.market-right {
  display: grid;
  gap: 0.45rem;
}

.market-row {
  display: grid;
  gap: 0.45rem;
}

.market-row-top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.market-row-bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-row-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.market-row-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.market-row-four .market-card,
.market-row-five .market-card {
  min-height: 94px;
}

.market-card {
  border: 1px solid rgba(244, 189, 41, 0.45);
  border-radius: 10px;
  background: rgba(17, 4, 9, 0.74);
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.35rem 0.45rem;
  align-content: start;
  color: #f6deaa;
  min-height: 86px;
}

.market-card input[type="checkbox"] {
  accent-color: #f4bd29;
  margin-top: 0.08rem;
}

.market-card .card-name {
  font-weight: 800;
  font-size: 0.86rem;
}

.market-card .card-desc {
  grid-column: 2;
  color: #ffd3a0;
  font-size: 0.78rem;
  line-height: 1.25;
}

.market-offer {
  width: 100%;
  border: 1px solid rgba(244, 189, 41, 0.45);
  border-radius: 10px;
  background: rgba(17, 4, 9, 0.74);
  color: #f6deaa;
  padding: 0.55rem;
  text-align: left;
  display: grid;
  gap: 0.3rem;
  min-height: 94px;
}

.market-offer.free-offer {
  border-color: rgba(105, 219, 143, 0.78);
  box-shadow: 0 0 0 1px rgba(105, 219, 143, 0.24);
}

.market-offer.claimed {
  opacity: 0.58;
}

.market-offer small {
  color: #ffd3a0;
}

.shop-market {
  grid-template-columns: 1fr;
}

#bjChoiceOptions {
  margin-top: 0.65rem;
}

.route-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.route-option {
  border: 1px solid rgba(244, 189, 41, 0.48);
  border-radius: 10px;
  background: rgba(12, 6, 9, 0.72);
  color: #ffe2ae;
  font-size: 0.78rem;
  text-align: left;
  padding: 0.42rem 0.55rem;
  cursor: pointer;
}

.route-option.selected,
.route-option:hover,
.route-option:focus-visible {
  border-color: rgba(255, 216, 126, 0.78);
  box-shadow: 0 0 0 1px rgba(244, 189, 41, 0.24);
}

#bjCampUpgradePanel {
  margin-bottom: 0.7rem;
}

#bjCampUpgradePanel .btn {
  width: 100%;
}

.deck-upgrade input[type="checkbox"] {
  accent-color: #f4bd29;
}

#bjStartNextTableBtn {
  width: 100%;
  border: 1px solid rgba(244, 189, 41, 0.62);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}

.battle-map {
  position: fixed;
  inset: 0;
  background: rgba(4, 1, 2, 0.92);
  backdrop-filter: blur(8px) saturate(0.8);
  z-index: 56;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.battle-map-grid {
  display: block;
  margin-top: 0.45rem;
}

.battle-map.hidden {
  display: none;
}

.battle-map-card {
  width: min(1180px, 98vw);
  border: 1px solid rgba(244, 189, 41, 0.52);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 238, 191, 0.11), transparent 35%),
    radial-gradient(circle at 86% 78%, rgba(255, 215, 137, 0.09), transparent 30%),
    linear-gradient(120deg, rgba(255, 145, 84, 0.08), transparent 28%, transparent 72%, rgba(255, 208, 107, 0.05)),
    repeating-linear-gradient(35deg, rgba(255, 255, 255, 0.02) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, rgba(59, 22, 10, 0.985), rgba(10, 3, 6, 0.995));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.58);
  padding: 1rem;
}

.battle-map-head {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}

.battle-map-head-copy {
  display: grid;
  gap: 0.18rem;
}

.battle-map-kicker {
  margin: 0;
  color: #ffbe6e;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.battle-map-head-status {
  display: grid;
  gap: 0.3rem;
  min-width: min(420px, 100%);
}

.battle-map-status,
.battle-map-preview {
  margin: 0;
  border: 1px solid rgba(244, 189, 41, 0.22);
  border-radius: 12px;
  background: rgba(11, 5, 8, 0.48);
  padding: 0.42rem 0.6rem;
  line-height: 1.35;
}

.battle-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
  gap: 0.85rem;
}

.battle-map-board,
.battle-map-side {
  display: grid;
  gap: 0.6rem;
}

.battle-map-stage-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 0.42rem;
}

.battle-stage-chip {
  border: 1px solid rgba(244, 189, 41, 0.16);
  border-radius: 12px;
  background: rgba(14, 6, 9, 0.5);
  padding: 0.38rem 0.48rem;
  display: grid;
  gap: 0.08rem;
}

.battle-stage-chip span {
  color: #ffbf7a;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.battle-stage-chip strong {
  color: #fff0ca;
  font-size: 0.74rem;
}

.battle-stage-chip.passed {
  opacity: 0.6;
}

.battle-stage-chip.current {
  border-color: rgba(122, 177, 237, 0.72);
  box-shadow: inset 0 0 0 1px rgba(122, 177, 237, 0.18), 0 0 18px rgba(122, 177, 237, 0.1);
}

.battle-stage-chip.selected {
  border-color: rgba(105, 219, 143, 0.78);
  box-shadow: inset 0 0 0 1px rgba(105, 219, 143, 0.2), 0 0 18px rgba(105, 219, 143, 0.12);
}

#bjConfirmRouteBtn {
  border: 1px solid rgba(244, 189, 41, 0.62);
  border-radius: 12px;
}

#bjCloseMapBtn {
  border-radius: 12px;
}

.battle-map-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 0.55rem;
}

.route-node {
  border: 1px solid rgba(244, 189, 41, 0.5);
  border-radius: 10px;
  background: rgba(25, 7, 11, 0.76);
  color: #ffe2a1;
  text-align: left;
  padding: 0.55rem;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
}

.route-node:hover {
  border-color: rgba(255, 216, 126, 0.78);
}

.route-node.selected {
  border-color: rgba(110, 218, 143, 0.88);
  box-shadow: inset 0 0 0 1px rgba(110, 218, 143, 0.35);
}

.route-name {
  font-weight: 800;
  font-size: 0.84rem;
}

.route-meta {
  font-size: 0.76rem;
  color: #ffd8a6;
  line-height: 1.25;
}

.route-path {
  font-size: 0.74rem;
  color: #ffe9bf;
  line-height: 1.25;
}

.route-risk {
  width: fit-content;
  font-size: 0.7rem;
  padding: 0.12rem 0.36rem;
  border-radius: 999px;
  background: rgba(244, 189, 41, 0.2);
  border: 1px solid rgba(244, 189, 41, 0.34);
}

.route-track {
  display: none;
}

.enc-node {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(244, 189, 41, 0.48);
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 235, 196, 0.12), transparent 42%),
    rgba(10, 14, 18, 0.96);
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: default;
  pointer-events: none;
  z-index: 3;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.enc-node.selected {
  box-shadow: 0 0 0 2px rgba(105, 219, 143, 0.8), 0 0 20px rgba(105, 219, 143, 0.28);
  border-color: rgba(105, 219, 143, 0.95);
  transform: translate(-50%, -50%) scale(1.06);
}

.enc-node.available {
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(244, 189, 41, 0.7), 0 0 18px rgba(244, 189, 41, 0.24);
}

.enc-node.available:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.enc-node.current {
  box-shadow: 0 0 0 2px rgba(122, 177, 237, 0.78), 0 0 18px rgba(122, 177, 237, 0.32);
  transform: translate(-50%, -50%) scale(1.07);
}

.enc-node.completed {
  opacity: 0.7;
}

.enc-node.dimmed {
  opacity: 0.18;
  filter: grayscale(0.8);
}

.enc-link {
  height: 2px;
  width: 18px;
  background: linear-gradient(90deg, rgba(244, 189, 41, 0.25), rgba(255, 225, 164, 0.75), rgba(244, 189, 41, 0.25));
  flex-shrink: 0;
}

.world-map-canvas {
  position: relative;
  border: 1px solid rgba(244, 189, 41, 0.36);
  border-radius: 16px;
  min-height: 408px;
  min-width: 980px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 238, 195, 0.16), transparent 34%),
    radial-gradient(circle at 82% 68%, rgba(255, 213, 132, 0.12), transparent 35%),
    linear-gradient(90deg, rgba(255, 186, 106, 0.02), transparent 12%, transparent 88%, rgba(255, 186, 106, 0.02)),
    linear-gradient(180deg, rgba(58, 24, 10, 0.88), rgba(8, 4, 6, 0.985));
}

.world-map-scroll {
  overflow: auto;
  border-radius: 16px;
}

.world-map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.route-line,
.route-line.muted {
  fill: none;
  stroke: rgba(246, 208, 133, 0.09);
  stroke-width: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-line.active {
  stroke: rgba(255, 231, 186, 0.86);
  stroke-width: 1.95;
}

.route-line.selected {
  stroke: rgba(117, 228, 153, 0.92);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px rgba(117, 228, 153, 0.44));
}

.world-map-nodes,
.world-map-labels {
  position: absolute;
  inset: 0;
}

.stage-guide {
  stroke: rgba(255, 220, 147, 0.11);
  stroke-width: 0.62;
  stroke-dasharray: 2 5;
}

.route-label {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(244, 189, 41, 0.46);
  border-radius: 999px;
  background: rgba(10, 4, 7, 0.92);
  color: #ffe2ae;
  font-size: 0.7rem;
  padding: 0.16rem 0.46rem;
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.route-label.current {
  border-color: rgba(122, 177, 237, 0.85);
  color: #dceeff;
}

.route-label.available {
  border-color: rgba(244, 189, 41, 0.72);
}

.route-label.selected {
  border-color: rgba(105, 219, 143, 0.92);
  box-shadow: 0 0 0 1px rgba(105, 219, 143, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
}

.battle-map-focus {
  border: 1px solid rgba(244, 189, 41, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 9, 10, 0.85), rgba(8, 4, 6, 0.95));
  padding: 0.72rem 0.8rem;
  display: grid;
  gap: 0.36rem;
}

.battle-map-focus-kicker {
  color: #ffbe6e;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.battle-map-focus strong {
  color: #fff0ca;
  font-size: 1rem;
}

.battle-map-focus p,
.battle-map-focus small {
  margin: 0;
  color: #e0c08f;
  line-height: 1.42;
}

.battle-map-focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.battle-map-focus-tags em {
  font-style: normal;
  color: #fff0ca;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(244, 189, 41, 0.22);
  border-radius: 999px;
  background: rgba(255, 187, 107, 0.08);
  padding: 0.18rem 0.4rem;
}

.map-route-option-list {
  display: grid;
  gap: 0.52rem;
}

.map-route-option {
  border: 1px solid rgba(244, 189, 41, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 238, 195, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(18, 8, 10, 0.88), rgba(10, 5, 8, 0.98));
  color: #ffe2ae;
  text-align: left;
  padding: 0.7rem 0.78rem;
  cursor: pointer;
  display: grid;
  gap: 0.32rem;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.map-route-option:hover,
.map-route-option:focus-visible {
  border-color: rgba(255, 216, 126, 0.78);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.map-route-option.selected {
  border-color: rgba(105, 219, 143, 0.92);
  box-shadow: 0 0 0 1px rgba(105, 219, 143, 0.4), 0 14px 30px rgba(0, 0, 0, 0.26);
}

.map-route-option-top {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.map-route-option-index,
.map-route-option-state,
.map-route-option-type {
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-route-option-index {
  color: #0d0506;
  background: linear-gradient(180deg, #ffd06b, #ff9e5a);
  border-radius: 999px;
  padding: 0.12rem 0.38rem;
  font-weight: 800;
}

.map-route-option-type {
  color: #ffbe7b;
}

.map-route-option-state {
  margin-left: auto;
  color: #dceeff;
}

.map-route-option.selected .map-route-option-state {
  color: #94f0af;
}

.map-route-option-title {
  color: #fff0ca;
  font-size: 0.95rem;
}

.map-route-option-profile {
  color: #ffd39b;
  font-size: 0.74rem;
}

.map-route-option-copy {
  color: #e0c08f;
  font-size: 0.74rem;
  line-height: 1.38;
}

.map-route-option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
}

.map-route-option-tags em {
  font-style: normal;
  color: #fff0ca;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(244, 189, 41, 0.2);
  background: rgba(255, 187, 107, 0.07);
  padding: 0.14rem 0.36rem;
}

.map-route-option-future {
  color: #cfa574;
  line-height: 1.32;
}

.route-option-empty {
  color: #e0c48f;
  font-size: 0.8rem;
  border: 1px dashed rgba(244, 189, 41, 0.2);
  border-radius: 14px;
  background: rgba(10, 5, 7, 0.44);
  padding: 0.8rem;
}

.enc-fight {
  background: rgba(31, 45, 61, 0.9);
}

.enc-elite {
  background: rgba(58, 49, 41, 0.9);
}

.enc-boss {
  background: rgba(62, 38, 23, 0.95);
  border-color: rgba(255, 158, 90, 0.72);
}

.enc-camp {
  background: rgba(82, 40, 24, 0.9);
}

.enc-encounter {
  background: rgba(54, 38, 70, 0.9);
}

.enc-forge {
  background: rgba(72, 53, 23, 0.94);
}

.enc-risk {
  background: rgba(64, 26, 32, 0.94);
}

.enc-vault {
  background: rgba(72, 58, 18, 0.94);
}

.enc-trial {
  background: rgba(34, 46, 84, 0.94);
}

.map-legend {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.58rem;
  font-size: 0.72rem;
  color: #ffe2b9;
}

.map-legend span {
  border: 1px solid rgba(244, 189, 41, 0.24);
  border-radius: 999px;
  padding: 0.16rem 0.42rem;
  background: rgba(13, 5, 8, 0.34);
}

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

  .market-row {
    grid-template-columns: 1fr;
  }

  .enc-node {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .world-map-canvas {
    min-height: 280px;
    min-width: 760px;
  }

  .battle-map-layout,
  .battle-map-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .battle-map-stage-strip {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
  }

  .battle-map-controls {
    grid-template-columns: 1fr;
  }

  .route-options {
    grid-template-columns: 1fr;
  }
}

.special-popup {
  position: fixed;
  inset: 0;
  background: rgba(7, 3, 2, 0.62);
  display: grid;
  place-items: center;
  z-index: 60;
}

.special-popup.hidden {
  display: none;
}

.special-popup-card {
  width: min(420px, 90vw);
  border: 1px solid rgba(244, 189, 41, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(44, 8, 15, 0.96), rgba(19, 4, 8, 0.98));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  padding: 0.9rem;
  color: #ffe2a1;
}

.special-popup-card h3 {
  margin: 0 0 0.35rem;
}

.special-popup-card p {
  margin: 0 0 0.65rem;
  color: #ffd7a6;
}

.table-hand-tile.active {
  border-color: rgba(255, 214, 122, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 122, 0.28);
}

.table-hand-tile.win {
  border-color: rgba(102, 208, 134, 0.82);
}

.table-hand-tile.loss {
  border-color: rgba(231, 94, 99, 0.8);
}

.table-hand-tile.push {
  border-color: rgba(113, 168, 232, 0.82);
}

.danger-upgrade {
  border-color: rgba(203, 31, 63, 0.7);
  box-shadow: inset 0 0 0 1px rgba(203, 31, 63, 0.45);
}

.casino-page .btn-primary {
  background: linear-gradient(135deg, #d62547, #8e102b);
  box-shadow: 0 0 0 1px rgba(244, 189, 41, 0.3), 0 8px 18px rgba(0, 0, 0, 0.3);
}

.casino-page .btn-outline {
  border-color: rgba(244, 189, 41, 0.65);
  color: #ffe7a1;
  background: rgba(46, 8, 16, 0.92);
}

.casino-page .btn-outline:hover {
  background: rgba(78, 14, 27, 0.96);
}

.controls select {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(46, 8, 16, 0.95);
  color: #ffe7a1;
  padding: 0.48rem 0.55rem;
  font-weight: 700;
  min-height: 38px;
}

.keybind-chip {
  display: none;
  margin-left: 0.45rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid rgba(244, 189, 41, 0.5);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffe7a1;
  background: rgba(24, 5, 9, 0.7);
}

.show-keybinds .keybind-chip {
  display: inline-block;
}

.locked-upgrade {
  opacity: 0.92;
}

.locked-upgrade.locked {
  opacity: 0.62;
}

.lock-note {
  margin: 0.25rem 0 0.5rem;
  color: #ffd18a;
  font-size: 0.86rem;
}

.locked-upgrade.locked .lock-note {
  color: #ff9d8a;
}

.devil-event {
  position: fixed;
  inset: 0;
  background: rgba(5, 1, 2, 0.68);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 20;
}

.devil-event.hidden {
  display: none;
}

.devil-card {
  width: min(540px, 92vw);
  border: 1px solid rgba(203, 31, 63, 0.9);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(49, 5, 13, 0.96), rgba(22, 4, 8, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 1rem;
}

.execution-loss {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background:
    radial-gradient(circle at 50% 35%, rgba(140, 0, 0, 0.22), transparent 35%),
    linear-gradient(180deg, #170000 0%, #090000 100%);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4.25rem 0 4rem;
  color: #ff5a5a;
  transition: filter 0.06s linear, transform 0.06s linear;
  animation: executionScreenIn 380ms ease-out;
}

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

.execution-loss::before {
  z-index: 0;
  opacity: 0.72;
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(255, 64, 64, 0.06) 5% 5.2%, transparent 5.2% 100%),
    linear-gradient(90deg, transparent 0 92%, rgba(255, 64, 64, 0.05) 92% 92.2%, transparent 92.2% 100%),
    repeating-linear-gradient(180deg, rgba(255, 70, 70, 0.024) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 60, 60, 0.02) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 15% 18%, rgba(255, 64, 64, 0.08) 0 2px, transparent 2px),
    radial-gradient(circle at 62% 44%, rgba(255, 64, 64, 0.06) 0 2px, transparent 2px),
    radial-gradient(circle at 81% 72%, rgba(255, 64, 64, 0.05) 0 2px, transparent 2px);
  background-size: auto, auto, auto, auto, 220px 220px, 260px 260px, 320px 320px;
}

.execution-loss::after {
  z-index: 0;
  opacity: 0.34;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 8% 50%, rgba(255, 53, 53, 0.16), transparent 18%),
    radial-gradient(circle at 92% 50%, rgba(255, 53, 53, 0.13), transparent 18%),
    linear-gradient(90deg, rgba(255, 53, 53, 0.06), transparent 10%, transparent 90%, rgba(255, 53, 53, 0.05)),
    linear-gradient(180deg, rgba(255, 0, 0, 0.04), transparent 14%, transparent 86%, rgba(255, 0, 0, 0.04));
}

.execution-loss-body {
  position: relative;
  width: min(760px, calc(100vw - 8rem));
  margin: 0 auto 0 max(5.5vw, 4rem);
  z-index: 3;
  text-shadow: 0 0 8px rgba(255, 70, 70, 0.18);
  animation: executionBodySlide 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.execution-grid,
.execution-noise,
.execution-scanlines,
.execution-errors,
.execution-flash,
.execution-suits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.execution-grid {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 40, 40, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 40, 40, 0.05) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px;
}

.execution-scanlines::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 70, 70, 0.035) 0px,
    rgba(255, 70, 70, 0.035) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: lossScan 7s linear infinite;
}

.execution-noise {
  opacity: 0.14;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 60, 60, 0.3) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(255, 60, 60, 0.24) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 60, 60, 0.18) 0 1px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 220px 220px;
  animation: lossNoiseShift 0.35s steps(2) infinite;
}

.execution-errors {
  z-index: 1;
  overflow: hidden;
  mix-blend-mode: screen;
}

.execution-errors span {
  position: absolute;
  color: rgba(255, 108, 108, 0.34);
  font-size: clamp(12px, 1.02vw, 15px);
  letter-spacing: 0.14em;
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 0 10px rgba(255, 60, 60, 0.2), 0 0 18px rgba(255, 45, 45, 0.12);
  animation: lossDrift 13s linear infinite, executionErrorPulse 4.6s ease-in-out infinite;
}

.execution-suits {
  z-index: 1;
  opacity: 0.16;
  font-size: clamp(36px, 3vw, 54px);
  color: rgba(255, 77, 77, 0.42);
}

.execution-suits span {
  position: absolute;
  user-select: none;
}

.execution-flash {
  background: rgba(255, 50, 50, 0);
  mix-blend-mode: screen;
  transition: background 0.05s linear;
}

.execution-line {
  margin: 0 0 12px;
  color: #ff7070;
  font-family: "Courier New", "IBM Plex Mono", monospace;
  font-size: clamp(17px, 1.45vw, 24px);
  line-height: 1.22;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.execution-loss-body .execution-line:not(.execution-glitch) {
  position: relative;
  display: block;
}

.execution-loss-body .execution-line:not(.execution-glitch)::before,
.execution-loss-body .execution-line:not(.execution-glitch)::after {
  content: attr(data-text);
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
  pointer-events: none;
}

.execution-loss-body .execution-line:not(.execution-glitch)::before {
  color: rgba(255, 176, 176, 0.54);
  transform: translate(-1px, 0);
}

.execution-loss-body .execution-line:not(.execution-glitch)::after {
  color: rgba(255, 40, 40, 0.62);
  transform: translate(1px, 0);
}

.execution-line.execution-corrupt {
  transform: translateX(1px) rotate(-0.6deg);
  color: #ff8d8d;
}

.execution-line.execution-corrupt::before {
  opacity: 0.4;
  clip-path: inset(0 0 54% 0);
}

.execution-line.execution-corrupt::after {
  opacity: 0.34;
  clip-path: inset(48% 0 0 0);
}

.execution-divider {
  width: min(600px, 76%);
  height: 2px;
  margin: 16px 0 30px;
  background: linear-gradient(90deg, rgba(255, 80, 80, 0.95), rgba(255, 80, 80, 0.12));
  box-shadow: 0 0 8px rgba(255, 70, 70, 0.4);
}

.execution-gap-sm {
  height: 20px;
}

.execution-gap-md {
  height: 26px;
}

.execution-glitch {
  position: relative;
  display: inline-block;
  animation: lossTextJitter 3.5s infinite;
}

.execution-glitch::before,
.execution-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

.execution-glitch::before {
  color: rgba(255, 140, 140, 0.6);
  transform: translate(-2px, 0);
  animation: glitchSliceA 4s infinite;
}

.execution-glitch::after {
  color: rgba(255, 0, 0, 0.7);
  transform: translate(2px, 0);
  animation: glitchSliceB 4s infinite;
}

.execution-actions {
  position: fixed;
  right: 2rem;
  bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: flex-end;
  z-index: 4;
}

.execution-note {
  color: rgba(255, 156, 156, 0.75);
  font-size: 0.76rem;
  max-width: 280px;
  order: -1;
  text-align: right;
}

.execution-loss::-webkit-scrollbar {
  width: 10px;
}

.execution-loss::-webkit-scrollbar-track {
  background: rgba(15, 2, 4, 0.72);
}

.execution-loss::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 116, 116, 0.72), rgba(124, 13, 13, 0.9));
  border-radius: 999px;
}

@keyframes executionScreenIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes executionBodySlide {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes executionErrorPulse {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .execution-loss {
    padding: 3.2rem 0 7rem;
  }

  .execution-loss-body {
    width: min(90vw, 640px);
    margin: 0 auto;
  }

  .execution-actions {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    gap: 0.55rem;
    justify-content: flex-start;
  }

  .execution-line {
    font-size: clamp(15px, 4vw, 19px);
    letter-spacing: 0.03em;
  }

  .execution-divider {
    width: min(100%, 420px);
  }

  .execution-suits {
    opacity: 0.12;
  }

  .execution-note {
    order: 0;
    text-align: left;
    max-width: none;
  }
}

.inventory-card {
  width: min(1050px, 95vw);
  max-height: 88vh;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 189, 41, 0.65) rgba(22, 4, 8, 0.55);
}

.inventory-card::-webkit-scrollbar {
  width: 10px;
}

.inventory-card::-webkit-scrollbar-track {
  background: rgba(22, 4, 8, 0.55);
  border-radius: 999px;
}

.inventory-card::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 189, 41, 0.9), rgba(214, 37, 71, 0.85));
  border-radius: 999px;
  border: 2px solid rgba(22, 4, 8, 0.55);
}

.inventory-card::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 205, 92, 0.95), rgba(231, 60, 95, 0.9));
}

.lose-card {
  border-color: rgba(225, 52, 72, 0.95);
  animation: losePulse 1s ease-in-out infinite alternate;
}

.win-card {
  border-color: rgba(244, 189, 41, 0.9);
  box-shadow: 0 0 20px rgba(244, 189, 41, 0.25), 0 18px 40px rgba(0, 0, 0, 0.45);
}

.devil-head {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffcf71;
}

.coin {
  margin: 0.7rem auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  border: 1px solid rgba(244, 189, 41, 0.5);
  background: radial-gradient(circle at 30% 30%, #fff1c7, #e8af29);
  color: #312100;
}

.coin.flipping {
  animation: coinFlip 0.8s linear infinite;
}

.death-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 0.8rem;
}

.death-wheel-page {
  background: #0f0f14;
}

.dw-runbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.death-main {
  background: #1a1a22;
  border: 1px solid rgba(244, 189, 41, 0.25);
  border-radius: 12px;
  padding: 0.9rem;
}

.center-controls {
  justify-content: center;
}

.dw-spin-btn {
  min-width: 180px;
  font-size: 1.05rem;
  animation: spinPulse 1.8s ease-in-out infinite;
}

.dw-spin-btn.risk-low {
  background: linear-gradient(135deg, #2768d6, #1a3f8a);
}

.dw-spin-btn.risk-medium {
  background: linear-gradient(135deg, #d9891f, #9a5f12);
}

.dw-spin-btn.risk-high {
  background: linear-gradient(135deg, #d62547, #7c0e26);
}

.risk-low {
  color: #5aa8ff;
}

.risk-medium {
  color: #ffb347;
}

.risk-high {
  color: #ff6e6e;
}

.death-layout-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.dw-balance-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.dw-balance-card {
  border: 1px solid rgba(244, 189, 41, 0.3);
  border-radius: 12px;
  background: #1a1a22;
  padding: 0.7rem;
  display: grid;
  gap: 0.35rem;
}

.dw-balance-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.dw-balance-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.dw-slot-badge {
  justify-self: start;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 240, 190, 0.35);
  background: rgba(24, 5, 9, 0.5);
  font-size: 0.76rem;
  font-weight: 800;
}

.dw-balance-card.type-normal { border-color: rgba(120, 120, 130, 0.55); }
.dw-balance-card.type-lucky { border-color: rgba(215, 167, 23, 0.65); }
.dw-balance-card.type-death { border-color: rgba(126, 15, 32, 0.75); }
.dw-balance-card.type-chaos { border-color: rgba(107, 63, 168, 0.75); }
.dw-balance-card.type-multiplier { border-color: rgba(47, 111, 218, 0.75); }
.dw-balance-card.type-shield { border-color: rgba(39, 168, 180, 0.75); }
.dw-balance-card.type-curse { border-color: rgba(47, 139, 67, 0.75); }
.dw-balance-card.type-shop { border-color: rgba(204, 123, 26, 0.75); }

.death-panel .btn.active {
  border-color: rgba(244, 189, 41, 0.9);
  background: rgba(138, 20, 43, 0.95);
  box-shadow: inset 0 0 0 1px rgba(244, 189, 41, 0.35);
}

.death-bet-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.death-wheel-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.bet-option {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 238, 198, 0.08);
  padding: 0.55rem;
}

.death-blackjack-page .route-node {
  border-color: rgba(255, 176, 82, 0.46);
  background:
    linear-gradient(180deg, rgba(67, 10, 18, 0.84), rgba(21, 5, 10, 0.9));
}

.death-blackjack-page .route-node:hover,
.death-blackjack-page .route-node:focus-visible {
  box-shadow:
    0 0 0 1px rgba(255, 198, 112, 0.3),
    0 12px 24px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}

.bet-option-title {
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.bet-option-controls {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 0.45rem;
}

.chip-count {
  text-align: center;
  font-weight: 900;
  border: 1px solid rgba(244, 189, 41, 0.35);
  border-radius: 999px;
  background: rgba(24, 5, 9, 0.64);
  padding: 0.26rem 0.4rem;
}

.bet-option-controls .btn {
  padding: 0.42rem 0.2rem;
  min-width: 0;
}

.wheel-wrap {
  width: min(520px, 92vw);
  margin: 0 auto;
  position: relative;
}

.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid #ffe9ab;
  z-index: 2;
  filter: drop-shadow(0 0 5px rgba(244, 189, 41, 0.7));
}

.roulette-wheel {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 5px solid rgba(244, 189, 41, 0.65);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 4px rgba(38, 5, 11, 0.6), 0 15px 22px rgba(0, 0, 0, 0.4);
  transition: transform 2.9s cubic-bezier(.08, .7, .15, 1);
}

.wheel-numbers {
  position: absolute;
  inset: 0;
}

.wheel-number {
  position: absolute;
  min-width: 40px;
  min-height: 28px;
  padding: 0.08rem 0.2rem;
  border-radius: 999px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 240, 190, 0.34);
  color: #fff4cc;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transform-origin: center center;
}

.wheel-num-value {
  font-size: 0.68rem;
  font-weight: 900;
}

.wheel-num-type {
  font-size: 0.48rem;
  letter-spacing: 0.02em;
  opacity: 0.95;
  text-transform: uppercase;
}

.wheel-number.red {
  background: rgba(179, 19, 47, 0.92);
}

.wheel-number.black {
  background: rgba(20, 20, 20, 0.95);
}

.wheel-number.green {
  background: rgba(17, 118, 58, 0.95);
}

.wheel-number.hit {
  box-shadow: 0 0 0 2px rgba(255, 232, 160, 0.8), 0 0 10px rgba(255, 232, 160, 0.55);
}

.wheel-number.double-zero {
  min-width: 26px;
  font-size: 0.66rem;
}

.wheel-center {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 2px solid rgba(244, 189, 41, 0.6);
  background: radial-gradient(circle at 30% 30%, #4d1020, #20050d);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffe8a0;
}

.death-wheel-page.shake {
  animation: deathShake 0.35s ease-in-out;
}

@keyframes spinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

@keyframes deathShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.wheel-center.red,
.stat-value.red {
  color: #ff8d9f;
}

.wheel-center.black,
.stat-value.black {
  color: #f3f3f3;
}

.wheel-center.green,
.stat-value.green {
  color: #7af0a5;
}

.death-payout-table td:last-child {
  text-align: right;
  font-weight: 900;
}

.setup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.setup-row > div {
  display: grid;
  gap: 0.35rem;
}

.setup-row select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(46, 8, 16, 0.95);
  color: #ffe7a1;
  padding: 0.48rem 0.55rem;
  font-weight: 700;
  min-height: 38px;
}

a {
  color: var(--primary);
}

footer {
  padding: 1.1rem 0 2rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.6s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.12s;
}

.reveal:nth-child(3) {
  animation-delay: 0.22s;
}

.reveal:nth-child(4) {
  animation-delay: 0.3s;
}

.reveal:nth-child(5) {
  animation-delay: 0.38s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .site-nav {
    border-radius: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    padding-top: 4.8rem;
  }

  .split,
  .grid,
  .policy-grid,
  .pillars {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .upgrade-grid {
    grid-template-columns: 1fr 1fr;
  }

  .machine-layout {
    grid-template-columns: 1fr;
  }

  .bet-row {
    grid-template-columns: 1fr;
  }

  .dw-runbar {
    grid-template-columns: 1fr 1fr;
  }

  .death-layout-bottom {
    grid-template-columns: 1fr;
  }

  .dw-balance-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .stats-grid,
  .upgrade-grid {
    grid-template-columns: 1fr;
  }

  .hand-meta {
    flex-direction: column;
    gap: 0.2rem;
  }

  .playing-card {
    width: 62px;
  }

  .table-hand-board {
    grid-template-columns: 1fr 1fr;
  }

  .table-advice {
    justify-self: stretch;
    max-width: none;
  }

  .loss-overlay-card {
    top: 7%;
    left: 8%;
    width: 84%;
  }

  .loss-divider {
    width: 100%;
  }

  .loss-line {
    letter-spacing: 0.06em;
  }

  .table-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .command-deck {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .table-intel-grid,
  .status-rail {
    grid-template-columns: 1fr;
  }

  .home-screen-grid,
  .home-title-collection,
  .home-progress-grid {
    grid-template-columns: 1fr;
  }

  .utility-action-grid {
    grid-template-columns: 1fr;
  }

  .home-run-log,
  .home-title-collection {
    max-height: none;
  }

  .settings-fold-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-fold-head small {
    text-align: left;
  }

  .run-info-grid {
    grid-template-columns: 1fr;
  }

  .setup-row {
    grid-template-columns: 1fr;
  }

  .dw-balance-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes coinFlip {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(720deg);
  }
}

@keyframes losePulse {
  from {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(225, 52, 72, 0.2), 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  to {
    transform: scale(1.01);
    box-shadow: 0 0 16px rgba(225, 52, 72, 0.45), 0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

@keyframes cardSlam {
  from {
    transform: translateY(-12px) scale(1.03);
    opacity: 0.2;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes dealerRevealFlip {
  0% {
    transform: rotateY(90deg) scale(0.94);
    opacity: 0.35;
  }
  55% {
    transform: rotateY(-8deg) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes chipGrow {
  from {
    transform: scaleY(0.2);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes dealerIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes dealerAct {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-2px) rotate(-2deg); }
  75% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes adviceFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes tipSettle {
  0% {
    opacity: 0.38;
    transform: translateY(8px) scale(0.99);
    filter: blur(1px);
  }
  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.008);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes lossScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes lossNoiseShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

@keyframes lossTextJitter {
  0%, 91%, 100% { transform: translate(0, 0); }
  92% { transform: translate(-1px, 0); }
  93% { transform: translate(1px, -1px); }
  94% { transform: translate(0, 1px); }
  95% { transform: translate(0, 0); }
}

@keyframes lossDrift {
  0% { transform: translateX(0); opacity: 0.08; }
  50% { opacity: 0.18; }
  100% { transform: translateX(-30px); opacity: 0.08; }
}

@keyframes cardDropTilt {
  from { transform: translateY(-10px) rotate(-2deg); }
  to { transform: translateY(0) rotate(0deg); }
}
