:root {
  color-scheme: dark;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --page: #080b21;
  --page-accent: #151044;
  --ink: #f7fbff;
  --muted: #9db2d1;
  --panel: rgba(8, 13, 38, 0.9);
  --panel-soft: rgba(16, 25, 58, 0.82);
  --line: #28518f;
  --p1: #23e5ff;
  --p1-rgb: 35, 229, 255;
  --p2: #ff43bd;
  --p2-rgb: 255, 67, 189;
  --accent: #7d5cff;
  --cell: rgba(4, 10, 32, 0.76);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --small-radius: 13px;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background-color: #080b21;
  background-image:
    linear-gradient(rgba(31, 103, 190, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 103, 190, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 12% 32%, rgba(35, 229, 255, 0.18), transparent 30%),
    radial-gradient(circle at 88% 42%, rgba(255, 67, 189, 0.17), transparent 31%),
    linear-gradient(145deg, #080b21, #151044);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(31, 103, 190, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 103, 190, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 12% 32%, rgba(var(--p1-rgb), 0.18), transparent 30%),
    radial-gradient(circle at 88% 42%, rgba(var(--p2-rgb), 0.17), transparent 31%),
    linear-gradient(145deg, var(--page), var(--page-accent));
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease;
}

/*
 * In iOS homescreen apps, 100dvh can stop above the home-indicator region.
 * A non-fixed 100vh canvas fills the physical standalone screen; keeping the
 * root non-fixed also avoids WebKit's viewport-fit=cover bottom-gap bug.
 */
html.is-standalone,
html.is-standalone body {
  height: 100vh;
  min-height: 100vh;
}

@media (display-mode: standalone) {
  html,
  body {
    height: 100vh;
    min-height: 100vh;
  }
}

button,
input {
  font: inherit;
  touch-action: manipulation;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 820px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 17px);
  overflow: hidden;
}

.sound-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.sound-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 13px rgba(var(--p1-rgb), 0.2);
}

.sound-toggle:active {
  transform: translateY(2px);
}

.game-header {
  position: relative;
  text-align: center;
}

.game-header__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 16px);
}

.game-header__eyebrow,
.status-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: clamp(0.62rem, 2.2vw, 0.76rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.game-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 11.5vw, 5.5rem);
  font-style: italic;
  line-height: 0.92;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
  filter: drop-shadow(0 3px 0 #172a50);
}

.game-header .sound-toggle {
  width: clamp(42px, 11vw, 50px);
  height: clamp(42px, 11vw, 50px);
}

.game-header h1 span {
  color: #f5f8ff;
}

.game-header h1 strong {
  color: var(--p2);
  font-weight: inherit;
  text-shadow: 0 0 18px rgba(var(--p2-rgb), 0.48);
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
}

.player-card {
  position: relative;
  min-width: 0;
  min-height: 146px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.player-card--one {
  border-radius: var(--radius) 8px 8px var(--radius);
}

.player-card--two {
  border-radius: 8px var(--radius) var(--radius) 8px;
  flex-direction: row-reverse;
  text-align: right;
}

.player-card--one.is-current {
  border-color: var(--p1);
  box-shadow: 0 0 0 2px rgba(var(--p1-rgb), 0.16), 0 0 25px rgba(var(--p1-rgb), 0.18);
}

.player-card--two.is-current {
  border-color: var(--p2);
  box-shadow: 0 0 0 2px rgba(var(--p2-rgb), 0.16), 0 0 25px rgba(var(--p2-rgb), 0.18);
}

.fighter-badge {
  width: clamp(54px, 14vw, 78px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--p1);
  border-radius: 50%;
  background: var(--cell);
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.34));
}

.player-card--two .fighter-badge {
  border-color: var(--p2);
}

.player-card__copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.player-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.player-card--two .player-name-row {
  flex-direction: row-reverse;
}

.player-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-card__copy strong {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--p1);
  font-family: var(--display);
  font-size: clamp(1.2rem, 4vw, 2rem);
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.power-up-tray {
  position: relative;
  min-width: 104px;
  min-height: 55px;
  margin-top: 12px;
  padding: 7px 7px 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(var(--p1-rgb), 0.32);
  border-radius: 12px;
  background: rgba(var(--p1-rgb), 0.055);
  box-shadow: inset 0 0 16px rgba(var(--p1-rgb), 0.06);
}

.player-card--two .power-up-tray {
  flex-direction: row-reverse;
  border-color: rgba(var(--p2-rgb), 0.32);
  background: rgba(var(--p2-rgb), 0.055);
  box-shadow: inset 0 0 16px rgba(var(--p2-rgb), 0.06);
}

.power-up-tray__label {
  position: absolute;
  top: -6px;
  left: 8px;
  padding: 0 4px;
  color: var(--muted);
  background: var(--panel);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.player-card--two .power-up-tray__label {
  right: 8px;
  left: auto;
}

.random-bullet-power {
  --bullet-energy: var(--p1);
  position: relative;
  z-index: 5;
  width: 46px;
  height: 44px;
  flex: 0 0 auto;
  padding: 3px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bullet-energy);
  border-radius: 10px;
  color: var(--ink);
  background: var(--cell);
  box-shadow: 0 0 12px rgba(var(--p1-rgb), 0.32);
  cursor: pointer;
  touch-action: manipulation;
}

.power-up-button.is-receiving {
  opacity: 1;
  animation: power-slot-receive 520ms cubic-bezier(0.17, 0.88, 0.34, 1.35) both;
}

.player-card--two .random-bullet-power {
  --bullet-energy: var(--p2);
  box-shadow: 0 0 12px rgba(var(--p2-rgb), 0.32);
}

.random-bullet-power[hidden] {
  display: none !important;
}

.random-bullet-power:disabled {
  cursor: default;
  filter: saturate(0.6);
  opacity: 0.72;
}

.random-bullet-power.is-ready:not(:disabled) {
  animation: bullet-ready 1.15s ease-in-out infinite alternate;
}

.random-bullet-power.is-collecting {
  opacity: 1;
  animation: bullet-collected 1.35s cubic-bezier(0.16, 0.88, 0.3, 1.18) both;
}

.random-bullet-power__count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  color: #07111d;
  background: #fff;
  font: 950 0.62rem/1 system-ui, sans-serif;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.power-up-count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  color: #07111d;
  background: #fff;
  font: 950 0.62rem/1 system-ui, sans-serif;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.jumble-power {
  position: relative;
  z-index: 5;
  width: 46px;
  height: 44px;
  flex: 0 0 auto;
  padding: 2px;
  display: grid;
  place-items: center;
  border: 1px solid #a86cff;
  border-radius: 10px;
  color: var(--ink);
  background: var(--cell);
  box-shadow: 0 0 13px rgba(168, 108, 255, 0.38);
  cursor: pointer;
  touch-action: manipulation;
}

.jumble-power[hidden] {
  display: none !important;
}

.jumble-power:disabled {
  cursor: default;
  filter: saturate(0.65);
  opacity: 0.72;
}

.jumble-power.is-ready:not(:disabled) {
  animation: jumble-ready 1.2s ease-in-out infinite alternate;
}

.jumble-icon {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  filter: drop-shadow(0 0 5px #8a4dff);
}

.tornado-power {
  position: relative;
  z-index: 5;
  width: 46px;
  height: 44px;
  flex: 0 0 auto;
  padding: 1px;
  display: grid;
  place-items: center;
  border: 1px solid #70eeff;
  border-radius: 10px;
  color: var(--ink);
  background: radial-gradient(circle at 50% 38%, rgba(106, 235, 255, 0.2), var(--cell) 68%);
  box-shadow: 0 0 13px rgba(85, 229, 255, 0.38);
  cursor: pointer;
  touch-action: manipulation;
}

.tornado-power[hidden] {
  display: none !important;
}

.tornado-power:disabled {
  cursor: default;
  filter: saturate(0.65);
  opacity: 0.72;
}

.tornado-power.is-ready:not(:disabled) {
  animation: tornado-ready 1.05s ease-in-out infinite alternate;
}

.tornado-power.is-targeting:not(:disabled) {
  border-color: #fff;
  background: rgba(91, 225, 255, 0.24);
  box-shadow: 0 0 8px #fff, 0 0 25px #45ddff;
}

.tornado-icon {
  display: block;
  font-size: 2rem;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 5px #6cecff);
}

.power-pickup-flight {
  position: fixed;
  z-index: 160;
  margin: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: left, top, transform, filter;
}

.power-pickup-flight.is-flying {
  animation: power-pickup-reveal var(--pickup-duration, 1180ms) cubic-bezier(.18, .72, .2, 1) both;
}

.power-pickup-flight--jumble {
  width: 74px;
  height: 74px;
}

.power-pickup-flight--jumble > .jumble-icon {
  width: 74px;
  height: 74px;
  box-shadow: 0 0 35px rgba(168, 82, 255, 0.8);
}

.power-pickup-flight--bullet {
  width: 82px;
  height: 50px;
}

.power-pickup-flight--bullet > .random-bullet-icon {
  width: 82px;
  height: 50px;
}

.power-pickup-flight--tornado {
  width: 74px;
  height: 74px;
}

.power-pickup-flight--tornado > .tornado-icon {
  font-size: 4.5rem;
  filter: drop-shadow(0 0 18px #70efff) drop-shadow(0 0 35px #995cff);
}

.random-bullet-icon {
  --bullet-energy: var(--p1);
  position: relative;
  width: 39px;
  height: 24px;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 0 4px var(--bullet-energy));
}

.random-bullet-icon__trail {
  position: absolute;
  top: 28%;
  left: -43%;
  width: 50%;
  height: 44%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #ff8400 42%, #eaffff 100%);
  clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%);
  filter: drop-shadow(0 0 5px #ff9d00);
}

.random-bullet-icon.is-flying .random-bullet-icon__trail {
  opacity: 1;
}

.random-bullet-icon__body {
  position: absolute;
  inset: 8% 0 8% 4%;
  border: 2px solid #c8d6dd;
  border-radius: 28% 58% 58% 28%;
  background: radial-gradient(circle at 68% 24%, #68747e 0 5%, #202932 26%, #05080c 68%);
}

.random-bullet-icon__band {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -2px;
  width: 19%;
  border: 1px solid #fff1a1;
  border-radius: 5px 1px 1px 5px;
  background: linear-gradient(90deg, #925000, #ffd64d, #a35e00);
}

.random-bullet-icon__eye {
  position: absolute;
  top: 17%;
  width: 17%;
  height: 34%;
  background: #fff;
  clip-path: polygon(0 0, 100% 38%, 74% 100%, 20% 85%);
}

.random-bullet-icon__eye::after {
  position: absolute;
  right: 12%;
  bottom: 7%;
  width: 34%;
  height: 52%;
  border-radius: 50%;
  background: #020407;
  content: "";
}

.random-bullet-icon__eye--one { left: 36%; }
.random-bullet-icon__eye--two { left: 57%; transform: scaleX(-1); }

.random-bullet-icon__mark {
  position: absolute;
  top: 54%;
  left: 44%;
  color: #2de8ff;
  font: 950 0.56em/1 system-ui, sans-serif;
  text-shadow: 0 0 5px #2de8ff;
}

.random-bullet-icon__glove {
  position: absolute;
  z-index: -1;
  left: 28%;
  width: 20%;
  height: 30%;
  border: 1px solid #9ba6ac;
  border-radius: 55% 55% 45% 45%;
  background: #fff;
}

.random-bullet-icon__glove--top { top: -15%; transform: rotate(-25deg); }
.random-bullet-icon__glove--bottom { bottom: -15%; transform: rotate(25deg); }

.random-bullet-projectile {
  position: fixed;
  z-index: 100;
  width: 82px;
  height: 50px;
  --bullet-energy: var(--p1);
  filter: drop-shadow(0 0 10px var(--bullet-energy)) drop-shadow(0 7px 5px rgba(0, 0, 0, 0.62));
}

.random-bullet-projectile[data-player="1"] {
  --bullet-energy: var(--p2);
}

.random-bullet-explosion {
  position: fixed;
  z-index: 101;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 8%, #fff36c 9% 20%, #ff9a00 22% 42%, #ff315a 44% 53%, transparent 55%);
  filter: drop-shadow(0 0 20px #ff8a00);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: random-bullet-boom 620ms cubic-bezier(0.17, 0.82, 0.34, 1) both;
}

.random-bullet-explosion::before,
.random-bullet-explosion::after {
  position: absolute;
  inset: -20px;
  background: #ffbf1c;
  clip-path: polygon(48% 0, 56% 31%, 77% 8%, 70% 37%, 100% 32%, 72% 52%, 96% 68%, 66% 64%, 76% 96%, 55% 70%, 42% 100%, 40% 69%, 10% 88%, 31% 59%, 0 49%, 34% 45%, 15% 14%, 42% 35%);
  content: "";
  opacity: 0.72;
}

.random-bullet-explosion::after {
  inset: 9px;
  background: #fff;
  opacity: 0.9;
  transform: rotate(18deg);
}

.player-card--two .player-card__copy strong {
  color: var(--p2);
}

.wins {
  min-height: 21px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.player-card--two .wins {
  justify-content: flex-end;
}

.wins__label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.score-count {
  min-width: 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  font-family: var(--display);
  font-size: clamp(0.85rem, 3vw, 1.05rem);
  font-weight: 900;
  line-height: 1;
}

.turn-badge {
  position: absolute;
  right: 12px;
  bottom: -9px;
  z-index: 1;
  padding: 4px 9px;
  border: 1px solid var(--p1);
  border-radius: 999px;
  color: var(--page);
  background: var(--p1);
  font-size: 0.57rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(var(--p1-rgb), 0.5);
}

.player-card--two .turn-badge {
  right: auto;
  left: 12px;
  border-color: var(--p2);
  background: var(--p2);
  box-shadow: 0 0 14px rgba(var(--p2-rgb), 0.5);
}

.versus {
  z-index: 2;
  align-self: center;
  width: 46px;
  height: 46px;
  margin: 0 -7px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: #fff;
  background: var(--page-accent);
  font-family: var(--display);
  font-size: 1.1rem;
  font-style: italic;
  box-shadow: 0 0 20px rgba(125, 92, 255, 0.4);
}

.battle-panel {
  margin-top: clamp(3px, 0.8vh, 9px);
  padding: clamp(10px, 2vw, 16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-wrap {
  min-height: 53px;
  text-align: center;
}

.status-wrap h2 {
  margin: 0 0 9px;
  font-family: var(--display);
  font-size: clamp(1.25rem, 4.8vw, 2rem);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.status-wrap h2 span {
  display: inline-block;
  margin-right: 4px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.board {
  position: relative;
  width: min(100%, 540px, 57vh);
  min-width: 280px;
  margin: 0 auto;
  padding: clamp(7px, 1.5vw, 11px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(5px, 1.25vw, 9px);
  border: 2px solid var(--accent);
  border-radius: calc(var(--radius) - 3px);
  background: rgba(4, 6, 20, 0.72);
  box-shadow: inset 0 0 35px rgba(39, 42, 119, 0.45), 0 0 20px rgba(125, 92, 255, 0.2);
}

.board.is-jumbling {
  border-color: #c478ff;
  box-shadow:
    inset 0 0 55px rgba(87, 32, 214, 0.72),
    0 0 14px #25dcff,
    0 0 38px rgba(233, 55, 255, 0.62);
  animation: jumble-board-charge 1.6s ease-in-out both;
}

.board.is-jumbling .cell.is-jumble-source {
  color: transparent;
  text-shadow: none;
  filter: none;
}

.board.is-tornado-targeting {
  border-color: #70efff;
  box-shadow: inset 0 0 38px rgba(74, 218, 255, 0.3), 0 0 28px rgba(96, 231, 255, 0.42);
}

.board.is-tornado-targeting .cell.is-tornado-target {
  cursor: crosshair;
  border-color: rgba(226, 252, 255, 0.88);
  outline: 1px dashed rgba(154, 241, 255, 0.58);
  outline-offset: -5px;
  background: linear-gradient(180deg, rgba(132, 240, 255, 0.12), rgba(73, 89, 205, 0.14));
  animation: tornado-column-breathe 1.8s ease-in-out infinite alternate;
}

.board.is-tornado-targeting .cell.is-tornado-target:nth-child(4n + 2) {
  animation-delay: 120ms;
}

.board.is-tornado-targeting .cell.is-tornado-target:nth-child(4n + 3) {
  animation-delay: 240ms;
}

.board.is-tornado-targeting .cell.is-tornado-target:nth-child(4n + 4) {
  animation-delay: 360ms;
}

.board.is-tornado-targeting .cell.is-tornado-column-hover {
  z-index: 2;
  background: linear-gradient(180deg, rgba(111, 238, 255, 0.25), rgba(71, 86, 204, 0.25));
  outline-color: rgba(220, 252, 255, 0.9);
}

.board.is-tornado-active {
  border-color: #c8fbff;
  box-shadow: inset 0 0 54px rgba(89, 225, 255, 0.35), 0 0 20px #61e9ff, 0 0 44px rgba(131, 86, 255, 0.5);
  animation: tornado-board-buffet 420ms ease-in-out 5 alternate;
}

.cell.is-tornado-source.is-being-swept {
  animation: tornado-cell-impact 260ms ease-out var(--tornado-hit-delay, 0ms) both;
}

.tornado-animation-layer {
  position: fixed;
  inset: 0;
  z-index: 138;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.tornado-funnel {
  position: fixed;
  z-index: 142;
  width: 1.35em;
  height: 1.35em;
  display: grid;
  place-items: center;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 9px #fff) drop-shadow(0 0 24px #5cecff) drop-shadow(0 12px 8px rgba(0, 0, 0, 0.55));
  will-change: left, top, transform, filter;
}

.tornado-funnel__emoji {
  position: relative;
  z-index: 2;
  display: block;
  animation: tornado-emoji-spin 240ms linear infinite;
}

.tornado-funnel i {
  position: absolute;
  z-index: 1;
  width: 125%;
  height: 38%;
  border: 3px solid rgba(212, 252, 255, 0.9);
  border-right-color: transparent;
  border-left-color: rgba(117, 226, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 12px #64e8ff;
  animation: tornado-wind-ring 360ms linear infinite;
}

.tornado-funnel i:last-child {
  width: 78%;
  height: 25%;
  animation-direction: reverse;
  animation-duration: 260ms;
}

.tornado-funnel.is-sweeping {
  animation: tornado-sweep var(--tornado-duration, 2500ms) cubic-bezier(.22, .58, .22, 1) both;
}

.tornado-piece {
  position: fixed;
  z-index: 145;
  display: grid;
  place-items: center;
  opacity: 0;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.62)) drop-shadow(0 0 13px #71efff);
  will-change: left, top, opacity, transform, filter;
}

.tornado-piece.is-flying {
  animation: tornado-piece-flight var(--tornado-piece-duration, 980ms) cubic-bezier(.18, .62, .2, 1) var(--tornado-piece-delay, 0ms) forwards;
}

.jumble-animation-layer {
  position: fixed;
  inset: 0;
  z-index: 118;
  overflow: visible;
  pointer-events: none;
  isolation: isolate;
  contain: layout style;
}

.jumble-vortex {
  position: fixed;
  z-index: 119;
  border: 3px solid rgba(90, 224, 255, 0.8);
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, transparent, rgba(31, 220, 255, 0.42), transparent 24%, rgba(255, 46, 218, 0.48), transparent 53%, rgba(127, 70, 255, 0.55), transparent 80%),
    radial-gradient(circle, rgba(151, 66, 255, 0.25), transparent 65%);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.16), 0 0 34px rgba(111, 58, 255, 0.66);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: jumble-vortex-spin 1.65s cubic-bezier(0.3, 0.05, 0.25, 1) both;
}

.jumble-vortex::before,
.jumble-vortex::after {
  position: absolute;
  inset: 13%;
  border: 2px dashed rgba(255, 255, 255, 0.62);
  border-radius: inherit;
  content: "";
}

.jumble-vortex::after {
  inset: 31%;
  border-style: solid;
  border-color: #ff54df #3cecff #ffcf58 #9a63ff;
}

.jumble-piece {
  position: fixed;
  z-index: 125;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: clamp(2rem, 11vw, 4.25rem);
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 5px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 12px #b84dff);
  will-change: left, top, transform, filter;
}

.jumble-piece.is-flying {
  animation: jumble-piece-flight var(--jumble-duration, 1650ms) cubic-bezier(.2, .68, .18, 1) var(--jumble-delay, 0ms) both;
}

.jumble-piece::after {
  position: absolute;
  inset: -7%;
  z-index: -1;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  content: "";
  opacity: 0;
  box-shadow: 0 0 18px #7b56ff;
  animation: jumble-piece-aura 720ms ease-out 180ms;
}

.draw-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(2, 4, 17, 0.58);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 240ms ease;
}

.draw-overlay[hidden] {
  display: none !important;
}

.draw-overlay.is-visible {
  opacity: 1;
}

.draw-sheet {
  position: relative;
  width: min(100%, 610px);
  padding: 13px clamp(20px, 5vw, 36px) clamp(20px, 4vh, 32px);
  overflow: hidden;
  border: 2px solid #315ea9;
  border-radius: 34px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 25%, rgba(85, 65, 224, 0.24), transparent 38%),
    linear-gradient(160deg, rgba(16, 22, 68, 0.99), rgba(4, 8, 31, 0.995));
  box-shadow: 0 -8px 42px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
  transform: translateY(calc(100% + 28px));
}

.draw-overlay.is-visible .draw-sheet {
  animation: draw-sheet-enter 560ms cubic-bezier(.17, .88, .3, 1.12) both;
}

.draw-sheet__handle {
  width: 61px;
  height: 7px;
  margin: 0 auto 5px;
  display: block;
  border-radius: 999px;
  background: #635ea5;
  box-shadow: 0 0 10px rgba(125, 92, 255, 0.42);
}

.draw-sheet__emblem {
  position: relative;
  width: 132px;
  height: 100px;
  margin: 0 auto -1px;
  display: grid;
  place-items: center;
  font-size: 4.7rem;
  filter: drop-shadow(-8px 0 13px rgba(var(--p1-rgb), 0.55)) drop-shadow(8px 0 13px rgba(var(--p2-rgb), 0.55));
}

.draw-sheet__emblem::before {
  position: absolute;
  inset: 21px 3px 5px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), rgba(94, 62, 255, 0.12) 45%, transparent 72%);
  content: "";
  animation: draw-emblem-glow 1.15s ease-in-out infinite alternate;
}

.draw-sheet__emblem i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  filter: drop-shadow(0 0 5px #75eaff);
  animation: draw-star 900ms ease-in-out infinite alternate;
}

.draw-sheet__emblem i:nth-of-type(1) { top: 23%; left: 4%; }
.draw-sheet__emblem i:nth-of-type(2) { top: 12%; right: 7%; animation-delay: 180ms; }
.draw-sheet__emblem i:nth-of-type(3) { right: 0; bottom: 16%; animation-delay: 360ms; }
.draw-sheet__emblem i:nth-of-type(4) { bottom: 12%; left: 10%; animation-delay: 540ms; }

.draw-sheet__kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.draw-sheet h2 {
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(2.65rem, 11vw, 4.6rem);
  font-style: italic;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 8px #fff, 0 0 24px rgba(74, 187, 255, 0.75);
}

.draw-sheet > p:last-of-type {
  margin: 9px 0 17px;
  color: #d9e2f5;
  font-size: clamp(0.92rem, 3.6vw, 1.1rem);
  font-weight: 750;
}

.draw-sheet__button {
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid #d9ffff;
  border-radius: 17px;
  color: #03121c;
  background: linear-gradient(180deg, #4af1ff, #0fc9e8);
  font-family: var(--display);
  font-size: clamp(1.15rem, 5vw, 1.55rem);
  font-weight: 950;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  box-shadow: 0 6px 0 #087d9e, 0 0 24px rgba(35, 229, 255, 0.62);
  cursor: pointer;
  touch-action: manipulation;
}

.draw-sheet__button span {
  margin-right: 6px;
}

.draw-sheet__button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #087d9e, 0 0 18px rgba(35, 229, 255, 0.55);
}

.setup-overlay {
  --setup-one: var(--p1);
  --setup-two: var(--p2);
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 42%, rgba(var(--p1-rgb), 0.2), transparent 34%),
    radial-gradient(circle at 68% 58%, rgba(var(--p2-rgb), 0.18), transparent 34%),
    rgba(2, 4, 17, 0.76);
  backdrop-filter: blur(5px) brightness(0.68) saturate(1.25);
  opacity: 0;
  transition: opacity 220ms ease;
}

.setup-overlay::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(var(--p1-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--p2-rgb), 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  pointer-events: none;
}

.setup-overlay[hidden] {
  display: none !important;
}

.setup-overlay.is-visible {
  opacity: 1;
}

body.has-setup-prompt {
  overflow: hidden;
}

.setup-sheet {
  position: relative;
  z-index: 1;
  width: min(88vw, 460px);
  padding: clamp(25px, 5vh, 38px) clamp(23px, 6vw, 40px) clamp(22px, 4vh, 32px);
  overflow: hidden;
  border: 4px solid var(--setup-one);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(var(--p1-rgb), 0.24), transparent 38%),
    linear-gradient(315deg, rgba(var(--p2-rgb), 0.22), transparent 40%),
    rgba(3, 7, 27, 0.98);
  box-shadow:
    0 0 0 3px rgba(3, 7, 27, 0.96),
    0 0 0 7px var(--setup-two),
    -12px 0 42px rgba(var(--p1-rgb), 0.45),
    12px 0 42px rgba(var(--p2-rgb), 0.4),
    0 30px 80px rgba(0, 0, 0, 0.72);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  text-align: center;
  opacity: 0;
  transform: translateY(34px) scale(0.72) rotate(-2deg);
}

.setup-overlay.is-visible .setup-sheet {
  animation: victory-sheet-slam 760ms cubic-bezier(.16, .9, .24, 1.22) 120ms both;
}

.setup-sheet__fighters {
  position: relative;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.setup-sheet__fighters span {
  width: clamp(82px, 23vw, 108px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(4, 9, 31, 0.98);
  box-shadow: 0 0 0 4px var(--setup-one), 0 0 25px var(--setup-one);
  font-size: clamp(3.5rem, 15vw, 5rem);
  line-height: 1;
}

.setup-sheet__fighters span:last-child {
  box-shadow: 0 0 0 4px var(--setup-two), 0 0 25px var(--setup-two);
}

.setup-sheet__fighters i {
  z-index: 2;
  width: 52px;
  height: 52px;
  margin-inline: -7px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #11143c;
  font-family: var(--display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.46);
}

.setup-sheet__kicker,
.setup-sheet__hint {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.setup-sheet__kicker {
  color: #ffd84d;
  font-size: clamp(0.7rem, 2.5vw, 0.84rem);
}

.setup-sheet h2 {
  margin: 3px 0 8px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 12vw, 4.5rem);
  font-style: italic;
  letter-spacing: 0.025em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: -3px 0 0 var(--setup-one), 3px 0 0 var(--setup-two), 0 0 18px #fff;
}

.setup-sheet > p:not(.setup-sheet__kicker):not(.setup-sheet__hint) {
  max-width: 330px;
  margin: 0 auto 22px;
  color: #dce5f7;
  font-size: clamp(0.94rem, 3.7vw, 1.08rem);
  font-weight: 750;
  line-height: 1.45;
}

.setup-sheet__button {
  width: min(100%, 330px);
  min-height: 68px;
  padding: 0 22px;
  border: 2px solid #fff;
  border-radius: 17px;
  color: #160018;
  background: linear-gradient(100deg, var(--setup-one), #fff 48%, var(--setup-two));
  font-family: var(--display);
  font-size: clamp(1.35rem, 5.8vw, 1.8rem);
  font-weight: 950;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  box-shadow: 0 7px 0 #76115e, 0 0 18px rgba(255, 255, 255, 0.72), 0 0 38px rgba(var(--p2-rgb), 0.7);
  cursor: pointer;
  touch-action: manipulation;
  animation: setup-fighters-pulse 1050ms ease-in-out infinite alternate;
}

.setup-sheet__button span {
  margin-right: 7px;
}

.setup-sheet__button:active {
  box-shadow: 0 2px 0 #76115e, 0 0 15px rgba(255, 255, 255, 0.7);
}

.setup-sheet__hint {
  margin-top: 17px;
  color: #8eeeff;
  font-size: 0.66rem;
  animation: setup-hint-bob 750ms ease-in-out infinite alternate;
}

.setup-sheet__scan {
  position: absolute;
  inset-inline: 10px;
  top: -12%;
  height: 3px;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 20px var(--setup-one), 0 0 42px var(--setup-two);
  opacity: 0;
  pointer-events: none;
}

.setup-overlay.is-visible .setup-sheet__scan {
  animation: victory-card-scan 1700ms cubic-bezier(.2, .65, .25, 1) 700ms 2 both;
}

.victory-overlay {
  --victory-color: var(--p1);
  --victory-rgb: var(--p1-rgb);
  --rival-color: var(--p2);
  --rival-rgb: var(--p2-rgb);
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--victory-rgb), 0.13), transparent 36%),
    rgba(2, 4, 17, 0.58);
  backdrop-filter: blur(2px) brightness(0.72) saturate(1.22);
  opacity: 0;
  transition: opacity 220ms ease;
}

.victory-overlay[data-winner="1"] {
  --victory-color: var(--p2);
  --victory-rgb: var(--p2-rgb);
  --rival-color: var(--p1);
  --rival-rgb: var(--p1-rgb);
}

.victory-overlay[hidden] {
  display: none !important;
}

.victory-overlay.is-visible {
  opacity: 1;
}

.victory-fx,
.victory-fx::before,
.victory-fx::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.victory-fx::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 18% 29%, rgba(var(--victory-rgb), 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 66%, rgba(var(--rival-rgb), 0.85) 0 2px, transparent 3px);
  background-size: 43px 43px, 71px 71px, 89px 89px;
  content: "";
  opacity: 0;
}

.victory-overlay.is-visible .victory-fx::before {
  animation: victory-starfield 1700ms ease-out 120ms both;
}

.victory-fx::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), rgba(var(--victory-rgb), 0.2) 18%, transparent 66%);
  content: "";
  opacity: 0;
  transform: scale(0.12);
}

.victory-overlay.is-visible .victory-fx::after {
  animation: victory-flash 720ms ease-out 180ms both;
}

.victory-laser {
  position: absolute;
  top: 50%;
  width: 4px;
  height: min(72vh, 680px);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-50%) scaleY(0);
  transform-origin: 50% 50%;
}

.victory-laser::after {
  position: absolute;
  inset: 0 -13px;
  background: inherit;
  filter: blur(13px);
  content: "";
  opacity: 0.75;
}

.victory-laser--one {
  left: calc(50% - min(46vw, 265px));
  color: var(--victory-color);
  background: linear-gradient(transparent, currentColor 14% 86%, transparent);
  box-shadow: 0 0 12px currentColor, 0 0 32px currentColor;
}

.victory-laser--two {
  right: calc(50% - min(46vw, 265px));
  color: var(--rival-color);
  background: linear-gradient(transparent, currentColor 14% 86%, transparent);
  box-shadow: 0 0 12px currentColor, 0 0 32px currentColor;
}

.victory-overlay.is-visible .victory-laser--one {
  animation: victory-laser-one 1100ms cubic-bezier(.16, .8, .3, 1) 60ms both;
}

.victory-overlay.is-visible .victory-laser--two {
  animation: victory-laser-two 1100ms cubic-bezier(.16, .8, .3, 1) 140ms both;
}

.victory-shard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(70px, 17vw, 125px);
  height: clamp(110px, 24vw, 180px);
  background: linear-gradient(145deg, rgba(var(--victory-rgb), 0.58), rgba(var(--rival-rgb), 0.1));
  clip-path: polygon(50% 0, 100% 100%, 15% 74%);
  opacity: 0;
  filter: drop-shadow(0 0 9px var(--victory-color));
  transform-origin: center bottom;
}

.victory-shard--one { transform: translate(-235%, -70%) rotate(-34deg); }
.victory-shard--two { transform: translate(135%, -78%) rotate(32deg); }
.victory-shard--three { transform: translate(-245%, -5%) rotate(-116deg); }
.victory-shard--four { transform: translate(145%, 0) rotate(118deg); }

.victory-overlay.is-visible .victory-shard {
  animation: victory-shard-impact 900ms cubic-bezier(.14, .82, .22, 1) 210ms both;
}

.victory-firework {
  position: absolute;
  width: clamp(130px, 31vw, 250px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 7deg, currentColor 0 1.4deg, transparent 1.6deg 14deg);
  -webkit-mask: radial-gradient(circle, transparent 0 17%, #000 18% 21%, transparent 23% 39%, #000 42% 45%, transparent 48%);
  mask: radial-gradient(circle, transparent 0 17%, #000 18% 21%, transparent 23% 39%, #000 42% 45%, transparent 48%);
  opacity: 0;
  filter: drop-shadow(0 0 7px currentColor);
  transform: scale(0.1) rotate(-20deg);
}

.victory-firework--one { top: 5%; left: -3%; color: var(--victory-color); }
.victory-firework--two { top: 11%; right: -5%; color: var(--rival-color); }
.victory-firework--three { right: 1%; bottom: 3%; color: #ffc83d; }
.victory-firework--four { bottom: 7%; left: -6%; color: #9d72ff; }

.victory-overlay.is-visible .victory-firework {
  animation: victory-firework-burst 900ms cubic-bezier(.12, .68, .24, 1) var(--burst-delay, 220ms) 2 both;
}

.victory-firework--two { --burst-delay: 380ms; }
.victory-firework--three { --burst-delay: 680ms; }
.victory-firework--four { --burst-delay: 820ms; }

.victory-shockwave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(76vw, 570px);
  aspect-ratio: 1;
  border: 3px solid var(--victory-color);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 18px var(--victory-color), inset 0 0 18px var(--victory-color);
  transform: translate(-50%, -50%) scale(0.15);
}

.victory-overlay.is-visible .victory-shockwave {
  animation: victory-shockwave 1000ms ease-out 130ms both;
}

.victory-confetti {
  position: absolute;
  top: -9%;
  left: var(--x);
  width: 9px;
  height: 22px;
  border-radius: 2px;
  background: var(--victory-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 0 9px currentColor;
  opacity: 0;
}

.victory-confetti:nth-of-type(3n) { background: var(--rival-color); }
.victory-confetti:nth-of-type(4n) { background: #ffd34d; }
.victory-confetti:nth-of-type(5n) { width: 18px; height: 8px; background: #a574ff; }

.victory-overlay.is-visible .victory-confetti {
  animation: victory-confetti-fall 2300ms cubic-bezier(.16, .55, .38, .93) var(--delay) both;
}

.victory-sheet {
  position: relative;
  z-index: 2;
  width: min(86vw, 440px);
  padding: clamp(22px, 4vh, 34px) clamp(22px, 6vw, 38px) clamp(23px, 4vh, 32px);
  overflow: hidden;
  border: 4px solid var(--victory-color);
  border-radius: 0;
  color: #fff;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255, 255, 255, 0.055) 50%, transparent 50.5%),
    linear-gradient(rgba(var(--victory-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--victory-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(var(--victory-rgb), 0.24), transparent 35%),
    linear-gradient(315deg, rgba(var(--rival-rgb), 0.2), transparent 38%),
    rgba(3, 7, 27, 0.97);
  background-size: auto, 18px 18px, 18px 18px, auto, auto, auto;
  box-shadow:
    0 0 0 3px rgba(3, 7, 27, 0.96),
    0 0 0 7px var(--rival-color),
    0 0 42px rgba(var(--victory-rgb), 0.68),
    0 30px 80px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  text-align: center;
  opacity: 0;
  transform: translateY(34px) scale(0.72) rotate(-2deg);
}

.victory-sheet::before,
.victory-sheet::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(var(--victory-rgb), 0.6);
  clip-path: inherit;
  content: "";
  pointer-events: none;
}

.victory-sheet::after {
  inset: 15px;
  border-color: rgba(var(--rival-rgb), 0.28);
}

.victory-overlay.is-visible .victory-sheet {
  animation: victory-sheet-slam 760ms cubic-bezier(.16, .9, .24, 1.22) 360ms both;
}

.victory-sheet__fighter {
  position: relative;
  z-index: 2;
  width: clamp(100px, 27vw, 126px);
  aspect-ratio: 1;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.26), transparent 46%),
    rgba(4, 9, 31, 0.98);
  box-shadow: 0 0 0 5px var(--victory-color), 0 0 34px var(--victory-color);
  font-size: clamp(4.3rem, 18vw, 6rem);
  line-height: 1;
}

.victory-sheet__crown {
  position: absolute;
  top: 3px;
  left: 50%;
  z-index: 3;
  color: #ffd84d;
  font-size: clamp(3.1rem, 12vw, 4.4rem);
  line-height: 1;
  text-shadow: 0 0 5px #fff3a3, 0 0 18px #ff9c2a;
  transform: translateX(-50%) rotate(-8deg) scale(0);
}

.victory-overlay.is-visible .victory-sheet__crown {
  animation: victory-crown-drop 640ms cubic-bezier(.15, .85, .24, 1.3) 820ms both;
}

.victory-sheet__kicker {
  margin: 0 0 5px;
  color: #ffd84d;
  font-size: clamp(0.7rem, 2.5vw, 0.84rem);
  font-weight: 950;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.victory-sheet h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.1rem, 14vw, 5.2rem);
  font-style: italic;
  letter-spacing: 0.015em;
  line-height: 0.79;
  text-transform: uppercase;
  text-shadow: 0 0 8px #fff, 0 0 28px var(--victory-color);
}

.victory-sheet h2 span {
  width: 100%;
  padding: 8px 12px 7px;
  display: block;
  overflow: hidden;
  color: #f7feff;
  background:
    linear-gradient(90deg, transparent, rgba(1, 8, 25, 0.92) 12% 88%, transparent),
    linear-gradient(90deg, transparent, rgba(var(--victory-rgb), 0.28) 22% 78%, transparent);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-size: 0.76em;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: 0.025em;
  line-height: 1;
  -webkit-text-stroke: 1.5px #020817;
  text-shadow:
    0 3px 0 #020817,
    0 0 4px #020817,
    0 0 12px var(--victory-color);
  text-overflow: clip;
  white-space: nowrap;
}

.victory-sheet h2 small {
  display: block;
  margin-top: 12px;
  color: #fff;
  font: inherit;
  font-size: 0.72em;
  letter-spacing: 0.06em;
  -webkit-text-stroke: 0;
}

.victory-sheet__button {
  width: 100%;
  min-height: 62px;
  padding: 0 22px;
  border: 1px solid #fff;
  border-radius: 17px;
  color: #03121c;
  background: linear-gradient(180deg, #60f5ff, #16cce8);
  font-family: var(--display);
  font-size: clamp(1.3rem, 5.4vw, 1.7rem);
  font-weight: 950;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  box-shadow: 0 7px 0 #087d9e, 0 0 26px rgba(35, 229, 255, 0.7);
  cursor: pointer;
  touch-action: manipulation;
  margin-top: clamp(20px, 4vh, 30px);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.victory-sheet__scan {
  position: absolute;
  inset-inline: 10px;
  top: -12%;
  z-index: 1;
  height: 3px;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 20px var(--victory-color), 0 0 42px var(--victory-color);
  opacity: 0;
  pointer-events: none;
}

.victory-overlay.is-visible .victory-sheet__scan {
  animation: victory-card-scan 1700ms cubic-bezier(.2, .65, .25, 1) 920ms 2 both;
}

.victory-sheet__button span { margin-right: 7px; }

.victory-sheet__button:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #087d9e, 0 0 18px rgba(35, 229, 255, 0.58);
}

.board[data-winner="0"] {
  --win-color: var(--p1);
  --win-rgb: var(--p1-rgb);
}

.board[data-winner="1"] {
  --win-color: var(--p2);
  --win-rgb: var(--p2-rgb);
}

.board.has-winner {
  animation: board-celebrate 720ms cubic-bezier(0.16, 0.82, 0.3, 1);
}

.board.has-winner::after {
  position: absolute;
  inset: -4px;
  z-index: 3;
  border: 3px solid var(--win-color);
  border-radius: inherit;
  content: "";
  pointer-events: none;
  animation: victory-frame 1s ease-out infinite;
}

.cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--small-radius);
  color: var(--ink);
  background: var(--cell);
  font-size: clamp(2rem, 11vw, 4.25rem);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.cell:not(:disabled):hover {
  border-color: var(--accent);
  background: var(--panel-soft);
  transform: translateY(-2px);
}

.cell:disabled {
  opacity: 1;
  cursor: default;
}

.cell.is-filled {
  animation: claim-square 220ms cubic-bezier(0.17, 0.88, 0.34, 1.4);
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.38));
}

.cell[data-owner="0"] {
  border-color: rgba(var(--p1-rgb), 0.65);
  background: rgba(var(--p1-rgb), 0.08);
}

.cell[data-owner="1"] {
  border-color: rgba(var(--p2-rgb), 0.65);
  background: rgba(var(--p2-rgb), 0.08);
}

.cell.is-winning {
  z-index: 2;
  border-color: #fff;
  animation: victory-pulse 850ms ease-in-out infinite alternate;
}

.cell.is-bullet-hit {
  z-index: 5;
  animation: bullet-cell-hit 620ms ease-out both;
}

.win-connection {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.win-connection[hidden] {
  display: none;
}

.win-connection__glow,
.win-connection__core {
  fill: none;
  stroke: var(--win-color);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.win-connection__glow {
  stroke-width: 18px;
  filter: blur(8px);
}

.win-connection__core {
  stroke-width: 6px;
  filter: drop-shadow(0 0 5px var(--win-color)) drop-shadow(0 0 12px var(--win-color));
}

.win-connection__nodes circle {
  fill: rgba(var(--win-rgb), 0.08);
  stroke: var(--win-color);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  filter: drop-shadow(0 0 8px var(--win-color));
  transform-box: fill-box;
  transform-origin: center;
}

.win-connection.is-visible .win-connection__glow,
.win-connection.is-visible .win-connection__core {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-win-line 560ms cubic-bezier(0.16, 0.85, 0.3, 1) forwards;
}

.win-connection.is-visible .win-connection__glow {
  animation-delay: 50ms;
}

.win-connection.is-visible .win-connection__nodes circle {
  animation: win-node-pop 480ms cubic-bezier(0.17, 0.88, 0.34, 1.35) forwards;
}

.win-connection.is-visible .win-connection__nodes circle:nth-child(1) { animation-delay: 80ms; }
.win-connection.is-visible .win-connection__nodes circle:nth-child(2) { animation-delay: 190ms; }
.win-connection.is-visible .win-connection__nodes circle:nth-child(3) { animation-delay: 300ms; }
.win-connection.is-visible .win-connection__nodes circle:nth-child(4) { animation-delay: 410ms; }

.claim-effect {
  position: absolute;
  z-index: 6;
  width: var(--claim-size);
  height: var(--claim-size);
  color: var(--p1);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: claim-effect-life 720ms linear forwards;
}

.claim-effect--player-2 {
  color: var(--p2);
}

.claim-effect__ring {
  position: absolute;
  inset: 12%;
  border: 3px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor, inset 0 0 8px currentColor;
  animation: claim-ring 540ms ease-out forwards;
}

.claim-effect__spark {
  --angle: calc(var(--spark) * 45deg);
  position: absolute;
  top: 50%;
  left: calc(50% - 2px);
  width: 4px;
  height: 18%;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  transform: rotate(var(--angle)) translateY(calc(var(--claim-size) * -0.34)) scaleY(0.25);
  transform-origin: 2px 0;
  animation: claim-spark 520ms cubic-bezier(0.17, 0.7, 0.3, 1) forwards;
}

.actions {
  margin-top: clamp(9px, 1.8vh, 15px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 9px;
}

.action-button,
.text-button,
.icon-button,
.fighter-option {
  cursor: pointer;
  touch-action: manipulation;
}

.action-button {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid currentColor;
  border-radius: var(--small-radius);
  font-family: var(--display);
  font-size: clamp(0.96rem, 3.6vw, 1.22rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}

.action-button span {
  margin-right: 6px;
  font-family: system-ui, sans-serif;
}

.action-button--primary {
  color: #02141b;
  background: var(--p1);
}

.action-button--secondary {
  color: #210015;
  background: var(--p2);
}

.action-button:active,
.fighter-option:active {
  transform: translateY(2px);
}

.fighter-dialog {
  width: min(calc(100% - 24px), 720px);
  max-height: min(92svh, 820px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
}

.fighter-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.fighter-dialog__panel {
  padding: clamp(16px, 4vw, 26px);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 1.8rem;
  line-height: 1;
}

.player-settings {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.player-settings fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--small-radius);
  background: var(--panel-soft);
}

.player-settings legend {
  padding: 0 7px;
  color: var(--p1);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player-settings fieldset:nth-child(2) legend {
  color: var(--p2);
}

.player-settings label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.player-settings input {
  width: 100%;
  height: 45px;
  margin: 5px 0 12px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--cell);
  font-size: 1rem;
  font-weight: 800;
}

.fighter-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.fighter-option {
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--cell);
  font-size: clamp(1.35rem, 5.5vw, 2.15rem);
}

.fighter-option.is-selected {
  border-color: var(--accent);
  background: rgba(var(--p1-rgb), 0.12);
  box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(var(--p1-rgb), 0.2);
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-actions .action-button {
  min-width: 180px;
}

.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cozy tabletop theme */
body[data-theme="cozy"] {
  color-scheme: light;
  --page: #6f3f20;
  --page-accent: #9c5f2b;
  --ink: #402713;
  --muted: #78583a;
  --panel: rgba(255, 242, 210, 0.96);
  --panel-soft: #f4dfae;
  --line: #a76f38;
  --p1: #247765;
  --p1-rgb: 36, 119, 101;
  --p2: #c64b2f;
  --p2-rgb: 198, 75, 47;
  --accent: #e6a51f;
  --cell: #f8e8be;
  --shadow: 0 10px 0 rgba(73, 38, 16, 0.24), 0 18px 35px rgba(60, 26, 8, 0.2);
  --radius: 25px;
  --small-radius: 15px;
  --display: Georgia, "Times New Roman", serif;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 220, 145, 0.08) 0 2px, transparent 3px),
    repeating-linear-gradient(4deg, rgba(61, 28, 7, 0.08) 0 1px, transparent 1px 8px),
    linear-gradient(110deg, var(--page), #8c5428 45%, var(--page));
  background-size: 26px 26px, auto, auto;
}

body[data-theme="cozy"] .game-header h1 {
  font-style: normal;
  filter: drop-shadow(0 4px 0 rgba(59, 31, 13, 0.24));
}

body[data-theme="cozy"] .game-header h1 span {
  color: var(--p1);
}

body[data-theme="cozy"] .game-header h1 strong {
  color: var(--p2);
  text-shadow: none;
}

body[data-theme="cozy"] .theme-picker,
body[data-theme="cozy"] .player-card,
body[data-theme="cozy"] .battle-panel,
body[data-theme="cozy"] .fighter-dialog {
  outline: 1px dashed rgba(117, 70, 30, 0.55);
  outline-offset: -6px;
}

body[data-theme="cozy"] .fighter-badge {
  border-style: dashed;
  background: #fff3d3;
}

body[data-theme="cozy"] .draw-overlay {
  background: rgba(65, 32, 13, 0.52);
  backdrop-filter: blur(2px);
}

body[data-theme="cozy"] .draw-sheet {
  border-color: #8b592c;
  border-style: dashed;
  color: #39210f;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 248, 214, 0.9), transparent 42%),
    #f3d99f;
  box-shadow: 0 -8px 0 rgba(70, 34, 12, 0.22), 0 -18px 38px rgba(51, 24, 8, 0.3), inset 0 0 0 6px rgba(131, 76, 29, 0.08);
}

body[data-theme="cozy"] .draw-sheet__handle {
  background: #a46f39;
  box-shadow: none;
}

body[data-theme="cozy"] .draw-sheet__kicker,
body[data-theme="cozy"] .draw-sheet > p:last-of-type {
  color: #68401f;
}

body[data-theme="cozy"] .draw-sheet h2 {
  color: var(--p2);
  font-style: normal;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="cozy"] .draw-sheet__button {
  border-color: #17594c;
  color: #fff9e9;
  background: linear-gradient(#2f8b75, #247765);
  box-shadow: 0 6px 0 #174e43, 0 9px 18px rgba(70, 36, 13, 0.25);
}

body[data-theme="cozy"] .victory-overlay {
  background: radial-gradient(circle, rgba(var(--victory-rgb), 0.18), transparent 42%), rgba(45, 20, 8, 0.6);
  backdrop-filter: blur(2px) brightness(0.72) saturate(1.18);
}

body[data-theme="cozy"] .victory-sheet {
  border-color: var(--victory-color);
  border-style: solid;
  color: #fff;
  background:
    linear-gradient(rgba(var(--victory-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--victory-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(var(--victory-rgb), 0.24), transparent 38%),
    linear-gradient(315deg, rgba(var(--rival-rgb), 0.18), transparent 40%),
    rgba(34, 15, 7, 0.97);
  background-size: 18px 18px, 18px 18px, auto, auto, auto;
  box-shadow: 0 0 0 3px #211006, 0 0 0 7px var(--rival-color), 0 0 38px rgba(var(--victory-rgb), 0.58), 0 28px 52px rgba(34, 14, 4, 0.62);
}

body[data-theme="cozy"] .victory-sheet__fighter {
  border-color: #fff4d1;
  background: #241008;
  box-shadow: 0 0 0 5px var(--victory-color), 0 0 28px var(--victory-color);
}

body[data-theme="cozy"] .victory-sheet h2 {
  font-style: normal;
  text-shadow: 0 0 7px #fff8db, 0 0 22px var(--victory-color);
}

body[data-theme="cozy"] .victory-sheet h2 small { color: #fff8e5; }

body[data-theme="cozy"] .victory-sheet__kicker { color: #ffd35a; }

body[data-theme="cozy"] .victory-sheet__button {
  border-color: #17594c;
  color: #fff9e9;
  background: linear-gradient(#2f8b75, #247765);
  box-shadow: 0 7px 0 #174e43, 0 10px 20px rgba(70, 36, 13, 0.26);
}

body[data-theme="cozy"] .random-bullet-power,
body[data-theme="cozy"] .jumble-power,
body[data-theme="cozy"] .tornado-power {
  border-style: dashed;
  background: #fff3d3;
}

body[data-theme="cozy"] .random-bullet-projectile {
  filter: drop-shadow(0 0 9px #f2aa1b) drop-shadow(0 7px 4px rgba(76, 36, 9, 0.66));
}

body[data-theme="cozy"] .versus {
  color: #fff7e2;
  background: #e3a11c;
  box-shadow: 0 4px 0 rgba(91, 49, 11, 0.24);
}

body[data-theme="cozy"] .board {
  border-color: #815129;
  background: #8a532c;
  box-shadow: inset 0 0 0 3px rgba(255, 227, 167, 0.18), 0 8px 0 rgba(69, 35, 13, 0.24);
}

body[data-theme="cozy"] .cell {
  box-shadow: inset 0 -4px 0 rgba(128, 77, 31, 0.13), 0 2px 2px rgba(52, 26, 8, 0.24);
}

body[data-theme="cozy"] .cell[data-owner="0"],
body[data-theme="cozy"] .cell[data-owner="1"] {
  background: #f8e8be;
}

body[data-theme="cozy"] .win-connection__core {
  stroke-width: 7px;
  filter: drop-shadow(0 2px 1px rgba(90, 44, 10, 0.6)) drop-shadow(0 0 8px var(--win-color));
}

body[data-theme="cozy"] .claim-effect__spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

body[data-theme="cozy"] .action-button--primary {
  color: #fff8e9;
}

body[data-theme="cozy"] .action-button--secondary {
  color: #fff8e9;
  background: #df9f20;
}

/* Retro arcade theme */
body[data-theme="arcade"] {
  --page: #06030f;
  --page-accent: #120626;
  --ink: #fbf7ff;
  --muted: #9d8eb5;
  --panel: rgba(5, 3, 14, 0.94);
  --panel-soft: #110a20;
  --line: #5620a1;
  --p1: #bafc00;
  --p1-rgb: 186, 252, 0;
  --p2: #ff2ba6;
  --p2-rgb: 255, 43, 166;
  --accent: #7c32e8;
  --cell: #07040e;
  --shadow: 8px 8px 0 rgba(36, 8, 77, 0.8);
  --radius: 5px;
  --small-radius: 3px;
  --display: "Courier New", ui-monospace, monospace;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 12% 40%, rgba(var(--p1-rgb), 0.12), transparent 28%),
    radial-gradient(circle at 90% 50%, rgba(var(--p2-rgb), 0.13), transparent 30%),
    linear-gradient(var(--page), var(--page));
  background-size: auto;
}

body[data-theme="arcade"] .game-header h1 {
  font-style: normal;
  letter-spacing: -0.08em;
  filter: drop-shadow(4px 4px 0 #421080);
}

body[data-theme="arcade"] .game-header h1 span {
  color: var(--p1);
}

body[data-theme="arcade"] .game-header h1 strong {
  color: #19d8ff;
  text-shadow: 3px 0 0 var(--p2);
}

body[data-theme="arcade"] .theme-picker,
body[data-theme="arcade"] .player-card,
body[data-theme="arcade"] .battle-panel,
body[data-theme="arcade"] .fighter-dialog {
  border-width: 3px;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

body[data-theme="arcade"] .fighter-badge,
body[data-theme="arcade"] .versus {
  border-radius: 3px;
}

body[data-theme="arcade"] .draw-overlay {
  background: rgba(3, 1, 9, 0.72);
  backdrop-filter: none;
}

body[data-theme="arcade"] .draw-sheet {
  border-width: 4px;
  border-color: var(--accent);
  border-radius: 3px;
  background: #080313;
  box-shadow: 8px -8px 0 #21083c, 0 0 28px rgba(124, 50, 232, 0.56);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

body[data-theme="arcade"] .draw-sheet__handle,
body[data-theme="arcade"] .draw-sheet__button {
  border-radius: 1px;
}

body[data-theme="arcade"] .draw-sheet h2 {
  color: #19d8ff;
  font-style: normal;
  text-shadow: 4px 0 0 var(--p2), 0 0 15px #19d8ff;
}

body[data-theme="arcade"] .draw-sheet__button {
  border-width: 3px;
  background: var(--p1);
  box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.3), 6px 6px 0 #421080;
}

body[data-theme="arcade"] .victory-overlay {
  background: rgba(3, 1, 9, 0.82);
  backdrop-filter: none;
}

body[data-theme="arcade"] .victory-sheet {
  border-width: 4px;
  border-radius: 3px;
  background: #080313;
  box-shadow: 8px 8px 0 #21083c, 0 0 36px rgba(var(--victory-rgb), 0.6);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

body[data-theme="arcade"] .victory-sheet__fighter,
body[data-theme="arcade"] .victory-sheet__button {
  border-radius: 2px;
}

body[data-theme="arcade"] .victory-sheet__fighter {
  border-radius: 50%;
}

body[data-theme="arcade"] .victory-sheet h2 {
  font-style: normal;
  text-shadow: 4px 0 0 var(--rival-color), 0 0 16px var(--victory-color);
}

body[data-theme="arcade"] .victory-sheet__button {
  border-width: 3px;
  background: var(--p1);
  box-shadow: inset -6px -6px 0 rgba(0, 0, 0, 0.3), 7px 7px 0 #421080;
}

body[data-theme="arcade"] .random-bullet-power,
body[data-theme="arcade"] .jumble-power,
body[data-theme="arcade"] .tornado-power,
body[data-theme="arcade"] .random-bullet-icon__body,
body[data-theme="arcade"] .random-bullet-explosion {
  border-radius: 2px;
}

body[data-theme="arcade"] .random-bullet-projectile {
  image-rendering: pixelated;
  filter: drop-shadow(5px 5px 0 #421080) drop-shadow(0 0 8px var(--bullet-energy));
}

body[data-theme="arcade"] .board {
  border-width: 4px;
  box-shadow: 6px 6px 0 #21083c, inset 0 0 28px rgba(87, 30, 155, 0.35);
}

body[data-theme="arcade"] .cell {
  border-width: 2px;
  image-rendering: pixelated;
}

body[data-theme="arcade"] .win-connection__core,
body[data-theme="arcade"] .win-connection__glow {
  stroke-linecap: square;
}

body[data-theme="arcade"] .claim-effect__ring,
body[data-theme="arcade"] .claim-effect__spark {
  border-radius: 0;
}

body[data-theme="arcade"] .action-button {
  border-width: 3px;
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.3), 5px 5px 0 #291047;
}

@keyframes claim-square {
  from { transform: scale(0.55) rotate(-8deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes draw-sheet-enter {
  0% { opacity: 0; transform: translateY(calc(100% + 28px)) scale(.97); }
  68% { opacity: 1; transform: translateY(-8px) scale(1.008); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes draw-emblem-glow {
  from { opacity: 0.65; transform: scale(.86); }
  to { opacity: 1; transform: scale(1.12); }
}

@keyframes draw-star {
  from { opacity: 0.35; transform: scale(.6) rotate(0); }
  to { opacity: 1; transform: scale(1.35) rotate(45deg); }
}

@keyframes victory-starfield {
  0% { opacity: 0; transform: scale(0.82); }
  35% { opacity: 0.9; }
  100% { opacity: 0.36; transform: scale(1.1); }
}

@keyframes victory-flash {
  0% { opacity: 0; transform: scale(0.12); }
  28% { opacity: 0.9; }
  100% { opacity: 0; transform: scale(1.22); }
}

@keyframes victory-laser-one {
  0% { opacity: 0; transform: translateY(-50%) scaleY(0); }
  36% { opacity: 1; transform: translateY(-50%) scaleY(1); }
  72% { opacity: 0.95; transform: translateY(-50%) scaleY(1); }
  100% { opacity: 0.42; transform: translateY(-50%) scaleY(1); }
}

@keyframes victory-laser-two {
  0% { opacity: 0; transform: translateY(-50%) scaleY(0); }
  36% { opacity: 1; transform: translateY(-50%) scaleY(1); }
  72% { opacity: 0.95; transform: translateY(-50%) scaleY(1); }
  100% { opacity: 0.42; transform: translateY(-50%) scaleY(1); }
}

@keyframes victory-shard-impact {
  0% { opacity: 0; scale: 0.2; }
  42% { opacity: 0.9; scale: 1.08; }
  100% { opacity: 0.28; scale: 1; }
}

@keyframes victory-card-scan {
  0% { top: -12%; opacity: 0; }
  10% { opacity: 0.95; }
  88% { opacity: 0.8; }
  100% { top: 112%; opacity: 0; }
}

@keyframes victory-firework-burst {
  0% { opacity: 0; transform: scale(0.08) rotate(-24deg); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.18) rotate(12deg); }
}

@keyframes victory-shockwave {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
  20% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.85); }
}

@keyframes victory-confetti-fall {
  0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(0deg); }
  10% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 114vh, 0) rotate(var(--spin)); }
}

@keyframes victory-sheet-slam {
  0% { opacity: 0; transform: translateY(34px) scale(0.72) rotate(-2deg); filter: brightness(2); }
  62% { opacity: 1; transform: translateY(-7px) scale(1.035) rotate(0.5deg); filter: brightness(1.28); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: brightness(1); }
}

@keyframes victory-crown-drop {
  0% { opacity: 0; transform: translate(-50%, -54px) rotate(-24deg) scale(1.5); }
  64% { opacity: 1; transform: translate(-50%, 5px) rotate(5deg) scale(0.92); }
  100% { opacity: 1; transform: translateX(-50%) rotate(-8deg) scale(1); }
}

@keyframes setup-fighters-pulse {
  from { filter: brightness(0.92); box-shadow: 0 7px 0 #76115e, 0 0 12px rgba(255, 255, 255, 0.55), 0 0 24px rgba(var(--p2-rgb), 0.52); }
  to { filter: brightness(1.18); box-shadow: 0 7px 0 #76115e, 0 0 30px #fff, 0 0 58px rgba(var(--p2-rgb), 0.95); }
}

@keyframes setup-hint-bob {
  from { transform: translateY(2px); opacity: 0.68; }
  to { transform: translateY(-3px); opacity: 1; }
}

@keyframes bullet-ready {
  from { filter: brightness(1); box-shadow: 0 0 8px var(--bullet-energy); }
  to { filter: brightness(1.28); box-shadow: 0 0 22px var(--bullet-energy); }
}

@keyframes jumble-ready {
  from { filter: brightness(1); box-shadow: 0 0 8px #7b4cff; }
  to { filter: brightness(1.3); box-shadow: 0 0 23px #e653ff; }
}

@keyframes tornado-ready {
  from { filter: brightness(1); box-shadow: 0 0 8px #55dff4; }
  to { filter: brightness(1.35); box-shadow: 0 0 24px #8af5ff; }
}

@keyframes tornado-board-buffet {
  from { transform: translateX(-2px) rotate(-0.12deg); }
  to { transform: translateX(2px) rotate(0.12deg); }
}

@keyframes tornado-column-breathe {
  from {
    box-shadow: inset 0 0 10px rgba(199, 249, 255, 0.16), 0 0 5px rgba(229, 253, 255, 0.34);
    filter: brightness(0.96);
  }
  to {
    box-shadow: inset 0 0 20px rgba(207, 250, 255, 0.38), 0 0 15px rgba(234, 254, 255, 0.88);
    filter: brightness(1.16);
  }
}

@keyframes tornado-emoji-spin {
  from { transform: rotate(-7deg) scaleX(1); }
  50% { transform: rotate(7deg) scaleX(0.92); }
  to { transform: rotate(-7deg) scaleX(1); }
}

@keyframes tornado-wind-ring {
  from { transform: rotate(0deg) scaleX(0.82); opacity: 0.28; }
  50% { opacity: 1; }
  to { transform: rotate(360deg) scaleX(1.08); opacity: 0.28; }
}

@keyframes tornado-sweep {
  0% {
    left: var(--tornado-start-x);
    top: var(--tornado-start-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.28) rotate(-18deg);
  }
  8% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.72) rotate(8deg);
  }
  24% {
    left: var(--tornado-column-x);
    top: var(--tornado-approach-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04) rotate(-5deg);
  }
  82% {
    left: var(--tornado-column-x);
    top: var(--tornado-board-exit-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.26) rotate(7deg);
    filter: drop-shadow(0 0 13px #fff) drop-shadow(0 0 34px #5cecff) drop-shadow(0 15px 9px rgba(0, 0, 0, 0.5));
  }
  100% {
    left: var(--tornado-column-x);
    top: var(--tornado-screen-exit-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5) rotate(-9deg);
  }
}

@keyframes tornado-cell-impact {
  0% { filter: brightness(1); box-shadow: inset 0 0 10px rgba(111, 238, 255, 0.16); }
  42% { filter: brightness(2.4); box-shadow: inset 0 0 28px rgba(215, 253, 255, 0.72), 0 0 16px #8cf4ff; }
  100% { filter: brightness(1); box-shadow: inset 0 0 10px rgba(111, 238, 255, 0.16); }
}

@keyframes tornado-piece-flight {
  0% {
    left: var(--tornado-piece-start-x);
    top: var(--tornado-piece-start-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  9% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(var(--tornado-piece-spin-08));
  }
  32% {
    left: var(--tornado-piece-orbit-one-x);
    top: var(--tornado-piece-orbit-one-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.22) rotate(var(--tornado-piece-spin-36));
  }
  58% {
    left: var(--tornado-piece-orbit-two-x);
    top: var(--tornado-piece-orbit-two-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.42) rotate(var(--tornado-piece-spin-70));
    filter: brightness(1.45) drop-shadow(0 0 22px #a9f8ff);
  }
  100% {
    left: var(--tornado-piece-target-x);
    top: var(--tornado-piece-target-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--tornado-piece-scale)) rotate(var(--tornado-piece-spin));
    filter: brightness(1.8) blur(1.5px) drop-shadow(0 0 26px #fff);
  }
}

@keyframes tornado-piece-reduced {
  0% {
    left: var(--tornado-piece-start-x);
    top: var(--tornado-piece-start-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    left: var(--tornado-piece-target-x);
    top: var(--tornado-piece-target-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.65) rotate(160deg);
  }
}

@keyframes power-slot-receive {
  0% { transform: scale(0.72); filter: brightness(2.2); }
  55% { transform: scale(1.22) rotate(5deg); filter: brightness(1.55); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes power-pickup-reveal {
  0% {
    left: var(--pickup-start-x);
    top: var(--pickup-start-y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(.16) rotate(-25deg);
    filter: brightness(2.8);
  }
  14% {
    left: var(--pickup-start-x);
    top: var(--pickup-lift-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(.72) rotate(0deg);
  }
  48% {
    left: var(--pickup-center-x);
    top: var(--pickup-center-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.55) rotate(18deg);
    filter: brightness(1.65) drop-shadow(0 0 24px #bd61ff);
  }
  62% {
    left: var(--pickup-center-x);
    top: var(--pickup-center-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.25) rotate(-8deg);
  }
  100% {
    left: var(--pickup-target-x);
    top: var(--pickup-target-y);
    opacity: 1;
    transform: translate(-50%, -50%) scale(.42) rotate(355deg);
    filter: brightness(1.15);
  }
}

@keyframes jumble-board-charge {
  0% { transform: scale(1); }
  18% { transform: scale(1.012) rotate(-0.35deg); }
  42% { transform: scale(1.022) rotate(0.45deg); }
  72% { transform: scale(1.01) rotate(-0.22deg); }
  100% { transform: scale(1); }
}

@keyframes jumble-vortex-spin {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.18) rotate(0deg); }
  20% { opacity: 0.95; }
  78% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.08) rotate(620deg); }
}

@keyframes jumble-piece-aura {
  0% { opacity: 0; transform: scale(0.4); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes jumble-piece-flight {
  0% {
    left: var(--jumble-source-x);
    top: var(--jumble-source-y);
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  18% {
    left: var(--jumble-source-x);
    top: var(--jumble-lift-y);
    transform: translate(-50%, -50%) scale(1.2) rotate(var(--jumble-spin-05));
    filter: brightness(1.5) drop-shadow(0 0 18px #69edff);
  }
  42% {
    left: var(--jumble-orbit-one-x);
    top: var(--jumble-orbit-one-y);
    transform: translate(-50%, -50%) scale(1.28) rotate(var(--jumble-spin-42));
  }
  68% {
    left: var(--jumble-orbit-two-x);
    top: var(--jumble-orbit-two-y);
    transform: translate(-50%, -50%) scale(1.18) rotate(var(--jumble-spin-76));
    filter: brightness(1.35) drop-shadow(0 0 22px #ed52ff);
  }
  88% {
    left: var(--jumble-target-x);
    top: var(--jumble-target-hover-y);
    transform: translate(-50%, -50%) scale(1.12) rotate(var(--jumble-spin-94));
  }
  100% {
    left: var(--jumble-target-x);
    top: var(--jumble-target-y);
    transform: translate(-50%, -50%) scale(1) rotate(var(--jumble-spin));
    filter: brightness(1) drop-shadow(0 7px 5px rgba(0, 0, 0, .5));
  }
}

@keyframes jumble-piece-reduced {
  0% {
    opacity: 0.45;
    transform: translate3d(var(--jumble-source-x), var(--jumble-source-y), 0) translate(-50%, -50%) scale(.9);
  }
  38% {
    opacity: 1;
    transform: translate3d(var(--jumble-source-x), var(--jumble-lift-y), 0) translate(-50%, -50%) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translate3d(var(--jumble-target-x), var(--jumble-target-y), 0) translate(-50%, -50%) scale(1);
  }
}

@keyframes bullet-collected {
  0% { opacity: 0; transform: scale(0.15) rotate(-18deg); filter: brightness(2.4); }
  24% { opacity: 1; transform: scale(3.6) rotate(-8deg); filter: brightness(2.1); box-shadow: 0 0 38px var(--bullet-energy); }
  56% { transform: scale(2.2) rotate(4deg); filter: brightness(1.45); }
  78% { transform: scale(1.18) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes random-bullet-boom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.12) rotate(-12deg); }
  24% { opacity: 1; transform: translate(-50%, -50%) scale(1.34) rotate(7deg); }
  56% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.72) rotate(16deg); }
}

@keyframes bullet-cell-hit {
  0% { transform: scale(1); filter: brightness(1); }
  28% { transform: scale(0.8) rotate(-4deg); filter: brightness(3); }
  62% { transform: scale(1.07) rotate(3deg); filter: brightness(1.7); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes victory-pulse {
  from { transform: scale(1); box-shadow: 0 0 7px rgba(255, 255, 255, 0.35); }
  to { transform: scale(1.045); box-shadow: 0 0 26px var(--win-color); }
}

@keyframes draw-win-line {
  0% { stroke-dashoffset: 1; opacity: 0; }
  15% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes win-node-pop {
  0% { opacity: 0; transform: scale(0.25); }
  65% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes board-celebrate {
  0% { transform: scale(1); }
  38% { transform: scale(1.025) rotate(-0.45deg); }
  68% { transform: scale(1.015) rotate(0.35deg); }
  100% { transform: scale(1); }
}

@keyframes victory-frame {
  0% { opacity: 0.95; transform: scale(1); box-shadow: 0 0 14px var(--win-color); }
  100% { opacity: 0; transform: scale(1.035); box-shadow: 0 0 34px var(--win-color); }
}

@keyframes claim-ring {
  0% { opacity: 1; transform: scale(0.25); }
  100% { opacity: 0; transform: scale(1.35); }
}

@keyframes claim-spark {
  0% { opacity: 1; transform: rotate(var(--angle)) translateY(calc(var(--claim-size) * -0.24)) scaleY(0.3); }
  75% { opacity: 0.85; }
  100% { opacity: 0; transform: rotate(var(--angle)) translateY(calc(var(--claim-size) * -0.57)) scaleY(1); }
}

@keyframes claim-effect-life {
  0%, 92% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 560px) {
  .app-shell {
    gap: clamp(9px, 1.35vh, 13px);
  }

  .game-header h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .player-card {
    min-height: 168px;
    padding: 12px 9px 76px;
    align-items: flex-start;
    gap: 8px;
  }

  .player-card__copy strong {
    font-size: clamp(1rem, 5vw, 1.3rem);
  }

  .player-name-row {
    gap: 4px;
  }

  .power-up-tray {
    position: absolute;
    right: 8px;
    bottom: 10px;
    left: 8px;
    width: auto;
    min-width: 0;
    min-height: 56px;
    margin: 0;
    padding: 7px 8px 5px;
    gap: 5px;
  }

  .player-card--one .power-up-tray {
    justify-content: flex-start;
  }

  .player-card--two .power-up-tray {
    justify-content: flex-start;
  }

  .random-bullet-power {
    width: 44px;
    height: 44px;
  }

  .jumble-power,
  .tornado-power {
    width: 44px;
    height: 44px;
  }

  .random-bullet-icon {
    width: 35px;
    height: 22px;
  }

  .fighter-badge {
    width: clamp(52px, 14vw, 61px);
  }

  .versus {
    width: 37px;
    height: 37px;
    margin: 0 -6px;
    font-size: 0.88rem;
  }

  .battle-panel {
    flex: 1 1 auto;
    min-height: 0;
    padding: 9px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .status-wrap {
    min-height: 47px;
  }

  .board {
    width: min(100%, 54vh);
    min-width: 0;
    margin-block: auto;
  }

  .actions {
    flex: 0 0 auto;
  }

  .player-settings {
    grid-template-columns: 1fr;
  }

  .fighter-dialog__panel {
    max-height: 90svh;
    overflow-y: auto;
  }

  .fighter-options {
    grid-template-columns: repeat(6, 1fr);
  }

  .fighter-option {
    font-size: clamp(1.25rem, 7vw, 1.9rem);
  }
}

@media (max-width: 390px) {
  .wins__label,
  .player-label {
    display: none;
  }

  .fighter-badge {
    width: 48px;
    font-size: 1.9rem;
  }

  .player-card {
    min-height: 160px;
    padding: 10px 7px 72px;
    gap: 6px;
    align-items: flex-start;
  }

  .player-card .fighter-badge {
    position: static;
  }

  .player-card--two .fighter-badge {
    position: static;
  }

  .player-card__copy {
    width: 100%;
    padding-left: 0;
  }

  .player-card--two .player-card__copy {
    padding-right: 0;
    padding-left: 0;
  }

  .player-card--one .power-up-tray,
  .player-card--two .power-up-tray {
    right: 6px;
    bottom: 9px;
    left: 6px;
    width: auto;
    margin: 0;
  }

  .turn-badge {
    padding: 3px 6px;
    font-size: 0.5rem;
  }

  .draw-overlay {
    padding-inline: 7px;
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }

  .draw-sheet {
    padding: 10px 17px 20px;
    border-radius: 27px;
  }

  .draw-sheet__emblem {
    width: 112px;
    height: 82px;
    font-size: 3.9rem;
  }

  .draw-sheet > p:last-of-type {
    margin-block: 7px 14px;
  }

  .victory-sheet {
    width: min(88vw, 430px);
    padding: 20px 18px 22px;
    border-radius: 0;
  }

  .victory-sheet__crown {
    top: 1px;
  }

}

@media (max-width: 560px) and (max-height: 820px) {
  .app-shell {
    gap: 5px;
  }

  .game-header .sound-toggle {
    min-height: 40px;
    width: 40px;
    height: 40px;
  }

  .game-header__eyebrow {
    display: none;
  }

  .game-header h1 {
    font-size: clamp(2rem, 10vw, 2.3rem);
  }

  .player-card {
    min-height: 142px;
    padding-bottom: 64px;
  }

  .power-up-tray {
    bottom: 8px;
    min-height: 50px;
    margin: 0;
    padding-block: 3px;
  }

  .battle-panel {
    padding: 7px;
  }

  .status-wrap {
    min-height: 42px;
  }
}

@media (max-width: 560px) and (max-height: 720px) {
  .app-shell {
    gap: 6px;
    padding-top: max(7px, env(safe-area-inset-top));
  }

  .game-header__eyebrow {
    display: none;
  }

  .game-header h1 {
    font-size: clamp(1.95rem, 9.5vw, 2.15rem);
  }

  .player-card {
    min-height: 132px;
    padding-bottom: 58px;
  }

  .fighter-badge {
    width: 44px;
    font-size: 1.75rem;
  }

  .battle-panel {
    padding: 7px;
  }

  .status-wrap {
    min-height: 42px;
  }

  .status-wrap h2 {
    margin-bottom: 6px;
    font-size: 1.1rem;
  }

  .board {
    width: min(100%, 46vh);
  }

  .actions {
    margin-top: 7px;
  }

  .action-button {
    min-height: 46px;
  }
}

@media (max-height: 760px) {
  .app-shell {
    gap: 5px;
    padding-top: max(6px, env(safe-area-inset-top));
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .game-header .sound-toggle {
    min-height: 38px;
    width: 38px;
    height: 38px;
  }

  .game-header__eyebrow,
  .player-label {
    display: none;
  }

  .game-header h1 {
    font-size: clamp(1.95rem, 9.5vw, 2.15rem);
  }

  .player-card {
    min-height: 132px;
    padding-bottom: 58px;
    padding-block: 7px;
    padding-bottom: 58px;
  }

  .fighter-badge {
    width: 48px;
    font-size: 1.9rem;
  }

  .power-up-tray {
    min-height: 46px;
    margin: 0;
    padding-block: 3px;
  }

  .battle-panel {
    margin-top: 0;
    padding: 6px;
  }

  .status-wrap {
    min-height: 39px;
  }

  .status-kicker {
    margin-bottom: 1px;
  }

  .status-wrap h2 {
    margin-bottom: 4px;
    font-size: 1.05rem;
  }

  .board {
    width: min(100%, 43dvh);
    min-width: 0;
    padding: 6px;
    gap: 5px;
  }

  .actions {
    margin-top: 6px;
  }

  .action-button {
    min-height: 44px;
  }
}

@media (max-height: 550px) {
  .app-shell {
    gap: 3px;
    padding-top: max(3px, env(safe-area-inset-top));
    padding-bottom: max(3px, env(safe-area-inset-bottom));
  }

  .game-header h1 {
    font-size: 1.9rem;
  }

  .player-card {
    min-height: 110px;
    padding-block: 4px;
    padding-bottom: 48px;
  }

  .wins {
    min-height: 17px;
  }

  .power-up-tray {
    min-height: 42px;
    margin: 0;
    padding-block: 1px;
  }

  .random-bullet-power,
  .jumble-power,
  .tornado-power {
    height: 40px;
  }

  .board {
    width: min(100%, 35dvh);
  }

  .status-kicker {
    display: none;
  }

  .status-wrap {
    min-height: 27px;
  }

  .action-button {
    min-height: 40px;
  }

  .victory-overlay {
    padding-block: 7px;
  }

  .victory-sheet {
    width: min(82vw, 500px);
    padding: 8px 18px 10px;
  }

  .victory-sheet__fighter {
    width: 76px;
    font-size: 3.1rem;
  }

  .victory-sheet__crown {
    top: -2px;
    font-size: 2.6rem;
  }

  .victory-sheet h2 {
    font-size: 2.7rem;
  }

  .victory-sheet h2 small {
    display: inline;
    margin-top: 0;
  }

  .victory-sheet__button {
    min-height: 48px;
    margin-top: 8px;
  }

  .setup-sheet {
    padding: 16px 18px 15px;
  }

  .setup-sheet__fighters {
    margin-bottom: 10px;
  }

  .setup-sheet__fighters span {
    width: 72px;
    font-size: 3rem;
  }

  .setup-sheet__fighters i {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }

  .setup-sheet h2 {
    font-size: 2.7rem;
  }

  .setup-sheet > p:not(.setup-sheet__kicker):not(.setup-sheet__hint) {
    margin-bottom: 13px;
  }

  .setup-sheet__button {
    min-height: 54px;
  }

  .setup-sheet__hint {
    margin-top: 10px;
  }
}

@media (max-width: 360px) {
  .game-header__title-row {
    gap: 6px;
  }

  .game-header h1 {
    font-size: 1.72rem;
  }

  .game-header .sound-toggle {
    min-height: 36px;
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 700px) and (min-height: 850px) {
  .app-shell {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .jumble-piece.is-flying {
    top: 0;
    left: 0;
    animation-name: jumble-piece-reduced !important;
    animation-duration: 320ms !important;
    animation-delay: 0ms !important;
  }

  .jumble-vortex {
    animation-duration: 320ms !important;
  }

  .tornado-funnel.is-sweeping {
    animation-duration: 560ms !important;
  }

  .tornado-piece.is-flying {
    animation-name: tornado-piece-reduced !important;
    animation-duration: 360ms !important;
  }

  .cell.is-tornado-source.is-being-swept {
    animation-duration: 120ms !important;
  }
}
