:root{color-scheme:dark;font-family:Arial,sans-serif;color:#e9e9e2;background:#111513}*{box-sizing:border-box}body{margin:0}header,main,footer{max-width:1280px;margin:auto}header{height:82px;display:flex;align-items:center;gap:30px;padding:0 24px}.brand{text-decoration:none;font-size:26px;font-weight:900;letter-spacing:-1px;color:#e8ed65}.brand span{color:#eee;margin-left:7px}.build{font:12px monospace;letter-spacing:2px;color:#929b8d}button,select,input{font:inherit}button{cursor:pointer;color:inherit;border:1px solid #475047;background:#202720;padding:12px 16px;border-radius:4px}button:hover{background:#343e30}button:focus-visible,select:focus-visible{outline:3px solid #e8ed65;outline-offset:3px}header button{margin-left:auto;font-size:14px}main{padding:0 24px}.game{border:1px solid #465044;background:#171e19;border-radius:8px;overflow:hidden}.hud{display:flex;align-items:center;justify-content:space-between;padding:22px 30px;gap:25px;border-bottom:1px solid #343d32}.fighter{width:36%}.fighter>div{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin-bottom:10px}.fighter span{font-family:monospace}.fighter meter{width:100%;height:14px;appearance:none;display:block}.fighter meter::-webkit-meter-bar{background:#303b31;border:0;border-radius:0}.fighter meter::-webkit-meter-optimum-value{background:#71cde4}.orange meter::-webkit-meter-optimum-value{background:#eea066}.fighter meter::-moz-meter-bar{background:#71cde4}.orange meter::-moz-meter-bar{background:#eea066}.clock{text-align:center;min-width:100px}.clock strong{font:bold 40px monospace}.clock small{display:block;font-size:11px;color:#d9df69;letter-spacing:1px}.field{height:min(56vw,510px);min-height:350px;position:relative;background:#101712}canvas{width:100%;height:100%;display:block}#notice{position:absolute;left:0;right:0;top:15px;text-align:center;color:#eced89;font-weight:bold;pointer-events:none}#overlay{position:absolute;inset:0;background:#0d140ce8;display:grid;place-items:center}.startbox{width:440px;max-width:90%;padding:18px}.eyebrow{font:12px monospace;color:#dae05f;letter-spacing:1px}h1{font-size:44px;line-height:1.02;margin:17px 0;font-weight:900;letter-spacing:-1.8px}em{font-style:normal;color:#e8ed65}.startbox p{color:#b7c0b3;font-size:16px;line-height:1.5;max-width:400px}.startbox label{display:block;font-size:14px;margin:10px 0 5px}select{width:100%;background:#222e22;color:#eee;padding:10px;border:1px solid #59634b;border-radius:3px}.primary{width:100%;background:#e8ed65;color:#1b2314;font-weight:900;margin:10px 0;display:flex;justify-content:space-between}.primary:hover{background:#f4ff83}.startbox small{color:#96a28f;font-size:12px;line-height:1.4;display:block}.controls{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:18px 30px}.controls button{display:flex;align-items:center;gap:12px;text-align:left;position:relative;min-height:67px;background:#242d23}.controls button:disabled{cursor:default;opacity:.42}.controls small{display:block;font-size:12px;color:#a8b59e;margin-top:5px}.controls kbd{font:18px monospace;color:#e8ed65;border:1px solid #66704e;padding:5px 9px}.controls strong{margin-left:auto;font:14px monospace}.bottom{padding:0 30px 18px;display:flex;align-items:center;gap:15px;font-size:13px;color:#aeb9a5}.bottom button{white-space:nowrap;margin-left:auto;font-size:13px}.settings{margin-top:20px;border:1px solid #343f30;border-radius:5px;padding:16px}summary{cursor:pointer;font-size:14px}summary span{float:right;font:12px monospace;color:#9ca68e}#settings{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-top:20px}#settings label{font-size:13px;color:#bac4b0}#settings input{width:100%;margin-top:7px;padding:8px;background:#20271e;color:#eee;border:1px solid #4b5740}.settings p{font-size:13px;color:#a3af97}footer{padding:22px 24px;font:11px monospace;color:#89977f;display:flex;justify-content:space-between;gap:20px}

/* Single-screen application shell. Arena drawing uses a uniform 1230:510 fit. */
html,body{width:100%;height:100%;overflow:hidden}
body{height:100dvh;display:grid;grid-template-rows:48px minmax(0,1fr)}
header,main{max-width:none;width:100%;margin:0;min-width:0}
header{height:48px;padding:0 20px;gap:16px;border-bottom:1px solid #343d32}
.brand{font-size:22px}.build,footer{display:none}
header button{margin-left:0;padding:7px 12px;font-size:13px}
#open-settings{margin-left:auto}
main{padding:0;min-height:0}
.game{height:100%;display:grid;grid-template-rows:80px minmax(0,1fr)88px 44px;border:0;border-radius:0}
.hud{padding:10px 28px;gap:24px}
.fighter{width:36%;min-width:0}.fighter>div{margin-bottom:8px}
.clock strong{font-size:36px}
.field{height:auto;min-height:0;min-width:0;overflow:hidden}
.controls{padding:10px 28px;gap:12px;border-top:1px solid #343d32}
.controls button{min-width:0;min-height:0}
.bottom{padding:0 28px 8px;min-width:0}
.bottom button{padding:7px 12px}
#hint{min-width:0}
.settings{margin:auto;width:min(880px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:24px;background:#171e19;color:#e9e9e2;overflow:auto;overscroll-behavior:contain}
.settings::backdrop{background:#060b09cc}
.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.settings h2{font-size:20px;margin:0}
#settings{grid-template-columns:repeat(4,minmax(0,1fr))}
#overlay{position:fixed;inset:48px 0 0;z-index:2;overflow:auto}
.startbox{margin:auto}



/* Reclaim the header row without enlarging the rendered arena. */
body{--reclaimed-header:48px;grid-template-rows:minmax(0,1fr)}
body>header{display:none}
body>main{grid-row:1}
/* Keep the canvas at its former dimensions; extra background stays below it. */
#arena{height:max(0px,calc(100% - var(--reclaimed-header)))}
#overlay{top:0}


/* Hide the utility row without changing its grid space or other UI positions. */
.game>.bottom{visibility:hidden;pointer-events:none}

/* Result-only action, independent of the hidden debug/footer row. */
#result-actions{position:absolute;left:0;right:0;z-index:1;text-align:center;pointer-events:none}
#result-actions[hidden]{display:none}
#result-actions button{pointer-events:auto;background:#e8ed65;color:#1b2314;font-weight:bold}

/* Tags overlay the existing HUD spacing without moving its contents. */
.fighter{position:relative}
.fighter>.jar-tags{position:absolute;top:calc(100% + 3px);left:0;display:flex;justify-content:flex-start;gap:5px;margin:0;pointer-events:none}
.jar-tags i{display:block;width:7px;height:7px;border-radius:50%;background:#f1db4f}
.jar-tags i[hidden]{display:none}
.controls button.tag-interrupted,.controls button.tag-interrupted:disabled{background:#f1db4f;color:#1b2314;border-color:#f1db4f;opacity:1}
.controls button.tag-interrupted small,.controls button.tag-interrupted kbd{color:#1b2314}

/* Blend the HUD into the field; retain its exact row height and vertical spacing. */
.hud{background:#101712;border-bottom-color:transparent}
.hud .fighter{width:min(36%,360px)}

/* Timer label above the number, within the existing centered HUD slot. */
.clock{display:flex;flex-direction:column}
.clock small{order:-1}

/* Match the field behind the ability row and reserved bottom space; retain all geometry. */
.game{background:#101712}
.controls{border-top-color:transparent}

/* Artwork-only ability controls; preserve the existing arena and HUD grid rows. */
.controls{--ability-size:80px;grid-template-columns:repeat(4,var(--ability-size));justify-content:center;align-items:center;gap:8px;padding:0}
.controls button,.controls button:hover,.controls button.tag-interrupted,.controls button.tag-interrupted:disabled{width:var(--ability-size);height:var(--ability-size);min-height:0;padding:0;gap:0;border:0;border-radius:0;background:transparent;display:block}
.controls button img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.controls button strong{display:none}


/* Per-ability feedback only; icon geometry and gameplay availability are unchanged. */
.controls button:disabled{opacity:1}
.controls .input-label{position:absolute;top:calc(100% + 4px);left:0;width:100%;text-align:center;font:12px/16px Arial,sans-serif;color:#c2cdb9;pointer-events:none}
.controls button::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:conic-gradient(transparent 0deg var(--cooldown-sweep,360deg),rgba(125,130,135,.65) var(--cooldown-sweep,360deg) 360deg)}
.controls button strong{display:block;position:absolute;inset:0;z-index:3;margin:0;text-align:center;align-content:center;font:bold 26px/1 Arial,sans-serif;color:white;text-shadow:0 1px 3px black,0 0 5px black;pointer-events:none}
.controls button strong:empty{display:none}
.controls button.ability-pressed img{transform:scale(.94)}
.controls button.tag-interrupted::after{content:"";position:absolute;inset:0;z-index:2;background:rgba(241,219,79,.78);pointer-events:none}

/* Compact prototype player information, outside the existing HUD flow. */
.fighter .player-meta{position:absolute;z-index:1;top:calc(100% + 14px);left:0;display:flex;align-items:center;gap:6px;white-space:nowrap;pointer-events:none}
.fighter.orange .player-meta{left:auto;right:0;flex-direction:row-reverse}
.player-meta .player-portrait{display:block;width:44px;height:44px;object-fit:cover;object-position:50% 50%;border-radius:50%}
.player-meta .stake-bag{display:block;position:relative;width:28px;height:34px;overflow:hidden;mix-blend-mode:screen}
.player-meta .stake-bag img{position:absolute;width:42px;height:42px;max-width:none;left:-7px;top:-4px}
.player-meta .stake-amount{font:600 14px/1 Arial,sans-serif;color:#e9e9e2}

/* Uniformly fit the approved desktop composition; simulation coordinates are independent. */
body>main{position:absolute;left:50%;top:50%;width:1920px;height:1080px;transform:translate(-50%,-50%) scale(var(--screen-scale,1));transform-origin:center}

/* Static environment artwork inside the unchanged reference composition. */
.game{background-image:url("assets/backgrounds/arena-v1.1.png");background-size:1920px 1080px;background-position:0 0;background-repeat:no-repeat}
.game>.hud,.game>.field{background-color:transparent}

/* Bottom player HUD modules; keep the shared timer and arena grid in place. */
.game{position:relative}
.hud .fighter{position:absolute;top:940px;left:28px;width:360px}
.hud .fighter.orange{left:auto;right:28px}
.hud .fighter.orange>div:not(.jar-tags){flex-direction:row-reverse}
.hud .fighter.orange>.jar-tags{left:auto;right:0;flex-direction:row-reverse}
.hud .clock{margin-inline:auto}

/* Compact result presentation in the uniformly scaled reference composition. */
#result-actions{position:fixed;left:680px;top:400px;right:auto;width:560px;height:280px;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:28px;background:#101712f5;border:1px solid #475047;border-radius:8px;pointer-events:auto}
#result-title{margin:0;font-size:32px;line-height:1.2;color:#e8ed65}
#result-amount{margin:0;font:bold 28px/1.2 monospace;color:#e9e9e2}

/* Decorative health frame: original PNG pixels; only the visible artwork defines the fit. */
.fighter .health-skin{display:block;position:relative;height:14px}
.fighter .health-skin::after{content:"";position:absolute;pointer-events:none;left:25px;top:-5px;width:310px;height:29.774px;background:url("assets/hud/health-frame.png") -2.866px -47.925px / 315.732px 126.261px no-repeat}
.fighter .health-skin meter{position:absolute;left:38.852px;top:2.802px;width:281.022px;height:13.693px;margin:0;padding:0;border:0;border-radius:0;background:#303b31}
.orange .health-skin meter::-webkit-meter-optimum-value{background:#ed4545}
.orange .health-skin meter::-moz-meter-bar{background:#ed4545}
