/* Dungeon Blitz: Revival — Unified Web Player, Play-First Landing & Mobile Virtual Console (7.60.0) */
:root {
  --db-ground: #08090d;
  --db-obsidian: #11131a;
  --db-stone: #484b5c;
  --db-stone-hi: #666a7f;
  --db-stone-lo: #232530;
  --db-keyline: #07080b;
  --db-gold: #f0c419;
  --db-gold-hi: #ffe878;
  --db-gold-mid: #d79b0b;
  --db-gold-lo: #835804;
  --db-crimson: #d93f32;
  --db-crimson-hi: #ff6e5e;
  --db-cream: #faf3db;
  --db-muted: #b7b9cc;
  --db-focus: #ffe878;
  --db-bad: #ff9486;
  --db-ember: rgba(242, 166, 36, 0.34);
  --db-font-epic: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --db-font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --db-font-ui: "Nunito", system-ui, -apple-system, sans-serif;
  /* Proportional unit for the mobile landscape virtual console */
  --u: clamp(38px, 11.8vmin, 62px);
  --pad-l: max(12px, env(safe-area-inset-left));
  --pad-r: max(12px, env(safe-area-inset-right));
  --pad-b: max(10px, env(safe-area-inset-bottom));
  --pad-t: max(8px, env(safe-area-inset-top));
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--db-ground);
  color: var(--db-cream);
  font-family: var(--db-font-ui);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

::selection {
  background: rgba(240, 196, 25, 0.32);
  color: var(--db-cream);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* ---- Game Stage --------------------------------------------------------------------------------------- */
#game {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--db-ground);
}

#game ruffle-player {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

/* Home Play-first landing allows smooth scrolling into the Forged Sanctum Colophon; active play locks 100dvh */
html.has-play-gate:not(.is-playing) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #54492c var(--db-ground);
}

html.has-play-gate:not(.is-playing)::-webkit-scrollbar {
  width: 10px;
}

html.has-play-gate:not(.is-playing)::-webkit-scrollbar-track {
  background: var(--db-ground);
}

html.has-play-gate:not(.is-playing)::-webkit-scrollbar-thumb {
  background: #3d3626;
  border: 2px solid var(--db-ground);
  border-radius: 999px;
}

html.has-play-gate:not(.is-playing)::-webkit-scrollbar-thumb:hover {
  background: #6c5a2c;
}

html.has-play-gate:not(.is-playing) body {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
  overscroll-behavior-y: auto;
}

/* ---- Play-First Landing Gate (/) — Sculpted PLAY stage + Forged Obsidian Sanctum Colophon ------------- */
#play-gate {
  position: relative;
  z-index: 12;
  width: 100%;
  background: var(--db-ground);
  transition: opacity 0.44s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.44s;
}

#play-gate.is-hidden {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-stage {
  position: relative;
  min-height: calc(100vh - 46px);
  min-height: calc(100dvh - 46px);
  display: grid;
  place-items: center;
  padding: 24px 24px 96px;
  overflow: hidden;
  background: var(--db-ground);
}

.play-backdrop {
  position: absolute;
  inset: -2%;
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.42) saturate(1.08) contrast(1.06);
}

.play-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.play-backdrop-toggle {
  position: absolute;
  inset-block-start: clamp(12px, 2vw, 24px);
  inset-inline-end: clamp(12px, 2vw, 24px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #715e33;
  border-radius: 50%;
  background: #101014;
  color: #f3e7b5;
  cursor: pointer;
}

.play-backdrop-toggle[hidden] { display: none; }

.play-backdrop-toggle:hover,
.play-backdrop-toggle:focus-visible { border-color: currentColor; }

.play-backdrop-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.play-backdrop-toggle::before {
  content: '';
  width: 12px;
  height: 13px;
  box-sizing: border-box;
  border-inline: 3px solid currentColor;
}

.play-backdrop-toggle.is-paused::before {
  width: 0;
  height: 0;
  margin-inline-start: 2px;
  border: 7px solid transparent;
  border-inline-start: 11px solid currentColor;
  border-inline-end: 0;
}

.play-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 42% at 50% 50%, rgba(242, 178, 36, 0.16) 0%, rgba(16, 13, 10, 0.12) 48%, rgba(7, 8, 12, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 8, 12, 0.56) 0%, rgba(7, 8, 12, 0.14) 50%, rgba(7, 8, 12, 0.72) 100%);
}

/* Ambient forge embers behind the PLAY medallion */
.play-embers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.play-embers span {
  position: absolute;
  bottom: -14px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--db-gold-hi);
  opacity: 0;
  animation: db-ember-rise var(--dur, 7s) linear var(--delay, 0s) infinite;
}

.play-embers span:nth-child(1) { left: 22%; --dur: 7.4s; --delay: 0.4s; }
.play-embers span:nth-child(2) { left: 37%; --dur: 6.2s; --delay: 1.8s; width: 3px; height: 3px; }
.play-embers span:nth-child(3) { left: 48%; --dur: 8.1s; --delay: 0.9s; width: 5px; height: 5px; }
.play-embers span:nth-child(4) { left: 56%; --dur: 6.8s; --delay: 2.6s; }
.play-embers span:nth-child(5) { left: 68%; --dur: 7.6s; --delay: 1.1s; width: 3px; height: 3px; }
.play-embers span:nth-child(6) { left: 79%; --dur: 8.4s; --delay: 3.2s; }

@keyframes db-ember-rise {
  0% { transform: translate3d(0, 0, 0) scale(0.7); opacity: 0; }
  18% { opacity: 0.85; }
  75% { opacity: 0.45; }
  100% { transform: translate3d(24px, -78vh, 0) scale(0.2); opacity: 0; }
}

/* Forged Obsidian-and-Gold Heroic PLAY Medallion Plaque (AAA 13.5:1 contrast, zero slop glow) */
.play-btn-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
}

.play-btn-aura {
  position: absolute;
  inset: -44px -58px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(242, 190, 48, 0.22) 0%, rgba(180, 114, 18, 0.08) 48%, transparent 72%);
  pointer-events: none;
  animation: db-aura-pulse 4s ease-in-out infinite;
}

@keyframes db-aura-pulse {
  0%, 100% { opacity: 0.72; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.04); }
}

.play-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 22px);
  min-width: clamp(248px, 32vw, 372px);
  min-height: clamp(86px, 12vh, 116px);
  padding: clamp(18px, 2.4vh, 26px) clamp(44px, 5.4vw, 72px);
  border: 3px solid var(--db-gold);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 85% 65% at 50% 0%, rgba(255, 224, 112, 0.16), transparent 64%),
    linear-gradient(180deg, #252019 0%, #15120e 58%, #0d0b09 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 232, 120, 0.28),
    0 22px 48px -10px rgba(0, 0, 0, 0.92),
    0 6px 14px rgba(0, 0, 0, 0.72);
  color: var(--db-gold-hi);
  cursor: pointer;
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s ease,
    background-color 0.18s ease;
}

/* Specular forged-metal sweep triggered smoothly on hover/focus */
.play-btn::before {
  content: "";
  position: absolute;
  inset: -40% -25%;
  background: linear-gradient(
    112deg,
    transparent 38%,
    rgba(255, 238, 168, 0.08) 46%,
    rgba(255, 244, 194, 0.34) 50%,
    rgba(255, 238, 168, 0.08) 54%,
    transparent 62%
  );
  transform: translateX(-115%);
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

/* Inner carved gold hairline frame */
.play-btn::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 13px;
  border: 1px solid rgba(240, 196, 25, 0.44);
  pointer-events: none;
}

.play-btn-icon {
  position: relative;
  z-index: 1;
  width: clamp(28px, 3.6vw, 40px);
  height: clamp(28px, 3.6vw, 40px);
  flex: 0 0 auto;
  fill: var(--db-gold-hi);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.85));
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), fill 0.18s ease;
}

.play-btn-label {
  position: relative;
  z-index: 1;
  font-family: var(--db-font-epic);
  font-weight: 900;
  font-size: clamp(32px, 4.8vw, 54px);
  line-height: 1;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--db-gold-hi);
  text-shadow:
    0 2px 0 #3a2304,
    0 4px 10px rgba(0, 0, 0, 0.88);
}

.play-btn-rivet {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6be, #c68e10 68%, #472d04 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 1;
}
.play-btn-rivet.tl { top: 12px; left: 14px; }
.play-btn-rivet.tr { top: 12px; right: 14px; }
.play-btn-rivet.bl { bottom: 12px; left: 14px; }
.play-btn-rivet.br { bottom: 12px; right: 14px; }

.play-btn:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--db-gold-hi);
  background:
    radial-gradient(ellipse 88% 70% at 50% 0%, rgba(255, 228, 120, 0.26), transparent 68%),
    linear-gradient(180deg, #30281d 0%, #1b1610 58%, #110d09 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 148, 0.56),
    0 28px 56px -10px rgba(0, 0, 0, 0.96),
    0 10px 22px rgba(0, 0, 0, 0.78);
}

.play-btn:hover::before,
.play-btn:focus-visible::before {
  transform: translateX(115%);
}

.play-btn:hover .play-btn-icon {
  transform: translateX(3px) scale(1.08);
  fill: #fff6c8;
}

.play-btn:active {
  transform: translateY(2px) scale(0.985);
  box-shadow:
    inset 0 0 0 2px rgba(255, 232, 120, 0.36),
    0 10px 24px -6px rgba(0, 0, 0, 0.92),
    0 3px 8px rgba(0, 0, 0, 0.8);
}

.play-btn:focus-visible {
  outline: 4px solid var(--db-focus);
  outline-offset: 6px;
}

/* ---- Center-Bottom HUD Navigation Dock on Play Gate --------------------------------------------------- */
.play-dock {
  position: absolute;
  left: 50%;
  bottom: max(26px, calc(22px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 0 4px;
}

.play-dock-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: linear-gradient(180deg, #0b0c10, #191a21);
  border: 1.5px solid rgba(240, 203, 12, 0.68);
  border-radius: 999px;
  box-shadow:
    0 0 0 1.5px var(--db-keyline),
    inset 0 2px 6px rgba(0, 0, 0, 0.72),
    0 12px 24px -8px rgba(0, 0, 0, 0.88);
}

.play-dock-nav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px 1px;
  border-radius: 999px;
  font: 800 15px/1 var(--db-font-ui);
  color: #ddd6bf;
  text-decoration: none;
  white-space: nowrap;
  text-shadow:
    0 1px 0 var(--db-keyline),
    1px 0 0 var(--db-keyline),
    -1px 0 0 var(--db-keyline),
    0 -1px 0 var(--db-keyline),
    0 2px 3px rgba(0, 0, 0, 0.65);
  transition: color 0.16s ease;
}

.play-dock-nav a:hover,
.play-dock-nav a:focus-visible {
  color: var(--db-cream);
}

.play-dock-nav a:focus-visible {
  outline: 2.5px solid #2ea6ff;
  outline-offset: 1px;
}

.play-nav-glide {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 0;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b6d8f 0%, #2b3f57 62%, #202f42 100%);
  border: 1.5px solid #2ea6ff;
  box-shadow:
    0 0 0 1.5px var(--db-keyline),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 10px -2px rgba(0, 0, 0, 0.68);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.18s ease;
}

.play-nav-glide.is-on {
  opacity: 1;
}

.play-nav-glide.is-jump {
  transition: opacity 0.18s ease;
}

.play-dock-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.play-online-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 3px 14px 3px 6px;
  background: linear-gradient(180deg, #0b0c10, #1b1d24);
  border: 1.5px solid rgba(240, 203, 12, 0.68);
  border-radius: 999px;
  box-shadow:
    0 0 0 1.5px var(--db-keyline),
    inset 0 2px 4px rgba(0, 0, 0, 0.52),
    0 10px 22px -8px rgba(0, 0, 0, 0.86);
  color: var(--db-cream);
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.play-online-pill:hover {
  border-color: var(--db-gold-hi);
  transform: translateY(-1px);
}

.play-online-heads {
  display: flex;
  padding-left: 8px;
}

.play-online-heads[hidden] {
  display: none;
}

.play-online-heads img {
  width: 26px;
  height: 26px;
  margin-left: -8px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--db-stone-lo);
  border: 2px solid var(--db-keyline);
}

.play-online-dot {
  width: 10px;
  height: 10px;
  margin-left: -12px;
  align-self: flex-end;
  margin-bottom: 5px;
  border-radius: 50%;
  background: #8ee089;
  border: 2px solid var(--db-keyline);
}

.play-online-heads[hidden] + .play-online-dot {
  margin-left: 2px;
  align-self: center;
  margin-bottom: 0;
}

.play-online-pill b {
  font: 700 17px/1 var(--db-font-display);
  color: var(--db-cream);
  font-variant-numeric: lining-nums tabular-nums;
  text-shadow: 0 1px 0 var(--db-keyline), 0 2px 3px rgba(0, 0, 0, 0.7);
}

.play-dock-donate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4b4d5c 0%, #30323d 58%, #22242d 100%);
  border: 2.5px solid var(--db-gold);
  box-shadow:
    0 0 0 1.5px var(--db-keyline),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.22),
    0 10px 22px -8px rgba(0, 0, 0, 0.88);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.play-dock-donate img {
  width: 24px;
  height: 21px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
}

.play-dock-donate::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px 6px;
  border-radius: 999px;
  background: #232530;
  border: 1.5px solid var(--db-gold);
  box-shadow: 0 0 0 1.5px var(--db-keyline), 0 8px 16px rgba(0, 0, 0, 0.72);
  color: var(--db-cream);
  font: 800 12px/1 var(--db-font-ui);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.play-dock-donate:hover,
.play-dock-donate:focus-visible {
  transform: translateY(-1px);
  border-color: var(--db-gold-hi);
  background: linear-gradient(180deg, #5c5e70 0%, #3a3c49 58%, #2a2c36 100%);
}

.play-dock-donate:hover::after,
.play-dock-donate:focus-visible::after {
  opacity: 1;
}

.play-dock-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, #686a7c 0%, #4a4b59 46%, #383946 54%, #2f303a 100%);
  border: 2.5px solid var(--db-gold);
  box-shadow:
    0 0 0 1.5px var(--db-keyline),
    inset 0 2px 0 rgba(255, 255, 255, 0.26),
    0 10px 22px -8px rgba(0, 0, 0, 0.88);
  color: var(--db-cream);
  font: 900 16px/1 var(--db-font-ui);
  text-decoration: none;
  white-space: nowrap;
  text-shadow:
    0 1px 0 var(--db-keyline),
    1px 0 0 var(--db-keyline),
    -1px 0 0 var(--db-keyline),
    0 -1px 0 var(--db-keyline),
    0 2px 3px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.play-dock-download:hover,
.play-dock-download:focus-visible {
  transform: translateY(-1px);
  border-color: var(--db-gold-hi);
  background: linear-gradient(180deg, #77798e 0%, #555767 46%, #414352 54%, #363844 100%);
}

.play-dock-download:active,
.play-dock-donate:active {
  transform: translateY(1px);
}

.play-online-pill:focus-visible,
.play-dock-donate:focus-visible,
.play-dock-download:focus-visible {
  outline: 3px solid #2ea6ff;
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  .play-dock {
    flex-wrap: wrap;
    width: calc(100vw - 20px);
    gap: 8px;
    bottom: max(12px, calc(10px + env(safe-area-inset-bottom)));
  }
  .play-dock-nav {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .play-dock-nav::-webkit-scrollbar {
    display: none;
  }
  .play-dock-nav a {
    padding: 0 11px 1px;
    font-size: 14px;
    min-height: 34px;
  }
  .play-dock-download {
    min-height: 40px;
    padding: 0 16px 1px;
    font-size: 14px;
  }
  .play-dock-donate {
    width: 40px;
    height: 40px;
  }
  .play-online-pill {
    min-height: 40px;
  }
}

@media (max-height: 520px) {
  .play-stage {
    min-height: 100dvh;
    padding-bottom: 64px;
  }
}

@media (max-height: 430px) {
  .play-dock {
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 6px;
  }
  .play-dock-nav a {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }
  .play-dock-download {
    min-height: 34px;
    padding: 0 13px;
    font-size: 13px;
  }
  .play-dock-donate {
    width: 34px;
    height: 34px;
  }
  .play-dock-donate img {
    width: 18px;
    height: 16px;
  }
  .play-online-pill {
    min-height: 34px;
    padding: 2px 10px 2px 5px;
  }
  .play-online-heads img {
    width: 20px;
    height: 20px;
  }
  .play-online-pill b {
    font-size: 14px;
  }
}

.home-patch {
  position: relative;
  z-index: 5;
  max-width: 976px;
  margin: -14px auto 0;
  padding: 0 16px 6px;
}

.home-patch-link {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 46px;
  padding: 9px 16px;
  border: 1px solid #695b32;
  border-radius: 12px;
  background: #17161a;
  color: var(--db-cream);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.home-patch-link:hover,
.home-patch-link:focus-visible {
  border-color: #b59a53;
  background: #211e1d;
}

.home-patch-link:focus-visible {
  outline: 2px solid var(--db-focus);
  outline-offset: 3px;
}

#home-patch-heading {
  flex: none;
  margin: 0;
  color: #ffe393;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
}

.home-patch-release {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding-inline-start: 16px;
  border-inline-start: 1px solid #524939;
  font-size: 14px;
  line-height: 1.35;
}

.home-patch-version,
.home-patch-date {
  flex: none;
  color: #cec1a5;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.home-patch-date {
  margin-inline-start: auto;
}

.home-patch-title {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.home-patch-arrow {
  flex: none;
  width: 20px;
  height: 20px;
  margin-inline-start: auto;
  fill: none;
  stroke: #ffe393;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1020px) {
  .home-patch {
    margin-block-start: 0;
  }
}

@media (max-width: 640px) {
  .home-patch-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 9px 12px;
  }

  .home-patch-release {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 8px;
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .home-patch-date {
    display: none;
  }
}

@media (max-width: 1020px) and (min-height: 521px) {
  .play-stage {
    min-height: calc(100dvh - 84px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-patch-link {
    transition: none;
  }
}

/* ---- Forged Sanctum Colophon (Home Footer below the Play Arena — 7.61.0) ------------------------------ */
.play-colophon {
  position: relative;
  z-index: 3;
  padding: 0 clamp(14px, 3vw, 32px) clamp(32px, 5vw, 56px);
  background:
    radial-gradient(ellipse 74% 38% at 50% 0%, rgba(240, 196, 25, 0.08), transparent 68%),
    linear-gradient(180deg, #090a0f 0%, #0d0f16 55%, #07080c 100%);
  -webkit-user-select: text;
  user-select: text;
}

.colophon-seam {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto clamp(20px, 3vw, 30px);
  height: 46px;
}

.colophon-seam-line {
  flex: 1 1 auto;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(240, 196, 25, 0.42) 55%, rgba(255, 232, 120, 0.85) 100%);
}

.colophon-seam-line:last-child {
  background: linear-gradient(90deg, rgba(255, 232, 120, 0.85) 0%, rgba(240, 196, 25, 0.42) 45%, transparent 100%);
}

.colophon-keystone {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1.5px solid var(--db-gold);
  background: linear-gradient(180deg, #252019 0%, #14120f 100%);
  color: var(--db-gold-hi);
  cursor: pointer;
  transform: rotate(45deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 120, 0.25),
    0 8px 18px -4px rgba(0, 0, 0, 0.88);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease, background-color 0.18s ease;
}

.colophon-keystone svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-45deg);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.colophon-keystone:hover,
.colophon-keystone:focus-visible {
  border-color: var(--db-gold-hi);
  background: linear-gradient(180deg, #322a1e 0%, #1b1711 100%);
  transform: rotate(45deg) scale(1.08);
}

.colophon-keystone:hover svg {
  transform: rotate(-45deg) translateY(1.5px);
}

.colophon-keystone:focus-visible {
  outline: 3px solid #2ea6ff;
  outline-offset: 5px;
}

.colophon-shell {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 3.8vw, 44px) clamp(24px, 4vw, 48px);
  border-radius: 20px;
  border: 1.5px solid rgba(240, 196, 25, 0.44);
  background:
    radial-gradient(ellipse 72% 48% at 18% 0%, rgba(240, 196, 25, 0.08), transparent 64%),
    linear-gradient(180deg, #13151e 0%, #0d0f16 58%, #0a0b10 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 120, 0.16),
    0 24px 52px -16px rgba(0, 0, 0, 0.94),
    0 8px 20px -8px rgba(0, 0, 0, 0.78);
}

.colophon-shell::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 13px;
  border: 1px solid rgba(240, 196, 25, 0.16);
  pointer-events: none;
}

.colophon-rivet {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6be, #c68e10 68%, #472d04 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 1;
}
.colophon-rivet.tl { top: 14px; left: 14px; }
.colophon-rivet.tr { top: 14px; right: 14px; }
.colophon-rivet.bl { bottom: 14px; left: 14px; }
.colophon-rivet.br { bottom: 14px; right: 14px; }

.colophon-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
}

.colophon-decree {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.colophon-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.colophon-brand img {
  width: auto;
  height: 54px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.72));
}

.colophon-wordmark {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 2px 2px 7px;
  font-family: var(--db-font-epic);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0.08em;
  color: var(--db-gold-hi);
  text-shadow:
    0 1px 0 #b8820a,
    0 2px 0 #4a2e04,
    1.5px 1.5px 0 var(--db-keyline),
    -1.5px 1.5px 0 var(--db-keyline),
    1.5px -1.5px 0 var(--db-keyline),
    -1.5px -1.5px 0 var(--db-keyline),
    0 4px 7px rgba(0, 0, 0, 0.85);
}

.colophon-wordmark::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, #b8860b 20%, #fff099 50%, #b8860b 80%, transparent 100%);
}

.colophon-wordmark::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.5px;
  width: 5px;
  height: 5px;
  background: #fff2a6;
  border: 1px solid #4a2e04;
  transform: translateX(-50%) rotate(45deg);
}

.colophon-official {
  margin: 0;
  max-width: 58ch;
  font: 600 15px/1.68 var(--db-font-ui);
  color: #f0e8d2;
}

.colophon-official strong {
  color: var(--db-gold-hi);
  font-weight: 800;
}

.colophon-rights {
  margin: 0;
  padding-top: 14px;
  max-width: 58ch;
  border-top: 1px solid rgba(240, 196, 25, 0.16);
  font: 600 13.5px/1.64 var(--db-font-ui);
  color: #c8c4b8;
}

.colophon-rights strong {
  color: #f0e8d2;
  font-weight: 800;
}

.colophon-ledger {
  display: flex;
  flex-direction: column;
}

.colophon-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px 18px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid rgba(240, 196, 25, 0.15);
}

.colophon-row:first-child {
  padding-top: 2px;
  border-top: 0;
}

.colophon-label {
  margin: 0;
  padding-top: 8px;
  font-family: var(--db-font-epic);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: #f2ce46;
}

.colophon-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.colophon-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(240, 196, 25, 0.24);
  background: linear-gradient(180deg, #1b1e28 0%, #13151e 100%);
  color: #f0e8d2;
  font: 700 13.5px/1.15 var(--db-font-ui);
  text-decoration: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.colophon-links a:hover,
.colophon-links a:focus-visible {
  border-color: var(--db-gold-hi);
  background: linear-gradient(180deg, #2b2619 0%, #1b1810 100%);
  color: #fff6c8;
  transform: translateY(-1px);
}

.colophon-links a:focus-visible {
  outline: 2.5px solid #2ea6ff;
  outline-offset: 2px;
}

.colophon-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(240, 196, 25, 0.2);
}

.colophon-channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.colophon-channel {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(240, 196, 25, 0.36);
  background: linear-gradient(180deg, #191c26 0%, #101219 100%);
  color: #f2ead4;
  font: 800 14px/1.1 var(--db-font-ui);
  text-decoration: none;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.72);
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.colophon-channel svg {
  width: 17px;
  height: 17px;
  fill: var(--db-gold-hi);
  flex: none;
}

.colophon-channel:hover,
.colophon-channel:focus-visible {
  border-color: var(--db-gold-hi);
  color: #fff7cc;
  transform: translateY(-1px);
}

.colophon-channel:focus-visible {
  outline: 2.5px solid #2ea6ff;
  outline-offset: 2px;
}

.colophon-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--db-gold);
  background: linear-gradient(180deg, #282218 0%, #15120d 100%);
  color: var(--db-gold-hi);
  font: 800 13.5px/1.1 var(--db-font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 120, 0.2),
    0 6px 14px -6px rgba(0, 0, 0, 0.85);
  transition: border-color 0.16s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), color 0.16s ease;
}

.colophon-top-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.colophon-top-btn:hover,
.colophon-top-btn:focus-visible {
  border-color: var(--db-gold-hi);
  color: #fff8ce;
  transform: translateY(-1px);
}

.colophon-top-btn:focus-visible {
  outline: 2.5px solid #2ea6ff;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .colophon-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .colophon-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .colophon-label {
    padding-top: 0;
  }
  .colophon-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .colophon-top-btn {
    justify-content: center;
  }
}

/* ---- Loading Overlay ---------------------------------------------------------------------------------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--db-font-display);
  background:
    radial-gradient(ellipse 68% 52% at 50% 42%, rgba(240, 196, 25, 0.09), transparent 70%),
    radial-gradient(ellipse at 50% 40%, #262833 0%, #14151c 56%, var(--db-ground) 100%);
  transition: opacity 0.46s ease, visibility 0s linear 0.46s;
}

#loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loader .logo {
  width: min(320px, 56vw, 40vh);
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.72));
  animation: db-logo-float 4.4s ease-in-out infinite;
}

@keyframes db-logo-float {
  50% { transform: translateY(-7px); }
}

.loader-bar {
  position: relative;
  width: min(440px, 84vw);
  height: 20px;
  border: 3px solid var(--db-keyline);
  border-radius: 12px;
  background: var(--db-obsidian);
  box-shadow: inset 0 0 0 2px var(--db-gold-lo), 0 10px 24px -10px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.loader-bar .fill {
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 0;
  max-width: calc(100% - 4px);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--db-gold-hi) 0%, var(--db-gold) 55%, var(--db-gold-lo) 100%);
  transition: width 0.24s ease-out;
}

.loader-bar .fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.46) 46%, transparent 72%) 0 0 / 220% 100%;
  animation: db-bar-sheen 1.5s linear infinite;
}

@keyframes db-bar-sheen {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.loader-status {
  margin: 0;
  min-height: 1.3em;
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 600;
  text-shadow: 0 2px 0 var(--db-keyline);
  font-variant-numeric: tabular-nums;
}

.loader-tip {
  margin: 0;
  max-width: 500px;
  min-height: 2.4em;
  font: 600 14px/1.38 var(--db-font-ui);
  color: var(--db-muted);
  transition: opacity 0.3s ease;
}

.loader-notice {
  max-width: 500px;
  padding: 14px 18px;
  border: 3px solid var(--db-keyline);
  border-radius: 14px;
  background: var(--db-stone-lo);
  box-shadow: inset 0 0 0 2px var(--db-stone);
  font: 700 14px/1.45 var(--db-font-ui);
}

.loader-notice.bad {
  color: var(--db-bad);
}

.loader-notice .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.db-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: 3px solid var(--db-keyline);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--db-gold-hi), var(--db-gold) 58%, var(--db-gold-lo));
  color: #261a03;
  font: 700 14px/1.2 var(--db-font-display);
  text-decoration: none;
  cursor: pointer;
}

.db-action-btn.plain {
  background: var(--db-obsidian);
  color: var(--db-cream);
  box-shadow: inset 0 0 0 2px var(--db-stone);
}

.db-action-btn:focus-visible {
  outline: 3px solid var(--db-focus);
  outline-offset: 2px;
}

/* WebGL Recovery Toast */
#recovery-banner {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 3px solid var(--db-keyline);
  border-radius: 14px;
  background: rgba(24, 25, 34, 0.96);
  box-shadow: inset 0 0 0 2px var(--db-gold-lo), 0 14px 32px rgba(0, 0, 0, 0.85);
  color: var(--db-cream);
  font: 700 14px/1.3 var(--db-font-ui);
}

/* ---- Mobile Portrait Rotate Prompt -------------------------------------------------------------------- */
#rotate-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  background:
    radial-gradient(ellipse 75% 50% at 50% 42%, rgba(240, 196, 25, 0.14), transparent 70%),
    linear-gradient(180deg, #161822 0%, #090a0f 100%);
}

.rotate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(360px, 100%);
  padding: 28px 22px 24px;
  border: 3px solid var(--db-keyline);
  border-radius: 22px;
  background: linear-gradient(180deg, #272936 0%, #171923 100%);
  box-shadow:
    inset 0 0 0 2px var(--db-stone),
    inset 0 2px 0 rgba(255, 232, 120, 0.24),
    0 24px 52px rgba(0, 0, 0, 0.85);
}

.rotate-graphic {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
}

.rotate-phone-svg {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}

.rotate-phone-body {
  transform-origin: 48px 48px;
  animation: db-phone-turn 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.rotate-arc {
  animation: db-arc-glow 2.6s ease-in-out infinite;
}

@keyframes db-phone-turn {
  0%, 16% { transform: rotate(0deg); }
  48%, 74% { transform: rotate(-90deg); }
  92%, 100% { transform: rotate(0deg); }
}

@keyframes db-arc-glow {
  0%, 100% { opacity: 0.45; }
  45%, 70% { opacity: 1; }
}

.rotate-title {
  margin: 0;
  font-family: var(--db-font-display);
  font-size: clamp(22px, 6vw, 27px);
  font-weight: 700;
  color: var(--db-gold-hi);
  text-shadow: 0 2px 0 var(--db-keyline);
}

.rotate-desc {
  margin: 0;
  font: 600 15px/1.48 var(--db-font-ui);
  color: var(--db-cream);
}

.rotate-sub {
  margin: -6px 0 0;
  font: 600 13px/1.35 var(--db-font-ui);
  color: var(--db-muted);
}

/* ---- Detailed Proportional Mobile Landscape Virtual Console ------------------------------------------- */
#touch-console {
  position: fixed;
  inset: 0;
  z-index: 16;
  pointer-events: none;
  touch-action: none;
  font-family: var(--db-font-display);
  transition: opacity 0.22s ease;
}

#touch-console[data-opacity="mid"] .tc-cluster {
  opacity: 0.66;
}

#touch-console[data-standby="1"] .tc-cluster {
  opacity: 0.28;
}

#touch-console[data-minimized="1"] .tc-cluster {
  display: none;
}

/* Top Utility Bar (tucked neatly at top-right so top-left HUD & top-center stay clear) */
.tc-utility {
  position: absolute;
  top: var(--pad-t);
  right: var(--pad-r);
  display: flex;
  align-items: center;
  gap: clamp(5px, 1.1vmin, 9px);
  pointer-events: auto;
  touch-action: none;
}

.tc-util-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: clamp(32px, 8.6vmin, 42px);
  height: clamp(28px, 7.6vmin, 36px);
  padding: 0 clamp(7px, 1.5vmin, 11px);
  border: 2px solid var(--db-keyline);
  border-radius: 10px;
  background: rgba(18, 20, 29, 0.78);
  box-shadow: inset 0 0 0 1.5px rgba(132, 138, 166, 0.42), 0 4px 12px rgba(0, 0, 0, 0.55);
  color: var(--db-cream);
  font: 700 clamp(10px, 2.5vmin, 12px)/1 var(--db-font-display);
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.08s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.tc-util-btn svg {
  width: clamp(13px, 3.6vmin, 17px);
  height: clamp(13px, 3.6vmin, 17px);
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tc-util-btn:active,
.tc-util-btn.is-down {
  transform: scale(0.92);
  background: rgba(240, 196, 25, 0.34);
  box-shadow: inset 0 0 0 1.5px var(--db-gold-hi);
  color: var(--db-gold-hi);
}

.tc-util-btn[data-active="1"] {
  background: rgba(240, 196, 25, 0.24);
  box-shadow: inset 0 0 0 1.5px var(--db-gold);
  color: var(--db-gold-hi);
}

/* Shared console cluster styling */
.tc-cluster {
  position: absolute;
  bottom: var(--pad-b);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ---- Left Thumb Zone: Analog Joystick + Interact (E) + Quick Drop ------------------------------------ */
.tc-left {
  left: var(--pad-l);
  width: calc(var(--u) * 3.15);
  height: calc(var(--u) * 3.25);
}

.tc-stick {
  position: absolute;
  left: 0;
  bottom: calc(var(--u) * 0.08);
  width: calc(var(--u) * 2.48);
  height: calc(var(--u) * 2.48);
  border-radius: 50%;
  border: 2.5px solid var(--db-keyline);
  background:
    radial-gradient(circle at 50% 50%, rgba(28, 31, 44, 0.54) 0%, rgba(12, 13, 19, 0.78) 72%, rgba(9, 10, 14, 0.88) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(240, 196, 25, 0.32),
    inset 0 0 18px rgba(0, 0, 0, 0.72),
    0 10px 24px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  touch-action: none;
}

.tc-stick-ring {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1.5px dashed rgba(240, 196, 25, 0.24);
  pointer-events: none;
}

.tc-stick-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.65;
}

.tc-stick-arrows path {
  fill: rgba(250, 243, 219, 0.42);
  transition: fill 0.08s ease;
}

.tc-stick[data-dir-l="1"] .arr-l,
.tc-stick[data-dir-r="1"] .arr-r,
.tc-stick[data-dir-u="1"] .arr-u,
.tc-stick[data-dir-d="1"] .arr-d {
  fill: var(--db-gold-hi);
}

.tc-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 42%;
  margin-left: -21%;
  margin-top: -21%;
  border-radius: 50%;
  border: 2.5px solid var(--db-keyline);
  background:
    radial-gradient(circle at 36% 30%, #7d8299 0%, #484c5e 54%, #262834 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 232, 120, 0.62),
    0 6px 14px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.tc-stick.is-active .tc-knob {
  background: radial-gradient(circle at 36% 30%, var(--db-gold-hi) 0%, var(--db-gold) 58%, var(--db-gold-lo) 100%);
  box-shadow: inset 0 0 0 2px #fff8d6, 0 6px 14px rgba(0, 0, 0, 0.75);
}

/* Interact (E) contextual button */
.tc-use-btn {
  position: absolute;
  left: calc(var(--u) * 0.22);
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: calc(var(--u) * 1.42);
  height: calc(var(--u) * 0.66);
  padding: 0 10px;
  border: 2.5px solid var(--db-keyline);
  border-radius: 999px;
  background: rgba(24, 26, 36, 0.8);
  box-shadow: inset 0 0 0 1.5px rgba(140, 146, 174, 0.48), 0 6px 14px rgba(0, 0, 0, 0.55);
  color: var(--db-cream);
  font: 700 clamp(11px, 2.7vmin, 13px)/1 var(--db-font-display);
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.08s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tc-use-btn svg {
  width: clamp(13px, 3.4vmin, 17px);
  height: clamp(13px, 3.4vmin, 17px);
  stroke: currentColor;
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tc-use-btn.is-ready {
  background: linear-gradient(180deg, #ffe77a 0%, #ebb512 62%, #9a6705 100%);
  color: #241702;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 250, 214, 0.85),
    0 6px 16px rgba(0, 0, 0, 0.7);
  animation: db-use-pulse 1.5s ease-in-out infinite;
}

@keyframes db-use-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.tc-use-btn.is-down {
  transform: scale(0.92);
}

/* Quick Drop button beside left stick */
.tc-drop-btn {
  position: absolute;
  left: calc(var(--u) * 2.46);
  bottom: calc(var(--u) * 0.14);
  width: calc(var(--u) * 0.72);
  height: calc(var(--u) * 0.72);
  border-radius: 50%;
  border: 2.5px solid var(--db-keyline);
  background: rgba(24, 26, 36, 0.78);
  box-shadow: inset 0 0 0 1.5px rgba(138, 145, 172, 0.42), 0 5px 12px rgba(0, 0, 0, 0.55);
  color: var(--db-muted);
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
}

.tc-drop-btn svg {
  width: 54%;
  height: 54%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tc-drop-btn.is-down {
  transform: scale(0.9);
  background: rgba(240, 196, 25, 0.34);
  color: var(--db-gold-hi);
  box-shadow: inset 0 0 0 1.5px var(--db-gold-hi);
}

/* ---- Right Thumb Zone: Attack Twin-Stick + Jump + 6 Power Arc + Pet (7) + Mount (8) ------------------ */
.tc-right {
  right: var(--pad-r);
  width: calc(var(--u) * 4.65);
  height: calc(var(--u) * 4.45);
}

/* Main 360° Aim + Attack Twin-Stick */
.tc-attack {
  position: absolute;
  right: calc(var(--u) * 0.06);
  bottom: calc(var(--u) * 0.08);
  width: calc(var(--u) * 1.92);
  height: calc(var(--u) * 1.92);
  border-radius: 50%;
  border: 3px solid var(--db-keyline);
  background:
    radial-gradient(circle at 38% 30%, rgba(235, 86, 62, 0.88) 0%, rgba(168, 34, 24, 0.86) 56%, rgba(88, 14, 10, 0.92) 100%);
  box-shadow:
    inset 0 0 0 2.5px rgba(255, 220, 102, 0.72),
    inset 0 -4px 10px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.08s ease, box-shadow 0.1s ease;
}

.tc-attack-reticle {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 232, 120, 0);
  pointer-events: none;
  transition: border-color 0.12s ease;
}

.tc-attack.is-aiming .tc-attack-reticle {
  border-color: rgba(255, 232, 120, 0.82);
}

.tc-attack-puck {
  position: relative;
  width: 64%;
  height: 64%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.tc-attack-puck svg {
  width: 78%;
  height: 78%;
  fill: var(--db-cream);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75));
}

.tc-attack.is-down {
  box-shadow:
    inset 0 0 0 3px var(--db-gold-hi),
    0 6px 14px rgba(0, 0, 0, 0.75);
}

/* Dedicated Jump Button */
.tc-jump {
  position: absolute;
  right: calc(var(--u) * 2.12);
  bottom: calc(var(--u) * 0.12);
  width: calc(var(--u) * 1.18);
  height: calc(var(--u) * 1.18);
  border-radius: 50%;
  border: 2.5px solid var(--db-keyline);
  background:
    radial-gradient(circle at 38% 30%, rgba(74, 152, 238, 0.88) 0%, rgba(36, 94, 174, 0.88) 62%, rgba(20, 52, 104, 0.92) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(178, 222, 255, 0.64),
    0 8px 18px rgba(0, 0, 0, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.08s ease;
}

.tc-jump svg {
  width: 54%;
  height: 54%;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
}

.tc-jump.is-down {
  transform: scale(0.9);
  box-shadow: inset 0 0 0 2.5px #fff, 0 5px 14px rgba(0, 0, 0, 0.7);
}

/* Power Skill Buttons (1-6) in dual ergonomic radial arcs around Attack */
.tc-skill {
  position: absolute;
  width: calc(var(--u) * 0.96);
  height: calc(var(--u) * 0.96);
  border-radius: 50%;
  border: 2.5px solid var(--db-keyline);
  background:
    radial-gradient(circle at 36% 28%, rgba(74, 78, 98, 0.9) 0%, rgba(36, 39, 52, 0.9) 62%, rgba(20, 22, 31, 0.94) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(240, 196, 25, 0.56),
    0 6px 14px rgba(0, 0, 0, 0.62);
  color: var(--db-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.08s ease, box-shadow 0.1s ease;
}

.tc-skill-num {
  font-size: clamp(13px, 3.5vmin, 18px);
  font-weight: 700;
  line-height: 1;
  color: var(--db-gold-hi);
  text-shadow: 0 1.5px 0 var(--db-keyline);
}

.tc-skill-tag {
  font-family: var(--db-font-ui);
  font-size: clamp(7px, 1.8vmin, 9px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(250, 243, 219, 0.72);
  margin-top: 1px;
}

.tc-skill.is-down {
  transform: scale(0.88);
  background: radial-gradient(circle at 36% 28%, var(--db-gold-hi) 0%, var(--db-gold) 62%, var(--db-gold-lo) 100%);
  box-shadow: inset 0 0 0 2px #fff8d8, 0 4px 12px rgba(0, 0, 0, 0.7);
}

.tc-skill.is-down .tc-skill-num,
.tc-skill.is-down .tc-skill-tag {
  color: #231602;
  text-shadow: none;
}

/* Inner Arc (Powers 1, 2, 3) — zero overlap with crisp thumb spacing */
.tc-s1 { right: calc(var(--u) * 2.34); bottom: calc(var(--u) * 1.48); }
.tc-s2 { right: calc(var(--u) * 1.44); bottom: calc(var(--u) * 2.26); }
.tc-s3 { right: calc(var(--u) * 0.34); bottom: calc(var(--u) * 2.26); }

/* Outer Arc (Powers 4, 5, 6) */
.tc-s4 { right: calc(var(--u) * 3.44); bottom: calc(var(--u) * 1.38); }
.tc-s5 { right: calc(var(--u) * 2.66); bottom: calc(var(--u) * 2.58); }
.tc-s6 { right: calc(var(--u) * 1.54); bottom: calc(var(--u) * 3.36); }

/* Pet (7) & Mount (8) Pills */
.tc-comp {
  position: absolute;
  width: calc(var(--u) * 0.84);
  height: calc(var(--u) * 0.84);
  border-radius: 50%;
  border: 2px solid var(--db-keyline);
  background: rgba(25, 28, 39, 0.86);
  box-shadow: inset 0 0 0 1.5px rgba(154, 162, 192, 0.56), 0 5px 12px rgba(0, 0, 0, 0.58);
  color: var(--db-cream);
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.08s ease;
}

.tc-comp svg {
  width: 58%;
  height: 58%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tc-comp .tc-key-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  border: 1.5px solid var(--db-keyline);
  background: var(--db-gold);
  color: #241602;
  font: 800 9px/12px var(--db-font-ui);
  text-align: center;
}

.tc-comp.is-down {
  transform: scale(0.88);
  background: rgba(240, 196, 25, 0.36);
  color: var(--db-gold-hi);
  box-shadow: inset 0 0 0 2px var(--db-gold-hi);
}

.tc-pet { right: calc(var(--u) * 0.24); bottom: calc(var(--u) * 3.38); }
.tc-mount { right: calc(var(--u) * 3.50); bottom: calc(var(--u) * 0.16); }

/* Very compact landscape screens (e.g. 568x320 / 667x375) */
@media (max-height: 360px) {
  :root {
    --u: clamp(32px, 11.2vmin, 46px);
  }
  .tc-util-btn span {
    display: none;
  }
}

@media (max-height: 500px) {
  #loader { gap: 10px; }
  .loader-tip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .play-embers span,
  .play-btn-aura,
  .play-btn::before,
  #loader .logo,
  .loader-bar .fill::after,
  .rotate-phone-body,
  .rotate-arc,
  .tc-use-btn.is-ready {
    animation: none !important;
  }
  .play-btn,
  #play-gate,
  #loader,
  .colophon-keystone,
  .colophon-links a,
  .colophon-channel,
  .colophon-top-btn {
    transition: none !important;
  }
  html.has-play-gate:not(.is-playing) {
    scroll-behavior: auto !important;
  }
}

/* ---- Forged Sanctum Chronicle (Home Editorial SEO Showcase below the Play Arena — 7.76.0) ------------- */
.home-chronicle {
  position: relative;
  z-index: 4;
  max-width: 1120px;
  margin: clamp(24px, 3.6vw, 42px) auto clamp(8px, 2vw, 18px);
  padding: 0 clamp(14px, 3vw, 32px);
  display: grid;
  gap: clamp(18px, 2.4vw, 26px);
  -webkit-user-select: text;
  user-select: text;
}

.chronicle-panel {
  position: relative;
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3.4vw, 38px);
  border-radius: 18px;
  border: 1.5px solid rgba(240, 196, 25, 0.34);
  background:
    radial-gradient(ellipse 68% 44% at 14% 0%, rgba(240, 196, 25, 0.07), transparent 64%),
    linear-gradient(180deg, #13151e 0%, #0d0f16 64%, #0a0b10 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 120, 0.14),
    0 18px 40px -16px rgba(0, 0, 0, 0.88);
}

.chronicle-head {
  margin-bottom: 18px;
}

.chronicle-eyebrow {
  margin: 0 0 6px;
  color: var(--db-gold);
  font: 800 12px/1.2 var(--db-font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chronicle-head h2 {
  margin: 0;
  color: var(--db-cream);
  font: 700 clamp(21px, 2.4vw, 28px)/1.2 var(--db-font-display);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.chronicle-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.85fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}

.chronicle-copy p {
  margin: 0 0 13px;
  color: #dfd8c2;
  font-size: 15.5px;
  line-height: 1.65;
}

.chronicle-copy a,
.chronicle-class a,
.chronicle-feature a,
.chronicle-faq a {
  color: var(--db-gold-hi);
  text-decoration: underline;
  text-decoration-color: rgba(255, 232, 120, 0.42);
  text-underline-offset: 3px;
}

.chronicle-copy a:hover,
.chronicle-class a:hover,
.chronicle-feature a:hover,
.chronicle-faq a:hover {
  color: #fff6be;
  text-decoration-color: var(--db-gold-hi);
}

.chronicle-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chronicle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(240, 196, 25, 0.56);
  background: linear-gradient(180deg, #2b2d38, #1c1e27);
  color: var(--db-cream) !important;
  font: 800 14px/1 var(--db-font-ui);
  text-decoration: none !important;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chronicle-btn.primary {
  border-color: var(--db-gold-hi);
  background: linear-gradient(180deg, #686a7c 0%, #444655 52%, #2f303b 100%);
}

.chronicle-btn:hover,
.chronicle-btn:focus-visible {
  transform: translateY(-1px);
  border-color: var(--db-gold-hi);
  background: linear-gradient(180deg, #3c3e4c, #272935);
}

.chronicle-stats {
  margin: 0;
  display: grid;
  gap: 10px;
}

.chronicle-stats > div {
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(240, 196, 25, 0.22);
  background: rgba(8, 9, 13, 0.62);
}

.chronicle-stats dt {
  color: var(--db-muted);
  font: 800 11.5px/1.2 var(--db-font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chronicle-stats dd {
  margin: 4px 0 0;
  color: var(--db-gold-hi);
  font: 700 16px/1.25 var(--db-font-display);
}

.chronicle-classes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chronicle-class {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(240, 196, 25, 0.24);
  background: rgba(8, 9, 13, 0.56);
}

.chronicle-class-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.chronicle-class-top img {
  width: auto;
  height: 46px;
  flex: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.75));
}

.chronicle-class h3 {
  margin: 0;
  font: 700 19px/1.15 var(--db-font-display);
}

.chronicle-class h3 a {
  text-decoration: none;
}

.chronicle-role {
  margin: 3px 0 0;
  color: var(--db-muted);
  font-size: 13px;
  font-weight: 700;
}

.chronicle-class > p {
  margin: 0;
  color: #dcd5bf;
  font-size: 14.5px;
  line-height: 1.58;
}

.chronicle-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chronicle-shot {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(240, 196, 25, 0.26);
  background: #08090d;
  display: flex;
  flex-direction: column;
}

.chronicle-shot-wide {
  grid-column: span 3;
}

.chronicle-shot img {
  display: block;
  width: 100%;
  height: 175px;
  object-fit: cover;
  object-position: center 35%;
}

.chronicle-shot-wide img {
  height: 210px;
}

.chronicle-shot figcaption {
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}

.chronicle-shot figcaption strong {
  color: var(--db-cream);
  font: 700 14.5px/1.25 var(--db-font-display);
}

.chronicle-shot figcaption span {
  color: var(--db-muted);
  font-size: 13px;
  line-height: 1.35;
}

.chronicle-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chronicle-feature {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(240, 196, 25, 0.22);
  background: rgba(8, 9, 13, 0.56);
}

.chronicle-feature h3 {
  margin: 0 0 8px;
  font: 700 17.5px/1.25 var(--db-font-display);
}

.chronicle-feature h3 a {
  text-decoration: none;
}

.chronicle-feature p {
  margin: 0;
  color: #dcd5bf;
  font-size: 14.5px;
  line-height: 1.6;
}

.chronicle-faq {
  display: grid;
  gap: 10px;
}

.chronicle-faq details {
  border-radius: 12px;
  border: 1px solid rgba(240, 196, 25, 0.24);
  background: rgba(8, 9, 13, 0.58);
  padding: 12px 16px;
}

.chronicle-faq summary {
  cursor: pointer;
  color: var(--db-cream);
  font: 800 15.5px/1.4 var(--db-font-ui);
}

.chronicle-faq details[open] summary {
  color: var(--db-gold-hi);
}

.chronicle-faq p {
  margin: 10px 0 2px;
  color: #dcd5bf;
  font-size: 14.5px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .chronicle-lead-grid,
  .chronicle-classes,
  .chronicle-gallery,
  .chronicle-features {
    grid-template-columns: 1fr;
  }
  .chronicle-shot-wide {
    grid-column: span 1;
  }
}

/* ---- Live Performance HUD (Ctrl+Shift+F — 7.77.0) ----------------------------------------------------- */
.db-perf-hud {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  z-index: 40;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(240, 196, 25, 0.55);
  background: rgba(10, 11, 16, 0.86);
  color: var(--db-cream);
  font: 800 12px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.db-perf-hud[data-q="ok"] { border-color: #62d474; color: #dffbe2; }
.db-perf-hud[data-q="warn"] { border-color: #f0c419; color: #fff2be; }
.db-perf-hud[data-q="bad"] { border-color: #ff6e5e; color: #ffd6d0; }
