:root {
  --bg: #07111f;
  --ink: #f6fbff;
  --muted: #a8bac9;
  --panel: rgba(9, 20, 36, .86);
  --panel-solid: #101d31;
  --line: rgba(118, 221, 255, .26);
  --blue: #45c8ff;
  --gold: #ffc45b;
  --green: #65f19a;
  --red: #ff6678;
  --purple: #b98cff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .36), inset 0 0 0 1px rgba(255,255,255,.03);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top, #183452 0, #07111f 46%, #04070d 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
input { min-width: 0; }
.hidden { display: none !important; }

.arena-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.grid-floor {
  position: absolute; left: 10%; right: 10%; bottom: -8%; height: 36%;
  background-image: linear-gradient(rgba(69,200,255,.24) 1px, transparent 1px), linear-gradient(90deg, rgba(69,200,255,.18) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(620px) rotateX(62deg);
  transform-origin: bottom center;
  animation: floorMove 4s linear infinite;
  opacity: .28;
}
.light-beam { position: absolute; top: -20%; width: 10vw; height: 140%; transform: rotate(18deg); filter: blur(20px); opacity: .16; }
.beam-a { left: 6%; background: var(--blue); }
.beam-b { right: 38%; background: var(--gold); transform: none; }
@keyframes floorMove { to { background-position: 0 44px; } }

.intro-stage {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: #030812; overflow: hidden;
}
.intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.intro-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,8,18,.18), rgba(3,8,18,.86)); }
.bvs-stage.playing::after { display: none; }
.bvs-stage.playing .intro-panel { display: none; }
.bvs-stage.playing .intro-video { opacity: 1; }
.ad-stage { background: #000; padding: 0; }
.ad-stage::after { display: none; }
.ad-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ad-skip { position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: 14px; }
.intro-panel {
  position: relative; z-index: 2; width: min(560px, 100%); padding: 26px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(5, 13, 24, .78); box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(12px);
}
.intro-panel h1 { margin: 6px 0 10px; font-size: clamp(36px, 11vw, 82px); line-height: .92; letter-spacing: .03em; }
.intro-panel p { margin: 0 auto 20px; max-width: 440px; color: var(--muted); line-height: 1.55; }
.title-stage { background: radial-gradient(circle at 50% 24%, #17456a, #050a13 70%); }
.title-stage::after { background: linear-gradient(180deg, rgba(3,8,18,.05), rgba(3,8,18,.72)); }
.title-card { position: absolute; width: min(430px, 86vw); max-height: 74vh; object-fit: contain; opacity: .5; filter: drop-shadow(0 24px 60px rgba(69,200,255,.34)); animation: cardRise .9s ease both; }
.title-burst { position: absolute; width: 72vmin; height: 72vmin; border-radius: 50%; border: 1px solid rgba(69,200,255,.35); box-shadow: 0 0 70px rgba(69,200,255,.35), inset 0 0 70px rgba(255,196,91,.16); animation: pulse 1.5s ease-in-out infinite alternate; }
.title-panel { margin-top: auto; }
@keyframes cardRise { from { transform: translateY(28px) scale(.94); opacity: 0; } }
@keyframes pulse { to { transform: scale(1.04); opacity: .72; } }

.app { position: relative; z-index: 1; min-height: 100vh; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1180px; margin: 0 auto 12px; }
.brand h1 { margin: 0; font-size: clamp(30px, 7vw, 58px); line-height: .95; letter-spacing: .04em; }
.micro { margin: 0; color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.hud-strip { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.hud-strip span, .mini-btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(7, 18, 32, .76); color: var(--ink); font-weight: 850; font-size: 12px;
}

.shell { width: min(1180px, 100%); margin: 0 auto; }
.main-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px;
}
.app.playing .main-tabs { display: none; }
.tab-btn, .btn {
  min-height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink);
  background: rgba(9, 22, 39, .8); font-weight: 900; letter-spacing: .02em; transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.tab-btn.active { background: linear-gradient(135deg, rgba(69,200,255,.28), rgba(255,196,91,.18)); border-color: rgba(69,200,255,.65); }
.tab-btn.quit { border-color: rgba(255,102,120,.36); }
.tab-separator { display: none; }
.btn.primary { border: none; background: linear-gradient(135deg, var(--blue), #8fe6ff 48%, var(--gold)); color: #06101e; box-shadow: 0 10px 30px rgba(69,200,255,.24); }
.btn.ghost { background: rgba(10, 22, 38, .58); }
.btn.xl { min-height: 58px; padding-inline: 20px; font-size: 16px; }
.tab-btn:active, .btn:active, .mini-btn:active { transform: scale(.98); }

.panel {
  position: relative; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(13, 29, 49, .9), rgba(7, 16, 29, .84));
  box-shadow: var(--shadow); overflow: hidden;
}
.home-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 18px; min-height: 430px; padding: 22px; }
.home-copy { align-self: center; }
.home-copy h2, .page-panel h2, .result-card h2 { margin: 6px 0 10px; font-size: clamp(32px, 6vw, 64px); line-height: 1; }
.home-copy p, .page-panel p, .result-card p { color: var(--muted); line-height: 1.55; }
.mode-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-card { position: relative; min-height: 390px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(69,200,255,.34); background: #06101e; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(4,8,15,.96) 88%); }
.hero-card-copy { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.hero-card-copy span { color: var(--gold); font-weight: 950; font-size: 13px; }
.hero-card-copy strong { font-size: 34px; letter-spacing: .04em; }
.card-mini-stats {
  position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 68px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.card-mini-stats span { padding: 7px 8px; border-radius: 10px; background: rgba(3,9,18,.72); border: 1px solid rgba(69,200,255,.18); color: var(--muted); font-size: 10px; font-weight: 950; text-align: center; }

.mode-details { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin-top: 12px; }
.detail-card, .page-panel, .result-card, .round-feed { padding: 18px; }
.setup-grid, .score-help, .stat-grid { display: grid; gap: 10px; }
.setup-grid { grid-template-columns: repeat(3, 1fr); }
.setup-option, .score-help div, .stat-grid div, .result-stats div {
  padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.045);
}
.setup-option strong, .score-help strong, .stat-grid strong, .result-stats strong { display: block; color: var(--blue); font-size: 24px; }
.setup-option span, .score-help span, .stat-grid span, .result-stats span { color: var(--muted); font-weight: 750; }
.ladder-preview, .profile-ladder, .support-preview, .ai-roster { margin-top: 14px; }
.ladder-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ladder-title h3 { margin: 0; font-size: 20px; }
.ladder-title span { color: var(--gold); font-weight: 950; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ladder-stack {
  position: relative; display: grid; gap: 8px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.48), transparent 28%, transparent 72%, rgba(0,0,0,.48)),
    url("./assets/ladder-reference.webp") center / auto 100% no-repeat,
    rgba(255,255,255,.035);
}
.ladder-step {
  min-height: 58px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid hsla(var(--card-hue, 194), 86%, 64%, .22); border-radius: 12px; background: rgba(5, 12, 22, .86); box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.ladder-step.next { border-color: rgba(255,196,91,.72); background: linear-gradient(135deg, rgba(255,196,91,.16), rgba(69,200,255,.12)), rgba(5,12,22,.9); }
.ladder-step.cleared { opacity: .72; }
.ladder-rank { color: var(--gold); font-weight: 1000; }
.ladder-name { display: grid; gap: 2px; }
.ladder-name strong { color: var(--ink); font-size: 15px; }
.ladder-name span { color: var(--muted); font-size: 12px; font-weight: 750; }
.ladder-status { color: var(--blue); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.vs-preview { margin-top: 14px; }
.vs-preview-art {
  min-height: 210px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5,12,22,.04), rgba(5,12,22,.22)),
    url("./assets/arena-champions.webp") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 14px 30px rgba(0,0,0,.26);
}
/* Portrait trading cards (3:5): the hero art is a 2:3 crop, shown with cover so it never squashes. */
.ai-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 12px; }
.ai-card-grid .ai-card { width: 100%; max-width: 200px; justify-self: center; }
.ai-card {
  position: relative; display: grid; grid-template-rows: auto auto auto; gap: 10px; overflow: hidden;
  padding: 12px; border-radius: 16px; border: 1px solid hsla(var(--card-hue), 86%, 64%, .34);
  background:
    radial-gradient(circle at 50% 24%, hsla(var(--card-hue), 92%, 62%, .38), transparent 24%),
    linear-gradient(160deg, rgba(16, 26, 44, .96), rgba(4, 9, 17, .96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 14px 30px rgba(0,0,0,.26);
}
.ai-card::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid hsla(var(--card-hue), 86%, 70%, .2); border-radius: 12px; pointer-events: none;
}
.ai-card::after {
  content: ""; position: absolute; left: -45%; top: -35%; width: 38%; height: 170%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  animation: cardSheen 4.6s ease-in-out infinite;
}
.ai-card-face {
  align-self: stretch; justify-self: stretch; aspect-ratio: 3 / 5; border-radius: 13px; border: 1px solid hsla(var(--card-hue), 86%, 70%, .2);
  background:
    linear-gradient(180deg, transparent 48%, rgba(4,9,17,.84)),
    var(--art, none) center / cover no-repeat;
  box-shadow: inset 0 0 32px rgba(0,0,0,.26);
}
.ai-card-copy { position: relative; z-index: 1; display: grid; gap: 2px; }
.ai-card-copy span { color: var(--gold); font-size: 11px; font-weight: 950; }
.ai-card-copy strong { font-size: 18px; line-height: 1; }
.ai-card-copy em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 750; }
.ai-card-stats { position: relative; z-index: 1; display: grid; gap: 6px; }
.ai-card-stats span { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 6px; font-size: 10px; font-weight: 950; color: var(--muted); }
.ai-card-stats i { height: 6px; border-radius: 999px; background: linear-gradient(90deg, hsl(var(--card-hue), 88%, 62%) var(--v), rgba(255,255,255,.09) var(--v)); }
.ai-card-stats strong { color: var(--ink); font-size: 11px; }
.support-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.support-card {
  position: relative; min-height: 150px; display: grid; align-content: end; gap: 5px; padding: 14px; overflow: hidden;
  border: 1px solid rgba(255,196,91,.26); border-radius: 16px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,196,91,.34), transparent 24%),
    linear-gradient(160deg, rgba(36,25,18,.92), rgba(8,15,29,.94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 12px 28px rgba(0,0,0,.24);
}
.support-card::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; pointer-events: none;
}
.support-card::after {
  content: ""; position: absolute; width: 46px; height: 140%; top: -20%; left: -70px; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  animation: cardSheen 3.8s ease-in-out infinite;
}
.support-glow { position: absolute; top: 18px; left: 50%; width: 58px; height: 58px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(69,200,255,.88), rgba(69,200,255,.08) 58%, transparent 70%); }
.support-card b { position: relative; color: var(--gold); font-size: 28px; z-index: 1; }
.support-card strong { position: relative; z-index: 1; font-size: 15px; }
.support-card em { position: relative; z-index: 1; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 750; }
@keyframes cardSheen { 0%, 45% { left: -70px; } 70%, 100% { left: calc(100% + 40px); } }

.game-screen { display: grid; gap: 12px; }
.combat-fx { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0; mix-blend-mode: screen; }
.combat-fx::before, .combat-fx::after { content: ""; position: absolute; inset: 0; }
.combat-fx.ready { opacity: .38; background: radial-gradient(circle at 50% 46%, rgba(69,200,255,.22), transparent 32%); animation: fxReady .48s ease both; }
.combat-fx.power {
  opacity: .85;
  background: radial-gradient(circle at 28% 48%, rgba(101,241,154,.5), transparent 24%), radial-gradient(circle at 50% 50%, rgba(69,200,255,.34), transparent 34%);
  animation: fxPower .55s ease-out both;
}
.combat-fx.impact, .combat-fx.strike {
  opacity: .95;
  background: linear-gradient(110deg, transparent 0 38%, rgba(255,255,255,.84) 39% 41%, transparent 42% 100%), radial-gradient(circle at 52% 47%, rgba(255,196,91,.72), transparent 20%);
  animation: fxImpact .34s ease-out both;
}
.combat-fx.strike::before { background: repeating-linear-gradient(105deg, transparent 0 18px, rgba(69,200,255,.38) 19px 22px, transparent 23px 44px); animation: speedLines .32s linear both; }
.combat-fx.miss { opacity: .45; background: radial-gradient(circle at 50% 48%, rgba(255,102,120,.42), transparent 30%); animation: fxMiss .46s ease both; }
@keyframes fxReady { from { transform: scale(.94); opacity: 0; } }
@keyframes fxPower { 0% { transform: scale(.9); filter: saturate(1); } 45% { transform: scale(1.04); filter: saturate(1.8); } 100% { opacity: 0; } }
@keyframes fxImpact { 0% { transform: translateX(-18px); } 70% { opacity: .65; } 100% { opacity: 0; transform: translateX(18px); } }
@keyframes speedLines { to { transform: translateX(90px); opacity: 0; } }
@keyframes fxMiss { 50% { filter: hue-rotate(20deg); } 100% { opacity: 0; } }
.game-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; }
.game-top h2 { margin: 2px 0 0; font-size: clamp(22px, 5vw, 40px); }
.round-score { min-width: 112px; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 28px; font-weight: 1000; }
.battle-lane { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fighter-card {
  min-height: 154px; position: relative; display: flex; align-items: end; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); box-shadow: var(--shadow);
}
.fighter-card::before {
  content: ""; position: absolute; inset: 8px; z-index: 2; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; pointer-events: none;
  box-shadow: inset 0 0 24px rgba(69,200,255,.07);
}
.fighter-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; opacity: .82; }
.fighter-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 15%, rgba(4,8,15,.94)); }
.fighter-card > div:not(.bot-face) { position: relative; z-index: 2; width: 100%; padding: 14px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.fighter-card span { color: var(--gold); font-size: 12px; font-weight: 950; }
.fighter-card strong { font-size: 18px; }
.bot-face {
  position: absolute; top: 12px; bottom: 12px; left: 16px; width: min(118px, 34vw); display: grid; place-items: center; border-radius: 16px;
  background:
    linear-gradient(180deg, transparent 45%, rgba(4,9,17,.82)),
    var(--art, none) center / cover no-repeat;
  color: hsl(var(--card-hue, 42), 92%, 72%); font-size: 58px; font-weight: 1000;
  text-shadow: 0 0 24px hsla(var(--card-hue, 42), 92%, 62%, .55);
}
.fighter-card.hit { animation: hit .42s ease; }
.fighter-card.power { animation: power .58s ease; }
.fighter-card.hit::before {
  background:
    linear-gradient(40deg, transparent 0 44%, rgba(255,255,255,.66) 45% 46%, transparent 47%),
    linear-gradient(130deg, transparent 0 58%, rgba(255,102,120,.62) 59% 60%, transparent 61%);
}
.fighter-card.power::before {
  border-color: rgba(101,241,154,.52);
  box-shadow: inset 0 0 28px rgba(101,241,154,.18), 0 0 30px rgba(101,241,154,.28);
  animation: auraTrim .58s ease both;
}
@keyframes hit { 20% { transform: translateX(-11px) rotate(-1deg); filter: brightness(.78) saturate(.8); } 48% { transform: translateX(8px) rotate(1deg); } 76% { transform: translateX(-3px); } }
@keyframes power { 45% { transform: scale(1.035); box-shadow: 0 0 42px rgba(101,241,154,.42), 0 0 72px rgba(69,200,255,.2); filter: brightness(1.16) saturate(1.2); } }
@keyframes auraTrim { 50% { transform: scale(.97); } }

.question-panel { padding: 18px; text-align: center; }
.timer-track { height: 16px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.timer-track span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--green), var(--blue), var(--gold), var(--red)); }
.feedback { min-height: 25px; margin: 14px 0 4px; color: var(--muted); font-weight: 850; }
.question { min-height: 86px; display: grid; place-items: center; font-size: clamp(54px, 16vw, 106px); font-weight: 1000; letter-spacing: 0; text-shadow: 0 0 28px rgba(69,200,255,.45); }
.answer-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 520px; margin: 0 auto 12px; }
.answer-row input { min-height: 58px; border: 1px solid rgba(69,200,255,.4); border-radius: 14px; padding: 10px 14px; background: rgba(2,8,16,.82); color: var(--ink); font-size: 28px; font-weight: 950; text-align: center; outline: none; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; margin: 0 auto; }
.keypad button { min-height: 54px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.065); color: var(--ink); font-size: 22px; font-weight: 950; }
.round-feed ol { display: grid; gap: 8px; max-height: 190px; overflow: auto; margin: 10px 0 0; padding: 0; list-style: none; }
.round-feed li, .result-breakdown p { margin: 0; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.05); color: #dcecf5; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.profile-grid { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 16px; align-items: center; }
.profile-grid img { width: 100%; border-radius: 18px; border: 1px solid var(--line); }
.editable-card { position: relative; border-radius: 18px; overflow: hidden; }
.editable-card-overlay {
  position: absolute; inset: 14px 14px auto; display: grid; gap: 7px; padding: 10px;
  border: 1px solid rgba(69,200,255,.22); border-radius: 12px; background: rgba(2,8,16,.68); backdrop-filter: blur(8px);
}
.editable-card-overlay > span { color: var(--gold); font-size: 12px; font-weight: 950; }
.editable-card-overlay > strong { font-size: 28px; line-height: 1; }
.editable-card .card-mini-stats { position: static; }
.stat-grid { grid-template-columns: repeat(2, 1fr); }
.card-editor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.card-editor label { display: grid; gap: 7px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
.card-editor span { color: var(--muted); font-weight: 850; font-size: 12px; }
.card-editor input { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: rgba(2,8,16,.8); color: var(--ink); padding: 8px 10px; font-weight: 900; }
.settings-list { display: grid; gap: 10px; max-width: 640px; }
.settings-list label { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); }
.settings-list input[type="number"] { width: 82px; min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: rgba(2,8,16,.8); color: var(--ink); text-align: center; }
.settings-list input[type="checkbox"] { width: 24px; height: 24px; }
.result-screen { max-width: 880px; margin: 0 auto; }
.result-card { animation: resultEntrance .56s cubic-bezier(.2, 1, .2, 1) both; }
.result-card::after {
  content: ""; position: absolute; inset: -40%; pointer-events: none; opacity: .18;
  background: conic-gradient(from 0deg, transparent, rgba(69,200,255,.36), transparent, rgba(255,196,91,.28), transparent);
  animation: resultSweep 4s linear infinite;
}
.result-card > * { position: relative; z-index: 1; }
@keyframes resultEntrance { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes resultSweep { to { transform: rotate(360deg); } }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.result-breakdown { display: grid; gap: 8px; margin-bottom: 16px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(22px); opacity: 0; pointer-events: none; max-width: min(520px, calc(100% - 24px)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5,12,22,.94); color: var(--ink); box-shadow: var(--shadow); font-weight: 850; transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* .fx-keep = ultimate card effects: gameplay feedback, so they still play with reduce motion on (v2.15.0) */
body.reduce-motion :not(.fx-keep, .fx-keep *), body.reduce-motion :not(.fx-keep, .fx-keep *)::before, body.reduce-motion :not(.fx-keep, .fx-keep *)::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

@media (min-width: 900px) {
  .main-tabs { grid-template-columns: repeat(3, minmax(100px, 1fr)) 14px minmax(150px, 1.2fr) repeat(3, minmax(95px, .8fr)); align-items: center; }
  .main-tabs .tab-btn[data-tab="news"] { padding-inline: 8px; }
  .tab-separator { display: block; height: 2px; background: rgba(255,255,255,.18); }
}

@media (max-width: 760px) {
  .app { padding-inline: 10px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .hud-strip { width: 100%; justify-content: stretch; }
  .hud-strip span, .hud-strip .mini-btn { flex: 1; }
  .main-tabs { grid-template-columns: 1fr 1fr; position: sticky; top: 0; z-index: 10; padding: 8px 0; background: linear-gradient(180deg, rgba(7,17,31,.98), rgba(7,17,31,.86)); }
  .home-panel, .mode-details, .profile-grid, .result-stats { grid-template-columns: 1fr; }
  .home-panel { padding: 16px; min-height: auto; }
  .hero-card { min-height: 330px; }
  .setup-grid, .stat-grid { grid-template-columns: 1fr; }
  .card-editor { grid-template-columns: 1fr 1fr; }
  .support-row { grid-template-columns: 1fr; }
  .ladder-step { grid-template-columns: 34px 1fr; }
  .ladder-status { grid-column: 2; }
  .game-top { grid-template-columns: auto 1fr; }
  .round-score { grid-column: 1 / -1; width: 100%; }
  .battle-lane { grid-template-columns: 1fr; }
  .fighter-card { min-height: 118px; }
  .enemy .bot-face { top: 10px; bottom: 10px; left: 12px; width: 78px; font-size: 38px; }
  .question-panel { padding: 14px; }
  .answer-row { grid-template-columns: 1fr; }
  .answer-row .btn { min-height: 54px; }
  .round-feed ol { max-height: 150px; }
}

@media (max-width: 390px) {
  .tab-btn { padding-inline: 8px; font-size: 13px; }
  .question { font-size: 48px; min-height: 76px; }
  .keypad button { min-height: 50px; }
}

/* ══════════════════════════════════════════════════════════
   THEONE FIRE AURA — Animated energy on hero & battle card
   ══════════════════════════════════════════════════════════ */

/* ── Shared aura setup ────────────────────────────────────── */
.hero-card,
.fighter-card.player {
  position: relative;
  isolation: isolate;
}

/* ── Outer energy ring ────────────────────────────────────── */
.hero-card::before,
.fighter-card.player::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  background: transparent;
  border: 2px solid rgba(69,200,255,0);
  box-shadow:
    0 0 12px  3px rgba(69,200,255,.55),
    0 0 28px  6px rgba(69,200,255,.35),
    0 0 55px 12px rgba(30,120,255,.30),
    0 0 90px 20px rgba(69,200,255,.15),
    inset 0 0 22px rgba(69,200,255,.12);
  animation: aura-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

/* ── Flame flicker layer ──────────────────────────────────── */
.hero-card::after,
.fighter-card.player::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 60% 90% at 20% 100%, rgba(69,200,255,.28) 0%, transparent 70%),
    radial-gradient(ellipse 60% 90% at 80% 100%, rgba(30,100,255,.22) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 50% 110%, rgba(100,220,255,.20) 0%, transparent 65%);
  animation: flame-flicker 1.8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
  filter: blur(6px);
}

/* ── Side energy streaks ──────────────────────────────────── */
.hero-card .aura-streak,
.fighter-card.player .aura-streak {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes aura-pulse {
  0%, 100% {
    box-shadow:
      0 0 12px  3px rgba(69,200,255,.55),
      0 0 28px  6px rgba(69,200,255,.35),
      0 0 55px 12px rgba(30,120,255,.30),
      0 0 90px 20px rgba(69,200,255,.15),
      inset 0 0 22px rgba(69,200,255,.12);
    opacity: 1;
  }
  50% {
    box-shadow:
      0 0 18px  5px rgba(69,200,255,.80),
      0 0 40px 10px rgba(69,200,255,.55),
      0 0 75px 18px rgba(30,140,255,.45),
      0 0 130px 30px rgba(69,200,255,.22),
      inset 0 0 32px rgba(69,200,255,.20);
    opacity: 1;
  }
}

@keyframes flame-flicker {
  0% {
    transform: scaleX(1) scaleY(1) translateY(0px);
    opacity: .7;
  }
  25% {
    transform: scaleX(1.04) scaleY(1.03) translateY(-3px);
    opacity: .9;
  }
  50% {
    transform: scaleX(.97) scaleY(1.06) translateY(-5px);
    opacity: 1;
  }
  75% {
    transform: scaleX(1.06) scaleY(1.02) translateY(-2px);
    opacity: .85;
  }
  100% {
    transform: scaleX(.98) scaleY(1.08) translateY(-7px);
    opacity: .95;
  }
}

/* ── Floating energy particles ────────────────────────────── */
.hero-card .aura-particle,
.fighter-card.player .aura-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(69,200,255,.9);
  box-shadow: 0 0 6px 2px rgba(69,200,255,.7);
  pointer-events: none;
  z-index: 4;
  animation: particle-rise var(--dur, 2.2s) ease-in var(--delay, 0s) infinite;
}

@keyframes particle-rise {
  0%   { transform: translateY(0) translateX(var(--sx,0px)) scale(1);   opacity: .9; }
  60%  { transform: translateY(-80px) translateX(var(--mx,8px)) scale(.7); opacity: .6; }
  100% { transform: translateY(-160px) translateX(var(--ex,0px)) scale(.2); opacity: 0; }
}

/* ── Power-up flash when a round starts ───────────────────── */
.fighter-card.player.power-up::before {
  animation: aura-poweron .4s ease both, aura-pulse 2.4s ease-in-out .4s infinite;
  border-color: rgba(69,200,255,.6);
}
@keyframes aura-poweron {
  0%   { opacity: 0; transform: scale(.85); }
  60%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Reduce motion override ───────────────────────────────── */
body.reduce-motion .hero-card::before,
body.reduce-motion .hero-card::after,
body.reduce-motion .fighter-card.player::before,
body.reduce-motion .fighter-card.player::after,
body.reduce-motion .aura-particle {
  animation: none !important;
}

/* ── Online PvP duel ─────────────────────────────────────── */
.online-lane .fighter-card { position: relative; }
.hp-bar {
  grid-column: 1 / -1; height: 12px; margin-top: 8px; border-radius: 999px;
  background: rgba(2, 8, 16, .82); border: 1px solid rgba(255,255,255,.12); overflow: hidden;
}
.hp-fill {
  display: block; height: 100%; width: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #b6ffcf);
  transition: width .45s cubic-bezier(.2,.9,.2,1), background .3s ease;
}
.hp-fill.low  { background: linear-gradient(90deg, var(--gold), #ffe29a); }
.hp-fill.crit { background: linear-gradient(90deg, var(--red), #ff9aa8); }

.online-banner {
  min-height: 0; max-height: 0; opacity: 0; overflow: hidden; text-align: center;
  font-weight: 1000; letter-spacing: .04em; transition: opacity .18s ease, max-height .18s ease;
}
.online-banner.show { max-height: 120px; opacity: 1; margin: 6px 0 2px; }
.online-banner.vs    { font-size: clamp(20px, 6vw, 34px); color: var(--blue); text-shadow: 0 0 22px rgba(69,200,255,.5); }
.online-banner.fight { font-size: clamp(26px, 8vw, 46px); color: var(--gold); text-shadow: 0 0 26px rgba(255,196,91,.6); }
.online-banner.count { font-size: clamp(40px, 14vw, 92px); color: var(--ink); text-shadow: 0 0 30px rgba(255,255,255,.4); }
.online-banner.search { font-size: clamp(16px, 4vw, 22px); color: var(--muted); letter-spacing: .3em; }
.online-banner.warn  { font-size: clamp(13px, 3.4vw, 16px); color: var(--red); letter-spacing: .02em; }

#onlineResult.result-card { margin-top: 12px; }
#onlineResultTitle { font-size: clamp(26px, 8vw, 46px); font-weight: 1000; }

/* ── Friends + challenge ─────────────────────────────────── */
.friends-panel { display: grid; gap: 12px; }
.friends-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.friends-head #myPlayerId { font-size: 22px; font-weight: 1000; letter-spacing: .14em; color: var(--gold); }
.add-friend { display: flex; gap: 8px; }
.add-friend input { flex: 1; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: rgba(2,8,16,.82); color: var(--ink); padding: 8px 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.add-friend .btn { white-space: nowrap; }
.friends-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.friend-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(6,14,26,.7); cursor: context-menu; }
.friend-row:focus { outline: 2px solid var(--blue); }
.friend-dot { width: 10px; height: 10px; border-radius: 50%; }
.friend-dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.friend-dot.off { background: #51606f; }
.friend-name { font-weight: 900; }
.friend-id { color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.friend-empty { color: var(--muted); padding: 10px 2px; }
.friend-challenge[disabled] { opacity: .45; cursor: not-allowed; }

.ctx-menu { position: fixed; z-index: 80; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,16,28,.98); box-shadow: var(--shadow); display: grid; gap: 2px; }
.ctx-menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--ink); padding: 10px 12px; border-radius: 8px; font-weight: 800; cursor: pointer; }
.ctx-menu button:hover:not([disabled]) { background: rgba(69,200,255,.16); }
.ctx-menu button[disabled] { opacity: .4; cursor: not-allowed; }

.modal-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3,8,16,.72); backdrop-filter: blur(4px); }
.modal-card { max-width: 420px; width: 100%; text-align: center; display: grid; gap: 12px; }
.modal-card h2 { font-size: clamp(22px, 6vw, 32px); font-weight: 1000; }

/* ── Cinematic FX (original effects, no third-party art) ──── */
.fx-flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0; }
.fx-flash.win   { animation: fxflash .32s ease-out; background: radial-gradient(circle at 50% 50%, rgba(101,241,154,.5), transparent 62%); }
.fx-flash.lose  { animation: fxflash .32s ease-out; background: radial-gradient(circle at 50% 50%, rgba(255,102,120,.5), transparent 62%); }
.fx-flash.fight { animation: fxflash .3s  ease-out; background: radial-gradient(circle at 50% 50%, rgba(255,196,91,.55), transparent 62%); }
@keyframes fxflash { 0% { opacity: .9; } 100% { opacity: 0; } }

.fx-vignette { position: fixed; inset: 0; z-index: 69; pointer-events: none; opacity: 0; }
.fx-vignette.ko { animation: fxvig 1.1s ease-out; }
@keyframes fxvig { 0% { opacity: 0; box-shadow: inset 0 0 0 0 rgba(255,20,50,0); } 30% { opacity: 1; box-shadow: inset 0 0 200px 70px rgba(255,20,50,.6); } 100% { opacity: 0; box-shadow: inset 0 0 220px 90px rgba(255,20,50,0); } }

.shake { animation: shakefx .44s cubic-bezier(.36,.07,.19,.97); }
@keyframes shakefx { 10%{transform:translate(-3px,2px)} 20%{transform:translate(4px,-3px)} 30%{transform:translate(-5px,3px)} 40%{transform:translate(5px,-2px)} 50%{transform:translate(-4px,2px)} 60%{transform:translate(3px,-3px)} 70%{transform:translate(-3px,2px)} 80%{transform:translate(2px,-1px)} 100%{transform:translate(0,0)} }

.fighter-card { position: relative; }
.dmg-float { position: absolute; left: 50%; top: 36%; transform: translateX(-50%); font-weight: 1000; font-size: 30px; color: var(--red); text-shadow: 0 2px 12px rgba(0,0,0,.65); pointer-events: none; z-index: 6; animation: dmgfloat .9s ease-out forwards; }
@keyframes dmgfloat { 0%{opacity:0; transform: translate(-50%,12px) scale(.6);} 20%{opacity:1;} 100%{opacity:0; transform: translate(-50%,-48px) scale(1.25);} }

.online-banner.vs    { animation: vsslam .5s cubic-bezier(.2,1.4,.3,1); }
@keyframes vsslam    { 0%{transform:scale(2.6);opacity:0;} 60%{opacity:1;} 100%{transform:scale(1);opacity:1;} }
.online-banner.fight { animation: fightslam .5s cubic-bezier(.2,1.5,.3,1); }
@keyframes fightslam { 0%{transform:scale(.3) rotate(-6deg);opacity:0;} 50%{transform:scale(1.25) rotate(2deg);opacity:1;} 100%{transform:scale(1) rotate(0);opacity:1;} }
.online-banner.count { animation: countpop .9s ease-out; }
@keyframes countpop  { 0%{transform:scale(.4);opacity:0;} 30%{transform:scale(1.25);opacity:1;} 100%{transform:scale(1);opacity:.9;} }

body.reduce-motion .shake, body.reduce-motion .fx-flash, body.reduce-motion .fx-vignette,
body.reduce-motion .dmg-float, body.reduce-motion .online-banner { animation: none !important; }

/* ── Cinematic VS intro (online match start) ── */
.vs-intro {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 16px; overflow: hidden;
  background: radial-gradient(ellipse at center, #183452 0, #04070d 70%);
}
.vs-intro.out { animation: vsout .45s ease-in forwards; }
.vs-bar { position: absolute; left: 0; right: 0; height: 9vh; background: #000; z-index: 2; }
.vs-bar.top { top: 0; } .vs-bar.bottom { bottom: 0; }
.vs-stage {
  position: relative; z-index: 1; width: 100%; max-width: 980px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(8px, 3vw, 40px);
}
.vs-fighter { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; opacity: 0; }
.vs-avatar {
  width: clamp(84px, 26vw, 200px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--blue); box-shadow: 0 0 34px rgba(69,200,255,.45); background: var(--panel-solid);
  display: grid; place-items: center;
}
.vs-fighter.right .vs-avatar { border-color: var(--red); box-shadow: 0 0 34px rgba(255,102,120,.45); }
.vs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vs-avatar.mono span { font-size: clamp(40px, 13vw, 96px); font-weight: 1000; color: var(--red); }
.vs-fighter h2 {
  margin: 0; max-width: 100%; font-size: clamp(16px, 5.4vw, 38px); font-weight: 1000; letter-spacing: .04em;
  line-height: 1.05; overflow-wrap: anywhere; text-shadow: 0 0 20px rgba(69,200,255,.5);
}
.vs-fighter.right h2 { text-shadow: 0 0 20px rgba(255,102,120,.5); }
.vs-stats { margin: 0; display: grid; gap: 6px; width: 100%; max-width: 220px; opacity: 0; }
.vs-stats div {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); font-size: clamp(11px, 3.2vw, 15px);
}
.vs-stats dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.vs-stats dd { margin: 0; font-weight: 900; color: var(--gold); white-space: nowrap; }
.vs-mark {
  font-size: clamp(44px, 15vw, 130px); font-weight: 1000; font-style: italic; color: var(--gold);
  text-shadow: 0 0 30px rgba(255,196,91,.75), 0 0 80px rgba(255,196,91,.35); opacity: 0;
}
.vs-tag { position: relative; z-index: 1; margin: 22px 0 0; color: var(--muted); letter-spacing: .3em; text-transform: uppercase; font-size: clamp(10px, 2.8vw, 14px); opacity: 0; }

.vs-intro.play .vs-bar.top    { animation: barin .6s ease-out both; }
.vs-intro.play .vs-bar.bottom { animation: barin-b .6s ease-out both; }
.vs-intro.play .vs-stage      { animation: pushin 8s linear both; }
.vs-intro.play .vs-fighter.left  { animation: slam-l .55s .2s cubic-bezier(.2,1.3,.3,1) both; }
.vs-intro.play .vs-fighter.right { animation: slam-r .55s .4s cubic-bezier(.2,1.3,.3,1) both; }
.vs-intro.play .vs-mark  { animation: vsslam .6s .75s cubic-bezier(.2,1.4,.3,1) both, vspulse 1.6s 1.4s ease-in-out infinite; }
.vs-intro.play .vs-stats { animation: fadeup .5s 1.3s ease-out both; }
.vs-intro.play .vs-tag   { animation: fadeup .6s 1.8s ease-out both; }
@keyframes barin   { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes barin-b { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pushin  { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes slam-l  { from { opacity: 0; transform: translateX(-60vw) skewX(-12deg); } to { opacity: 1; transform: none; } }
@keyframes slam-r  { from { opacity: 0; transform: translateX(60vw) skewX(12deg); } to { opacity: 1; transform: none; } }
@keyframes vspulse { 0%,100% { text-shadow: 0 0 30px rgba(255,196,91,.75), 0 0 80px rgba(255,196,91,.35); } 50% { text-shadow: 0 0 46px rgba(255,196,91,1), 0 0 120px rgba(255,196,91,.55); } }
@keyframes fadeup  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes vsout   { to { opacity: 0; transform: scale(1.08); } }
@media (max-width: 420px) { .vs-stats div { flex-direction: column; align-items: center; gap: 0; padding: 5px 6px; } }
body.reduce-motion .vs-intro * { animation: none !important; opacity: 1 !important; }
/* VS intro fighter card details */
.vs-rank { margin: 0; font-size: clamp(11px, 3vw, 15px); letter-spacing: .14em; color: var(--muted); opacity: 0; }
.vs-rank b { display: block; font-size: clamp(22px, 7vw, 46px); letter-spacing: .02em; color: var(--gold); text-shadow: 0 0 22px rgba(255,196,91,.55); line-height: 1.05; }
.vs-loc { margin: 0; font-size: clamp(11px, 3vw, 14px); color: var(--ink); max-width: 100%; overflow-wrap: anywhere; opacity: 0; }
.vs-cardstats { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: clamp(10px, 2.7vw, 12px); font-weight: 900; color: var(--blue); opacity: 0; }
.vs-fighter.right .vs-cardstats { color: var(--red); }
.vs-fighter .vs-stats { grid-template-columns: 1fr 1fr; max-width: 320px; }
@media (max-width: 640px) { .vs-fighter .vs-stats { grid-template-columns: 1fr; } }
.vs-intro.play .vs-rank      { animation: fadeup .5s 1.1s ease-out both; }
.vs-intro.play .vs-loc,
.vs-intro.play .vs-cardstats { animation: fadeup .5s 1.25s ease-out both; }

/* ══════════════════════════════════════════════════════════
   NEON ARENA THEME + CENTRE STAGE (19/10/2026)
   Neon palette, compact battle layout, one giant centre stage for ROUND / FIGHT / question / result.
   ══════════════════════════════════════════════════════════ */
:root {
  --bg: #05010f;
  --panel: rgba(12, 6, 32, .82);
  --panel-solid: #0d0726;
  --line: rgba(0, 240, 255, .32);
  --blue: #00f0ff;   /* neon cyan */
  --gold: #ffe600;   /* neon yellow */
  --green: #39ff88;  /* neon lime */
  --red: #ff2e88;    /* neon hot pink */
  --purple: #b84dff; /* neon violet */
  --pink: #ff2bd6;   /* neon magenta */
}
body {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255,43,214,.20), transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(0,240,255,.18), transparent 45%),
    linear-gradient(180deg, #0a0220 0%, #05010f 60%, #020008 100%);
  background-attachment: fixed;
}
.panel { border-color: rgba(0,240,255,.28); box-shadow: 0 0 0 1px rgba(255,43,214,.10), 0 0 26px rgba(0,240,255,.10), 0 18px 50px rgba(0,0,0,.45); }
.brand h1 { text-shadow: 0 0 18px rgba(0,240,255,.55), 0 0 42px rgba(255,43,214,.35); }
.micro { text-shadow: 0 0 10px rgba(255,230,0,.45); }
.btn.primary, .answer-row .btn.primary {
  background: linear-gradient(135deg, var(--pink), var(--blue)); color: #05010f; border: 0;
  box-shadow: 0 0 18px rgba(255,43,214,.55), 0 0 30px rgba(0,240,255,.35);
}
.tab-btn.active { background: linear-gradient(135deg, rgba(255,43,214,.32), rgba(0,240,255,.26)); border-color: var(--blue); box-shadow: 0 0 16px rgba(0,240,255,.35); }

/* Battle layout: compact so question, answer box and keypad fit one phone screen. */
.app.playing .topbar { margin-bottom: 8px; }
.game-screen { gap: 10px; }
.game-top { padding: 10px 12px; }
.round-score { color: var(--gold); text-shadow: 0 0 14px rgba(255,230,0,.6); border: 1px solid rgba(255,230,0,.35); background: rgba(255,230,0,.06); }
.battle-lane { grid-template-columns: 1fr 1fr; gap: 10px; }
.fighter-card { min-height: 128px; border-color: rgba(0,240,255,.45); box-shadow: 0 0 22px rgba(0,240,255,.22); }
.fighter-card.enemy { border-color: rgba(255,46,136,.55); box-shadow: 0 0 22px rgba(255,46,136,.25); }
.fighter-card > div:not(.bot-face) { padding: 10px 12px; flex-wrap: wrap; row-gap: 2px; }
.fighter-card span { color: var(--gold); text-shadow: 0 0 8px rgba(255,230,0,.5); }
.fighter-card strong { white-space: nowrap; }
.enemy .bot-face { top: 8px; bottom: 8px; left: 8px; width: auto; aspect-ratio: 3 / 5; }
.enemy > div:not(.bot-face) { justify-content: flex-end; text-align: right; flex-direction: column; align-items: flex-end; }
.timer-track { height: 10px; border-color: rgba(0,240,255,.3); }
.timer-track span { background: linear-gradient(90deg, var(--green), var(--blue), var(--pink)); box-shadow: 0 0 12px rgba(0,240,255,.6); }
.question-panel { padding: 12px 14px 14px; }
.feedback { min-height: 20px; margin: 8px 0 0; font-size: 13px; }
.answer-row { grid-template-columns: 1fr 96px; }
.answer-row input { border-color: rgba(0,240,255,.55); box-shadow: inset 0 0 14px rgba(0,240,255,.12), 0 0 12px rgba(0,240,255,.18); color: var(--blue); }
.keypad button { border-color: rgba(0,240,255,.28); background: rgba(0,240,255,.06); color: var(--ink); text-shadow: 0 0 8px rgba(0,240,255,.6); }
.keypad button:active { background: rgba(255,43,214,.22); border-color: var(--pink); }

/* Centre stage */
.stage { min-height: clamp(150px, 26vh, 270px); margin: 6px 0 10px; display: grid; place-items: center; text-align: center; text-shadow: none; }
.stage.in > * { animation: stageIn .32s cubic-bezier(.2,1.4,.3,1) both; }
.stage-q span { font-size: clamp(68px, 21vw, 176px); font-weight: 1000; line-height: 1; color: #eaffff; letter-spacing: .02em;
  text-shadow: 0 0 10px var(--blue), 0 0 26px var(--blue), 0 0 60px rgba(0,240,255,.55); }
.stage-q i { font-style: normal; color: var(--pink); text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink); }
.stage-call span { font-size: clamp(54px, 17vw, 140px); font-weight: 1000; font-style: italic; letter-spacing: .04em; line-height: 1; }
.stage-call.round span { color: #ffe9ff; text-shadow: 0 0 10px var(--pink), 0 0 30px var(--pink), 0 0 70px rgba(255,43,214,.6); }
.stage-call.fight span { color: #fffbd0; text-shadow: 0 0 10px var(--gold), 0 0 30px var(--gold), 0 0 70px rgba(255,230,0,.6); }
.stage-call.count span { color: #fff; text-shadow: 0 0 20px #fff; }
.sr { width: min(460px, 100%); display: grid; gap: 8px; }
.sr-title { margin: 0 0 4px; font-size: clamp(20px, 6vw, 34px); font-weight: 1000; letter-spacing: .04em; line-height: 1.1; overflow-wrap: anywhere; }
.stage-result.win .sr-title { color: var(--green); text-shadow: 0 0 12px var(--green), 0 0 30px rgba(57,255,136,.5); }
.stage-result.lose .sr-title { color: var(--red); text-shadow: 0 0 12px var(--red), 0 0 30px rgba(255,46,136,.5); }
.stage-result.draw .sr-title { color: var(--gold); text-shadow: 0 0 12px var(--gold); }
.sr-row { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); font-weight: 900; font-size: clamp(14px, 4vw, 18px); }
.sr-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-row b { white-space: nowrap; color: var(--muted); }
.sr-row.won { border-color: var(--green); box-shadow: 0 0 16px rgba(57,255,136,.35); }
.sr-row.won b { color: var(--green); font-size: 1.15em; text-shadow: 0 0 10px rgba(57,255,136,.7); }
.sr-note { margin: 2px 0 0; color: var(--blue); font-weight: 900; letter-spacing: .06em; text-shadow: 0 0 10px rgba(0,240,255,.6); }
@keyframes stageIn { from { transform: scale(1.6); opacity: 0; filter: blur(6px); } to { transform: none; opacity: 1; filter: none; } }

@media (max-width: 760px) {
  .app.playing .brand { display: none; }
  .app.playing .hud-strip span, .app.playing .hud-strip .mini-btn { min-height: 36px; padding: 6px 8px; }
  .battle-lane { grid-template-columns: 1fr 1fr; }
  .fighter-card { min-height: 104px; }
  .fighter-card strong { font-size: 14px; }
  .fighter-card span { font-size: 11px; }
  .game-top { grid-template-columns: auto 1fr auto; }
  .round-score { grid-column: auto; width: auto; min-width: 84px; min-height: 44px; font-size: 22px; }
  .game-top h2 { font-size: 20px; }
  .answer-row { grid-template-columns: 1fr 84px; }
  .answer-row input, .answer-row .btn { min-height: 52px; }
  .keypad button { min-height: 46px; }
  .stage { min-height: 150px; margin: 4px 0 8px; }
}
@media (max-width: 390px) { .question.stage { font-size: inherit; min-height: 140px; } }
body.reduce-motion .stage.in > * { animation: none !important; }
.app.playing .brand { display: none; }
.app.playing .topbar { justify-content: flex-end; }
.stage-q span { font-size: clamp(68px, min(21vw, 20vh), 176px); }
@media (max-height: 860px) and (min-width: 761px) { .stage { min-height: 170px; margin: 2px 0 6px; } .fighter-card { min-height: 112px; } }
@media (max-height: 860px) and (min-width: 761px) { .keypad button { min-height: 44px; } .keypad { gap: 6px; } .stage { min-height: 150px; } }

/* ══════════════════════════════════════════════════════════
   FULL TRADING CARDS (js/cards.mjs) — aura, stats, hits, blood
   Original CSS/SVG effects only.
   ══════════════════════════════════════════════════════════ */
.tc-card {
  --glow: hsl(var(--card-hue), 100%, 60%);
  position: relative; aspect-ratio: 3 / 5; width: 100%; border-radius: 14px; overflow: hidden; isolation: isolate;
  padding: 3px; container-type: inline-size; background: #05010f;
  box-shadow: 0 0 18px hsla(var(--card-hue), 100%, 60%, .55), 0 0 44px hsla(var(--card-hue), 100%, 55%, .25);
  animation: tcFloat 3.2s ease-in-out infinite, tcPulse 2.4s ease-in-out infinite;
}
.tc-card.kind-boss { aspect-ratio: 2 / 3; --card-hue: 188; }
.tc-card.kind-player { --card-hue: 188; }
.tc-aura { position: absolute; inset: -60%; z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 18%, var(--glow) 25%, transparent 32% 68%, #ff2bd6 75%, transparent 82%);
  animation: tcSpin 3.6s linear infinite; }
.tc-art { position: absolute; inset: 3px; z-index: 1; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 11px; object-fit: cover; object-position: center 8%; }
.kind-boss .tc-art { object-position: center; }
.tc-emblem { display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, hsla(var(--card-hue), 90%, 45%, .55), #05010f 70%); }
.tc-emblem span { font: 900 22cqw Orbitron, sans-serif; color: hsl(var(--card-hue), 100%, 80%); text-shadow: 0 0 5cqw var(--glow); letter-spacing: .04em; }
.tc-ai { position: absolute; z-index: 4; left: 6%; top: 4%; padding: .5cqw 2.4cqw; border-radius: 1.6cqw; font: 900 4.4cqw Orbitron, sans-serif; font-style: normal; letter-spacing: .12em;
  color: #05010f; background: hsl(var(--card-hue), 100%, 70%); box-shadow: 0 0 3cqw var(--glow); }
.kind-player .tc-art, .kind-hero .tc-art { filter: saturate(1.15) contrast(1.05); }
.kind-player::after, .kind-hero::after, .kind-bot::after { content: ""; position: absolute; inset: 3px; z-index: 2; border-radius: 11px; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(0,240,255,.85), inset 0 0 0 5px rgba(5,1,15,.9), inset 0 0 0 6px rgba(255,43,214,.6), inset 0 -60px 50px -20px rgba(5,1,15,.95); }
/* v2.6.1 layout: the face owns the top ~60 % of the card; name plate sits at the foot, stats in one slim strip above it. */
.tc-name { position: absolute; z-index: 3; left: 5%; right: 5%; bottom: 3.5%; padding: 2.4% 3%; border-radius: 8px; text-align: center;
  background: linear-gradient(180deg, rgba(5,1,15,.72), rgba(5,1,15,.94)); border: 1px solid rgba(0,240,255,.6); }
.tc-name strong { display: block; font-size: 8.6cqw; line-height: 1.05; color: #eaffff; letter-spacing: .03em; text-shadow: 0 0 8px var(--blue);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-name small { display: block; margin-top: 1px; font-size: 4.4cqw; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Stat boxes sit on the empty boxes painted into the bot art (and cover the baked numbers on the boss art). */
.tc-stats { position: absolute; z-index: 3; margin: 0; padding: 0; list-style: none; display: grid; grid-template-rows: repeat(3, 1fr); gap: 1.3cqw;
  left: 11.5%; top: 63.6%; width: 38%; height: 19.4%; }
.kind-boss .tc-stats { display: none; } /* THEONE's card prints PSR / wins / losses / avg time itself */
.kind-player .tc-stats, .kind-hero .tc-stats, .kind-bot .tc-stats { left: 5%; right: 5%; width: auto; top: auto; bottom: 20%; height: 9%;
  grid-template-rows: none; grid-template-columns: repeat(3, 1fr); }
.kind-player .tc-stats li, .kind-hero .tc-stats li, .kind-bot .tc-stats li { flex-direction: column; justify-content: center; gap: 0; padding: 0 1cqw; }
.tc-stats li { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 0 3cqw; border-radius: 1.6cqw;
  background: rgba(5,1,15,.92); border: 1px solid hsla(var(--card-hue), 100%, 65%, .7); box-shadow: 0 0 6px hsla(var(--card-hue), 100%, 60%, .4); }
.tc-stats b { font-size: 4.6cqw; letter-spacing: .08em; color: hsl(var(--card-hue), 100%, 78%); }
.tc-stats span { font-size: 6.4cqw; font-weight: 1000; color: #fff; -webkit-text-stroke: .5px #000; paint-order: stroke fill; text-shadow: 0 0 6px var(--glow); }
.kind-player .tc-stats b, .kind-hero .tc-stats b, .kind-bot .tc-stats b { font-size: 3.6cqw; line-height: 1; }
.kind-player .tc-stats span, .kind-hero .tc-stats span, .kind-bot .tc-stats span { font-size: 5.6cqw; line-height: 1.05; }

/* Damage layers */
.tc-dmg { position: absolute; inset: 3px; z-index: 4; border-radius: 11px; pointer-events: none; overflow: hidden; }
.tc-dmg i { position: absolute; display: block; opacity: 0; transition: opacity .35s ease, transform .35s ease; transform: scale(.6); }
.tc-blood { background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='%23b0000f'><path d='M50 30c8-6 18 2 16 10 9 0 12 10 5 15 6 6 0 15-8 12-2 9-14 10-18 3-8 5-17-1-14-9-9-2-10-14-2-17-4-8 4-16 12-13 2-1 5-2 9-1z'/><circle cx='20' cy='28' r='4'/><circle cx='84' cy='38' r='3'/><circle cx='76' cy='80' r='5'/><circle cx='26' cy='76' r='3'/><circle cx='12' cy='52' r='2'/><path d='M46 72c3 8 2 18-2 26-3-7-3-17 2-26z'/><path d='M62 70c2 6 1 12-1 16-2-4-2-11 1-16z'/></g><g fill='%23ff2b3a' opacity='.55'><circle cx='46' cy='44' r='7'/></g></svg>");
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.tc-blood.b1 { width: 46%; height: 30%; left: 42%; top: 14%; }
.tc-blood.b2 { width: 38%; height: 26%; left: 6%; top: 38%; }
.tc-blood.b3 { width: 56%; height: 34%; left: 30%; top: 46%; }
.tc-crack { inset: 0; background: no-repeat center / 100% 100% url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><g fill='none' stroke-linejoin='round'><g stroke='%23000' stroke-width='1.6' opacity='.7'><path d='M58 8 L50 26 L63 36 L45 52 L55 70 L47 92'/><path d='M50 26 L28 22'/><path d='M63 36 L88 42'/><path d='M45 52 L22 62'/><path d='M55 70 L76 80'/></g><g stroke='%23fff' stroke-width='.7' opacity='.9'><path d='M58 8 L50 26 L63 36 L45 52 L55 70 L47 92'/><path d='M50 26 L28 22'/><path d='M63 36 L88 42'/><path d='M45 52 L22 62'/><path d='M55 70 L76 80'/></g></g></svg>"); }
.tc-card[data-dmg="1"] .b1,
.tc-card[data-dmg="2"] .b1, .tc-card[data-dmg="2"] .b2,
.tc-card[data-dmg="3"] .b1, .tc-card[data-dmg="3"] .b2, .tc-card[data-dmg="3"] .b3, .tc-card[data-dmg="3"] .tc-crack,
.tc-card[data-dmg="4"] .tc-dmg i { opacity: 1; transform: scale(1); }
.tc-card[data-dmg="2"] .b2, .tc-card[data-dmg="3"] .b2, .tc-card[data-dmg="4"] .b2 { transform: rotate(140deg); }
.tc-card[data-dmg="3"] .b3, .tc-card[data-dmg="4"] .b3 { transform: rotate(-60deg); }
.tc-card[data-dmg="2"] .tc-art { filter: saturate(.85) brightness(.95); }
.tc-card[data-dmg="3"] .tc-art { filter: saturate(.7) brightness(.85) sepia(.15); }
.tc-card[data-dmg="4"] .tc-art { filter: grayscale(.7) brightness(.6); }
.tc-card[data-dmg="3"] .tc-dmg, .tc-card[data-dmg="4"] .tc-dmg { box-shadow: inset 0 0 40px rgba(176,0,15,.75); }
.tc-card[data-dmg="4"] { animation: none; box-shadow: 0 0 22px rgba(176,0,15,.7); }

/* Big hit */
.tc-flash { position: absolute; inset: 0; z-index: 5; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.9), rgba(255,0,40,.75) 40%, rgba(120,0,10,.4) 80%); opacity: 0; pointer-events: none; }
.tc-card.struck { animation: tcStruck .6s cubic-bezier(.3,1.6,.4,1); }
.tc-card.struck .tc-flash { animation: tcFlash .5s ease-out; }
@keyframes tcStruck { 0% { transform: none; } 10% { transform: translate(-14px, 4px) rotate(-5deg) scale(.94); } 25% { transform: translate(12px, -3px) rotate(4deg) scale(1.03); }
  40% { transform: translate(-8px, 2px) rotate(-2deg); } 60% { transform: translate(5px, 0) rotate(1deg); } 100% { transform: none; } }
@keyframes tcFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tcFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes tcPulse { 0%, 100% { box-shadow: 0 0 16px hsla(var(--card-hue), 100%, 60%, .5), 0 0 40px hsla(var(--card-hue), 100%, 55%, .2); }
  50% { box-shadow: 0 0 26px hsla(var(--card-hue), 100%, 62%, .85), 0 0 70px hsla(var(--card-hue), 100%, 55%, .4); } }
@keyframes tcSpin { to { transform: rotate(1turn); } }
body.reduce-motion .tc-card, body.reduce-motion .tc-aura { animation: none !important; }

/* Battle lane with full cards: player | VS | enemy */
.battle-lane.cards { grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; gap: 8px; }
.battle-lane.cards .fighter-card { min-height: 0; width: 100%; max-width: 200px; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; display: block; }
.battle-lane.cards .fighter-card::before, .battle-lane.cards .fighter-card::after { display: none; }
.battle-lane.cards .fighter-card .aura-particle, .battle-lane.cards .fighter-card .aura-streak { display: none; }
.battle-lane.cards .lane-vs { font-size: clamp(26px, 8vw, 54px); font-weight: 1000; font-style: italic; color: var(--gold); text-shadow: 0 0 12px var(--gold), 0 0 30px rgba(255,230,0,.5); -webkit-text-stroke: 1px #000; paint-order: stroke fill; }
@media (max-width: 760px) { .battle-lane.cards .fighter-card { max-width: 128px; } }
@media (max-height: 860px) and (min-width: 761px) { .battle-lane.cards .fighter-card { max-width: 150px; } }

/* Thin black outline so answers and numbers pop on the neon glow */
.stage-q span, .stage-call span, .sr-title, .sr-row b, .sr-note, .answer-row input, .round-score {
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill;
}
.stage-q span { -webkit-text-stroke-width: 3px; }

/* ══════════════════════════════════════════════════════════
   ARENA LADDER RUN — tower climb, lives, continue / game over
   ══════════════════════════════════════════════════════════ */
.ladder-screen {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,43,214,.25), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0,240,255,.18), transparent 55%),
    #05010f;
}
.ladder-head { text-align: center; max-width: 560px; }
.ladder-head h2 { margin: 4px 0; font: 900 clamp(26px, 7.5vw, 46px)/1.05 Cinzel, Georgia, serif; letter-spacing: .06em; color: #fff;
  text-shadow: 0 0 12px var(--pink), 0 0 34px rgba(255,43,214,.6), 0 2px 0 #000; }
.ladder-screen[data-mode="climb"] .ladder-head h2, .ladder-screen[data-mode="champion"] .ladder-head h2 { text-shadow: 0 0 12px var(--green), 0 0 34px rgba(57,255,136,.6); }
.ladder-screen[data-mode="gameover"] .ladder-head h2 { text-shadow: 0 0 12px var(--red), 0 0 34px rgba(255,46,136,.7); }
.ladder-sub { margin: 0; color: var(--ink); font-weight: 800; }
.ladder-lives { margin: 8px 0 0; font-size: 28px; letter-spacing: 6px; }
.ladder-lives .on { color: var(--red); text-shadow: 0 0 10px var(--red), 0 0 22px rgba(255,46,136,.6); }
.ladder-lives .off { color: rgba(255,255,255,.18); }
/* The tower follows the "PATH TO THEONE" art (handoffs/ladder-mockup-20261030.webp): a black-marble slab with a gold frame,
   TABLE CHAMPS sign on top, one row per floor (rank badge · portrait · FIRST NAME / surname · PSR), THEONE in gold at #1,
   your floor framed in cyan, START HERE plate at the foot. Roman serif = Cinzel (loaded with Orbitron in index.html). */
.ladder-tower { --row: 58px; --sign: 64px; --gold: #e9c46a; --gold-dim: rgba(233,196,106,.42); --marble: #0a0a10;
  position: relative; width: min(520px, 100%); flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0;
  border: 2px solid var(--gold-dim); border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 0 28px rgba(0,0,0,.6), inset 0 0 0 1px rgba(233,196,106,.16), inset 0 0 60px rgba(0,0,0,.7);
  background:
    linear-gradient(90deg, rgba(255,255,255,.035), transparent 18%, transparent 82%, rgba(255,255,255,.035)),
    radial-gradient(ellipse at 50% 0%, rgba(120,90,200,.16), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.015) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #121018, var(--marble) 40%, #06060a);
  scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; }
.lt-sign { position: sticky; top: 0; z-index: 3; height: var(--sign); display: grid; align-content: center; justify-items: center; gap: 2px; border-bottom: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.15)), #100d16; } /* sticky: the sign and THEONE's row stay in view while the tower scrolls */
.lt-sign b { font: 900 clamp(19px, 5.2vw, 25px)/1 Cinzel, Georgia, serif; letter-spacing: .08em;
  background: linear-gradient(90deg, #d9dbe6 0%, #fff 32%, #e9c46a 50%, #b784ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.9)) drop-shadow(0 0 10px rgba(183,132,255,.35)); }
.lt-sign small { font: 700 10px/1 Cinzel, Georgia, serif; letter-spacing: .34em; color: #b784ff; text-shadow: 0 0 10px rgba(183,132,255,.7); padding-left: .34em; }
.lt-list { position: relative; margin: 0; padding: 0; list-style: none; }
.lt-row { height: var(--row); display: grid; grid-template-columns: 30px 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 14px 0 10px; margin: 0;
  border-bottom: 1px solid rgba(233,196,106,.22); background: linear-gradient(90deg, hsla(var(--card-hue), 80%, 55%, .12), transparent 55%); }
.lt-rank { display: grid; place-items: center; width: 28px; height: 28px; font: 700 13px/1 Cinzel, Georgia, serif; font-style: normal; color: var(--gold);
  border: 1px solid var(--gold-dim); border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(233,196,106,.18), rgba(0,0,0,.6)); box-shadow: 0 0 8px rgba(0,0,0,.6); }
.lt-thumb { width: 44px; height: calc(var(--row) - 10px); border-radius: 4px; border: 1px solid var(--gold-dim);
  background: var(--art, none) 50% 30% / cover no-repeat, #000; box-shadow: 0 0 10px hsla(var(--card-hue), 100%, 60%, .45), inset 0 0 0 1px rgba(0,0,0,.6); }
.lt-thumb.boss { background-position: 50% 30%; }
.lt-name { min-width: 0; display: grid; gap: 1px; }
.lt-name b { font: 700 17px/1.05 Cinzel, Georgia, serif; letter-spacing: .06em; text-transform: uppercase; color: #e6e3ee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 #000; }
.lt-name small { font: 700 10px/1.2 Cinzel, Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: #a9a4b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-psr { display: grid; justify-items: end; gap: 0; text-align: right; }
.lt-psr b { font: 900 20px/1 Orbitron, sans-serif; letter-spacing: -.01em; color: #efe9ff; text-shadow: 0 0 12px rgba(183,132,255,.55), 0 1px 0 #000; }
.lt-psr small { font: 700 9px/1 Cinzel, Georgia, serif; letter-spacing: .22em; color: var(--gold); padding-left: .22em; }
.lt-row.beaten { opacity: .5; }
.lt-row.beaten .lt-psr small::before { content: "\2713 "; color: var(--green); }
.lt-row.locked .lt-thumb { filter: grayscale(.3) brightness(.72); }
.lt-row.locked .lt-name b { color: #8d889c; }
.lt-row.next { background: linear-gradient(90deg, rgba(0,240,255,.16), rgba(0,240,255,.04) 60%, transparent); }
.lt-row.next .lt-name b { color: #fff; text-shadow: 0 0 10px var(--blue); }
.lt-row.boss { position: sticky; top: var(--sign); z-index: 2; border-bottom-color: rgba(233,196,106,.6);
  background: linear-gradient(90deg, rgba(233,196,106,.26), rgba(233,196,106,.08) 55%, rgba(233,196,106,.16)), #15110c;
  box-shadow: inset 0 0 0 1px rgba(233,196,106,.55), inset 0 0 22px rgba(233,196,106,.18), 0 6px 14px rgba(0,0,0,.5); }
.lt-row.boss .lt-rank { color: #1a1206; background: linear-gradient(180deg, #ffe9a6, #d9a93a); border-color: #ffe9a6; box-shadow: 0 0 12px rgba(233,196,106,.7); position: relative; }
.lt-row.boss .lt-rank::before { content: "\265B"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--gold); text-shadow: 0 0 8px rgba(233,196,106,.9); }
.lt-row.boss .lt-name b { color: #ffe08a; text-shadow: 0 0 12px rgba(233,196,106,.75), 0 1px 0 #000; }
.lt-row.boss .lt-name small { color: #e9c46a; letter-spacing: .06em; }
.lt-row.boss .lt-psr b { color: #ffe9a6; text-shadow: 0 0 14px rgba(233,196,106,.8), 0 1px 0 #000; }
.lt-row.boss .lt-thumb { border-color: #e9c46a; box-shadow: 0 0 14px rgba(233,196,106,.65); }
.lt-base { height: 46px; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 10px 10px; border: 1px solid rgba(0,240,255,.6); border-radius: 6px;
  font: 700 clamp(13px, 3.6vw, 16px)/1 Cinzel, Georgia, serif; letter-spacing: .36em; padding-left: .36em; color: #8ff6ff; text-shadow: 0 0 12px var(--blue);
  background: linear-gradient(180deg, rgba(0,240,255,.14), rgba(0,240,255,.04)); box-shadow: 0 0 16px rgba(0,240,255,.28), inset 0 0 14px rgba(0,240,255,.16); }
.lt-base span { font-size: 12px; opacity: .8; letter-spacing: 0; }
.lt-marker { position: absolute; z-index: 4; left: 5px; right: 5px; height: var(--row); top: calc(var(--sign) + var(--i) * var(--row)); pointer-events: none;
  border: 2px solid var(--blue); border-radius: 6px; box-shadow: 0 0 14px var(--blue), inset 0 0 14px rgba(0,240,255,.35);
  transition: top 1.3s cubic-bezier(.3,1.25,.4,1); }
/* THEONE's full-body picture stands behind the tower when he is the next fight */
.ladder-boss { display: none; position: fixed; right: -2%; bottom: 0; height: 94%; width: auto; z-index: -1; pointer-events: none; opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); filter: saturate(1.1) drop-shadow(0 0 30px rgba(63,230,255,.35)); }
.ladder-screen[data-boss="1"] .ladder-boss { display: block; animation: bossIn 1.2s ease-out forwards; }
@keyframes bossIn { from { opacity: 0; transform: translateX(6%); } to { opacity: .72; transform: none; } }
body.reduce-motion .ladder-screen[data-boss="1"] .ladder-boss { animation: none; opacity: .72; }
@media (max-width: 760px) { .ladder-boss { right: -28%; height: 80%; } .ladder-screen[data-boss="1"] .ladder-boss { animation: none; opacity: .3; } }
/* phones: tighter rows, nothing clipped */
@media (max-width: 420px) {
  .ladder-tower { --row: 54px; --sign: 58px; }
  .lt-row { grid-template-columns: 26px 40px minmax(0, 1fr) auto; gap: 8px; padding: 0 10px 0 8px; }
  .lt-rank { width: 24px; height: 24px; font-size: 12px; } .lt-thumb { width: 40px; }
  .lt-name b { font-size: 15px; } .lt-name small { font-size: 9px; letter-spacing: .1em; } .lt-row.boss .lt-name small { letter-spacing: .02em; }
  .lt-psr b { font-size: 17px; } .lt-sign small { letter-spacing: .26em; }
}
@media (max-width: 360px) { .lt-name b { font-size: 14px; } .lt-psr b { font-size: 16px; } .lt-base { letter-spacing: .24em; gap: 10px; } }
.lt-marker span { position: absolute; right: 12px; top: -11px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 9px; border-radius: 6px 6px 0 0;
  background: var(--blue); color: #05010f; font-weight: 1000; font-size: 10px; letter-spacing: .08em; box-shadow: 0 0 12px var(--blue); } /* a name tab on the frame, clear of the PSR */
.lt-marker.climbing { animation: ltGlow 1.3s ease-out; }
@keyframes ltGlow { 0% { box-shadow: 0 0 14px var(--blue); } 50% { box-shadow: 0 0 40px var(--green), 0 0 80px rgba(57,255,136,.5); border-color: var(--green); } 100% { box-shadow: 0 0 14px var(--blue); } }
.ladder-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: min(460px, 100%); }
.ladder-actions .btn { flex: 1; min-width: 140px; }

/* VS screen full cards */
.vs-cardwrap { width: clamp(108px, 30vw, 220px); }
.vs-fighter .vs-stats { opacity: 0; }
@media (max-width: 640px) { .vs-fighter .vs-stats div { padding: 4px 6px; } }

/* Roster + online lane */
.roster-card { display: grid; gap: 8px; width: 100%; max-width: 200px; justify-self: center; }
.roster-card p { margin: 0; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.4; }
.roster-card p b { color: var(--gold); }
.battle-lane.cards .fighter-card .tc-slot { width: 100%; }
.battle-lane.cards .ol-meta { position: static; display: flex; justify-content: space-between; gap: 6px; padding: 6px 2px 4px; }
.battle-lane.cards .fighter-card .hp-bar { margin: 0 2px; }
.question.stage { font-size: 16px; }
.sr-note { font-size: clamp(15px, 4vw, 20px); }

/* Placement and league copy must wrap at phone widths. */
#profileCardRank { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.stat-grid > div { min-width: 0; }
.stat-grid strong { overflow-wrap: anywhere; }
.league-guide { margin-block: 1.5rem; }
.league-guide summary { cursor: pointer; padding-block: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.league-guide p { color: var(--muted); line-height: 1.6; max-width: 70ch; }
.league-guide ol { list-style: none; margin: 0; padding: 0; }
.league-guide li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .7rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.league-guide li strong { flex: 1 1 15rem; overflow-wrap: anywhere; }
.league-guide li[aria-current] { color: var(--gold); border-left: 3px solid currentColor; }
.vs-stats dd { overflow-wrap: anywhere; min-width: 0; }

/* ── Accounts + World Ladder (Ranked tab) ─────────────────── */
.account-box { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6,14,26,.7); }
.auth-form { display: grid; gap: 8px; }
.auth-form input { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: rgba(2,8,16,.82); color: var(--ink); padding: 8px 12px; font-weight: 700; font-size: 16px; min-width: 0; }
.auth-form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.auth-actions .btn { min-height: 48px; }
.hint.bad { color: #ff8a8a; }
.account-signed-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account-signed-in strong { overflow-wrap: anywhere; }
.world-ladder { display: grid; gap: 8px; }
.world-ladder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.ladder-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 64px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(6,14,26,.7); }
.ladder-row.me { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.ladder-pos { font-weight: 1000; color: var(--gold); }
.ladder-who, .ladder-psr { display: grid; min-width: 0; }
.ladder-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ladder-who small, .ladder-psr small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ladder-psr { text-align: right; }
.ladder-fight { justify-self: end; }
@media (max-width: 480px) {
  .ladder-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .ladder-fight, .ladder-fight-none { grid-column: 1 / -1; justify-self: stretch; }
  .ladder-fight-none { display: none; }
}
/* Ranked panel: one shrinkable column so nothing pushes past small phones (360px). */
.friends-panel { grid-template-columns: minmax(0, 1fr); }
.add-friend input, .friends-head > div { min-width: 0; }

/* ── League badges (js/rank-icons.mjs) ─────────────────────── */
.rank-icon { display: inline-block; vertical-align: middle; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.rank-icon.t14, .rank-icon.t15, .rank-icon.t16, .rank-icon.t17 { filter: drop-shadow(0 0 6px rgba(180,120,255,.45)) drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.rank-icon.t18, .rank-icon.t19, .rank-icon.t20 { filter: drop-shadow(0 0 8px rgba(255,200,80,.55)) drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.rank-icon .ri-pulse { transform-origin: 50px 52px; animation: riPulse 2.4s ease-in-out infinite; }
.rank-icon .ri-spin { transform-origin: 50px 54px; animation: riSpin 9s linear infinite; }
@keyframes riPulse { 50% { opacity: .45; transform: scale(.92); } }
@keyframes riSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rank-icon .ri-pulse, .rank-icon .ri-spin { animation: none; } }
.ladder-psr { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.ladder-psr > span { display: grid; text-align: right; min-width: 0; }
.rank-with-icon { display: inline-flex; align-items: center; gap: 6px; }

/* ===== BVS Designs footer, feedback + support windows (js/community.mjs) ===== */
.bvs-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 18px 16px 26px; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.bvs-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); border-radius: 12px; padding: 6px 8px; }
.bvs-link:hover .bvs-logo-glow, .bvs-link:focus-visible .bvs-logo-glow { filter: drop-shadow(0 0 6px #5fd3ff) drop-shadow(0 0 18px rgba(63,170,255,.95)); transform: scale(1.03); }
.bvs-made { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.bvs-url { font-size: 14px; font-weight: 800; color: #bfe9ff; }
.bvs-logo-glow { width: 180px; height: auto; display: block; filter: drop-shadow(0 0 4px rgba(95,211,255,.9)) drop-shadow(0 0 14px rgba(63,170,255,.65)); transition: filter .25s, transform .25s; animation: bvsGlow 3.2s ease-in-out infinite; }
@keyframes bvsGlow { 50% { filter: drop-shadow(0 0 6px rgba(95,211,255,1)) drop-shadow(0 0 22px rgba(63,170,255,.9)); } }
.bvs-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.community-modal { z-index: 120; }
.community-modal .modal-card { max-width: 460px; max-height: calc(100dvh - 40px); overflow-y: auto; text-align: center; }
.community-copy { color: var(--muted); line-height: 1.5; margin: 0; }
.community-copy strong { color: var(--ink); }
.support-logo { width: min(240px, 70%); margin: 4px auto 6px; }
.rate-row { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.rate-btn { min-height: 44px; min-width: 0; border-radius: 10px; border: 1px solid rgba(69,200,255,.35); background: rgba(10,22,38,.7); color: var(--ink); font-weight: 900; font-size: 16px; cursor: pointer; padding: 0; }
.rate-btn:hover, .rate-btn:focus-visible { border-color: var(--blue); outline: none; box-shadow: 0 0 0 2px rgba(69,200,255,.35); }
.rate-btn.on { background: linear-gradient(135deg, var(--blue), var(--gold)); color: #06101e; border-color: transparent; box-shadow: 0 0 18px rgba(255,196,91,.45); }
.rate-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -4px; }
.community-label { text-align: left; font-weight: 800; font-size: 14px; }
.community-label span { color: var(--muted); font-weight: 600; }
.community-text { width: 100%; resize: vertical; min-height: 76px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,12,24,.8); color: var(--ink); padding: 10px 12px; font: inherit; }
.community-text:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.community-error { color: #ff8a9a; font-weight: 700; margin: 0; }
.community-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.community-buttons .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 420px) { .rate-row { grid-template-columns: repeat(6, 1fr); } .bvs-footer { justify-content: center; } .bvs-logo-glow { width: 150px; } }
@media (prefers-reduced-motion: reduce) { .bvs-logo-glow { animation: none; } }

/* AI labels + the AI hero invitation prompt */
.ai-pill { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font: 900 10px Orbitron, sans-serif; font-style: normal; letter-spacing: .1em; vertical-align: middle;
  color: #05010f; background: var(--gold, #ffc45b); }
.vs-ai { margin: 0; font-size: 12px; color: var(--muted); } .vs-ai b { padding: 1px 6px; margin-right: 4px; border-radius: 6px; background: var(--gold, #ffc45b); color: #05010f; font-family: Orbitron, sans-serif; }
.bot-invite-card { padding-top: 22px; }
.bot-invite-art { justify-self: center; width: min(46vw, 180px); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; box-shadow: 0 0 22px rgba(255,196,91,.45); }

/* ── Stage backgrounds (v2.5): arena pictures behind every screen, cross-faded, with a scrim so text stays readable ──
   menu (top-down colosseum) · stages such as the ladder tower and results (the hall) · battle rounds (the grand arena).
   `:has()` picks the picture from whichever screen is showing; browsers without it simply keep the menu picture. */
.arena-bg { background: #05010f; }
.bg-img { position: absolute; inset: -26% -2% -2%; background-size: cover; background-position: 50% 100%; /* top crop: the pictures' own TABLE CHAMPS sign would sit behind our header */ opacity: 0; transition: opacity .6s ease; will-change: opacity; }
.bg-menu { background-image: url("./assets/stages/stage-menu.webp"); opacity: 1; filter: brightness(1.35) saturate(1.2); }
.bg-hall { background-image: url("./assets/stages/stage-hall.webp"); }
.bg-battle { background-image: url("./assets/stages/stage-battle.webp"); }
.bg-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 38%, transparent 0, rgba(3,1,12,.38) 100%),
    linear-gradient(180deg, rgba(5,1,15,.55) 0, rgba(5,1,15,.22) 30%, rgba(5,1,15,.5) 72%, rgba(3,0,10,.86) 100%);
}
body:has(#resultScreen:not(.hidden)) .bg-menu, body:has(#profilePanel:not(.hidden)) .bg-menu,
body:has(#gameScreen:not(.hidden)) .bg-menu, body:has(#onlineScreen:not(.hidden)) .bg-menu { opacity: 0; }
body:has(#resultScreen:not(.hidden)) .bg-hall, body:has(#profilePanel:not(.hidden)) .bg-hall { opacity: 1; }
body:has(#gameScreen:not(.hidden)) .bg-battle, body:has(#onlineScreen:not(.hidden)) .bg-battle { opacity: 1; }
body:has(#gameScreen:not(.hidden)) .bg-scrim, body:has(#onlineScreen:not(.hidden)) .bg-scrim {
  background:
    radial-gradient(ellipse at 50% 45%, transparent 0, rgba(3,1,12,.45) 100%),
    linear-gradient(180deg, rgba(5,1,15,.5) 0, rgba(5,1,15,.18) 28%, rgba(5,1,15,.45) 70%, rgba(3,0,10,.82) 100%);
}
.grid-floor { display: none; } /* the pictures carry their own floor */
.light-beam { opacity: .07; }
body.reduce-motion .bg-img { transition: none; }

/* panels become tinted glass so the picture shows through and the UI sits inside the scene */
.panel { background: linear-gradient(150deg, rgba(9,16,34,.76), rgba(4,8,22,.66)); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.home-panel { background: linear-gradient(150deg, rgba(9,16,34,.4), rgba(4,8,22,.26)); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.main-tabs .tab-btn { background: rgba(6,12,28,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.main-tabs .tab-btn.active { background: linear-gradient(135deg, rgba(255,43,214,.36), rgba(0,240,255,.28)); }
.ladder-screen { isolation: isolate; background: #05010f; }
.ladder-screen::before { /* the hall picture, with its own TABLE CHAMPS sign cropped off the top like the other stages */
  content: ""; position: fixed; inset: -26% -2% -2%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(3,1,12,.1), rgba(3,1,12,.62) 100%),
    linear-gradient(180deg, rgba(5,1,15,.55), rgba(5,1,15,.72)),
    url("./assets/stages/stage-hall.webp") 50% 100% / cover no-repeat;
}
.home-copy p, .page-panel p { color: #cdd8ec; } /* body text a touch brighter so it reads over the picture */
html { overflow-x: clip; }
.vs-intro { background: radial-gradient(ellipse at center, rgba(24,52,82,.35) 0, rgba(4,7,13,.82) 80%), linear-gradient(180deg, rgba(5,1,15,.45), rgba(5,1,15,.6)), url("./assets/stages/stage-battle.webp") 50% 100% / cover no-repeat, #04070d; }
@media (max-width: 380px) { .hud-strip span { white-space: nowrap; font-size: 11px; padding-inline: 6px; } }

/* ── Callouts (v2.7, js/sfx.mjs): EXCELLENT! for a correct answer under 1.25 s, FLAWLESS VICTORY for a match won without
   dropping a round. Text only, never blocks taps; sits above the question so the next sum stays readable. ── */
.tc-callout { position: fixed; left: 50%; top: 26%; z-index: 90; display: grid; justify-items: center; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(2.4); font: 900 clamp(30px, 9vw, 78px)/.95 Orbitron, sans-serif; letter-spacing: .04em; white-space: nowrap; }
.tc-callout span { color: #fff; -webkit-text-stroke: 2px #05010f; paint-order: stroke fill; }
.tc-callout.excellent span { color: #eaffff; text-shadow: 0 0 14px var(--blue), 0 0 34px rgba(0,240,255,.7); }
.tc-callout.flawless { top: 42%; font-size: clamp(34px, 11vw, 110px); }
.tc-callout.flawless span { color: #ffe9a6; text-shadow: 0 0 16px rgba(233,196,106,.95), 0 0 46px rgba(255,43,214,.6); }
.tc-callout.flawless span + span { font-size: .78em; color: #fff; }
.tc-callout.show { animation: tcCallout 1s cubic-bezier(.2,1.4,.3,1) forwards; }
.tc-callout.flawless.show { animation-duration: 2.8s; }
@keyframes tcCallout { 0% { opacity: 0; transform: translate(-50%,-50%) scale(2.4); filter: blur(6px); }
  14% { opacity: 1; transform: translate(-50%,-50%) scale(1); filter: blur(0); } 80% { opacity: 1; transform: translate(-50%,-50%) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.1); } }
.tc-callout.still.show, body.reduce-motion .tc-callout.show { animation-name: tcCalloutStill; }
@keyframes tcCalloutStill { 0%, 85% { opacity: 1; transform: translate(-50%,-50%); } 100% { opacity: 0; transform: translate(-50%,-50%); } }

/* ── Main menu v2.7: arena-hall look — Cinzel gold title, neon-framed fighter card (clean portrait, no painted plate),
   compact two-up info tiles on phone so the page is short. ── */
.home-panel { position: relative; isolation: isolate; align-items: center; }
.home-panel::before { content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 18% 50%, rgba(0,240,255,.10), transparent 70%), radial-gradient(ellipse 50% 60% at 85% 40%, rgba(255,43,214,.10), transparent 70%); }
.home-copy { padding-left: 18px; border-left: 3px solid; border-image: linear-gradient(180deg, var(--gold), rgba(255,43,214,.8), transparent) 1; }
.home-copy h2 { font-family: Cinzel, Georgia, serif; font-weight: 900; letter-spacing: .01em; line-height: 1.04;
  background: linear-gradient(180deg, #fff6d8 0%, var(--gold) 55%, #c9822a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(255,196,91,.25)); }
.home-copy p#modeBody { font-size: 16px; max-width: 46ch; color: #c9d8e6; }
.hero-card { border: 0; padding: 3px; background: linear-gradient(150deg, #00f0ff, #7a3cff 50%, #ff2bd6);
  box-shadow: 0 0 24px rgba(0,240,255,.35), 0 0 46px rgba(255,43,214,.18); aspect-ratio: 4 / 5; min-height: 0; }
.hero-card img { border-radius: 15px; background: #06101e; }
.hero-card::after { inset: 3px; border-radius: 15px; background: linear-gradient(180deg, transparent 46%, rgba(4,8,15,.94) 86%); }
.hero-card-copy { left: 18px; right: 18px; bottom: 16px; }
.hero-card-copy strong { font-family: Cinzel, Georgia, serif; font-weight: 900; font-size: clamp(24px, 2.6vw, 32px); color: #fff; text-shadow: 0 0 14px rgba(0,240,255,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-card .card-mini-stats { left: 18px; right: 18px; bottom: 62px; }
.hero-card .card-mini-stats span { background: rgba(3,9,18,.82); border-color: rgba(0,240,255,.35); color: #dff6ff; }
.mode-details { align-items: start; }
.setup-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.score-help { grid-template-columns: 1fr 1fr; }
.setup-option, .score-help div { position: relative; padding: 12px 12px 12px 15px; }
.setup-option::before, .score-help div::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #00f0ff, #ff2bd6); }
.setup-option strong, .score-help strong { font-family: Orbitron, sans-serif; font-size: 21px; }
.score-help span { font-size: 13px; line-height: 1.35; }
.detail-card .micro { margin-bottom: 10px; }
@media (max-width: 760px) {
  .home-copy { padding-left: 12px; }
  .hero-card { width: min(100%, 320px); justify-self: center; min-height: 0; }
  .setup-grid, .score-help { grid-template-columns: 1fr 1fr; gap: 8px; }
  .setup-option strong, .score-help strong { font-size: 18px; }
  .setup-option, .score-help div { padding: 10px 10px 10px 13px; }
}

/* ── v2.8 accounts: signup form, remember me, online/offline dots, players-online list + card, private details ── */
.auth-form label { display: grid; gap: 4px; }
.auth-form label > span { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .03em; }
.auth-form label small { font-weight: 600; opacity: .8; }
.auth-form select, .auth-form input[type="date"] { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(3,9,18,.8); color: var(--ink); font: inherit; color-scheme: dark; }
.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-form .remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-form .remember input { width: 18px; height: 18px; accent-color: var(--blue); }
.auth-form .remember span { font-size: 14px; color: var(--ink); letter-spacing: 0; }
.hint.small { font-size: 12px; }
.hint.bad { color: var(--red); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #56606e; }
.status-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(101,241,154,.8); }
.status-dot.busy { background: var(--gold); box-shadow: 0 0 8px rgba(255,196,91,.7); }
.online-players { margin: 14px 0; }
.online-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.online-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid rgba(0,240,255,.18); background: rgba(3,9,18,.6); cursor: pointer; user-select: none; -webkit-touch-callout: none; }
.online-row:hover, .online-row:focus-visible { border-color: var(--blue); background: rgba(0,240,255,.08); outline: none; }
.online-row.me { border-color: rgba(255,196,91,.45); cursor: default; }
.online-row.busy { opacity: .7; }
.online-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-psr { display: inline-flex; align-items: center; gap: 5px; font-family: Orbitron, sans-serif; font-size: 13px; }
.online-state { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; min-width: 64px; text-align: right; }
.online-card { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(0,240,255,.35); background: linear-gradient(150deg, rgba(0,240,255,.08), rgba(255,43,214,.06)); }
.oc-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .oc-head strong { font-size: 18px; } .oc-head small { color: var(--muted); }
.oc-psr { margin: 6px 0 10px; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.oc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-details { margin: 14px 0; }
.account-details .stat-grid strong { font-size: 17px; overflow-wrap: anywhere; }
.ladder-who strong .status-dot { margin-right: 6px; }
@media (max-width: 520px) {
  .signup-grid { grid-template-columns: 1fr; }
  .online-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .online-state { display: none; }
}

/* v2.8.2 rules summary */
.rules-card { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 12px; text-align: left; }
.rules-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rules-head h2 { margin: 0; font-size: clamp(20px, 4vw, 26px); }
.rules-body { overflow-y: auto; padding-right: 4px; display: grid; gap: 12px; }
.rules-body section { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 14px; background: rgba(255,255,255,.03); }
.rules-body h3 { margin: 0 0 6px; color: var(--gold); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.rules-body ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.rules-body li { line-height: 1.45; font-size: 14px; color: var(--ink, #eef6ff); }
.rules-body b { color: #fff; }
#rulesOk { align-self: center; min-width: 180px; }
.modal-card.rules-card { width: min(680px, calc(100vw - 32px)); max-width: none; padding: 18px; box-sizing: border-box; }
@media (max-width: 520px) { .modal-card.rules-card { padding: 14px; } }

/* v2.8.3 profile: the player's own fighter card + a caption underneath (no box over the face) */
.editable-card { overflow: visible; display: grid; gap: 10px; justify-items: center; }
.profile-fighter { width: min(100%, 300px); }
.profile-grid .profile-fighter img { border: 0; border-radius: 0; }
.profile-card-caption { width: min(100%, 300px); display: grid; gap: 8px; }
.profile-card-caption > span { color: var(--gold); font-size: 13px; font-weight: 900; justify-self: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* v2.8.4 Ranked: DO-10MATCH-PLACEMENT */
.placement-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.placement-btn { font-weight: 900; letter-spacing: .06em; border: 1px solid var(--gold); color: var(--gold); background: rgba(255,196,91,.08); }
.placement-btn:hover { background: rgba(255,196,91,.18); }
.placement-progress { color: var(--muted); font-size: 13px; font-weight: 800; }
.placement-history { list-style: none; display: flex; gap: 5px; margin: 0; padding: 0; flex-wrap: wrap; width: 100%; }
.placement-history li { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 900; border: 1px solid rgba(255,255,255,.14); color: var(--muted); }
.placement-history li.win { background: rgba(101,241,154,.18); border-color: #65f19a; color: #65f19a; }
.placement-history li.loss { background: rgba(255,102,120,.16); border-color: #ff6678; color: #ff6678; }
.placement-history li.draw { border-color: var(--gold); color: var(--gold); }

/* Sign-in gate: the whole game needs a signed-in, email-verified account */
.signin-gate { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 16px;
  background: radial-gradient(circle at 50% 20%, rgba(0, 240, 255, .14), #05010f 60%), #05010f; }
.signin-gate.hidden { display: none; }
.gate-card { width: min(560px, 100%); margin: auto 0; }
.gate-card h2 { margin: 0 0 6px; text-align: center; letter-spacing: .08em; color: #ffc45b; }
.gate-card > .hint { text-align: center; margin: 0 0 14px; }
.gate-card .account-box { margin: 0; }
body.gated { overflow: hidden; }

/* Ranked sub-sections: Find Match | Ranked Ladder | Ranked Rules */
.ranked-subnav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: -4px 0 12px; }
.ranked-subnav.hidden, .ranked-rules.hidden { display: none; }
.app.playing .ranked-subnav, .app.playing .ranked-rules { display: none; }
.sub-btn { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; color: var(--ink); background: rgba(6,12,28,.62);
  font-weight: 800; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; }
.sub-btn.active { background: linear-gradient(135deg, rgba(255,196,91,.28), rgba(0,240,255,.18)); border-color: rgba(255,196,91,.7); color: #ffe2a8; }
.app.rsub-ladder #homePanel, .app.rsub-ladder #modeDetails, .app.rsub-ladder #friendsPanel > :not(.world-ladder) { display: none !important; }
.app.rsub-rules #homePanel, .app.rsub-rules #modeDetails, .app.rsub-rules #friendsPanel { display: none !important; }
.app.rsub-match #friendsPanel > .world-ladder { display: none; }
.ranked-rules { padding: 18px; margin-bottom: 12px; }
.ranked-rules h2 { margin: 0 0 4px; color: #ffc45b; letter-spacing: .06em; }
.rr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.rr-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(6,12,28,.5); min-width: 0; }
.rr-grid h3 { margin: 0 0 6px; font-size: 15px; color: #8fe6ff; }
.rr-grid ul { margin: 0; padding-left: 18px; } .rr-grid li { margin: 4px 0; line-height: 1.45; }
.rr-leagues { margin: 0; line-height: 1.6; }
@media (max-width: 420px) { .sub-btn { font-size: 11px; letter-spacing: 0; } .rr-grid { grid-template-columns: 1fr; } }

/* Announcements tab */
.tab-btn[data-tab="news"] { position: relative; }
.tab-btn.has-new::after { content: ""; position: absolute; top: 7px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #ff2bd6; box-shadow: 0 0 10px #ff2bd6; }
.news-panel h2 { margin: 0 0 4px; color: #ffc45b; letter-spacing: .06em; }
.news-list { display: grid; gap: 12px; margin-top: 12px; }
.news-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(6,12,28,.5); min-width: 0; }
.news-item time { font-size: 12px; color: #9fb2c4; letter-spacing: .04em; text-transform: uppercase; }
.news-item h3 { margin: 4px 0 6px; color: #8fe6ff; font-size: 17px; overflow-wrap: anywhere; }
.news-item p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }

/* Site-wide banner (server TC_NOTICE): above everything, including the sign-in gate */
.site-notice { position: fixed; top: 0; left: 0; right: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; flex-wrap: wrap; background: linear-gradient(90deg, #ff2bd6, #ffc45b); color: #12051f; font-weight: 800; font-size: 14px; line-height: 1.35; text-align: center; box-shadow: 0 4px 18px rgba(0,0,0,.45); }
.site-notice.hidden { display: none; }
.site-notice button { min-width: 64px; min-height: 32px; padding: 4px 16px; border: 0; border-radius: 999px; background: #12051f; color: #ffc45b; font: inherit; font-weight: 900; cursor: pointer; }
body.has-notice { padding-top: var(--notice-h, 52px); }
body.has-notice .signin-gate { padding-top: calc(var(--notice-h, 52px) + 12px); }

#cardNameMsg { min-height: 1.2em; margin: 4px 0 0; } #cardNameMsg.bad { color: #ff7a8a; }
/* Skip buttons sit below the site banner while it is up */
body.has-notice .ad-skip, body.has-notice .cn-skip { top: calc(var(--notice-h, 52px) + 12px); }

/* Match performance mode (2.9.6): while a match is on (.app.playing) drop the effects that cost frames every
   frame: live blur behind panels (re-blurred over the moving floor), the floor and light beams. Only THEONE's cards
   (the player and the boss) keep their aura; every other card goes still. Hits, blood, slashes and round calls play. */
body.in-match .grid-floor { animation: none; }
body.in-match .light-beam { display: none; }
.app.playing .panel, .app.playing .main-tabs .tab-btn { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(6,12,28,.9); }
.app.playing .tc-card:not(.kind-player):not(.kind-boss):not(.struck),
.app.playing .tc-card:not(.kind-player):not(.kind-boss) .tc-aura { animation: none !important; }

/* Hit (2.9.6): the struck fighter's face flinches and flushes red, and a blade slash cuts across the screen. */
.tc-card.struck .tc-art { animation: tcFlinch .55s ease-out; }
@keyframes tcFlinch {
  0% { transform: none; }
  12% { transform: translateX(-6%) rotate(-4deg) scale(1.07, .93); filter: sepia(1) saturate(4) hue-rotate(-50deg) contrast(1.4) brightness(1.1); }
  30% { transform: translateX(4%) rotate(3deg) scale(.97, 1.03); filter: sepia(.8) saturate(3) hue-rotate(-50deg) contrast(1.3) brightness(.85); }
  55% { transform: translateX(-2%) rotate(-1deg); filter: sepia(.4) saturate(2) hue-rotate(-40deg); }
  100% { transform: none; }
}
.fx-slash { position: fixed; inset: 0; z-index: 9400; pointer-events: none; overflow: hidden; }
.fx-slash::before, .fx-slash::after { content: ""; position: absolute; left: -20%; top: 48%; width: 140%; border-radius: 99px; opacity: 0;
  transform: rotate(var(--slash-rot, -22deg)) scaleX(0); transform-origin: var(--slash-from, left) center; }
.fx-slash::before { height: 7px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9) 35%, #fff 50%, rgba(255,40,60,.95) 65%, transparent); box-shadow: 0 0 16px rgba(255,50,70,.9), 0 0 3px #fff; }
.fx-slash::after { height: 34px; margin-top: -14px; background: linear-gradient(90deg, transparent, rgba(255,30,50,.35) 45%, rgba(255,30,50,.18) 70%, transparent); }
.fx-slash.rev { --slash-rot: 22deg; --slash-from: right; }
.fx-slash.go::before, .fx-slash.go::after { animation: fxSlash .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fxSlash {
  0% { opacity: 1; transform: rotate(var(--slash-rot, -22deg)) scaleX(0); }
  40% { opacity: 1; transform: rotate(var(--slash-rot, -22deg)) scaleX(1); }
  100% { opacity: 0; transform: rotate(var(--slash-rot, -22deg)) scaleX(1) translateY(6px); }
}
body.reduce-motion .fx-slash { display: none; }
body.reduce-motion .tc-card.struck .tc-art { animation: none; }


/* v2.11.0: Earth Realm avatar picker */
.avatar-modal { z-index: 130; }
.avatar-modal .modal-card { max-width: 760px; max-height: calc(100dvh - 32px); overflow-y: auto; text-align: center; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0; }
.avatar-opt { display: grid; gap: 6px; padding: 6px; border-radius: 14px; border: 2px solid rgba(255,255,255,.12); background: rgba(5,12,24,.7); color: var(--ink); cursor: pointer; text-align: center; transition: transform .15s, border-color .15s, box-shadow .15s; }
.avatar-opt img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 9px; }
.avatar-opt span { display: grid; line-height: 1.15; } .avatar-opt strong { font-size: 11px; letter-spacing: .03em; } .avatar-opt small { font-size: 10px; color: var(--muted); }
.avatar-opt:hover, .avatar-opt:focus-visible { outline: none; border-color: var(--c); transform: translateY(-2px); }
.avatar-opt[aria-checked="true"] { border-color: var(--c); box-shadow: 0 0 0 2px var(--c), 0 0 22px var(--c); transform: translateY(-3px); }
@media (max-width: 640px) { .avatar-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px) { .avatar-grid { grid-template-columns: repeat(2, 1fr); } }
#avatarBtn { justify-self: start; }

/* v2.12.0: ultimates (AI Ladder only) */
.ult-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ult-meter { flex: 1; height: 12px; border-radius: 999px; background: rgba(5,12,24,.85); border: 1px solid rgba(120,170,255,.3); overflow: hidden; }
.ult-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2a6cff, #3ee6ff, #ffc45b); box-shadow: 0 0 12px rgba(62,230,255,.6); transition: width .35s ease; }
.ult-btn { min-height: 44px; min-width: 120px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(10,22,38,.8); color: var(--muted); font: 900 13px Orbitron, sans-serif; letter-spacing: .06em; cursor: pointer; }
.ult-btn:disabled { cursor: default; opacity: .75; }
.ult-btn.ready { color: #160a00; border-color: transparent; background: linear-gradient(135deg, #ffe08a, #ffc45b 45%, #3ee6ff); box-shadow: 0 0 22px rgba(255,196,91,.7); animation: ultPulse 1s ease-in-out infinite; }
@keyframes ultPulse { 50% { transform: scale(1.06); box-shadow: 0 0 34px rgba(62,230,255,.9); } }
.ult-blind .tc-card { filter: blur(6px) brightness(1.6); transition: filter .15s; }
.ult-cast { position: fixed; inset: 0 0 52% 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(4,10,26,.55), rgba(4,10,26,.9)); animation: ultCast 1.5s ease forwards; }
.ult-cast img { width: min(150px, 30vw, 22vh); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; filter: drop-shadow(0 0 22px var(--c)); animation: ultCard .45s cubic-bezier(.2,1.4,.4,1); }
.ult-cast p { margin: 0; font: 900 clamp(16px, 4.5vw, 30px)/1.15 Orbitron, sans-serif; color: #fff; text-transform: uppercase; padding: 0 16px; }
.ult-cast p b { color: var(--c); text-shadow: 0 0 14px var(--c); }
.ult-cast small { color: var(--muted); font-weight: 700; letter-spacing: .08em; }
@keyframes ultCast { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ultCard { from { transform: translateY(40px) scale(.6) rotate(-8deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ult-btn.ready, .ult-cast img { animation: none; } }
/* Seraphina's Rainstorm: light rain on a fixed layer above everything; it never moves the layout or hides the question */
.ult-rain { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
/* Orion's Windstorm: faint streaks blowing across a fixed layer; never moves the layout or hides the question */
.ult-wind { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }

/* v2.13.0: plan the ultimate on the ladder screen (no casting mid-question) */
.ult-plan { width: min(460px, 100%); padding: 10px 12px; border-radius: 14px; border: 1px solid var(--c); background: rgba(5,12,24,.82); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); text-align: center; }
.ult-plan p { margin: 0 0 8px; font-size: 14px; } .ult-plan b { color: var(--c); } .ult-plan small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.up-rounds { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.up-r { min-width: 46px; min-height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(10,22,38,.9); color: var(--ink); font-weight: 800; cursor: pointer; }
.up-r:hover, .up-r:focus-visible { outline: none; border-color: var(--c); }
.up-r.on { background: var(--c); color: #0a0a12; border-color: transparent; box-shadow: 0 0 14px var(--c); }
.up-r.off { min-width: 64px; font-weight: 600; color: var(--muted); }

/* v2.14.0 Arena Ladder screen: under the site banner, and a two-column stage on desktop (copy + plan + buttons on the left,
   the 16-floor tower filling the height on the right) so it reads as one composed screen instead of a narrow stack. */
body.has-notice .ladder-screen { padding-top: calc(var(--notice-h, 52px) + 12px); }
@media (min-width: 1000px) and (min-height: 600px) {
  .ladder-screen { display: grid; grid-template-columns: minmax(340px, 460px) minmax(460px, 560px); grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas: ". tower" "head tower" "plan tower" "actions tower" ". tower"; justify-content: center; align-items: center; column-gap: clamp(36px, 5vw, 80px); row-gap: 18px; padding-block: 28px; }
  body.has-notice .ladder-screen { padding-top: calc(var(--notice-h, 52px) + 20px); }
  .ladder-head { grid-area: head; max-width: none; }
  .ladder-head h2 { font-size: clamp(38px, 3.6vw, 56px); }
  .ladder-tower { grid-area: tower; width: 100%; flex: none; height: auto; max-height: calc(100dvh - var(--notice-h, 0px) - 72px); align-self: center; } /* no empty box under the rows on tall screens */
  .ult-plan { grid-area: plan; justify-self: center; }
  .ladder-actions { grid-area: actions; justify-self: center; }
}

/* v2.14.0: bundled "What's new" feed in Announcements */
.news-item.whatsnew { border-color: rgba(255, 196, 91, .45); background: linear-gradient(180deg, rgba(255, 196, 91, .10), rgba(5, 11, 22, .6)); }
.news-item.whatsnew time b { color: #ffc45b; font-weight: 800; }
.news-item img { display: block; width: 100%; max-width: 560px; height: auto; border-radius: 10px; margin: 4px 0 10px; border: 1px solid rgba(255, 255, 255, .1); }
.news-item ul { margin: 0; padding-left: 1.15em; display: grid; gap: 6px; }
.news-item li { line-height: 1.45; }

/* v2.14.0 NEW UPDATE reveal (js/reveal.mjs): after the trailer, one new AI challenger at a time. Transform/opacity only. */
.rv { position: absolute; inset: 0; z-index: 4; overflow: hidden; cursor: pointer; color: #fff; user-select: none; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(ellipse at 50% 40%, rgba(8, 22, 52, .93), rgba(2, 5, 12, .98) 70%); animation: rvIn .3s ease-out both; }
.rv.rv-fixed { position: fixed; z-index: 9000; }
.rv.rv-out { opacity: 0; transition: opacity .25s; }
@keyframes rvIn { from { opacity: 0; } to { opacity: 1; } }
.rv-scene { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: clamp(10px, 2.2vmin, 22px);
  padding: max(56px, env(safe-area-inset-top)) 16px max(56px, env(safe-area-inset-bottom)); text-align: center; opacity: 0; visibility: hidden; }
.rv-scene.on { opacity: 1; visibility: visible; transition: opacity .28s ease-out; }
.rv-k { margin: 0; font: 900 clamp(14px, 2.6vmin, 24px)/1 Orbitron, sans-serif; letter-spacing: .32em; color: #3ee6ff; text-shadow: 0 0 14px rgba(62, 230, 255, .6); }
.rv h2 { margin: 0; max-width: 18ch; padding: .16em .5em; font: 900 clamp(22px, 6vmin, 64px)/1.08 Orbitron, sans-serif; text-transform: uppercase;
  color: #fff; background: linear-gradient(90deg, #0a6cff, #16c8ff); transform: skewX(-8deg); box-shadow: 0 10px 40px rgba(10, 108, 255, .35); }
.rv-sub { margin: 0; font: 700 clamp(15px, 2.6vmin, 24px)/1.3 Orbitron, sans-serif; color: #ffd27a; letter-spacing: .04em; }
.rv-title.on h2 { animation: rvSlam .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.rv-title.on .rv-sub { animation: rvRise .5s .35s ease-out both; }
@keyframes rvSlam { from { transform: skewX(-8deg) scale(1.7); opacity: 0; } to { transform: skewX(-8deg) scale(1); opacity: 1; } }
@keyframes rvRise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
/* one challenger: big framed portrait, push-in, glow in the fighter's colour */
.rv-card { grid-template-rows: auto auto; }
.rv-frame { position: relative; height: min(62vh, 580px, calc(84vw * 502 / 476)); aspect-ratio: 476 / 502; border-radius: 18px; overflow: hidden; background: #000;
  border: 3px solid var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 0 34px var(--c), 0 0 80px -10px var(--c); }
.rv-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.0); will-change: transform; }
.rv-card.on .rv-frame { animation: rvCardIn .42s cubic-bezier(.2, 1.2, .4, 1) both; }
.rv-card.on .rv-frame img { animation: rvPush var(--dur, 1700ms) linear both; }
@keyframes rvCardIn { from { transform: scale(1.18) translateY(4%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rvPush { from { transform: scale(1.0); } to { transform: scale(1.09); } }
.rv-cap { display: grid; justify-items: center; gap: 4px; }
.rv-card.on .rv-cap { animation: rvRise .4s .12s ease-out both; }
.rv-tag { font: 900 clamp(12px, 2vmin, 17px)/1.2 Orbitron, sans-serif; letter-spacing: .14em; color: #0b0f18; background: var(--c); padding: 6px 12px; border-radius: 999px; }
.rv-cap b { font: 900 clamp(24px, 5vmin, 50px)/1.08 Cinzel, serif; letter-spacing: .02em; color: #fff; text-shadow: 0 0 22px var(--c), 0 2px 0 #000; }
.rv-cap i { font: 700 clamp(13px, 2.2vmin, 19px)/1.2 Orbitron, sans-serif; font-style: normal; letter-spacing: .22em; color: #ffd27a; }
.rv-cap small { font: 700 12px/1 Orbitron, sans-serif; letter-spacing: .2em; color: rgba(255, 255, 255, .55); }
/* the group shot + call to action */
.rv-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.6vmin, 18px); max-width: min(96vw, 1200px); }
.rv-row img { width: min(17vw, 28vh, 200px); aspect-ratio: 476 / 502; object-fit: cover; border-radius: 12px; border: 2px solid var(--c); box-shadow: 0 0 20px var(--c); }
.rv-line.on .rv-row img { animation: rvRise .35s ease-out both; }
.rv-line.on .rv-row img:nth-child(2) { animation-delay: .06s; } .rv-line.on .rv-row img:nth-child(3) { animation-delay: .12s; }
.rv-line.on .rv-row img:nth-child(4) { animation-delay: .18s; } .rv-line.on .rv-row img:nth-child(5) { animation-delay: .24s; }
.rv-line.on h2 { animation: rvSlam .45s .3s cubic-bezier(.2, 1.3, .4, 1) both; }
@media (orientation: portrait) { .rv-row { max-width: 94vw; } .rv-row img { width: 28vw; } }
.rv-hint { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0; font: 700 12px/1 Orbitron, sans-serif; letter-spacing: .18em; color: rgba(255, 255, 255, .6); text-align: center; pointer-events: none; }
body.has-notice .rv-scene { padding-top: calc(var(--notice-h, 52px) + 24px); }
/* reduced motion: plain fades, no zoom or slam */
.rv.rv-reduce *, .rv.rv-reduce { animation: none !important; }
.rv.rv-reduce .rv-scene.on { transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { .rv *, .rv { animation: none !important; } }
@media (max-height: 520px) and (orientation: landscape) { .rv-scene { padding: 12px 16px 30px; } .rv-card { grid-template-rows: none; grid-template-columns: auto minmax(0, 22rem); align-items: center; text-align: left; }
  .rv-card .rv-frame { height: min(74vh, 360px); } .rv-cap { justify-items: start; } .rv h2 { font-size: clamp(20px, 5.4vh, 34px); } .rv-row img { width: min(15vw, 34vh); } }
.settings-list label .btn { min-height: 42px; padding: 8px 16px; flex: none; }
.version-line { margin-top: 14px; }
.version-line a { color: #8fe6ff; }
/* v2.14.0 phone landscape: tower beside the buttons instead of squeezed under them */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 640px) {
  .ladder-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); grid-template-rows: 1fr auto auto auto 1fr; grid-template-areas: ". tower" "head tower" "plan tower" "actions tower" ". tower"; column-gap: 20px; row-gap: 10px; align-items: center; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
  body.has-notice .ladder-screen { padding-top: calc(var(--notice-h, 52px) + 8px); }
  .ladder-head { grid-area: head; } .ladder-head h2 { font-size: clamp(26px, 7vh, 40px); }
  .ladder-tower { grid-area: tower; width: 100%; flex: none; height: 100%; max-height: calc(100dvh - var(--notice-h, 0px) - 20px); align-self: stretch; }
  .ult-plan { grid-area: plan; justify-self: center; } .ladder-actions { grid-area: actions; justify-self: center; }
}

/* v2.14.2: report a player from the result card */
.report-btn { margin-left: auto; }
.report-box { margin-top: 14px; padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(0,0,0,.28); text-align: left; }
.report-row { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; font-size: 14px; color: var(--muted); }
.report-row select, .report-row input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; }
.report-row select:focus, .report-row input:focus { outline: 2px solid rgba(255,255,255,.35); outline-offset: 1px; }
.report-box .mode-actions { margin-top: 10px; }
.report-msg { min-height: 1.2em; margin: 8px 0 0; }

/* ===== v2.15.0: answer box never moves · Easy/Normal picker · ultimate screen effects · ranking page height ===== */
/* No Hit button: answers fire on their own (digit count) or with Enter. The stage has a FIXED height and the feedback line
   is one line, so ROUND n / FIGHT / the question / the round result never push the answer box up or down. */
.answer-row { grid-template-columns: 1fr !important; max-width: 380px; }
.feedback { height: 22px; min-height: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.question.stage { height: clamp(184px, 27vh, 270px); min-height: 0 !important; overflow: hidden; }
@media (max-width: 760px) { .question.stage { height: 184px; } }
@media (max-height: 860px) and (min-width: 761px) { .question.stage { height: 184px; } }
.question.stage .sr { gap: 5px; }
.question.stage .sr-row { padding: 6px 12px; }
.question.stage .sr-title { margin: 0 0 2px; font-size: clamp(18px, 5vw, 30px); }

.ladder-diff { margin: 10px auto 0; display: grid; justify-items: center; gap: 6px; }
.ladder-diff .ld-k { font: 800 11px Orbitron, sans-serif; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.ladder-diff .ld-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ladder-diff button { min-height: 52px; min-width: 150px; padding: 8px 14px; display: grid; gap: 2px; border-radius: 14px; cursor: pointer;
  background: rgba(8,16,30,.85); border: 1px solid rgba(255,255,255,.18); color: #eaf6ff; text-align: center; }
.ladder-diff button b { font: 900 16px Orbitron, sans-serif; letter-spacing: .1em; }
.ladder-diff button small { font-size: 11px; color: var(--muted); font-weight: 700; }
.ladder-diff button[data-diff="easy"].on { border-color: var(--green); box-shadow: 0 0 18px rgba(57,255,136,.45); }
.ladder-diff button[data-diff="normal"].on { border-color: var(--pink); box-shadow: 0 0 18px rgba(255,43,214,.45); }
.ladder-diff button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ladder-diff .ld-now { font: 800 12px Orbitron, sans-serif; letter-spacing: .12em; color: var(--gold); padding: 4px 12px; border: 1px solid rgba(255,196,91,.4); border-radius: 999px; }

/* Shared full-screen layer for every ultimate. Fixed, click-through, transform/opacity only (cheap on phones). */
.ult-fx { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; contain: strict; transition: opacity .5s; }
.ult-fx.out { opacity: 0; }

/* RAINSTORM: dark storm tint, heavy falling rain, drops landing on the screen glass and sliding down, lightning. */
.ult-rain .rain-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,30,60,.42), rgba(5,15,35,.18) 60%, rgba(10,30,60,.32)); animation: fxIn .6s ease-out both; }
.ult-rain .rain-fall i { position: absolute; top: -14vh; width: 2px; height: 12vh; border-radius: 2px; background: linear-gradient(transparent, rgba(170,225,255,.75)); animation: rainFall linear infinite; will-change: transform; }
.ult-rain .rain-glass b { position: absolute; width: var(--s); height: calc(var(--s) * 1.18); border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.85) 0 12%, rgba(200,235,255,.28) 22%, rgba(120,180,230,.14) 60%, rgba(255,255,255,.4) 100%);
  box-shadow: inset 0 -2px 3px rgba(255,255,255,.35), 0 2px 4px rgba(0,10,30,.35); animation: dropSlide ease-in infinite; opacity: 0; will-change: transform, opacity; }
.ult-rain .rain-glass b::before { content: ""; position: absolute; left: 34%; bottom: 70%; width: 32%; height: 22vh; border-radius: 99px; transform-origin: 50% 100%;
  background: linear-gradient(rgba(200,235,255,0), rgba(200,235,255,.32)); transform: scaleY(0); animation: inherit; animation-name: dropTrail; }
.ult-rain .rain-flash { position: absolute; inset: 0; background: rgba(220,240,255,.85); opacity: 0; animation: lightning 5.2s 1.4s infinite; }
@keyframes rainFall { to { transform: translate(-6vw, 128vh); } }
@keyframes dropSlide { 0% { opacity: 0; transform: translateY(0) scale(.2); } 6% { opacity: 1; transform: translateY(0) scale(1); } 40% { transform: translateY(1vh) scale(1); }
  92% { opacity: .95; transform: translateY(46vh) scale(.92, 1.08); } 100% { opacity: 0; transform: translateY(52vh) scale(.6); } }
@keyframes dropTrail { 0%, 40% { transform: scaleY(0); } 92% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes lightning { 0%, 90%, 100% { opacity: 0; } 91% { opacity: .75; } 92% { opacity: .1; } 93.5% { opacity: .55; } 96% { opacity: 0; } }
@keyframes fxIn { from { opacity: 0; } to { opacity: 1; } }

/* WINDSTORM: gusts tearing across the screen, leaves, a slight sway of the tint. */
.ult-wind .wind-tint { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(160,255,210,.12), transparent 60%), linear-gradient(90deg, rgba(20,60,50,.28), rgba(10,30,30,.08)); animation: windSway 2.4s ease-in-out infinite alternate; }
.ult-wind i { position: absolute; left: -45vw; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, rgba(210,255,230,.6), transparent); animation: windBlow linear infinite; will-change: transform; }
.ult-wind u { position: absolute; left: -6vw; width: 10px; height: 6px; border-radius: 60% 0; background: rgba(170,230,140,.8); animation: leafBlow linear infinite; will-change: transform; }
@keyframes windBlow { to { transform: translateX(160vw) translateY(-4vh); } }
@keyframes leafBlow { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(55vw, -8vh) rotate(380deg); } 100% { transform: translate(115vw, 4vh) rotate(760deg); } }
@keyframes windSway { from { transform: translateX(-2%); } to { transform: translateX(2%); } }

/* STRIKE: the screen flashes white and a lightning bolt splits it. */
.ult-strike .strike-flash { position: absolute; inset: 0; background: #eaf6ff; animation: strikeFlash .9s ease-out both; }
.ult-strike svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: strikeBolt .9s ease-out both; filter: drop-shadow(0 0 10px #8fd8ff) drop-shadow(0 0 30px #3ee6ff); }
@keyframes strikeFlash { 0% { opacity: .95; } 12% { opacity: .1; } 20% { opacity: .7; } 100% { opacity: 0; } }
@keyframes strikeBolt { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }

/* DIVINE BEAUTY: a pink-gold glow and sparkles drifting up the screen. */
.ult-beauty .beauty-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, rgba(255,120,200,.32), rgba(255,200,120,.12) 45%, transparent 70%); animation: fadeInOut 2.6s ease-in-out both; }
.ult-beauty i { position: absolute; bottom: -4vh; font-style: normal; color: #ffd6f1; text-shadow: 0 0 10px #ff6fcf, 0 0 22px #ffc45b; animation: sparkleUp ease-out both; }
@keyframes fadeInOut { 0% { opacity: 0; } 20%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sparkleUp { 0% { opacity: 0; transform: translateY(0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-80vh) scale(1.2) rotate(140deg); } }

/* IRON HEART: a red heart beats twice in the middle of the screen. */
.ult-heart .heart-vig { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(160,0,30,.45)); animation: fadeInOut 1.8s ease-in-out both; }
.ult-heart b { position: absolute; left: 50%; top: 42%; font-size: min(38vw, 260px); line-height: 1; color: #ff2e5a; text-shadow: 0 0 30px #ff2e5a, 0 0 80px rgba(255,46,90,.7); transform: translate(-50%, -50%); animation: heartBeat 1.8s ease-out both; }
@keyframes heartBeat { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 25% { transform: translate(-50%, -50%) scale(.9); }
  38% { transform: translate(-50%, -50%) scale(1.2); } 55% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }

/* Ranked history (My Profile; replaces the old Career Ladder) */
.ranked-history { margin-top: 16px; }
.ranked-history h3 { margin: 0 0 4px; font: 900 15px Orbitron, sans-serif; letter-spacing: .08em; }
.rh-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.rh-list li { display: grid; grid-template-columns: 52px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); font-weight: 800; font-size: 14px; }
.rh-list .rh-res { font: 900 12px Orbitron, sans-serif; letter-spacing: .08em; text-align: center; padding: 3px 0; border-radius: 8px; }
.rh-list .rh-res.win { color: var(--green); border: 1px solid rgba(57,255,136,.5); }
.rh-list .rh-res.loss { color: var(--red); border: 1px solid rgba(255,46,136,.5); }
.rh-list .rh-res.draw { color: var(--gold); border: 1px solid rgba(255,196,91,.5); }
.rh-list .rh-opp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-list .rh-opp small { display: block; color: var(--muted); font-weight: 700; font-size: 11px; }
.rh-list .rh-psr { color: var(--blue); white-space: nowrap; }
.rh-list .rh-score { color: var(--muted); white-space: nowrap; }
@media (max-width: 420px) { .rh-list li { grid-template-columns: 46px 1fr auto; } .rh-list .rh-score { display: none; } }
/* v2.15.0: the Ranked Ladder page uses the whole screen height (was capped at 360 px) and scrolls inside when the list is longer */
.app.rsub-ladder .world-ladder-list { max-height: max(360px, calc(100dvh - 250px)); }
.app.rsub-ladder #friendsPanel { min-height: calc(100dvh - 170px); }
@media (max-width: 760px) { .app.rsub-ladder .world-ladder-list { max-height: max(320px, calc(100dvh - 210px)); } }
