.command-deck .arsenal{background:linear-gradient(140deg,#2b2c2fed,#191b1ef5);border:1px solid #73716a;box-shadow:0 5px 25px #0008,inset 0 1px #ffffff0c;border-radius:3px;gap:9px}
.tower-wallet{border-color:#505054}.tower-wallet .eyebrow{color:#bdb8a8}.wallet-value{color:#ead29a}
.tower-option{background:linear-gradient(#37383c,#25272a);border:1px solid #65656a;box-shadow:inset 0 1px #ffffff0a;border-radius:2px}.tower-option.selected{background:linear-gradient(#555147,#323234);border-color:#d5bd89;box-shadow:inset 0 0 0 1px #c2ac7e33}.tower-option:hover:not(:disabled){background:#444347}.tower-option .tower-name{color:#e6e4db}.shortcut{color:#a4a29b}.tower-price{color:#d9c69a}
.details{border-color:#505054}.details .stat-row{border-color:#45474a}.details h3{color:#e8e2d3}.details .eyebrow{color:#bbb4a2}.details p,.build-hint{color:#bcbfc0}.upgrade-button{background:#45443e;border-color:#7e7864}.sell-button{color:#c5c3bc;background:#2a2c30;border-color:#515256}
.command-deck>.minimap-panel{left:0!important;bottom:0!important;width:184px!important;height:184px!important;padding:0!important;margin:0!important;gap:0;border:0!important;border-radius:0;background:none!important;box-shadow:none!important;display:block;overflow:hidden}
#minimap{display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;padding:0!important;margin:0!important;aspect-ratio:1;border:0!important;box-shadow:none!important;object-fit:fill}
.wave-overlay{top:12px;width:270px;padding:12px 18px 11px;background:rgba(28,29,32,.78);border:1px solid #87827a33;border-radius:3px;box-shadow:0 5px 24px #0003;backdrop-filter:blur(3px);text-shadow:0 1px 2px #000}
.wave-overlay .wave-number{font-size:19px;color:#f2e7ce}.wave-overlay #next-label{display:none}.wave-overlay h3{font-size:14px;margin-top:6px}.wave-overlay #next-desc{font-size:9px;color:#c6c7c6}.wave-overlay .wave-progress{display:none}.next-wave-clock{margin-top:10px;padding-top:8px;border-top:1px solid #ffffff15;display:flex;align-items:center;justify-content:center;gap:12px}.next-wave-clock>span{font-size:8px;letter-spacing:1.2px;color:#bfc0c3}.next-wave-clock strong{font-size:21px;font-weight:500;color:#f0dcae;font-variant-numeric:tabular-nums}.next-wave-clock.urgent strong{color:#f1a17f}.wave-overlay .wave-hint:empty{display:none}.wave-overlay .wave-hint{font-size:8px!important;margin-top:7px!important}
.wave-splash{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);z-index:4;width:min(580px,90vw);padding:20px;text-align:center;background:linear-gradient(90deg,transparent,#17191dce 20%,#17191de6 50%,#17191dce 80%,transparent);pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:9px;text-shadow:0 2px 8px #000;animation:waveArrival 3.2s ease both}.splash-kicker{font-size:12px;letter-spacing:4px;color:#e9b492}.wave-splash strong{font-family:Cinzel,Georgia,serif;font-size:42px;letter-spacing:5px;font-weight:500;color:#f1dfb8}.wave-splash #splash-subtitle{font-size:13px;color:#d2d3ce;letter-spacing:1px}.splash-rule{height:1px;width:70%;background:linear-gradient(90deg,transparent,#c9b480,transparent)}
@keyframes waveArrival{0%{opacity:0;transform:translate(-50%,-44%) scale(.98)}12%,75%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-54%) scale(1.01)}}
canvas#board{cursor:grab}canvas#board.building{cursor:crosshair}canvas#board.dragging{cursor:grabbing}
.toast{background:#24262beb;border-color:#79736a;color:#e5decf;bottom:24px}
@media(max-width:1000px){.command-deck>.minimap-panel{width:155px!important;height:155px!important}.wave-overlay{width:248px;top:9px;padding:10px 14px}.wave-overlay .wave-number{font-size:17px}.next-wave-clock strong{font-size:19px}}
@media(max-height:650px){.command-deck>.minimap-panel{width:135px!important;height:135px!important}.wave-overlay{padding:8px 12px;top:8px}.wave-overlay .wave-number{font-size:16px}.next-wave-clock{margin-top:6px;padding-top:5px}.wave-overlay h3{font-size:12px}.wave-splash strong{font-size:32px}}
@media(prefers-reduced-motion:reduce){.wave-splash{animation:none}}
.command-deck>.minimap-panel{width:224px!important;height:224px!important}
.command-deck .arsenal{width:360px;padding:13px;gap:12px}.tower-wallet{padding-bottom:10px}.tower-wallet .eyebrow{font-size:11px}.wallet-value{font-size:22px}
#tower-list{gap:8px}.tower-option{min-height:91px;padding:5px 3px}.tower-option img{width:48px;height:48px}.tower-option .tower-name{font-size:12px}.tower-price{font-size:11px}.shortcut{font-size:10px}
.details h3{font-size:19px}.details p{font-size:12px}.details .eyebrow{font-size:10px}.details .stat-row strong{font-size:18px}.details .stat-row>span{font-size:9px}.upgrade-button,.sell-button{font-size:12px;padding:10px}.build-hint{font-size:11px}
@media(max-width:1000px){.command-deck>.minimap-panel{width:200px!important;height:200px!important}.command-deck .arsenal{width:320px;padding:11px;gap:10px}.tower-option{min-height:81px}.tower-option img{width:42px;height:42px}.tower-option .tower-name{font-size:11px}.wallet-value{font-size:20px}}
@media(max-height:650px){.command-deck>.minimap-panel{width:170px!important;height:170px!important}.command-deck .arsenal{width:292px;padding:9px;gap:8px}.tower-option{min-height:68px}.tower-option img{width:34px;height:34px}.tower-option .tower-name{font-size:10px}.wallet-value{font-size:18px}.details p{font-size:10px}}
@media(max-width:650px){.command-deck>.minimap-panel{width:150px!important;height:150px!important}.command-deck .arsenal{width:260px;padding:8px}.tower-option{min-height:70px}.tower-option img{width:35px;height:35px}.tower-option .tower-name{font-size:9px}.tower-price{font-size:10px}}
.end-screen{background:rgba(20,21,24,.62)}.end-card{background:rgba(36,38,42,.84)}
.back-build{border:0;background:none;padding:0;color:#d6c6a6;font-size:12px;text-align:left;letter-spacing:.2px}.back-build:hover{color:#f6e7c6}.arsenal.inspecting .details{border-top:0;padding-top:0;max-height:min(440px,calc(100vh - 230px))}.arsenal.inspecting .details h3{margin-top:9px;margin-bottom:14px;font-size:22px}.arsenal.inspecting .stat-row{padding:12px 0;margin-bottom:13px}.arsenal.inspecting .detail-actions{margin-top:18px}.arsenal.inspecting .build-hint{margin-top:18px}@media(max-height:650px){.arsenal.inspecting .details h3{font-size:18px;margin:7px 0}.arsenal.inspecting .stat-row{padding:7px 0;margin-bottom:8px}.arsenal.inspecting .detail-actions{margin-top:10px}}
.send-next-wave{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:16px;margin-top:10px;padding:8px 12px;background:rgba(55,55,58,.7);color:#ebd6a7;border:1px solid #a08d6699;border-radius:2px;font-size:11px;font-weight:600;text-shadow:0 1px 2px #000}.send-next-wave span{font-size:8px;letter-spacing:.5px;color:#c4bca7}.send-next-wave:hover:not(:disabled){background:#555044b3;border-color:#d3bb83}.send-next-wave:disabled{opacity:.45;cursor:default}
.command-deck .arsenal{width:420px;padding:15px;gap:14px}.tower-wallet .eyebrow{font-size:13px}.wallet-value{font-size:27px}#tower-list{gap:9px}.tower-option{min-height:113px;padding:6px 4px}.tower-option img{width:55px;height:55px}.tower-option .tower-name{font-size:16px;line-height:1.25}.tower-price{font-size:15px;line-height:1.4}.shortcut{font-size:12px;top:4px;right:6px}.arsenal.inspecting .details h3{font-size:26px}.details p{font-size:14px;line-height:1.6}.details .eyebrow{font-size:12px}.details .stat-row strong{font-size:23px}.details .stat-row>span{font-size:11px}.upgrade-button,.sell-button{font-size:14px;padding:12px}.back-build{font-size:15px}.build-hint{font-size:13px}
@media(max-width:1000px){.command-deck .arsenal{width:380px;padding:13px;gap:12px}.tower-option{min-height:105px}.tower-option img{width:50px;height:50px}.tower-option .tower-name{font-size:14px}.tower-price{font-size:15px}.wallet-value{font-size:25px}}
@media(max-height:650px){.command-deck .arsenal{width:350px;padding:11px;gap:10px}.tower-option{min-height:94px}.tower-option img{width:43px;height:43px}.tower-option .tower-name{font-size:13px}.tower-price{font-size:14px}.arsenal.inspecting .details h3{font-size:23px}.details p{font-size:12px}}
@media(max-width:650px){.command-deck .arsenal{width:305px;padding:10px}.tower-option{min-height:90px}.tower-option img{width:40px;height:40px}.tower-option .tower-name{font-size:12px!important}.tower-price{font-size:13px}.wallet-value{font-size:23px}}
.clear-splash{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);z-index:4;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:12px;max-width:90vw;text-align:center;background:none;border:0;box-shadow:none;text-shadow:0 2px 4px #000,0 4px 18px #000b;animation:clearReward 3.4s ease both}.clear-splash strong{font-family:Cinzel,Georgia,serif;font-weight:500;font-size:clamp(26px,3.6vw,46px);letter-spacing:3px;color:#f2ead9;white-space:nowrap}.clear-splash>span{font-size:clamp(25px,3vw,38px);font-weight:700;letter-spacing:2px;color:#f1d28b}@keyframes clearReward{0%{opacity:0;transform:translate(-50%,-35%)}12%,75%{opacity:1;transform:translate(-50%,-50%)}100%{opacity:0;transform:translate(-50%,-65%)}}@media(prefers-reduced-motion:reduce){.clear-splash{animation:none}}
.tower-option{padding:12px 10px;gap:5px;min-height:135px}.tower-option>span:not(.tower-price):not(.shortcut){width:100%;min-width:0}.tower-option .tower-name{white-space:normal;overflow-wrap:normal;text-wrap:balance;line-height:1.3}.tower-price{padding:2px 3px 1px}.shortcut{top:6px;right:7px;font-size:10px}.tower-option img{flex-shrink:0}#tower-list{gap:10px}
@media(max-width:1000px){.tower-option{padding:11px 9px;min-height:128px}}@media(max-height:650px){.tower-option{padding:9px 8px;min-height:108px}}@media(max-width:650px){.tower-option{padding:9px 7px;min-height:108px}}
.tower-option .tower-name{min-height:2.6em;display:flex;align-items:center;justify-content:center}
.command-deck .arsenal{width:354px;padding:12px;gap:10px}#tower-list{gap:8px}.tower-option{min-height:104px;padding:10px 9px;gap:4px}.tower-option img{width:43px;height:43px}.tower-option .tower-name{min-height:0;font-size:16px;white-space:nowrap;line-height:1.25}.tower-price{font-size:16px;line-height:1.25;padding:2px 3px;display:flex;align-items:center;justify-content:center;gap:3px}.price-coin{font-size:1em;line-height:1;display:inline-block;color:#e7ca86}.wave-overlay{width:330px;padding:14px 18px}.wave-overlay .wave-number{font-size:26px}.wave-overlay h3{font-size:20px;margin-top:8px}.wave-overlay #next-desc{font-size:15px}.wave-overlay .tag{font-size:10px;margin-left:3px}.wave-overlay .wave-hint{font-size:12px!important;line-height:1.45}.keep-health{width:136px}.keep-health-label{font-size:20px;margin-bottom:6px}.keep-health-label strong{font-size:20px}.keep-health-label em{font-size:14px}.health-track{height:9px}
@media(max-width:1000px){.command-deck .arsenal{width:330px;padding:11px}.tower-option{min-height:100px;padding:9px 8px}.tower-option .tower-name{font-size:15px}.tower-price{font-size:15px}.tower-option img{width:40px;height:40px}.wave-overlay{width:310px}.wave-overlay .wave-number{font-size:24px}.wave-overlay h3{font-size:18px}.wave-overlay #next-desc{font-size:14px}}
@media(max-height:650px){.command-deck .arsenal{width:310px;padding:10px}.tower-option{min-height:88px;padding:8px}.tower-option img{width:32px;height:32px}.tower-option .tower-name,.tower-price{font-size:14px}.wave-overlay{padding:10px 14px}.wave-overlay .wave-number{font-size:22px}.wave-overlay h3{font-size:17px}.wave-overlay #next-desc{font-size:13px}.wave-overlay .wave-hint{font-size:10px!important}}
@media(max-width:650px){.command-deck .arsenal{width:280px;padding:8px}.tower-option .tower-name{font-size:13px!important}.tower-price{font-size:13px}.tower-option{min-height:87px;padding:8px 6px}.tower-option img{width:32px;height:32px}.wave-overlay{max-width:80vw;width:280px}.wave-overlay .wave-number{font-size:21px}.keep-health,.keep-health strong{font-size:18px}}
.arsenal>.send-next-wave{width:100%;margin-top:2px;min-height:40px;font-size:16px;padding:10px 12px}.arsenal>.send-next-wave span{font-size:11px}

.detail-actions .fully-upgraded{display:inline-flex;align-items:center;justify-content:center;border:1px solid #515256;border-radius:3px;line-height:normal;white-space:nowrap;cursor:default}.detail-actions{align-items:stretch}

/* The wave command stays above both the build and selected-tower views. */
.tower-command-stack{position:absolute;right:14px;bottom:14px;display:flex;flex-direction:column;gap:10px;pointer-events:auto}
.command-deck .tower-command-stack>.arsenal{position:static;flex-shrink:0;right:auto;bottom:auto}
.tower-command-stack>.send-next-wave{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;width:100%;min-height:54px;margin:0;padding:12px 14px;background:linear-gradient(140deg,#2b2c2fed,#191b1ef5);border:1px solid #73716a;box-shadow:0 5px 25px #0006,inset 0 1px #ffffff0c;border-radius:3px;text-align:left;line-height:1.2}
.tower-command-stack>.send-next-wave .send-wave-label{display:flex;align-items:center;font-size:16px;line-height:20px;color:#ebd6a7;letter-spacing:0}
.tower-command-stack>.send-next-wave strong{display:flex;align-items:center;justify-content:center;font-size:22px;line-height:24px;color:#f2dba6;font-variant-numeric:tabular-nums;font-weight:600}
.tower-command-stack>.send-next-wave .send-shortcut{display:flex;align-items:center;justify-content:center;align-self:center;line-height:20px;font-size:10px;letter-spacing:.5px;color:#c4bca7}
.tower-command-stack>.send-next-wave:disabled{opacity:.72;cursor:default}
@media(max-height:650px),(max-width:650px){.tower-command-stack{gap:8px}.tower-command-stack>.send-next-wave{gap:10px;min-height:46px;padding:10px 12px}.tower-command-stack>.send-next-wave .send-wave-label{font-size:14px}.tower-command-stack>.send-next-wave strong{font-size:20px}}

.keep-health{position:fixed;left:14px;top:14px;transform:none;width:220px;z-index:3;padding:12px 14px;background:rgba(28,29,32,.78);border:1px solid #87827a33;border-radius:3px;box-shadow:0 5px 24px #0003;text-align:left}
.keep-health-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.palace-health-name{font-size:12px;letter-spacing:1.8px;font-weight:700;color:#c7beaa}.keep-health-label strong{font-size:20px;line-height:1}.keep-health-label em{font-size:14px}.keep-health .health-track{height:13px;background:#14181be6;border:1px solid #b6bc8a45;border-radius:2px;overflow:hidden;box-shadow:inset 0 1px 3px #0006}.health-track>span{transition:width .2s,background .2s}
.command-deck>.minimap-panel::after{content:'';position:absolute;inset:0;border:1px solid rgba(211,205,180,.28);pointer-events:none;z-index:1}
@media(max-width:650px){.keep-health{width:170px;padding:10px;left:10px;top:10px}.palace-health-name{font-size:11px}.keep-health-label strong{font-size:18px}}

.minimap-tools{position:absolute;left:234px;bottom:10px;display:flex;flex-direction:column;gap:6px;pointer-events:auto;width:124px}
.minimap-tools>button{display:flex;align-items:center;gap:8px;min-height:39px;padding:8px 10px;background:rgba(28,29,32,.9);border:1px solid #87827a55;border-radius:3px;color:#ded8c7;font-size:13px;line-height:20px;text-align:left;box-shadow:0 3px 12px #0003}
.minimap-tools>button:hover{background:#3b3c40;border-color:#bca778}.minimap-tools>button[aria-pressed=true]{color:#e0b48e;border-color:#ae845b}
.minimap-tools svg{width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.minimap-tools .sound-slash{display:none}.minimap-tools [aria-pressed=true] .sound-waves{display:none}.minimap-tools [aria-pressed=true] .sound-slash{display:block}
.minimap-tools kbd{margin-left:auto;font:10px system-ui;color:#a7a497}.help-symbol{width:17px;text-align:center;font-size:17px;color:#dfc78f}.controls-help{position:absolute;left:0;bottom:calc(100% + 9px);width:290px;padding:15px;background:rgba(28,29,32,.97);border:1px solid #87827a66;border-radius:3px;box-shadow:0 5px 24px #0006}.controls-help .eyebrow{font-size:11px}.controls-help dl{display:grid;grid-template-columns:auto 1fr;gap:11px 16px;margin:15px 0 0;font-size:12px;line-height:1.4}.controls-help dt{color:#b5b5ad}.controls-help dd{margin:0;color:#e6d7b5;text-align:right}
@media(max-width:1000px){.minimap-tools{left:210px}}@media(max-height:650px){.minimap-tools{left:180px}}@media(max-width:650px){.minimap-tools{left:160px;width:110px}.minimap-tools>button{font-size:12px;padding:7px;gap:6px}.controls-help{width:260px;left:-150px}}
.end-card #again{gap:20px;align-items:center}.end-card #again .restart-shortcut{display:inline-flex;align-items:center;font-size:11px;line-height:1;letter-spacing:1px}
.command-deck>.minimap-panel::after{border:2px solid rgba(206,194,159,.75);box-shadow:inset 0 0 0 1px #1a2024cc}.palace-health-name{display:inline-flex;align-items:center;gap:8px}.palace-health-icon{display:block;width:25px;height:25px;flex-shrink:0;filter:drop-shadow(0 1px 2px #0006)}

.music-controls{padding:8px 9px;background:rgba(28,29,32,.92);border:1px solid #87827a55;border-radius:3px;box-shadow:0 3px 12px #0003;color:#ded8c7}.music-controls #music-mute{display:flex;align-items:center;gap:8px;padding:0;width:100%;min-height:23px;font-size:13px;line-height:20px;background:none;border:0;text-align:left}.music-controls #music-mute[aria-pressed=true]{color:#e0b48e}.music-slash{display:none}.music-controls [aria-pressed=true] .music-slash{display:block}.music-volume-row{display:flex;align-items:center;gap:6px;margin-top:6px;height:20px}.music-volume-row input{width:0;min-width:0;flex:1;margin:0;accent-color:#d1b879;cursor:pointer}.music-volume-row output{min-width:27px;text-align:right;font-size:10px;color:#c8bfaa;font-variant-numeric:tabular-nums}#music-status{font-size:10px;line-height:1.4;color:#bcb8a9;display:block;margin-top:5px}#music-status:empty{display:none}#choose-music{width:100%;padding:5px 0;margin-top:6px;background:#35363b;border:1px solid #686769;border-radius:2px;font-size:11px;color:#e3d4ad}

.resume-triangle{display:none}#pause-game[aria-pressed=true] .pause-bars{display:none}#pause-game[aria-pressed=true] .resume-triangle{display:block;fill:currentColor}.pause-screen{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);z-index:4;display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px 36px;background:rgba(28,29,32,.86);border:1px solid #c4b18355;border-radius:3px;pointer-events:none;box-shadow:0 8px 40px #0005;text-shadow:0 2px 5px #000}.pause-screen strong{font:36px Cinzel,Georgia,serif;letter-spacing:5px;color:#eee4cc}.pause-screen span{font-size:14px;color:#c4bfaf}.controls-help{max-height:calc(100vh - 330px);overflow-y:auto}

.game-paused .wave-splash,.game-paused .clear-splash{animation-play-state:paused!important}
#end.end-screen{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:16px;overflow:auto;backdrop-filter:blur(7px) saturate(.35);background:rgba(15,20,20,.88)}
#end[data-result=defeat]{background:radial-gradient(ellipse at 50% 43%,rgba(91,29,24,.65),rgba(20,9,12,.94) 75%);animation:defeatArrival .45s ease-out both}
#end .end-card{width:min(600px,92vw);max-width:600px;max-height:calc(100dvh - 32px);overflow:auto;padding:30px 44px 34px;border:1px solid #b37e6499;border-radius:4px;background:linear-gradient(145deg,rgba(47,31,32,.97),rgba(23,22,27,.98));box-shadow:0 20px 100px #000b,0 0 70px #a332221c;text-align:center;animation:defeatCardIn .5s ease-out both}
#end .end-emblem{width:55px;height:62px;display:block;margin:0 auto 16px;fill:#532d2c;stroke:#d39e7e;stroke-width:2}.end-emblem .defeat-crack{fill:none;stroke:#e7b08f;stroke-width:3;stroke-linejoin:round}
#end .eyebrow{display:block;font-size:13px;letter-spacing:2.5px;color:#dda88b}#end #end-title{font-size:clamp(50px,7vw,90px);line-height:1.1;letter-spacing:5px;font-weight:500;margin:16px 0 12px;color:#ffd2be;text-shadow:0 3px 25px #a7423b55}
#end .end-subtitle{font-size:18px;line-height:1.5;color:#e1c5b7;margin:0 0 10px}#end #end-copy{font-size:15px;line-height:1.7;color:#bcb8b2;margin:0 0 26px}#end #again{min-height:55px;font-size:17px;padding:15px 20px;justify-content:center}
#end[data-result=victory]{background:radial-gradient(ellipse at 50% 43%,#344233bf,#10191cf2 75%)}#end[data-result=victory] .end-card{background:linear-gradient(145deg,#26352bf7,#171d23fa);border-color:#cdb57d99}#end[data-result=victory] #end-title{color:#f2dfa8}#end[data-result=victory] .end-emblem{fill:#3d543f;stroke:#e0c58d}#end[data-result=victory] .defeat-crack{display:none}
@keyframes defeatArrival{from{opacity:0}to{opacity:1}}@keyframes defeatCardIn{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
@media(max-height:650px){#end .end-card{padding:20px 32px}#end .end-emblem{height:42px;margin-bottom:8px}#end #end-title{font-size:56px;margin:10px 0}#end .end-subtitle{font-size:16px}#end #end-copy{margin-bottom:16px}}
@media(prefers-reduced-motion:reduce){#end,#end .end-card{animation:none!important}}
.pause-screen{position:fixed;inset:0;left:0;top:0;transform:none;width:auto;z-index:20;display:grid;place-items:center;gap:0;padding:24px;overflow:auto;pointer-events:auto;background:rgba(25,26,29,.84);border:0;border-radius:0;box-shadow:none;backdrop-filter:blur(4px) saturate(.65);text-shadow:none}
.pause-panel{width:min(740px,94vw);max-height:calc(100dvh - 40px);overflow:auto;background:linear-gradient(145deg,rgba(43,44,48,.97),rgba(25,27,30,.98));border:1px solid #b6a17866;border-radius:4px;box-shadow:0 20px 80px #0008;padding:30px 36px}.pause-heading{text-align:center;padding-bottom:24px;border-bottom:1px solid #ffffff15;margin-bottom:25px}.pause-heading .eyebrow{font-size:12px;color:#c9b68c;letter-spacing:3px}.pause-heading h2{font:48px Cinzel,Georgia,serif;letter-spacing:5px;color:#eee3cb;margin:12px 0 0;line-height:1.1}.pause-menu-grid{display:grid;grid-template-columns:1fr 1.35fr;gap:36px;margin-bottom:28px}.pause-menu-grid h3{font-size:14px;letter-spacing:1px;color:#d4c6aa;margin:0 0 18px;font-weight:600}.pause-audio .music-controls{background:none;border:0;box-shadow:none;padding:0}.pause-audio .music-controls #music-mute,.pause-effects #mute-audio{font-size:15px;line-height:24px;color:#ddd9cd}.pause-audio svg{display:block;width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.pause-audio .music-volume-row{margin-top:12px;height:24px;gap:12px}.pause-audio .music-volume-row input{height:22px}.pause-audio .music-volume-row output{font-size:13px;min-width:35px}.pause-effects{margin-top:23px;padding-top:20px;border-top:1px solid #ffffff15}.pause-effects #mute-audio{display:flex;align-items:center;gap:9px;background:none;border:0;padding:0;width:100%;text-align:left}.pause-effects kbd{margin-left:auto;font:11px system-ui;color:#b8b4a8}.pause-effects .sound-slash{display:none}.pause-effects [aria-pressed=true]{color:#e0b48e!important}.pause-effects [aria-pressed=true] .sound-slash{display:block}.pause-effects [aria-pressed=true] .sound-waves{display:none}
.pause-controls dl{display:grid;grid-template-columns:auto 1fr;gap:12px 20px;margin:0;font-size:13px;line-height:1.4}.pause-controls dt{color:#babbb6}.pause-controls dd{margin:0;text-align:right;color:#e2d4b3}.pause-panel #resume-game{font-size:16px;min-height:51px;justify-content:center;gap:20px}.pause-panel #resume-game>span{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:3px 8px;border:1px solid rgba(35,32,22,.5);border-radius:4px;background:rgba(35,32,22,.08);color:#252319;font-size:13px;font-weight:700;line-height:1;letter-spacing:.7px}
@media(max-height:650px){.pause-panel{padding:20px 28px}.pause-heading{padding-bottom:14px;margin-bottom:18px}.pause-heading h2{font-size:38px}.pause-menu-grid{margin-bottom:20px}.pause-controls dl{gap:9px 16px}}
@media(max-width:650px){.pause-screen{padding:14px}.pause-panel{padding:22px}.pause-menu-grid{grid-template-columns:1fr;gap:25px}.pause-audio .music-volume-row{max-width:260px}.pause-heading h2{font-size:38px}}

.pause-actions{display:grid;grid-template-columns:1.5fr 1fr;gap:12px;align-items:stretch}
.pause-panel .pause-actions button{margin:0;width:100%;min-height:51px}
.pause-panel #restart-game{display:flex;align-items:center;justify-content:center;padding:12px 18px;border:1px solid #a799806b;border-radius:4px;background:#35363a;color:#eee4cf;font:600 16px "DM Sans",system-ui,sans-serif;cursor:pointer}
.pause-panel #restart-game:hover{background:#444449;border-color:#cbb486}
.pause-panel #restart-game:focus-visible{outline:2px solid #e1c482;outline-offset:3px}
@media(max-width:520px){.pause-actions{grid-template-columns:1fr}}

.upgrade-preview{margin:12px 0;padding:12px 0;border-top:1px solid #ffffff1f;border-bottom:1px solid #ffffff1f}.upgrade-preview h4{margin:0 0 10px;font-size:14px;font-weight:700;color:#dfcfaa}.upgrade-preview dl{display:grid;grid-template-columns:1fr auto;gap:7px 12px;margin:0;font-size:14px;line-height:1.4}.upgrade-preview dt{color:#c6c7c1}.upgrade-preview dd{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin:0;font-variant-numeric:tabular-nums}.upgrade-preview dd>span:first-child{color:#a5aba1}.upgrade-preview strong{color:#dfedc5}.upgrade-arrow{color:#b5a47b}.enemy-status-guide{margin:18px 0 0;padding-top:14px;border-top:1px solid #ffffff15;font-size:12px;line-height:1.6;color:#c7c8bf}.enemy-status-guide span{white-space:nowrap}.status-frost{color:#a3ddff}.status-venom{color:#aadc7b}.status-armor{color:#d1c3a4}.status-shield{color:#f1d583}

.wave-overlay .wave-hint{font-size:13px!important;line-height:1.45;margin:8px 0 0!important;color:#d8d4bc!important}

/* The campaign does not run behind its title screen. */
.menu-open .command-deck,.menu-open .wave-overlay,.menu-open .keep-health,.menu-open .toast,.menu-open .wave-splash,.menu-open .clear-splash{visibility:hidden;pointer-events:none}
.main-menu{position:fixed;inset:0;z-index:40;display:flex;align-items:center;padding:clamp(30px,5vh,70px) clamp(32px,7vw,130px);background:linear-gradient(90deg,rgba(20,22,24,.98) 0%,rgba(20,22,24,.93) 30%,rgba(20,22,24,.67) 52%,rgba(20,22,24,.12) 82%,rgba(20,22,24,.35));overflow:auto}
.menu-content{width:min(540px,100%);margin-block:auto;color:#eee7d6}.menu-kicker{font:600 12px "DM Sans",system-ui;letter-spacing:3.6px;color:#beac82}.main-menu h1{font-family:Cinzel,Georgia,serif;font-size:clamp(48px,5.5vw,84px);font-weight:500;letter-spacing:3px;line-height:1.15;color:#e5d09b;margin:18px 0 12px;text-shadow:0 3px 25px #0008}.menu-subtitle{font:400 24px Cinzel,Georgia,serif;color:#eee5d0;margin:0 0 20px}.menu-intro{font-size:17px;color:#bfc5bc;line-height:1.65;margin:0 0 28px}
.menu-milestones{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:27px}.menu-milestones>div{border-top:1px solid #bda5774d;padding:12px 0 0}.menu-milestones strong{display:block;font:400 27px Cinzel,Georgia,serif;color:#d2c29c}.menu-milestones span{font-size:9px;letter-spacing:1px;color:#a8ae9f;white-space:nowrap}.menu-milestones .final-milestone{border-color:#b9654f}.final-milestone strong{color:#eeaa82}.final-milestone span{color:#d4a787}
.menu-play{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:66px;padding:17px 23px;border:1px solid #e2cb91;border-radius:3px;background:linear-gradient(110deg,#d6bc7d,#b99a60);color:#26271f;font:700 19px "DM Sans",system-ui;cursor:pointer;box-shadow:0 5px 28px #0004}.menu-play:hover{background:linear-gradient(110deg,#e7cf96,#c9ac75)}.menu-play kbd{border:1px solid #51452866;border-radius:3px;padding:5px 7px;font:700 11px "DM Sans",system-ui;color:#4a432f}.menu-links{display:flex;align-items:center;justify-content:center;gap:17px;margin:18px 0;color:#736e60}.menu-links button{border:0;background:transparent;color:#d1cab6;padding:5px 8px;font:500 15px "DM Sans",system-ui;cursor:pointer}.menu-links button:hover,.menu-links button[aria-expanded=true]{color:#f2dfaf}
.menu-subpanel{padding:17px 20px;border:1px solid #c8af7540;border-radius:3px;background:#292b2de8;margin:10px 0 18px}.menu-subpanel h2{font-size:17px;margin:0 0 12px;color:#ead9b2}.menu-subpanel ol{padding-left:20px;margin:0;font-size:14px;line-height:1.6;color:#c5c9bd}.menu-subpanel li+li{margin-top:7px}.menu-subpanel p{font-size:13px;line-height:1.8;color:#b1b9ab;margin:14px 0 0}.menu-subpanel strong{font-weight:600;color:#d6d5c4}.menu-sound-buttons{display:flex;gap:10px;margin-bottom:15px}.menu-sound-buttons button{background:#383b3b;border:1px solid #8c8a7359;border-radius:3px;color:#e5dfc9;padding:9px 14px;font-size:14px;cursor:pointer}.menu-subpanel label{display:flex;justify-content:space-between;font-size:14px;color:#c8c9ba}.menu-subpanel input[type=range]{width:100%;height:26px;accent-color:#d2ba83;margin-top:9px}.menu-footer{text-align:center;font-size:12px;color:#929b8b;letter-spacing:.4px;margin:24px 0 0}.menu-footer span{padding:0 9px;color:#6a7365}
.main-menu button:focus-visible,.main-menu input:focus-visible{outline:2px solid #e7cb8f;outline-offset:4px}.pause-panel #return-menu{grid-column:1/-1;min-height:35px;background:none;border:0;color:#c5bda9;font-size:14px;cursor:pointer;padding:5px}.pause-panel #return-menu:hover{color:#f4dfae}.end-menu{margin-top:15px;border:0;background:transparent;color:#d3c4a3;padding:10px 20px;font-size:15px;cursor:pointer}
@media(max-height:740px){.main-menu{padding-block:25px}.main-menu h1{margin-top:10px;font-size:60px}.menu-subtitle{font-size:21px;margin-bottom:14px}.menu-intro{margin-bottom:18px;font-size:15px}.menu-milestones{margin-bottom:18px}.menu-footer{margin-top:18px}.menu-subpanel{padding:12px 17px}}
@media(max-width:700px){.main-menu{justify-content:center;background:rgba(20,22,24,.92);padding:25px}.menu-content{width:min(480px,100%)}.main-menu h1{font-size:clamp(40px,10vw,64px)}.menu-intro{font-size:15px}.menu-milestones span{font-size:8px;letter-spacing:.4px}}
/* Tower menus grow with their contents; neither view has an internal scroll area. */
.command-deck .tower-command-stack>.arsenal,
.command-deck .arsenal.inspecting{max-height:none;overflow:visible}
.command-deck .arsenal .details{min-height:0;max-height:none;overflow:visible;padding:0}
.command-deck .arsenal .detail-actions{display:flex;flex-wrap:nowrap;align-items:stretch;gap:8px}
.command-deck .arsenal .upgrade-button{flex:1;min-width:0}
.command-deck .arsenal .sell-button{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}
@media(max-height:800px){
 .command-deck .arsenal.inspecting{width:380px;padding:10px;gap:8px}
 .arsenal.inspecting .tower-wallet{padding-bottom:7px}
 .arsenal.inspecting .details h3{font-size:23px;margin:6px 0 8px}
 .arsenal.inspecting .details .stat-row{padding:7px 0;margin-bottom:8px}
 .arsenal.inspecting .details p{font-size:13px;line-height:1.4}
 .arsenal.inspecting .upgrade-preview{margin:9px 0;padding:9px 0}
 .arsenal.inspecting .upgrade-preview h4{margin-bottom:7px}
 .arsenal.inspecting .upgrade-preview dl{gap:4px 12px;font-size:13px}
 .arsenal.inspecting .detail-actions{margin-top:9px}
 .arsenal.inspecting .detail-actions>*{padding:10px;font-size:13px}
}
@media(max-height:600px){
 .command-deck .arsenal.inspecting{width:min(540px,calc(100vw - 28px))}
 .arsenal.inspecting .details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:18px;align-items:start}
 .arsenal.inspecting .details>.eyebrow,.arsenal.inspecting .details>h3,.arsenal.inspecting .details>.stat-row,.arsenal.inspecting .details>p{grid-column:1}
 .arsenal.inspecting .details>.upgrade-preview{grid-column:2;grid-row:1 / span 4;margin:0;padding:0;border:0}
 .arsenal.inspecting .details>.detail-actions,.arsenal.inspecting .details>.build-hint{grid-column:1/-1}
 .arsenal.inspecting .details h3{font-size:20px}
 .arsenal.inspecting .details .stat-row strong{font-size:20px}
 .arsenal.inspecting .details .eyebrow{font-size:10px}
}

/* Keep the full game title readable within the existing main menu. */
.main-menu h1 .title-lead{display:block;font-size:.39em;letter-spacing:.14em;line-height:1.3;margin-bottom:.15em}
