/* The ring is the primary surface; controls live around its edges. */
@media(min-width:901px){
 .sidebar{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
}
@media(min-width:901px) and (max-height:760px){
 .sidebar .club-stamp{display:none}
}
#fight-screen{--hud-edge:clamp(14px,2.5vw,34px)}
#fight-screen .fight-top{top:max(16px,env(safe-area-inset-top));left:var(--hud-edge);right:var(--hud-edge);grid-template-columns:minmax(0,1fr) 100px minmax(0,1fr);gap:18px}
#fight-screen .fighter-meter{display:flex;flex-direction:column;padding:0;border:0;border-radius:0;background:none;text-shadow:0 2px 5px #000;min-width:0}
#fight-screen .fighter-meter>span{order:2;font-size:13px;letter-spacing:.7px;margin-top:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#fight-screen .fighter-meter small{display:none}
#fight-screen .health-track{order:0;position:relative;height:12px;margin:0;background:#11161bd9;border:1px solid #d4d5ca;border-radius:2px;padding:2px;box-shadow:0 2px 12px #0009;overflow:hidden}
#fight-screen .health-track i{position:relative;z-index:1;background:linear-gradient(#d55f51,#9e2e29);transition:width .12s}
#fight-screen .health-trail{position:absolute;inset:2px auto 2px 2px;background:#f4d9a4;transition:width .65s .28s;max-width:calc(100% - 4px)}
#fight-screen .opponent .health-trail{left:auto;right:2px}
#fight-screen .stamina-track{order:3;width:42%;height:4px;margin-top:5px;background:#171b20d9;border:1px solid #ffffff40}
#fight-screen .stamina-track i{background:#e6c677}
#fight-screen .opponent .stamina-track{align-self:flex-end}
#fight-screen .round-clock strong{font-size:40px;order:-1;line-height:.95;color:#f3eee4}
#fight-screen .round-clock>span:first-child{font-size:10px!important;margin-top:6px;letter-spacing:1px}
#fight-screen .round-clock>span:last-child{display:none}
#fight-screen .fight-tools{top:80px;right:var(--hud-edge);left:auto;width:auto;display:flex;flex-wrap:nowrap;gap:7px}
#fight-screen .fight-tools>.icon-btn{width:44px;height:44px;border:1px solid #ffffff38;border-radius:50%;background:#101719d9}
#fight-screen #fight-options{position:absolute;right:0;top:53px;width:270px;padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:7px;background:#0c1113f5;border:1px solid #8d8060;border-radius:8px;box-shadow:0 12px 30px #0009}
#fight-screen #fight-options[hidden]{display:none}
#fight-screen #fight-options .camera-btn{height:44px;justify-content:center;padding:6px;font-size:11px}
#fight-screen #input-mode-btn{grid-column:1/-1}
#fight-screen #view-label{position:absolute;top:83px;left:var(--hud-edge);font:11px var(--font-body);letter-spacing:1.5px;color:#e4c88f;text-shadow:0 2px 4px #000;pointer-events:none}
#fight-screen[data-camera="duel"] #ring{cursor:default}
#fight-screen .fight-controls{inset:0!important;max-width:none;display:block;pointer-events:none}
#fight-screen .fight-controls>div{position:absolute;pointer-events:auto}
#fight-screen .fight-controls button{min-width:0;min-height:48px;border-radius:8px;background:#0b1113d9;border:1px solid #c5b58d66;font-size:12px;padding:8px 10px}
#fight-screen .fight-controls kbd{display:inline-block;font-size:10px!important;margin:0 5px 0 0}
#fight-screen .defense-controls{left:var(--hud-edge);bottom:52px;display:flex;align-items:center;gap:7px}
#fight-screen .defense-controls [data-action="block"]{min-height:62px;border-color:#d7ba7d;color:#f2d7a0}
#fight-screen .punch-controls{right:var(--hud-edge);bottom:52px;display:grid;grid-template-columns:repeat(2,86px);gap:7px}
#fight-screen .punch-controls button{min-height:60px}
#fight-screen .punch-controls .hand-tag{display:block;font-size:9px;color:#c8bb9d;letter-spacing:1px;margin-bottom:4px}
#fight-screen .movement-controls{left:50%;transform:translateX(-50%);bottom:52px;display:flex;gap:7px;margin:0}
#fight-screen #fight-readout{left:50%;right:auto;bottom:112px;transform:translateX(-50%);width:max-content;max-width:46%;padding:5px 9px;font-size:11px;background:#0b1113c9;pointer-events:none}
#fight-screen .fight-bottom{left:var(--hud-edge);right:var(--hud-edge);bottom:max(13px,env(safe-area-inset-bottom));font-size:10px!important;pointer-events:none}
#fight-screen #debug{font-size:10px!important}
#fight-screen #gesture-guide{display:none;pointer-events:none}
#fight-screen .fight-dialog{max-height:calc(100dvh - 30px);overflow:auto}
#fight-screen #combat-feedback{top:46%;font-size:26px}
@media(max-width:700px){
 #fight-screen .fight-top{grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr);gap:8px}
 #fight-screen .fighter-meter>span{font-size:11px;letter-spacing:0}
 #fight-screen .round-clock strong{font-size:32px}
 #fight-screen .round-clock>span:first-child{font-size:9px!important;letter-spacing:0}
 #fight-screen .fight-tools{top:78px}
 #fight-screen #view-label{top:90px;max-width:42%;font-size:10px}
 #fight-screen .movement-controls{bottom:170px}
 #fight-screen .defense-controls{bottom:116px;left:var(--hud-edge);right:var(--hud-edge);display:grid;grid-template-columns:repeat(3,1fr)}
 #fight-screen .defense-controls [data-action="block"]{min-height:48px}
 #fight-screen .punch-controls{bottom:56px;left:var(--hud-edge);right:var(--hud-edge);grid-template-columns:repeat(4,1fr)}
 #fight-screen .punch-controls button{min-height:52px}
 #fight-screen #fight-readout{bottom:225px;max-width:92%;font-size:10px}
 #fight-screen .fight-controls kbd{display:none}
 #fight-screen .fight-bottom>span:first-child{display:none}
 #fight-screen .fight-bottom #fight-stake{font-size:9px}
}
@media(pointer:coarse){
 #fight-screen .fight-controls kbd{display:none}
 #fight-screen[data-input="gestures"][data-camera="duel"] .punch-controls{display:none}
 #fight-screen[data-input="gestures"][data-camera="duel"] .movement-controls{left:var(--hud-edge);bottom:62px;transform:none;display:grid;grid-template-columns:82px;gap:7px}
 #fight-screen[data-input="gestures"][data-camera="duel"] .defense-controls{left:auto;right:var(--hud-edge);bottom:62px;display:grid;grid-template-columns:82px;gap:7px}
 #fight-screen[data-input="gestures"][data-camera="duel"] .defense-controls button{min-height:44px}
 #fight-screen[data-input="gestures"][data-camera="duel"] .movement-controls button{min-width:0!important;min-height:44px!important;font-size:11px}
 #fight-screen[data-input="gestures"][data-camera="duel"] #fight-readout{bottom:39px;max-width:95%;font-size:10px}
 #fight-screen[data-input="gestures"][data-camera="duel"][data-phase="fighting"] #gesture-guide{display:flex;position:absolute;left:100px;right:100px;bottom:73px;flex-direction:column;gap:5px;text-align:center;color:#ead9b8;font-size:10px;line-height:1.45;text-shadow:0 2px 4px #000;background:#0b1113b0;padding:8px;border-radius:5px}
}
@media(max-height:550px) and (min-width:701px){
 #fight-screen .fight-top{top:12px;grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr)}
 #fight-screen .round-clock strong{font-size:30px}
 #fight-screen .fight-tools{top:65px}
 #fight-screen #view-label{top:69px}
 #fight-screen .punch-controls{grid-template-columns:repeat(4,62px);bottom:43px}
 #fight-screen .punch-controls button{min-height:47px;font-size:11px;padding:6px 4px}
 #fight-screen .defense-controls{bottom:43px;gap:5px}
 #fight-screen .defense-controls button{font-size:10px;padding:6px;min-height:44px}
 #fight-screen .defense-controls [data-action="block"]{min-height:48px}
 #fight-screen .movement-controls{bottom:101px}
 #fight-screen #fight-readout{bottom:152px;max-width:44%}
 #fight-screen[data-input="gestures"][data-camera="duel"] .movement-controls,#fight-screen[data-input="gestures"][data-camera="duel"] .defense-controls{bottom:45px;grid-template-columns:70px;gap:4px}
 #fight-screen[data-input="gestures"][data-camera="duel"] #gesture-guide{bottom:53px;left:200px;right:200px}
 #fight-screen #round-presentation{inset:80px 100px 50px}
 #fight-screen .round-copy h2{font-size:38px}
}
