@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#100e14;--panel:#211b22;--line:#ffffff16;--text:#f3eade;--muted:#b2a8a7;--cyan:#dba16e;--pink:#e7a17f;--gold:#ddb387}*{box-sizing:border-box}body{margin:0;background:linear-gradient(90deg,#100e14ee,#100e14aa),url('inferno.webp') center top/cover fixed,var(--bg);color:var(--text);font:16px Inter,Arial,sans-serif}main{max-width:1536px;margin:auto;padding:32px 44px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;min-height:58px}.brand{display:flex;align-items:center;gap:15px;text-decoration:none;color:var(--text);font:500 27px Cinzel,Georgia,serif;letter-spacing:1px}.brand b{font-weight:500;color:var(--gold)}.brand-icon{font:42px Georgia;color:var(--gold);text-shadow:0 0 28px #efab5650}.brand small{display:block;font:10px Inter,sans-serif;letter-spacing:4px;color:#c2a584;margin-top:6px}.header-right{display:flex;align-items:center;gap:24px}.sector{font:14px Cinzel,Georgia;color:#dbc3a8}.ghost{border:1px solid #b4997736;background:#2b232acc;color:#e5d8cc;padding:12px 17px}button{font:500 14px Inter,Arial;cursor:pointer;border-radius:9px;transition:background .2s,box-shadow .2s,transform .15s}button:hover:not(:disabled){filter:brightness(1.15);box-shadow:0 0 20px #e5ae5414}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,canvas:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.status{display:flex;gap:0;padding:20px 26px;margin-bottom:24px;background:linear-gradient(110deg,#342a2ad9,#19171fe6);border:1px solid #d1b38622;border-radius:14px;box-shadow:0 10px 35px #0002;backdrop-filter:blur(16px)}.status>div{min-width:132px;padding:0 27px;border-right:1px solid var(--line)}.status>div:first-child{padding-left:0}.status>div:last-child{border:0}.label{display:block;font-size:11px;color:#bca994;letter-spacing:1.6px;margin-bottom:8px}strong{font:500 31px Cinzel,Georgia;line-height:1.2}strong small{font:17px Inter;color:#a49591}.pink{color:var(--pink)}.gold{color:var(--gold)}.cyan{color:var(--cyan)}.status .wave-status{margin-left:auto;min-width:0;text-align:right;padding-right:0;display:flex;flex-direction:column;justify-content:center}.wave-status .label{color:#e7c692}#phaseNote{font-size:13px;color:var(--muted)}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 292px;gap:25px}.arena{min-width:0}.arena-top{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(110deg,#30262c,#211c25);padding:17px 20px;border:1px solid #bda57e30;border-radius:14px 14px 0 0}.arena-top span:first-child{font:500 17px Cinzel,Georgia;color:#ecd3aa}.arena-top span:last-child{font-size:12px;color:#baa79b}.arena-top i{display:none}.canvas-wrap{position:relative;border:1px solid #bda57e28;border-top:0;border-bottom:0;background:#0c0910;overflow:hidden}.canvas-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:3/2;cursor:crosshair;touch-action:manipulation;image-rendering:auto}.arena-bottom{display:flex;align-items:center;gap:22px;background:#211b24;padding:13px 18px;border:1px solid #bda57e28;border-radius:0 0 14px 14px;font-size:12px;color:#b8aaa6}.tip{margin-left:auto;color:#c8bcae}.controls{display:flex;gap:10px;margin-top:17px}.primary{background:linear-gradient(130deg,#efd5a5,#d7a968);border:1px solid #efcb8e;color:#37251b;padding:16px 22px;font-weight:700;box-shadow:0 5px 24px #da985d16}#start{display:flex;justify-content:space-between;flex:1}.section-title{display:flex;justify-content:space-between;align-items:center}h2{font:500 21px Cinzel,Georgia;margin:0}.section-title>span{font-size:11px;color:#b9a080}.muted{font-size:13px;line-height:1.65;color:var(--muted);margin:9px 0 18px}.tower-card{display:flex;align-items:center;gap:12px;width:100%;padding:17px 13px;margin-bottom:11px;text-align:left;background:linear-gradient(125deg,#30272de8,#1e1b23ed);border:1px solid #c0a68122;color:var(--text)}.tower-card.active{border-color:var(--tower);box-shadow:inset 0 0 24px color-mix(in srgb,var(--tower) 6%,transparent),0 0 22px #0002}.tower-symbol{color:var(--tower);width:42px;height:46px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--tower) 9%,transparent);border:1px solid color-mix(in srgb,var(--tower) 22%,transparent);border-radius:50% 50% 40% 40%;font-size:27px;text-shadow:0 0 20px var(--tower)}.tower-copy{flex:1}.tower-copy b{font:500 14px Cinzel,Georgia;display:block;margin-bottom:6px}.tower-copy small{font:12px Inter;color:var(--muted)}.price{font-size:14px;color:var(--gold)}.lore-art{height:124px;border:1px solid #b59a7726;border-radius:10px;background:linear-gradient(0deg,#17121ee8,transparent 85%),url('inferno.webp') 83% 34%/cover;display:flex;align-items:flex-end;padding:13px;margin:18px 0}.lore-art span{font:13px Cinzel,Georgia;color:#eed5b0}.selection{padding-top:17px;border-top:1px solid var(--line);margin-top:18px}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#b99c7d}h3{font:500 17px Cinzel,Georgia;margin:11px 0}.selection p{font-size:13px;line-height:1.75;color:var(--muted)}.selection .actions{display:flex;gap:7px;margin-top:13px}.selection button{padding:11px 10px;font-size:12px}.notice{padding:13px 15px;background:#8c6c3420;border:1px solid #c39a6230;border-radius:8px;color:#e1caaa;font-size:12px;line-height:1.7;margin-top:19px}.wave-info{padding-top:19px}.wave-info p{font-size:14px;margin:9px 0}.wave-info small{font-size:12px;color:var(--muted)}footer{display:flex;justify-content:space-between;gap:16px;margin-top:25px;color:#a39287;font-size:11px;line-height:1.7}footer span:first-child{font-family:Cinzel,Georgia;letter-spacing:.5px}.view-controls{position:absolute;top:14px;right:14px;display:flex;gap:5px}.view-controls button{min-width:38px;min-height:38px;padding:8px;color:#e3ccb2;background:#211b24dc;border:1px solid #c2a4773d;backdrop-filter:blur(10px);font-size:13px}.view-controls button:nth-child(2){color:var(--gold)}#speed{min-width:58px;font-size:18px;color:var(--gold)}#pauseBadge{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:20px 28px;background:#1b1524e8;border:1px solid #c6a57660;border-radius:10px;font:18px Cinzel,Georgia;letter-spacing:2px;pointer-events:none}#overlay{position:absolute;inset:0;background:#170f1ae6;backdrop-filter:blur(9px);align-items:center;justify-content:center;text-align:center;padding:24px}#overlay:not([hidden]){display:flex}h1{font:500 clamp(27px,4vw,52px) Cinzel,Georgia;color:#f0d6a9;margin:17px 0}#overlay p{font-size:15px;color:#c9bab2;line-height:1.8;max-width:450px}dialog{max-width:400px;background:#241c26;color:var(--text);border:1px solid #c4a47655;border-radius:13px;padding:28px}dialog::backdrop{background:#100916c9}dialog p{font-size:14px;color:var(--muted);line-height:1.6;margin:20px 0}dialog>div{display:flex;gap:10px}@media(min-width:1400px){main{padding-top:40px}.game-layout{grid-template-columns:minmax(0,1fr) 310px}}@media(max-width:1100px){main{padding:24px}.status>div{min-width:110px;padding:0 20px}.game-layout{grid-template-columns:minmax(0,1fr) 265px;gap:20px}.sector{display:none}.status .wave-status{display:none}.lore-art{height:105px}.tower-copy b{font-size:13px}}@media(max-width:760px){main{padding:20px 12px}header{margin-bottom:22px}.brand{font-size:22px;gap:9px}.brand-icon{font-size:32px}.brand small{font-size:9px;letter-spacing:3px}.header-right .ghost{font-size:12px;padding:10px}.status{padding:15px 13px;justify-content:space-between;margin-bottom:17px}.status>div{padding:0 13px;min-width:0}.status>div:nth-child(4){border:0;padding-right:0}.label{font-size:9px;letter-spacing:1px}strong{font-size:24px}strong small{font-size:13px}.game-layout{grid-template-columns:1fr;gap:24px}.arena-top{padding:14px}.arena-top span:first-child{font-size:15px}.arena-top span:last-child{font-size:10px}.canvas-wrap canvas{aspect-ratio:1.2}.view-controls{top:8px;right:8px}.view-controls button{min-width:34px;min-height:34px;padding:6px}.arena-bottom{font-size:10px;padding:12px;gap:12px}.controls{gap:7px;margin-top:13px}.controls .ghost{padding:12px}.primary{padding:15px}#shop{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tower-card{display:block;text-align:center;padding:13px 4px;margin:0}.tower-symbol{margin:auto;width:42px;height:42px}.tower-copy b{font-size:12px;margin:11px 0 7px}.tower-copy small{display:block;font-size:10px;min-height:24px}.price{display:block;margin-top:8px;font-size:13px}.lore-art{display:none}.selection{margin-top:20px}.wave-info{display:none}footer{font-size:10px}footer span:last-child{display:none}}

.ranking-link{color:#eac5a2;font-size:14px;text-decoration:none}.entry-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(110deg,#130c14ef,#190d16c9),url('inferno.webp') 75% center/cover;backdrop-filter:blur(6px);z-index:3}.entry-overlay[hidden]{display:none}.entry-overlay form{max-width:430px;width:100%;text-align:left}.entry-overlay h1{font-size:clamp(26px,3.3vw,43px);margin:12px 0}.entry-overlay p{font-size:14px;line-height:1.7;color:#c7b8b5}.entry-overlay label{display:block;font-size:14px;margin:18px 0 9px}.entry-overlay input{width:100%;background:#1e151ce8;border:1px solid #b3826266;border-radius:8px;color:#f7e2d0;font:16px Inter,Arial;padding:14px;outline-offset:3px}.entry-overlay .primary{width:100%;margin-top:12px}.entry-overlay a{font-size:13px;color:#d9b494}#nameError{min-height:22px;color:#f4b39d;margin:9px 0}.run-stats{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;padding:14px 4px 0;font-size:12px;color:#b7a39b}.run-stats b{color:#f2d9c1;margin-left:5px}.run-stats span:first-child b{display:inline-block;max-width:130px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.leaderboard{margin-top:36px;border:1px solid #ae78543b;border-radius:14px;background:#1c141ded;padding:26px;scroll-margin-top:20px}.leaderboard-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.leaderboard h2{margin-top:9px;font-size:25px}#leaderboardStatus{color:#bfaaa2;font-size:13px;line-height:1.6}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:14px;text-align:left}th{color:#b89983;font-size:12px;font-weight:500;padding:14px 12px;border-bottom:1px solid #ffffff18}td{padding:15px 12px;border-bottom:1px solid #ffffff0b;white-space:nowrap}td:nth-child(3){color:#e9bb84;font-weight:700}tbody tr:first-child{background:#d1984610}.score-rules{border-top:1px solid #ffffff14;margin-top:20px;padding-top:18px;font-size:14px}.score-rules summary{cursor:pointer;color:#e0baa0}.score-rules p{font-size:13px;color:#bdaca6;line-height:1.8;max-width:900px}.final-score{display:flex;align-items:baseline;justify-content:center;gap:10px;margin:12px 0}.final-score strong{font-size:42px;color:#efb97a}.final-score span{color:#bca597}#scoreBreakdown{font-size:12px!important}#saveStatus{font-size:13px!important}#overlay>div{max-height:100%;overflow-y:auto}#retryScore{margin:6px}footer{max-width:100%;line-height:1.7}footer span:first-child{font:11px Inter,Arial;max-width:500px}@media(max-width:760px){.entry-overlay{padding:18px}.entry-overlay h1{font-size:25px}.entry-overlay p{font-size:12px;margin:9px 0}.entry-overlay label{margin:10px 0 7px;font-size:12px}.entry-overlay input{padding:10px}.entry-overlay .primary{padding:12px}.entry-overlay .eyebrow{font-size:9px}.brand{font-size:18px;letter-spacing:0}.brand small{font-size:8px}.header-right{gap:9px}.ranking-link{font-size:12px}.header-right .ghost span{display:none}.leaderboard{padding:18px 12px}.leaderboard h2{font-size:19px}.leaderboard .eyebrow{font-size:9px}.leaderboard-heading .ghost{padding:10px;font-size:12px}.run-stats{font-size:11px;gap:7px}.final-score strong{font-size:30px}#overlay{padding:16px}.canvas-wrap canvas{aspect-ratio:1.05}#endTitle{font-size:23px}#endText{font-size:12px}}
.boss-guide{margin-top:20px;padding:15px;background:linear-gradient(130deg,#3c202633,#1c1923);border:1px solid #94544950;border-radius:9px;font-size:13px;color:#d7b697}.boss-guide summary{cursor:pointer;font-family:Cinzel,Georgia;line-height:1.5}.boss-guide p{font-size:12px;color:#bcaead;line-height:1.7;margin-bottom:0}.boss-guide b{color:#e4c5aa}#bossHud{position:absolute;bottom:17px;left:5%;width:90%;padding:12px 16px;background:linear-gradient(90deg,#190c17ed,#2e1521ed,#190c17ed);border:1px solid #cb7e5c66;border-radius:6px;pointer-events:none;box-shadow:0 8px 35px #0008,inset 0 0 24px #a93a1418}#bossHud[hidden]{display:none}.boss-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px}.boss-heading>span{font:600 18px Cinzel,Georgia;letter-spacing:2px;color:#ecc3a0}.boss-heading small{font:9px Inter;letter-spacing:2px;display:block;margin-top:4px;color:#b6958c}.boss-heading strong{font:12px Inter;color:#d8b7a1}.boss-health{height:9px;background:#090811;border-radius:3px;overflow:hidden;box-shadow:inset 0 1px 4px #0008}.boss-health>span{display:block;height:100%;background:linear-gradient(90deg,#6f2235,#d76b54,#fac890);transition:width .18s linear;box-shadow:0 0 15px #ef8d63}.boss-elements{display:flex;gap:13px;align-items:center;margin-top:9px;font-size:9px;letter-spacing:.6px;color:#8f7e88}.boss-elements span.charged{color:#edc8ef;text-shadow:0 0 10px #b995ef}.boss-elements b{margin-left:auto;font-size:9px;color:#bdaa9a}#bossHud.exposed{border-color:#dcb4ef;box-shadow:0 0 24px #9b5fa438}#bossHud.exposed .boss-health>span{background:linear-gradient(90deg,#69548e,#c695df,#edd1ff)}.arena{filter:drop-shadow(0 12px 25px #08060c55)}.canvas-wrap{box-shadow:inset 0 0 60px #0005}.primary{background:linear-gradient(120deg,#f1d4ac,#ce9467);box-shadow:0 4px 22px #da855d20}.tower-card{background:linear-gradient(130deg,#3b2c35ed,#201a25f5)}@media(max-width:760px){#bossHud{bottom:10px;left:3%;width:94%;padding:9px 10px}.boss-heading>span{font-size:14px;letter-spacing:1px}.boss-heading strong{font-size:10px}.boss-elements{gap:8px;font-size:8px}.boss-elements b{font-size:8px}.boss-heading small{font-size:8px}.boss-guide{margin-top:18px}}
.bestiary{margin-top:18px;border:1px solid #8e706448;border-radius:9px;padding:14px;background:#241c26cf}.bestiary summary{font:13px Cinzel,Georgia;color:#dbc0a8;cursor:pointer}.bestiary ul{padding-left:17px;color:#bfb0aa;font-size:12px;line-height:1.7}.bestiary li{margin:9px 0}.bestiary b{color:#edcfad}.bestiary p{font-size:12px;line-height:1.7;color:#b9a9a5}.tower-card{padding-top:14px;padding-bottom:14px}.lore-art{height:102px}.arena-top{background:linear-gradient(110deg,#362732,#211d2a)}@media(max-width:760px){#shop{grid-template-columns:repeat(2,minmax(0,1fr))}.tower-card{display:flex;text-align:left;gap:10px;padding:12px 9px}.tower-symbol{flex:0 0 34px;height:38px;width:34px;font-size:24px;margin:0}.tower-copy b{font-size:12px;margin:2px 0 5px}.tower-copy small{font-size:10px;min-height:0}.price{font-size:12px;margin-top:0}.bestiary{margin-top:17px}}
@media(max-width:760px){.tower-card{padding-bottom:27px}.tower-card .price{position:absolute;right:9px;bottom:9px}.tower-copy{min-width:0}.tower-copy small{white-space:normal;line-height:1.4}}
.repair-controls{margin:16px 0}.repair-controls button{width:100%;padding:12px}.repair-controls .muted{font-size:14px;line-height:1.5}.field-guide{margin:48px 0 30px}.field-guide>h2,.wave-codex h2{font-family:Cinzel,Georgia,serif;font-size:26px;margin:18px 0}.field-guide>p,.wave-codex p{font-size:16px;line-height:1.7;color:#c1b4b8}.tower-codex{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0 40px}.codex-card{background:#17121e;border:1px solid #584452;border-radius:12px;overflow:hidden;padding:20px}.codex-card h3{font-family:Cinzel,Georgia,serif;font-size:19px;color:#f0d0ad;margin:0 0 12px}.codex-card p{font-size:15px;line-height:1.65;color:#c2b5bc;margin:0 0 18px}.upgrade-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.upgrade-gallery figure{margin:0;min-width:0}.upgrade-gallery img{width:100%;height:auto;display:block;border-radius:8px}.upgrade-gallery figcaption{display:flex;flex-direction:column;gap:6px;padding-top:10px;color:#baaeb8;font-size:14px;line-height:1.4}.upgrade-gallery b{color:#ecceb0}.monster-codex{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.monster-card{padding:0}.monster-card img{display:block;width:100%;height:auto}.monster-card>div{padding:18px}.monster-card .eyebrow{font-size:12px}.monster-card h3{margin-top:10px}.wave-codex{margin-top:28px;padding:24px;background:#211822;border:1px solid #584452;border-radius:12px}.wave-codex h3{font-size:19px;color:#e7c39e}@media(max-width:1000px){.monster-codex{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.tower-codex{grid-template-columns:1fr}.codex-card{padding:14px}.monster-card{padding:0}.upgrade-gallery{gap:7px}.upgrade-gallery figcaption{font-size:13px}.field-guide>h2{font-size:23px}}@media(max-width:400px){.monster-codex{grid-template-columns:1fr}}
.canvas-wrap canvas{cursor:default;touch-action:pan-y pinch-zoom}.tower-thumbnail{object-fit:cover;border-radius:8px;background:#18121d;flex-shrink:0}.tower-card.active{outline:2px solid var(--tower);outline-offset:-2px}#mobileTowerTray:empty,#mobileSelection:empty{display:none}#touchPlacement:not([hidden]){display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px;background:#27212e;border:1px solid #aa9873}#touchPlacementText{flex:1 1 150px;font-size:14px;color:#f2d9b7}#touchPlacement button{min-height:44px;padding:10px 14px}#mobileSelection .selection{padding:14px;margin:0;background:#211b27;border:1px solid #574554}#mobileSelection .selection .eyebrow,#mobileSelection .selection>p.muted{display:none}#mobileSelection .selection p{margin:7px 0;font-size:14px}#mobileSelection .selection button{min-height:44px;font-size:14px}#mobileSelection .selection>button{margin:8px 6px 0 0}
@media(max-width:760px){main{padding:12px 8px}header{margin-bottom:12px}.brand{font-size:18px}.brand small{font-size:8px}.brand-icon{display:none}.ranking-link{font-size:12px}.header-right{gap:10px}.status{padding:10px;margin-bottom:10px}.status strong{font-size:22px}.status .label{margin-bottom:4px}.arena-top{padding:10px}.arena-top span:last-child{display:none}#mobileTowerTray{padding:10px 0;background:#17121c}#mobileTowerTray #shop{display:flex;overflow-x:auto;gap:8px;padding:3px 8px 9px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}#mobileTowerTray .tower-card{position:relative;flex:0 0 120px;min-height:105px;display:grid;grid-template-columns:34px 1fr;gap:6px;padding:9px;text-align:left;scroll-snap-align:start}#mobileTowerTray .tower-thumbnail{width:34px;height:40px;margin:0}#mobileTowerTray .tower-copy b{font:500 14px Inter,Arial;line-height:1.2;margin:0}#mobileTowerTray .tower-copy small{display:none}#mobileTowerTray .price{font-size:14px;bottom:9px;right:10px}.canvas-wrap canvas{aspect-ratio:1.22!important}.view-controls{gap:4px;right:6px;top:6px}.view-controls button{min-height:42px;min-width:38px}.controls{position:sticky;bottom:0;z-index:2;background:#17121df2;padding:8px 0;margin-top:8px}.controls button{min-height:48px}.game-layout{gap:14px}.game-layout aside>.section-title,.game-layout aside>.muted{display:none}.wave-info{display:block}.arena-bottom{padding:8px}.arena-bottom .tip{display:none}.repair-controls{margin-top:0}.run-stats{flex-wrap:wrap}.entry-overlay{padding:16px}.entry-overlay h1{font-size:25px}.entry-overlay p{font-size:13px;line-height:1.45}.entry-overlay label{margin-top:8px}.entry-overlay input{padding:11px}.entry-overlay #nameError:empty{display:none}}
@media(max-height:550px) and (orientation:landscape) and (max-width:1000px){main{padding:8px}header,.status{margin-bottom:8px}.canvas-wrap canvas{aspect-ratio:2!important}.entry-overlay form{max-width:600px}.entry-overlay h1{font-size:23px;margin:0}.entry-overlay p{margin:5px 0}.entry-overlay label{margin:4px 0}.entry-overlay input{padding:8px}.entry-overlay .primary{padding:10px}}
@media(max-width:760px){.canvas-wrap:has(.entry-overlay:not([hidden])){min-height:430px}.canvas-wrap:has(#overlay:not([hidden])){min-height:520px}.entry-overlay,#overlay{overflow-y:auto}.entry-overlay form{padding:6px 0}}@media(max-width:380px){.brand small{display:none}.header-right{gap:6px}.ranking-link{font-size:11px}.brand{font-size:17px}}
.mobile-map-name,.mobile-map-help{display:none}
@media(max-width:760px){.mobile-map-name{display:block;flex:1 0 100%;font:500 14px Cinzel,Georgia;color:#edcfac;margin-bottom:8px}.status{flex-wrap:wrap;row-gap:0;border-radius:10px}.status>div:first-of-type{padding-left:0}.status>div{flex:1;min-width:0;padding:0 9px}.status>div:nth-of-type(4){border:0;padding-right:0}.arena-top{display:none}.mobile-map-help{display:block;margin:0;padding:5px 8px 8px;background:#17121c;font-size:12px;line-height:1.4;color:#c2b4bd}.canvas-wrap{border-top:1px solid #bda57e28}.canvas-wrap canvas{touch-action:none;aspect-ratio:1!important;user-select:none;-webkit-user-select:none}#mobileTowerTray{padding:5px 0 0}#mobileTowerTray #shop{gap:7px;padding:3px 6px 7px}#mobileTowerTray .tower-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex:0 0 104px;min-height:0;gap:4px;padding:7px 6px;text-align:center;overflow:hidden}#mobileTowerTray .tower-thumbnail{display:block;flex:none;width:76px;height:76px;object-fit:cover;border:none;border-radius:8px}#mobileTowerTray .tower-copy{flex:none;width:100%;min-width:0}#mobileTowerTray .tower-copy b{display:block;font:500 14px/1.2 Inter,Arial;margin:0;white-space:normal;overflow-wrap:anywhere;min-height:34px}#mobileTowerTray .tower-card .price{position:static;display:block;margin:0;font-size:14px;line-height:1.2;color:#f0ce97}#mobileTowerTray .tower-copy small{display:none}.view-controls{top:6px}.game-layout{gap:10px}}
.status>div:first-of-type{padding-left:0}@media(max-width:760px){.status>div:nth-of-type(3){border-right:1px solid var(--line);padding-right:9px}}@media(pointer:coarse){.canvas-wrap canvas{touch-action:none}}
#breachAlert{position:absolute;top:56px;left:50%;transform:translateX(-50%);z-index:4;max-width:90%;width:max-content;padding:12px 18px;border:1px solid #ff7c76;border-radius:10px;background:#4c1724ee;color:#ffe4dc;font-weight:700;font-size:16px;text-align:center;pointer-events:none;box-shadow:0 0 28px #ed493f44}.life-lost{color:#ff7771!important;text-shadow:0 0 16px #ff5b51}.canvas-wrap:has(#breachAlert:not([hidden])){outline:2px solid #e6655d;outline-offset:-2px}
@media(max-width:760px){#mobileTowerTray .tower-card{gap:2px;padding:5px 6px;align-self:flex-start}#mobileTowerTray .tower-copy b{min-height:0;line-height:1.1}#mobileTowerTray .tower-card .price{margin:0;line-height:1.1}#mobileTowerTray #shop{align-items:flex-start;padding-bottom:5px}.view-controls button:not(#cameraReset){display:none}.view-controls #cameraReset{font-size:24px;min-width:44px;min-height:44px;padding:4px}.canvas-wrap canvas{height:min(100vw,calc(100dvh - 245px));min-height:220px;aspect-ratio:auto!important}#touchPlacement:not([hidden]){position:fixed;z-index:20;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));border-radius:12px;box-shadow:0 -6px 30px #0008;background:#29202ff5;padding:10px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}#touchPlacementText{font-size:13px;line-height:1.3;min-width:0}#touchPlacement button{min-height:44px;padding:9px 12px}.arena:has(#touchPlacement:not([hidden])) .controls{visibility:hidden}#breachAlert{font-size:14px;top:54px;padding:10px 13px}}
@media(prefers-reduced-motion:no-preference){.life-lost{animation:life-alert .45s ease-in-out 3}@keyframes life-alert{50%{opacity:.45}}}
@media(max-width:760px){.arena{filter:none}}
.close-tower{display:none}@media(max-width:760px){#mobileSelection{display:none}#mobileSelection.sheet-open{display:block;position:fixed;z-index:19;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));max-height:46dvh;overflow-y:auto;border-radius:14px;box-shadow:0 -8px 35px #0009;background:#251d2cf5;border:1px solid #b79a74}#mobileSelection .selection{position:relative;padding:14px;border:0;background:transparent}#mobileSelection .selection>h3{margin:0 40px 7px 0;font-size:18px}#mobileSelection .selection .eyebrow{display:block;font-size:12px;margin-bottom:5px}#mobileSelection .selection .close-tower{display:block;position:absolute;right:8px;top:6px;width:44px;height:44px;margin:0;font-size:26px;line-height:1;padding:0}#mobileSelection .selection>p{font-size:13px;line-height:1.4;margin:6px 0}#mobileSelection .selection .actions{margin-top:8px;display:grid;grid-template-columns:1fr 1fr}#mobileSelection .selection .actions button{font-size:14px;min-height:46px}#mobileSelection .selection>button:not(.close-tower){display:inline-block;width:calc(50% - 5px);min-height:46px;margin:7px 5px 0 0}#mobileSelection .selection>button:last-child{margin-right:0}.arena:has(#mobileSelection.sheet-open) .controls{visibility:hidden}}
.brand{gap:13px;align-items:center}.brand-emblem{display:block;flex:none;width:58px;height:64px;filter:drop-shadow(0 0 9px #d657303f)}.brand-wordmark{display:flex;flex-direction:column;align-items:flex-start;line-height:1}.brand-overline{font:600 12px Cinzel,Georgia,serif;letter-spacing:5px;color:#c7a993;padding-left:3px;margin-bottom:2px}.brand .brand-wordmark b{font:700 37px/.98 Cinzel,Georgia,serif;letter-spacing:3px;background:linear-gradient(180deg,#ffdfad 6%,#ddaa77 36%,#9b5d47 56%,#e4b586 78%,#a75b43);background-clip:text;-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 2px 1px #000) drop-shadow(0 0 9px #a8463438)}.brand .brand-wordmark small{font:500 8px/1.3 Inter,Arial;letter-spacing:2.3px;color:#ab8673;margin-top:6px;padding-left:3px}@media(max-width:760px){.brand{gap:7px}.brand-emblem{display:block;width:38px;height:43px}.brand-overline{font-size:9px;letter-spacing:3px;margin-bottom:1px}.brand .brand-wordmark b{font-size:26px;letter-spacing:1.8px}.brand .brand-wordmark small{display:none}header{min-height:44px}}@media(max-width:380px){.brand-emblem{width:30px;height:36px}.brand .brand-wordmark b{font-size:23px}.brand-overline{font-size:8px}}

.unknown-monster{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,#292030,#100d16 70%);color:#bb9d76;border-bottom:1px solid #594237}.unknown-monster span{font:80px Cinzel,serif;text-shadow:0 0 28px #9c553b}.unknown-monster small{font-size:12px;letter-spacing:3px;color:#9f8c9d}

.malachar-lore{margin:32px 0 0;padding:36px clamp(20px,5vw,64px);border:1px solid #4b3640;background:linear-gradient(125deg,#21171f,#110f16 70%);border-radius:12px}.malachar-lore h2{font-family:Cinzel,serif;font-size:clamp(24px,4vw,34px);color:#dfbd91;margin:12px 0 22px}.malachar-lore p{max-width:76ch;font-size:16px;line-height:1.85;color:#bfb1ba;margin:16px 0}.malachar-lore .lore-intro{font-size:19px;color:#e1cbb5}.malachar-lore h3{font-family:Cinzel,serif;color:#d9b58c;margin:28px 0 10px}.malachar-lore .lore-ending{color:#ddbd9e;font-style:italic}

/* Shared map actions: anchored to the desktop map, within reach on touch screens. */
#mobileSelection{display:none}#mobileSelection.sheet-open{display:block;position:absolute;left:12px;bottom:12px;right:auto;width:min(390px,calc(100% - 24px));max-height:70%;overflow-y:auto;z-index:19;background:#251d2cf5;border:1px solid #b79a74;border-radius:12px;box-shadow:0 8px 30px #0009}
#mobileSelection .selection{position:relative;padding:14px;margin:0;border:0;background:transparent}#mobileSelection .selection h3{margin:0 40px 8px 0;font-size:18px}#mobileSelection .selection p{font-size:13px;line-height:1.45;margin:7px 0}#mobileSelection .selection .close-tower{display:block;position:absolute;right:6px;top:4px;width:40px;height:40px;font-size:26px;padding:0;margin:0}#mobileSelection .selection button{min-height:42px;font-size:13px}#mobileSelection .selection .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}#mobileSelection .selection>button:not(.close-tower){margin:6px 6px 0 0}
#movePlacement:not([hidden]){position:absolute;z-index:21;left:12px;bottom:12px;display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #b79a74;border-radius:12px;background:#251d2cf5;font-size:14px}#movePlacement button{min-height:44px}#touchPlacement:not([hidden]){position:absolute;z-index:21;left:12px;bottom:12px;right:12px;border-radius:12px}.tower-card.locked{opacity:.42;filter:grayscale(.8);cursor:not-allowed}.tower-card.locked .price{font-size:12px}
@media(max-width:760px){#mobileSelection.sheet-open{position:fixed;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));width:auto;max-height:46dvh}#movePlacement:not([hidden]),#touchPlacement:not([hidden]){position:fixed;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom))}#movePlacement span{flex:1}#mobileSelection .selection button{min-height:46px;font-size:14px}}

.controls{flex-wrap:wrap}.controls #fullscreenToggle,.controls #soundToggle{font-size:13px;padding:10px 12px}.game-expanded{overflow:hidden}
#gameViewport.expanded{position:fixed;inset:0;z-index:100;width:100%;height:100dvh;margin:0;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));box-sizing:border-box;background:#110d15;display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:12px;overflow:hidden}
#gameViewport.expanded .arena{display:flex;flex-direction:column;min-height:0;filter:none}#gameViewport.expanded .arena-top,#gameViewport.expanded .arena-bottom,#gameViewport.expanded .run-stats{display:none}#gameViewport.expanded .status{margin:0 0 8px;padding:10px;flex-shrink:0}#gameViewport.expanded .canvas-wrap{flex:1;min-height:0!important}#gameViewport.expanded canvas{width:100%;height:100%!important;min-height:0;aspect-ratio:auto!important}#gameViewport.expanded aside{overflow-y:auto;min-height:0}#gameViewport.expanded .controls{flex-shrink:0;margin-top:8px;gap:6px}#gameViewport.expanded #repairAll{font-size:12px}#gameViewport.expanded #mobileSelection.sheet-open{z-index:120}#gameViewport.expanded #touchPlacement:not([hidden]),#gameViewport.expanded #movePlacement:not([hidden]){z-index:121}
@media(max-width:760px){#gameViewport.expanded{grid-template-columns:1fr;padding:6px}#gameViewport.expanded aside{display:none}#gameViewport.expanded .status{padding:6px;margin-bottom:4px}#gameViewport.expanded .controls{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}#gameViewport.expanded .controls button{flex:0 0 auto;white-space:nowrap}#gameViewport.expanded #mobileTowerTray{flex-shrink:0}#gameViewport.expanded .tower-thumbnail{height:56px!important;width:56px!important}#gameViewport.expanded .tower-card{padding:5px!important}#gameViewport.expanded .status .wave-status{display:none}}

#gameViewport.expanded #notice{flex-shrink:0;margin:4px 0 0;padding:5px 8px;font-size:12px;line-height:1.3}

#gameViewport.expanded .entry-overlay,#gameViewport.expanded #overlay{overflow-y:auto}#gameViewport.expanded .entry-overlay{align-items:flex-start}

/* The codex shares the battlefield's palette with more room for reading. */
.site-nav{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0 16px;margin-bottom:12px;border-bottom:1px solid #67453866}.site-nav a{color:#c6b4ac;text-decoration:none;padding:9px 14px;border:1px solid transparent;border-radius:7px;font-size:14px}.site-nav a:hover,.site-nav a[aria-current=page]{background:#37232b;border-color:#78513f;color:#ffe0b7}.site-nav a:focus-visible,.guide-page a:focus-visible{outline:2px solid #f0bf80;outline-offset:3px}.guide-page{max-width:1200px}.guide-page a{color:#e6bb8c}.guide-page .brand{text-decoration:none}.guide-play{font-size:14px;text-decoration:none}.guide-heading{padding:42px 0 32px;max-width:850px}.guide-heading h1{font:600 clamp(30px,5vw,52px)/1.15 Cinzel,Georgia,serif;color:#f0d0ad;margin:14px 0 20px}.guide-page p{font-size:16px;line-height:1.75;color:#c3b5bc}.guide-heading p{font-size:19px;max-width:65ch}.guide-page h2{font:600 clamp(22px,3vw,29px)/1.35 Cinzel,Georgia,serif;color:#e7c39e}.guide-panel{padding:28px;background:linear-gradient(120deg,#241923,#141018);border:1px solid #584452;border-radius:12px;margin:24px 0}.guide-panel h2{margin-top:0}.guide-jumps{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0}.guide-jumps a{padding:9px 13px;border:1px solid #674b47;border-radius:6px;text-decoration:none;font-size:14px}.guide-jumps a:hover{background:#39232e}.guide-page .tower-codex{grid-template-columns:1fr;gap:28px}.guide-page .codex-card{scroll-margin-top:20px}.guide-page .tower-codex .codex-card{padding:28px}.guide-page .tower-codex h3{font-size:25px}.guide-page .upgrade-gallery{gap:18px;margin-bottom:28px}.guide-page .upgrade-gallery img{max-height:300px;object-fit:contain;background:#100d17}.tower-notes{display:grid;grid-template-columns:1fr 1fr;gap:28px}.tower-notes h4{color:#e7c39e;font-size:16px;margin:0 0 10px}.guide-page .codex-flavor{font-style:italic;color:#bba18f;border-left:2px solid #86533f;padding-left:16px;margin-bottom:0}.guide-page .monster-codex{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.guide-page .monster-card>div{padding:24px}.guide-page .monster-card img{max-height:330px;object-fit:contain;background:#100d17}.guide-page .monster-card h3{font-size:23px}.guide-page .monster-role{color:#e5bb8b;font-weight:600}.guide-page .unknown-monster{height:330px;aspect-ratio:auto}.guide-page .unknown-monster span{font-size:110px}.guide-page .wave-codex{padding:28px}.lore-chapter p{max-width:76ch}.lore-relics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.lore-relics h3{color:#e7c39e;font-family:Cinzel,Georgia,serif}.guide-page .lore-note{font-size:13px;color:#a4939c}.guide-return{margin:40px 0 20px}.guide-return a{display:inline-block;padding:13px 20px;border:1px solid #9b6b48;border-radius:7px;background:#332128;text-decoration:none}.guide-page footer{flex-wrap:wrap}.guide-page .malachar-lore{margin-top:0}
@media(max-width:760px){.site-nav{gap:2px;padding:2px 0 8px;margin-bottom:10px}.site-nav a{font-size:12px;padding:8px 9px}.guide-page{padding:14px 12px}.guide-heading{padding:24px 0 16px}.guide-heading p{font-size:17px}.guide-panel,.guide-page .wave-codex,.guide-page .tower-codex .codex-card{padding:18px}.guide-page .upgrade-gallery{gap:8px}.guide-page .upgrade-gallery figcaption{font-size:12px;overflow-wrap:anywhere}.tower-notes,.lore-relics{grid-template-columns:1fr;gap:8px}.guide-page .monster-codex{grid-template-columns:1fr}.guide-page .monster-card>div{padding:20px}.guide-page .malachar-lore{padding:24px 20px}.guide-page footer{display:block}}
