/* Production HUD: ceramic station hardware, live faction colour, tactile upgrade modules. */
:root{--shell:#e4e8da;--edge:#8baba9;--ink:#132b37;--mint:#b3f2d9;--warm:#ffc875;--ui-shadow:0 8px 20px #07141b45}
body{font-family:-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN',sans-serif}
body.playing:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:1;background:radial-gradient(ellipse at 50% 46%,transparent 46%,#0b1e2835 100%)}
#status,#mapDock,#actorHud,#evolution,#matchTimer,#royaleNotice,#collisionFeedback{z-index:3}.overlay{z-index:20}#lineup{z-index:21}header,footer{z-index:5}
#status{top:22px;left:22px;width:232px;padding:8px 12px 12px;border:3px solid var(--shell);border-radius:20px;background:linear-gradient(150deg,#26434bfa,#102b38f5);box-shadow:var(--ui-shadow),inset 0 0 0 1px #759b9c}
.scoreSummary{position:relative;min-height:69px;padding:5px 0 8px 57px;margin:0 0 8px!important;display:flex;flex-wrap:wrap;align-content:center;gap:0 6px;justify-content:space-between;border-bottom:1px solid #a6cdc52b}
#rankPortrait{display:block;position:absolute;left:-4px;top:3px;width:62px;height:62px;filter:drop-shadow(0 3px 1px #071c29aa)}
.scoreSummary>span{font-size:14px!important;color:#cef4df;font-weight:650;white-space:nowrap;letter-spacing:.02em}.scoreSummary>div{display:flex!important;align-items:baseline;gap:4px}.scoreSummary strong{font-size:31px!important;line-height:1;font-weight:800;letter-spacing:-1px;color:#f1f7e9}.scoreSummary small{font-size:10px;color:#92b5b9}
#scores .score{grid-template-columns:12px 52px minmax(0,1fr) 27px;gap:6px;padding:6px 3px;border-radius:6px;font-size:9px;min-height:29px}
#scores .rankNumber{font-size:10px;font-weight:650;color:#83a4ac}#scores .teamName{font-weight:550;letter-spacing:.04em}#scores .score strong{font-size:13px;font-weight:750;font-variant-numeric:tabular-nums}.scoreTrack{height:6px!important;border-radius:3px;background:#070f1b66!important}.scoreTrack i{background:var(--c);box-shadow:0 0 5px color-mix(in srgb,var(--c) 30%,transparent)}
#scores .score.mine{background:#a8efd212;box-shadow:inset 0 0 0 1px #b6f1d938}#scores .score.mine .rankNumber{color:#c1f7df}#scores .atRisk{background:#e9aa5820}.cutLine{position:relative;border-top:1px dashed #ffc875b0;margin:9px 0 4px;padding:4px 3px 0;font-size:9px;font-weight:600;letter-spacing:.03em;color:#ffd49a}
#mapDock{left:22px;bottom:22px;width:222px;padding:0 7px 7px;border:3px solid var(--shell);border-radius:15px;background:linear-gradient(145deg,#2c4d55,#142e3c);box-shadow:var(--ui-shadow),inset 0 0 0 1px #6b9297}
#mapToggle{font-size:9px;letter-spacing:.08em;font-weight:600;color:#cde1d8;padding:7px 0 6px;min-height:26px}#mapToggle:before{content:'';display:inline-block;width:5px;height:5px;margin:0 7px 1px 0;border-radius:50%;background:#b3f2d9;box-shadow:0 0 6px #a1e8d3}
#mapPanel{border-radius:5px;overflow:hidden;background:#122f3a}#mapDock.expanded{width:370px}
#matchTimer{top:23px;right:219px;width:115px;border:1px solid #dce7d49c;background:#173642ef;border-radius:9px;padding:9px 11px;font-size:9px;letter-spacing:.06em;box-shadow:0 3px 10px #09192226}#matchProgress{height:5px;box-shadow:0 1px 0 #cde7d41c}
header button,footer button{background:#193440e8;border:1px solid #b5c9c07a;border-radius:10px;box-shadow:0 3px 7px #0a1d252d;color:#e1eee1}header button:hover,footer button:hover{background:#36535c}
#royaleNotice{top:78px;left:59%;max-width:42vw;width:280px;padding:12px 17px 14px;border:2px solid #dae3d4;border-radius:12px 22px 12px 22px;background:linear-gradient(135deg,#284752f5,#163341f5);box-shadow:var(--ui-shadow),inset 0 0 0 1px #507780;color:#eaf4e7}
#royaleTitle{font-size:19px;font-weight:750;letter-spacing:.04em;margin-bottom:9px}#royaleGaugeLabel{font-size:9px;letter-spacing:.1em;color:#c4d9d4;margin-bottom:6px}#royaleProgress{height:10px;border-radius:3px;box-shadow:0 1px 0 #e0efde26}#royaleProgress::-webkit-progress-bar{background:#081e2b}#royaleProgress::-webkit-progress-value{background:linear-gradient(90deg,#5fc8b3,#c8f5d3)}#royaleGoal{font-size:10px;margin-top:9px;font-weight:550;color:#d4e8df}
#royaleNotice.danger{background:linear-gradient(130deg,#593b28f5,#352a28f5);border-color:#f2c995;color:#fff0c7;box-shadow:var(--ui-shadow),0 0 20px #f19f3c20,inset 0 0 0 1px #80562f}#royaleNotice.danger #royaleGaugeLabel{color:#efcbaa}#royaleNotice.danger #royaleGoal{color:#f5dfba}#royaleNotice.danger #royaleProgress::-webkit-progress-value{background:linear-gradient(90deg,#e99c4c,#ffe0a1)}#royaleNotice.urgent{width:330px;padding:17px 20px}#royaleNotice.urgent #royaleTitle{font-size:28px;letter-spacing:.06em}#royaleNotice.urgent #royaleProgress{height:20px}
/* Three separate mechanical pickups. The icons are artwork, the entire module is the button. */
#evolution,#evolution[style]{top:auto!important;bottom:18px;left:50%;right:auto;transform:translateX(-50%);width:430px;padding:0 8px;background:transparent;border:0;border-radius:0;box-shadow:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px;overflow:visible}
#evolution button[data-upgrade]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px;min-height:151px;padding:0 0 4px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#f4f6e5;text-shadow:0 2px 3px #071b27;font-size:12px;overflow:visible;transition:filter .15s}
#evolution button[data-upgrade]:hover{background:transparent;filter:brightness(1.12)}#evolution button[data-upgrade]:active .upgradeArt{transform:translateY(3px);box-shadow:0 2px 0 #213b46,0 4px 8px #071c2c55}#evolution button[data-upgrade]:focus-visible{outline:2px solid #c4f4da;outline-offset:6px;border-radius:15px}
#evolution .upgradeArt{display:grid;place-items:center;position:relative;width:84px;height:84px;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 25%,#4c6a72,#183644 75%);border:4px solid #dce4d7;box-shadow:0 5px 0 #28434e,0 7px 13px #071c2b60,inset 0 0 0 2px #8ca5a2;filter:none;transition:transform .12s,box-shadow .12s;overflow:visible}
#evolution .upgradeArt:before{display:block!important;content:'';position:absolute;inset:-8px;border:1px solid #c1d5c059;border-radius:50%;background:none;box-shadow:none}
#evolution .upgradeArt canvas{display:none!important}#evolution .upgradeArt svg,#evolution [data-upgrade=weight] .upgradeArt svg{position:relative;display:block;left:auto;top:auto;right:auto;bottom:auto;transform:none;width:75px;height:75px;padding:3px;filter:drop-shadow(0 3px 1px #091d2b77);fill:none;stroke:none;stroke-width:1}
#evolution button.ready .upgradeArt{border-color:#ffe3a5;box-shadow:0 5px 0 #645339,0 8px 15px #071b2860,0 0 20px #f9cb7930,inset 0 0 0 2px #a69570}#evolution button.ready .upgradeArt:before{border-color:#ffe3a57a}
#evolution .upgradeLevel{position:absolute;top:63px;left:50%;transform:translateX(-50%);border-radius:5px;background:#112d3c;border:1px solid #9eb7ad;padding:2px 6px;font-size:8px;font-weight:750;letter-spacing:.08em;line-height:1.2;color:#dcead8;text-shadow:none;white-space:nowrap;z-index:2}
#evolution .upgradeName{font-size:13px;font-weight:750;letter-spacing:.02em;margin-top:7px;white-space:nowrap}#evolution .upgradeEffect,.gamePaused #evolution .upgradeEffect{display:block!important;background:none;padding:0;min-height:0;margin:0;font-size:10px;font-weight:550;line-height:1.35;color:#d4e9dd;border-radius:0;white-space:nowrap}
#evolution .upgradePrice{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;border-radius:20px;border:1px solid #a1c3b56b;background:#13323eea;box-shadow:0 2px 0 #0b2431;padding:3px 9px;margin-top:2px;color:#c7f6dd;font-size:12px;font-weight:750;text-shadow:none;line-height:1.2}
#evolution .energyDiamond{display:inline-block;width:8px;height:11px;transform:rotate(30deg) skewY(-10deg);border:1px solid #d8ffe5;background:#8ddfc3;box-shadow:0 0 5px #8deac666;border-radius:2px}#evolution button.ready .upgradePrice{background:#d1ead5;color:#183b3d;border-color:#eff9dd}#evolution button.ready .energyDiamond{background:#477f6a;border-color:#2d6b58;box-shadow:none}
#evolution button:disabled{opacity:.55;filter:saturate(.45)}#evolution button:disabled .upgradeArt{border-color:#acbbb5}#evolution button:disabled .upgradeEffect{color:#bad0cc}
#actorHud,.gamePaused #actorHud{top:auto!important;bottom:192px;left:50%;right:auto;transform:translateX(-50%);width:166px;padding:8px 13px 8px 36px;border:2px solid #dee7d6;border-radius:22px;background:linear-gradient(110deg,#33534f,#153745);box-shadow:0 4px 11px #071b2a55;z-index:4}
#actorHud:before{content:'';position:absolute;left:12px;top:12px;width:12px;height:17px;border-radius:4px;transform:rotate(30deg);background:linear-gradient(130deg,#efffd7,#88d6ad 60%,#458b80);border:1px solid #d0ffda;box-shadow:0 0 9px #94e5ba77}#growth{font-size:13px;font-weight:750;letter-spacing:.04em;color:#e7f6dc;text-align:center;line-height:1.1}#energyProgress{height:4px;margin-top:6px}#energyProgress::-webkit-progress-bar{background:#112e3b}#energyProgress::-webkit-progress-value{background:linear-gradient(90deg,#7bd6bc,#d3f8cb)}
#collisionFeedback{border:2px solid #ffdb9a;border-radius:10px 18px 10px 18px;background:#392e22f2;box-shadow:0 4px 13px #081b2955}#collisionMessage{font-size:12px;letter-spacing:.04em}#stunProgress{height:7px;border-radius:2px}#stunProgress::-webkit-progress-value{background:linear-gradient(90deg,#e4a052,#ffe4aa)}
#upgradeReward,.gamePaused #upgradeReward{bottom:250px!important;top:auto!important;z-index:6;font-size:20px;font-weight:800;letter-spacing:.04em;color:#e3ffcd;text-shadow:0 2px 3px #13313a,0 0 15px #86e5b46b}
#spectator{border:3px solid #dce5d4;background:linear-gradient(135deg,#2c4952,#12313e);box-shadow:var(--ui-shadow);bottom:27px}
@media(max-width:600px){
 #status{left:10px;top:12px;width:170px;border-width:2px;border-radius:15px;padding:6px 8px 8px}.scoreSummary{padding-left:44px;min-height:55px;margin-bottom:5px!important;gap:2px}#rankPortrait{left:-3px;top:0;width:47px;height:47px}.scoreSummary>span{font-size:11px!important}.scoreSummary strong{font-size:23px!important}.scoreSummary small{font-size:8px}
 #scores .score{grid-template-columns:10px 42px minmax(0,1fr) 23px;gap:4px;font-size:8px;padding:4px 1px;min-height:24px}#scores .score strong{font-size:11px}#scores .teamName{font-size:7px}.cutLine{font-size:8px;margin-top:7px;padding-top:3px}
 #mapDock{left:10px;bottom:12px;width:112px;border-width:2px;border-radius:11px;padding:0 4px 4px}#mapToggle{font-size:7px;min-height:20px;padding:5px 0}#mapDock.expanded{width:250px}
 #matchTimer{right:10px;top:55px;width:46vw;padding:7px 10px;font-size:8px}#royaleNotice{left:auto;right:10px;transform:none;top:101px;max-width:46vw;width:46vw;padding:10px 12px;border-radius:11px 18px 11px 18px}#royaleTitle{font-size:15px;margin-bottom:7px}#royaleNotice.urgent{width:46vw;padding:12px}#royaleNotice.urgent #royaleTitle{font-size:22px}#royaleNotice.urgent #royaleProgress{height:15px}#royaleGoal{font-size:9px}#royaleGaugeLabel{font-size:8px}
 #evolution,#evolution[style]{width:252px;left:auto;right:6px;transform:none;bottom:12px;gap:7px;padding:0 4px}#evolution button[data-upgrade]{min-height:133px}#evolution .upgradeArt{width:60px;height:60px;border-width:3px}#evolution .upgradeArt:before{inset:-6px}#evolution .upgradeArt svg,#evolution [data-upgrade=weight] .upgradeArt svg{width:56px;height:56px;padding:2px}#evolution .upgradeLevel{top:46px;font-size:7px;padding:2px 4px}#evolution .upgradeName{font-size:10px;margin-top:6px}#evolution .upgradeEffect,.gamePaused #evolution .upgradeEffect{font-size:7px;letter-spacing:0}#evolution .upgradePrice{font-size:10px;padding:3px 7px;min-width:34px;gap:4px}#evolution .energyDiamond{width:6px;height:9px}
 #actorHud,.gamePaused #actorHud{left:auto;right:57px;transform:none;bottom:161px;width:147px;padding:7px 10px 7px 32px;border-width:2px}#actorHud:before{left:11px;top:10px;width:10px;height:15px}#growth{font-size:12px}#energyProgress{margin-top:5px;height:4px}
 #upgradeReward,.gamePaused #upgradeReward{bottom:215px!important;font-size:17px}#spectator{bottom:25px}#collisionMessage{font-size:10px}#collisionFeedback{min-width:145px;padding:7px 10px}
}
@media(prefers-reduced-motion:reduce){#evolution button[data-upgrade],#evolution .upgradeArt{transition:none}}
/* Adopted A: restrained round buttons and the actual spherical character. */
#evolution .upgradeArt,#evolution button.ready .upgradeArt{border:2px solid #7c9fa0;background:radial-gradient(circle at 35% 25%,#35565d,#132e3a 75%);box-shadow:0 5px 0 #0c222b,0 8px 12px #10242c66}
#evolution .upgradeArt:before{display:none!important}
#evolution .upgradeLevel{position:static;transform:none;background:none;border:0;font-size:10px;font-weight:500;letter-spacing:0;padding:0;margin-top:7px;color:#c1dace}
#evolution .upgradeName{margin-top:0}
#evolution [data-upgrade=weight] .upgradeArt canvas,#evolution [data-upgrade=bite] .upgradeArt canvas{display:block!important;position:absolute;width:140px;height:87px;left:50%;top:50%;transform:translate(-50%,-50%);scale:1}
#evolution [data-upgrade=weight] .upgradeArt svg,#evolution [data-upgrade=bite] .upgradeArt svg{display:none}
#evolution button.ready .upgradePrice{background:#f0d68c;border-color:#fff1bd;color:#193946;box-shadow:0 2px 0 #9a854f}
#actorHud,.gamePaused #actorHud{border:0;border-radius:10px;background:#102730df;box-shadow:none;padding:8px 17px}
#actorHud:before{display:none}
@media(max-width:600px){#evolution .upgradeLevel{font-size:8px;margin-top:5px}#evolution [data-upgrade=weight] .upgradeArt canvas,#evolution [data-upgrade=bite] .upgradeArt canvas{width:100px;height:62px}#evolution button[data-upgrade]{min-height:140px}#actorHud,.gamePaused #actorHud{bottom:169px}}
#evolution [data-upgrade=bite] .upgradeArt canvas{visibility:visible}
.bubbleRoster{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 8px;margin:22px 0;text-align:center}.bubbleRoster small{display:block;font-size:10px;color:#c7ded9}.bubbleThumb{display:block;width:86px;height:86px;max-width:100%;margin:auto;background-image:url('assets/characters/bubble-six.png');background-size:300% 200%;background-position:var(--x) var(--y);background-repeat:no-repeat}

canvas.bubbleThumb{background:none}

/* Capture uses its own mouth pictogram, never the body-size portrait. */
#evolution [data-upgrade=bite] .upgradeArt canvas{display:none!important}
#evolution [data-upgrade=bite] .upgradeArt svg{display:block;visibility:visible}

/* Adopted mint-glass suction mouth: centre its measured opaque body. */
#evolution [data-upgrade=bite] .upgradeArt canvas{display:block!important;visibility:visible}
#evolution [data-upgrade=bite] .upgradeArt svg{display:none}
/* Two upgrades: speed/births and body size. Capture acceleration belongs to children. */
#evolution,#evolution[style]{grid-template-columns:repeat(2,minmax(0,1fr));width:290px;gap:25px}
@media(max-width:600px){#evolution,#evolution[style]{width:176px;gap:8px;right:10px}#actorHud,.gamePaused #actorHud{right:15px;width:166px}}
/* Three independent upgrades restored; children no longer affect capture speed. */
#evolution,#evolution[style]{grid-template-columns:repeat(3,minmax(0,1fr));width:430px;gap:19px}
@media(max-width:600px){#evolution,#evolution[style]{width:252px;gap:7px;right:6px}#actorHud,.gamePaused #actorHud{right:57px;width:147px}}

#matchDigits{display:block;font-size:27px;line-height:1.1;font-variant-numeric:tabular-nums;color:#fff2ba;letter-spacing:.02em;margin:4px 0}#roundDigits{display:block;font-size:36px;line-height:1.05;font-variant-numeric:tabular-nums;margin:5px 0 10px;color:#fff2ba}#royaleNotice.urgent #roundDigits{font-size:48px}@media(max-width:600px){#matchDigits{font-size:23px}#matchTimer{top:55px}#royaleNotice{top:133px}#roundDigits{font-size:29px}#royaleNotice.urgent #roundDigits{font-size:37px}}

/* One clock: next decision first, whole-match time as context. */
#matchTimer{display:none}#royaleNotice,#royaleNotice.urgent{top:24px;width:300px;padding:12px 18px;max-width:42vw}#royaleTitle,#royaleNotice.urgent #royaleTitle{font-size:13px;letter-spacing:0;margin:0 0 10px;color:#e4eee0}#royaleGaugeLabel{font-size:12px;color:#ecf4e7;letter-spacing:.03em}#roundDigits,#royaleNotice.urgent #roundDigits{font-size:42px;margin:2px 0 9px}#royaleProgress,#royaleNotice.urgent #royaleProgress{height:8px}#royaleGoal{font-size:11px;margin-top:8px}#roundTotal{display:block;font-size:10px;color:#b9cfc8;margin-top:9px;font-variant-numeric:tabular-nums}#royaleNotice.danger #royaleTitle{color:#ffe0aa}@media(max-width:600px){#royaleNotice,#royaleNotice.urgent{top:57px;right:10px;left:auto;width:46vw;max-width:46vw;padding:10px}#royaleTitle,#royaleNotice.urgent #royaleTitle{font-size:11px}#royaleGaugeLabel{font-size:10px}#roundDigits,#royaleNotice.urgent #roundDigits{font-size:34px}#roundTotal{font-size:9px}#royaleGoal{font-size:10px}}

/* Adopted A: ceramic round capsules, fixed player counts. */
#royaleNotice,#royaleNotice.urgent{top:22px;left:58%;right:auto;transform:translateX(-50%);width:500px;max-width:52vw;display:grid;grid-template-columns:minmax(0,1fr) 116px;gap:8px 15px;padding:15px 17px 11px;border:5px solid #d9e8d1;border-radius:32px;background:linear-gradient(145deg,#3d6065f5,#122f3bf7);box-shadow:0 6px 0 #668c86,0 10px 18px #071c294d,inset 0 1px 0 #bdded86b}#royaleNotice[hidden]{display:none}#roundCapsules{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;align-items:center}#roundCapsules>div{border:1px solid #789c99;border-radius:15px;padding:7px 0 6px;background:#15313c;text-align:center;color:#9bb8af;box-shadow:inset 0 2px 6px #071d2866}#roundCapsules small{font-size:8px;display:block;letter-spacing:.03em}#roundCapsules b{font-size:25px;line-height:1.12;display:block}#roundCapsules span{display:block;font-size:11px;margin-top:3px;font-weight:700}#roundCapsules>div.active{background:linear-gradient(#d3f8df,#a5e8ce);color:#173d32;border-color:#f0ffdf;box-shadow:0 0 12px #a9f2d338,inset 0 1px 0 white}#roundCapsules>div.complete{color:#bed5cb;background:#284b50}#royaleGaugeLabel{font-size:10px;letter-spacing:0;white-space:nowrap;margin:2px 0 4px}#roundDigits,#royaleNotice.urgent #roundDigits{font-size:36px;margin:0 0 5px;letter-spacing:-1px}#royaleProgress,#royaleNotice.urgent #royaleProgress{height:5px}#royaleTitle,#royaleNotice.urgent #royaleTitle{grid-column:1/-1;font-size:11px;line-height:1.4;margin:0;color:#e2efdf}#royaleGoal{display:none}#roundTotal{grid-column:1/-1;font-size:10px;margin:0;color:#c1d8ce}#royaleNotice.danger{border-color:#f9d393;background:linear-gradient(145deg,#5c4d3bf5,#263b40f7)}#royaleNotice.danger #roundCapsules>.active{background:linear-gradient(#ffe8b8,#f5be77);color:#4b341d}#royaleNotice.danger #royaleTitle{color:#ffe1af}@media(max-width:700px){#royaleNotice,#royaleNotice.urgent{top:59px;left:auto;right:10px;transform:none;width:53vw;max-width:53vw;grid-template-columns:minmax(0,1fr) 65px;padding:9px 8px 8px;gap:6px;border-width:3px;border-radius:21px}#roundCapsules{gap:3px}#roundCapsules>div{padding:5px 0;border-radius:9px}#roundCapsules small{font-size:6px}#roundCapsules b{font-size:19px}#roundCapsules span{font-size:9px}#royaleGaugeLabel{font-size:8px}#roundDigits,#royaleNotice.urgent #roundDigits{font-size:25px}#royaleTitle,#royaleNotice.urgent #royaleTitle{font-size:9px}#roundTotal{font-size:8px}}

/* Phone landscape: protect notch, keep the battlefield centre clear. */
@media(orientation:landscape) and (max-height:550px){
#status{left:calc(env(safe-area-inset-left) + 8px);top:10px;width:150px;padding:5px 8px;border-width:2px;border-radius:17px}.scoreSummary{padding-left:37px;min-height:39px;margin-bottom:3px!important}#rankPortrait{width:39px;height:39px;left:-2px;top:0}.scoreSummary>span{font-size:10px!important}.scoreSummary strong{font-size:21px!important}.scoreSummary small{font-size:8px}#scores .score{min-height:20px;padding:3px 0;grid-template-columns:9px 43px minmax(0,1fr) 22px;gap:3px;font-size:8px}#scores .teamName{font-size:7px}#scores .score strong{font-size:10px}.cutLine{font-size:8px;margin-top:3px;padding-top:2px}
#royaleNotice,#royaleNotice.urgent{top:9px;left:52%;right:auto;transform:translateX(-50%);width:330px;max-width:40vw;padding:7px 10px;gap:5px 9px;grid-template-columns:minmax(0,1fr) 76px;border-width:3px;border-radius:23px}#roundCapsules{gap:4px}#roundCapsules>div{padding:4px 0;border-radius:10px}#roundCapsules small{font-size:6px}#roundCapsules b{font-size:19px}#roundCapsules span{font-size:8px;margin-top:1px}#royaleGaugeLabel{font-size:8px}#roundDigits,#royaleNotice.urgent #roundDigits{font-size:27px}#royaleTitle,#royaleNotice.urgent #royaleTitle{font-size:9px}#roundTotal{font-size:8px}
header{padding:8px calc(env(safe-area-inset-right) + 8px) 0 0}header button,footer button{min-height:34px;padding:7px 9px;font-size:10px}footer{top:49px;right:calc(env(safe-area-inset-right) + 8px);left:auto;bottom:auto;padding:0;gap:4px}footer>div{display:none}
#mapDock{left:calc(env(safe-area-inset-left) + 8px);bottom:calc(env(safe-area-inset-bottom) + 8px);width:125px;padding:0 4px 4px;border-width:2px;border-radius:12px}#mapToggle{font-size:8px;min-height:22px;padding:3px}#mapDock.expanded{width:240px}
#evolution,#evolution[style]{left:auto;right:calc(env(safe-area-inset-right) + 8px);bottom:calc(env(safe-area-inset-bottom) + 6px);transform:none;width:260px;padding:0;gap:6px}#evolution button[data-upgrade]{min-height:106px;padding:0 2px}#evolution .upgradeArt{width:49px;height:49px;border-width:2px}#evolution .upgradeArt:before{inset:-4px}#evolution .upgradeArt svg,#evolution [data-upgrade=weight] .upgradeArt svg{width:46px;height:46px;padding:1px}#evolution .upgradeLevel{top:35px;font-size:7px;padding:1px 4px}#evolution .upgradeName{font-size:10px;margin-top:5px}#evolution .upgradeEffect,.gamePaused #evolution .upgradeEffect{font-size:7px}#evolution .upgradePrice{font-size:10px;padding:3px 8px;min-width:37px}#actorHud,.gamePaused #actorHud{left:auto;right:calc(env(safe-area-inset-right) + 75px);bottom:calc(env(safe-area-inset-bottom) + 121px);transform:none;width:125px;padding:6px 9px;border-radius:12px}#actorHud:before{display:none}#growth{font-size:11px}#energyProgress{height:4px;margin-top:4px}#upgradeReward,.gamePaused #upgradeReward{bottom:170px!important;font-size:18px}
.overlay section{max-height:90vh;overflow:auto}#lineup section{max-height:94vh;overflow:auto}#lineupTeams{grid-template-columns:repeat(6,1fr);gap:6px}#lineupTeams>div{padding:5px}#lineupTeams canvas{width:70px;height:60px}#lineup h2{font-size:20px;margin:6px}#lineup p{margin:5px}#lineupCount{font-size:25px}#collisionFeedback{min-width:140px;padding:7px 10px}#collisionMessage{font-size:11px}
}
@media(orientation:landscape) and (max-height:550px){#mapPanel{position:static;left:auto;top:auto;width:auto;background:transparent}#mapPanel canvas{width:100%;height:auto}#mapDock{z-index:3}}
/* Compact phone HUD: skills above, balance below; never overlap artwork. */
@media(orientation:landscape) and (max-height:550px){
#royaleNotice,#royaleNotice.urgent{width:270px;max-width:33vw;padding:5px 8px;gap:3px 7px;border-width:2px;border-radius:19px;grid-template-columns:minmax(0,1fr) 67px;box-shadow:0 3px 0 #668c86,0 5px 9px #071c2933}#roundCapsules{gap:3px}#roundCapsules>div{padding:3px 0;border-radius:8px}#roundCapsules small{font-size:5px}#roundCapsules b{font-size:15px}#roundCapsules span{font-size:7px;margin-top:0}#royaleGaugeLabel{font-size:7px;margin:0 0 2px}#roundDigits,#royaleNotice.urgent #roundDigits{font-size:23px;margin-bottom:3px}#royaleTitle,#royaleNotice.urgent #royaleTitle{font-size:8px;margin:0}#roundTotal{font-size:7px}
#evolution,#evolution[style]{bottom:calc(env(safe-area-inset-bottom) + 31px)}
#actorHud,.gamePaused #actorHud{bottom:calc(env(safe-area-inset-bottom) + 6px);right:calc(env(safe-area-inset-right) + 8px);width:260px;padding:4px 8px;border-radius:8px;display:flex;align-items:center;gap:9px;min-height:22px}#actorHud[hidden]{display:none}#growth{font-size:10px;margin:0;padding:0;background:transparent}#energyProgress{flex:1;width:auto;margin:0;height:4px}
}
/* Core resource: glass core, count, and a short charge indicator. */
#evolution .energyDiamond{border-radius:50%;transform:none;background:radial-gradient(circle at 30% 25%,#fffde0 0 12%,#d1ffe3 20%,#66d1b5 55%,#216d69 100%);border:1px solid #d5ffe9;box-shadow:0 0 5px #8bf6cc80}
@media(orientation:landscape) and (max-height:550px){
#mapDock{width:150px}
#actorHud,.gamePaused #actorHud{right:calc(env(safe-area-inset-right) + 89px);width:98px;min-height:27px;padding:3px 9px 4px 30px;display:block;border:1px solid #a6dac9;border-radius:14px;background:linear-gradient(145deg,#31565cee,#102c38f2);box-shadow:0 2px 0 #0d222d,0 0 8px #a0efd21a;overflow:visible}
#actorHud:before{display:block;content:'';position:absolute;left:8px;top:6px;width:15px;height:15px;transform:none;border-radius:50%;border:1px solid #daffe7;background:radial-gradient(circle at 30% 25%,#fffde0 0 10%,#caffde 20%,#6ad4b9 52%,#245c62 100%);box-shadow:0 0 8px #86f3cb77}
#growth{font-size:13px;font-weight:800;line-height:16px;color:#efffdc;text-align:center;letter-spacing:.02em}#energyProgress{display:block;width:100%;height:3px;margin:2px 0 0;border-radius:2px}
}
#mapDock:not(.expanded){width:232px}@media(max-width:600px){#mapDock:not(.expanded){width:170px}}@media(orientation:landscape) and (max-height:550px){#mapDock:not(.expanded){width:150px}}

#royaleTitle,#royaleNotice.urgent #royaleTitle,#roundTotal{display:none}#royaleNotice.roundTransition #royaleTitle{display:block;grid-column:1/-1;margin-top:4px}#royaleNotice,#royaleNotice.urgent{align-items:center}

@media(orientation:landscape) and (max-height:550px){#actorHud,.gamePaused #actorHud{width:160px;right:calc(env(safe-area-inset-right) + 58px);padding:4px 10px 6px 32px;min-height:32px}#actorHud:before{top:8px;width:17px;height:17px}#energyProgress{height:7px;margin-top:4px;background:#0b252e;border-radius:4px}#energyProgress::-webkit-progress-bar{background:repeating-linear-gradient(90deg,#153d46 0 calc(10% - 1px),#6a969333 calc(10% - 1px) 10%)}#energyProgress::-webkit-progress-value{background:linear-gradient(90deg,#58c6b1,#e3ffd3);border-radius:4px}}
@media(orientation:landscape) and (max-height:550px){#evolution,#evolution[style]{bottom:calc(env(safe-area-inset-bottom) + 50px)}}

:root{--core-glass:radial-gradient(circle at 30% 25%,#f7ffeb 0 10%,#c6ffe1 20%,#7bdfbd 53%,#2f837e 100%)}
#evolution .upgradePrice .energyDiamond{display:inline-block!important;width:10px!important;height:10px!important;flex:0 0 10px;border-radius:50%!important;transform:none!important;background:var(--core-glass)!important;border:1px solid #d6ffeb!important;box-shadow:0 0 3px #96edc850!important}#actorHud:before{background:var(--core-glass)!important}
@media(orientation:landscape) and (max-height:550px){
#evolution,#evolution[style]{bottom:calc(env(safe-area-inset-bottom) + 8px)}
#actorHud,.gamePaused #actorHud{right:calc(env(safe-area-inset-right) + 8px);width:260px;min-height:30px;padding:5px 10px;display:flex;align-items:center;gap:8px;border-radius:13px;transform:none}
#actorHud:before{position:static;display:block;flex:0 0 15px;width:15px;height:15px;margin:0;transform:none;border-radius:50%}
#growth{font-size:16px;font-weight:800;line-height:18px;white-space:nowrap;min-width:14px;text-align:left;flex:0 0 auto}
#energyProgress{display:block;flex:1 1 auto;width:auto;min-width:0;height:7px;margin:0}
}

#intro.commercialLaunch section{max-width:540px;padding:28px}#intro.commercialLaunch section>*{display:none}#intro.commercialLaunch h1,#intro.commercialLaunch #start,#intro.commercialLaunch .launchRules{display:block}#intro.commercialLaunch h1{font-size:40px;margin:8px 0 20px}#intro.commercialLaunch .launchRules{font-size:14px;line-height:1.7;margin-bottom:20px}.launchRules p{margin:9px 0;color:#c8ddd1}.launchRules>b{color:#ffe5ac;font-size:20px}@media(orientation:landscape) and (max-height:550px){#intro.commercialLaunch section{max-width:560px;padding:18px 25px}#intro.commercialLaunch h1{font-size:28px;margin-bottom:10px;line-height:1}#intro.commercialLaunch .launchRules{font-size:12px;line-height:1.5;margin-bottom:12px}.launchRules p{margin:5px 0}}
/* Match outcomes have priority over every live HUD layer. */
.outcomeOverlay,#pauseScreen{z-index:100;background:radial-gradient(ellipse at 50% 30%,#193d4bd9,#050e18ed);backdrop-filter:blur(7px)}
.outcomeOverlay[hidden],#pauseScreen[hidden]{display:none!important}
.outcomeOverlay .outcomeCard{width:min(500px,calc(100vw - 40px));max-height:calc(100dvh - 32px);overflow:auto;text-align:center;padding:32px 38px 22px;border:1px solid #b2cfca;border-radius:28px;background:linear-gradient(155deg,#294852,#102630);box-shadow:0 24px 90px #0009,inset 0 1px #ffffff50;animation:outcomeArrival .32s ease-out}
.outcomeLabel{color:#d3e5e4;font-size:14px;letter-spacing:.08em;margin:0 0 8px}.outcomeCard h2{font-size:clamp(36px,7vw,64px);line-height:1.15;margin:0;color:#ffd0bc;letter-spacing:.14em}.outcomeNumbers{display:flex;justify-content:center;align-items:baseline;gap:22px;margin:14px 0}.outcomeNumbers strong{font-size:52px;color:#fff7e0;line-height:1.1}.outcomeNumbers span{font-size:24px;color:#c6dfda;font-variant-numeric:tabular-nums}#defeatReason{line-height:1.8;font-size:16px;margin:12px 0}.outcomeHint{color:#b3caca;font-size:13px;line-height:1.7;margin:12px 0 22px}.outcomeCard .primary{width:100%;min-height:52px;font-size:18px;background:#b9efd7;color:#102c30;border:1px solid #e5ffef;box-shadow:0 4px 0 #5b9a8d}.quietAction{display:block;width:100%;margin-top:18px;background:transparent;border:0;color:#c4d7d8;min-height:44px}.quietAction:hover{background:#ffffff0b}.myResult{background:#a8f0d215;border-radius:10px;padding:12px!important;outline:1px solid #a8f0d260}#result{z-index:101}#resultSummary{font-size:18px;color:#bfded4}#spectator{z-index:30;font-size:14px;max-width:calc(100vw - 32px);padding:10px 18px}#spectator button{margin:0 0 0 18px}#pauseScreen{z-index:90}.pauseCard{text-align:center}button:focus-visible,a:focus-visible{outline:3px solid #fff2a8;outline-offset:4px}
@keyframes outcomeArrival{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}
@media(max-height:500px) and (min-width:600px){.outcomeOverlay .outcomeCard{width:580px;padding:18px 30px 14px}.outcomeCard h2{font-size:40px}.outcomeNumbers{margin:8px 0}.outcomeNumbers strong{font-size:40px}#defeatReason{margin:6px 0;font-size:14px}.outcomeHint{margin:6px 0 14px}.quietAction{margin-top:8px}.outcomeCard .primary{min-height:46px}#spectator{bottom:max(12px,env(safe-area-inset-bottom));padding:6px 12px}#spectator b{font-size:12px}}
@media(prefers-reduced-motion:reduce){.outcomeOverlay .outcomeCard{animation:none}}
.saveStatus{font-size:12px;color:#b8d5cb;line-height:1.6;margin:12px 0 0}.saveStatus:empty{display:none}.returnHome{display:block;text-align:center;color:#c3dfd4;margin-top:16px;padding:12px;text-decoration:none;min-height:44px}
#intro.commercialLaunch .launchHelp{display:block;margin-top:20px;color:#bed7d1;text-align:left}#intro.commercialLaunch .launchHelp summary{cursor:pointer;min-height:44px;padding:12px;text-align:center}#intro.commercialLaunch .launchHelp .lesson{font-size:13px;line-height:1.8}#intro.commercialLaunch section{max-height:calc(100dvh - 32px);overflow:auto}#intro.commercialLaunch #start{width:100%;min-height:50px}
#result section{border-radius:26px;border-color:#99bbb5;background:linear-gradient(145deg,#29444e,#102732)}#result h2{color:#fff3d4}#ranking p{min-height:38px;align-items:center;margin:6px 0;padding:7px 10px;font-variant-numeric:tabular-nums}#result .primary{min-height:50px;font-size:17px}#matchDuration{display:none}
@media(max-height:550px) and (min-width:600px){#result section{width:min(760px,calc(100vw - 48px));padding:20px 26px;display:grid;grid-template-columns:minmax(230px,1fr) minmax(260px,1fr);column-gap:28px;max-height:calc(100dvh - 28px)}#result .eyebrow{grid-column:1;margin:8px 0}#result h2{grid-column:1;font-size:27px;margin:12px 0 8px}#resultSummary{grid-column:1;font-size:15px;margin:4px 0 12px}#resultSave{grid-column:1;margin:0 0 14px}#ranking{grid-column:2;grid-row:1/7;align-self:center}#ranking p{font-size:13px;min-height:38px;margin:6px 0}#result #retry{grid-column:1;margin:6px 0}#result .returnHome{grid-column:1;margin:4px 0;padding:10px}}
@media(orientation:landscape) and (max-height:390px){.outcomeOverlay .outcomeCard{width:min(620px,calc(100vw - 36px));padding:16px 24px;display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px 24px}.outcomeLabel{grid-column:1/-1;margin:0 0 6px;font-size:12px}.outcomeCard h2{grid-column:1;grid-row:2;font-size:40px;align-self:end}.outcomeNumbers{grid-column:1;grid-row:3/6;display:block;margin:8px 0;align-self:start}.outcomeNumbers strong{display:block;font-size:44px}.outcomeNumbers span{display:block;margin-top:8px;font-size:20px}#defeatReason{grid-column:2;grid-row:2;margin:0;font-size:13px;text-align:left}.outcomeHint{grid-column:2;grid-row:3;margin:0;font-size:12px;text-align:left}.outcomeCard #defeatRetry{grid-column:2;grid-row:4;margin:6px 0;min-height:44px;font-size:16px}.outcomeCard #defeatSave{grid-column:2;grid-row:5;margin:0;font-size:11px}.outcomeCard #watchMatch{grid-column:2;grid-row:6;margin:0;padding:8px 4px;font-size:12px;min-height:44px}}
