*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#06356b;overflow:hidden;font-family:Arial,sans-serif}body{display:flex;align-items:center;justify-content:center}button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible,select:focus-visible{outline:3px solid white;outline-offset:2px}button:disabled{cursor:default;opacity:.46}#game{position:relative;width:min(100vw,58.823529dvh);height:min(170vw,100dvh);overflow:hidden;container-type:inline-size;background:#3589df}canvas{width:100%;height:100%;display:block}.ticker{position:absolute;top:0;width:100%;height:2.25%;display:flex;align-items:center;gap:2%;background:#0a2247bb;color:#c5dbed;font-size:1.4cqw;letter-spacing:.05em;padding:0 2%}.ticker span:last-child{margin-left:auto;color:#a9ecca}.live-dot{background:#00e383;width:1cqw;height:1cqw;border-radius:50%}.menu{position:absolute;right:2.2%;top:3%;width:11%;aspect-ratio:1;border:0;border-radius:50%;background:#0079dc;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9%}.menu i{height:3%;width:42%;background:#9ac5df;border-radius:5px}.menu i:nth-child(2){background:#ffe015}.flock{position:absolute;left:30%;top:57.9%;width:40%;height:6.2%;display:flex;align-items:center;justify-content:space-between;background:#087fddcc;border:1cqw solid #057acb;border-radius:9cqw;color:white;font-weight:900;font-size:5.8cqw;text-shadow:2px 2px #001b29,-1px -1px #001b29}.round{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:9cqw;height:9cqw;border-radius:50%;border:.65cqw solid #039b48;background:radial-gradient(circle at 40% 24%,#00eb57,#00c54d 68%,#00aa50);color:#fff;font-weight:900;font-size:7cqw;line-height:.8;text-shadow:0 .3cqw #009951;box-shadow:inset .2cqw .2cqw .2cqw #8cff9399,0 .3cqw .3cqw #04559666}.hud{position:absolute;top:73.0%;left:2%;width:96%;height:9.6%;border-radius:3.7cqw;background:linear-gradient(120deg,#0667cadb,#2486e8e8);display:flex;justify-content:space-between;align-items:center;padding:0 4%;color:white;text-align:center}.hud>div{display:flex;flex-direction:column;align-items:center}.caption{font-size:2.4cqw;font-weight:700}.hud strong{font-size:5.8cqw;line-height:1.06;color:#ffe017}.hud small{font-size:1.8cqw;margin-top:.65cqw;font-weight:600}.actions{position:absolute;top:83.3%;left:2%;width:96%;height:9.1%;display:flex;gap:2.2%}.blue,.yellow{border-radius:3cqw;border:.7cqw solid #2683d6;box-shadow:inset .2cqw .2cqw .2cqw #a9d8ff99;font-weight:800}.blue{position:relative;width:48%;background:#0469cf;color:#ffdf19;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-left:3.5%;font-size:2.7cqw}.blue .caption{color:#e9f1f9;font-size:2.1cqw}.difficulty-bars{position:absolute;right:8%;top:22%;height:57%;width:11%;display:flex;flex-direction:column;align-items:flex-end;gap:12%}.difficulty-bars i{height:16%;width:100%;border-radius:.3cqw;background:#075ca9}.difficulty-bars i:nth-child(2){width:79%}.difficulty-bars i:nth-child(3){width:60%;background:#ffe300}.difficulty-bars i:nth-child(4){width:40%;background:#ffed00}.primary-wrap{position:relative;width:50%}.yellow{background:linear-gradient(115deg,#ffd209,#ffcd00);border-color:#d5ac00;color:#181710;font-size:4.4cqw}.primary-wrap>.yellow{width:100%;height:100%}.aux{position:absolute;top:-12%;left:17%;width:66%;height:40%;border:0;border-radius:0 0 2cqw 2cqw;background:#006aca;color:#f0f7fd;font-size:2.3cqw;font-weight:700;z-index:2}footer{position:absolute;top:95.5%;left:0;width:100%;height:4.5%;display:flex;gap:3%;align-items:center;justify-content:space-between;padding:0 4%;background:linear-gradient(#dae3f1bb,#333b44 65%,#152c44);color:#eef2f7}footer>div{display:flex;flex-direction:column;font-size:1.9cqw;font-weight:700}footer b{font-size:2.8cqw;color:#ffe127}footer>button{padding:0;background:none;border:0;color:#dce8eb;font-size:3.8cqw}footer>div:last-child{align-items:flex-end}.toast{position:absolute;top:68%;left:20%;width:60%;color:#fdf6ab;text-shadow:0 .25cqw .1cqw #153754;text-align:center;font-size:2.5cqw;font-weight:700;pointer-events:none}.result{position:absolute;inset:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;z-index:5}.result[hidden]{display:none}.result h1{position:absolute;top:27%;font-size:6cqw;transform:rotate(-6deg);color:#ffe31d;-webkit-text-stroke:.45cqw #241a02;paint-order:stroke fill;font-weight:900;text-shadow:0 .6cqw #12140d;margin:0}.result>strong{position:absolute;top:56%;font-size:8cqw;color:#ffe62c;-webkit-text-stroke:.45cqw #202616;paint-order:stroke fill;z-index:1}.result>p{position:absolute;top:63%;font-size:2.6cqw;text-align:center;font-weight:700}.result>.yellow{position:absolute;top:78%;width:64%;height:9%}.result-shine{position:absolute;top:30%;left:0;width:100%;height:40%;background:repeating-conic-gradient(from 0deg at 50% 50%,#ffffb700 0deg,#fff9bb99 5deg,#ffffb700 10deg);mask-image:radial-gradient(ellipse,#000,transparent 68%);opacity:0;animation:shine 12s linear infinite}@keyframes shine{to{transform:rotate(360deg)}}dialog{position:absolute;top:19%;width:87%;max-height:74%;border:.7cqw solid #73baf8;border-radius:4cqw;background:linear-gradient(#096fd0,#064da1);color:white;padding:5% 6%;font-size:3cqw;z-index:10}dialog::backdrop{background:#041628ad}dialog h2{color:#ffe124;font-size:4.6cqw}dialog p{line-height:1.45}dialog label{display:flex;align-items:center;justify-content:space-between;margin:4% 0}select{width:55%;background:#eff7fc;color:#083052;border:0;border-radius:1cqw;padding:2%;font-size:3cqw}dialog>.yellow{width:100%;padding:4%}.close{position:absolute;right:4%;top:2%;color:white;background:none;border:0;font-size:6cqw}.keys{color:#c2e5ff;font-size:2.4cqw}.loading{position:absolute;inset:0;background:linear-gradient(#1768c5,#8bc9eb);z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;color:white;gap:3cqw}.loading b{font-size:9cqw;color:#ffe416;text-shadow:0 .7cqw #00315e}.loading span{font-size:3cqw}.loading[hidden]{display:none}@media(prefers-reduced-motion:reduce){.result-shine{animation:none}}

.toast{width:1px;height:1px;overflow:hidden;clip-path:inset(50%);font-size:1px}

[hidden]{display:none!important}.mode-tabs{position:absolute;left:2%;top:3%;width:27%;height:5%;display:flex;gap:4%;z-index:6}.mode-tabs button{border:.4cqw solid #378ddd;border-radius:2cqw;background:#0759a7e8;color:#d7ecff;font-weight:700;font-size:2.2cqw;padding:0 1cqw}.mode-tabs button:first-child{width:36%}.mode-tabs button:last-child{width:64%}.mode-tabs button[aria-pressed=true]{background:#ffdc25;color:#183349;border-color:#d7b326}.lab-film{position:absolute;top:10%;right:2%;border:0;border-radius:1.5cqw;background:#0b65b6da;color:white;padding:1.6cqw;font-size:2.1cqw;z-index:6}.lab-status{position:absolute;left:12%;width:76%;top:65.5%;text-align:center;color:#eaf5ff;background:#093764df;border:.35cqw solid #6e9abb;border-radius:2cqw;padding:1.3cqw;pointer-events:none}.lab-status strong{display:block;font-size:3.2cqw;color:#ffaaa3}.lab-status[data-allowed=true] strong{color:#91ffa4}.lab-status small{display:block;font-size:2.2cqw;margin-top:.6cqw}.lab-film-active .mode-tabs,.lab-film-active .lab-status{display:none}#labControls input[type=range]{width:45%;accent-color:#ffdc25}#labControls input[type=checkbox]{accent-color:#ffdc25}#labControls output{font-weight:bold;color:#ffea67}#labControls label{gap:2cqw;flex-wrap:wrap}#labControls p{font-size:2.7cqw}#labControls select{font-size:2.6cqw}#scene{touch-action:none}input:focus-visible{outline:3px solid white;outline-offset:2px}

.hud{justify-content:center}.hide-lab-hints .ticker span:last-child{visibility:hidden}
dialog{width:min(87vw,51.17647dvh);max-height:74dvh;padding:4cqw 5cqw;overflow-y:auto}dialog label{margin:3cqw 0}

.starting-points{display:flex;flex-direction:column;align-items:center;gap:.6cqw;width:45%}.starting-points .caption{font-size:2.1cqw}.starting-points input{width:100%;max-width:26cqw;background:#0758ad;border:.4cqw solid #71c4f2;border-radius:1.4cqw;text-align:center;font:800 4.8cqw Arial;color:#ffe017;padding:.8cqw;appearance:textfield}.starting-points input:disabled{opacity:1;color:#ffe017;border-color:#267fca}.starting-points input:focus-visible{outline:2px solid white}.starting-points input::-webkit-inner-spin-button{appearance:none}.starting-points small{font-size:1.8cqw;color:#d5ecff;font-weight:600}.result>strong{max-width:94%;font-size:7cqw;white-space:nowrap}.result>p{max-width:88%;line-height:1.5}.result>strong.counting{animation:point-pop .35s ease-in-out infinite alternate}@keyframes point-pop{to{transform:scale(1.06);filter:brightness(1.2)}}@media(prefers-reduced-motion:reduce){.result>strong.counting{animation:none}}

/* Compact two-button play panel. */
.points-action{position:absolute;top:73%;left:2%;width:96%;height:9.6%;display:flex;align-items:center;justify-content:center;gap:4cqw;border:.6cqw solid #2683d6;border-radius:3.7cqw;background:linear-gradient(120deg,#0667cadb,#2486e8e8);color:#fff;font-weight:800;box-shadow:inset .2cqw .2cqw .2cqw #a9d8ff99}.points-action>span:first-child{font-size:3.4cqw}.points-action strong{font-size:6cqw;color:#ffe017}.points-action #pointsChevron{font-size:6cqw;color:#c7e5ff}.actions>.yellow{width:100%;height:100%;font-size:5.2cqw}.aux{top:10%;left:2%;width:20%;height:4%;border-radius:1.5cqw;font-size:2.3cqw;z-index:6}.points-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:2cqw;margin:5cqw 0}.points-presets button{padding:3cqw .8cqw;border:.35cqw solid #63a9e6;border-radius:2cqw;background:#0757a8;color:white;font-weight:800;font-size:3.4cqw}.points-presets button[aria-pressed=true]{background:#ffdc25;color:#183349;border-color:#d7b326}.points-stepper{display:flex;align-items:center;justify-content:center;gap:4cqw;margin:5cqw 0}.points-stepper button{height:11cqw;width:11cqw;border-radius:50%;border:.45cqw solid #6ac0ef;background:#0876c9;color:#fff;font-weight:800;font-size:7cqw}.points-stepper output{min-width:34cqw;text-align:center;color:#ffe32b;font-size:6cqw;font-weight:800}#pointsPicker h2{margin-top:2cqw;margin-bottom:3cqw}#pointsPicker>.keys{text-align:center}#pointsPicker>.yellow{font-size:4cqw}

/* Amount and flock share one pre-flight dialog. The scene and attacks stay intact. */
.points-action>small{font-size:2.7cqw;color:#deefff;white-space:nowrap}.points-action:has(#startFlock:not([hidden])){gap:2.5cqw;flex-wrap:wrap;padding:1.2cqw 2cqw}.points-action:has(#startFlock:not([hidden]))>.caption,.points-action:has(#startFlock:not([hidden]))>#secondaryCaption{width:100%;font-size:2.5cqw;line-height:1}
.startup-birds{display:flex;align-items:center;justify-content:space-between;gap:3cqw;font-weight:800;margin:3cqw 0}.startup-birds>span{font-size:3.5cqw}.startup-birds .flock{position:static;width:50%;height:auto;padding:.5cqw 1cqw;border-width:.45cqw;font-size:5cqw}.startup-birds .round{width:8cqw;height:8cqw;font-size:6cqw}.startup-value-label{font-size:3.2cqw;font-weight:800;margin:4cqw 0 2cqw}.points-presets{grid-template-columns:repeat(4,1fr);gap:1.6cqw;margin:2cqw 0}.points-presets button{font-size:3cqw;padding:2.5cqw .3cqw}.points-stepper{margin:3cqw 0}.startup-note{color:#d0e6fa;font-size:2.6cqw;line-height:1.35;margin:3cqw 0}#pointsPicker>.yellow{padding:3cqw}#pointsPicker{top:10%;max-height:82dvh}#pointsPicker h2{margin-bottom:3cqw}

/* Approved portrait control panel. */
.reference-panel .flock{left:33%;top:61%;width:34%;height:5.8%;padding:0 1cqw;border-width:.4cqw;border-radius:9cqw;background:linear-gradient(#008fff,#0075eb);font-size:6cqw;box-shadow:inset 0 .3cqw .5cqw #9dd8ff7a}
.reference-panel .flock .round{width:8.6cqw;height:8.6cqw;font-size:6.8cqw;border-width:.45cqw}
.reference-deck{position:absolute;top:79%;left:2%;width:96%;height:12.2%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.95fr) minmax(0,1.08fr);gap:1.1cqw}
.reference-level,.reference-amount{border:.4cqw solid #2281dd;border-radius:2.4cqw;background:linear-gradient(120deg,#0878f8,#0069eb);box-shadow:inset 0 .35cqw .4cqw #91cfff8f,0 .25cqw .3cqw #295b9299;color:white}
.reference-level{position:relative;padding:0 4.5cqw 0 1.8cqw;text-align:left;font-weight:900;letter-spacing:-.035em}
.reference-level>span{display:block;font-size:2.5cqw}.reference-level>strong{display:block;margin-top:.6cqw;font-size:3.15cqw;line-height:1.08;letter-spacing:-.045em}
.reference-bars{position:absolute;right:1.2cqw;top:35%;width:2.8cqw;display:flex;flex-direction:column;align-items:flex-end;gap:.65cqw}.reference-bars b{height:1cqw;border-radius:.3cqw;background:#ffc74b;width:100%;box-shadow:0 0 .3cqw #fed69f}.reference-bars b:nth-child(2){width:78%;background:#ffd46d}.reference-bars b:nth-child(3){width:55%;background:#ffe99b}
.reference-amount{display:flex;align-items:center;justify-content:center;gap:.4cqw;padding:0 .6cqw;min-width:0}
.reference-amount>.round{flex-shrink:0;width:8cqw;height:8cqw;font-size:6cqw;border-width:.45cqw;position:relative}.reference-amount>.round:before{content:'';position:absolute;inset:-1.6cqw}
.reference-panel .reference-amount .points-action{position:static;border:0;background:transparent;box-shadow:none;border-radius:0;min-width:0;flex:1;height:100%;width:auto;padding:0;gap:.5cqw;display:flex;flex-direction:column;flex-wrap:nowrap;color:#ffe82c}
.reference-panel .reference-amount .points-action strong{font:900 6.5cqw Arial;line-height:1;letter-spacing:-.06em;white-space:nowrap}.reference-panel .reference-amount .points-action.long-value strong{font-size:4cqw;letter-spacing:-.05em}
.reference-panel .reference-amount .points-action>small{font-size:2.3cqw;font-weight:800;white-space:nowrap;color:#e7f4ff;line-height:1.2}.reference-panel #pointsChevron{display:none}.reference-panel .reference-amount #secondaryCaption{width:auto;font-size:2.2cqw;color:white;letter-spacing:-.03em}
.reference-panel .actions{position:static;display:block;width:auto;height:100%;min-width:0}.reference-panel .actions>.yellow{height:100%;width:100%;border-radius:2.4cqw;border:.6cqw solid #d1a70a;background:linear-gradient(120deg,#ffe532,#ffd200);font:900 4.45cqw Arial;letter-spacing:-.055em;padding:0 .4cqw;box-shadow:inset .2cqw .2cqw .3cqw #fff391}
.reference-panel .reference-deck.in-flight{grid-template-columns:minmax(0,1fr) minmax(0,1.95fr) minmax(0,1.08fr)}.reference-panel .reference-deck.in-flight .reference-amount{padding:0 1cqw}
.reference-level-options{display:grid;gap:3cqw}.reference-level-options button{padding:4cqw;border:.4cqw solid #61abe9;border-radius:2cqw;background:#0577db;color:#fff;font-weight:900;font-size:4cqw}.reference-level-options button[aria-pressed=true]{background:#ffdc24;color:#152638;border-color:#d1a80a}

