:root{font-family:Arial,Helvetica,sans-serif;color:#3f413a;background:#e9e5dc;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}
body{margin:0}
#city-stage,#city-canvas{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}
#city-canvas{display:block;outline-offset:-5px}
@media(pointer:fine){html[data-rolling-phase=running] #city-canvas{cursor:grab}html[data-rolling-phase=running] #city-canvas[data-camera-dragging=true]{cursor:grabbing}}
button{-webkit-tap-highlight-color:transparent;color:inherit;cursor:pointer;touch-action:manipulation}
button:focus-visible{outline:2px solid #964b36;outline-offset:4px}
.mode-button,.game-touch button{display:grid;place-items:center;width:44px;height:44px;border:1px solid #fff9ef;border-radius:50%;background:#f8f5ea;box-shadow:0 2px 0 #443d2b18;backdrop-filter:none}
.mode-button{position:fixed;top:max(20px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right));z-index:10}
.mode-button:disabled{visibility:hidden}
.mode-button[hidden]{display:none}
.sound-button{top:max(76px,calc(env(safe-area-inset-top) + 56px))}
.sound-off,.sound-button[aria-pressed=true] .sound-on{display:none}
.sound-button[aria-pressed=true] .sound-off{display:block}
.mode-button:active{transform:scale(.97)}
button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.mode-button .play-icon{fill:currentColor;stroke:none}
.mode-button .exit-icon,.mode-button[aria-pressed=true] .play-icon{display:none}
.mode-button[aria-pressed=true] .exit-icon{display:block}
.game-leave{position:fixed;left:max(20px,env(safe-area-inset-left));bottom:max(20px,env(safe-area-inset-bottom));z-index:10;padding:11px 16px;border:1px solid #fff9ef;border-radius:24px;background:#f8f5ea;font:inherit;font-size:13px;box-shadow:0 2px 0 #443d2b18}
.game-leave[hidden]{display:none}
.game-map-markers{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.game-map-markers[hidden]{display:none}
.game-map-player{position:absolute;left:0;top:0;color:var(--player-color);isolation:isolate}
.game-map-beam{position:absolute;bottom:0;left:-2px;width:4px;transform-origin:50% 100%;border-radius:3px;background:linear-gradient(to top,var(--player-color),#fff);box-shadow:0 0 5px 2px var(--player-color),0 0 17px 5px var(--player-color)}
.game-map-base{position:absolute;left:0;top:0;width:36px;height:12px;transform:translate(-50%,-50%);border:2px solid var(--player-color);border-radius:50%;background:transparent;box-shadow:0 0 8px 1px var(--player-color)}
.game-map-player[data-local=true] .game-map-base{width:40px;height:14px}
.game-map-label{position:absolute;left:0;top:0;white-space:nowrap;border:2px solid var(--player-color);border-radius:7px;background:#fffdf4;color:#27392f;padding:5px 9px;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;line-height:16px;box-shadow:0 2px 8px #16221830}
html[data-rolling-map=true] .pickup-counter,html[data-rolling-map=true] .game-progress{display:none}
.game-progress{position:fixed;top:max(22px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:grid;justify-items:center;gap:7px;z-index:3;pointer-events:none;color:#35443e;text-shadow:0 1px 5px #f8f5ea90}
.game-progress[hidden],.game-countdown[hidden]{display:none}
.game-diameter{font-size:27px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
.game-progress progress{width:84px;height:3px;appearance:none;border:0;border-radius:2px;background:#35443e26;overflow:hidden}
.game-progress progress::-webkit-progress-bar{background:#35443e26}
.game-progress progress::-webkit-progress-value{background:#637660}
.game-progress progress::-moz-progress-bar{background:#637660}
.game-countdown{position:fixed;inset:0;display:grid;place-items:center;z-index:3;pointer-events:none;font-size:72px;font-weight:600;color:#fff9ef;text-shadow:0 2px 20px #15241e70}
.loading{position:fixed;inset:0;display:grid;place-items:center;background:#e9e5dc;z-index:4}
.loading[hidden]{display:none}
.loading-track{height:2px;width:125px;background:#d4d5c8;position:relative;overflow:hidden}
.loading-track:after{content:'';position:absolute;inset:0 auto 0 0;width:45%;background:#7d846d;animation:load 1.2s ease-in-out infinite alternate}
@keyframes load{to{transform:translateX(130%)}}
.loading[data-error=true] .loading-track:after{animation:none;background:#a34c38;width:100%}
.game-touch{display:none}
.pickup-counter{position:fixed;left:max(20px,env(safe-area-inset-left));top:max(20px,env(safe-area-inset-top));z-index:3;display:grid;gap:1px;width:max-content;min-width:88px;max-height:calc(100dvh - 120px);margin:0;padding:7px 9px;list-style:none;border:0;border-radius:0;background:transparent;color:#fff;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;user-select:none}
.pickup-counter[hidden],html:not([data-rolling-phase=running]) .pickup-counter{display:none}
.pickup-counter::-webkit-scrollbar{display:none}
.pickup-counter li{display:grid;grid-template-columns:30px minmax(22px,auto);align-items:center;gap:9px;min-height:38px}
.pickup-counter svg{display:block;width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 2px #0009)}
.pickup-counter span{font-size:14px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;text-align:right;text-shadow:0 1px 2px #0009}
html[data-city-night=true] body{background:#081222;color:#dce5f3}
html[data-city-night=true] .pickup-counter{background:transparent;color:#fff}
html[data-city-night=true] .game-progress progress::-webkit-progress-value{background:#b9caa7}
html[data-city-night=true] .game-progress progress::-moz-progress-bar{background:#b9caa7}
html[data-city-night=true] .mode-button,html[data-city-night=true] .game-touch button{background:#142338;color:#cddbed;border-color:#42516b}
@media(pointer:coarse){
 .game-leave{bottom:max(158px,calc(env(safe-area-inset-bottom) + 148px))}
 html[data-rolling-phase=running] .game-touch{display:flex;align-items:end;justify-content:space-between;position:fixed;bottom:max(26px,env(safe-area-inset-bottom));left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));z-index:3;pointer-events:none}
 .game-touch button{touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none}
 #game-stick{position:relative;width:116px;height:116px;background:#f8f5ea30;border-color:#f8f5ea90;backdrop-filter:none}
 .stick-knob{display:block;width:44px;height:44px;border:1px solid #fff9ef;border-radius:50%;background:#f8f5eac9;pointer-events:none;box-shadow:0 2px 8px #18291f20}
 .game-touch .game-jump{width:70px;height:70px;gap:0;padding:12px;align-content:center}
 .game-jump span{font-size:10px;line-height:1.4}
 .game-jump:active,.game-jump[data-pressed=true]{transform:scale(.96)}
 html[data-city-night=true] #game-stick{background:#14233850;border-color:#8495ac70}
 html[data-city-night=true] .stick-knob{background:#cddbedb0;border-color:#cddbed}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important}.loading-track:after{width:100%}}

/* Room cards use the same warm paper, roof clay and forest ink as the city. */
.room-panel{--room-paper:#f4f0e6;--room-ink:#344438;--room-muted:#77796a;--room-line:#d8d7c8;--room-clay:#a44e38;--room-cream:#fff8e9;--room-ease:cubic-bezier(.23,1,.32,1);width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:18px;border:1px solid #50584166;border-radius:8px;background:var(--room-paper);color:var(--room-ink);box-shadow:5px 6px 0 #34443824,0 20px 70px #1d2c3226;overflow:auto;overscroll-behavior:contain;scrollbar-color:var(--room-line) transparent;scrollbar-width:thin;font-family:"Avenir Next","Trebuchet MS",Arial,sans-serif}
.room-panel::backdrop{background:#172b242c}
.room-masthead{display:flex;align-items:center;justify-content:space-between;margin:-3px -4px 15px 1px}
.room-city-mark{display:block;width:71px;height:39px;fill:none;stroke:var(--room-ink);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.room-close{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid transparent;border-radius:50%;background:transparent;color:var(--room-muted)}
.room-close svg{width:21px;height:21px}
.room-actions{display:grid;grid-template-columns:1.5fr 1fr;gap:10px}
.room-player-name{display:grid;gap:7px;margin:0 0 16px;font-size:12px;color:var(--room-muted)}
.room-player-name input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--room-line);border-radius:5px;background:#fff8e980;color:var(--room-ink);font:inherit;font-size:16px}
.room-player-name input:focus-visible{outline:2px solid var(--room-clay);outline-offset:2px}
.room-player-name input:disabled{opacity:.6}
.room-action{min-height:88px;padding:16px;border:1px solid var(--room-line);border-radius:5px;background:#e9e8da;color:var(--room-ink);font:inherit;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:12px}
.room-action svg{width:32px;height:32px;stroke-width:1.5}
.room-action span{font-family:Georgia,"Times New Roman",serif;font-size:24px;line-height:1.05;letter-spacing:-.65px}
#game-host{background:var(--room-clay);border-color:#83442f;color:var(--room-cream)}
#game-solo{background:transparent}
#game-solo svg{fill:currentColor;stroke:none}
#game-solo span{font-size:21px}
.room-directory{margin-top:18px;border-top:1px solid var(--room-line)}
.room-directory:has(#game-room-list:empty){margin-top:0;border:0}
#game-room-list{display:grid}
.room-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto 16px;align-items:center;gap:12px;width:100%;min-height:86px;padding:14px 5px;border:0;border-bottom:1px solid var(--room-line);border-radius:0;background:transparent;text-align:left;font:inherit}
#game-room-list>[role=listitem]:last-child .room-row{border-bottom:0}
.room-emblem{display:grid;place-items:center;width:38px;height:38px;border:1px solid #6e796547;border-radius:50%;background:#e4e8d8;color:var(--room-ink)}
.room-emblem svg{width:25px;height:25px;stroke-width:1.35}
.room-detail{display:grid;gap:8px;min-width:0}
.room-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Georgia,"Times New Roman",serif;font-size:21px;line-height:1.05;letter-spacing:-.5px}
.room-occupancy{display:flex;align-items:center;gap:8px}
.room-players,.room-time{font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.15px}
.room-players{color:var(--room-muted)}
.room-slots{display:flex;gap:3px}
.room-slots i{width:4px;height:4px;border-radius:50%;background:var(--room-line)}
.room-slots i[data-filled=true]{background:#637660}
.room-time{display:flex;align-items:center;gap:4px;color:var(--room-muted)}
.room-time svg{width:12px;height:12px;stroke-width:1.5}
.room-row[data-phase=running] .room-time{color:#627454}
.room-arrow{width:16px;height:16px}.room-arrow svg{display:block;width:100%;height:100%}
.room-row[data-full=true]{opacity:.45}
.room-row:disabled{cursor:default}
.room-row[data-pending=true]{opacity:1}
.room-row,.room-action{position:relative}.room-row[data-pending=true] .room-arrow{visibility:hidden}.room-row[data-pending=true]:after,.room-action[data-pending=true]:after{content:"";position:absolute;right:16px;top:18px;width:14px;height:14px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:room-wait 700ms linear infinite}.room-row[data-pending=true]:after{right:7px;top:calc(50% - 7px)}
.room-action:disabled:not([data-pending=true]){opacity:.45;cursor:default}
.room-panel button{transition:transform 140ms var(--room-ease),background-color 140ms ease}
.room-panel button:not(:disabled):active{transform:scale(.98)}
.room-panel button:focus-visible{outline:2px solid var(--room-clay);outline-offset:3px;transition:none}
#game-host:focus-visible{outline-color:var(--room-ink)}
.room-row:focus-visible{outline-offset:-2px}
#game-room-status:empty{display:none}
#game-room-status{margin:14px 4px 2px;max-width:32em;font-size:12px;line-height:1.5;color:var(--room-muted)}
.lobby-panel{position:fixed;left:max(20px,env(safe-area-inset-left));top:max(20px,env(safe-area-inset-top));width:min(296px,calc(100vw - 100px));max-height:calc(100dvh - 40px);padding:14px;z-index:3}
.lobby-panel[hidden]{display:none}
#game-players{display:grid;gap:0;list-style:none;margin:0 0 12px;padding:0}
#game-players li{overflow-wrap:anywhere}
#game-players li{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 3px;border-bottom:1px solid var(--room-line);font-size:12px;line-height:1.4;font-weight:500}
#game-players li:before{content:"";width:23px;height:23px;flex:none;border:1px solid #657a6445;border-radius:50%;background:var(--player-color,#819077);box-shadow:inset -3px -3px 0 #2536291a}
#game-players li:after{content:"";margin-left:auto;width:6px;height:6px;flex:none;border:1px solid var(--room-muted);border-radius:50%}
#game-players li[data-ready=true]:after{background:#637660;border-color:#637660}
#game-begin{width:100%;min-height:50px;padding:13px 15px;background:var(--room-ink);border-color:var(--room-ink);color:var(--room-cream);flex-direction:row;align-items:center;gap:12px}
#game-begin span{font-size:22px}
#game-begin svg{width:21px;height:21px}
@keyframes room-wait{to{transform:rotate(360deg)}}
@media(hover:hover) and (pointer:fine){.room-row:not(:disabled):hover{background:#e7e8da}.room-close:hover{border-color:var(--room-line);background:#e7e8da}#game-host:not(:disabled):hover{background:#91422f}#game-solo:not(:disabled):hover{background:#e7e8da}#game-begin:not(:disabled):hover{background:#455942}}
html[data-city-night=true] .room-panel{--room-paper:#26362e;--room-ink:#e5e5d3;--room-muted:#b4baa7;--room-line:#485548;--room-clay:#b2694c;--room-cream:#fff8e9;border-color:#64705b;box-shadow:5px 6px 0 #08151044,0 20px 70px #07151130}
html[data-city-night=true] .room-emblem{background:#3b4a37;color:#dce4cb;border-color:#63725a}
html[data-city-night=true] #game-begin{background:#c3caaa;border-color:#c3caaa;color:#26362e}
@media(hover:hover) and (pointer:fine){html[data-city-night=true] .room-row:not(:disabled):hover,html[data-city-night=true] .room-close:hover,html[data-city-night=true] #game-solo:not(:disabled):hover{background:#354534}html[data-city-night=true] #game-begin:not(:disabled):hover{background:#d6dec0}}
@media(max-width:430px){.room-panel{padding:14px;max-height:calc(100dvh - 32px)}.room-masthead{margin-bottom:12px}.room-action{padding:14px;min-height:110px}.room-action span{font-size:23px}#game-solo span{font-size:20px}.room-row{grid-template-columns:32px minmax(0,1fr) auto 13px;gap:9px;min-height:80px}.room-emblem{width:32px;height:32px}.room-emblem svg{width:22px;height:22px}.room-name{font-size:20px}.room-slots{gap:2px}.room-occupancy{gap:6px}.room-time{font-size:9px}.room-arrow{width:13px;height:13px}.lobby-panel{padding:12px}.lobby-panel .room-action{min-height:48px}}
@media(prefers-reduced-motion:reduce){.room-panel button{transition:none}}

.loading{align-content:center;gap:22px}.loading-cathedral{width:64px;height:52px;color:#969781}.arrival-skip{position:fixed;bottom:24px;right:24px;z-index:5;border:0;border-radius:50%;width:44px;height:44px;background:#f4f0e6;color:#4f584e;font-size:24px;cursor:pointer}.arrival-skip[hidden]{display:none}

.loading[data-preview=true]{background:transparent;align-content:end;padding-bottom:30px;pointer-events:none}.loading[data-preview=true] .loading-cathedral{display:none}

/* The defence desk keeps the street map open between the status and build controls. */
.room-defence{display:grid;grid-template-columns:40px minmax(0,1fr) 19px;align-items:center;gap:14px;width:100%;margin-top:12px;padding:17px 14px;border:1px solid var(--room-line);border-radius:5px;background:#e4e8d8;color:var(--room-ink);font:inherit;text-align:left}
.room-defence-mark svg{display:block;width:40px;height:44px;stroke-width:1.35}
.room-defence-copy{display:grid;gap:7px}
.room-defence-copy small{font-size:9px;letter-spacing:1.1px;text-transform:uppercase;color:var(--room-muted)}
.room-defence-copy strong{font-family:Georgia,"Times New Roman",serif;font-size:23px;line-height:1.1;font-weight:400;letter-spacing:-.5px}
.room-defence-copy>span{max-width:30em;font-size:11px;line-height:1.5;color:var(--room-muted)}
.room-defence .room-defence-arrow{width:19px;height:19px}
.room-defence:disabled{opacity:.5;cursor:default}
html[data-city-night=true] .room-defence{background:#354534}
html[data-tower-defence=true] #game-toggle,html[data-tower-defence=true] #game-sound,html[data-tower-defence=true] #game-leave,html[data-tower-defence=true] .game-touch{display:none}
.td-hud,.td-defeat{--td-paper:#f7f3e8;--td-ink:#30473c;--td-muted:#737c6a;--td-line:#d5d8c7;--td-green:#647552;--td-dark:#30473c;--td-clay:#a4533d;--td-ease:cubic-bezier(.23,1,.32,1);font-family:"Avenir Next","Trebuchet MS",Arial,sans-serif;color:var(--td-ink);font-size:12px}
.td-hud{position:fixed;inset:0;z-index:11;pointer-events:none}
.td-hud[hidden],.td-hud [hidden],.td-defeat [hidden]{display:none!important}
.td-hud button,.td-defeat button{font-family:inherit;font-size:12px;transition:transform 140ms var(--td-ease),background-color 140ms ease,border-color 140ms ease}
.td-hud button:not(:disabled):active,.td-defeat button:not(:disabled):active{transform:scale(.97)}
.td-hud button:disabled{cursor:default}
.td-hud button:focus-visible,.td-defeat button:focus-visible{outline:2px solid var(--td-clay);outline-offset:3px;transition:none}
.td-paper{border:1px solid #69745660;border-radius:8px;background:var(--td-paper);box-shadow:3px 4px 0 #3444381c,0 8px 32px #15272017;pointer-events:auto}
.td-command{position:absolute;top:max(20px,env(safe-area-inset-top));left:max(20px,env(safe-area-inset-left));width:410px;padding:16px 18px}
.td-heading{display:flex;align-items:center;gap:11px}
.td-cathedral-mark{display:grid;place-items:center;width:39px;height:40px;border-right:1px solid var(--td-line);padding-right:9px;flex:none}
.td-cathedral-mark svg{width:30px;height:27px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
.td-eyebrow{margin:0;font-size:9px;font-weight:500;line-height:1.4;letter-spacing:1.25px;text-transform:uppercase;color:var(--td-muted)}
.td-heading h1{margin:2px 0 0;font-family:Georgia,"Times New Roman",serif;font-size:29px;line-height:1;letter-spacing:-1px;font-weight:400}
.td-phase{margin-left:auto;padding:5px 8px;border:1px solid #cbd3ba;border-radius:4px;background:#e9eddc;font-size:10px;white-space:nowrap;color:#566b43}
.td-hud[data-phase=wave] .td-phase{background:#f0e3ce;border-color:#e2c7a3;color:#856335}
.td-hud[data-paused=true] .td-phase{background:#e7e4d9;border-color:#d2cdbd;color:#797366}
.td-stats{display:grid;grid-template-columns:74px 1fr 68px;gap:19px;margin-top:17px;padding-top:13px;border-top:1px solid var(--td-line)}
.td-stat-label{display:flex;align-items:center;gap:4px;min-height:15px;font-size:10px;color:var(--td-muted);white-space:nowrap}
.td-stat-label svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.td-stats strong{display:block;margin-top:4px;font-size:24px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.8px}
.td-stats strong small{font-size:13px;color:var(--td-muted);letter-spacing:-.2px}
.td-health-stat strong{margin-top:5px;font-size:14px;letter-spacing:0}
.td-health-track{height:4px;margin-top:8px;overflow:hidden;border-radius:2px;background:#dce0d0}
.td-health-track i{display:block;width:100%;height:100%;transform-origin:left;background:#798b5f}
.td-health-track[data-low=true] i{background:var(--td-clay)}
.td-gold-stat{padding-left:17px;border-left:1px solid var(--td-line)}
.td-gold-stat strong{color:#937139}
.td-tools{position:absolute;top:max(20px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right));display:flex;gap:3px;padding:5px}
.td-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:61px;min-height:56px;padding:7px 9px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--td-ink)}
.td-tool svg{width:21px;height:21px;stroke-width:1.45}
.td-tool span{font-size:9px;line-height:1.2}
.td-tool strong{display:grid;place-items:center;min-height:21px;font-size:17px;line-height:1;font-weight:500;font-variant-numeric:tabular-nums}
.td-tool[aria-pressed=true]{background:#e6ead8;border-color:#cbd3ba}
.td-leave{margin-left:2px;border-left-color:var(--td-line);border-radius:0 4px 4px 0}
.td-paused{position:absolute;top:39%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:10px;padding:13px 14px;white-space:nowrap;font-size:13px}
.td-paused>svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5}
.td-paused button{min-height:34px;margin-left:10px;padding:6px 11px;border:1px solid var(--td-line);border-radius:4px;background:#e4e8d8}
.td-bottom{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:flex-end;gap:18px;pointer-events:none}
.td-build{width:500px;max-width:100%;padding:16px}
.td-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.td-section-heading h2{margin:0;font-size:12px;font-weight:500;line-height:1.3}
.td-key-hint{font-size:9px;color:var(--td-muted)}
.td-towers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.td-tower{display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:116px;padding:9px 10px;border:1px solid var(--td-line);border-radius:5px;background:#efeee2;text-align:left;color:var(--td-ink)}
.td-tower-top{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:8px}
.td-tower-icon{display:block;height:27px}
.td-tower svg{width:28px;height:27px;stroke-width:1.3}
.td-tower kbd{align-self:flex-start;font-family:inherit;font-size:9px;color:var(--td-muted)}
.td-tower>strong{font-size:12px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.td-tower-target{margin-top:3px;color:var(--td-muted);font-size:9px;line-height:1.2}
.td-tower-cost{display:flex;align-items:center;gap:4px;margin-top:9px;font-size:12px;font-variant-numeric:tabular-nums}
.td-tower-cost svg{width:13px;height:13px;stroke-width:1.3}
.td-tower[aria-pressed=true]{border-color:#657851;background:#e2e8d4;box-shadow:inset 0 0 0 1px #657851}
.td-tower[data-affordable=false] .td-tower-cost{color:var(--td-clay)}
.td-tower[data-affordable=false] .td-tower-icon{opacity:.55}
.td-selection{margin-top:12px}
.td-build-guide{display:flex;align-items:center;gap:10px;min-height:33px}
.td-build-guide p{max-width:30em;margin:0;font-size:11px;line-height:1.5;color:var(--td-muted)}
.td-build-guide strong{font-weight:500;color:var(--td-ink)}
.td-pad-symbol{width:22px;height:13px;flex:none;margin:0 5px;border:2px solid #94a565;border-radius:50%;background:#dfe6bc;box-shadow:0 0 0 3px #d8e4b744}
.td-map-help{margin:12px 0 0;padding-top:11px;border-top:1px solid var(--td-line);color:var(--td-muted);font-size:9px;line-height:1.4}
.td-touch-help{display:none}
@media(pointer:coarse){.td-mouse-help{display:none}.td-touch-help{display:inline}}
.td-selected-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.td-selected-heading strong{font-size:12px;font-weight:600}.td-selected-heading span{font-size:10px;color:var(--td-muted)}
.td-selected-tower>p{margin:5px 0 9px;font-size:10px;line-height:1.4;color:var(--td-muted)}
.td-selected-actions{display:flex;gap:7px}
.td-selected-actions button{display:flex;align-items:center;justify-content:center;gap:4px;min-height:35px;padding:6px 9px;border:1px solid var(--td-line);border-radius:4px;font-size:10px;line-height:1.3}
.td-upgrade{flex:1;background:#e2e8d4}.td-upgrade svg{width:15px;height:15px;flex:none;stroke-width:1.4}.td-upgrade:disabled{opacity:.45}.td-sell{background:transparent;color:var(--td-muted)}
.td-wave-card{width:310px;max-width:100%;padding:16px}
.td-wave-card .td-section-heading{margin-bottom:11px}
.td-wave-kind{font-size:9px;color:var(--td-muted)}
.td-wave-kind[data-flying=true]{color:var(--td-clay)}
.td-wave-card>h2{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:25px;line-height:1.13;font-weight:400;letter-spacing:-.65px;text-wrap:balance}
.td-wave-description{margin:9px 0 0;font-size:11px;line-height:1.5;color:var(--td-muted)}
.td-wave-facts{display:flex;justify-content:space-between;gap:9px;margin:14px 0 0;padding-top:10px;border-top:1px solid var(--td-line);font-size:10px;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--td-muted)}
.td-message{margin:10px 0 0;font-size:11px;line-height:1.4;color:var(--td-ink)}
.td-start-wave{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:45px;width:100%;margin-top:14px;padding:12px 14px;border:1px solid var(--td-dark);border-radius:5px;background:var(--td-dark);color:#fff8e9;text-align:left;font:inherit;font-size:12px}
.td-start-wave svg{width:18px;height:18px;flex:none;stroke-width:1.5}
.td-start-wave:disabled{background:#e5e8d9;border-color:var(--td-line);color:var(--td-muted)}
.td-start-wave:disabled svg{display:none}
.td-campaign{margin:10px 0 0;font-size:9px;line-height:1.4;text-align:center;color:var(--td-muted)}
.td-defeat{width:min(410px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:27px;overflow:auto;text-align:center}
.td-defeat::backdrop{background:#192c296b}
.td-defeat-mark{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 19px;border:1px solid var(--td-line);border-radius:50%;background:#e9eddd}
.td-defeat-mark svg{width:36px;height:32px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.td-defeat h2{margin:10px 0 0;font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:33px;line-height:1.07;letter-spacing:-.8px;text-wrap:balance}
.td-defeat-copy{margin:14px 0 0;font-size:12px;line-height:1.6;color:var(--td-muted)}
.td-defeat-stats{display:grid;grid-template-columns:1fr 1fr;margin:24px 0 22px;padding:18px 0;border-block:1px solid var(--td-line)}
.td-defeat-stats>div+div{border-left:1px solid var(--td-line)}
.td-defeat-stats strong{display:block;font-size:31px;line-height:1;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.td-defeat-stats span{display:block;margin-top:6px;font-size:10px;color:var(--td-muted)}
.td-defeat .td-start-wave{font-size:13px}
.td-return{min-height:44px;margin:8px 0 0;padding:10px 14px;border:0;border-radius:5px;background:transparent;color:var(--td-muted)}
@media(hover:hover) and (pointer:fine){
 .room-defence:not(:disabled):hover{background:#dce3cf}
 html[data-city-night=true] .room-defence:not(:disabled):hover{background:#41523e}
 .td-tool:not(:disabled):hover,.td-sell:not(:disabled):hover,.td-return:hover{background:#e8ebdd}
 .td-tower:not(:disabled):hover{background:#e4e8d7;border-color:#a3af8c}
 .td-tower[aria-pressed=true]:hover{background:#dbe4c8;border-color:#657851}
 .td-start-wave:not(:disabled):hover{background:#445b46;border-color:#445b46}
 .td-upgrade:not(:disabled):hover,.td-paused button:hover{background:#d6e0c2}
}
@media(max-width:900px){.td-command{width:370px;padding:14px 16px}.td-stats{gap:13px;grid-template-columns:67px 1fr 65px}.td-gold-stat{padding-left:13px}.td-build{width:460px}.td-wave-card{width:280px}.td-bottom{gap:12px}.td-tool{min-width:48px;padding-inline:6px}.td-tool span{font-size:8px}}
@media(max-width:720px){
 .td-command{top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));width:auto;padding:11px 13px}
 .td-heading{gap:8px}.td-cathedral-mark{width:32px;height:30px;padding-right:7px}.td-cathedral-mark svg{width:25px;height:24px}.td-heading h1{font-size:23px}.td-heading .td-eyebrow{font-size:8px;letter-spacing:1px}.td-phase{font-size:9px;padding:4px 6px}
 .td-stats{grid-template-columns:64px 1fr 64px;gap:13px;margin-top:10px;padding-top:9px}.td-stats strong{font-size:21px}.td-stat-label{font-size:9px;min-height:12px}.td-health-stat strong{font-size:13px}.td-health-track{margin-top:6px}.td-stats strong small{font-size:12px}.td-gold-stat{padding-left:12px}
 .td-tools{top:max(135px,calc(env(safe-area-inset-top) + 125px));right:max(10px,env(safe-area-inset-right));padding:3px;gap:1px}.td-tool{min-width:44px;min-height:44px;padding:8px}.td-tool span{display:none}.td-tool svg{width:20px;height:20px}.td-tool strong{font-size:16px}.td-leave{margin-left:1px}
 .td-bottom{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:7px;max-height:calc(100dvh - 205px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;border-radius:8px}
 .td-bottom::-webkit-scrollbar{display:none}
 .td-build,.td-wave-card{width:100%;padding:11px 12px;flex-shrink:0;box-shadow:none}
 .td-section-heading{margin-bottom:8px}.td-section-heading h2{font-size:11px}.td-key-hint{display:none}.td-towers{gap:7px}.td-tower{min-height:95px;padding:7px 9px}.td-tower-top{margin-bottom:5px}.td-tower-icon{height:23px}.td-tower-icon svg{height:23px;width:25px}.td-tower kbd{display:none}.td-tower>strong{font-size:11px}.td-tower-target{font-size:8px}.td-tower-cost{margin-top:6px;font-size:11px}.td-tower-cost svg{width:12px;height:12px}
 .td-selection{margin-top:9px}.td-build-guide{min-height:29px;gap:7px}.td-build-guide p{font-size:10px}.td-pad-symbol{width:19px;height:12px;margin-inline:3px}.td-map-help{margin-top:8px;padding-top:7px;font-size:8px}.td-selected-actions button{min-height:36px}.td-selected-tower>p{font-size:9px;margin-bottom:7px}
 .td-wave-card{order:-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,40%);align-items:center;gap:5px 12px}.td-wave-card .td-section-heading{grid-column:1;margin:0;justify-content:flex-start;gap:7px}.td-wave-card .td-eyebrow{font-size:8px;letter-spacing:.8px}.td-wave-kind{font-size:8px}.td-wave-card>h2{grid-column:1;font-size:20px;line-height:1.1}.td-wave-description{display:none}.td-wave-facts{grid-column:1;justify-content:flex-start;flex-wrap:wrap;gap:3px 9px;margin:0;padding:0;border:0;font-size:8px}.td-wave-card .td-start-wave{grid-column:2;grid-row:1/span 3;align-self:stretch;justify-content:center;min-height:52px;margin:0;padding:10px;font-size:11px;text-align:center;gap:6px}.td-wave-card .td-start-wave svg{width:15px;height:15px}.td-wave-card .td-message{grid-column:1/-1;margin:3px 0 0;font-size:10px;line-height:1.35}.td-campaign{display:none}
 .td-paused{top:34%;gap:7px;padding:10px;font-size:11px}.td-paused button{margin-left:2px;min-height:36px;font-size:10px}
}
@media(max-height:610px) and (min-width:721px){.td-command{padding:10px 13px}.td-heading h1{font-size:25px}.td-stats{margin-top:10px;padding-top:9px}.td-build,.td-wave-card{padding:12px}.td-tower{min-height:95px;padding:7px 9px}.td-tower-top{margin-bottom:3px}.td-tower-icon,.td-tower-icon svg{height:22px}.td-tower-cost{margin-top:6px}.td-map-help{margin-top:8px;padding-top:8px}.td-selection{margin-top:8px}.td-wave-description{font-size:10px}.td-wave-card>h2{font-size:23px}.td-wave-facts{margin-top:9px;padding-top:8px}.td-message{margin-top:8px;font-size:10px}.td-start-wave{margin-top:10px;min-height:40px}.td-campaign{margin-top:7px}.td-bottom{bottom:12px}}
@media(max-height:590px) and (max-width:720px){.td-bottom{max-height:48dvh}.td-paused{top:43%}.td-build-guide{min-height:24px}.td-build-guide p{font-size:9px}.td-map-help{margin-top:6px;padding-top:5px}.td-tower{min-height:86px}.td-tower-icon,.td-tower-icon svg{height:20px}.td-selection{margin-top:7px}}
@media(max-height:590px) and (min-width:550px) and (max-width:720px) and (orientation:landscape){.td-command{right:210px;min-width:285px}.td-heading h1{font-size:21px}.td-tools{top:10px}}
@media(prefers-reduced-motion:reduce){.td-hud button,.td-defeat button{transition:none}}

.td-towers{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:720px){.td-tower{padding-inline:6px}.td-tower>strong{font-size:10px}}
