@font-face {
  font-family: "HD Automaton";
  src: url("assets/fonts/automaton.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HD Illuminati";
  src: url("assets/fonts/Hd2_illuminati-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050505;
  --panel: #121212;
  --border: #3d3428;
  --text: #f0ebe2;
  --muted: #9a8f7a;
  --brand: #e8c45c;
  --accent: #d4a855;
  --ok: #7bc96f;
  --bad: #ff4444;
  --card: #0e0c0a;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#app,
.app-root {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.kiosk-mode .app-root,
.kiosk-mode #app {
  max-width: 100%;
  padding: 0.65rem 0.85rem 1.5rem;
}

.kiosk-mode .top-bar {
  justify-content: center;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
}

.kiosk-mode .playfield {
  min-height: 380px;
}

/* Drizzer14 arcade shell + timer look (github.com/drizzer14/stratagem-hero) */
.kiosk-arcade-splash {
  text-align: center;
  margin: 0 auto 1rem;
  max-width: 52rem;
}

.kiosk-arcade-splash[hidden] {
  display: none !important;
}

.kiosk-arcade-splash__title {
  margin: 0 0 0.35em;
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 36px rgba(255, 255, 255, 0.12);
}

.kiosk-arcade-splash__prompt {
  margin: 0 0 0.35em;
  font-size: clamp(1.2rem, 4vw, 2.15rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
}

.kiosk-arcade-splash__sub {
  margin: 0;
  font-size: clamp(0.82rem, 2.1vw, 1.02rem);
  color: var(--muted);
}

.kiosk-mode .playfield--arcade {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

.kiosk-mode .playfield--arcade::before,
.kiosk-mode .playfield--arcade::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: #fff;
  box-shadow: 0 0 30px 0 rgba(255, 255, 255, 0.9);
  pointer-events: none;
  z-index: 2;
}

.kiosk-mode .playfield--arcade::before {
  top: 0;
}

.kiosk-mode .playfield--arcade::after {
  bottom: 0;
}

.timer-bar__track {
  display: none;
}

.kiosk-mode .timer-bar {
  position: relative;
  height: 24px;
  margin-top: 0.65rem;
  margin-bottom: 1.35rem;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.kiosk-mode .timer-bar__track {
  display: block;
  position: absolute;
  inset: 0;
  background-color: #bfbfbf;
  box-shadow: 0 0 10px rgba(191, 191, 191, 0.4);
}

.kiosk-mode .timer-bar__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 0;
  background: var(--brand);
  background-image: none;
  box-shadow: 0 0 10px rgba(232, 196, 92, 0.55);
  transition: width 16.6ms linear;
}

.kiosk-menu {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(92, 77, 46, 0.65);
  text-align: center;
}

.kiosk-menu__label {
  margin: 0 auto 0.55rem;
  max-width: 36rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kiosk-menu__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.55rem 0.65rem;
  max-width: 40rem;
  margin: 0 auto;
}

.kiosk-menu__btn {
  flex: 1 1 148px;
  max-width: 12.5rem;
  min-height: 3.1rem;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  line-height: 1.2;
  border-color: #6b5a36;
  color: var(--text);
  background: linear-gradient(180deg, rgba(40, 34, 26, 0.95) 0%, rgba(18, 16, 12, 0.98) 100%);
}

.kiosk-menu__btn:hover {
  border-color: var(--accent);
  color: var(--brand);
}

.kiosk-mode-topbar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
}

.kiosk-mode-topbar__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
}

.kiosk-mode-topbar__label select {
  min-width: 9.5rem;
}

.kiosk-mode-topbar__btn {
  min-height: 2.2rem;
  padding: 0.3rem 0.55rem;
  flex: 0 0 auto;
}

.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

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

.top-bar__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  cursor: pointer;
}

.top-bar__logo {
  max-height: 52px;
  width: auto;
  max-width: min(320px, 58vw);
  height: auto;
  object-fit: contain;
  display: block;
}

.kiosk-mode .top-bar__logo {
  max-height: 40px;
  max-width: min(280px, 70vw);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.btn-sfx-mute {
  min-width: 5.5rem;
  font-size: 0.8rem;
}

.settings-saved-toast {
  position: fixed;
  top: 4.25rem;
  right: 1rem;
  z-index: 300;
  max-width: min(90vw, 18rem);
  padding: 0.45rem 0.85rem;
  background: var(--ok);
  color: #0d120c;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.settings-saved-toast.settings-saved-toast--show {
  opacity: 1;
  transform: translateY(0);
}

.settings-saved-toast[hidden] {
  display: none !important;
}

/* Rotating Helldivers-style lines: under classic timer (#helldiversLoadingTicker) */
.classic-game__phrase-ticker {
  margin: 0.7rem 0 0;
  padding: 0.5rem 0.4rem;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  line-height: 1.45;
  font-style: italic;
  font-weight: 500;
  color: #f2eee6;
  text-align: center;
  min-height: 3rem;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  border-top: 1px solid rgba(255, 232, 10, 0.22);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.classic-game__phrase-ticker[hidden] {
  display: none !important;
}

.ministry-cookies {
  border-left: 3px solid var(--accent);
  padding-left: 0.65rem;
  margin: 0 0 0.65rem;
}

.ministry-cookies--flavor {
  border-left-color: var(--brand);
  font-style: italic;
}

textarea {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}

button,
select,
input[type="url"],
input[type="text"],
input[type="file"] {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
}

button:hover {
  border-color: var(--accent);
}

button:active {
  transform: translateY(1px);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.cyberstan-watermark {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: "HD Automaton", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.35rem, 5.5vw, 3.2rem);
  font-weight: normal;
  color: #d42820;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-align: center;
  pointer-events: none;
  text-shadow:
    0 0 18px rgba(255, 90, 60, 0.85),
    0 0 42px rgba(180, 30, 20, 0.55),
    0 0 2px rgba(0, 0, 0, 0.9);
  opacity: 0.95;
}

html.automaton-takeover,
html.automaton-takeover body {
  font-family: "HD Automaton", "Segoe UI", system-ui, sans-serif;
}

html.automaton-takeover {
  --text: #e4ddd4;
  --muted: #9a9088;
  --brand: #ff6b4a;
  --accent: #ff8f70;
  --border: #5a3530;
}

html.automaton-takeover .app-root,
html.automaton-takeover .top-bar h1 {
  font-family: inherit;
}

@keyframes automaton-playfield-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 120px rgba(80, 12, 12, 0.45),
      0 0 0 1px rgba(255, 70, 50, 0.25);
  }
  50% {
    box-shadow:
      inset 0 0 168px rgba(130, 20, 14, 0.62),
      0 0 18px rgba(255, 55, 35, 0.38),
      0 0 0 1px rgba(255, 95, 65, 0.5);
  }
}

@keyframes cyberstan-glow {
  0%,
  100% {
    opacity: 0.93;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.15) contrast(1.05);
  }
}

html.automaton-takeover .playfield {
  border-color: #6a3028;
  box-shadow:
    inset 0 0 120px rgba(80, 12, 12, 0.45),
    0 0 0 1px rgba(255, 70, 50, 0.25);
  animation: automaton-playfield-pulse 3.2s ease-in-out infinite;
}

html.automaton-takeover .playfield::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 3px,
    rgba(255, 50, 40, 0.045) 3px,
    rgba(255, 50, 40, 0.045) 6px
  );
  mix-blend-mode: overlay;
}

html.automaton-takeover .cyberstan-watermark {
  animation: cyberstan-glow 2.4s ease-in-out infinite;
}

html.automaton-takeover .stratagem-card {
  border-color: rgba(120, 40, 35, 0.65);
}

html.automaton-takeover .hud {
  color: var(--brand);
}

html.automaton-takeover .hud-timer {
  color: var(--text);
}

html.automaton-takeover .classic-game,
html.automaton-takeover .classic-game * {
  font-family: "HD Automaton", "Segoe UI", system-ui, sans-serif !important;
}

html.automaton-takeover body,
html.automaton-takeover body * {
  font-family: "HD Automaton", "Segoe UI", system-ui, sans-serif !important;
}

.illuminate-watermark {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-family: "HD Illuminati", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.25rem, 5vw, 2.85rem);
  font-weight: normal;
  color: #c4b0ff;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-align: center;
  pointer-events: none;
  text-shadow:
    0 0 22px rgba(160, 120, 255, 0.9),
    0 0 56px rgba(80, 140, 255, 0.55),
    0 0 4px rgba(0, 0, 0, 0.95);
  opacity: 0.96;
}

.illuminate-invasion-hud {
  margin: 0.35rem 0 0.5rem;
  min-height: 2.1rem;
}

.illuminate-invasion-hud[hidden] {
  display: none !important;
}

.illuminate-invasion-banner {
  text-align: center;
  font-family: "HD Illuminati", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.72rem, 2.8vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #dcd0ff;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(140, 110, 255, 0.55);
  background: linear-gradient(90deg, rgba(40, 24, 72, 0.92), rgba(24, 36, 88, 0.92));
  box-shadow:
    0 0 18px rgba(120, 90, 255, 0.35),
    inset 0 0 24px rgba(80, 120, 255, 0.12);
}

.illuminate-invasion-banner[hidden] {
  display: none !important;
}

.illuminate-invasion-banner[data-kind="automaton"] {
  font-family: "HD Automaton", "Segoe UI", system-ui, sans-serif;
  color: #ffd0c8;
  border-color: rgba(210, 90, 76, 0.62);
  background: linear-gradient(90deg, rgba(66, 20, 18, 0.93), rgba(43, 15, 13, 0.95));
  box-shadow: 0 0 18px rgba(170, 70, 60, 0.4), inset 0 0 22px rgba(92, 26, 20, 0.35);
}

.illuminate-invasion-banner--blink {
  animation: illuminate-banner-blink 0.85s ease-in-out infinite;
}

@keyframes illuminate-banner-blink {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1.05);
    box-shadow:
      0 0 22px rgba(140, 100, 255, 0.55),
      inset 0 0 28px rgba(100, 140, 255, 0.18);
  }
  50% {
    opacity: 0.45;
    filter: brightness(0.75);
    box-shadow:
      0 0 8px rgba(100, 80, 200, 0.25),
      inset 0 0 12px rgba(60, 90, 200, 0.08);
  }
}

.illuminate-invasion-timer {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.78rem, 2.6vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b8c8ff;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(100, 140, 220, 0.45);
  background: rgba(12, 16, 40, 0.88);
}

.illuminate-invasion-timer[hidden] {
  display: none !important;
}

.brasch-warning-banner {
  text-align: center;
  font-family: "Segoe UI", system-ui, sans-serif !important;
  font-size: clamp(0.72rem, 2.8vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffe8a8;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(232, 196, 92, 0.75);
  background: linear-gradient(90deg, rgba(58, 38, 12, 0.94), rgba(36, 24, 8, 0.96));
  box-shadow:
    0 0 18px rgba(232, 196, 92, 0.4),
    inset 0 0 18px rgba(160, 120, 26, 0.25);
}

.brasch-warning-banner[hidden] {
  display: none !important;
}

.brasch-warning-banner--blink {
  animation: brasch-warning-blink 0.72s ease-in-out infinite;
}

@keyframes brasch-warning-blink {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1.08);
  }
  50% {
    opacity: 0.52;
    filter: brightness(0.78);
  }
}

/* Keep all current General Brasch UI text in neutral font. */
html.automaton-takeover #classicBraschWarnBanner,
html.automaton-takeover #classicComboWrap,
html.automaton-takeover #classicComboWrap *,
html.automaton-takeover #classicBraschPortraitWrap,
html.automaton-takeover #classicBraschPortraitWrap *,
html.illuminati-takeover #classicBraschWarnBanner,
html.illuminati-takeover #classicComboWrap,
html.illuminati-takeover #classicComboWrap *,
html.illuminati-takeover #classicBraschPortraitWrap,
html.illuminati-takeover #classicBraschPortraitWrap * {
  font-family: "Segoe UI", system-ui, sans-serif !important;
}

.terminid-invasion-hud {
  margin: 0.35rem 0 0.5rem;
  min-height: 2.5rem;
}

.terminid-invasion-hud[hidden] {
  display: none !important;
}

.terminid-invasion-banner {
  text-align: center;
  font-size: clamp(0.72rem, 2.8vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d5f0c8;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(90, 170, 85, 0.6);
  background: linear-gradient(90deg, rgba(20, 56, 22, 0.92), rgba(16, 36, 18, 0.95));
  box-shadow: 0 0 16px rgba(80, 160, 76, 0.35), inset 0 0 18px rgba(16, 46, 14, 0.35);
}

.terminid-invasion-banner[hidden] {
  display: none !important;
}

.terminid-invasion-progress {
  margin: 0.3rem 0;
}

.terminid-invasion-progress[hidden] {
  display: none !important;
}

.terminid-invasion-progress__track {
  position: relative;
  width: 100%;
  height: 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(78, 124, 54, 0.72);
  background: rgba(15, 30, 12, 0.9);
  overflow: hidden;
}

.terminid-invasion-progress__fill {
  position: relative;
  height: 100%;
  width: 0%;
  min-width: 0%;
  max-width: 100%;
  background: linear-gradient(90deg, rgba(85, 150, 63, 0.95), rgba(165, 224, 118, 0.95));
  transition: width 0.15s linear;
}

.terminid-invasion-progress__bug {
  position: absolute;
  right: -0.5rem;
  top: 50%;
  width: 1.4rem;
  height: 1.4rem;
  transform: translateY(-50%);
  background-image: url("assets/images/terminid-bug.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 3px rgba(18, 35, 13, 0.75));
  transition: transform 0.16s ease, filter 0.16s ease;
}

.terminid-invasion-progress:hover .terminid-invasion-progress__bug {
  transform: translateY(-50%) scale(1.15);
  filter: drop-shadow(0 0 6px rgba(110, 200, 85, 0.85));
}

.terminid-invasion-progress:hover .terminid-invasion-progress__fill {
  box-shadow: 0 0 10px rgba(150, 220, 120, 0.45);
}

.terminid-invasion-timer {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.76rem, 2.5vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #d1e8c5;
  padding: 0.32rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(92, 142, 74, 0.62);
  background: rgba(16, 32, 14, 0.9);
}

.terminid-invasion-timer[hidden] {
  display: none !important;
}

html.illuminati-takeover,
html.illuminati-takeover body {
  font-family: "HD Illuminati", "Segoe UI", system-ui, sans-serif;
}

html.illuminati-takeover {
  --text: #dce4ff;
  --muted: #8890c0;
  --brand: #b8a8ff;
  --accent: #7ec0ff;
  --border: #4a4a8a;
}

html.illuminati-takeover .app-root,
html.illuminati-takeover .top-bar h1 {
  font-family: inherit;
}

html.illuminati-takeover .playfield {
  border-color: #5a58a8;
  box-shadow:
    inset 0 0 120px rgba(60, 40, 120, 0.4),
    0 0 0 1px rgba(140, 120, 255, 0.28);
}

html.illuminati-takeover .stratagem-card {
  border-color: rgba(100, 90, 180, 0.6);
}

html.illuminati-takeover .hud {
  color: var(--brand);
}

html.illuminati-takeover .hud-timer {
  color: var(--text);
}

html.illuminati-takeover .classic-game {
  border-color: rgba(150, 130, 255, 0.85);
  color: #e8e6ff;
  background: linear-gradient(180deg, #2a2248 0%, #1a1838 100%);
  box-shadow:
    0 8px 32px rgba(40, 30, 80, 0.55),
    0 0 0 1px rgba(120, 100, 220, 0.2);
}

html.illuminati-takeover .classic-game,
html.illuminati-takeover .classic-game * {
  font-family: "HD Illuminati", "Segoe UI", system-ui, sans-serif !important;
}

html.illuminati-takeover body,
html.illuminati-takeover body * {
  font-family: "HD Illuminati", "Segoe UI", system-ui, sans-serif !important;
}

html.illuminati-takeover .classic-game__hud,
html.illuminati-takeover .classic-combo-hud {
  color: #c8b8ff;
}

html.illuminati-takeover .classic-active-name {
  color: #eef0ff;
}

html.illuminati-takeover .classic-strat-item {
  border-color: #5a5088;
}

html.illuminati-takeover .classic-strat-item--active {
  border-color: #a090ff;
  box-shadow: 0 0 10px rgba(140, 120, 255, 0.35);
}

html.illuminati-takeover .classic-arrow {
  border-color: #6a6498;
  background: #242038;
}

html.illuminati-takeover .classic-timer-panel__title {
  color: rgba(200, 210, 255, 0.78);
}

html.illuminati-takeover .classic-timer__label {
  color: #c4d0ff;
}

html.illuminati-takeover .classic-timer__fill {
  background: linear-gradient(90deg, #6a50d0 0%, #90b0ff 100%);
}

html.illuminati-takeover .classic-timer__fill--mode {
  background: linear-gradient(90deg, #5040a0 0%, #7090e8 100%);
}

html.illuminati-takeover .classic-timer {
  border-color: #5a5690;
  background: #121028;
}

html.illuminati-takeover .classic-game__volume input[type="range"] {
  accent-color: #a090ff;
}

.playfield {
  position: relative;
  border: 2px solid #5c4d2e;
  border-radius: 4px;
  padding: 1.35rem 1.25rem 1.5rem;
  min-height: 440px;
  background-color: #020203;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(232, 196, 92, 0.12);
  touch-action: manipulation;
}

.playfield--youtube-bg {
  background-color: rgba(2, 2, 3, 0.78);
}

.playfield--touch-game {
  touch-action: none;
  user-select: none;
}

#panelPlay {
  position: relative;
}

html.automaton-takeover #panelPlay,
html.terminid-takeover #panelPlay {
  overflow: hidden;
}

/* Terminid invasion: semi-transparent spore fog (texture + pulsing opacity) */
.terminid-fog-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 2px;
  background-color: transparent;
  background-image: url("assets/images/myst.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  mix-blend-mode: normal;
  animation: terminid-fog-pulse var(--terminid-fog-pulse-ms, 4500ms) ease-in-out infinite;
}

html.terminid-takeover .playfield {
  filter: saturate(0.72) contrast(1.22) brightness(0.78) blur(1.2px);
}

html.terminid-takeover #app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background-image: url("assets/images/myst.png");
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  mix-blend-mode: multiply;
}

html.terminid-takeover #classicGameRoot,
html.terminid-takeover .classic-screen,
html.terminid-takeover .classic-active-name,
html.terminid-takeover .classic-arrow,
html.terminid-takeover .classic-strat-item {
  text-shadow: 0 0 1px rgba(36, 22, 12, 0.85), 1px 0 0 rgba(26, 10, 4, 0.55), -1px 0 0 rgba(8, 24, 10, 0.45);
  filter: blur(0.7px) contrast(1.1);
}

html.terminid-takeover .classic-game__hud,
html.terminid-takeover .classic-timers-row,
html.terminid-takeover .hud-skulls-row {
  filter: blur(0.9px) opacity(0.86);
}

@keyframes terminid-fog-pulse {
  0%,
  100% {
    opacity: var(--terminid-fog-opacity-min, 0.4);
    background-position: 42% 45%;
  }
  50% {
    opacity: var(--terminid-fog-opacity-max, 0.8);
    background-position: 58% 55%;
  }
}

.youtube-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.52;
  border-radius: 2px;
  overflow: hidden;
}

.youtube-backdrop iframe {
  width: 100%;
  height: 100%;
  border: 0;
  transform: scale(1.2);
  transform-origin: center center;
}

.playfield > *:not(.youtube-backdrop):not(.terminid-fog-overlay) {
  position: relative;
  z-index: 1;
}

/* Above classic shell + watermarks; must not be flattened by .playfield > * rule */
.playfield > .terminid-fog-overlay {
  position: absolute;
  z-index: 12;
}

@media (max-width: 600px) {
  html.terminid-takeover .playfield > .terminid-fog-overlay {
    display: block !important;
    opacity: max(0.35, var(--terminid-fog-opacity-min, 0.4));
    z-index: 20;
  }
}

.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
  color: var(--brand);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-items: baseline;
}

.hud-timer {
  color: var(--text);
  min-width: 3.5rem;
}

.hud-session {
  color: #c9b87a;
  min-width: 5.5rem;
}

.hud-skulls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0.15rem 0 0.65rem;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(180deg, rgba(8, 7, 5, 0.92) 0%, rgba(18, 15, 10, 0.88) 100%);
  border: 2px solid rgba(232, 196, 92, 0.45);
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hud-skulls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.hud-skulls-row--many .hud-skull__img {
  width: 36px;
}

.hud-skull {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

/* Skull icon: local assets/images/branding/favicon-192.png; “spent” lives greyed via filter */
.hud-skull__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.hud-skull--left .hud-skull__img {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.hud-skull--spent .hud-skull__img {
  filter: grayscale(100%) brightness(0.62) contrast(0.92) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  opacity: 0.9;
}

.timer-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(92, 77, 46, 0.5);
}

.timer-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5a9e4b, var(--brand));
  border-radius: 3px;
  transition: width 0.08s linear;
}

.game-over-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.game-over-modal[hidden] {
  display: none !important;
}

.game-over-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.game-over-modal__panel {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  width: 100%;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(165deg, rgba(28, 24, 18, 0.98) 0%, rgba(10, 9, 7, 0.99) 100%);
  border: 2px solid #6b5a36;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
}

.game-over-modal__title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.game-over-modal__msg {
  margin: 0 0 1rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
}

.game-over-modal__img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin: 0 auto 1rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.game-over-modal__img[hidden] {
  display: none !important;
}

.game-over-modal__qr-wrap {
  margin: 0 auto 1rem;
  text-align: center;
}

.game-over-modal__qr-wrap[hidden] {
  display: none !important;
}

.game-over-modal__qr-caption {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.game-over-modal__qr-img {
  display: inline-block;
  width: 220px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
}

.game-over-modal__link-wrap {
  margin: 0 0 1rem;
}

.game-over-modal__link {
  color: var(--ok);
  word-break: break-all;
}

.game-over-modal__link[hidden] {
  display: none !important;
}

.game-over-modal__btn {
  width: 100%;
  padding: 0.5rem;
  font-weight: 600;
}

.credits-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.credits-modal[hidden] {
  display: none !important;
}

.credits-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.credits-modal__panel {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  width: 100%;
  max-height: min(90vh, 40rem);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.4rem 1.35rem;
  background: linear-gradient(165deg, rgba(28, 24, 18, 0.98) 0%, rgba(10, 9, 7, 0.99) 100%);
  border: 2px solid #6b5a36;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
}

.credits-modal__title {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  flex-shrink: 0;
}

.credits-modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.35rem;
  margin-bottom: 0.65rem;
  border-top: 1px solid rgba(107, 90, 54, 0.45);
  border-bottom: 1px solid rgba(107, 90, 54, 0.45);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.credits-modal__lang[hidden] {
  display: none !important;
}

.credits-section {
  margin-bottom: 1rem;
}

.credits-section:last-child {
  margin-bottom: 0;
}

.credits-section__title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.credits-section p,
.credits-section li {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.credits-section ul {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
}

.credits-section a {
  color: var(--ok);
  word-break: break-word;
}

.credits-section code {
  font-size: 0.82em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.08em 0.28em;
  border-radius: 3px;
}

.credits-modal__hint {
  margin: 0 0 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  flex-shrink: 0;
}

.credits-modal__btn {
  width: 100%;
  padding: 0.5rem;
  font-weight: 600;
  flex-shrink: 0;
}

.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__tagline {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.footer__github {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
}

.footer__github a {
  color: var(--brand);
}

.btn-help-rules {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
  border: 2px solid rgba(107, 90, 54, 0.85);
  color: var(--accent);
  background: linear-gradient(180deg, rgba(36, 32, 26, 0.95) 0%, rgba(18, 16, 12, 0.98) 100%);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-help-rules:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-help-rules:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-help-rules__mark {
  display: block;
  margin-top: -0.08em;
}

.help-rules-modal .credits-modal__panel {
  max-width: min(42rem, 100vw - 2rem);
}

.help-rules-modal__list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.help-rules-modal__list li {
  margin: 0.25rem 0 0;
}

.credits-section__p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.help-rules-modal__maintainer-hint {
  font-style: italic;
  opacity: 0.92;
}

.footer__credits-btn {
  font-size: 0.88rem;
  padding: 0.4rem 1rem;
  border-color: var(--border);
  color: var(--accent);
  background: transparent;
}

.footer__credits-btn:hover {
  border-color: var(--accent);
  color: var(--brand);
}

.stratagem-card {
  background: linear-gradient(165deg, rgba(24, 20, 14, 0.97) 0%, rgba(8, 7, 5, 0.99) 100%);
  border: 2px solid #6b5a36;
  border-radius: 2px;
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  min-height: 140px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.stratagem-card__main {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.stratagem-icon-wrap {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 25%, #2a2418 0%, #0d0b08 70%);
  border: 2px solid #5c4d2e;
  border-radius: 2px;
  padding: 6px;
}

.stratagem-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(232, 196, 92, 0.25));
}

.stratagem-icon--hidden {
  opacity: 0;
  pointer-events: none;
}

.stratagem-card__text {
  flex: 1;
  min-width: 0;
}

.stratagem-card .cat {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.stratagem-card h2 {
  margin: 0;
  font-size: clamp(1.05rem, 3.5vw, 1.45rem);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 20px rgba(232, 196, 92, 0.15);
}

.arrow-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding-top: 0.25rem;
}

.hd-arrow-chip--bind {
  width: 28px;
  height: 32px;
  vertical-align: middle;
}

.hd-arrow-chip--bind .hd-chevron-svg {
  width: 28px;
  height: 32px;
}

.hd-arrow-chip--tiny {
  width: 36px;
  height: 40px;
}

.hd-arrow-chip--tiny .hd-chevron-svg {
  width: 36px;
  height: 40px;
}

.bind-chevron-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hd-arrow-chip {
  width: 44px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #3d3428;
  transition: border-color 0.15s ease, filter 0.15s ease;
}

.hd-arrow-chip .hd-chevron-svg {
  width: 34px;
  height: 38px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(232, 196, 92, 0.45));
}

.hd-arrow-chip.done {
  border-color: rgba(123, 201, 111, 0.85);
}

.hd-arrow-chip.done .hd-chevron-svg {
  filter: drop-shadow(0 0 6px rgba(123, 201, 111, 0.65));
}

.hd-arrow-chip.wrong {
  border-color: var(--bad);
  animation: shake 0.35s ease;
}

.hd-arrow-chip.wrong .hd-chevron-svg {
  filter: drop-shadow(0 0 7px rgba(255, 107, 107, 0.75));
}

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

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1.5em;
}

.play-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
}

legend {
  padding: 0 0.35rem;
  color: var(--accent);
  font-size: 0.85rem;
}

#panelSettings .settings-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0.65rem 0;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

#panelSettings .settings-details__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}

#panelSettings .settings-details__summary::-webkit-details-marker {
  display: none;
}

#panelSettings .settings-details__summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.15s ease;
  color: var(--muted);
  font-size: 0.75rem;
  width: 1em;
  flex-shrink: 0;
}

#panelSettings .settings-details[open] > .settings-details__summary::before {
  transform: rotate(90deg);
}

#panelSettings .settings-details__summary:hover,
#panelSettings .settings-details__summary:focus-visible {
  color: var(--brand);
  outline: none;
}

#panelSettings .settings-details__summary:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(212, 168, 85, 0.45);
}

#panelSettings .settings-details__inner {
  padding: 0.35rem 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}

.settings-global-reset {
  margin: 0.15rem 0 0.85rem;
}

.btn-danger-outline {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(220, 80, 80, 0.75);
  background: rgba(60, 20, 20, 0.35);
  color: #ffb0a8;
  cursor: pointer;
}

.btn-danger-outline:hover {
  background: rgba(90, 30, 30, 0.55);
  color: #fff;
}

.settings-section-actions {
  margin-top: 0.85rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}

.btn-reset-section {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.btn-reset-section:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-reset-one-field {
  flex-shrink: 0;
  min-width: 2rem;
  padding: 0.15rem 0.35rem;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
}

.btn-reset-one-field:hover {
  color: var(--brand);
  border-color: var(--brand);
}

#panelSettings label.block:has(.btn-reset-one-field) {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.35rem;
  align-items: center;
}

#panelSettings label.block:has(.btn-reset-one-field) > span:first-child {
  grid-column: 1 / -1;
}

#panelSettings label.block:has(.btn-reset-one-field) > input,
#panelSettings label.block:has(.btn-reset-one-field) > select,
#panelSettings label.block:has(.btn-reset-one-field) > textarea {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

#panelSettings label.block:has(.btn-reset-one-field) > .btn-reset-one-field {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}

label.block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

label.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.small {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.25rem 0 0.5rem;
}

.bind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.bind-cell {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
}

.bind-cell strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--accent);
}

.bind-keys {
  min-height: 2.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.level-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.level-row--game {
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.level-row__head {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.level-row__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem 0.75rem;
}

.level-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.level-field span {
  line-height: 1.2;
}

.level-row__grid input[type="number"] {
  width: 100%;
  max-width: 6.5rem;
}

.level-row input[type="number"],
#swipeMinDistance,
#maxErrors {
  width: 100px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem;
}

.row-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.b64-area {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.seq-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.5rem;
  background: var(--panel);
  border-radius: 6px;
  margin: 0.35rem 0;
}

.seq-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.dir-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.2rem;
  font-size: 1rem;
  border-color: #5c4d2e;
  color: var(--brand);
}

.editor-level-speeds {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.editor-level-speeds .level-row label {
  min-width: 5rem;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .classic-game__topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .kiosk-mode .kiosk-mode-topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-right: 0;
    width: 100%;
  }
  .kiosk-mode .kiosk-mode-topbar__label {
    justify-content: space-between;
  }
  .kiosk-mode .kiosk-mode-topbar__label select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .kiosk-mode .kiosk-mode-topbar__btn {
    width: 100%;
    max-width: none;
  }
  .kiosk-mode .kiosk-menu #kioskModesHost {
    display: none;
  }
  .classic-game__volume {
    justify-content: flex-end;
  }
}

/* ——— StratagemHero.com–style play shell (classic-game.js) ——— */
.play-hint-banner {
  text-align: center;
  margin: 0.5rem auto 0;
  max-width: 40rem;
}

.play-hint-banner[hidden] {
  display: none !important;
}

.classic-game {
  position: relative;
  max-width: 28rem;
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem 1rem;
  background: #333;
  border: 2px solid #ffe80a;
  border-radius: 4px;
  color: #eee;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.classic-game[hidden] {
  display: none !important;
}

.classic-game__banner {
  text-align: center;
  margin-bottom: 0.5rem;
}

.classic-game__logo {
  max-width: min(100%, 280px);
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.classic-game__topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.classic-game__volume {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.classic-game__volume input[type="range"] {
  width: 7rem;
  accent-color: #ffe80a;
}

.classic-game__vol-icon {
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
}

.classic-screen {
  min-height: 12rem;
  padding: 0.5rem 0;
  text-align: center;
}

.classic-screen[hidden] {
  display: none !important;
}

.classic-screen__title {
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 700;
  margin: 0.5rem 0;
  color: #fff;
}

.classic-screen__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #ffe80a;
  margin: 0 0 0.35rem;
}

.classic-screen__round {
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.classic-screen__ready {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: #ccc;
  font-style: italic;
  min-height: 1.5em;
}

.classic-screen__sub {
  margin: 0.35rem 0 0;
  color: #aaa;
}

.classic-screen__primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto 0;
  min-width: min(100%, 16rem);
  min-height: 3rem;
  padding: 0.65rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1510;
  background: linear-gradient(180deg, #ffe14a 0%, #e8b820 45%, #c49210 100%);
  border: 2px solid rgba(255, 240, 160, 0.65);
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.classic-screen__primary-btn:hover {
  filter: brightness(1.06);
}

.classic-screen__primary-btn:active {
  transform: scale(0.98);
}

.classic-screen__primary-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.classic-screen--game {
  text-align: left;
  min-height: auto;
}

.classic-game__hud {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffe80a;
  margin-bottom: 0.65rem;
}

.classic-combo-hud {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 232, 10, 0.88);
  margin: -0.35rem 0 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.classic-combo-hud__value {
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.classic-combo-hud[hidden] {
  display: none !important;
}

.classic-game--brasch .classic-game__hud,
.classic-game--brasch .classic-combo-hud {
  font-size: 1.05rem;
}

.classic-game--brasch .classic-active-name {
  font-size: clamp(1.2rem, 4.5vw, 1.65rem);
}

.classic-game--brasch .classic-seq-row {
  gap: 0.5rem;
}

.classic-game--brasch .classic-arrow {
  width: 2.65rem;
  height: 2.65rem;
}

.classic-game--brasch .classic-strat-item {
  width: 2.85rem;
  height: 2.85rem;
}

.classic-game--brasch .classic-timer__label {
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  color: #fff4a8;
}

.classic-brasch-portrait-wrap {
  position: relative;
  z-index: 6;
  width: 100%;
  max-height: min(42vw, 11rem);
  margin: 0.25rem auto 0.65rem;
  padding: 0.2rem;
  border-radius: 6px;
  border: 2px solid rgba(255, 232, 10, 0.75);
  background: linear-gradient(180deg, rgba(40, 36, 20, 0.95) 0%, rgba(18, 16, 10, 0.98) 100%);
  box-shadow:
    0 0 24px rgba(255, 220, 60, 0.35),
    inset 0 0 40px rgba(255, 200, 40, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.classic-brasch-portrait-wrap[hidden] {
  display: none !important;
}

.classic-brasch-portrait {
  width: 100%;
  max-height: min(40vw, 10.5rem);
  height: auto;
  object-fit: contain;
  object-position: center top;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}

.classic-strat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-bottom: 0.75rem;
  min-height: 3rem;
}

.classic-strat-item {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #555;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.classic-strat-item--active {
  opacity: 1;
  border-color: #ffe80a;
}

.classic-strat-item__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #222;
}

.classic-active-name {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  margin: 0 0 0.5rem;
  text-align: center;
  color: #fff;
  font-weight: 700;
}

.classic-seq-host {
  min-height: 3rem;
  margin-bottom: 0.75rem;
}

.classic-seq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.classic-arrow {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #666;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
}

.classic-arrow img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  opacity: 0.45;
  filter: brightness(1.1);
}

.classic-arrow--correct img {
  opacity: 1;
  filter: none;
}

.classic-timers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  justify-content: center;
  align-items: stretch;
  width: min(100%, 34rem);
  margin: 0.65rem auto 0;
}

.classic-timer-panel {
  flex: 1 1 11rem;
  min-width: min(100%, 11rem);
  max-width: 100%;
}

.classic-timer-panel__title {
  font-size: clamp(0.72rem, 2.2vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.35rem;
  text-align: center;
}

.classic-timer-panel--mode .classic-timer-panel__title {
  color: rgba(155, 220, 255, 0.9);
}

.classic-timer__label {
  display: block;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: #ffe80a;
  margin-top: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.classic-timer__label--mode {
  color: #9bdcff;
}

.classic-hud-skulls.hud-skulls-row {
  margin: 0.35rem auto 0.5rem;
  max-width: min(100%, 24rem);
}

.classic-timer {
  height: 10px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #555;
}

.classic-timer__fill {
  height: 100%;
  width: 100%;
  background: #ffe80a;
  transition: width 0.05s linear;
}

.classic-timer__fill--warn {
  background: #ff4444;
}

.classic-timer__fill--brasch {
  background: linear-gradient(90deg, #ffd24a 0%, #fff8b0 50%, #ffd24a 100%);
  box-shadow: 0 0 12px rgba(255, 240, 120, 0.45);
}

.classic-timer--mode {
  border-color: rgba(100, 180, 220, 0.45);
}

.classic-timer__fill--mode {
  background: linear-gradient(90deg, #3a9cc9 0%, #6ecfff 100%);
}

.classic-timer-panel--mode .classic-timer__fill--mode.classic-timer__fill--warn {
  background: #ff6644;
}

.classic-screen--round-over .classic-ro__line {
  margin: 0.35rem 0;
  font-size: 1.05rem;
}

.classic-ro--hidden {
  visibility: hidden;
}

.classic-go__score {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffe80a;
  margin: 0.75rem 0;
}

.classic-game__glitch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
  mix-blend-mode: screen;
  z-index: 5;
}

.classic-game__glitch--flash {
  animation: classic-glitch-flash 0.28s ease-out;
}

@keyframes classic-glitch-flash {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

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

.kiosk-mode .classic-game {
  max-width: min(32rem, 100%);
}
