:root{font-family:Inter,system-ui,sans-serif;color:#153546;background:#a8cbdc;color-scheme:light}*{box-sizing:border-box}body{margin:0}button,select{font:inherit}button{cursor:pointer;border:0;font-weight:800;border-radius:12px;color:#173e51;background:#fff;padding:12px 17px;box-shadow:0 3px 0 #173e511a}button:focus-visible,select:focus-visible{outline:3px solid #ffad36;outline-offset:3px}button:disabled{opacity:.55;cursor:default}[hidden]{display:none!important}#app{position:relative;height:100dvh;min-height:460px;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:none}header{position:absolute;top:max(18px,env(safe-area-inset-top));left:28px;right:28px;pointer-events:none}.brand{font-size:10px;font-weight:900;letter-spacing:2px}.brand span{opacity:.6;margin-left:16px}.topline{display:flex;justify-content:space-between;align-items:center;margin-top:12px}h1{font-family:'Barlow Condensed',Impact,sans-serif;font-size:38px;line-height:.87;margin:0;font-weight:900;letter-spacing:-1px}h1 span{display:block;color:#e96d39;font-size:26px;letter-spacing:3px;margin-top:6px}.actions{display:flex;gap:8px;pointer-events:auto}.actions button{font-size:11px;background:#ffffffce}#hud{position:absolute;top:128px;left:28px;display:flex;gap:28px;padding:16px 22px;background:#ffffffdd;border:1px solid #fff;border-radius:18px;box-shadow:0 8px 30px #315b7510;backdrop-filter:blur(10px)}small{font-size:8px;letter-spacing:1.3px;font-weight:800;display:block}strong{font-size:24px;display:block;margin-top:4px}.track{height:5px;background:#abc4d2;border-radius:6px;overflow:hidden;min-width:90px;margin-top:6px}.track i{display:block;height:100%;background:#36b5a1;width:100%;transition:width .2s}footer{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:28px;right:28px;display:flex;align-items:center;justify-content:space-between;gap:20px}.hint{font-size:11px;font-weight:700;background:#ffffffd9;padding:12px 16px;border-radius:12px}.hint span{padding:0 8px;color:#dd6c37}#burst{background:#173e51;color:white;min-width:180px}#burst b{font-size:9px;background:#ffffff26;padding:4px;border-radius:4px;margin-left:10px}.progress{position:absolute;bottom:-12px;height:3px;background:#38647b22;width:100%;border-radius:4px}.progress i{display:block;background:#ec8040;height:100%;width:0}#overlay{position:absolute;inset:0;display:grid;place-items:center;background:#25475a40;backdrop-filter:blur(5px);padding:16px}.card{background:#f7fcff;max-width:480px;width:100%;padding:34px;border-radius:26px;box-shadow:0 24px 100px #0e354a55;border:1px solid white;max-height:94dvh;overflow:auto}.tag{font-size:10px;font-weight:800;color:#e66a36;letter-spacing:2px}h2{font-family:'Barlow Condensed',Impact,sans-serif;font-size:58px;line-height:.98;letter-spacing:-1px;margin:18px 0}p{font-size:13px;line-height:1.7;color:#567080}.features{display:grid;gap:10px;margin:22px 0;font-size:11px;color:#e66a36}.features b{color:#254a60;margin-left:12px}.primary{width:100%;background:#ed783c;color:white;padding:17px;letter-spacing:1px;box-shadow:0 4px 0 #bb5426}.note{font-size:10px;line-height:1.6;margin-bottom:0}.difficulty{font-size:12px;font-weight:700;display:flex;justify-content:space-between;align-items:center}select{padding:8px;border:1px solid #cddce4;border-radius:8px}.answers{display:grid;gap:9px;margin:20px 0}.answers button{text-align:left;font-size:13px;border:1px solid #d5e2e9}.answers button.correct{background:#d5f4e7;border-color:#38ad84}.answers button.wrong{background:#ffe0d7;border-color:#eb7a58}#toast{position:absolute;top:35%;left:50%;transform:translateX(-50%);font-family:'Barlow Condensed',Impact,sans-serif;font-size:32px;font-weight:900;color:#fff;text-shadow:0 3px 8px #193e58;background:#173e51bb;border-radius:16px;padding:10px 24px;opacity:0;pointer-events:none;text-align:center;transition:opacity .2s;white-space:nowrap}#boss{position:absolute;top:90px;left:50%;transform:translateX(-50%);width:220px;text-align:center;font-size:10px;font-weight:900;letter-spacing:2px}#bossbar{background:#e96b56}
@media(max-width:650px){header{left:15px;right:15px;top:16px}h1{font-size:28px}h1 span{font-size:19px}.brand{font-size:8px}.brand span{margin-left:7px}.actions button{padding:9px;font-size:10px}#hud{left:15px;right:15px;top:103px;gap:0;justify-content:space-between;padding:11px 14px}strong{font-size:21px}small{font-size:7px}.track{min-width:65px}footer{left:15px;right:15px;bottom:20px;gap:8px}.hint{font-size:9px;padding:10px;max-width:160px}#burst{min-width:130px;font-size:10px;padding:13px 8px}#burst b{font-size:8px}#boss{top:180px;width:180px}.card{padding:26px}h2{font-size:48px}}@media(max-height:650px) and (min-width:651px){#hud{top:102px}h1{font-size:27px}h1 span{font-size:19px}.card{padding:22px 28px}h2{font-size:40px;margin:12px 0}.features{margin:12px 0;gap:5px}}

.combat-controls{display:flex;gap:8px}#throw{background:#ed783c;color:#fff;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;min-width:160px}#throw b{font-size:9px;margin-left:8px}#throw:active{background:#d45f27;transform:translateY(2px)}@media(max-width:650px){footer{flex-wrap:wrap}.hint{max-width:none;width:100%;padding:7px 10px}.combat-controls{width:100%}.combat-controls button{flex:1;min-width:0!important}#throw{font-size:11px}}

/* Gameplay messages stay within the bottom controls, clear of the battlefield. */
#toast{position:static;transform:none;display:block;min-height:16px;margin-top:5px;padding:0;background:none;border-radius:0;font-family:inherit;font-size:11px;font-weight:800;line-height:16px;text-align:left;text-shadow:none;color:#b8471d;white-space:normal;max-width:310px}
#lab{position:fixed;inset:0;z-index:20;background:#173e51b8;display:grid;place-items:center;padding:18px;backdrop-filter:blur(7px)}.lab-card{width:min(900px,100%);max-height:94dvh;overflow:auto;background:#f7fcff;border-radius:24px;padding:28px}.lab-card h2{font-size:44px}.lab-card label{display:flex;gap:10px;align-items:center;font-size:12px}.lab-card input:not([type=checkbox]),.lab-card select{padding:9px;min-width:0;border:1px solid #bfdae6;border-radius:8px;font:inherit}.lab-card input[type=checkbox]{width:20px;height:20px;flex-shrink:0}#lab-features{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:20px 0}#lab-features label{background:#e5eff5;border-radius:12px;padding:12px}#lab-features b{font-size:12px}#lab-features small{font-size:10px;line-height:1.5;letter-spacing:0;font-weight:500;margin-top:5px}.lab-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px}.lab-settings label{justify-content:space-between}.lab-settings input{width:100px}.lab-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.lab-actions .primary{width:auto}.lab-card pre{white-space:pre-wrap;background:#e5eff5;padding:16px;border-radius:12px;font-size:11px;overflow-wrap:anywhere}#module-status{font-size:10px;line-height:1.5;color:#416b83}#defend{font-size:10px}#defend:disabled{display:none}@media(max-width:650px){#lab-features,.lab-settings{grid-template-columns:1fr}.lab-card{padding:20px}.actions{gap:4px}.actions button{padding:7px}footer{gap:5px}.lab-actions button{width:100%!important}}

#mix{position:absolute;left:28px;top:225px;max-width:320px;font-size:10px;font-weight:700;line-height:1.6;background:#f7fcffdf;border-radius:10px;padding:8px 12px;pointer-events:none}.rebuild-meter{width:100%;height:20px;accent-color:#36b5a1}.actions{flex-wrap:wrap;justify-content:flex-end;max-width:52%}@media(max-width:650px){#mix{top:185px;left:15px;right:15px;max-width:none;font-size:9px;padding:6px 10px}#boss{top:245px}}@media(max-height:650px) and (min-width:651px){#mix{top:197px;max-width:230px}}

.recruit-tally{background:#d9f1eb;color:#205f57;border-radius:12px;padding:12px;font-weight:800;font-size:15px}
/* Visual benchmark v0.1: clear play plane, warm rewards, cool winter HUD. */
:root{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#163d56;background:#b9dced;--ink:#173f59;--teal:#147c87;--orange:#eb7847}button,select{transition:background .16s,box-shadow .16s,transform .16s}button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 0 #173e5126}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.66}header{left:24px;right:24px;top:max(16px,env(safe-area-inset-top));z-index:2}.brand{font-size:9px;letter-spacing:1.8px;color:#315c74}.brand span{display:none}.topline{margin-top:7px;align-items:flex-start}h1{font-family:ui-sans-serif,system-ui,sans-serif;font-size:25px;letter-spacing:-1.3px;line-height:.9;font-weight:1000;text-shadow:0 2px #ffffff66}h1 span{font-size:17px;letter-spacing:2.5px;color:#c65431;margin-top:6px}.actions{position:absolute;right:0;top:0;max-width:280px;gap:5px;align-items:center}.actions button,.compare,.quality-label{font-size:10px;border:1px solid #ffffffcc;border-radius:9px;background:#f5fbfff2;padding:9px 10px;box-shadow:0 3px 0 #34576b16;color:#173f59}.quality-label{display:flex;align-items:center;gap:5px;padding:5px 7px;font-weight:750}.quality-label select{padding:3px;border:0;background:transparent;color:#173f59;max-width:105px;font-size:11px}.compare{text-decoration:none;pointer-events:auto}.actions #full{font-size:16px;padding:4px 10px}#hud{top:18px;left:245px;right:320px;gap:18px;justify-content:space-between;padding:12px 18px;border-radius:16px;background:#f3faffed;border:2px solid #fff;box-shadow:0 5px 0 #7eabc037,0 10px 25px #193e5810;backdrop-filter:none;z-index:2}#hud small{font-size:9px;letter-spacing:.9px;white-space:nowrap}#hud strong{font-size:26px;line-height:1;margin-top:6px;font-variant-numeric:tabular-nums}#hud .track{height:6px;background:#c6dfeb;min-width:86px;margin-top:7px}#hud .countdown-box{border-right:1px solid #c3dbe6;padding-right:18px;color:#bd4b29}#countdown[data-urgent=true]{color:#af352b}#mix{top:103px;left:24px;max-width:230px;font-size:10px;background:#f1f9ffdf;color:#315f77;border:1px solid #ffffffa6;padding:8px 11px;border-radius:10px}#boss{top:105px;left:50%;width:250px;background:#1c4560e8;color:#fff;padding:10px 14px;border:1px solid #dbedff;border-radius:12px}#boss .track{height:7px;background:#56758b}#bossbar{background:#f7ad76}footer{left:24px;right:24px;bottom:max(22px,env(safe-area-inset-bottom));align-items:flex-end;pointer-events:none;gap:12px}footer button{pointer-events:auto}.hint{background:#edf7fff0;border:1px solid #fff;color:#234f69;box-shadow:0 4px 0 #729db426;max-width:370px;min-height:45px;font-size:11px;line-height:1.5;padding:11px 15px}.hint span{padding:0 5px}#toast{font-size:12px;line-height:1.4;min-height:17px;color:#b54d2c;margin-top:3px;max-width:350px}#module-status{font-size:11px;color:#32657c}#burst{min-width:200px;font-size:13px;background:#194e6b;border:2px solid #e1f5ff;box-shadow:0 5px 0 #102e43;padding:16px 20px;letter-spacing:1px}#burst:not(:disabled){background:#176e83}#burst b{font-size:9px}.progress{bottom:-12px;height:5px;background:#729eb53b;overflow:hidden}.progress i{background:#ee9158;border-radius:5px;transition:width .2s linear}#overlay{z-index:5;place-items:center start;padding:90px 5vw 24px;background:linear-gradient(90deg,#20495c7a,#365c6710 70%);backdrop-filter:none}.card{max-width:455px;border-radius:24px;padding:28px 30px;background:#f6fbfff5;border:2px solid #fff;box-shadow:0 8px 0 #4c7d9633,0 25px 65px #1a425c26;max-height:calc(100dvh - 115px);scrollbar-width:thin}.tag{color:#a74425;font-size:10px;letter-spacing:1.4px;font-weight:900}h2{font-family:ui-sans-serif,system-ui,sans-serif;font-weight:950;font-size:44px;line-height:1.02;letter-spacing:-1.8px;margin:14px 0 18px;color:#183f58}p{font-size:13px;color:#416175;line-height:1.65}.features{gap:9px;margin:18px 0}.primary{background:#de6537;color:#fff;box-shadow:0 5px 0 #a94727;border:1px solid #ef9b75;font-size:12px;padding:16px;letter-spacing:.7px}.note{font-size:11px;line-height:1.55}.answers{margin:17px 0;gap:9px}.answers button{border:2px solid #d1e1ec;background:#fff;border-radius:13px;line-height:1.4;min-height:49px;color:#173f59;box-shadow:0 3px 0 #8db2c428;padding:12px 14px;font-size:14px}.answers button.correct{background:#d9f5eb;border-color:#238e72;opacity:1;box-shadow:0 3px 0 #176a5430}.answers button.wrong{background:#ffdfd5;border-color:#c95d40;opacity:1}.recruit-tally{font-size:14px;color:#155d65;background:#d9eef1;border:1px solid #b8dce1;padding:12px}.rebuild-meter{height:22px;accent-color:#188c92;transition:all .3s}.lab-card{border:2px solid #fff;box-shadow:0 8px 0 #345b6b36}.lab-card h2{font-size:38px}#wave-intro{position:absolute;left:50%;top:29%;transform:translateX(-50%);padding:13px 23px;border-radius:13px;background:#174963e8;color:#fff;font-size:24px;font-weight:950;letter-spacing:.5px;pointer-events:none;opacity:0;text-align:center;z-index:3}@keyframes wave-entry{0%{opacity:0;translate:0 10px}12%,73%{opacity:1;translate:0 0}100%{opacity:0;translate:0 -7px}}body[data-mode=recruit] #countdown{font-size:30px}body[data-mode=rebuild] #health{color:#187e8a}body[data-mode=play] #mix{opacity:.85}body[data-mode=recruit] .card,body[data-mode=rebuild] .card,body[data-mode=review] .card{max-width:515px}body[data-mode=recruit] h2,body[data-mode=rebuild] h2,body[data-mode=review] h2{font-size:30px;letter-spacing:-1px}.track i{transition:width .3s ease,background .3s}
@media(max-width:1100px){#hud{left:200px;right:265px;gap:12px;padding:10px 12px}#hud strong{font-size:22px}#hud small{font-size:8px}.actions{max-width:240px}.actions button,.compare{padding:7px 8px}#hud .countdown-box{padding-right:12px}.track{min-width:60px!important}header{left:18px;right:18px}.quality-label{font-size:0}.quality-label select{font-size:10px}}
@media(max-width:850px){#hud{left:18px;right:18px;top:95px;padding:10px 15px}#mix{top:180px;left:18px;max-width:230px}#boss{top:180px;left:auto;right:18px;transform:none;width:190px}.actions{max-width:55%}#overlay{padding:185px 18px 90px}.card{max-height:calc(100dvh - 205px);margin:auto}footer{left:18px;right:18px}.hint{max-width:310px}#wave-intro{top:32%;font-size:20px}}
@media(max-width:550px){#app{min-height:460px}header{top:max(12px,env(safe-area-inset-top));left:12px;right:12px}h1{font-size:21px}h1 span{font-size:14px}.actions{max-width:56%;gap:4px}.brand{font-size:8px}.actions button,.compare{font-size:9px;padding:7px}#hud{left:12px;right:12px;top:92px;gap:6px;padding:10px 11px;border-radius:13px}#hud small{font-size:7px;letter-spacing:.4px}#hud strong{font-size:22px}#hud .countdown-box{padding-right:10px}#hud .track{min-width:58px!important;height:4px}#mix{top:174px;left:12px;right:12px;max-width:none;font-size:9px;padding:6px 9px}#boss{top:222px;left:50%;right:auto;transform:translateX(-50%);width:210px}footer{left:12px;right:12px;bottom:max(20px,env(safe-area-inset-bottom));flex-wrap:nowrap;gap:7px}.hint{font-size:9px;min-height:0;max-width:53%;padding:7px 9px;width:auto}#toast,#module-status{font-size:10px}#burst{min-width:0;width:43%;font-size:10px;padding:14px 8px;border-radius:11px}#burst b{display:none}#defend{font-size:9px;padding:9px;position:absolute;right:0;bottom:55px}#overlay{padding:177px 12px 80px}.card{padding:21px;max-height:calc(100dvh - 205px);border-radius:19px}h2{font-size:36px}.features{margin:12px 0;gap:8px}body[data-mode=recruit] .card,body[data-mode=rebuild] .card,body[data-mode=review] .card{max-height:calc(100dvh - 194px)}body[data-mode=recruit] h2,body[data-mode=rebuild] h2{font-size:25px}.answers button{font-size:13px;min-height:47px;padding:10px 12px}p{font-size:12px}.recruit-tally{font-size:12px;padding:9px}.note{font-size:10px}#wave-intro{width:80%;font-size:18px;top:35%}}
@media(max-height:650px) and (min-width:651px){header{top:10px}#hud{top:10px;left:200px;right:255px}#mix{top:90px;max-width:210px}#overlay{padding:80px 20px 65px}.card{max-height:calc(100dvh - 95px);padding:19px 24px}h2{font-size:34px;margin:10px 0}.answers{margin:12px 0;gap:6px}.answers button{min-height:40px;padding:8px 12px}footer{bottom:17px}.hint{padding:7px 11px}#burst{padding:11px 15px}#boss{top:91px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}#wave-intro[data-show]{display:none}}

.card > .compare{display:inline-block;margin-bottom:18px;font-size:11px;color:#235d79;background:#e4f0f7;border:1px solid #c8dfe9;box-shadow:none}

/* Keep setup controls reachable above the opening menu. Academic rounds lock Lab. */
header{z-index:6}

/* Approved concept translation: bold navy HUD and warm orange action. */
#hud{background:#142d52f5;color:#fff;border:1px solid #52749c;box-shadow:0 5px 0 #0d244738,0 10px 25px #193e5820}#hud small{color:#d5e7f7;font-size:10px}#hud strong{font-size:29px}#hud .countdown-box{color:#ffd08c;border-right-color:#486284}#hud .track{background:#314e73}#hud .track i{background:#8ed64c!important}h1{color:#eef9ff;text-shadow:0 2px 0 #204e76,2px 0 #204e76,-2px 0 #204e76}h1 span{color:#ffb747;text-shadow:0 2px 0 #7a4024}.brand{color:#1b4665}#burst{background:linear-gradient(#ffa630,#ed771d);border:3px solid #ffe19c;color:#fff;box-shadow:0 5px 0 #9b502b,0 0 0 3px #233d62;font-size:15px}#burst:not(:disabled){background:linear-gradient(#ffa630,#ed771d)}#burst b{background:#213d64;padding:5px 7px}#visual-test,#boss-test{width:100%;margin-top:10px;padding:15px;color:#fff;background:#1d5276;border:1px solid #517c98;font-size:12px;letter-spacing:.5px}.hint{color:#fff;background:#142d52ee;border-color:#57718e}#toast{color:#ffcd8d}#module-status{color:#b9dfed}@media(max-width:550px){#hud strong{font-size:23px}#hud small{font-size:7px}#burst{font-size:11px}}

/* Close-view phone layout: preserve the field rather than a tall site masthead. */
.edge-alert{position:absolute;top:53%;z-index:3;background:#183957df;color:#ffd78b;border:1px solid #f6c577;border-radius:9px;padding:7px 9px;font-size:12px;font-weight:850;pointer-events:none}#edge-left{left:7px}#edge-right{right:7px}
@media(max-width:850px){
 header{top:max(8px,env(safe-area-inset-top));left:10px;right:10px}.brand{display:none}.topline{margin-top:0;align-items:center}h1{font-family:system-ui,sans-serif;font-size:15px;letter-spacing:-.6px;line-height:1}h1 span{font-size:10px;letter-spacing:1.2px;margin-top:3px}.actions{top:0;max-width:none;width:auto;flex-wrap:nowrap;gap:4px}.actions>.compare{display:none}.actions button{min-height:32px;padding:6px 8px;font-size:9px}.quality-label{padding:3px;border:0;background:#ffffffd9}.quality-label select{max-width:83px;font-size:9px}.actions #full{font-size:15px;padding:3px 7px}
 #hud{top:max(51px,calc(env(safe-area-inset-top) + 44px));left:10px;right:10px;padding:8px 11px;gap:9px;border-radius:12px;backdrop-filter:none;box-shadow:0 3px 0 #122d4c26}#hud small{font-size:7px;letter-spacing:.3px}#hud strong,body[data-mode=recruit] #countdown{font-size:21px;margin-top:4px}#hud .countdown-box{padding-right:9px}#hud .track{height:3px;min-width:50px!important;margin-top:4px}#mix{top:max(119px,calc(env(safe-area-inset-top) + 112px));left:11px;right:11px;max-width:none;padding:3px 7px;font-size:8px;line-height:1.3;background:#e8f5ffd9}#boss{top:153px;left:50%;right:auto;transform:translateX(-50%);padding:5px 9px;width:190px;font-size:9px}
 footer{left:10px;right:10px;bottom:max(16px,env(safe-area-inset-bottom));gap:9px;align-items:flex-end}.hint{width:55%;max-width:55%;min-height:0;padding:6px 9px;font-size:8px;line-height:1.3;box-shadow:none}#toast,#module-status{font-size:9px;line-height:1.3;min-height:0;margin-top:3px}#toast:empty,#module-status:empty{display:none}#burst{width:40%;min-width:0;padding:11px 7px;font-size:10px;letter-spacing:.4px;border-width:2px;border-radius:13px}#burst b{display:none}#defend{bottom:49px;padding:7px;font-size:9px}.progress{height:3px;bottom:-9px}#overlay{padding:151px 12px 65px}.card{max-height:calc(100dvh - 175px);padding:20px}body[data-mode=recruit] .card,body[data-mode=rebuild] .card,body[data-mode=review] .card{max-height:calc(100dvh - 175px)}
}
@media(max-width:370px){.quality-label select{max-width:70px}h1{font-size:13px}h1 span{font-size:9px}.actions button{padding:6px;font-size:8px}#hud strong{font-size:19px}}
