/* ——— PragCore DOM-Platformer Game Mode (Retro Arcade Engine) ——— */

/* Header Trigger Button */
.header-game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px !important;
  width: 32px;
  height: 30px;
  padding: 0 !important;
  border-radius: 9999px !important;
  background: rgba(8, 14, 28, 0.68) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0;
}

.header-game-btn:hover {
  color: #00f2fe !important;
  border-color: rgba(0, 242, 254, 0.5) !important;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px);
}

.header-game-btn:active {
  transform: translateY(0) scale(0.95);
}

.header-game-btn.is-active {
  background: rgba(0, 242, 254, 0.16) !important;
  border-color: #00f2fe !important;
  color: #00f2fe !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5), inset 0 0 10px rgba(0, 242, 254, 0.3) !important;
}

.header-game-btn svg {
  display: block;
  pointer-events: none;
}

/* Fullscreen High-Performance Game Canvas */
#prag-platformer-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99990;
  pointer-events: none;
  opacity: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#prag-platformer-canvas.is-visible {
  opacity: 1;
}

/* Super Smash Bros Dynamic Camera Stage Transform */
.dom-runner-stage-active {
  transition: none !important;
}

body.prag-platformer-active {
  /* Natural document scrolling enabled; fixed elements preserved */
}

/* Super Smash Bros Battle Placard HUD & Cockpit System */
#prag-platformer-hud {
  position: fixed;
  inset: 0;
  z-index: 99995;
  pointer-events: none;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.65rem;
  color: #f1f5f9;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-sizing: border-box;
}

#prag-platformer-hud.is-visible {
  opacity: 1;
}

/* Smart Proximity Ghosting: fades battle placards if player fights near HUD dock */
#prag-platformer-hud.is-ghosted .platformer-hud-dock,
#prag-platformer-hud.is-ghosted .platformer-hud-primary,
.platformer-hud-p2.is-ghosted,
.platformer-hud-p2-join.is-ghosted {
  opacity: 0.22 !important;
}

#prag-platformer-hud.is-ghosted .platformer-hud-dock:hover,
#prag-platformer-hud.is-ghosted .platformer-hud-primary:hover,
.platformer-hud-p2.is-ghosted:hover,
.platformer-hud-p2-join.is-ghosted:hover {
  opacity: 1 !important;
}

/* Consolidated Executive HUD Dock (Top-Center) — Minimal Fighting-Game Pill */
.platformer-hud-dock {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99995;
  display: inline-flex;
  align-items: center;
  height: 36px;
  width: max-content;
  max-width: calc(100vw - 20px);
  gap: 0.45rem;
  padding: 0 10px;
  background: rgba(8, 14, 26, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  pointer-events: auto;
  user-select: none;
  box-sizing: border-box;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.platformer-hud-dock:hover {
  border-color: rgba(0, 242, 254, 0.35);
}

/* Classic Super Smash Bros Bottom Dock Placement */
.platformer-hud-dock.is-bottom-dock,
#platformer-hud-dock.is-bottom-dock {
  top: auto !important;
  bottom: 12px !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.platformer-hud-dock.is-bottom-dock .platformer-hud-tuck-tab {
  top: auto !important;
  bottom: 8px !important;
}

/* Minimalist Fighting HUD Mode */
.platformer-hud-dock.is-minimal-mode,
#platformer-hud-dock.is-minimal-mode {
  height: 30px !important;
  padding: 0 8px !important;
  background: rgba(8, 14, 26, 0.38) !important;
}

.platformer-hud-dock.is-minimal-mode .platformer-hud-dock-sep,
.platformer-hud-dock.is-minimal-mode .platformer-hud-cluster-system {
  display: none !important;
}

.platformer-hud-dock .platformer-hud-badge {
  display: none !important;
}

.platformer-hud-secondary-compat {
  display: none !important;
}

/* Tuckable HUD Dock & Mini HUD Capsule Transitions */
.platformer-hud-dock.is-tucked {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.platformer-hud-dock.is-tucked .platformer-hud-primary,
.platformer-hud-dock.is-tucked .platformer-hud-dock-sep,
.platformer-hud-dock.is-tucked .platformer-hud-cluster-system {
  display: none !important;
}

.platformer-hud-dock.is-tucked .hud-tuck-chevron {
  transform: rotate(180deg);
}

.hud-tuck-chevron,
.hud-untuck-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mini HUD Capsule pinned at top: 8px when HUD is tucked */
.platformer-hud-tuck-tab {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 8px;
  background: rgba(8, 14, 26, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-family: var(--font-display, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  cursor: default;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-dock.is-tucked .platformer-hud-tuck-tab {
  display: inline-flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.platformer-hud-tuck-tab:hover {
  border-color: rgba(0, 242, 254, 0.40);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.mini-hud-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.mini-hud-name {
  font-family: var(--font-display, sans-serif);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
}

.mini-hud-stocks {
  font-family: var(--font-mono, monospace);
  font-size: 0.70rem;
  font-weight: 700;
  color: #00f2fe;
  white-space: nowrap;
}

.mini-hud-dmg {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.mini-hud-p2 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.mini-hud-p2-name {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 800;
  color: #f87171;
}

.mini-hud-p2-stocks {
  font-family: var(--font-mono, monospace);
  font-size: 0.70rem;
  font-weight: 700;
  color: #f87171;
}

.mini-hud-p2-dmg {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
}

.platformer-hud-untuck-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  color: #f1f5f9;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  white-space: nowrap;
}

.platformer-hud-untuck-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.platformer-hud-tuck-tab .tuck-tab-sep {
  opacity: 0.35;
  margin: 0 1px;
}

.platformer-hud-dock .platformer-hud-primary {
  position: static;
  bottom: auto;
  left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  flex-shrink: 0;
}

.platformer-hud-dock .platformer-hud-primary:hover {
  border-color: transparent;
  box-shadow: none;
}

.platformer-hud-dock .platformer-hud-cluster-system {
  position: static;
  top: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  flex-shrink: 0;
}

.platformer-hud-dock-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 2px;
  flex-shrink: 0;
}

.platformer-hud-quick-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.platformer-hud-quick-btn,
.platformer-hud-pause-btn,
.platformer-hud-tuck-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 3px 7px;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.platformer-hud-quick-btn:hover,
.platformer-hud-quick-btn[aria-expanded="true"],
.platformer-hud-tuck-btn:hover {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.35);
}

.platformer-hud-pause-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Non-Interrupting Quick Settings Popover */
.platformer-hud-quick-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 99997;
  display: none;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  padding: 8px 10px;
  background: rgba(8, 14, 26, 0.50);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 0.60rem;
  box-sizing: border-box;
}

.platformer-hud-quick-popover.is-open {
  display: flex;
}

.quick-pop-title {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.quick-pop-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quick-pop-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.56rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.quick-pop-btn:hover,
.quick-pop-btn.is-active {
  background: rgba(0, 242, 254, 0.14);
  border-color: rgba(0, 242, 254, 0.40);
  color: #00f2fe;
}

.quick-pop-btn.quick-pop-pause {
  justify-content: center;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.quick-pop-btn.quick-pop-pause:hover {
  background: rgba(0, 242, 254, 0.22);
  border-color: #00f2fe;
  color: #00f2fe;
}

/* In-Game Full Pause & Settings Modal */
.platformer-pause-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  user-select: none;
}

.platformer-pause-modal.is-open {
  display: flex;
}

.pause-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 16, 0.55);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
}

.pause-modal-sheet {
  position: relative;
  z-index: 2;
  width: 440px;
  max-width: calc(100vw - 32px);
  background: rgba(8, 14, 26, 0.55);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  padding: 18px 20px;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.pause-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pause-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  text-transform: uppercase;
}

.pause-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: platformer-pulse 1.8s infinite ease-in-out;
}

.pause-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pause-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

.pause-modal-primary-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pause-action-primary,
.pause-action-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pause-action-primary {
  background: #ffffff;
  color: #030712;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.pause-action-primary:hover {
  background: #00f2fe;
  color: #030712;
  border-color: #00f2fe;
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.45);
}

.pause-action-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pause-action-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.pause-section-label {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 2px;
}

.pause-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.pause-grid-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.60rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pause-grid-btn:hover {
  background: rgba(0, 242, 254, 0.10);
  border-color: rgba(0, 242, 254, 0.35);
  color: #ffffff;
}

.pause-grid-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.pause-grid-val {
  font-weight: 800;
  color: #00f2fe;
}

.pause-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pause-exit-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pause-exit-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* Authentic Super Smash Bros P1 Battle Placard (Fallback / Standalone) */
.platformer-hud-primary {
  position: fixed;
  bottom: 16px;
  left: 24px;
  z-index: 99995;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 14px 8px 10px;
  background: rgba(6, 12, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 242, 254, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.20);
  box-sizing: border-box;
  flex-shrink: 0;
  pointer-events: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.platformer-hud-primary:hover {
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.82), 0 0 24px rgba(0, 242, 254, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Expandable Actions & Telemetry Drawer (Anchored under Top System Bar) */
.platformer-hud-drawer {
  position: fixed;
  top: 52px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(4, 11, 26, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.26);
  border-radius: 14px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 242, 254, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  min-width: 290px;
  max-width: min(340px, calc(100vw - 32px));
  z-index: 99997;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.platformer-hud-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.platformer-hud-drawer.is-collapsed {
  display: none;
}

.platformer-hud-drawer.is-open {
  display: flex;
}

.platformer-hud-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.platformer-hud-drawer-heading {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
}

.platformer-hud-drawer .platformer-hud-cluster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.platformer-hud-drawer .platformer-hud-cluster-telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: none;
}

.platformer-hud-drawer .platformer-hud-cluster-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.58rem;
}

/* Tools Drawer Toggle Button */
.platformer-hud-tools-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.22);
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.platformer-hud-tools-toggle:hover,
.platformer-hud-tools-toggle.is-active {
  background: rgba(0, 242, 254, 0.20);
  border-color: rgba(0, 242, 254, 0.5);
  color: #00f2fe;
}

/* Persistent Semi-Transparent Controls HUD Dock (Non-Interrupting) */
#prag-platformer-controller-hud {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 99990;
  display: flex;
  align-items: center;
  background: rgba(8, 14, 26, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9999px;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.65rem;
  color: #e2e8f0;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

#prag-platformer-controller-hud.is-visible {
  opacity: 0.88;
}

/* Input Mode Deduplication: Never display keyboard guide when touch controls are active */
body.platformer-touch-active #prag-platformer-controller-hud,
body:has(#prag-platformer-touch-controls.is-visible:not([style*="display: none"])) #prag-platformer-controller-hud {
  display: none !important;
}

@media (hover: none) and (pointer: coarse) {
  #prag-platformer-controller-hud {
    display: none !important;
  }
}

body:has(.platformer-hud-dock.is-bottom-dock) #prag-platformer-controller-hud {
  left: 20px !important;
  transform: none !important;
}

body:has(.platformer-hud-dock.is-bottom-dock) #prag-platformer-controller-hud.is-ghosted {
  transform: scale(0.96) !important;
}

/* Smart Proximity Ghosting: drops opacity to 0.18 when player approaches */
#prag-platformer-controller-hud.is-ghosted {
  opacity: 0.18 !important;
  transform: translateX(-50%) scale(0.96);
}

#prag-platformer-controller-hud:hover,
#prag-platformer-controller-hud:focus-within {
  opacity: 0.98 !important;
}

.ctrl-hud-inner {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.26rem 0.55rem;
  pointer-events: none;
}

.ctrl-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.14rem 0.38rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9999px;
  color: #94a3b8;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.ctrl-hud-device-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ctrl-hud-bindings {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.ctrl-hud-bindings::-webkit-scrollbar {
  display: none;
}

.ctrl-hud-item {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.08s ease;
}

.ctrl-hud-item.is-active {
  transform: translateY(-1px);
}

.controller-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.34rem;
  min-width: 1.1rem;
  height: 1.15rem;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-sizing: border-box;
  transition: background 0.08s ease, border-color 0.08s ease, color 0.08s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

.controller-keycap.is-active,
.controller-keycap.is-pressed {
  color: #ffffff !important;
  background: rgba(0, 242, 254, 0.45) !important;
  border-color: #00f2fe !important;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  transform: translateY(1px) scale(0.96);
}

#ctrl-k-atk.is-active, #ctrl-k-atk.is-pressed {
  background: rgba(56, 189, 248, 0.45) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

#ctrl-k-smash.is-active, #ctrl-k-smash.is-pressed {
  background: rgba(244, 63, 94, 0.45) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

#ctrl-k-spec.is-active, #ctrl-k-spec.is-pressed {
  background: rgba(255, 215, 0, 0.45) !important;
  border-color: #ffd700 !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

#ctrl-k-shield.is-active, #ctrl-k-shield.is-pressed {
  background: rgba(16, 185, 129, 0.45) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

#ctrl-k-grab.is-active, #ctrl-k-grab.is-pressed {
  background: rgba(245, 158, 11, 0.45) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.controller-action {
  font-size: 0.54rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.08s ease, text-shadow 0.08s ease;
}

.ctrl-hud-item.is-active .controller-action {
  color: #ffffff !important;
  text-shadow: 0 0 6px rgba(0, 242, 254, 0.6);
}

.ctrl-hud-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  margin-left: 0.12rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  color: #94a3b8;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s, color 0.15s, transform 0.2s, border-color 0.15s;
  flex-shrink: 0;
}

.ctrl-hud-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

#prag-platformer-controller-hud.is-collapsed {
  background: rgba(8, 14, 26, 0.40);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  padding: 0;
}

#prag-platformer-controller-hud.is-collapsed .ctrl-hud-inner {
  padding: 0.18rem 0.42rem;
  gap: 0.28rem;
}

#prag-platformer-controller-hud.is-collapsed .ctrl-hud-bindings {
  display: none;
}

#prag-platformer-controller-hud.is-collapsed .ctrl-hud-toggle {
  transform: rotate(180deg);
}

/* Semantic Pod Clusters */
.platformer-hud-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex-shrink: 0;
}

.platformer-hud-cluster-combat {
  padding-right: 0.45rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.platformer-hud-cluster-telemetry {
  padding-right: 0.45rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.platformer-hud-cluster-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.platformer-hud-cluster-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.platformer-hud-cluster-system {
  position: fixed;
  top: 14px;
  right: 24px;
  z-index: 99996;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(6, 12, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 3px 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  pointer-events: auto;
}

.platformer-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-weight: 800;
  font-size: 0.62rem;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 9999px;
  padding: 2px 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platformer-hud-badge-title {
  display: inline-block;
  font-size: 0.60rem;
  font-weight: 800;
}

.platformer-hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: platformer-pulse 1.8s infinite ease-in-out;
}

@keyframes platformer-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.platformer-hud-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #cbd5e1;
}

.platformer-hud-val {
  font-weight: 700;
  color: #ffffff;
}

.platformer-hud-coins .platformer-hud-val {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.platformer-hud-sector .platformer-hud-val {
  color: #38bdf8;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Super Smash Bros Chromatic Heat Damage Counter */
.platformer-hud-damage {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 0 4px;
  line-height: 1;
}

.platformer-hud-damage > span:first-child {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0;
}

.platformer-hud-damage .platformer-hud-val {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.15s ease;
}

.platformer-hud-damage .platformer-hud-val.is-danger-50 {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.8);
}

.platformer-hud-damage .platformer-hud-val.is-danger-100 {
  color: #f97316;
  text-shadow: 0 0 12px rgba(249, 115, 22, 0.5), 0 1px 3px rgba(0, 0, 0, 0.8);
  animation: platformer-shake 0.3s infinite ease-in-out;
}

.platformer-hud-damage .platformer-hud-val.is-danger-150 {
  color: #ef4444;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.6), 0 1px 4px rgba(0, 0, 0, 0.9);
  animation: platformer-shake 0.12s infinite ease-in-out;
}

@keyframes platformer-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  75% { transform: translateX(1px); }
}

/* Stocks (Lives Remaining) Avionics Counter */
.platformer-hud-stocks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.platformer-stock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #00f2fe;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-stock-icon svg {
  display: block;
}

.platformer-stock-icon.is-active {
  color: #00f2fe;
  filter: drop-shadow(0 0 4px rgba(0, 242, 254, 0.6));
  transform: scale(1);
}

.platformer-stock-icon.is-lost {
  color: rgba(239, 68, 68, 0.35);
  opacity: 0.3;
  transform: scale(0.8);
  filter: none;
}

/* Controls Guide Popover */
.platformer-hud-help-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.platformer-hud-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platformer-hud-help-btn:hover,
.platformer-hud-help-btn:focus-visible {
  background: rgba(0, 242, 254, 0.2);
  border-color: #00f2fe;
  color: #ffffff;
  outline: none;
}

.platformer-hud-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(4, 11, 26, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.65rem;
  color: #cbd5e1;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99996;
}

.platformer-hud-popover span {
  display: block;
}

.platformer-hud-help-wrapper:hover .platformer-hud-popover,
.platformer-hud-help-btn:focus-visible + .platformer-hud-popover {
  display: flex;
}

.platformer-hud-controls {
  font-size: 0.64rem;
  color: #64748b;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.platformer-hud-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 0.15rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platformer-hud-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

/* On-Screen Mobile / Touch Virtual Controls */
#prag-platformer-touch-controls {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  left: 0;
  right: 0;
  z-index: 99996;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 max(20px, env(safe-area-inset-right, 20px)) 0 max(20px, env(safe-area-inset-left, 20px));
  pointer-events: none;
}

/* Responsive Avionics HUD Breakpoints */

/* Tier 1: Laptops & Wide Desktops (< 1440px) - Hide brand ticker to keep HUD compact */
@media (max-width: 1440px) {
  .platformer-hud-cluster-brand {
    display: none !important;
  }
}

/* Tier 2: Medium Laptops & Tablets (< 1200px) - Hide non-essential telemetry (Sector, Bricks, Score, Alt) */
@media (max-width: 1200px) {
  .platformer-hud-cluster-telemetry {
    display: none !important;
  }
  #prag-platformer-hud {
    gap: 0.38rem;
    padding: 0.25rem 0.55rem;
  }
}

/* Tier 3: Compact Tablets (< 900px) */
@media (max-width: 900px) {
  #prag-platformer-hud {
    right: 16px;
    max-width: calc(100vw - 32px);
  }
  .platformer-hud-cluster-combat {
    padding-right: 0.35rem;
  }
  .platformer-hud-dock {
    padding: 3px 8px;
    gap: 0.32rem;
  }
  .platformer-hud-dock .platformer-hud-badge {
    display: none !important;
  }
  .platformer-hud-dock .p2-join-label {
    display: none !important;
  }
}

/* Tier 4: Mobile Cockpit & Touch Screens (<= 768px, pointer: coarse) */
@media ((max-width: 768px) and (pointer: coarse)), (pointer: coarse) {
  #prag-platformer-touch-controls.is-visible {
    display: flex;
  }
  #prag-platformer-controller-hud {
    display: none !important;
  }
  #prag-platformer-hud {
    font-size: 0.60rem;
    overflow: visible;
  }
  .platformer-hud-dock {
    padding: 3px 6px;
    gap: 0.22rem;
  }
  .platformer-hud-dock .platformer-hud-p2-join {
    display: none !important;
  }
  .platformer-hud-dock .platformer-hud-quick-btn span,
  .platformer-hud-dock .platformer-hud-pause-btn span,
  .platformer-hud-dock .platformer-hud-tuck-btn span {
    display: none !important;
  }
  .platformer-hud-dock .platformer-hud-quick-btn,
  .platformer-hud-dock .platformer-hud-pause-btn,
  .platformer-hud-dock .platformer-hud-tuck-btn {
    padding: 3px 5px !important;
  }
  .platformer-hud-dock .platformer-hud-help-wrapper {
    display: none !important;
  }
  #hud-character-name {
    max-width: 68px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .platformer-hud-primary {
    bottom: 185px;
    left: 14px;
    transform: scale(0.85);
    transform-origin: bottom left;
  }

  .platformer-hud-p2,
  .platformer-hud-p2-join {
    bottom: 185px;
    right: 14px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }

  .platformer-hud-cluster-system {
    top: max(10px, calc(env(safe-area-inset-top, 0px) + 8px));
    right: 8px;
  }

  .platformer-hud-drawer {
    top: 48px;
    right: 8px;
    max-width: calc(100vw - 16px);
    grid-template-areas:
      "combat system"
      "actions actions";
  }

  #prag-platformer-hud.is-visible {
    opacity: 1;
  }

  #prag-platformer-controller-hud {
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
    padding: 0.18rem 0.35rem;
    font-size: 0.58rem;
    max-width: calc(100vw - 20px);
  }
  #prag-platformer-controller-hud .controller-action {
    display: none;
  }
  #prag-platformer-controller-hud .ctrl-hud-inner {
    gap: 0.28rem;
    padding: 0.16rem 0.3rem;
  }
  #prag-platformer-controller-hud .ctrl-hud-bindings {
    gap: 0.25rem;
  }
  #prag-platformer-controller-hud .controller-keycap {
    min-width: 0.95rem;
    height: 1.05rem;
    font-size: 0.54rem;
    padding: 0.08rem 0.25rem;
  }

  .platformer-hud-cluster-combat {
    grid-area: combat;
    display: flex;
    align-items: center;
    gap: 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    padding-right: 4px;
  }

  .platformer-hud-cluster-system {
    grid-area: system;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 0;
    justify-content: flex-end;
  }

  .platformer-hud-cluster-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 1px;
    max-width: 100%;
  }

  .platformer-hud-cluster-actions::-webkit-scrollbar {
    display: none;
  }

  .platformer-hud-cluster-telemetry,
  .platformer-hud-cluster-brand {
    display: none !important;
  }

  .platformer-hud-stat {
    flex-shrink: 0;
    padding: 0.2rem 0.45rem;
  }

  .platformer-hud-close {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .platformer-hud-help-btn {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .platformer-hud-popover {
    font-size: 0.58rem;
    padding: 6px 10px;
    max-width: calc(100vw - 32px);
  }
}

/* ——— Ergonomic Mobile Virtual Gamepad Subsystem (Obsidian Glass Standard) ——— */

#prag-platformer-touch-controls {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  left: 0;
  right: 0;
  z-index: 99996;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 max(16px, env(safe-area-inset-right, 16px)) 0 max(16px, env(safe-area-inset-left, 16px));
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#prag-platformer-touch-controls {
  --touch-glass-alpha: 0.45;
  --touch-border-alpha: 0.12;
  --touch-btn-glass-alpha: 0.45;
  --touch-blur: 10px;
}

#prag-platformer-touch-controls.opacity-ghost {
  --touch-glass-alpha: 0.22;
  --touch-border-alpha: 0.08;
  --touch-btn-glass-alpha: 0.24;
  --touch-blur: 6px;
}

#prag-platformer-touch-controls.opacity-balanced {
  --touch-glass-alpha: 0.45;
  --touch-border-alpha: 0.12;
  --touch-btn-glass-alpha: 0.45;
  --touch-blur: 10px;
}

#prag-platformer-touch-controls.opacity-solid {
  --touch-glass-alpha: 0.86;
  --touch-border-alpha: 0.20;
  --touch-btn-glass-alpha: 0.88;
  --touch-blur: 16px;
}

@media (hover: none) and (pointer: coarse), ((max-width: 820px) and (pointer: coarse)) {
  #prag-platformer-touch-controls.is-visible {
    display: flex !important;
  }
}

#prag-platformer-touch-controls.force-visible {
  display: flex !important;
}

@media (pointer: fine) {
  #prag-platformer-touch-controls:not(.force-visible) {
    display: none !important;
  }
}

#prag-platformer-touch-controls.is-ghosted {
  opacity: 0.28;
}

/* Hide CloudyLogs pill on mobile when touch controls are visible to prevent D-pad collision */
body:has(#prag-platformer-touch-controls.is-visible) #prag-cloudylogs-root {
  display: none !important;
}

/* 4-Way Ergonomic Cross D-Pad Disc */
.platformer-dpad-pod {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: rgba(8, 14, 26, var(--touch-glass-alpha, 0.40));
  backdrop-filter: blur(var(--touch-blur, 24px)) saturate(190%);
  -webkit-backdrop-filter: blur(var(--touch-blur, 24px)) saturate(190%);
  border: 1px solid rgba(255, 255, 255, var(--touch-border-alpha, 0.10));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(3, 40px);
  gap: 3px;
  place-content: center;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

.platformer-dpad-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, var(--touch-border-alpha, 0.08));
  color: #94a3b8;
  display: grid;
  place-items: center;
  user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease, color 0.08s ease;
}

.platformer-dpad-btn.is-pressed,
.platformer-dpad-btn:active {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.40);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: scale(0.93);
}

#touch-up {
  grid-column: 2;
  grid-row: 1;
  border-radius: 14px 14px 4px 4px;
}

#touch-left {
  grid-column: 1;
  grid-row: 2;
  border-radius: 14px 4px 4px 14px;
}

.platformer-dpad-center {
  grid-column: 2;
  grid-row: 2;
  background: rgba(8, 14, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.platformer-dpad-center::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

#touch-right {
  grid-column: 3;
  grid-row: 2;
  border-radius: 4px 14px 14px 4px;
}

#touch-down {
  grid-column: 2;
  grid-row: 3;
  border-radius: 4px 4px 14px 14px;
}

/* Action Cluster (Ergonomic Thumb Arc & Utility Shelf) */
.platformer-action-diamond {
  position: relative;
  width: 188px;
  height: 168px;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

/* Utility Shelf (Codex & Contextual Warp) */
.platformer-touch-utility-shelf {
  position: absolute;
  top: -34px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

/* Deduplicate Codex: The main HUD dock is the authoritative home for Codex */
body:has(.platformer-hud-dock) .platformer-touch-utility-shelf,
body:has(#prag-platformer-hud) .platformer-touch-utility-shelf {
  display: none !important;
}

.platformer-touch-btn.codex-btn,
#touch-codex {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  height: 24px !important;
  padding: 0 10px !important;
  border-radius: 9999px !important;
  background: rgba(8, 14, 26, 0.45) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #cbd5e1 !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.platformer-touch-btn.codex-btn.is-pressed,
#touch-codex.is-pressed,
#touch-codex:active {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  transform: scale(0.94);
}

#touch-codex-badge {
  color: #38bdf8;
  font-size: 0.54rem;
  font-weight: 800;
}

.platformer-touch-btn.action-btn,
#touch-action {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 24px !important;
  padding: 0 12px !important;
  border-radius: 9999px !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  background: rgba(8, 14, 26, 0.35) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
  opacity: 0.45;
  pointer-events: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.platformer-touch-btn.action-btn.is-ready,
#touch-action.is-ready {
  opacity: 1 !important;
  pointer-events: auto !important;
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #f59e0b !important;
  color: #ffd700 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  animation: platformer-action-pulse 1.4s ease-in-out infinite;
  cursor: pointer;
}

@keyframes platformer-action-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
  }
}

/* Combat Action Buttons (Obsidian Glass Circular Buttons) */
/* Combat Action Buttons (Obsidian Glass Circular Buttons with Vector Glyphs) */
.platformer-touch-btn {
  position: absolute;
  border-radius: 50%;
  background: rgba(8, 14, 26, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
}

.platformer-touch-btn svg {
  pointer-events: none;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.touch-btn-sub {
  font-family: var(--font-mono, monospace);
  font-size: 0.42rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  opacity: 0.88;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.platformer-touch-btn.is-pressed,
.platformer-touch-btn:active {
  transform: scale(0.91);
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* JUMP Button — Natural Thumb Rest Anchor */
.platformer-touch-btn.jump-btn,
#touch-jump {
  bottom: 4px;
  right: 4px;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(56, 189, 248, 0.30);
  color: #38bdf8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.platformer-touch-btn.jump-btn .touch-btn-sub {
  font-size: 0.46rem;
  color: #cffafe;
}

.platformer-touch-btn.jump-btn.is-pressed,
.platformer-touch-btn.jump-btn:active,
#touch-jump.is-pressed {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* ATK Button — Primary Attack Sweep */
.platformer-touch-btn.atk-btn,
#touch-atk {
  bottom: 8px;
  right: 68px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.platformer-touch-btn.atk-btn .touch-btn-sub {
  color: #e0f2fe;
}

.platformer-touch-btn.atk-btn.is-pressed,
.platformer-touch-btn.atk-btn:active,
#touch-atk.is-pressed {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* DEF Button — Shield / Parry / Air Dodge Shoulder */
.platformer-touch-btn.shield-btn,
#touch-shield {
  bottom: 68px;
  right: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: #818cf8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.platformer-touch-btn.shield-btn .touch-btn-sub {
  color: #e0e7ff;
}

.platformer-touch-btn.shield-btn.is-pressed,
.platformer-touch-btn.shield-btn:active,
#touch-shield.is-pressed {
  background: rgba(129, 140, 248, 0.25) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* SPEC Button — Hero Special Attack */
.platformer-touch-btn.spec-btn,
#touch-spec {
  bottom: 64px;
  right: 62px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fbbf24;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.platformer-touch-btn.spec-btn .touch-btn-sub {
  color: #fef3c7;
}

.platformer-touch-btn.spec-btn.is-pressed,
.platformer-touch-btn.spec-btn:active,
#touch-spec.is-pressed {
  background: rgba(251, 191, 36, 0.25) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* GRAB Button — Grapple / Throw */
.platformer-touch-btn.grab-btn,
#touch-grab {
  bottom: 32px;
  right: 124px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(250, 204, 21, 0.25);
  color: #facc15;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.platformer-touch-btn.grab-btn .touch-btn-sub {
  color: #fef08a;
}

.platformer-touch-btn.grab-btn.is-pressed,
.platformer-touch-btn.grab-btn:active,
#touch-grab.is-pressed {
  background: rgba(250, 204, 21, 0.25) !important;
  border-color: #facc15 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* SMASH Button — Heavy Smash Apex */
.platformer-touch-btn.smash-btn,
#touch-smash {
  bottom: 118px;
  right: 32px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #f43f5e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.platformer-touch-btn.smash-btn .touch-btn-sub {
  color: #fee2e2;
}

.platformer-touch-btn.smash-btn.is-pressed,
.platformer-touch-btn.smash-btn:active,
#touch-smash.is-pressed {
  background: rgba(244, 63, 94, 0.25) !important;
  border-color: #f43f5e !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

/* Victory Celebration Modal */
#prag-platformer-victory {
  position: fixed;
  inset: 0;
  z-index: 2147483646 !important;
  display: grid;
  place-items: center;
  background: rgba(1, 4, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  padding: 1.5rem;
}

#prag-platformer-victory.is-open {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto !important;
}

body:has(#prag-platformer-victory.is-open) .hud-radar-dock,
body:has(#prag-platformer-gameover.is-open) .hud-radar-dock {
  opacity: 0 !important;
  pointer-events: none !important;
}

.platformer-victory-card {
  position: relative;
  z-index: 2147483647 !important;
  pointer-events: auto;
  width: min(480px, 92vw);
  background: rgba(4, 12, 28, 0.96);
  border: 1.5px solid rgba(0, 242, 254, 0.5);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 242, 254, 0.25);
  text-align: center;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#prag-platformer-victory.is-open .platformer-victory-card {
  transform: scale(1) translateY(0);
}

.platformer-victory-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #00f2fe;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.platformer-victory-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.platformer-victory-sub {
  font-family: var(--font-body, sans-serif);
  font-size: 0.95rem;
  color: #cbd5e1;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.platformer-victory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.platformer-stat-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.85rem 0.5rem;
}

.platformer-stat-tile-val {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.platformer-stat-tile:nth-child(2) .platformer-stat-tile-val {
  color: #ffd700;
}

.platformer-stat-tile:nth-child(3) .platformer-stat-tile-val {
  color: #00f2fe;
}

.platformer-stat-tile-lbl {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platformer-victory-actions {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
}

.platformer-btn-primary {
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  background: #00f2fe;
  color: #030a18;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
  transition: all 0.2s ease;
}

.platformer-btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.6);
}

.platformer-btn-secondary {
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: all 0.2s ease;
}

.platformer-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Game Over / Out of Stocks Modal */
#prag-platformer-gameover {
  position: fixed;
  inset: 0;
  z-index: 2147483646 !important;
  display: grid;
  place-items: center;
  background: rgba(1, 4, 12, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  padding: 1.5rem;
}

#prag-platformer-gameover.is-open {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto !important;
}

.platformer-gameover-card {
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 40px rgba(239, 68, 68, 0.25) !important;
}

.platformer-gameover-chip {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}

.platformer-gameover-title {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5) !important;
}

.platformer-btn-retry {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: 1px solid #f87171 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
}

.platformer-btn-retry:hover {
  background: #dc2626 !important;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.7) !important;
}

/* Stood-Upon Physical & Interactive 3D Extruded DOM Element Grounding */
.platformer-standing-on {
  outline: none !important;
  box-shadow:
    0 2px 0 rgba(0, 180, 216, 0.4),
    0 4px 16px rgba(0, 242, 254, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  transform: translateY(2px) scale(0.995) !important;
  transition: box-shadow 0.15s ease, transform 0.1s ease !important;
  z-index: 10 !important;
}

/* ==========================================================================
   TRUE 3D EXTRUDED LETTER GLYPHS & UI SLABS (DOM PERSPECTIVE 3D)
   ========================================================================== */

/* Ensure site header is always locked above game canvas */
body.prag-platformer-active .site-header,
body.prag-platformer-active .pdr-header,
body.prag-platformer-active header[role="banner"] {
  z-index: 999999 !important;
}

/* 3D Typographic Container — preserve native block / inline-block display */
.platformer-3d-container {
  position: relative;
}

/* Individual 3D Extruded Letter Glyph — Authentic Raised Keycaps */
.platformer-3d-glyph {
  display: inline-block !important;
  position: relative !important;
  transform: translateY(-4px) !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75),
    0 2px 0 rgba(56, 189, 248, 0.50),
    0 3px 0 rgba(14, 116, 144, 0.65),
    0 4px 0 rgba(15, 23, 42, 0.90),
    0 5px 8px rgba(0, 0, 0, 0.85) !important;
  transition: transform 0.10s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.10s ease !important;
  will-change: transform, text-shadow;
  outline: none !important;
  box-shadow: none !important;
}

/* Tactile 3D Keycap Step Depression when Character stands on the Letter */
.platformer-3d-glyph.platformer-standing-on,
.platformer-3d-glyph.is-stepped-on {
  transform: translateY(3px) scale(0.975) !important;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #00f2fe,
    0 3px 0 #0096c7,
    0 4px 0 #023e8a,
    0 5px 8px rgba(0, 0, 0, 0.95),
    0 0 20px rgba(0, 242, 254, 0.90) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Signature Glowing Hero Glyph Compositions (Taste, compiled.) */
#hero-compiled .platformer-3d-glyph,
.hero-compiled .platformer-3d-glyph {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 0 #00f2fe,
    0 3px 0 #0284c7,
    0 4px 0 #0369a1,
    0 5px 0 #075985,
    0 6px 14px rgba(0, 0, 0, 0.90),
    0 0 28px rgba(0, 242, 254, 0.85),
    0 0 54px rgba(0, 242, 254, 0.45) !important;
}

#hero-compiled .platformer-3d-glyph.is-stepped-on,
#hero-compiled .platformer-3d-glyph.platformer-standing-on,
.hero-compiled .platformer-3d-glyph.is-stepped-on,
.hero-compiled .platformer-3d-glyph.platformer-standing-on {
  transform: translateY(3.5px) scale(0.975) !important;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #38bdf8,
    0 3px 0 #0284c7,
    0 4px 0 #0369a1,
    0 5px 10px rgba(0, 0, 0, 0.95),
    0 0 36px rgba(0, 242, 254, 1.0),
    0 0 64px rgba(0, 242, 254, 0.75) !important;
}

#hero-taste .platformer-3d-glyph,
.hero-title .platformer-3d-glyph {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #cbd5e1,
    0 3px 0 #94a3b8,
    0 4px 0 #64748b,
    0 5px 0 #475569,
    0 6px 0 #334155,
    0 7px 0 #1e293b,
    0 8px 16px rgba(0, 0, 0, 0.90),
    0 0 24px rgba(255, 255, 255, 0.35) !important;
}

#hero-taste .platformer-3d-glyph.is-stepped-on,
#hero-taste .platformer-3d-glyph.platformer-standing-on,
.hero-title .platformer-3d-glyph.is-stepped-on,
.hero-title .platformer-3d-glyph.platformer-standing-on {
  transform: translateY(3.5px) scale(0.975) !important;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #38bdf8,
    0 3px 0 #0284c7,
    0 4px 0 #0369a1,
    0 5px 10px rgba(0, 0, 0, 0.95),
    0 0 32px rgba(0, 242, 254, 0.95) !important;
}

/* Light mode 3D letter extrusion */
html[data-resolved-theme="light"] .platformer-3d-glyph {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 0 #cbd5e1,
    0 3px 0 #94a3b8,
    0 4px 0 #64748b,
    0 5px 0 #475569,
    0 6px 8px rgba(0, 0, 0, 0.25) !important;
}

html[data-resolved-theme="light"] .platformer-3d-glyph.platformer-standing-on,
html[data-resolved-theme="light"] .platformer-3d-glyph.is-stepped-on {
  text-shadow:
    0 1px 0 #0284c7,
    0 2px 3px rgba(0, 0, 0, 0.35) !important;
}

html[data-resolved-theme="light"] #hero-compiled .platformer-3d-glyph,
html[data-theme="light"] #hero-compiled .platformer-3d-glyph {
  color: #0284c7 !important;
  -webkit-text-fill-color: #0284c7 !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 0 #38bdf8,
    0 3px 0 #0284c7,
    0 4px 0 #0369a1,
    0 5px 8px rgba(2, 132, 199, 0.35) !important;
}

/* True 3D Extruded UI Blocks (Buttons, Cards, Links) */
.platformer-3d-ui-block {
  transform: translateZ(8px) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s ease !important;
  will-change: transform, box-shadow;
}

/* Tactile 3D Step Depression when Character stands on the UI Block */
.platformer-3d-ui-block.platformer-standing-on,
.platformer-3d-ui-block.is-stepped-on {
  transform: translateY(2px) scale(0.995) !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(0, 242, 254, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  outline: none !important;
}

/* Fallback for unwrapped headings */
.hero-line.platformer-standing-on,
.hero-line-inner.platformer-standing-on,
.hero-title.platformer-standing-on,
.deploy-title.platformer-standing-on,
h1.platformer-standing-on,
h2.platformer-standing-on,
h3.platformer-standing-on,
p.platformer-standing-on {
  outline: none !important;
  box-shadow: none !important;
  transform: translateY(2px) !important;
  text-shadow: 0 1px 0 rgba(0, 242, 254, 0.7), 0 2px 0 rgba(0, 180, 216, 0.5), 0 3px 0 rgba(0, 119, 182, 0.35), 0 5px 14px rgba(0, 242, 254, 0.5) !important;
  transition: transform 0.08s ease, text-shadow 0.12s ease !important;
}

a.platformer-standing-on {
  outline: none !important;
  box-shadow: 0 2px 0 rgba(56, 189, 248, 0.5), 0 4px 18px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  transform: translateY(2px) !important;
}

button.platformer-standing-on,
.btn.platformer-standing-on {
  outline: none !important;
  box-shadow: 0 2px 0 rgba(255, 215, 0, 0.5), 0 4px 18px rgba(255, 215, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  transform: translateY(2px) !important;
}

/* Kinetic DOM Collision Pulse when Smashed Enemies Impact DOM Elements */
.platformer-kinetic-pulse {
  outline: 2px solid rgba(0, 242, 254, 0.9) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 26px rgba(0, 242, 254, 0.7), inset 0 0 14px rgba(0, 242, 254, 0.45) !important;
  transform: translateY(2px) scale(0.99) !important;
  transition: transform 0.08s ease-out, box-shadow 0.25s ease-out, outline 0.25s ease-out !important;
}

/* HUD System Codex Button & Brand Ticker */
.platformer-hud-codex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 9999px;
  color: #00f2fe;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.platformer-hud-codex-btn:hover,
.platformer-hud-codex-btn:focus-visible {
  background: rgba(0, 242, 254, 0.24);
  border-color: #00f2fe;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.4);
  color: #ffffff;
  outline: none;
}

.hud-codex-count {
  font-size: 0.6rem;
  color: #ffd700;
}

.platformer-hud-brand-ticker {
  font-size: 0.62rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

@media (max-width: 900px) {
  .platformer-hud-brand-ticker {
    display: none;
  }
}

/* Dynamic Crowd Reaction HUD Toast */
.platformer-hud-crowd {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 9999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-4px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.platformer-hud-crowd:not(.is-active) {
  display: none !important;
}

.platformer-hud-crowd.is-active {
  display: inline-flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.platformer-hud-crowd.type-cheer {
  background: rgba(255, 215, 0, 0.18);
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.platformer-hud-crowd.type-cheer .platformer-crowd-text {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.platformer-hud-crowd.type-gasp {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.platformer-hud-crowd.type-gasp .platformer-crowd-text {
  color: #c084fc;
}

.platformer-hud-crowd.type-woah {
  background: rgba(0, 242, 254, 0.22);
  border-color: #00f2fe;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
}

.platformer-hud-crowd.type-woah .platformer-crowd-text {
  color: #00f2fe;
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}

.platformer-hud-crowd.type-chant {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.platformer-hud-crowd.type-chant .platformer-crowd-text {
  color: #38bdf8;
  letter-spacing: 0.08em;
}

.platformer-hud-crowd.type-disappoint {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.platformer-hud-crowd.type-disappoint .platformer-crowd-text {
  color: #f87171;
}

.platformer-crowd-tag {
  font-size: 0.58rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.platformer-crowd-text {
  font-weight: 800;
}

@media (max-width: 768px) {
  .platformer-hud-crowd {
    font-size: 0.58rem;
    padding: 0.12rem 0.42rem;
    flex-shrink: 0;
  }
  .platformer-hud-crowd:not(.is-active) {
    display: none !important;
  }
}

/* Ambient Product Telemetry Card */
.platformer-product-inspect {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99994;
  max-width: 380px;
  width: calc(100vw - 48px);
  background: rgba(4, 11, 26, 0.94);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 14px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 28px rgba(0, 242, 254, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

/* Strict Invariant: Never display product inspect card in the DOM game per user mandate */
.platformer-product-inspect,
body:not(.prag-platformer-active) .platformer-product-inspect,
body.prag-platformer-active .platformer-product-inspect,
.platformer-product-inspect.is-visible,
.platformer-product-inspect.is-active,
.platformer-product-inspect.is-visible.is-active {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.product-inspect-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.product-inspect-dismiss {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.product-inspect-dismiss:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.product-inspect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-inspect-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.product-inspect-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 8px #00f2fe;
  animation: platformer-pulse 1.8s infinite ease-in-out;
}

.product-inspect-tier {
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-inspect-verified {
  font-family: var(--font-mono, monospace);
  font-size: 0.56rem;
  font-weight: 600;
  color: #10b981;
  letter-spacing: 0.04em;
}

.product-inspect-body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.product-inspect-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.25;
}

.product-inspect-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.product-inspect-tech {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.tech-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.product-inspect-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.product-inspect-prompt {
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 700;
  color: #00f2fe;
  letter-spacing: 0.06em;
}

.product-inspect-btn {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 9999px;
  color: #00f2fe;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-inspect-btn:hover {
  background: #00f2fe;
  color: #040915;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

@media (max-width: 768px) {
  .platformer-product-inspect {
    bottom: 215px; /* Clear of mobile bottom touch controls */
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    padding: 0.45rem 0.8rem;
    border-radius: 12px;
    gap: 0.25rem;
  }
  .product-inspect-desc,
  .product-inspect-tech {
    display: none !important; /* Hide long paragraph & tags on mobile to keep screen clear */
  }
  .product-inspect-title {
    font-size: 0.85rem;
  }
  .product-inspect-footer {
    margin-top: 0;
  }
  .product-inspect-prompt {
    font-size: 0.55rem;
  }
  .product-inspect-btn {
    padding: 0.15rem 0.5rem;
    font-size: 0.58rem;
  }
}

/* Sovereign Product Architecture Codex Modal */
.platformer-codex-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.platformer-codex-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.codex-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 12, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.codex-sheet {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 960px;
  max-height: 88vh;
  background: #040915;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 32px rgba(0, 242, 254, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-codex-modal.is-open .codex-sheet {
  transform: scale(1) translateY(0);
}

.codex-header {
  padding: 1.2rem 1.6rem 0.9rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.codex-title-wrap {
  flex: 1;
  min-width: 0;
}

.codex-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 700;
  color: #00f2fe;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.codex-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.codex-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.codex-progress-bar {
  flex: 1;
  max-width: 240px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.codex-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f2fe 0%, #ffd700 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}

.codex-progress-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: #ffd700;
  font-weight: 700;
}

.codex-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.codex-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
  transform: rotate(90deg);
}

/* Brand Manifesto */
.codex-manifesto {
  padding: 0.75rem 1.6rem;
  background: rgba(0, 242, 254, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.manifesto-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.manifesto-body {
  font-size: 0.74rem;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.4;
  margin: 0;
}

/* Filter Tabs */
.codex-filters {
  padding: 0.65rem 1.6rem;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.codex-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 0.28rem 0.75rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.codex-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.codex-tab.is-active {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

/* Search Row */
.codex-search-row {
  padding: 0.65rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.codex-search-input {
  width: 100%;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  outline: none;
  transition: all 0.2s ease;
}

.codex-search-input:focus {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.06);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

/* Product Matrix Grid */
.codex-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  min-height: 260px;
}

.codex-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.codex-card.is-unlocked {
  background: rgba(4, 16, 38, 0.65);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.codex-card.is-unlocked:hover {
  border-color: #00f2fe;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 242, 254, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.codex-card.is-locked {
  opacity: 0.55;
  border-style: dashed;
}

.codex-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.codex-card-tier {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.codex-card-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.56rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.codex-card.is-locked .codex-card-badge {
  color: #64748b;
}

.codex-card-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.codex-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0 0 0.65rem;
  flex: 1;
}

.codex-card-tech {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.codex-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.56rem;
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: #38bdf8;
}

.codex-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.5rem;
  margin-top: auto;
}

.codex-card-invariant {
  font-family: var(--font-mono, monospace);
  font-size: 0.56rem;
  color: #10b981;
  font-weight: 600;
}

.codex-card-hint {
  font-family: var(--font-mono, monospace);
  font-size: 0.56rem;
  color: #64748b;
  font-style: italic;
}

.codex-card-link {
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 700;
  color: #00f2fe;
  text-decoration: none;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  transition: all 0.2s ease;
}

.codex-card-link:hover {
  background: #00f2fe;
  color: #040915;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.codex-empty {
  grid-column: 1 / -1;
  padding: 2.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.codex-empty-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.06em;
}

.codex-empty-sub {
  font-size: 0.72rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .codex-sheet {
    width: 96%;
    max-height: 92vh;
    border-radius: 16px;
  }
  .codex-header {
    padding: 0.9rem 1.1rem 0.65rem;
  }
  .codex-title {
    font-size: 1.1rem;
    outline: none !important;
  }
  .codex-manifesto {
    padding: 0.45rem 1.1rem;
  }
  .manifesto-body {
    font-size: 0.68rem;
    line-height: 1.35;
  }
  .codex-filters {
    padding: 0.45rem 1.1rem;
    gap: 0.3rem;
  }
  .codex-tab {
    padding: 0.22rem 0.6rem;
    font-size: 0.58rem;
  }
  .codex-search-row {
    padding: 0.45rem 1.1rem;
  }
  .codex-grid {
    padding: 0.75rem 1.1rem;
    gap: 0.65rem;
  }
  .codex-card {
    padding: 0.75rem;
  }
  .codex-card-title {
    font-size: 0.88rem;
  }
  .codex-card-desc {
    font-size: 0.68rem;
  }
}

/* Platformer Character Hero Badge (Super Smash Bros Emblem) */
.platformer-hud-character {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 3px 9px 3px 7px;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: none;
  overflow: hidden;
  white-space: nowrap;
}

#hud-character-name {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: none;
}

.platformer-hud-character:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 242, 254, 0.55);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
  transform: translateY(-1px);
}

.platformer-char-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

/* Product Lead Hero Roster Selection Modal */
#prag-platformer-roster {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.236s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.236s;
  padding: 1rem;
}

#prag-platformer-roster.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.platformer-roster-sheet {
  width: min(1080px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #070c18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.12);
  overflow: hidden;
}

.platformer-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background: rgba(10, 16, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.platformer-roster-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.platformer-roster-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: #00f2fe;
  text-transform: uppercase;
  font-weight: 700;
}

.platformer-roster-title {
  margin: 0;
  font-family: var(--font-display, sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.platformer-roster-sub {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94a3b8;
}

.platformer-roster-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.platformer-roster-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.platformer-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
  padding: 1.25rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.platformer-roster-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.platformer-roster-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--card-color, #00f2fe);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.6), 0 0 15px var(--card-glow, rgba(0, 242, 254, 0.2));
}

.platformer-roster-card.is-active {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--card-color, #00f2fe);
  box-shadow: inset 0 0 12px var(--card-glow, rgba(0, 242, 254, 0.25)), 0 0 18px var(--card-glow, rgba(0, 242, 254, 0.3));
}

.roster-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roster-product-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--card-color, #00f2fe);
  border: 1px solid var(--card-color, rgba(0, 242, 254, 0.3));
}

.roster-hero-name {
  margin: 0;
  font-family: var(--font-display, sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.roster-hero-archetype {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: #94a3b8;
}

.roster-stats-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.roster-stat-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  color: #94a3b8;
}

.roster-stat-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.roster-stat-fill {
  height: 100%;
  background: var(--card-color, #00f2fe);
  border-radius: 2px;
}

.roster-sig-move {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: #e2e8f0;
}

.roster-sig-title {
  color: var(--card-color, #00f2fe);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.roster-deploy-btn {
  margin-top: auto;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--card-color, #00f2fe);
  background: var(--card-color, #00f2fe);
  color: #030712;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roster-deploy-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.platformer-roster-card.is-active .roster-deploy-btn {
  background: transparent;
  color: var(--card-color, #00f2fe);
  cursor: default;
}

/* ——— Match Sequence Countdown & Arena Narrator HUD ——— */
#prag-platformer-countdown {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

#prag-platformer-countdown.is-active {
  opacity: 1;
  visibility: visible;
}

.platformer-countdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 56px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.88) 0%, rgba(3, 7, 18, 0.96) 100%);
  border: 1px solid rgba(0, 242, 254, 0.32);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 50px rgba(0, 242, 254, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#prag-platformer-countdown.is-active .platformer-countdown-card {
  transform: scale(1);
}

.countdown-sub-tag {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #00f2fe;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.countdown-num-wrap {
  min-width: 200px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-num {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(84px, 16vw, 150px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #00f2fe;
  text-shadow: 0 0 35px rgba(0, 242, 254, 0.85), 0 0 70px rgba(0, 242, 254, 0.4);
  animation: countdown-num-pop 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.countdown-num.step-3,
.countdown-step-3 {
  color: #00f2fe;
  text-shadow: 0 0 35px rgba(0, 242, 254, 0.9), 0 0 70px rgba(0, 242, 254, 0.45);
}

.countdown-num.step-2,
.countdown-step-2 {
  color: #f59e0b;
  text-shadow: 0 0 35px rgba(245, 158, 11, 0.9), 0 0 70px rgba(245, 158, 11, 0.45);
}

.countdown-num.step-1,
.countdown-step-1 {
  color: #10b981;
  text-shadow: 0 0 35px rgba(16, 185, 129, 0.9), 0 0 70px rgba(16, 185, 129, 0.45);
}

.countdown-num.step-go,
.countdown-step-go {
  color: #ffd700;
  text-shadow: 0 0 40px #ffd700, 0 0 80px rgba(0, 242, 254, 0.85), 0 0 120px rgba(255, 215, 0, 0.6);
  font-size: clamp(96px, 18vw, 170px);
}

.countdown-hero-tag {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #94a3b8;
  margin-top: 12px;
  text-transform: uppercase;
}

@keyframes countdown-num-pop {
  0% {
    transform: scale(1.6) translateY(-10px);
    opacity: 0;
    filter: blur(8px);
  }
  40% {
    transform: scale(0.95) translateY(0);
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0px);
  }
}

/* ——— $1,000 Sovereign Bounty Easter Egg Modal ——— */
.prag-easter-egg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 1rem;
  animation: prag-modal-fade-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.prag-easter-egg-card {
  position: relative;
  width: min(620px, 94vw);
  background: #080c14;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 45px rgba(245, 158, 11, 0.22);
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #e2e8f0;
  overflow: hidden;
}

.prag-easter-egg-glint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #f59e0b 50%, transparent 100%);
  box-shadow: 0 0 12px #f59e0b;
}

.prag-easter-egg-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
}

.prag-easter-egg-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(8, 12, 20, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  margin-bottom: 0.2rem;
}

.prag-easter-egg-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f59e0b;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.prag-easter-egg-title {
  margin: 0;
  font-family: var(--font-display, sans-serif);
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
}

.prag-easter-egg-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  max-width: 440px;
  line-height: 1.4;
}

.prag-easter-egg-telemetry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem;
}

.prag-easter-egg-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.prag-easter-egg-stat .stat-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #64748b;
  text-transform: uppercase;
}

.prag-easter-egg-stat .stat-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
}

.prag-easter-egg-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.prag-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.prag-form-row label {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  text-transform: uppercase;
}

.prag-input-select,
.prag-input-text {
  background: #030712;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prag-input-select:focus,
.prag-input-text:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.prag-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.prag-btn-gold {
  flex: 1.6;
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #030712;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.prag-btn-gold:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.prag-btn-gold:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.prag-btn-ghost {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.prag-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.prag-btn-sm {
  padding: 0.2rem 0.5rem !important;
  font-size: 0.65rem !important;
}

.prag-easter-egg-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.prag-easter-egg-close:hover {
  color: #ffffff;
}

@keyframes prag-modal-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   PragAuth Identity & Cloud Progress Sync HUD and Modal Styles
   ========================================================================== */

.platformer-hud-stat.platformer-hud-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.1s ease;
}

.platformer-hud-stat.platformer-hud-auth:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.platformer-auth-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* PragAuth Modal Banner & Badges */
.prag-auth-status-container {
  margin-bottom: 1.25rem;
}

.prag-auth-verified-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(48, 209, 88, 0.08);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.prag-auth-verified-badge .verified-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prag-auth-verified-badge .verified-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.prag-auth-verified-badge .verified-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #30d158;
}

.prag-auth-verified-badge .verified-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: #f1f5f9;
}

.prag-auth-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.prag-auth-notice-banner .auth-notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.prag-auth-notice-banner .auth-notice-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.prag-auth-notice-banner .auth-notice-heading {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f59e0b;
}

.prag-auth-notice-banner .auth-notice-desc {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.35;
}

.prag-btn-auth-signin {
  margin-top: 0.25rem;
  align-self: flex-start;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 4px;
  color: #fbbf24;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prag-btn-auth-signin:hover {
  background: #f59e0b;
  color: #000000;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}





/* ——— Talking Portrait Banter HUD (Avionics Codec) ——— */

.prag-talking-portrait-hud {
  position: fixed;
  top: 64px;
  left: 24px;
  bottom: auto;
  transform: translateY(-8px);
  width: min(380px, calc(100vw - 48px));
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: rgba(8, 14, 26, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  z-index: 99996;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  user-select: none;
}

/* In active combat, anchor talking portrait at bottom-left so it never collides with header or upper arena */
body.prag-platformer-active .prag-talking-portrait-hud {
  top: auto !important;
  bottom: 58px !important;
  left: 24px !important;
}

.prag-talking-portrait-hud.is-active {
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
}

.prag-talking-portrait-hud.is-ghosted {
  opacity: 0.18 !important;
  pointer-events: none !important;
  transform: scale(0.98);
}

.prag-talking-portrait-hud .talking-portrait-close-btn {
  pointer-events: auto;
}

.talking-portrait-glint {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  pointer-events: none;
}

.talking-portrait-avatar-frame {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.talking-portrait-avatar-frame.is-speaking {
  animation: talking-avatar-pulse 0.4s infinite alternate ease-in-out;
  border-color: rgba(255, 255, 255, 0.40);
}

@keyframes talking-avatar-pulse {
  0%, 100% { border-color: rgba(255, 255, 255, 0.14); }
  50% { border-color: rgba(255, 255, 255, 0.40); }
}

.talking-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.talking-portrait-halo {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.talking-portrait-live-tag {
  display: none !important;
}

.talking-portrait-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.talking-portrait-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.talking-portrait-names {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.talking-portrait-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f1f5f9;
  text-transform: uppercase;
}

.talking-portrait-division {
  display: none !important;
}

.talking-portrait-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  padding: 0 2px;
}

.talking-portrait-equalizer .eq-bar {
  width: 2.5px;
  height: 3px;
  background: var(--speaker-accent, #38bdf8);
  border-radius: 1px;
  transition: height 0.1s ease;
}

.talking-portrait-equalizer.is-active .eq-1 { animation: eq-bounce 0.35s infinite ease-in-out 0.05s; }
.talking-portrait-equalizer.is-active .eq-2 { animation: eq-bounce 0.4s infinite ease-in-out 0.15s; }
.talking-portrait-equalizer.is-active .eq-3 { animation: eq-bounce 0.32s infinite ease-in-out 0.1s; }
.talking-portrait-equalizer.is-active .eq-4 { animation: eq-bounce 0.45s infinite ease-in-out 0.2s; }

@keyframes eq-bounce {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

.talking-portrait-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #f1f5f9;
  min-height: 2em;
  word-break: break-word;
}

.talking-portrait-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.15rem;
}

.talking-portrait-hint {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.62rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.talking-portrait-hint .hint-key {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.58rem;
}

.talking-portrait-counter {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
}

.talking-portrait-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.talking-portrait-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .prag-talking-portrait-hud {
    top: 54px;
    left: 12px;
    bottom: auto;
    width: calc(100vw - 24px);
    padding: 0.5rem 0.75rem;
    gap: 0.65rem;
  }
  .talking-portrait-avatar-frame {
    width: 44px;
    height: 44px;
  }
  .talking-portrait-text {
    font-size: 0.72rem;
    min-height: 1.8em;
  }
}

/* Fleet-Wide PragChat & Floating Assistant Auto-Suppression in Game Mode */
body.prag-platformer-active #pragchat-hud,
body.prag-platformer-active #pragchat-agent-hud,
body.prag-platformer-active .pragchat-trigger-btn,
body.prag-platformer-active #pragchat-drawer {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  display: none !important;
}

/* Cinematic Fatal Finisher Kill-Cam Vignette */
.platformer-fatal-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  background: radial-gradient(circle at center, transparent 25%, rgba(185, 28, 28, 0.45) 70%, rgba(15, 5, 10, 0.94) 100%);
  animation: fatalVignettePulse 0.3s ease-out infinite alternate;
}

@keyframes fatalVignettePulse {
  0% { opacity: 0.85; }
  100% { opacity: 1.0; }
}

/* Local 2-Player Versus / Co-op Mode Selector Badge */
.platformer-hud-mode {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-mode:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.platformer-hud-mode.is-versus {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.1);
}

.platformer-hud-mode.is-versus .platformer-hud-val {
  color: #f43f5e;
}

.platformer-hud-mode.is-coop {
  border-color: rgba(48, 209, 88, 0.4);
  background: rgba(48, 209, 88, 0.1);
}

.platformer-hud-mode.is-coop .platformer-hud-val {
  color: #30d158;
}

/* Player 2 Super Smash Bros Battle Placard (Bottom-Right) */
.platformer-hud-p2 {
  position: fixed;
  bottom: 16px;
  right: 24px;
  z-index: 99995;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 14px 8px 10px;
  background: rgba(26, 8, 14, 0.92);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 18px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(244, 63, 94, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.20);
  box-sizing: border-box;
  flex-shrink: 0;
  pointer-events: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.platformer-hud-p2:hover {
  border-color: rgba(244, 63, 94, 0.75);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.82), 0 0 24px rgba(244, 63, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.platformer-hud-p2 .platformer-hud-val {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif);
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(244, 63, 94, 0.45), 0 0 2px rgba(0, 0, 0, 0.8);
}

.platformer-hud-p2-join {
  position: fixed;
  bottom: 20px;
  right: 24px;
  z-index: 99995;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.55);
  border-radius: 9999px;
  padding: 0.32rem 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fda4af;
  letter-spacing: 0.06em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 12px rgba(244, 63, 94, 0.25);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-dock .platformer-hud-p2-join {
  position: static !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fda4af;
  letter-spacing: 0.04em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.platformer-hud-p2-join:hover {
  background: rgba(244, 63, 94, 0.32);
  border-color: #f43f5e;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.platformer-p2-join-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: platformer-p2-pip-pulse 1.6s ease-in-out infinite;
}

@keyframes platformer-p2-pip-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1.25); }
}

.p2-join-hotkey {
  font-size: 0.54rem;
  color: rgba(253, 164, 175, 0.75);
  font-weight: 600;
}

.platformer-hud-p2-leave {
  background: none;
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 4px;
  color: #fda4af;
  font-size: 0.58rem;
  font-family: monospace;
  padding: 1px 4px;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.12s ease;
}

.platformer-hud-p2-leave:hover {
  background: #f43f5e;
  color: #ffffff;
}

.platformer-hud-dock .platformer-hud-p2 {
  position: static !important;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fda4af;
  box-shadow: none;
}

.platformer-hud-dock .platformer-hud-p2 .platformer-hud-val {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.platformer-p2-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.platformer-hud-p2-stocks {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
}

.platformer-hud-p2-stocks .platformer-stock-icon {
  color: #f43f5e;
}

/* Roster Player Tabs & P2 Controls */
.platformer-roster-player-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.platformer-roster-tab {
  flex: 1;
  padding: 8px 12px;
  font-family: -apple-system, BlinkMacSystemFont, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.18s ease;
}

.platformer-roster-tab#tab-p1-select.is-active {
  background: rgba(0, 242, 254, 0.12);
  border-color: #00f2fe;
  color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.platformer-roster-tab#tab-p2-select.is-active {
  background: rgba(244, 63, 94, 0.12);
  border-color: #f43f5e;
  color: #f43f5e;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

.platformer-roster-layer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  margin-bottom: 12px;
  font-family: monospace;
}

.roster-layer-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
}

.platformer-roster-layer-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.roster-layer-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roster-layer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.roster-layer-btn.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  font-weight: bold;
}

.platformer-hud-layer.is-hd #hud-layer-val {
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.platformer-roster-p2-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 6px;
  margin-bottom: 12px;
  font-family: monospace;
  font-size: 0.72rem;
}

.roster-p2-pill-tag {
  color: #fda4af;
  font-weight: bold;
}

.roster-p2-type-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #e2e8f0;
  font-family: monospace;
  font-size: 0.68rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roster-p2-type-btn.is-active {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  color: #ffffff;
}

.roster-p2-ai-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fda4af;
}

.roster-ai-select {
  background: #0f172a;
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f1f5f9;
  font-family: monospace;
  font-size: 0.68rem;
  border-radius: 4px;
  padding: 2px 4px;
}

.platformer-roster-card.is-active-p2 {
  border-color: #f43f5e !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35) !important;
}

.platformer-roster-card.is-active-p2 .roster-deploy-btn {
  background: #f43f5e !important;
  color: #ffffff !important;
}

/* Dynamic Stage Hazard Elements */
.stage-hazard-ledger {
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.35));
}

.stage-hazard-vortex {
  animation: vortexSpin 4s linear infinite;
}

@keyframes vortexSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stage-hazard-surge {
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.6), inset 0 0 16px rgba(239, 68, 68, 0.4);
}

/* Stage Selection Drawer & HUD Stat */
.platformer-hud-stage {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-stage:hover {
  border-color: rgba(0, 242, 254, 0.5);
  background: rgba(0, 242, 254, 0.08);
}

.platformer-hud-challenge {
  cursor: pointer;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-challenge:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.platformer-hud-challenge .platformer-hud-val {
  color: #f59e0b;
}

.platformer-hud-quest {
  cursor: pointer;
  border-color: rgba(48, 209, 88, 0.4);
  background: rgba(48, 209, 88, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-quest:hover {
  border-color: rgba(48, 209, 88, 0.7);
  box-shadow: 0 0 12px rgba(48, 209, 88, 0.25);
}

.platformer-hud-quest .platformer-hud-val {
  color: #30d158;
}

.platformer-hud-debug {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-debug:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.platformer-hud-music {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-music:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.platformer-hud-music.is-playing {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.platformer-hud-music.is-playing .platformer-hud-val {
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.platformer-hud-gamepad {
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.35);
  background: rgba(48, 209, 88, 0.06);
}

.platformer-stage-drawer-overlay,
.platformer-challenge-modal-overlay,
.platformer-quest-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(4, 11, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-stage-drawer-overlay.is-open,
.platformer-challenge-modal-overlay.is-open,
.platformer-quest-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.platformer-modal-card {
  width: 90%;
  max-width: 520px;
  background: rgba(8, 18, 38, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 32px rgba(0, 242, 254, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  color: #f1f5f9;
}

.stage-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.stage-select-tile {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.stage-select-tile:hover {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.08);
  transform: translateY(-2px);
}

.stage-select-tile.is-active {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.14);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.25);
}

.stage-tile-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f1f5f9;
}

.stage-tile-desc {
  font-size: 0.62rem;
  color: #94a3b8;
  line-height: 1.25;
}

.challenge-url-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.challenge-url-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #00f2fe;
  font-family: monospace;
  font-size: 0.72rem;
  outline: none;
}

/* ——— Boss Battle Avionics HUD Bar & Overclock Indicator ——— */
.platformer-hud-boss-bar,
#hud-boss-bar {
  position: fixed !important;
  top: 58px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 99996 !important;
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(8, 14, 26, 0.48) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-radius: 6px;
  padding: 3px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
  box-sizing: border-box;
  pointer-events: auto !important;
  width: max-content !important;
  max-width: calc(100vw - 32px);
  height: 26px !important;
  transition: top 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease;
}

#platformer-hud-dock.is-tucked ~ #hud-boss-bar,
.platformer-hud-dock.is-tucked #hud-boss-bar {
  top: 58px !important;
}

.platformer-hud-boss-bar[style*="display: none"],
#hud-boss-bar[style*="display: none"],
.platformer-hud-boss-bar[style*="display:none"],
#hud-boss-bar[style*="display:none"] {
  display: none !important;
}

@keyframes platformer-boss-pulse {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.12);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.25);
  }
}

.boss-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.boss-bar-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-transform: uppercase;
  white-space: nowrap;
}

.boss-bar-name {
  font-family: var(--font-display, sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  white-space: nowrap !important;
}

.boss-bar-phase {
  display: inline-flex;
  align-items: center;
  white-space: nowrap !important;
  flex-shrink: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boss-bar-phase.is-overclock {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: platformer-shake 0.2s infinite ease-in-out;
}

.boss-bar-phase.is-defeated {
  color: #30d158;
  text-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
}

.boss-bar-center {
  flex: 1;
  min-width: 60px;
  max-width: 120px;
}

.boss-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.boss-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f2fe, #3b82f6);
  border-radius: 9999px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}

.boss-bar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  white-space: nowrap;
}

.boss-bar-stocks {
  display: flex;
  align-items: center;
  gap: 4px;
}

.boss-stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.boss-stock-dot.is-active {
  background: #ef4444;
  border-color: #f87171;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.boss-stock-dot.is-lost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  opacity: 0.3;
}

.boss-bar-damage {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .platformer-hud-boss-bar,
  #hud-boss-bar {
    top: 56px !important;
    padding: 3px 10px !important;
    gap: 6px !important;
    max-width: calc(100vw - 20px) !important;
  }
  #platformer-hud-dock.is-tucked ~ #hud-boss-bar,
  .platformer-hud-dock.is-tucked #hud-boss-bar {
    top: 44px !important;
  }
  .boss-bar-name {
    font-size: 0.64rem !important;
    max-width: 105px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .boss-bar-phase {
    font-size: 0.55rem !important;
    letter-spacing: 0.04em !important;
  }
  .boss-bar-center {
    min-width: 42px !important;
    max-width: 65px !important;
  }
  .boss-bar-damage {
    font-size: 0.62rem !important;
  }
}

/* ——— Victory Modal Combat Grade Ranking & Apex Bonus Styles ——— */
.platformer-victory-grade-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 1.25rem 0 1.5rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.platformer-victory-grade {
  font-family: var(--font-display, sans-serif);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  padding: 4px 18px;
  border-radius: 12px;
  text-shadow: 0 0 20px currentColor;
  letter-spacing: -0.05em;
}

.platformer-victory-grade.grade-s {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.4);
}

.platformer-victory-grade.grade-a {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 2px solid rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.platformer-victory-grade.grade-b {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.platformer-victory-grade.grade-c {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.platformer-grade-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.platformer-grade-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #94a3b8;
  text-transform: uppercase;
}

.platformer-grade-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Controller Mapping Customization UI & Gamepad Diagnostic Stage
   ========================================================================== */

.platformer-hud-controller {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-hud-controller:hover,
.platformer-hud-controller:focus-visible {
  border-color: rgba(0, 242, 254, 0.6);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

.platformer-controller-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  padding: 1.25rem;
  box-sizing: border-box;
}

.platformer-controller-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.controller-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.65);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
}

.controller-modal-sheet {
  position: relative;
  z-index: 1;
  width: min(880px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: rgba(8, 14, 26, 0.58);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
  color: #f1f5f9;
  font-family: var(--font-mono, ui-monospace, monospace);
  animation: controller-modal-enter 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes controller-modal-enter {
  0% { transform: scale(0.94) translateY(16px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.controller-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 30, 0.7);
}

.controller-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.controller-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #00f2fe;
  text-transform: uppercase;
}

.controller-modal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 8px #00f2fe;
}

.controller-modal-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  color: #ffffff;
}

.controller-modal-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  letter-spacing: 0.02em;
}

.controller-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.controller-modal-close:hover,
.controller-modal-close:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(0, 242, 254, 0.5);
  transform: scale(1.05);
}

/* Tab Navigation Bar */
.controller-tab-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.75rem;
  background: rgba(4, 9, 20, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.controller-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.controller-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.controller-tab-btn.is-active {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.2);
}

/* Tab Body Container */
.controller-tab-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.controller-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}

.controller-status-banner.is-connected {
  border-color: rgba(48, 209, 88, 0.4);
  background: rgba(48, 209, 88, 0.08);
}

.controller-status-banner.is-disconnected {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.controller-status-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.controller-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.controller-status-dot.is-active {
  background: #30d158;
  box-shadow: 0 0 8px #30d158;
}

/* Binding Table & Rows */
.controller-binding-table {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.controller-binding-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: rgba(10, 16, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.15s ease;
}

.controller-binding-row:hover {
  background: rgba(14, 22, 44, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
}

.controller-binding-row.is-active {
  background: rgba(0, 242, 254, 0.12) !important;
  border-color: rgba(0, 242, 254, 0.4) !important;
}

.controller-binding-row.is-active .controller-action-name {
  color: #00f2fe !important;
}

.controller-binding-row.is-active .controller-chip,
.controller-chip.is-active,
.controller-chip.is-pressed {
  background: rgba(0, 242, 254, 0.35) !important;
  border-color: #00f2fe !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5) !important;
  transform: translateY(1px);
}

.controller-binding-row.is-listening {
  border-color: #00f2fe !important;
  background: rgba(0, 242, 254, 0.14) !important;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
  animation: controller-row-pulse 1.2s infinite alternate;
}

@keyframes controller-row-pulse {
  0% { border-color: rgba(0, 242, 254, 0.4); box-shadow: 0 0 10px rgba(0, 242, 254, 0.2); }
  100% { border-color: rgba(0, 242, 254, 0.9); box-shadow: 0 0 24px rgba(0, 242, 254, 0.45); }
}

.controller-action-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 220px;
}

.controller-action-cat {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  text-transform: uppercase;
}

.controller-action-cat.combat { color: #f43f5e; background: rgba(244, 63, 94, 0.12); }
.controller-action-cat.defense { color: #00f2fe; background: rgba(0, 242, 254, 0.12); }
.controller-action-cat.movement { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.controller-action-cat.system { color: #a855f7; background: rgba(168, 85, 247, 0.12); }

.controller-action-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2e8f0;
}

.controller-chips-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  flex: 1;
  padding: 0 0.75rem;
}

.controller-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #00f2fe;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.controller-chip-remove {
  cursor: pointer;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.controller-chip-remove:hover {
  color: #ef4444;
}

.controller-row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.controller-rebind-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.controller-rebind-btn:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: rgba(0, 242, 254, 0.5);
  color: #00f2fe;
}

.controller-rebind-btn.is-listening {
  background: #00f2fe !important;
  border-color: #00f2fe !important;
  color: #040814 !important;
  font-weight: 800;
  animation: controller-listen-pulse 0.8s infinite alternate;
}

@keyframes controller-listen-pulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.04); opacity: 1; box-shadow: 0 0 16px rgba(0, 242, 254, 0.7); }
}

.controller-clear-btn {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.controller-clear-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Presets Grid */
.controller-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 0.85rem;
}

.controller-preset-card {
  padding: 1.15rem;
  background: rgba(10, 16, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.controller-preset-card:hover {
  background: rgba(14, 22, 44, 0.9);
  border-color: rgba(0, 242, 254, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.controller-preset-card.is-active {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.controller-preset-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.controller-preset-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.25rem;
}

.controller-preset-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

.controller-preset-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.controller-preset-btn {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.controller-preset-btn:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
  color: #00f2fe;
}

.controller-preset-card.is-active .controller-preset-btn {
  background: rgba(48, 209, 88, 0.15);
  border-color: #30d158;
  color: #30d158;
  pointer-events: none;
}

/* Live Diagnostics Stage */
.controller-diag-box {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 0.5rem 0;
}

.controller-diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.controller-rumble-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: #00f2fe;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.controller-rumble-btn:hover {
  background: rgba(0, 242, 254, 0.25);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.controller-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.controller-btn-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.2rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  transition: all 0.08s ease;
}

.controller-btn-pip.is-pressed,
.controller-btn-pip.is-active,
.controller-diag-btn-pip.is-pressed,
.controller-diag-btn-pip.is-active {
  background: rgba(0, 242, 254, 0.25) !important;
  border-color: #00f2fe !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.5) !important;
  transform: scale(1.05);
}

.controller-sticks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.controller-stick-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.controller-stick-stage {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(2, 6, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.controller-stick-pip {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 10px #00f2fe;
  transform: translate(0px, 0px);
  transition: transform 0.04s linear;
}

.controller-stick-telemetry {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.7rem;
}

.controller-stick-label {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.76rem;
}

/* Modal Footer */
.controller-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 30, 0.8);
}

.controller-footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.controller-btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.controller-btn-reset:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.controller-footer-hint {
  font-size: 0.68rem;
  color: #64748b;
}

.controller-footer-hint strong {
  color: #00f2fe;
}

.controller-footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.controller-save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #30d158;
}

.controller-save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 6px #30d158;
}

.controller-btn-done {
  padding: 0.45rem 1.25rem;
  border-radius: 8px;
  background: #00f2fe;
  border: 1px solid #00f2fe;
  color: #040814;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.controller-btn-done:hover {
  background: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.4);
}

@media (max-width: 820px) {
  .controller-binding-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .controller-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .controller-preset-grid {
    grid-template-columns: 1fr;
  }
  .controller-sticks-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .controller-modal-header {
    padding: 1rem;
  }
  .controller-tab-bar {
    padding: 0.5rem 1rem;
  }
  .controller-tab-body {
    padding: 1rem;
  }
  .controller-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  .controller-footer-left,
  .controller-footer-right {
    justify-content: space-between;
  }
}

/* ——— Semi-Transparent Frosted Glass HUD — Daylight / Light Theme Adaptation ——— */
html[data-resolved-theme="light"] .platformer-hud-dock,
html[data-theme="light"] .platformer-hud-dock {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .platformer-hud-dock.is-bottom-dock,
html[data-theme="light"] .platformer-hud-dock.is-bottom-dock {
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] #hud-character-name,
html[data-theme="light"] #hud-character-name,
html[data-resolved-theme="light"] #hud-damage-val,
html[data-theme="light"] #hud-damage-val,
html[data-resolved-theme="light"] .platformer-hud-damage .platformer-hud-val,
html[data-theme="light"] .platformer-hud-damage .platformer-hud-val,
html[data-resolved-theme="light"] .platformer-hud-dock .platformer-hud-val,
html[data-theme="light"] .platformer-hud-dock .platformer-hud-val {
  color: #0f172a !important;
  text-shadow: none !important;
}

html[data-resolved-theme="light"] .platformer-hud-character,
html[data-theme="light"] .platformer-hud-character {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html[data-resolved-theme="light"] .platformer-hud-damage span:first-child,
html[data-theme="light"] .platformer-hud-damage span:first-child {
  color: #64748b !important;
}

html[data-resolved-theme="light"] .platformer-hud-stocks .platformer-stock-icon,
html[data-theme="light"] .platformer-hud-stocks .platformer-stock-icon {
  color: #0284c7 !important;
}

html[data-resolved-theme="light"] .platformer-hud-dock .platformer-hud-dock-sep,
html[data-theme="light"] .platformer-hud-dock .platformer-hud-dock-sep {
  background: rgba(15, 23, 42, 0.10) !important;
}

html[data-resolved-theme="light"] .platformer-hud-dock .platformer-hud-quick-btn,
html[data-theme="light"] .platformer-hud-dock .platformer-hud-quick-btn,
html[data-resolved-theme="light"] .platformer-hud-dock .platformer-hud-pause-btn,
html[data-theme="light"] .platformer-hud-dock .platformer-hud-pause-btn,
html[data-resolved-theme="light"] .platformer-hud-dock .platformer-hud-tuck-btn,
html[data-theme="light"] .platformer-hud-dock .platformer-hud-tuck-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}

html[data-resolved-theme="light"] .platformer-hud-pause-btn span,
html[data-theme="light"] .platformer-hud-pause-btn span {
  color: #334155 !important;
}

html[data-resolved-theme="light"] .platformer-hud-pause-btn svg,
html[data-theme="light"] .platformer-hud-pause-btn svg {
  fill: #334155 !important;
}

html[data-resolved-theme="light"] .platformer-hud-close svg,
html[data-theme="light"] .platformer-hud-close svg {
  stroke: #64748b !important;
}

html[data-resolved-theme="light"] .platformer-hud-dock .platformer-hud-p2-join,
html[data-theme="light"] .platformer-hud-dock .platformer-hud-p2-join {
  background: rgba(244, 63, 94, 0.08) !important;
  border-color: rgba(244, 63, 94, 0.22) !important;
}

html[data-resolved-theme="light"] .platformer-hud-p2-join .p2-join-label,
html[data-theme="light"] .platformer-hud-p2-join .p2-join-label {
  color: #e11d48 !important;
}

html[data-resolved-theme="light"] .platformer-hud-p2-join .p2-join-hotkey,
html[data-theme="light"] .platformer-hud-p2-join .p2-join-hotkey {
  color: #be123c !important;
}

html[data-resolved-theme="light"] .platformer-hud-tuck-tab,
html[data-theme="light"] .platformer-hud-tuck-tab {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  color: #0f172a !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] .mini-hud-name,
html[data-theme="light"] .mini-hud-name,
html[data-resolved-theme="light"] .mini-hud-dmg,
html[data-theme="light"] .mini-hud-dmg {
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .platformer-hud-untuck-btn,
html[data-theme="light"] .platformer-hud-untuck-btn {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .platformer-hud-boss-bar,
html[data-theme="light"] .platformer-hud-boss-bar,
html[data-resolved-theme="light"] #hud-boss-bar,
html[data-theme="light"] #hud-boss-bar {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] #boss-bar-name,
html[data-theme="light"] #boss-bar-name,
html[data-resolved-theme="light"] #boss-bar-damage,
html[data-theme="light"] #boss-bar-damage,
html[data-resolved-theme="light"] .boss-bar-damage,
html[data-theme="light"] .boss-bar-damage {
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .boss-bar-track,
html[data-theme="light"] .boss-bar-track {
  background: rgba(15, 23, 42, 0.10) !important;
}

html[data-resolved-theme="light"] #boss-bar-phase,
html[data-theme="light"] #boss-bar-phase {
  color: #64748b !important;
}

html[data-resolved-theme="light"] .boss-bar-tag,
html[data-theme="light"] .boss-bar-tag {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  color: #334155 !important;
}

html[data-resolved-theme="light"] .prag-talking-portrait-hud,
html[data-theme="light"] .prag-talking-portrait-hud {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] .talking-portrait-title,
html[data-theme="light"] .talking-portrait-title {
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .talking-portrait-text,
html[data-theme="light"] .talking-portrait-text {
  color: #334155 !important;
}

html[data-resolved-theme="light"] .talking-portrait-avatar-frame,
html[data-theme="light"] .talking-portrait-avatar-frame {
  background: #e2e8f0 !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
}

html[data-resolved-theme="light"] .talking-portrait-nav-btn,
html[data-theme="light"] .talking-portrait-nav-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}

html[data-resolved-theme="light"] .talking-portrait-close-btn,
html[data-theme="light"] .talking-portrait-close-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}

/* Controller Guide Pill — Daylight Theme */
html[data-resolved-theme="light"] #prag-platformer-controller-hud,
html[data-theme="light"] #prag-platformer-controller-hud {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
}

html[data-resolved-theme="light"] #prag-platformer-controller-hud.is-collapsed,
html[data-theme="light"] #prag-platformer-controller-hud.is-collapsed {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] .ctrl-hud-badge,
html[data-theme="light"] .ctrl-hud-badge {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .controller-keycap,
html[data-theme="light"] .controller-keycap {
  background: rgba(255, 255, 255, 0.90) !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

html[data-resolved-theme="light"] .controller-action,
html[data-theme="light"] .controller-action {
  color: #475569 !important;
}

html[data-resolved-theme="light"] .ctrl-hud-toggle,
html[data-theme="light"] .ctrl-hud-toggle {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}

/* Quick Settings Popover — Daylight Theme */
html[data-resolved-theme="light"] .platformer-hud-quick-popover,
html[data-theme="light"] .platformer-hud-quick-popover {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
}

html[data-resolved-theme="light"] .quick-pop-btn,
html[data-theme="light"] .quick-pop-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}

html[data-resolved-theme="light"] .quick-pop-btn.is-active,
html[data-theme="light"] .quick-pop-btn.is-active {
  background: rgba(2, 132, 199, 0.12) !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
  color: #0284c7 !important;
}

/* Touch Controls & Shelf — Daylight Theme */
html[data-resolved-theme="light"] #touch-codex,
html[data-theme="light"] #touch-codex,
html[data-resolved-theme="light"] .platformer-touch-btn.codex-btn,
html[data-theme="light"] .platformer-touch-btn.codex-btn {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] #touch-codex-badge,
html[data-theme="light"] #touch-codex-badge {
  color: #0284c7 !important;
}

html[data-resolved-theme="light"] #touch-action,
html[data-theme="light"] #touch-action,
html[data-resolved-theme="light"] .platformer-touch-btn.action-btn,
html[data-theme="light"] .platformer-touch-btn.action-btn {
  background: rgba(255, 255, 255, 0.60) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  color: #64748b !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] .platformer-dpad-pod,
html[data-theme="light"] .platformer-dpad-pod {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] .platformer-dpad-btn,
html[data-theme="light"] .platformer-dpad-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}

html[data-resolved-theme="light"] .platformer-touch-btn,
html[data-theme="light"] .platformer-touch-btn {
  background: rgba(255, 255, 255, 0.68) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

html[data-resolved-theme="light"] .platformer-touch-btn svg,
html[data-theme="light"] .platformer-touch-btn svg {
  filter: none !important;
}

html[data-resolved-theme="light"] .touch-btn-sub,
html[data-theme="light"] .touch-btn-sub {
  color: #334155 !important;
  text-shadow: none !important;
}

/* Modals — Daylight Theme */
html[data-resolved-theme="light"] .pause-modal-sheet,
html[data-theme="light"] .pause-modal-sheet,
html[data-resolved-theme="light"] .controller-modal-sheet,
html[data-theme="light"] .controller-modal-sheet {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
}

/* PragDOMRunner Spacetime Tactical Radar / Mini-Map */
.hud-radar-dock {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2147483640;
  width: 140px;
  background: rgba(3, 3, 8, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
}

.hud-radar-dock.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.hud-radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.hud-radar-label {
  font: 600 7.5px/1 monospace;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
}

.hud-radar-zoom {
  font: 700 7px/1 monospace;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 3px;
  padding: 1.5px 3.5px;
}

.hud-radar-canvas-wrap {
  position: relative;
  width: 140px;
  height: 88px;
  background: rgba(0, 0, 0, 0.4);
}

.hud-radar-canvas {
  display: block;
  width: 140px;
  height: 88px;
}

html[data-resolved-theme="light"] .hud-radar-dock,
html[data-theme="light"] .hud-radar-dock {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html[data-resolved-theme="light"] .hud-radar-header,
html[data-theme="light"] .hud-radar-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

html[data-resolved-theme="light"] .hud-radar-label,
html[data-theme="light"] .hud-radar-label {
  color: rgba(15, 23, 42, 0.75);
}

html[data-resolved-theme="light"] .hud-radar-canvas-wrap,
html[data-theme="light"] .hud-radar-canvas-wrap {
  background: rgba(240, 244, 248, 0.8);
}

/* Pre-Match Countdown Sequence Overlay */
.platformer-countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.platformer-countdown-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.platformer-countdown-card {
  background: rgba(3, 3, 8, 0.92);
  border: 1.5px solid rgba(0, 242, 254, 0.40);
  border-radius: 18px;
  padding: 1.75rem 2.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.platformer-countdown-overlay.is-active .platformer-countdown-card {
  transform: scale(1);
}

.countdown-sub-tag {
  font: 700 8.5px/1 monospace;
  letter-spacing: 0.14em;
  color: #00f2fe;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.countdown-num-wrap {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-num {
  font: 900 68px/1 system-ui, -apple-system, sans-serif;
  color: #ffffff;
  letter-spacing: -0.04em;
  display: inline-block;
  animation: countdownPulse 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.countdown-num.step-3 { color: #00f2fe; text-shadow: 0 0 24px rgba(0, 242, 254, 0.6); }
.countdown-num.step-2 { color: #f59e0b; text-shadow: 0 0 24px rgba(245, 158, 11, 0.6); }
.countdown-num.step-1 { color: #10b981; text-shadow: 0 0 24px rgba(16, 185, 129, 0.6); }
.countdown-num.step-go { color: #ffd700; text-shadow: 0 0 32px rgba(255, 215, 0, 0.8); }

.countdown-hero-tag {
  font: 700 11px/1 monospace;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.70);
  text-transform: uppercase;
  margin-top: 0.5rem;
}

@keyframes countdownPulse {
  0% { transform: scale(1.4); opacity: 0; }
  25% { transform: scale(1.0); opacity: 1; }
  85% { transform: scale(0.96); opacity: 1; }
  100% { transform: scale(0.90); opacity: 0.8; }
}

/* ——— Interactive 12-Tier Curriculum Academy HUD (Obsidian Depth Standard) ——— */
.prag-curriculum-hud {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 180px);
  z-index: 2147483640;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(3, 3, 8, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  pointer-events: auto;
}

.prag-curriculum-hud.is-visible {
  display: flex;
}

.curriculum-hud-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.curriculum-hud-kicker {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 2px;
}

.curriculum-hud-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.25;
}

.curriculum-hud-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.curriculum-hud-progress-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.curriculum-btn-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #94a3b8;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.curriculum-tier-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}

.curriculum-tier-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 4px;
  padding: 3px 0;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.curriculum-tier-pill.is-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.curriculum-tier-pill.is-done {
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}

.curriculum-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.curriculum-progress-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.2s ease;
}

.curriculum-lesson-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  max-height: 240px;
}

.curriculum-lesson-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.curriculum-lesson-row.is-done {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.22);
}

.curriculum-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.curriculum-pip.pip-online {
  background: #10b981;
}

.curriculum-pip.pip-pending {
  background: rgba(255, 255, 255, 0.22);
}

.curriculum-lesson-body {
  flex: 1;
  min-width: 0;
}

.curriculum-lesson-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.curriculum-lesson-id {
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  flex-shrink: 0;
}

.curriculum-lesson-title {
  font-size: 10px;
  font-weight: 600;
  color: #f8fafc;
  font-family: system-ui, -apple-system, sans-serif;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curriculum-lesson-key {
  font-size: 8.5px;
  font-weight: 700;
  color: #cbd5e1;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}

.curriculum-lesson-obj {
  font-size: 9.5px;
  line-height: 1.35;
  color: #94a3b8;
  font-family: system-ui, -apple-system, sans-serif;
}

.curriculum-lesson-run-btn {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.curriculum-lesson-run-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
}

.curriculum-req-details {
  margin-top: 2px;
}

.curriculum-req-summary {
  font-size: 8.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.04em;
}

.curriculum-req-summary:hover {
  color: #94a3b8;
}

.curriculum-req-gwt {
  margin-top: 4px;
  padding: 5px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-size: 8.5px;
  line-height: 1.38;
  color: #94a3b8;
  font-family: system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.curriculum-req-gwt strong {
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.curriculum-hud-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.curriculum-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
}

.curriculum-btn-primary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}








