:root {
  color-scheme: dark;
  --bg: #060912;
  --panel: rgba(15, 21, 34, .88);
  --line: rgba(193, 211, 238, .15);
  --text: #f4f7fb;
  --muted: #8995aa;
  --cyan: #4de4ff;
  --blue: #4988ff;
  --red: #ff526e;
  --gold: #f7c76b;
  --safe-bottom: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); }
body { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--text); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { min-height: 100vh; min-height: var(--app-height, 100vh); min-height: 100dvh; background: radial-gradient(circle at 16% 3%, rgba(35, 91, 147, .2), transparent 29rem), radial-gradient(circle at 86% 30%, rgba(112, 28, 49, .13), transparent 30rem), #060912; }
.topbar { height: 76px; padding: 0 clamp(18px, 4vw, 62px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: rgba(6, 9, 18, .86); backdrop-filter: blur(18px); position: relative; z-index: 20; }
.brand { display: flex; gap: 13px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border: 1px solid rgba(77, 228, 255, .35); color: var(--cyan); font: 800 19px Georgia, serif; transform: rotate(-5deg); background: rgba(77, 228, 255, .06); }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand small { color: #76839a; letter-spacing: .23em; font-size: 9px; }
.brand strong { margin-top: 6px; letter-spacing: .08em; }
.connection-pill { display: flex; align-items: center; gap: 8px; min-width: 112px; justify-content: center; border: 1px solid var(--line); border-radius: 100px; padding: 9px 14px; color: var(--muted); font-size: 12px; background: rgba(255,255,255,.025); }
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #596174; box-shadow: 0 0 0 4px rgba(89,97,116,.12); }
.connection-pill[data-state="connecting"] i { background: var(--gold); animation: pulse 1s infinite; }
.connection-pill[data-state="online"] { color: #baf4e6; border-color: rgba(55,226,172,.25); }
.connection-pill[data-state="online"] i { background: #37e2ac; box-shadow: 0 0 0 4px rgba(55,226,172,.13), 0 0 15px rgba(55,226,172,.65); }
.connection-pill[data-state="error"] { color: #ff9bab; border-color: rgba(255,82,110,.25); }
.connection-pill[data-state="error"] i { background: var(--red); }
main { width: 100%; }
.screen { display: none; }
.screen.is-active { display: block; }
.lobby { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: clamp(42px, 7vw, 86px) 0 64px; }
.lobby-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.eyebrow { color: var(--cyan); font: 700 11px/1.2 ui-monospace, monospace; letter-spacing: .32em; margin: 0 0 13px; }
h1 { font-size: clamp(32px, 5vw, 58px); letter-spacing: -.045em; margin: 0; line-height: 1.06; }
.lobby-heading > div > p:last-child { color: var(--muted); max-width: 650px; line-height: 1.8; margin: 16px 0 0; font-size: 14px; }
.prototype-tag { border: 1px solid rgba(247,199,107,.28); color: var(--gold); padding: 9px 13px; letter-spacing: .12em; font-size: 11px; white-space: nowrap; }
.panel { border: 1px solid var(--line); background: linear-gradient(135deg, rgba(18,27,43,.86), rgba(9,13,23,.88)); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
.character-panel, .room-panel { padding: clamp(20px, 3vw, 34px); }
.room-panel { margin-top: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-title > div { display: flex; align-items: center; gap: 12px; }
.section-title span { color: var(--cyan); font: 700 11px ui-monospace, monospace; }
.section-title h2 { font-size: 17px; letter-spacing: .08em; margin: 0; }
.section-title p { color: var(--muted); font-size: 12px; margin: 0; }
.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.character-card { min-width: 0; min-height: 166px; position: relative; overflow: hidden; text-align: left; display: grid; grid-template-columns: 64px 1fr; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); background: rgba(5,9,17,.66); cursor: pointer; transition: .2s ease; }
.character-card::before { content:""; position: absolute; inset: auto -30% -65% 10%; height: 150px; background: var(--card-glow, #4de4ff); opacity: .08; filter: blur(25px); transform: rotate(-10deg); }
.character-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.26); }
.character-card.is-selected { border-color: #4de4ff; border-color: color-mix(in srgb, var(--card-glow, #4de4ff) 70%, white 10%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 28px rgba(77,228,255,.06); }
.character-card[data-character="sukuna"] { --card-glow: #ff526e; }
.character-card[data-character="higuruma"] { --card-glow: #f7c76b; }
.character-card[data-character="megumi"] { --card-glow: #9b8cff; }
.portrait { width: 62px; height: 92px; align-self: end; display: grid; place-items: center; position: relative; background: linear-gradient(160deg, #173345, #070a12); background: linear-gradient(160deg, color-mix(in srgb, var(--card-glow, #4de4ff) 25%, #111827), #070a12); border: 1px solid rgba(255,255,255,.1); clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); }
.portrait::after { content:""; position: absolute; width: 32px; height: 38px; border-radius: 48% 48% 44% 44%; background: rgba(231,231,229,.78); top: 18px; box-shadow: 0 19px 0 8px rgba(25,30,45,.9); }
.portrait i { position: relative; z-index: 2; color: #080b13; font-style: normal; font-weight: 900; font-size: 12px; top: -10px; }
.portrait-sukuna::after { background: #dba0a2; box-shadow: inset 0 0 0 2px #471721, 0 19px 0 8px #421522; }
.portrait-higuruma::after { border-radius: 40% 40% 48% 48%; background: #d8c3a7; box-shadow: -4px -3px 0 #16171b, 0 19px 0 8px #27272b; }
.portrait-megumi::after { background: #c5ccd5; box-shadow: -6px -7px 0 #111826, 6px -8px 0 #111826, 0 19px 0 8px #111827; }
.character-copy { display: grid; align-self: center; position: relative; z-index: 1; }
.character-copy strong { font-size: 18px; margin-bottom: 6px; }
.character-copy small { color: var(--muted); font-size: 11px; }
.role-token { position: absolute; right: 12px; top: 12px; color: #7e899e; font-size: 9px; letter-spacing: .05em; }
.room-actions { display: grid; grid-template-columns: minmax(250px, .75fr) 1.5fr; gap: 14px; }
.primary-action { border: 1px solid rgba(77,228,255,.34); background: linear-gradient(110deg, rgba(28,129,174,.34), rgba(35,70,125,.25)); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 13px; padding: 17px 22px; min-height: 76px; transition: .2s; }
.primary-action:hover { border-color: var(--cyan); filter: brightness(1.14); }
.primary-action:disabled { opacity: .45; cursor: wait; }
.primary-action span:last-child { display: grid; text-align: left; }
.primary-action strong { font-size: 15px; }
.primary-action small { color: #a3b0c3; font-size: 10px; margin-top: 4px; }
.action-icon { font-size: 25px; color: var(--cyan); }
.join-box { padding: 13px 16px; border: 1px solid var(--line); background: rgba(5,9,17,.62); }
.join-box label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .1em; margin-bottom: 8px; }
.join-box > div { display: flex; gap: 9px; }
.join-box input { min-width: 0; flex: 1; height: 42px; border: 1px solid var(--line); background: #090e19; color: var(--text); padding: 0 14px; text-transform: uppercase; letter-spacing: .18em; border-radius: 0; }
.join-box button, .ghost-action { border: 1px solid rgba(255,255,255,.18); background: #edf4fb; color: #0a0e17; padding: 0 24px; font-weight: 750; cursor: pointer; }
.join-box button:hover { background: var(--cyan); }
.room-help { color: #68768a; font-size: 11px; margin: 17px 0 0; }
.room-help i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #37e2ac; margin-right: 5px; }
.waiting { min-height: calc(100vh - 76px); min-height: calc(100dvh - 76px); padding: 42px 18px; place-items: center; }
.waiting.is-active { display: grid; }
.waiting-card { width: min(680px, 100%); padding: clamp(28px, 5vw, 52px); text-align: center; }
.waiting-card h1 { font-size: clamp(30px, 6vw, 49px); }
.waiting-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.room-code { display: inline-grid; margin: 22px auto 34px; padding: 13px 24px 9px; border: 1px solid rgba(77,228,255,.35); background: rgba(77,228,255,.06); cursor: pointer; }
.room-code span { font: 800 clamp(28px, 7vw, 44px)/1 ui-monospace, monospace; letter-spacing: .18em; color: var(--cyan); }
.room-code small { margin-top: 7px; color: var(--muted); font-size: 9px; }
.peer-route { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 12px; margin: 12px 0 34px; }
.peer { display: grid; justify-items: center; gap: 4px; }
.peer > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #e8f8ff; color: #10141d; font: 900 17px serif; border: 3px solid rgba(77,228,255,.25); }
.peer.remote > span { background: #171d2a; color: #788498; border-color: rgba(255,255,255,.08); }
.peer strong { margin-top: 4px; font-size: 12px; }
.peer small { color: var(--muted); font-size: 10px; }
.route-line { display: grid; justify-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.route-line i { width: 100%; height: 1px; background: var(--line); overflow: visible; position: relative; }
.route-line i::after { content:""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); position: absolute; left: 0; top: -4px; animation: route 1.7s ease-in-out infinite; }
.waiting-actions { display: flex; justify-content: center; gap: 10px; }
.primary-action.compact { min-height: 46px; padding: 0 22px; }
.ghost-action { min-height: 46px; color: #bdc7d6; background: transparent; }
.battle { min-height: calc(100vh - 76px); min-height: calc(100dvh - 76px); padding: 18px; }
.battle.is-active { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; }
.battle-frame { position: relative; overflow: hidden; width: min(100%, calc((100vh - 200px) * 16 / 9)); width: min(100%, calc((100dvh - 200px) * 16 / 9)); min-height: 300px; aspect-ratio: 16/9; place-self: center; border: 1px solid rgba(151,181,221,.23); background: #050812; box-shadow: 0 26px 80px rgba(0,0,0,.44); }
#gameCanvas { display: block; width: 100%; height: 100%; touch-action: none; }
.battle-hud { position: absolute; inset: 15px 18px auto; display: grid; grid-template-columns: 1fr 110px 1fr; gap: 16px; pointer-events: none; }
.fighter-hud { display: grid; grid-template-columns: 1fr 38px; gap: 5px 8px; align-items: center; }
.guest-hud { direction: rtl; }
.guest-hud > * { direction: ltr; }
.hud-name { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
.guest-hud .hud-name { justify-content: flex-end; }
.hud-name strong { font-size: clamp(12px, 2vw, 18px); text-shadow: 0 2px 6px #000; }
.hud-name small { color: #9aa5b8; font-size: 9px; }
.health-track { height: 9px; border: 1px solid rgba(255,255,255,.17); padding: 2px; background: rgba(0,0,0,.48); }
.health-track i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #38dcf5, #6ee7ff); transition: width .2s; }
.guest-hud .health-track i { background: linear-gradient(90deg, #ff879b, #ff405f); margin-left: auto; }
.fighter-hud > span { font: 700 10px ui-monospace, monospace; color: #d6e4f3; }
.round-center { text-align: center; display: grid; justify-items: center; align-content: start; }
.round-center span { color: var(--gold); font: 700 9px ui-monospace, monospace; letter-spacing: .15em; }
.round-center strong { font: 800 clamp(14px, 2.2vw, 21px) ui-monospace, monospace; margin: 2px 0; }
.round-center small { color: #7f8b9e; font-size: 8px; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; font: 900 clamp(54px, 13vw, 132px)/1 Impact, sans-serif; letter-spacing: .04em; text-shadow: 0 0 35px rgba(77,228,255,.45), 0 4px 0 rgba(0,0,0,.4); }
.domain-banner { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%) scale(.8); opacity: 0; pointer-events: none; white-space: nowrap; font: 900 clamp(24px, 5vw, 58px) serif; letter-spacing: .2em; text-shadow: 0 0 22px currentColor, 0 4px 2px #000; }
.domain-banner.show { animation: domainBanner 1.7s ease forwards; }
.result-panel { position: absolute; inset: 0; background: rgba(3,6,12,.8); backdrop-filter: blur(8px); display: grid; place-content: center; text-align: center; padding: 20px; z-index: 5; }
.result-panel[hidden] { display: none; }
.result-panel p { color: var(--cyan); letter-spacing: .32em; font: 700 10px ui-monospace, monospace; }
.result-panel h2 { font-size: clamp(34px, 8vw, 76px); margin: 5px; }
.result-panel > span { color: #a9b5c7; }
.result-panel > div { display: flex; justify-content: center; gap: 10px; margin-top: 25px; }
.result-panel button { min-width: 130px; padding: 12px 18px; border: 1px solid rgba(255,255,255,.2); background: #eef5fb; color: #080c14; cursor: pointer; font-weight: 800; }
.result-panel button:last-child { background: transparent; color: #c8d1df; }
.battle-controls { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; width: min(100%, 900px); place-self: center; padding-bottom: var(--safe-bottom); }
.control-tip { display: grid; }
.control-tip span { font-weight: 800; }
.control-tip small { color: var(--muted); margin-top: 5px; }
.attack-btn, .domain-btn { border: 1px solid rgba(255,255,255,.18); min-width: 150px; height: 72px; cursor: pointer; background: linear-gradient(135deg, #182337, #0b111e); display: grid; grid-template-columns: 42px 1fr; grid-template-rows: 1fr 1fr; align-items: center; text-align: left; column-gap: 10px; padding: 9px 14px; user-select: none; touch-action: manipulation; }
.attack-btn > span { grid-row: 1 / -1; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(77,228,255,.13); border: 1px solid rgba(77,228,255,.35); color: var(--cyan); font: 900 19px serif; }
.attack-btn strong, .domain-btn strong { align-self: end; font-size: 13px; }
.attack-btn small, .domain-btn small { align-self: start; color: var(--muted); font-size: 9px; }
.attack-btn:active { transform: translateY(2px); filter: brightness(1.35); }
.domain-btn { --charge: 0%; min-width: 190px; border-color: rgba(247,199,107,.25); }
.domain-btn:disabled { filter: saturate(.25); opacity: .6; cursor: not-allowed; }
.domain-ring { grid-row: 1/-1; position: relative; width: 45px; height: 45px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(247,199,107,.25); }
.domain-ring i { position: absolute; inset: 0; background: conic-gradient(var(--gold) var(--charge), rgba(255,255,255,.08) 0); }
.domain-ring::after { content:""; position: absolute; inset: 5px; border-radius: 50%; background: #101625; }
.domain-ring b { position: relative; z-index: 2; color: var(--gold); font-family: serif; }
.toast { position: fixed; left: 50%; bottom: calc(26px + var(--safe-bottom)); transform: translate(-50%, 18px); opacity: 0; pointer-events: none; z-index: 100; padding: 11px 18px; border: 1px solid rgba(255,255,255,.16); background: rgba(8,12,21,.94); color: #e8eef7; font-size: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes route { 0% { left: 0; opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes domainBanner { 0% { opacity:0; transform:translate(-50%,-50%) scale(.65); } 20%,65% { opacity:1; transform:translate(-50%,-50%) scale(1); } 100% { opacity:0; transform:translate(-50%,-50%) scale(1.08); } }
@media (max-width: 850px) {
  .character-grid { grid-template-columns: repeat(2, 1fr); }
  .room-actions { grid-template-columns: 1fr; }
  .battle { padding: 8px; }
  .battle-frame { width: 100%; min-height: 0; }
  .control-tip { display: none; }
  .battle-controls { grid-template-columns: 1fr 1.18fr; }
  .attack-btn, .domain-btn { min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .topbar { height: 64px; padding: 0 14px; }
  .brand-mark { width: 35px; }
  .brand small { display: none; }
  .brand strong { margin: 0; font-size: 14px; }
  .connection-pill { min-width: auto; padding: 8px 10px; }
  .connection-pill span { font-size: 10px; }
  .lobby { width: calc(100% - 22px); padding: 32px 0 45px; }
  .lobby-heading { display: block; }
  .prototype-tag { display: inline-block; margin-top: 18px; }
  .section-title { align-items: flex-start; }
  .section-title p { max-width: 135px; text-align: right; line-height: 1.45; }
  .character-panel, .room-panel { padding: 15px; }
  .character-grid { gap: 8px; }
  .character-card { min-height: 125px; padding: 12px; grid-template-columns: 44px 1fr; gap: 9px; }
  .portrait { width: 44px; height: 68px; }
  .portrait::after { width: 24px; height: 29px; top: 13px; box-shadow: 0 14px 0 6px rgba(25,30,45,.9); }
  .portrait-sukuna::after { box-shadow: inset 0 0 0 1px #471721, 0 14px 0 6px #421522; }
  .portrait-higuruma::after { box-shadow: -3px -2px 0 #16171b, 0 14px 0 6px #27272b; }
  .portrait-megumi::after { box-shadow: -4px -5px 0 #111826, 4px -6px 0 #111826, 0 14px 0 6px #111827; }
  .character-copy strong { font-size: 14px; }
  .role-token { right: 8px; top: 7px; font-size: 7px; }
  .join-box > div { display: grid; grid-template-columns: 1fr 100px; }
  .join-box button { padding: 0 8px; }
  .waiting { min-height: calc(100vh - 64px); min-height: calc(100dvh - 64px); }
  .peer-route { grid-template-columns: 76px 1fr 76px; gap: 6px; }
  .waiting-actions { flex-direction: column; }
  .battle { height: calc(100vh - 64px); height: calc(var(--app-height, 100vh) - 64px); height: calc(100dvh - 64px); min-height: 0; grid-template-rows: auto minmax(0, 1fr) !important; padding: 6px; }
  .battle-frame { width: 100%; height: auto; min-height: 0; aspect-ratio: auto; align-self: start; }
  #gameCanvas { width: 100%; margin-left: 0; }
  .battle-controls { align-self: end; }
  .battle-hud { inset: 9px 8px auto; grid-template-columns: 1fr 66px 1fr; gap: 5px; }
  .hud-name small { display: none; }
  .health-track { height: 7px; }
  .fighter-hud { grid-template-columns: 1fr 27px; gap: 3px; }
  .round-center small { display:none; }
  .attack-btn, .domain-btn { height: 72px; padding: 7px 9px; grid-template-columns: 37px 1fr; gap: 7px; }
  .attack-btn > span, .domain-ring { width: 37px; height: 37px; }
  .domain-btn strong, .attack-btn strong { font-size: 11px; }
  .result-panel > div { flex-direction: column; }
}
@media (max-width: 850px) and (orientation: landscape) {
  .battle { grid-template-rows: minmax(0, 1fr) calc(84px + var(--safe-bottom)) !important; }
  .battle-frame { width: auto; height: 100%; max-width: 100%; aspect-ratio: 16/9; justify-self: center; }
  #gameCanvas { width: 100%; margin-left: 0; }
  .battle-controls { align-self: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }

/* HUD 使用屏幕坐标，画布保持完整 16:9；控制区不占用战场。 */
.is-battling .topbar { height: 48px; }
.battle.is-active { height: auto; min-height: calc(var(--app-height, 100vh) - 48px); grid-template-rows: auto auto !important; align-content: center; gap: 12px; padding: 10px; }
.battle-frame { width: min(100%, calc((var(--app-height, 100vh) - 222px - var(--safe-bottom)) * 16 / 9)); height: auto; min-height: 0; aspect-ratio: auto; padding-top: 60px; align-self: center; }
#gameCanvas { width: 100%; height: auto; aspect-ratio: 16 / 9; margin-left: 0; }
.battle-hud { inset: 9px 12px auto; }
.countdown, .result-panel { top: 60px; }
.battle-controls { grid-template-columns: auto 1fr auto auto; align-self: center; }
.battle-leave { color: #bcc8d8; border: 1px solid var(--line); background: #101725; min-height: 44px; padding: 8px 12px; cursor: pointer; }
.attack-btn:disabled { opacity: .5; cursor: default; }
.result-panel { padding: 8px; }
.result-panel > p { margin: 0 0 4px; }
.result-panel h2 { font-size: clamp(26px, 4vw, 54px); }
.result-panel > span { font-size: 12px; line-height: 1.5; }
.result-panel > div { flex-direction: row; margin-top: 14px; }
.result-panel button { min-width: 100px; min-height: 44px; padding: 8px 12px; }
.result-panel button:disabled { opacity: .65; cursor: default; }
.domain-banner { top: 38%; font-size: clamp(18px, 4vw, 48px); letter-spacing: .08em; }
@media (max-width: 850px) {
  .battle-controls { grid-template-columns: auto 1fr 1.18fr; gap: 6px; }
  .battle-leave { font-size: 11px; padding: 6px; }
  .battle-hud { grid-template-columns: 1fr 78px 1fr; gap: 6px; }
  .round-center small { display: block; }
}
@media (orientation: portrait) and (max-width: 560px) {
  .battle-frame { width: 100%; }
  .battle.is-active { align-content: start; padding-top: 24px; }
  .battle-controls { grid-template-columns: 1fr 1.18fr; }
  .battle-leave { grid-column: 1 / -1; grid-row: 2; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .is-battling .topbar { display: none; }
  .is-battling .brand-mark { width: 28px; }
  .battle.is-active { min-height: var(--app-height, 100vh); padding: 6px 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); gap: 10px; grid-template-columns: minmax(0, 1fr) 136px; grid-template-rows: auto !important; }
  .battle-frame { width: min(100%, calc((var(--app-height, 100vh) - 70px - var(--safe-bottom)) * 16 / 9)); padding-top: 52px; }
  .battle-hud { top: 4px; }
  .hud-name small, .control-tip { display: none; }
  .hud-name strong { font-size: 12px; white-space: nowrap; }
  .battle-controls { display: flex; flex-direction: column; width: 136px; gap: 10px; }
  .battle-leave { order: 3; width: 100%; }
  .countdown, .result-panel { top: 52px; }
  .attack-btn, .domain-btn { height: 68px; min-width: 0; width: 100%; padding: 8px; grid-template-columns: 32px 1fr; column-gap: 6px; }
  .attack-btn > span, .domain-ring { width: 32px; height: 32px; }
  .attack-btn strong, .domain-btn strong { font-size: 11px; }
  .result-panel h2 { font-size: 24px; margin: 0; }
  .result-panel > div { margin-top: 5px; }
  .result-panel > p { display: none; }
}
