/**
 * Bomb Maze Online — "bomber arcade" theme.
 *
 * Chunky cartoon panels with thick ink outlines, hard drop shadows, and
 * pressable 3D buttons. Builds on style.css and overrides its glassy look.
 */

:root {
  --ink: #140c33;
  --ink-2: #1f1650;
  --panel: #2c2170;
  --panel-hi: #3a2d8c;
  --panel-lo: #241a5c;
  --text: #fffaf0;
  --muted: #b9b0e8;
  --red: #ff4b4b;
  --red-dark: #c42638;
  --orange: #ff8a1e;
  --yellow: #ffd23f;
  --yellow-dark: #e09b00;
  --green: #3ddc72;
  --green-dark: #1f9a4b;
  --blue: #3f8cff;
  --blue-dark: #2457c7;
  --cyan: #3ee0ff;
  --purple: #a26bff;
  --me: #3ddc72;
  --rival: #ff4b6e;
  --gold: #ffd23f;
  --font-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --hard: 0 6px 0 var(--ink);
  --hard-sm: 0 4px 0 var(--ink);
  font-family: var(--font-body);
}

body {
  background: #1b1442;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ------------------------------------------------------------------ */
/* Building blocks                                                    */
/* ------------------------------------------------------------------ */

.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 40%, var(--panel-lo));
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--hard), inset 0 3px 0 rgba(255, 255, 255, .12);
}

.btn-3d {
  --face: #4b3c9e;
  --edge: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--face);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .02em;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(20, 12, 51, .55);
  box-shadow: 0 5px 0 var(--edge);
  cursor: pointer;
  transform: translateY(0);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}

.btn-3d:hover {
  filter: brightness(1.08);
}

.btn-3d:active:not(:disabled),
.btn-3d.pressed {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--edge);
}

.btn-3d:disabled {
  filter: grayscale(.85) brightness(.75);
  cursor: default;
}

.btn-3d:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.btn-red {
  --face: var(--red);
}

.btn-blue {
  --face: var(--blue);
}

.btn-yellow {
  --face: var(--yellow);
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

.btn-green {
  --face: var(--green);
}

.btn-dark {
  --face: #3a2d84;
}

.icon-3d {
  width: 46px;
  min-height: 46px;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  border-radius: 13px;
}

.icon-3d.danger:hover {
  --face: var(--red);
}

.hazard-strip {
  height: 12px;
  border-bottom: 3px solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--ink) 12px 24px);
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: .95;
  letter-spacing: .01em;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink), 0 6px 0 rgba(0, 0, 0, .25);
}

.brand-ribbon {
  display: inline-block;
  margin: 8px 0 0;
  padding: 3px 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: var(--hard-sm);
}

/* A cartoon bomb with a flickering spark, used on buttons. */
.bomb-icon {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  margin-top: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #6b6b8f, #1d1838 60%);
  border: 3px solid var(--ink);
}

.bomb-icon::before {
  content: "";
  position: absolute;
  right: -2px;
  top: -9px;
  width: 9px;
  height: 9px;
  border: 3px solid var(--ink);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 8px 0 0;
}

.bomb-icon .spark {
  position: absolute;
  right: -9px;
  top: -14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, var(--yellow) 30% 55%, var(--orange) 60%);
  box-shadow: 0 0 10px var(--orange);
  animation: sparkFlicker .22s steps(2) infinite;
}

/* ------------------------------------------------------------------ */
/* Global overrides of the base theme                                */
/* ------------------------------------------------------------------ */

.modal-backdrop {
  background: rgba(14, 8, 38, .78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-panel {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 30%, var(--panel-lo));
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 10px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, .12);
}

.modal-panel h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
}

.modal-icon {
  border: 3px solid var(--ink);
  box-shadow: var(--hard-sm);
}

.modal-x {
  border: 3px solid var(--ink);
  background: #3a2d84;
  box-shadow: 0 3px 0 var(--ink);
}

.modal-body {
  color: var(--muted);
}

.action-btn {
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #3a2d84;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 55%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.02rem;
  letter-spacing: .02em;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}

.action-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.action-btn.primary {
  background-color: var(--red);
  border-color: var(--ink);
}

.action-btn.danger {
  background-color: #b5203c;
}

.toast {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--hard-sm);
}

.toast .toast-icon {
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
}

.toast b {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .02em;
}

.settings-tabs button {
  font-family: var(--font-display);
  font-weight: 400;
}

/* Loading screen */
.loading-screen {
  background-color: #1b1442;
  background-image:
    radial-gradient(circle at 50% 40%, transparent 0 35%, rgba(10, 6, 30, .75) 100%),
    conic-gradient(from 90deg at 50% 50%, #241a5a 0 25%, #2b2068 0 50%, #241a5a 0 75%, #2b2068 0);
  background-size: 100% 100%, 72px 72px;
}

.loading-screen::before {
  display: none;
}

.loader-card {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 40%, var(--panel-lo));
  border: 4px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 10px 0 var(--ink);
}

.loader-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
  letter-spacing: .01em;
}

.progress-bar {
  height: 22px;
  border: 3px solid var(--ink);
  background: var(--ink-2);
}

.progress-bar span {
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--orange) 12px 24px);
  box-shadow: none;
}

/* ------------------------------------------------------------------ */
/* Avatars                                                            */
/* ------------------------------------------------------------------ */

.avatar {
  --size: 42px;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--blue);
  border: 3px solid var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(var(--size) * .4);
  text-shadow: 0 2px 0 rgba(20, 12, 51, .5);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.initials {
  background: linear-gradient(180deg, hsl(var(--hue) 80% 62%), hsl(var(--hue) 70% 45%));
}

.avatar.bot {
  background: linear-gradient(180deg, #6a7bb8, #3b467a);
  font-size: calc(var(--size) * .52);
}

.avatar.tiny {
  --size: 28px;
  border-width: 2px;
}

.avatar.big {
  --size: clamp(80px, 18vw, 120px);
  border-width: 4px;
  box-shadow: 0 5px 0 var(--ink);
}

.avatar.green {
  box-shadow: 0 0 0 3px var(--me);
}

.avatar.red {
  box-shadow: 0 0 0 3px var(--rival);
}

.avatar.big.green {
  box-shadow: 0 0 0 4px var(--me), 0 6px 0 4px var(--ink);
}

.avatar.big.red {
  box-shadow: 0 0 0 4px var(--rival), 0 6px 0 4px var(--ink);
}

/* ------------------------------------------------------------------ */
/* Sign-in                                                            */
/* ------------------------------------------------------------------ */

.auth-screen {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 28px 16px;
  touch-action: pan-y;
  background-color: #1b1442;
  background-image:
    radial-gradient(circle at 50% 45%, transparent 0 30%, rgba(10, 6, 30, .8) 100%),
    conic-gradient(from 90deg at 50% 50%, #241a5a 0 25%, #2b2068 0 50%, #241a5a 0 75%, #2b2068 0);
  background-size: 100% 100%, 72px 72px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 26px;
  animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-brand .game-logo {
  width: 88px;
  height: 88px;
  margin: -8px -4px -8px -8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--ink-2);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1rem;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--yellow-dark);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #fff;
  font-weight: 800;
  font-size: .86rem;
}

.auth-form label small {
  color: var(--muted);
  font-weight: 700;
}

.auth-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: #fffaf0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: inset 0 3px 0 rgba(20, 12, 51, .15);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--ink), inset 0 3px 0 rgba(20, 12, 51, .15);
}

.auth-submit {
  min-height: 52px;
  margin-top: 4px;
  font-size: 1.2rem;
}

.auth-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: #ffdfe3;
  color: #8a0f22;
  font-weight: 800;
  font-size: .88rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
  color: var(--muted);
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--ink-2);
}

.oauth-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.oauth-btn.google {
  --face: #ffffff;
  color: #2b2b3a;
  text-shadow: none;
}

.oauth-btn.discord {
  --face: #5865f2;
}

.oauth-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: .8rem;
}

.oauth-btn.google .oauth-icon {
  background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0);
  color: #fff;
}

.oauth-btn.discord .oauth-icon {
  background: rgba(255, 255, 255, .25);
}

/* ------------------------------------------------------------------ */
/* Lobby                                                              */
/* ------------------------------------------------------------------ */

.menu-screen {
  background: #1b1442;
}

.lobby-shell {
  width: min(1200px, 100%);
}

.lobby-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.lobby-top .menu-brand {
  margin: 0;
  gap: 12px;
}

.lobby-top .game-logo {
  width: 84px;
  height: 84px;
  margin: -8px -2px -8px -6px;
}

.lobby-top .menu-brand h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  letter-spacing: .01em;
}

.lobby-top .menu-brand p {
  letter-spacing: .14em;
  color: #fff;
  font-size: .78rem;
}

.lobby-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.online-pill,
.coin-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--ink-2);
  box-shadow: var(--hard-sm);
  font-weight: 800;
  font-size: .86rem;
  color: var(--muted);
}

.online-pill b {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
}

.coin-pill {
  background: var(--yellow);
  color: var(--ink);
}

.coin-pill b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.coin-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 35%, #fff6c4, #ffb800 60%);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--ink);
  animation: livePulse 1.6s ease-in-out infinite;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 6px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--hard-sm);
}

.profile-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 4px;
}

.profile-copy b {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
}

.profile-copy small {
  color: var(--muted);
  font-weight: 800;
  font-size: .74rem;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "play play fighter"
    "stats daily board"
    "stats reward board";
  gap: 30px 18px;
}

.lobby-grid>.panel {
  padding: 26px 18px 18px;
  min-width: 0;
}

.card-tab {
  position: absolute;
  left: 16px;
  top: 0;
  margin: 0;
  padding: 4px 14px;
  transform: translateY(-58%) rotate(-2deg);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--hard-sm);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.12rem;
  letter-spacing: .02em;
  white-space: nowrap;
}

.tab-cyan {
  background: var(--cyan);
}

.tab-yellow {
  background: var(--yellow);
}

.tab-orange {
  background: var(--orange);
}

.tab-purple {
  background: var(--purple);
  color: #fff;
  text-shadow: 0 2px 0 rgba(20, 12, 51, .45);
}

.rank-badge,
.reset-timer,
.streak-pill {
  position: absolute;
  right: 14px;
  top: 12px;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink-2);
  color: var(--muted);
  font-weight: 900;
  font-size: .72rem;
  white-space: nowrap;
}

.streak-pill {
  color: #ffb36b;
}

.sub-head {
  margin: 16px 0 8px;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Play card */
.play-card {
  grid-area: play;
  padding: 0 !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 30%, rgba(255, 138, 30, .35), transparent 45%),
    linear-gradient(180deg, #4a3aa6, #33268a 50%, #281d6e);
}

.play-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px 8px;
}

.mode-tag {
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-weight: 900;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.play-copy h2 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: .95;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}

.play-copy p {
  margin: 0;
  max-width: 440px;
  color: #e3dcff;
  font-weight: 700;
  line-height: 1.45;
}

.mini-arena {
  position: relative;
  width: 250px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 14px 18px;
}

.mini-tiles {
  position: absolute;
  inset: auto 0 0;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--hard-sm);
  background:
    conic-gradient(from 90deg at 50% 50%, #f5e27a 0 25%, #f0d250 0 50%, #f5e27a 0 75%, #f0d250 0);
  background-size: 44px 44px;
}

.char-orb {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 rgba(20, 12, 51, .35);
  animation: charBob 1.6s ease-in-out infinite;
}

.char-orb.green {
  background: radial-gradient(circle at 34% 28%, #c9ffd8, #73de8d 50%, #2f9a52);
}

.char-orb.red {
  background: radial-gradient(circle at 34% 28%, #ffc8d2, #ff607c 50%, #b52f4b);
  animation-delay: -.8s;
}

.char-orb .eye {
  position: absolute;
  top: 20px;
  width: 12px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
}

.char-orb .eye::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 5px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.char-orb .eye.left {
  left: 14px;
}

.char-orb .eye.right {
  right: 14px;
}

.char-orb .smile {
  position: absolute;
  left: 21px;
  top: 37px;
  width: 18px;
  height: 9px;
  border-bottom: 3px solid var(--ink);
  border-radius: 50%;
}

.char-orb .leaf {
  position: absolute;
  left: 30px;
  top: -12px;
  width: 20px;
  height: 11px;
  border: 3px solid var(--ink);
  border-radius: 50% 0;
  background: #e9ff78;
  transform: rotate(-20deg);
}

.char-orb .horn {
  position: absolute;
  top: -14px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 17px solid var(--ink);
}

.char-orb .horn::after {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid #ffd7df;
}

.char-orb .horn.left {
  left: 8px;
  transform: rotate(-18deg);
}

.char-orb .horn.right {
  right: 8px;
  transform: rotate(18deg);
}

.mini-bomb {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 34% 30%, #7a7aa6, #1d1838 62%);
  animation: bombPulse .7s ease-in-out infinite;
}

.mini-bomb .fuse {
  position: absolute;
  right: 0;
  top: -11px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--ink);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 9px 0 0;
}

.mini-bomb .spark {
  position: absolute;
  right: -8px;
  top: -17px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, var(--yellow) 30% 55%, var(--orange) 60%);
  box-shadow: 0 0 12px var(--orange);
  animation: sparkFlicker .22s steps(2) infinite;
}

.play-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 10px 24px 24px;
}

.find-match-btn {
  justify-content: flex-start;
  gap: 18px;
  min-height: 84px;
  padding: 0 24px;
  border-width: 4px;
  border-radius: 20px;
  box-shadow: 0 7px 0 var(--ink);
}

.find-match-btn .bomb-icon {
  width: 42px;
  height: 42px;
}

.find-match-btn .bomb-icon::before {
  width: 12px;
  height: 12px;
  top: -12px;
}

.find-match-btn .bomb-icon .spark {
  right: -11px;
  top: -19px;
  width: 14px;
  height: 14px;
}

.fm-text {
  display: grid;
  text-align: left;
}

.fm-text b {
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 3px 0 var(--ink);
}

.fm-text small {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: .8rem;
  color: #ffe1dc;
  text-shadow: none;
}

.practice-btn {
  flex-direction: column;
  gap: 0;
  min-height: 84px;
  padding: 0 22px;
  border-width: 4px;
  border-radius: 20px;
  box-shadow: 0 7px 0 var(--ink);
}

.practice-btn b {
  font-weight: 400;
  font-size: 1.35rem;
}

.practice-btn small {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: .74rem;
  color: #dbe8ff;
  text-shadow: none;
}

/* Stats card */
.stats-card {
  grid-area: stats;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.tier-emblem {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--ink-2);
  box-shadow: var(--hard-sm);
  font-size: 1.9rem;
}

.tier-emblem.gold,
.tier-emblem.champion {
  background: var(--yellow);
}

.tier-emblem.platinum,
.tier-emblem.diamond {
  background: var(--cyan);
}

.rating-value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}

.rating-row small {
  color: var(--muted);
  font-weight: 800;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.mini-stats div {
  padding: 7px 3px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--ink-2);
  text-align: center;
}

.mini-stats b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.mini-stats small {
  display: block;
  color: var(--muted);
  font-weight: 900;
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.recent-list,
.challenge-list,
.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.recent-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--ink-2);
  font-weight: 800;
  font-size: .84rem;
}

.recent-list li b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
}

.recent-list li.win b {
  background: var(--green);
}

.recent-list li.loss b {
  background: var(--rival);
  color: #fff;
}

.recent-list li.draw b {
  background: #b9b0e8;
}

.recent-list li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-list li small {
  color: var(--muted);
  white-space: nowrap;
}

.recent-list li.empty,
.board-list li.empty {
  display: block;
  padding: 12px;
  color: var(--muted);
  text-align: center;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.link-provider {
  padding: 5px 11px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink-2);
  color: #fff;
  font-weight: 900;
  font-size: .78rem;
  text-decoration: none;
}

/* Daily challenges */
.daily-card {
  grid-area: daily;
}

.challenge-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--ink-2);
}

.challenge-list li.done {
  background: #4a3a1e;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--yellow);
}

.challenge-list li.claimed {
  opacity: .55;
}

.challenge-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 1.1rem;
}

.challenge-copy b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  color: #fff;
}

.challenge-copy small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: .76rem;
}

.progress-line {
  height: 10px;
  margin: 6px 0 2px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #140c33;
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--green) 0 8px, #2bc35e 8px 16px);
  transition: width .4s ease;
}

.progress-text {
  font-variant-numeric: tabular-nums;
}

.reward-tag,
.claimed-tag {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: .95rem;
  white-space: nowrap;
}

.claimed-tag {
  color: var(--green);
}

.claim-btn {
  --face: var(--yellow);
  min-height: 36px;
  padding: 0 12px;
  border: 3px solid var(--ink);
  border-radius: 11px;
  background: var(--face);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .95rem;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  white-space: nowrap;
  animation: claimWiggle 1.8s ease-in-out infinite;
}

.claim-btn:disabled {
  animation: none;
  --face: #4b417f;
  color: var(--muted);
  filter: none;
  cursor: default;
}

.claim-btn.big {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  font-size: 1.2rem;
}

/* Daily reward */
.reward-card {
  grid-area: reward;
}

.reward-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.reward-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 2px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.reward-day small {
  color: var(--muted);
  font-weight: 900;
  font-size: .56rem;
  white-space: nowrap;
}

.reward-day b {
  font-size: 1.05rem;
}

.reward-day span {
  font-family: var(--font-display);
  font-size: .82rem;
  color: #fff;
}

.reward-day.claimed {
  background: var(--green-dark);
}

.reward-day.claimed small {
  color: #d6ffe3;
}

.reward-day.today {
  background: var(--yellow);
  transform: translateY(-4px);
  box-shadow: 0 4px 0 var(--ink);
}

.reward-day.today small,
.reward-day.today span {
  color: var(--ink);
}

.reward-day.future {
  opacity: .75;
}

/* Leaderboard */
.board-card {
  grid-area: board;
}

.seg-tabs {
  position: absolute;
  right: 12px;
  top: 9px;
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--ink-2);
}

.seg {
  border: 0;
  border-radius: 8px;
  padding: 3px 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .82rem;
  cursor: pointer;
}

.seg.active {
  background: var(--purple);
  color: #fff;
}

.board-list {
  max-height: 290px;
  margin-top: 8px;
  padding-right: 3px;
  overflow: auto;
  overscroll-behavior: contain;
}

.board-list li {
  display: grid;
  grid-template-columns: 34px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 9px 5px 5px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--ink-2);
  font-weight: 800;
  font-size: .88rem;
}

.board-list li.me {
  background: #1f5a3a;
}

.board-rank {
  text-align: center;
  font-family: var(--font-display);
  color: var(--muted);
}

.board-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-value {
  font-family: var(--font-display);
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.lobby-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.link-btn {
  min-height: 44px;
  font-size: 1rem;
}

.link-btn small {
  display: none;
}

.menu-footer {
  color: rgba(255, 255, 255, .45);
  font-weight: 800;
}

/* ------------------------------------------------------------------ */
/* Matchmaking + VS                                                   */
/* ------------------------------------------------------------------ */

.queue-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(14, 8, 38, .82);
  animation: fadeIn .2s ease;
}

.queue-card {
  width: min(440px, 100%);
  overflow: hidden;
  text-align: center;
  padding: 0 0 24px;
  animation: popIn .4s cubic-bezier(.2, 1.4, .4, 1);
}

.radar {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 24px auto 16px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle, #1f6b3e, #123d26 72%);
  box-shadow: var(--hard);
  overflow: hidden;
}

.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(160, 255, 190, .35);
}

.radar-ring.r2 {
  inset: 28px;
}

.radar-ring.r3 {
  inset: 56px;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(120, 255, 160, .55), transparent 75deg, transparent);
  animation: spin 2s linear infinite;
}

.blip {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--rival);
  opacity: 0;
  animation: blip 2s ease-out infinite;
}

.blip.b1 {
  left: 28%;
  top: 22%;
}

.blip.b2 {
  left: 70%;
  top: 40%;
  animation-delay: .65s;
}

.blip.b3 {
  left: 40%;
  top: 72%;
  animation-delay: 1.3s;
}

.radar-me {
  --size: 64px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--me);
}

.queue-card h2 {
  margin: 0 16px 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
}

.queue-time {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.1;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}

.queue-detail {
  margin: 4px 16px 0;
  color: var(--muted);
  font-weight: 800;
  font-size: .9rem;
}

.queue-tip {
  min-height: 2.8em;
  margin: 14px 20px 0;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--ink-2);
  color: #e3dcff;
  font-weight: 700;
  font-size: .84rem;
}

.queue-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.vs-stage {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.vs-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 14px 22px;
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 8px 0 var(--ink);
  text-align: center;
  min-width: 0;
}

.vs-card.me {
  background: linear-gradient(180deg, #4be38a, #23a457);
  animation: vsSlideLeft .55s cubic-bezier(.2, 1.3, .3, 1) both;
}

.vs-card.opp {
  background: linear-gradient(180deg, #ff7088, #d02c4c);
  animation: vsSlideRight .55s cubic-bezier(.2, 1.3, .3, 1) both;
}

.vs-card b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
}

.vs-card small {
  color: #fff;
  font-weight: 900;
}

.vs-slot {
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.vs-center {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.vs-badge {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink);
  animation: vsBadge .7s cubic-bezier(.2, 1.6, .4, 1) .2s both;
}

.vs-count {
  min-width: 100px;
  font-family: var(--font-display);
  font-size: 2rem;
  text-align: center;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}

.vs-count.pop {
  animation: countPop .5s ease both;
}

.vs-sub {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 10px 0 0;
  padding: 6px 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--ink-2);
  color: #fff;
  font-weight: 900;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Match screen                                                       */
/* ------------------------------------------------------------------ */

.match-screen {
  display: flex;
  flex-direction: column;
  background: #1b1442;
}

.match-hud {
  position: relative;
  z-index: 5;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  background: var(--ink-2);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}

.hud-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.fighter-plate {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 360px);
  min-width: 0;
  padding: 7px 12px 7px 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--hard-sm);
  transition: filter .25s ease, transform .25s ease;
  filter: saturate(.35) brightness(.75);
}

.fighter-plate.me {
  justify-self: end;
  background: linear-gradient(180deg, #45d97f, #1f9a4b);
}

.fighter-plate.opp {
  justify-self: start;
  flex-direction: row-reverse;
  text-align: right;
  padding: 7px 8px 7px 12px;
  background: linear-gradient(180deg, #ff6f86, #c42c4a);
}

.fighter-plate.active {
  filter: none;
  transform: translateY(-2px);
}

.fighter-plate.active::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 3px solid var(--yellow);
  border-radius: 21px;
  pointer-events: none;
  animation: activePulse 1.1s ease-in-out infinite;
}

.fighter-plate .avatar {
  --size: 46px;
}

.fighter-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fighter-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
}

.you-tag {
  display: inline-block;
  padding: 0 6px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--ink);
  font-size: .7rem;
  text-shadow: none;
  vertical-align: 2px;
}

.fighter-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, .9);
  font-weight: 900;
  font-size: .72rem;
}

.fighter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.fighter-plate.opp .fighter-chips {
  justify-content: flex-end;
}

.fighter-chips span,
.fighter-chips .status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-style: normal;
  font-size: .8rem;
  line-height: 1.5;
}

.fighter-chips i {
  font-style: normal;
  color: var(--yellow);
}

.fighter-chips .shield {
  color: #9cc4ff;
}

.status.ko {
  background: var(--red) !important;
}

.status.off {
  background: var(--yellow) !important;
  color: var(--ink) !important;
}

.slot-tag {
  margin-left: auto;
  padding: 2px 8px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: .9rem;
}

.fighter-plate.opp .slot-tag {
  margin-left: 0;
  margin-right: auto;
}

.turn-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.turn-clock {
  position: relative;
  flex: none;
  width: 62px;
  height: 62px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: var(--hard-sm);
}

.turn-clock svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.turn-clock circle {
  fill: none;
  stroke-width: 7;
}

.ring-bg {
  stroke: #2c2170;
}

.ring-fg {
  stroke: var(--me);
  stroke-linecap: round;
  stroke-dasharray: 169.65;
  stroke-dashoffset: 0;
  transition: stroke .2s ease;
}

.turn-clock.theirs .ring-fg {
  stroke: var(--rival);
}

.turn-clock.low .ring-fg {
  stroke: var(--yellow);
  animation: timerBlink .45s ease-in-out infinite alternate;
}

.turn-clock b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  color: #fff;
}

.turn-copy {
  display: grid;
  min-width: 128px;
}

.turn-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
  white-space: nowrap;
}

.turn-label.mine {
  color: var(--me);
}

.turn-label.theirs {
  color: var(--rival);
}

.turn-copy small {
  color: var(--muted);
  font-weight: 900;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.match-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 40%, rgba(10, 6, 30, .55) 100%),
    #1b1442;
}

#matchCanvas {
  display: block;
  touch-action: none;
}

#matchCanvas:focus {
  outline: none;
}

.turn-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 34px 16px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 8px 0 var(--ink);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.6);
}

.turn-banner b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
  white-space: nowrap;
}

.turn-banner small {
  color: #fff;
  font-weight: 900;
}

.turn-banner.show {
  animation: turnBanner 1.7s cubic-bezier(.2, 1.4, .4, 1) both;
}

.turn-banner.small.show {
  animation-duration: 1.1s;
}

.turn-banner.mine {
  background: var(--green-dark);
}

.turn-banner.mine b {
  color: var(--yellow);
}

.turn-banner.theirs {
  background: var(--red-dark);
}

.turn-banner.sudden {
  background: var(--orange);
}

.match-controls {
  position: relative;
  z-index: 5;
  padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--ink-2);
  border-top: 4px solid var(--ink);
}

.dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.moves-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 14px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--hard-sm);
}

.moves-box>small {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .04em;
}

.moves-pips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.moves-pips i {
  width: 14px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #1b1442;
  transition: background .15s ease, transform .15s ease;
}

.moves-pips i.on {
  background: var(--me);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45);
}

.moves-pips.theirs i.on {
  background: var(--rival);
}

.moves-pips em {
  color: var(--muted);
  font-style: normal;
}

.moves-count {
  min-width: 38px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  color: #fff;
  text-align: right;
  text-shadow: 0 2px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}

.match-actions {
  display: flex;
  gap: 12px;
}

.match-btn {
  min-height: 58px;
  padding: 0 22px;
  border-width: 4px;
  border-radius: 18px;
  font-size: 1.35rem;
  box-shadow: 0 6px 0 var(--ink);
}

.match-btn.bomb {
  min-width: 170px;
}

.match-btn kbd {
  padding: 1px 7px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: rgba(20, 12, 51, .35);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: .7rem;
  text-shadow: none;
}

.match-btn.end kbd {
  background: rgba(20, 12, 51, .15);
  color: var(--ink);
}

.match-extras {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emote-wrap {
  position: relative;
}

.emote-bar {
  position: absolute;
  right: -6px;
  bottom: calc(100% + 14px);
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 6px;
  padding: 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--hard);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.9);
  transform-origin: bottom right;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.emote-bar.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.emote-bar button {
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--ink-2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  cursor: pointer;
}

.emote-bar button:hover {
  background: var(--purple);
}

.match-dpad {
  display: none;
  grid-template: repeat(3, 44px) / repeat(3, 44px);
  gap: 4px;
}

.dpad-btn {
  min-height: 0;
  padding: 0;
  border-radius: 12px;
  font-size: 1rem;
  box-shadow: 0 4px 0 var(--ink);
  touch-action: none;
}

.dpad-btn.up {
  grid-area: 1 / 2;
}

.dpad-btn.left {
  grid-area: 2 / 1;
}

.dpad-btn.right {
  grid-area: 2 / 3;
}

.dpad-btn.down {
  grid-area: 3 / 2;
}

/* Results */
.result-card {
  text-align: center;
}

.result-reason {
  margin: 0 0 16px;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

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

.result-grid div {
  display: grid;
  gap: 2px;
  padding: 12px 6px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--ink-2);
  box-shadow: var(--hard-sm);
}

.result-grid small {
  color: var(--muted);
  font-weight: 900;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.result-grid b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}

.delta {
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--muted);
}

.delta.up {
  color: var(--green);
}

.delta.down {
  color: var(--rival);
}

.result-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.result-stats span {
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink-2);
  color: #fff;
  font-weight: 800;
  font-size: .84rem;
}

.result-tier {
  margin: 14px 0 0;
  color: #fff;
  font-family: var(--font-display);
}

.result-warning {
  color: var(--yellow);
}

/* ------------------------------------------------------------------ */
/* XP, levels, fighter card                                           */
/* ------------------------------------------------------------------ */

.btn-purple {
  --face: var(--purple);
}

.tab-green {
  background: var(--green);
}

.chip-xp {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.chip-xp span {
  padding: 0 6px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .72rem;
  line-height: 1.4;
}

.chip-xp i {
  flex: 1;
  min-width: 60px;
  height: 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  overflow: hidden;
}

.chip-xp b {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3ee0ff, #7dfcff);
  transition: width .6s ease;
}

.fighter-card {
  grid-area: fighter;
  display: flex;
  flex-direction: column;
}

.level-badge {
  background: var(--cyan) !important;
  color: var(--ink) !important;
  font-family: var(--font-display);
}

.fighter-stage {
  position: relative;
  height: 150px;
  margin: 4px 0 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(255, 210, 63, .35), transparent 60%),
    conic-gradient(from 90deg at 50% 50%, #352a7e 0 25%, #2f2474 0 50%, #352a7e 0 75%, #2f2474 0);
  background-size: 100% 100%, 36px 36px;
  overflow: hidden;
}

.fighter-preview {
  display: block;
  width: 100%;
  height: 100%;
}

.xp-block {
  margin-bottom: 12px;
}

.xp-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.xp-meta b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  color: #fff;
}

.xp-meta small {
  color: var(--muted);
  font-weight: 900;
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
}

.xp-bar {
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(20, 12, 51, .6);
}

.xp-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .25) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, #22b8e6, #7dfcff);
  transition: width .6s ease;
}

.xp-bar.big {
  height: 22px;
}

.fighter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.lvl-chip {
  background: var(--cyan) !important;
  color: var(--ink) !important;
}

.vs-level {
  margin-top: -18px;
  padding: 1px 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .95rem;
  position: relative;
  z-index: 1;
}

.board-lvl {
  color: var(--cyan);
  font-weight: 900;
  font-size: .7rem;
}

/* Results XP */
.xp-panel {
  margin-top: 16px;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--ink-2);
  text-align: left;
}

.xp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xp-row .xp-bar {
  flex: 1;
}

.xp-row .xp-bar span {
  transition: none;
}

.lvl-badge {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 40px;
  padding: 0 8px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  box-shadow: var(--hard-sm);
}

.lvl-badge.pop {
  animation: lvlPop .6s cubic-bezier(.2, 1.6, .4, 1);
  background: var(--yellow);
}

.xp-gain {
  min-width: 90px;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: #7dfcff;
  text-shadow: 0 2px 0 var(--ink);
  font-variant-numeric: tabular-nums;
}

.levelup-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, #ffc21a 14px 28px);
  box-shadow: var(--hard-sm);
  animation: lvlPop .6s cubic-bezier(.2, 1.6, .4, 1);
}

.levelup-banner b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}

.levelup-banner small {
  color: var(--ink);
  font-weight: 900;
}

.xp-lines {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.xp-lines li {
  display: flex;
  justify-content: space-between;
  color: #e3dcff;
  font-weight: 800;
  font-size: .86rem;
}

.xp-lines b {
  color: #7dfcff;
  font-family: var(--font-display);
  font-weight: 400;
}

/* ------------------------------------------------------------------ */
/* Locker + shop                                                      */
/* ------------------------------------------------------------------ */

.locker-overlay {
  position: fixed;
  inset: 0;
  z-index: 28;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(14, 8, 38, .82);
  animation: fadeIn .2s ease;
}

.locker {
  width: min(1060px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn .35s cubic-bezier(.2, 1.3, .4, 1);
}

.locker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 3px solid var(--ink);
  background: rgba(20, 12, 51, .35);
}

.locker-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--ink-2);
}

.locker-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
  cursor: pointer;
}

.locker-tab.active {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--yellow-dark);
}

.locker-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.locker-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.locker-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-right: 3px solid var(--ink);
  background: rgba(20, 12, 51, .25);
}

.stage-spot {
  position: relative;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 210, 63, .45), transparent 55%),
    radial-gradient(circle at 50% 40%, rgba(162, 107, 255, .35), transparent 60%),
    conic-gradient(from 90deg at 50% 50%, #352a7e 0 25%, #2f2474 0 50%, #352a7e 0 75%, #2f2474 0);
  background-size: 100% 100%, 100% 100%, 40px 40px;
  box-shadow: var(--hard-sm);
  overflow: hidden;
}

.stage-spot canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-spot.celebrate::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .9) 0 8%, transparent 9%) 20% 30% / 12px 12px,
    radial-gradient(circle, #ffd23f 0 30%, transparent 32%) 0 0 / 26px 26px,
    radial-gradient(circle, #3ee0ff 0 25%, transparent 27%) 13px 13px / 26px 26px;
  animation: celebrate 1s ease-out forwards;
  pointer-events: none;
}

.stage-info h3 {
  margin: 6px 0 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 0 3px 0 var(--ink);
}

.stage-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.stage-btn {
  width: 100%;
  min-height: 52px;
  font-size: 1.2rem;
}

.stage-btn s {
  opacity: .7;
  font-size: .9rem;
}

.stage-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.rarity-tag {
  display: inline-block;
  padding: 2px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.rarity-tag.rarity-common { background: #b9c7de; }
.rarity-tag.rarity-rare { background: #3ee0ff; }
.rarity-tag.rarity-epic { background: #b77bff; color: #fff; }
.rarity-tag.rarity-legendary { background: linear-gradient(90deg, #ffd23f, #ff8a1e); }

.locker-catalog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.cat-tabs {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--ink-2);
}

.cat-tabs .seg {
  padding: 6px 14px;
  font-size: .95rem;
}

.featured-deal {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: repeating-linear-gradient(-45deg, #ff6a2b 0 16px, #ff5320 16px 32px);
  color: #fff;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--hard-sm);
}

.featured-deal b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  text-shadow: 0 2px 0 var(--ink);
}

.deal-tag {
  padding: 2px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .85rem;
}

.deal-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.deal-price s {
  opacity: .7;
  font-size: .9rem;
}

.featured-deal small {
  margin-left: auto;
  font-weight: 900;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
  align-content: start;
}

.item-card {
  --rarity: #9fb3d1;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 6px 10px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rarity) 30%, #2c2170), #241a5c 70%);
  box-shadow: 0 4px 0 var(--ink), inset 0 -4px 0 var(--rarity);
  color: #fff;
  cursor: pointer;
  transition: transform .12s ease;
}

.item-card:hover {
  transform: translateY(-3px);
}

.item-card.selected {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  transform: translateY(-3px);
}

.item-card.locked .item-thumb {
  filter: grayscale(.8) brightness(.6);
}

.item-card.rarity-rare { --rarity: #3ee0ff; }
.item-card.rarity-epic { --rarity: #b77bff; }
.item-card.rarity-legendary { --rarity: #ffd23f; }

.item-card.rarity-legendary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .25) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: shimmer 2.8s linear infinite;
  pointer-events: none;
}

.item-thumb {
  width: 88px;
  height: 88px;
}

.item-card b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .95rem;
  line-height: 1.1;
  text-align: center;
}

.item-card .foot {
  padding: 1px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .8rem;
}

.foot.price { background: var(--yellow); color: var(--ink); }
.foot.equipped { background: var(--green); color: var(--ink); }
.foot.owned { background: #4b417f; color: #fff; }
.foot.locked { background: var(--ink); color: var(--muted); }

.sale-ribbon {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 1;
  padding: 1px 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-style: normal;
  font-size: .8rem;
  transform: rotate(8deg);
}

.locker-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  padding: 30px 0;
}

@keyframes lvlPop {
  0% {
    transform: scale(.4);
  }

  60% {
    transform: scale(1.2);
  }
}

@keyframes celebrate {
  from {
    opacity: 1;
    transform: scale(.6);
  }

  to {
    opacity: 0;
    transform: scale(1.4) translateY(-20px);
  }
}

@keyframes shimmer {
  from {
    background-position: 150% 0;
  }

  to {
    background-position: -100% 0;
  }
}

/* ------------------------------------------------------------------ */
/* How to Play                                                        */
/* ------------------------------------------------------------------ */

.howto {
  --cell: 40px;
  color: #fff;
  /* Keeps the slide-in animation from flashing a horizontal scrollbar. */
  overflow-x: clip;
  padding-bottom: 8px;
}

.ht-slide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 250px;
}

.ht-slide.from-right {
  animation: htInRight .35s cubic-bezier(.2, 1.2, .4, 1);
}

.ht-slide.from-left {
  animation: htInLeft .35s cubic-bezier(.2, 1.2, .4, 1);
}

.ht-visual {
  display: grid;
  place-items: center;
}

.ht-step {
  display: inline-block;
  padding: 3px 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--ink);
}

.ht-copy h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}

.ht-copy p {
  margin: 0;
  color: #e3dcff;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.5;
}

.ht-copy kbd {
  padding: 1px 7px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #fffaf0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .85rem;
  box-shadow: 0 2px 0 var(--ink);
}

.hl-green {
  color: var(--me);
}

.hl-red {
  color: var(--rival);
}

/* Mini arena */
.ht-arena {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  grid-auto-rows: var(--cell);
  border: 4px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--ink);
}

.ht-cell {
  position: relative;
  display: grid;
  place-items: center;
  background: #f5e27a;
}

.ht-cell.alt {
  background: #f0d250;
}

.ht-cell.wall {
  background: #4c75d8;
  box-shadow: inset 0 -6px 0 #2f4ea8, inset 0 0 0 2px var(--ink);
}

.ht-cell.crate::before {
  content: "";
  width: 74%;
  height: 74%;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background:
    linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, .45) 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, rgba(255, 255, 255, .45) 45% 55%, transparent 55%),
    #ef584b;
}

.ht-cell.reach {
  background: #b8ef8f;
}

.ht-cell.reach::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f9a52;
  animation: htDot 1.4s ease-in-out infinite;
}

.ht-cell.preview::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 3px dashed #ff6a2b;
  border-radius: 6px;
  animation: htPreview 1s ease-in-out infinite;
}

.ht-cell.danger {
  background: #ff9a8f;
  animation: htDanger .5s ease-in-out infinite alternate;
}

.ht-cell.flame {
  background: #ffb347;
}

.ht-cell.flame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 40%;
  background: radial-gradient(circle, #fff6b0 0 25%, #ffd23f 40%, #ff6a2b 75%);
  animation: htFlame .35s ease-in-out infinite alternate;
}

.ht-cell.trail::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f9a52;
  box-shadow: 0 -10px 0 #2f9a52;
}

.ht-token {
  position: relative;
  z-index: 1;
  width: 78%;
  height: 78%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 40%, var(--ink) 0 6%, transparent 7%),
    radial-gradient(circle at 65% 40%, var(--ink) 0 6%, transparent 7%),
    radial-gradient(circle at 35% 38%, #fff 0 13%, transparent 14%),
    radial-gradient(circle at 65% 38%, #fff 0 13%, transparent 14%),
    radial-gradient(circle at 32% 26%, var(--light), var(--body) 55%, var(--dark));
}

.ht-token.green {
  --light: #c9ffd8;
  --body: #73de8d;
  --dark: #2f9a52;
}

.ht-token.red {
  --light: #ffc8d2;
  --body: #ff607c;
  --dark: #b52f4b;
}

.ht-token.on-bomb {
  position: absolute;
  width: 66%;
  height: 66%;
  left: 2px;
  top: 2px;
}

.ht-token.ko {
  filter: grayscale(1) brightness(.85);
  transform: rotate(25deg) scale(.85);
}

.ht-ko {
  position: absolute;
  z-index: 2;
  top: -2px;
  right: -6px;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: .62rem;
  white-space: nowrap;
  animation: htKo .7s ease-in-out infinite alternate;
}

.ht-walker {
  position: absolute;
  left: calc(var(--cell) * .11);
  top: calc(var(--cell) * .11);
  width: calc(var(--cell) * .78);
  height: calc(var(--cell) * .78);
  animation: htWalk 3.6s ease-in-out infinite;
}

.ht-bomb {
  position: relative;
  z-index: 1;
  width: 62%;
  height: 62%;
  margin: 18% 0 0 18%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #7a7aa6, #1d1838 62%);
}

.ht-bomb.lit {
  margin: 10% 0 0;
  animation: bombPulse .35s ease-in-out infinite;
}

.ht-bomb::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, var(--yellow) 30% 55%, var(--orange) 60%);
  animation: sparkFlicker .22s steps(2) infinite;
}

/* Power-ups, keys, rules */
.ht-powers {
  display: grid;
  gap: 10px;
  width: 280px;
}

.ht-power {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 8px 12px 8px 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--ink-2);
  box-shadow: var(--hard-sm);
}

.ht-power span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: var(--c);
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
}

.ht-power b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  color: #fff;
}

.ht-power small {
  color: var(--muted);
  font-weight: 800;
}

.ht-keys {
  display: grid;
  gap: 10px;
  min-width: 280px;
}

.ht-keyrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ht-keyrow small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.ht-key {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #fffaf0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  box-shadow: 0 4px 0 var(--ink);
}

.ht-key.wide {
  min-width: 140px;
}

.ht-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.ht-rules span {
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink-2);
  color: #fff;
  font-weight: 800;
  font-size: .82rem;
}

.ht-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.ht-nav .btn-3d {
  white-space: nowrap;
}

.ht-dots {
  display: flex;
  gap: 8px;
}

.ht-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #4b417f;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.ht-dot.active {
  background: var(--yellow);
  transform: scale(1.3);
}

.modal-panel:has(.howto) .modal-actions {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Animations                                                         */
/* ------------------------------------------------------------------ */

@keyframes htInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes htInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes htWalk {

  0%,
  10% {
    transform: translate(0, 0);
    opacity: 1;
  }

  22% {
    transform: translate(var(--cell), 0);
  }

  34% {
    transform: translate(calc(var(--cell) * 2), 0);
  }

  46% {
    transform: translate(calc(var(--cell) * 2), var(--cell));
  }

  58%,
  86% {
    transform: translate(calc(var(--cell) * 2), calc(var(--cell) * 2));
    opacity: 1;
  }

  94% {
    transform: translate(calc(var(--cell) * 2), calc(var(--cell) * 2));
    opacity: 0;
  }

  95%,
  100% {
    transform: translate(0, 0);
    opacity: 0;
  }
}

@keyframes htDot {
  50% {
    transform: scale(1.6);
    opacity: .5;
  }
}

@keyframes htPreview {
  50% {
    opacity: .35;
  }
}

@keyframes htDanger {
  to {
    background: #ff6f63;
  }
}

@keyframes htFlame {
  to {
    transform: scale(1.12) rotate(8deg);
  }
}

@keyframes htKo {
  to {
    transform: rotate(-8deg) scale(1.1);
  }
}

@keyframes sparkFlicker {
  50% {
    transform: scale(.7) rotate(45deg);
    opacity: .75;
  }
}

@keyframes bombPulse {
  50% {
    transform: scale(1.08);
  }
}

@keyframes livePulse {
  50% {
    transform: scale(.7);
    opacity: .6;
  }
}

@keyframes charBob {
  50% {
    transform: translateY(-7px);
  }
}

@keyframes claimWiggle {

  0%,
  70%,
  100% {
    transform: rotate(0);
  }

  80% {
    transform: rotate(-3deg) scale(1.04);
  }

  90% {
    transform: rotate(3deg) scale(1.04);
  }
}

@keyframes activePulse {
  50% {
    opacity: .35;
    transform: scale(1.02);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(.85) translateY(20px);
  }
}

@keyframes blip {
  0% {
    opacity: 0;
    transform: scale(.4);
  }

  15% {
    opacity: 1;
    transform: scale(1.25);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes vsSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-90px) rotate(-6deg);
  }
}

@keyframes vsSlideRight {
  from {
    opacity: 0;
    transform: translateX(90px) rotate(6deg);
  }
}

@keyframes vsBadge {
  from {
    opacity: 0;
    transform: scale(3) rotate(-14deg);
  }
}

@keyframes countPop {
  from {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes turnBanner {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.5) rotate(-4deg);
  }

  14% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(1deg);
  }

  24% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.9);
  }
}

@keyframes timerBlink {
  to {
    opacity: .5;
  }
}

.reduced-motion .char-orb,
.reduced-motion .mini-bomb,
.reduced-motion .bomb-icon .spark,
.reduced-motion .claim-btn,
.reduced-motion .live-dot,
.reduced-motion .fighter-plate.active::after {
  animation: none;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 1000px) {
  .lobby-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "play play"
      "fighter daily"
      "stats reward"
      "stats board";
  }

  .locker-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .locker-stage {
    display: grid !important;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
  }
}

@media (max-width: 680px) {
  .howto {
    --cell: 34px;
  }

  .ht-slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    text-align: center;
  }

  .ht-rules {
    justify-content: center;
  }

  .ht-nav .btn-3d {
    padding: 0 12px;
    font-size: .95rem;
  }

  .ht-dots {
    gap: 5px;
  }

  .ht-dot {
    width: 11px;
    height: 11px;
    border-width: 2px;
  }

  .lobby-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "play"
      "fighter"
      "daily"
      "reward"
      "stats"
      "board";
  }

  .locker-stage {
    grid-template-columns: 120px minmax(0, 1fr) !important;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important;
  }

  .lobby-top .game-logo {
    width: 52px;
    height: 52px;
  }

  .lobby-top-right {
    width: 100%;
  }

  .profile-chip {
    flex: 1 1 100%;
    order: -1;
    min-width: 0;
  }

  .profile-copy {
    flex: 1;
  }

  .profile-copy b {
    max-width: none;
  }

  .play-body {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    padding: 18px 16px 4px;
  }

  .play-copy p {
    margin: 0 auto;
  }

  .mini-arena {
    margin: 0 auto;
  }

  .play-actions {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 16px 20px;
  }

  .practice-btn {
    min-height: 58px;
    flex-direction: row;
    gap: 10px;
  }

  .vs-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .vs-center {
    grid-auto-flow: column;
    align-items: center;
  }

  .vs-card {
    padding: 14px;
  }
}

@media (max-width: 860px) {
  .hud-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "center center"
      "me opp";
    gap: 8px;
  }

  .turn-center {
    grid-area: center;
    justify-content: center;
  }

  .fighter-plate.me {
    grid-area: me;
    width: 100%;
  }

  .fighter-plate.opp {
    grid-area: opp;
    width: 100%;
  }

  .fighter-plate .avatar {
    --size: 34px;
  }

  .fighter-copy small,
  .slot-tag {
    display: none;
  }

  .turn-clock {
    width: 50px;
    height: 50px;
  }

  .turn-clock b {
    font-size: 1.1rem;
  }

  .dock {
    flex-wrap: wrap;
    gap: 10px;
  }

  .match-btn kbd {
    display: none;
  }
}

@media (pointer: coarse) {
  .match-dpad {
    display: grid;
  }

  .match-btn kbd {
    display: none;
  }
}

@media (pointer: coarse) and (max-width: 860px) {
  .dock {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "moves moves"
      "dpad actions";
    gap: 10px 14px;
  }

  .moves-box {
    grid-area: moves;
    justify-content: center;
    min-height: 46px;
  }

  .match-dpad {
    grid-area: dpad;
    grid-template: repeat(3, 48px) / repeat(3, 48px);
  }

  .match-actions {
    grid-area: actions;
    flex-direction: column;
    justify-content: center;
  }

  .match-btn {
    width: 100%;
    min-width: 0;
  }

  .match-extras {
    position: absolute;
    right: max(12px, env(safe-area-inset-right));
    top: -62px;
  }

  .match-extras .icon-3d {
    width: 42px;
    min-height: 42px;
  }
}
