/* ============================================================
   Chain Fighters — arena-fighter UI
   Heavy italic display type, diagonal energy, hue-tinted
   fighter tiles, announcer overlays. Original styling that
   leans on the genre's conventions, not any game's assets.
   ============================================================ */

:root {
  --bg: #0d0b14;
  --bg-2: #16121f;
  --panel: #1d1729;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f2fa;
  --gold: #ffc93c;
  --red: #e3364b;
  --blue: #3fa9f5;
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  user-select: none;
}

.pixel {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- screens ---------- */

.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.35s;
}
.screen.active { display: flex; opacity: 1; }
.screen.leaving { opacity: 0; }

/* ---------- title screen ---------- */

.screen-title { align-items: center; justify-content: center; cursor: pointer; }

.title-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(227, 54, 75, 0.35), transparent 60%),
    radial-gradient(ellipse at 80% -20%, rgba(63, 169, 245, 0.25), transparent 55%),
    linear-gradient(160deg, var(--bg-2), var(--bg));
}
.title-bg::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 90px,
    rgba(255, 255, 255, 0.025) 90px 140px
  );
  animation: bg-drift 24s linear infinite;
}
@keyframes bg-drift {
  from { transform: translateX(0); }
  to { transform: translateX(220px); }
}

.title-slash {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.title-slash::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 50%;
  width: 26vw;
  transform: translateX(-50%) rotate(14deg);
  background: linear-gradient(to bottom, rgba(255, 201, 60, 0.06), rgba(255, 201, 60, 0.14));
  border-left: 2px solid rgba(255, 201, 60, 0.25);
  border-right: 2px solid rgba(255, 201, 60, 0.25);
  animation: slash-pulse 3.2s ease-in-out infinite;
}
@keyframes slash-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.title-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  animation: title-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes title-rise {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.title-kicker { color: rgba(255, 255, 255, 0.5); }

.game-logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: clamp(56px, 11vw, 150px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.6);
}
.logo-accent {
  color: var(--gold);
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.35);
}

.press-start {
  color: var(--text);
  font-size: 13px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0.15; }
}

.title-legal { color: rgba(255, 255, 255, 0.3); }

.title-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* ---------- wallet login ---------- */

.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--surface-1);
  backdrop-filter: blur(14px);
  min-width: min(420px, 90vw);
}
.login-title { color: var(--text-60); font-size: 9px !important; }

.login-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: 500 13px/1 var(--font-sans);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.wallet-btn:hover { background: hsl(0 0% 100% / 0.12); transform: scale(1.03); }
.wallet-btn em {
  font: 400 8px/1 var(--font-pixel);
  font-style: normal;
  color: var(--text-40);
}
.wmark { width: 12px; height: 12px; border-radius: 2px; }
.wmark.mm { background: #f6851b; }
.wmark.ph { background: #ab9ff2; }

.login-session { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.addr-chip {
  padding: 8px 12px;
  background: var(--surface-2);
  color: var(--text);
  font: 500 12px/1 var(--font-alt);
}
.chain-chip {
  padding: 8px 12px;
  background: hsl(140 45% 22%);
  color: hsl(140 60% 78%);
  font: 500 9px/1 var(--font-pixel);
  letter-spacing: 0.08em;
}
.chain-chip.bad { background: hsl(4 55% 25%); color: hsl(4 70% 80%); }
.signout-btn {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-60);
  font: 500 9px/1 var(--font-pixel);
  cursor: pointer;
}
.signout-btn:hover { color: var(--text); }
.login-status { min-height: 12px; color: var(--accent); font-size: 8px !important; text-align: center; max-width: 40rem; }

.fight-btn:disabled { position: relative; }

/* ---------- local VS game screen ---------- */

.screen-game { background: #000; }
#gameCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.game-help {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(5, 4, 9, 0.82);
  backdrop-filter: blur(4px);
  text-align: center;
  animation: title-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.game-overlay[hidden] { display: none; }
.game-over-title {
  margin: 0;
  font-size: clamp(52px, 10vw, 120px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
}

/* ---------- quit confirmation ---------- */

.quit-title { font-size: clamp(36px, 6vw, 72px) !important; }
.quit-note { color: var(--text-60); font-size: 9px; letter-spacing: 0.08em; }

/* ---------- online match chat ---------- */

.netchat {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 6;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.netchat-log { display: flex; flex-direction: column; gap: 5px; }
.netchat-line {
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: white;
  background: rgba(10, 10, 16, 0.72);
  padding: 6px 9px;
  word-break: break-word;
  animation: title-rise 0.2s ease;
}
.netchat-who { color: var(--red); margin-right: 5px; }
.netchat-line.own .netchat-who { color: var(--blue); }
.netchat-input {
  width: 100%;
  padding: 9px 10px;
  font-size: 8px !important;
  letter-spacing: 0.04em;
  color: white;
  background: rgba(10, 10, 16, 0.72);
  border: 1px solid var(--line);
  outline: none;
}
.netchat-input:focus { border-color: var(--blue); }
.netchat-input::placeholder { color: rgba(255, 255, 255, 0.35); }

/* ---------- ultimate move banner ---------- */

.ult-banner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  z-index: 5;
}
.ult-banner[hidden] { display: none; }
.ult-kicker {
  font-size: 12px;
  letter-spacing: 0.5em;
  color: white;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.ult-name {
  font-size: clamp(40px, 8vw, 110px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-align: center;
  -webkit-text-stroke: 2.5px rgba(0, 0, 0, 0.55);
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.7);
}
.ult-banner.run { animation: ult-slam 1.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes ult-slam {
  0% { opacity: 0; transform: scale(3) rotate(-4deg); }
  14% { opacity: 1; transform: scale(1) rotate(-2deg); }
  20% { transform: scale(1.04) rotate(-2deg); }
  80% { opacity: 1; transform: scale(1.06) rotate(-2deg); }
  100% { opacity: 0; transform: scale(1.1) rotate(-2deg) translateY(-16px); }
}

/* ---------- select screens shared chrome ---------- */

.select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 10px; }

.mode-chip {
  padding: 7px 10px;
  background: var(--red);
  color: white;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.slots-chip {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
}
.sound-btn, .back-btn {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  transition: background 0.15s;
}
.sound-btn:hover, .back-btn:hover { background: rgba(255, 255, 255, 0.1); }
.sound-btn.off { color: rgba(255, 255, 255, 0.35); }

.select-title {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 30px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.select-footer {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-top: 2px solid var(--line);
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.05), transparent);
}

.p1-plate {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 18px 0 0;
  background: linear-gradient(90deg, rgba(63, 169, 245, 0.25), transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  cursor: pointer;
  transition: background 0.2s;
}
.p1-plate:hover { background: linear-gradient(90deg, rgba(63, 169, 245, 0.45), transparent); }
.p1-tag {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 12px;
  background: var(--blue);
  color: #06121c;
}
.p1-name {
  font-size: clamp(15px, 2vw, 22px);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fight-btn {
  position: relative;
  padding: 12px 34px;
  border: none;
  background: var(--gold);
  color: #201400;
  font-size: clamp(14px, 1.8vw, 20px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: transform 0.12s, background 0.15s, filter 0.15s;
}
.fight-btn:hover:not(:disabled) { transform: scale(1.04); filter: brightness(1.08); }
.fight-btn:active:not(:disabled) { transform: scale(0.98); }
.fight-btn:disabled { background: #4b4458; color: rgba(255, 255, 255, 0.35); cursor: not-allowed; }
.fight-btn-go { background: var(--red); color: white; }

/* ---------- character select layout ---------- */

.screen-select, .screen-stage {
  background:
    radial-gradient(ellipse at 15% 110%, rgba(63, 169, 245, 0.14), transparent 55%),
    radial-gradient(ellipse at 90% -10%, rgba(227, 54, 75, 0.16), transparent 50%),
    linear-gradient(160deg, var(--bg-2), var(--bg));
}

.select-body {
  display: grid;
  grid-template-columns: minmax(300px, 34%) 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
  padding: 18px 22px;
}

/* preview panel */
.preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.preview-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--panel);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.preview-card.has-fighter img { display: block; animation: card-in 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes card-in {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: none; }
}
.preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}
.preview-card.has-fighter .preview-empty { display: none; }

.preview-info { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.preview-title { color: var(--gold); min-height: 16px; }
.preview-name {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 44px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}
.preview-lore { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.65); min-height: 2.6em; }
.preview-special { color: var(--gold); min-height: 14px; }

.stats { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.stat-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
}
.bar {
  position: relative;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}
.bar i {
  position: absolute;
  inset: 0 100% 0 0;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: inset-inline-end 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* roster grid */
.roster-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.roster {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.tile {
  --hue: 200;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid hsl(var(--hue) 60% 45% / 0.7);
  background: hsl(var(--hue) 45% 16%);
  padding: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}
.tile:hover, .tile.focused {
  transform: scale(1.045);
  border-color: hsl(var(--hue) 90% 65%);
  box-shadow: 0 0 0 1px hsl(var(--hue) 90% 65% / 0.6), 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.tile.locked {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.tile-art {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  /* splash cards have the fighter on the right third */
  object-position: 82% 20%;
  transform: scale(1.35);
  transform-origin: 82% 25%;
  transition: transform 0.2s;
  pointer-events: none;
}
.tile:hover .tile-art, .tile.focused .tile-art { transform: scale(1.5); }

/* transparent cutout art: show the whole fighter on the tinted tile */
.tile-art-cut {
  object-fit: contain;
  object-position: center bottom;
  padding: 8px 6px 0;
  transform: none;
  transform-origin: center bottom;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}
.tile:hover .tile-art-cut, .tile.focused .tile-art-cut { transform: scale(1.08); }
.tile {
  background:
    radial-gradient(ellipse at 50% 100%, hsl(var(--hue) 70% 30% / 0.9), transparent 75%),
    hsl(var(--hue) 45% 16%);
}

.tile-name {
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  text-align: center;
  text-transform: uppercase;
}

.tile .p1-token,
.tile .p2-token {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 5px 7px;
  background: var(--blue);
  color: #06121c;
  font-family: var(--font-pixel);
  font-size: 9px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  animation: token-drop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tile .p2-token {
  left: auto;
  right: 6px;
  background: var(--red);
  color: white;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}
.tile.locked-p2 {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red), 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
@keyframes token-drop {
  from { transform: translateY(-14px) scale(1.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.roster-extra { display: flex; justify-content: center; }
.tile-random {
  --hue: 0;
  width: 130px;
  aspect-ratio: 4 / 3;
  border-color: rgba(255, 255, 255, 0.35);
  background: var(--panel);
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.random-mark {
  font-size: 40px;
  font-style: italic;
  font-weight: 900;
  color: var(--gold);
}
.tile-random .tile-name { background: transparent; }

.hint { text-align: center; color: rgba(255, 255, 255, 0.3); }

/* ---------- stage select ---------- */

.stage-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  flex: 1;
  min-height: 0;
  padding: 22px;
}

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.stage-card:hover { transform: scale(1.02); border-color: rgba(255, 255, 255, 0.5); }
.stage-card.locked {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

.stage-art { position: absolute; inset: 0; }

/* CSS-drawn stage art */
.stage-mempool .stage-art {
  background:
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(63, 169, 245, 0.16) 34px 36px),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(63, 169, 245, 0.1) 34px 36px),
    linear-gradient(180deg, #0a1a2e, #10263f 70%, #1c3c5e);
}
.stage-mempool .stage-art::after {
  content: "";
  position: absolute;
  left: 15%; right: 15%; bottom: 18%;
  height: 14px;
  background: rgba(63, 169, 245, 0.5);
  box-shadow: 0 0 24px rgba(63, 169, 245, 0.8);
}
.stage-rooftop .stage-art {
  background:
    linear-gradient(0deg, #241a33 30%, transparent 31%),
    radial-gradient(circle at 75% 22%, #ffc93c 8%, transparent 9%),
    linear-gradient(180deg, #341f4d, #59306b 60%, #8a4370);
}
.stage-rooftop .stage-art::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 30%;
  height: 26%;
  background:
    linear-gradient(90deg,
      #180f26 0 12%, transparent 12% 18%,
      #1d1230 18% 34%, transparent 34% 38%,
      #140c20 38% 58%, transparent 58% 63%,
      #1d1230 63% 82%, transparent 82% 86%,
      #180f26 86% 100%);
}
.stage-genesis .stage-art {
  background:
    conic-gradient(from 180deg at 50% 32%, transparent 0 100deg, rgba(255, 201, 60, 0.28) 140deg 220deg, transparent 260deg 360deg),
    linear-gradient(0deg, #2b2013 26%, transparent 27%),
    linear-gradient(180deg, #120d08, #2e2312 65%, #4a3417);
}
.stage-genesis .stage-art::after {
  content: "";
  position: absolute;
  left: 30%; right: 30%; bottom: 26%;
  height: 34%;
  background:
    linear-gradient(90deg,
      #57431f 0 12%, transparent 12% 22%,
      #57431f 22% 34%, transparent 34% 44%,
      #57431f 44% 56%, transparent 56% 66%,
      #57431f 66% 78%, transparent 78% 88%,
      #57431f 88% 100%);
  border-top: 10px solid #6b5426;
}

.stage-label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
}
.stage-name {
  font-size: clamp(18px, 2.2vw, 26px);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
}
.stage-tag { color: rgba(255, 255, 255, 0.55); }

/* ---------- connecting / arena full ---------- */

.connect-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 4, 9, 0.88);
  backdrop-filter: blur(6px);
}
.connect-veil[hidden] { display: none; }

.connect-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(460px, 100%);
  padding: 34px 30px;
  border: 2px solid var(--line);
  background: var(--panel);
  text-align: center;
}
.connect-status { font-size: 12px; color: var(--text); }
.connect-bar {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  overflow: hidden;
}
.connect-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  transition: width 0.25s;
}
.connect-sub { color: rgba(255, 255, 255, 0.4); }

.full-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(560px, 100%);
  padding: 38px 34px;
  border: 3px solid var(--red);
  background: var(--panel);
  text-align: center;
  animation: full-shake 0.4s;
  box-shadow: 0 0 60px rgba(227, 54, 75, 0.35);
}
.full-box[hidden] { display: none; }
@keyframes full-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.full-kicker { color: var(--red); }
.full-title {
  margin: 0;
  font-size: clamp(44px, 8vw, 84px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--red);
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
}
.full-count {
  padding: 8px 14px;
  background: rgba(227, 54, 75, 0.18);
  color: var(--gold);
  font-size: 13px;
}
.full-msg { margin: 0; max-width: 26rem; font-size: 15px; color: rgba(255, 255, 255, 0.75); }
.full-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.full-queue { color: rgba(255, 255, 255, 0.35); }

/* ---------- announcer overlay ---------- */

.announcer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}
.announcer span {
  font-size: clamp(40px, 8vw, 110px);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: white;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.4);
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.35), 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: announce 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes announce {
  0% { opacity: 0; transform: scale(2.2); }
  25% { opacity: 1; transform: scale(1); }
  75% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.05) translateY(-10px); }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  html, body { overflow: auto; }
  .screen { position: relative; min-height: 100svh; }
  .screen:not(.active) { display: none; }
  .select-body { grid-template-columns: 1fr; overflow: visible; }
  .roster { grid-template-columns: repeat(3, 1fr); }
  .roster .tile { aspect-ratio: 1; }
  .stage-body { grid-template-columns: 1fr; }
  .stage-card { min-height: 180px; }
}
