:root { --c-accent: #ff4b3a; --c-page-bg: linear-gradient(#1b2740, #0a0c13); --c-panel: rgba(14, 18, 30, .95); --c-on-accent: #1c0500;
  --mine: #ff4b3a; --theirs: #3f8cff; }
.c-home .c-title { color: #f2f2f2; }
.c-home .c-title span { color: #ff4b3a; }
html, body { margin: 0; height: 100%; background: #0a0c13; color: #f2f2f2; overflow: hidden; overscroll-behavior: none;
  font: 16px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#stage { position: fixed; inset: 0; background: #0a0c13; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#hud { position: absolute; z-index: 3; pointer-events: none; left: 0; right: 0; top: calc(var(--band-h, 52px) + 6px);
  display: flex; align-items: flex-start; gap: 8px; box-sizing: border-box;
  padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  font-size: calc(12px * var(--ui, 1)); }
.side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .3em; }
.side.foe { align-items: flex-end; }
.hp, .st { width: 100%; max-width: 26em; box-sizing: border-box; border-radius: 99px; overflow: hidden; background: rgba(0, 0, 0, .55); border: 1.5px solid rgba(255, 255, 255, .5); }
.hp { height: 1.25em; }
.st { height: .6em; max-width: 18em; border-width: 1px; border-color: rgba(255, 255, 255, .3); }
.hp i, .st i { display: block; height: 100%; width: 100%; transform-origin: left center; transition: transform .12s linear; }
.side.foe .hp i, .side.foe .st i { transform-origin: right center; }
.me .hp i { background: linear-gradient(#ff8a7a, var(--mine)); }
.foe .hp i { background: linear-gradient(#8fbcff, var(--theirs)); }
.st i { background: #ffd24a; }
.hp.low i { animation: low .35s infinite alternate; }
@keyframes low { to { filter: brightness(1.7); } }
.downs { display: flex; gap: .3em; height: .8em; }
.downs b { width: .8em; height: .8em; border-radius: 50%; background: #ffe14a; box-shadow: 0 0 .4em #ffb21f; }
#clock { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1; padding: .25em .7em .3em; border-radius: .7em;
  background: rgba(0, 0, 0, .55); border: 1.5px solid rgba(255, 255, 255, .35); }
#round { font-size: 1em; font-weight: 800; color: #ffd24a; letter-spacing: .08em; }
#time { font: 800 1.9em/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
#clock.last #time { color: #ff6a4d; }
#watchTag { margin-top: .3em; font-size: .85em; font-weight: 700; color: #bfc6d4; letter-spacing: .04em; }
#hurt { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .45s ease-out;
  background: radial-gradient(ellipse at center, rgba(255, 30, 20, 0) 45%, rgba(255, 30, 20, .75) 100%); }
#hurt.on { opacity: 1; transition: none; }
#hint { position: absolute; z-index: 3; pointer-events: none; left: 0; right: 0; bottom: max(7vh, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; padding: 0 9vw; }
.thumb { width: calc(60px * var(--ui, 1)); color: rgba(255, 255, 255, .85); animation: thumb .9s ease-in-out infinite; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .7)); }
.thumb.right { animation-delay: .45s; }
.thumb.done { visibility: hidden; }
.thumb svg { width: 100%; display: block; }
@keyframes thumb { 0%, 100% { transform: translateY(18%); opacity: .55; } 45% { transform: translateY(-45%); opacity: 1; } }
@media (hover: hover) and (pointer: fine) { #hint { justify-content: center; } .thumb.right { display: none; } }
#getup { position: absolute; z-index: 3; pointer-events: none; left: 50%; bottom: 14vh; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(70vw, 340px); color: #fff; }
#getup svg { width: calc(64px * var(--ui, 1)); animation: tap .28s ease-in-out infinite alternate; }
#getup .ring { animation: tapRing .56s ease-out infinite; transform-origin: center; }
@keyframes tap { to { transform: scale(.82); } }
@keyframes tapRing { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
#getup .bar { width: 100%; height: 16px; border-radius: 99px; overflow: hidden; background: rgba(0, 0, 0, .6); border: 2px solid rgba(255, 255, 255, .7); }
#getup .bar i { display: block; height: 100%; width: 0; background: linear-gradient(#b7ff8a, #4fd13a); transition: width .08s linear; }
.screen { position: fixed; inset: 0; z-index: 100; display: flex; overflow-y: auto; box-sizing: border-box;
  padding: calc(var(--band-h, 52px) + 12px) 16px 24px; background: rgba(6, 8, 14, .72); }
.col { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 460px; margin: auto; zoom: var(--ui, 1); text-align: center; }
.card { padding: 18px 16px; border-radius: 18px; background: #161d2b; border: 1px solid rgba(255, 255, 255, .12); box-sizing: border-box; }
.col h2 { margin: 0; font: 900 44px/1 'Arial Black', Impact, system-ui, sans-serif; letter-spacing: .04em; }
.col h2.win { color: #ffd24a; }
.col h2.loss { color: #9aa6c0; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.stats { display: grid; grid-template-columns: auto auto; gap: 6px 16px; align-items: center; justify-content: center; font-size: 16px; }
.stats .k { text-align: right; color: #b9c4dc; }
.stats .v { text-align: left; font: 800 17px ui-monospace, Consolas, monospace; }
.total { font-size: 46px; font-weight: 900; color: #ff4b3a; line-height: 1; }
.total small { display: block; font-size: 14px; color: #9aa6c0; font-weight: 700; margin-top: 4px; }
.screen.clear { background: none; pointer-events: none; align-items: center; justify-content: center; padding: calc(var(--band-h, 52px) + 12px) 12px 20px; }
.screen.clear > * { pointer-events: auto; }
#wait.screen.clear { padding: 0; align-items: stretch; }
#waitPanel { width: 100%; height: 100%; }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.seg .segLabel { width: 100%; font-size: 13px; color: #b9c4dc; }
.seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .25); color: #f2f2f2; font-weight: 700; font-size: 14px; }
.seg button.on { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.seg button:disabled { opacity: .55; cursor: default; }
.seg button:disabled.on { opacity: 1; }
#fightBot { max-width: min(70vw, 300px); }
#fightBot[hidden] { display: none !important; }
#hud.hidden { display: none; }
.docs a { color: #ffb3a8; } .docs { margin: 4px 0 8px; }
body.tv #fightBot, body.tv #hint, body.tv #getup, body.tv #hurt, body.tv #wait .docs, body.tv #endButtons { display: none !important; }
