:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #f4f8f8; background: #10161b; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #10161b; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }
.shell { width: min(1220px, 100%); margin: 0 auto; padding: 16px clamp(10px, 2.5vw, 28px) 24px; }
.topbar, .brand, .top-actions, .fight-hud, .fighter-name, .touch-controls, .fight-call, .fight-actions { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.brand { gap: 10px; color: inherit; text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { display: grid; gap: 1px; }
.brand small { color: #71dcd5; font-size: .57rem; font-weight: 900; letter-spacing: .13em; }
.brand strong { font-size: 1.35rem; font-weight: 950; font-style: italic; }
.top-actions { gap: 8px; }
.mode { color: #a7b8bc; font-size: .65rem; font-weight: 850; letter-spacing: .09em; }
.icon-button { width: 34px; height: 34px; border: 1px solid #385056; border-radius: 6px; color: #d8eeec; background: #19252a; font-size: 1rem; font-weight: 850; }
.icon-button:disabled { opacity: .45; cursor: default; }
.fight-call { justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #31464d; border-radius: 8px; background: #121f25; }
.fight-call > div:first-child { display: grid; gap: 3px; min-width: 0; }
.fight-call span { color: #7fe5d7; font-size: .62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.fight-call strong { overflow: hidden; color: #e8f7f4; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.fight-actions { gap: 7px; flex: 0 0 auto; }
.secondary-button { display: inline-grid; place-items: center; min-height: 34px; padding: 0 11px; border: 1px solid #40595d; border-radius: 6px; color: #dff5f1; background: #213137; font-size: .64rem; font-weight: 950; letter-spacing: .07em; text-decoration: none; }
.secondary-button:hover, .secondary-button:focus-visible { border-color: #78e5d7; outline: 0; }
.secondary-button:disabled { opacity: .45; cursor: default; }
#roomLink { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.match { border: 1px solid #34454c; border-radius: 8px; overflow: hidden; background: #0b141a; }
.fight-hud { justify-content: space-between; gap: 20px; min-height: 81px; padding: 10px 18px; background: #131e23; }
.fighter-hud { width: min(39%, 410px); min-width: 0; }
.fighter-hud.right { text-align: right; }
.fighter-name { gap: 7px; margin-bottom: 6px; font-size: .75rem; letter-spacing: .05em; }
.fighter-hud.right .fighter-name { justify-content: flex-end; }
.round-pips { margin-inline: auto 0; color: #bcc9ca; letter-spacing: .1em; }
.fighter-hud.right .round-pips { margin-inline: 0 auto; }
.pip { width: 8px; height: 8px; border-radius: 50%; }
.pip.cyan { background: #60f0df; box-shadow: 0 0 10px #60f0df; }
.pip.coral { background: #ff626d; box-shadow: 0 0 10px #ff626d; }
.health-track, .guard-track { height: 13px; background: #263239; overflow: hidden; border-radius: 3px; }
.health-track i, .guard-track i { display: block; width: 100%; height: 100%; transition: width .12s linear; }
.left .health-track i { background: linear-gradient(90deg, #3abbc9, #7df3d4); }
.right .health-track i { margin-left: auto; background: linear-gradient(90deg, #ff9a69, #f04c67); }
.guard-track { height: 4px; margin-top: 5px; }
.guard-track i { background: #d7e9a2; }
.right .guard-track i { margin-left: auto; }
.round-clock { display: grid; gap: 1px; min-width: 86px; text-align: center; }
.round-clock strong { font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.round-clock span { color: #a8b8b9; font-size: .57rem; font-weight: 900; letter-spacing: .1em; }
.arena-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; background: #101820; }
.event-banner { position: absolute; z-index: 3; top: 9%; left: 50%; transform: translate(-50%, -8px); opacity: 0; color: #fff; font-size: clamp(.8rem, 2.2vw, 1.15rem); font-weight: 950; font-style: italic; text-align: center; white-space: nowrap; pointer-events: none; text-shadow: 0 2px 12px #05090c; transition: opacity .15s, transform .15s; }
.event-banner.show { opacity: 1; transform: translate(-50%, 0); }
.overlay { position: absolute; z-index: 5; left: 50%; top: 50%; width: min(530px, calc(100% - 28px)); max-height: calc(100% - 24px); overflow: auto; transform: translate(-50%, -50%); padding: clamp(15px, 3vw, 28px); border: 1px solid #5b7879; border-radius: 8px; background: rgba(12, 22, 27, .96); box-shadow: 0 16px 50px rgba(0,0,0,.5); text-align: center; }
.eyebrow { color: #87e7db; font-size: .66rem; font-weight: 900; letter-spacing: .13em; }
.overlay h1, .overlay h2 { margin: 7px 0; font-size: clamp(1.4rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: 0; }
.overlay p { margin: 7px 0 18px; color: #b2c0c2; font-size: .85rem; }
.control-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 20px; text-align: left; }
.control-guide div { display: grid; gap: 5px; padding: 10px; border: 1px solid #39494e; border-radius: 6px; background: #18262c; }
.control-guide strong { color: #7ce8d8; font-size: .7rem; }
.control-guide div:nth-child(2) strong { color: #ff9193; }
.control-guide span { color: #d4e0e1; font-size: .7rem; }
.primary-button { min-width: 156px; padding: 11px 18px; border: 0; border-radius: 6px; color: #081a1c; background: #83ebd9; font-size: .8rem; font-weight: 950; }
.primary-button:hover, .primary-button:focus-visible { background: #aaf2e2; }
.touch-controls { gap: 12px; align-items: stretch; margin-top: 12px; }
.touch-side { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #2e4248; border-radius: 7px; background: #172229; }
.touch-side > span { color: #7fe5d7; font-size: .6rem; font-weight: 900; letter-spacing: .09em; }
.touch-side.p2 > span { color: #ff8a91; }
.touch-side > div { display: flex; gap: 6px; margin-top: 6px; }
.touch-side button { flex: 1; min-width: 0; height: 43px; padding: 0; border: 1px solid #40595d; border-radius: 5px; color: #e8f7f4; background: #26373c; font-size: 1.05rem; font-weight: 900; touch-action: none; user-select: none; }
.touch-side button.hit { border-color: #469f9c; background: #185258; }
.touch-side.p2 button.hit { border-color: #bf656f; background: #74313e; }
.touch-side button.heavy { border-color: #c5a96d; color: #fff1cc; background: #5b4630; }
.touch-side button.special { border-color: #7ce8d8; color: #071a1d; background: linear-gradient(135deg, #7ce8d8, #fff1a8); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.touch-side.p2 button.special { border-color: #ff8a91; background: linear-gradient(135deg, #ff6874, #fff1a8); }
.touch-side button.is-down { filter: brightness(1.5); transform: translateY(1px); }
footer { padding: 12px 2px 0; color: #8e9fa4; font-size: .7rem; }
@media (max-width: 680px) {
  .shell { padding: 9px 7px 22px; }
  .topbar { padding: 2px 4px 10px; }
  .brand img { width: 33px; height: 33px; }
  .brand strong { font-size: 1rem; }
  .mode { display: none; }
  .fight-call { align-items: stretch; flex-direction: column; }
  .fight-actions { flex-wrap: wrap; }
  .secondary-button { flex: 1; }
  .fight-hud { min-height: 63px; gap: 5px; padding: 7px; }
  .fighter-name { gap: 4px; font-size: .52rem; }
  .round-pips { font-size: .55rem; }
  .round-clock { min-width: 52px; }
  .round-clock strong { font-size: 1.25rem; }
  .health-track { height: 9px; }
  .overlay { padding: 10px; }
  .overlay p { margin: 4px 0 7px; font-size: .65rem; }
  .overlay h1, .overlay h2 { margin: 3px 0; font-size: 1.2rem; }
  .eyebrow { font-size: .48rem; }
  .control-guide { gap: 4px; margin: 6px 0; }
  .control-guide div { gap: 2px; padding: 5px; }
  .control-guide strong, .control-guide span { font-size: .48rem; }
  .primary-button { padding: 7px 12px; font-size: .63rem; }
  .touch-controls { gap: 5px; margin-top: 7px; }
  .touch-side { padding: 6px 4px; }
  .touch-side > div { gap: 2px; }
  .touch-side button { height: 45px; font-size: .9rem; }
}
@media (max-width: 450px) { .touch-controls { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition: none !important; } }
