/* PokeWallClash's compact game window, adapted for tower defense. Local system fonts only. */
:root{--ink:#132b51;--muted:#536987;--red:#df123d;--red-hover:#bd0b32;--line:#d4e0eb;--paper:#f5f9ff;--white:#fff;--body:'Segoe UI',system-ui,sans-serif;--display:'Segoe UI',system-ui,sans-serif;--green:#285d49;--shadow:0 8px 25px #193d6c0d;color-scheme:light}
body{isolation:isolate;min-height:100vh;background:#dae9e8;font-family:var(--body);color:var(--ink);font-size:14px;line-height:1.5}
body::before{content:'';position:fixed;inset:0;z-index:-1;background:linear-gradient(#f5faffb3,#f2f8ff88),url('./ui/page-landscape.svg') center/cover no-repeat;pointer-events:none}
button,a{touch-action:manipulation}button{font-family:inherit}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #2463bb;outline-offset:3px}button:disabled{cursor:default}button:enabled{transition:background .15s,border-color .15s,box-shadow .15s}button:enabled:active{filter:brightness(.94)}
[hidden]{display:none!important}.skip-link{position:fixed;z-index:100;left:12px;top:-100px;padding:12px 18px;background:white;border:2px solid #2463bb;border-radius:8px}.skip-link:focus{top:12px}
.site-header{max-width:1440px;height:76px;margin:auto;padding:0 28px;border:0;gap:24px;background:transparent}.brand{font:800 27px/1 var(--display);letter-spacing:-1px;gap:10px;color:var(--ink)}.brand-accent{color:var(--red)}.brand-mark{width:34px;height:34px;background:linear-gradient(var(--red) 0 44%,#102b51 44% 54%,#fff 54%);border:2px solid #102b51}.brand-mark:before,.brand-mark:after{display:none}.brand-mark span{top:9px;left:9px;width:12px;height:12px;background:white;border:2px solid #102b51}.main-nav{margin-left:auto;gap:25px}.nav-link{min-height:44px;font-size:13px;font-weight:650;white-space:nowrap}.nav-link.active{color:var(--red)}.nav-link.active:after{background:var(--red);bottom:0}.nav-link:hover{color:var(--red)}
main{max-width:1440px;padding:10px 28px 0;margin:auto}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:20px;align-items:start}.battle-column,.team-column{min-width:0}.battle-shell{padding:6px;border:1px solid #b6cce0;border-radius:13px;background:#fff;box-shadow:0 4px 0 #cbddea,0 12px 32px #213a6114;overflow:hidden}.battle-title{height:auto;min-height:66px;padding:10px 15px;gap:11px;color:#fff;background:var(--red);border:0;border-radius:7px 7px 0 0}.ribbon-ball .icon{width:29px;height:29px;stroke-width:2}.route-heading{min-width:0}.battle-title h1{font:750 21px/1.25 var(--display);letter-spacing:-.5px;margin:2px 0 0}.battle-title .eyebrow{color:#fff;font-size:9px;letter-spacing:1.4px}.map-tags{margin-left:auto;gap:8px;flex-shrink:0}.difficulty{font:650 12px var(--body);min-height:44px;padding:8px 10px;color:#fff!important;background:#a6092d!important;border:1px solid #ffffff50;border-radius:7px}.route-picker-button{display:flex;align-items:center;gap:6px;min-height:44px;border:1px solid #fff;border-radius:7px;background:#fff;color:var(--red);padding:8px 12px;font-size:12px;font-weight:700}.route-picker-button .icon{height:18px;width:18px}.battle-title button:focus-visible{outline-color:white}
.battle-stats{min-height:43px;padding:5px 13px;display:flex;align-items:center;gap:12px;background:#f9fcff;border-bottom:1px solid var(--line)}.map-hud{position:static;display:flex;gap:13px;flex-shrink:0}.hud-stat{height:30px;padding:0;gap:5px;border:0;background:none;box-shadow:none;backdrop-filter:none}.hud-stat strong{font-size:15px;color:var(--ink)}.hud-stat span{font-size:11px;color:var(--muted)}.hud-stat .icon{width:17px;height:17px}.hud-stat.lives .icon{color:#db2047}.hud-stat.coins .icon{color:#97720e}.hud-stat.wave .icon{color:#38769c}.weather{display:none}.exit-label{margin-left:auto;font-size:11px;color:var(--muted);text-align:right}
.canvas-wrap{aspect-ratio:12/7;max-height:none;width:100%;background:#7ab591}.canvas-wrap canvas#battlefield{width:100%;height:auto;display:block;image-rendering:pixelated;touch-action:pan-y}.pad-button{width:5.3%;height:8%;min-width:28px;min-height:28px;border-radius:50%;transform:translate(-50%,-50%)}.pad-button:focus-visible{outline:3px solid #fff;box-shadow:0 0 0 5px #17579b}.map-caption{position:static;transform:none;width:auto;display:flex;justify-content:flex-start;gap:8px;margin:12px 3px 0;background:none;border:0;box-shadow:none;padding:0;color:#38567b;font-size:12px;line-height:1.6}.map-caption .pulse-dot{background:#2e8b61}
.battle-action-bar{border:0}.battle-action-bar .wave-panel{min-height:87px;padding:10px 13px;gap:12px;background:#fff;border-bottom:1px solid var(--line);align-items:center}.next-wave>.eyebrow{font-size:10px;letter-spacing:1px;color:#516888}.battle-action-bar .next-wave>strong{font-size:13px;margin:3px 0 0;line-height:1.3}.wave-preview{display:flex;align-items:center}.battle-action-bar .wave-preview{height:25px}.battle-action-bar .wave-preview img{width:25px;height:25px}.battle-action-bar .wave-preview .preview-count{font-size:10px;color:var(--muted)}.wave-action{gap:4px}.wave-reward{font-size:10px;color:#5b6781}.wave-reward .icon{width:13px;height:13px}.keyboard-tip{display:none}.primary-button{background:var(--red);color:#fff;border:1px solid var(--red);border-radius:7px;box-shadow:0 3px 0 #a5072b;font:700 13px var(--body);min-height:44px;padding:11px 18px;gap:12px}.primary-button:hover{background:var(--red-hover);color:#fff}.primary-button:disabled{background:#e9eff5;border-color:#d9e2ed;color:#536987;box-shadow:none}.primary-button .icon{width:17px}.battle-action-bar .primary-button{min-width:150px}.secondary-button{border-radius:7px;background:#f3f7fc;border:1px solid #bdcfe2;color:var(--ink);min-height:44px;font-size:13px}.battle-controls{padding:6px 12px;min-height:54px;background:#f8fbff;border-radius:0 0 7px 7px;border:0}.phase{gap:8px}.phase strong{font-size:11px;color:var(--ink)}.phase span:last-child{font-size:10px;color:var(--muted)}.control-buttons{gap:7px}.icon-button,.speed-button{min-height:44px;height:44px;min-width:44px;width:44px;border-radius:7px;background:white;border:1px solid var(--line);color:#375675;padding:8px}.icon-button .icon{width:19px;height:19px}.speed-button{width:auto;min-width:59px;font-size:12px;gap:5px}.control-divider{display:none}.icon-button:disabled{opacity:.5}.icon-button:hover,.speed-button:hover{background:#edf4fe}.battle-action-bar .ready-partners{background:#fff9df;border-color:#e7d18a}.ready-partners .eyebrow{font-size:10px;color:#745820}.ready-partners button{background:white!important;border:1px solid #d3ba64!important}.ready-partners button small{font-size:10px}
.roster-panel{border-radius:12px;border:1px solid #c4d7e7;background:#fffffff5;box-shadow:var(--shadow);padding:17px 14px 0}.section-heading{gap:8px}.section-heading h2{font:750 19px var(--display);letter-spacing:-.5px}.count-badge{font:700 11px var(--body);color:#315a89;background:#edf4ff;border:0}.roster-panel .panel-description{font-size:11px;margin:6px 0 14px;color:var(--muted)}.roster-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:350px;overflow-y:auto;overscroll-behavior:contain;padding:3px}.pokemon-card{border:1px solid #d5e0ec;background:#f8fbff;border-radius:8px;min-width:0;padding:5px 7px 8px;box-shadow:none}.pokemon-card:hover{border-color:#9cb8d7;background:#eff6ff}.pokemon-card.selected{border-color:var(--red);background:#fff0f3;box-shadow:0 0 0 1px var(--red)}.pokemon-card .sprite{height:57px;width:68px;max-width:100%;object-fit:contain}.pokemon-card strong{font-size:11px;line-height:1.4;color:var(--ink)}.pokemon-card .key{color:#70829b;font-size:9px;left:7px;top:4px}.pokemon-card .card-bottom{gap:3px;margin-top:5px}.type-tag{font-size:8px;padding:3px 5px;color:#40556a;line-height:1.2}.cost{font-size:10px;color:#4b6483;gap:2px}.cost .icon{width:12px;height:12px}.pokemon-card.unaffordable{opacity:.56}.collection-button{border:1px solid #c0d1e4;border-radius:7px;min-height:44px;padding:8px;font-size:11px;background:#eef5ff;color:#214f83;margin:12px 0}.roster-footer{font-size:11px;color:#486586;background:#f4f8fe;padding:10px 9px;margin:0 -14px;border-radius:0 0 12px 12px}.roster-footer .icon{width:16px;height:16px}.selection-detail{margin:12px 0 0;padding:15px 18px;min-height:0;border:1px solid #bdd1e3;border-radius:9px;background:#fff}.selection-detail:has(.selection-empty){display:none}.detail-heading strong{font-size:18px}.detail-heading span{font-size:10px}.detail-description{font-size:12px;line-height:1.6}.detail-stats{font-size:10px;max-width:420px}.detail-stats b{font-size:15px}.tower-actions{max-width:480px}.tower-actions button,.preview-moves-button{min-height:44px;font-size:12px}.xp-block{max-width:480px}.growth-hint{font-size:11px}.selection-detail .preview-moves-button{min-height:44px}.trainer-journal{margin-top:12px;background:#ffffffed;border:1px solid #c4d7e7;border-radius:9px}.trainer-journal summary{display:flex;align-items:center;gap:9px;min-height:48px;padding:10px 14px;font-size:12px;font-weight:650;cursor:pointer;list-style:none}.trainer-journal summary::-webkit-details-marker{display:none}.trainer-journal summary>span{margin-left:auto;font-size:18px}.trainer-journal[open] summary>span{transform:rotate(45deg)}.journal-body{border-top:1px solid var(--line);padding:12px}.team-growth{flex-direction:column;align-items:start;font-size:10px;margin:0;padding:0;gap:5px}.eevee-hint{font-size:11px;line-height:1.6;background:#f3f7fc;border:0;color:#435c80}.encounter-panel{margin:10px 0;padding:12px;background:#f5f8ff;display:flex;gap:8px;border-color:var(--line);border-radius:8px}.encounter-copy .eyebrow{font-size:9px}.encounter-copy strong{font-size:13px}.encounter-copy p{font-size:11px}.encounter-copy small{display:none}.visitor-mystery{width:42px;height:42px;min-width:42px;font-size:28px}.visitor-mystery img{width:42px;height:42px}.field-guide{display:flex;width:100%;min-height:44px;border:0;border-radius:6px;background:#edf4ff;color:#305683;font-size:11px;font-weight:650;padding:10px}.personal-best{display:flex;margin:14px 4px;gap:10px;align-items:center;color:#526987;min-width:0}.personal-best>.icon{width:21px;height:21px}.personal-best>span>span{font-size:8px;letter-spacing:.8px}.personal-best strong{font:650 12px var(--body);color:#29496d}
footer{max-width:1440px;padding:20px 28px;margin:auto;background:none;border:0;gap:20px;color:#4e6885;font-size:11px}.footer-brand{font:650 11px var(--body);letter-spacing:0}footer>span:nth-child(2),footer button{font-size:11px}footer button{min-height:44px;color:#315580}.toast{background:#173957;color:white;font-size:13px}.paused-overlay{background:#f4f9fff0}.paused-overlay h3{color:var(--ink)}.paused-overlay p{color:var(--muted)}
dialog{background:#fff;border:1px solid #a9bfd7;border-radius:14px;max-width:min(900px,94vw);max-height:90svh;color:var(--ink)}dialog::backdrop{background:#17365388;backdrop-filter:blur(3px)}.dialog-content{padding:28px}.dialog-content h2{font:750 27px/1.2 var(--display);letter-spacing:-.8px;margin:7px 0 0}.dialog-intro{font-size:13px;line-height:1.65;color:var(--muted);margin:12px 0 18px}.dialog-close{position:absolute;right:12px;top:12px;background:#f1f6fc}.dialog-content>.eyebrow{font-size:10px;padding-right:40px}.route-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.route-choice{text-align:left;background:#f8fbff;border:1px solid #cbdaea;border-radius:8px;overflow:hidden;padding:0;min-width:0;color:var(--ink)}.route-choice[aria-pressed=true]{border-color:var(--red);box-shadow:0 0 0 2px var(--red);background:#fff0f3}.route-choice canvas{display:block;width:100%;height:auto;aspect-ratio:12/7;image-rendering:pixelated}.route-choice-copy{display:block;padding:10px 11px}.route-choice-copy>small{display:flex;justify-content:space-between;gap:3px;font-size:8px;letter-spacing:.6px;color:#526984}.route-choice-copy strong{display:block;font-size:14px;margin:3px 0}.route-choice-copy>span{font-size:11px;color:var(--muted)}.route-choice-note{margin:15px 0 0;padding:11px 13px;background:#edf4fc;border-left:3px solid #5c85b4;border-radius:4px;font-size:12px;line-height:1.6;color:#385576;min-height:60px}.route-choice-note strong{display:block;font-size:12px;color:var(--ink)}.pace-picker{border:0;padding:0;margin:17px 0}.pace-picker legend{font-size:14px;font-weight:700;margin-bottom:8px}.pace-options{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.pace-options button{border:1px solid #c7d8e9;min-height:44px;border-radius:7px;background:#f5f9fe;font-size:12px;font-weight:650}.pace-options button[aria-pressed=true]{background:#fff0f3;border-color:var(--red);color:#bf0e34;box-shadow:inset 0 0 0 1px var(--red)}#pace-summary{font-size:12px;line-height:1.6;color:var(--muted);margin:10px 0}.route-picker-footer{border-top:1px solid var(--line);padding-top:15px;display:flex;align-items:center;gap:20px;justify-content:space-between}.route-picker-footer>p{font-size:11px;line-height:1.6;color:var(--muted);margin:0;max-width:310px}.route-picker-footer>div{display:flex;gap:8px;flex-shrink:0}.route-picker-footer button{font-size:12px}.guide-step p,.dex-info p{font-size:12px;color:var(--muted)}
@media(min-width:1500px){main{max-width:1360px}.site-header,footer{max-width:1360px}}
@media(max-width:1050px){.game-layout{grid-template-columns:minmax(0,1fr) 226px;gap:14px}.site-header{padding:0 18px}main{padding:6px 18px 0}.battle-title{padding:9px 10px;gap:8px}.battle-title h1{font-size:18px}.ribbon-ball{display:none}.route-picker-button{padding:7px 9px}.map-tags{gap:5px}.exit-label{font-size:10px}.roster-panel{padding:14px 10px 0}.roster-footer{margin:0 -10px}.roster-grid{gap:6px}.pokemon-card .card-bottom .type-tag{display:none}.pokemon-card .card-bottom{justify-content:center}.phase span:last-child{display:none}.control-buttons{gap:4px}.phase strong{font-size:10px}.battle-action-bar .next-wave>strong{font-size:12px}}
@media(max-width:800px){.game-layout{display:flex;flex-direction:column;gap:12px}.battle-column,.team-column{width:100%}.team-column{display:block}.site-header{height:66px;padding:0 14px;gap:10px}.brand{font-size:23px}.brand-mark{width:29px;height:29px}.brand-mark span{left:7px;top:7px}.main-nav{gap:15px;margin-left:auto}.nav-link{font-size:12px}.main-nav .nav-link:first-child{display:none}main{padding:4px 12px 0}.roster-panel{padding:12px 10px 0}.roster-panel .panel-description{display:none}.section-heading h2{font-size:17px}.section-heading{margin-bottom:8px}.roster-grid{display:flex;overflow-x:auto;overflow-y:hidden;max-height:none;gap:8px;padding:3px 2px 6px;scroll-snap-type:x proximity}.pokemon-card{flex:0 0 calc((100% - 24px)/4);min-width:80px;scroll-snap-align:start;padding:4px 5px 7px}.pokemon-card .sprite{width:60px;height:48px}.pokemon-card strong{font-size:11px}.pokemon-card .card-bottom{margin-top:3px}.cost{font-size:10px}.collection-button{margin:7px 0 10px}.roster-footer{display:none}.selection-detail{margin:8px 0 0;padding:12px}.map-caption{font-size:11px;margin:9px 2px 0}.trainer-journal{margin-top:10px}.personal-best{margin:10px 5px}.personal-best>span{display:flex;gap:12px;align-items:center}.battle-action-bar .wave-panel{min-height:83px}.route-choice-copy strong{font-size:13px}.route-choice-copy>span{font-size:10px}.dialog-content{padding:23px}footer{padding:5px 14px 15px;gap:10px;flex-wrap:wrap}footer>span:nth-child(2){display:none}}
@media(max-width:540px){.site-header{height:62px;padding:0 12px}.brand{font-size:21px;gap:6px;letter-spacing:-.7px}.brand-mark{width:25px;height:25px}.brand-mark span{width:10px;height:10px;left:6px;top:6px}.main-nav{gap:12px}.nav-link{font-size:11px}.battle-shell{padding:4px;border-radius:10px}.battle-title{min-height:60px;padding:8px 9px;gap:5px}.battle-title h1{font-size:17px}.battle-title .eyebrow{font-size:8px;letter-spacing:.8px}.difficulty{min-height:44px;padding:7px;font-size:10px}.route-picker-button{min-height:44px;padding:7px;font-size:11px;gap:4px}.route-picker-button .icon{display:none}.battle-stats{min-height:39px;padding:3px 8px;gap:7px}.map-hud{gap:12px}.hud-stat{height:28px;gap:4px}.hud-stat strong{font-size:13px}.hud-stat .icon{width:14px;height:14px}.hud-stat span{font-size:10px}.exit-label{font-size:9px;max-width:94px;line-height:1.3}.battle-action-bar .wave-panel{padding:8px 9px;gap:6px;min-height:82px}.battle-action-bar .next-wave>strong{font-size:11px;max-width:180px}.next-wave>.eyebrow{font-size:8px;letter-spacing:.8px}.battle-action-bar .wave-preview img{width:23px;height:23px}.battle-action-bar .wave-preview .preview-count{font-size:9px}.battle-action-bar .primary-button{min-width:121px;max-width:143px;font-size:11px;gap:6px;padding:10px 9px}.wave-reward{font-size:9px}.battle-controls{min-height:52px;padding:4px 7px;gap:6px}.phase{min-width:0;gap:5px}.phase strong{font-size:10px;line-height:1.35}.phase-light{width:5px;height:5px}.battle-controls .control-buttons{gap:4px}.battle-controls .icon-button{width:40px;min-width:40px;height:44px}.battle-controls .speed-button{min-width:47px;padding:7px 4px;font-size:11px}.speed-button .icon{width:13px}.map-caption{font-size:10px}.route-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.route-choice-copy{padding:8px}.route-choice-copy strong{font-size:12px}.route-choice-note{font-size:11px;min-height:0}.pace-options{gap:6px}.pace-options button{font-size:11px}#pace-summary{font-size:11px}.route-picker-footer{align-items:stretch;flex-direction:column;gap:12px}.route-picker-footer>div{display:grid;grid-template-columns:1fr 1fr}.route-picker-footer>p{max-width:none}.dialog-content{padding:23px 16px}.dialog-content h2{font-size:24px;max-width:240px}.dialog-intro{font-size:12px}.dialog-close{right:8px;top:8px;min-width:38px;width:38px;height:38px;min-height:38px}.choice-card p{font-size:12px}.guide-step p{font-size:12px}.dex-grid{grid-template-columns:1fr}.personal-best>span>span{font-size:8px}.personal-best strong{font-size:11px}.footer-brand{font-size:10px}footer button{font-size:10px}.pad-button{min-width:26px;min-height:26px}}
@media(max-width:360px){.brand{font-size:18px}.main-nav{gap:8px}.nav-link{font-size:10px}main{padding-left:7px;padding-right:7px}.battle-title h1{font-size:15px}.map-hud{gap:8px}.exit-label{max-width:78px}.phase strong{font-size:9px}.battle-controls .control-buttons{gap:2px}.battle-controls .icon-button{min-width:36px;width:36px}.pokemon-card{min-width:73px}.pokemon-card strong{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Compact controls and the best record share the panels they belong to. */
.battle-controls{justify-content:flex-end}
.battle-controls .speed-button{width:auto;min-width:94px;padding:0 0 0 10px;gap:5px;cursor:pointer}
.speed-button select{min-height:42px;min-width:65px;border:0;border-radius:6px;padding:8px 7px;background:transparent;color:inherit;font:600 13px var(--body);cursor:pointer}
.speed-button select:focus-visible{outline:3px solid var(--red);outline-offset:2px}


/* Keep the route chooser's final action visible, including on a small phone. */
dialog:has(.route-choices){width:min(900px,94vw)}
.route-choice canvas{height:100px;object-fit:cover}
.route-picker-footer{position:sticky;bottom:-28px;background:#fff;z-index:2;padding:14px 0 5px;box-shadow:0 -8px 10px #ffffffed}
@media(max-width:540px){.route-choice canvas{height:69px}.route-picker-footer{bottom:-23px;padding-bottom:2px}.route-picker-footer>p{display:none}.route-choice-note{padding:9px 11px}.pace-picker{margin:12px 0}.route-choice-copy>small{font-size:7px}.route-choice-copy>span{font-size:10px}}

@media(min-width:801px){main{max-width:min(1440px,max(940px,calc((100svh - 365px)*1.7143 + 358px)))}}
@media(max-width:540px){.pokemon-card{min-width:0;flex-basis:calc((100% - 24px)/4)}}

/* The maps scroll inside the chooser; challenge and action controls stay reachable. */
dialog:has(.route-choices){overflow:hidden}
.dialog-content:has(.route-choices){display:flex;flex-direction:column;max-height:90svh;min-height:0}
.dialog-content:has(.route-choices)>:not(.route-choices){flex-shrink:0}
.route-choices{min-height:130px;overflow:auto;overscroll-behavior:contain;flex:1 1 auto;align-content:start;grid-auto-rows:max-content;padding:3px;margin:-3px}
.route-picker-footer{position:static;bottom:auto;box-shadow:none;padding:12px 0 0}
@media(max-width:540px){.dialog-content:has(.route-choices){padding:20px 16px 16px}.dialog-content:has(.route-choices) .dialog-intro{margin:8px 0 12px}.route-choice-note{margin-top:10px}.pace-picker{margin:10px 0}.route-picker-footer{padding-top:10px}}

@media(max-height:540px) and (min-width:600px){
 dialog:has(.route-choices){max-height:92svh;width:94vw}
 .dialog-content:has(.route-choices){display:grid;grid-template-columns:minmax(0,1fr) 250px;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px 18px;max-height:92svh;padding:16px}
 .dialog-content:has(.route-choices)>.eyebrow{grid-column:1;grid-row:1}
 .dialog-content:has(.route-choices)>h2{grid-column:1;grid-row:2;font-size:22px;margin:0}
 .dialog-content:has(.route-choices)>.dialog-intro,.route-choice-note{display:none}
 .route-choices{grid-column:1;grid-row:3/5;grid-template-columns:repeat(2,minmax(0,1fr));min-height:70px}
 .route-choice canvas{height:58px}.route-choice-copy{padding:7px 8px}.route-choice-copy strong{font-size:12px}.route-choice-copy>span{font-size:10px}
 .pace-picker{grid-column:2;grid-row:1/4;margin:35px 0 0;align-self:start}.pace-options{grid-template-columns:repeat(2,1fr);gap:6px}.pace-picker legend{font-size:12px}.pace-options button{font-size:11px}#pace-summary{font-size:10px;margin:8px 0 0}
 .route-picker-footer{grid-column:2;grid-row:4;padding-top:8px}.route-picker-footer>p{display:none}.route-picker-footer>div{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:6px}.route-picker-footer button{font-size:11px;padding:8px}
}

/* Keep the battle controls beside the primary action, with no separate strip. */
.wave-countdown{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px 12px;background:#f0f6ff;color:#29496d;border-bottom:1px solid var(--line)}
.wave-countdown[hidden]{display:none}.countdown-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.countdown-copy>strong{font-size:12px}.countdown-copy>span{font-size:10px;color:var(--muted)}
#countdown-time{font-size:22px;line-height:1;font-variant-numeric:tabular-nums;flex-shrink:0}.countdown-track{position:absolute;bottom:0;left:0;right:0;height:3px;background:#dae6f4}.countdown-track>span{display:block;height:100%;background:#5483b2}.countdown-urgent{background:#fff0f3;color:#ab1436}.countdown-urgent .countdown-track>span{background:var(--red)}
@media(max-width:540px){.wave-countdown{padding:8px 9px 10px;gap:8px}.countdown-copy>strong{font-size:11px}.countdown-copy>span{font-size:9px}#countdown-time{font-size:21px}}
.battle-action-bar .wave-panel{display:flex;flex-wrap:wrap;border-bottom:0;gap:8px;padding:10px 12px}
.wave-panel .next-wave{flex:1 1 180px;min-width:0}
.wave-action{display:flex;flex-direction:row;align-items:flex-end;gap:10px;max-width:100%;margin-left:auto}
.wave-start{display:flex;flex-direction:column;align-items:center;gap:5px}
.wave-action .battle-controls{background:none;padding:0;min-height:44px;flex-shrink:0;border-radius:0}
.wave-action .control-buttons{gap:5px}
.roster-panel>.personal-best{display:flex;gap:10px;margin:-17px -14px 14px;padding:11px 14px;border-bottom:1px solid var(--line);background:#f2f7ff;border-radius:12px 12px 0 0}
.roster-panel>.personal-best>.icon{color:#a18b50;width:21px;height:21px}
.roster-panel>.personal-best>span{display:block;min-width:0}
.roster-panel>.personal-best strong{display:block;margin-top:3px}
.special-partners{margin:22px 0;padding:18px;border:1px solid #d6c5ee;border-radius:12px;background:linear-gradient(120deg,#fff6fc,#f0edff)}
.special-partners h3{font-size:18px;margin:0 0 3px}.special-partners>p{font-size:12px;color:var(--muted);margin:0 0 15px}
.special-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.special-card{min-width:0;background:#ffffffcf;border:1px solid #e1d4ed;border-radius:9px;padding:14px;display:flex;flex-direction:column;gap:8px}
.special-card header{display:flex;align-items:center;gap:10px}.special-card header img{width:65px;height:65px;image-rendering:pixelated}.special-card h4{font-size:20px;margin:0}.special-card small{color:#665181;font-size:10px}.special-card p{font-size:12px;margin:0;color:var(--muted)}
.special-card .move-preview{width:100%;height:auto;border-radius:6px;display:block}.special-card .primary-button{margin-top:auto;width:100%;font-size:12px}.special-card progress{width:100%;height:7px;accent-color:#8860b0}.special-card .unlock-note{min-height:32px;font-size:11px}.special-card .owned-partner{color:#346a50;background:#e8f3eb;box-shadow:none;border-color:#bdd5c5}
@media(min-width:801px) and (max-width:1050px){.roster-panel>.personal-best{margin:-14px -10px 12px}}
@media(max-width:800px){.roster-panel>.personal-best{margin:-12px -10px 12px;padding:9px 12px}.roster-panel>.personal-best>span{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.roster-panel>.personal-best strong{margin:0}}
@media(max-width:540px){.battle-action-bar .wave-panel{padding:8px;gap:5px}.wave-panel .next-wave{flex-basis:100%}.wave-action{width:100%;justify-content:space-between;gap:6px}.wave-action .battle-controls .icon-button{width:36px;min-width:36px;height:44px}.wave-action .control-buttons{gap:3px}.wave-action .speed-button{min-width:54px;padding:0;gap:0}.wave-action .speed-button>.icon{display:none}.wave-action .speed-button select{min-width:52px;width:52px;min-height:42px;padding:6px 3px}.wave-action .primary-button{min-width:110px;max-width:none;font-size:11px;padding:10px 8px}.wave-action .wave-start{align-items:stretch}.special-partners{padding:12px}.special-grid{grid-template-columns:1fr}}
@media(max-width:360px){.wave-action .battle-controls .icon-button{width:32px;min-width:32px}.wave-action .control-buttons{gap:2px}.wave-action .speed-button{min-width:48px}.wave-action .speed-button select{min-width:46px;width:46px}.wave-action .primary-button{min-width:100px}}

/* A caught Pokémon stays in the collection until its trainer chooses it. */
.battle-stats{min-height:60px}.map-hud{align-items:center;min-width:0;flex-shrink:1}
.battle-wallet{display:flex;align-items:center;gap:14px;min-width:0}
.wallet-balance{display:flex;flex-direction:column;gap:2px;min-width:0;font-variant-numeric:tabular-nums}
.wallet-balance>small{font-size:10px;line-height:1.2;color:var(--muted);white-space:nowrap}
.wallet-balance>span{display:flex;align-items:center;gap:4px}.wallet-balance strong{font-size:15px;line-height:1.3;color:var(--ink)}
.wallet-balance .icon,.points-mark{width:16px;height:16px;flex-shrink:0}.wallet-balance.coins .icon{color:#97720e}.points-mark{font-size:17px;line-height:16px;color:#8053a2;text-align:center}
#coin-exchange{display:flex;align-items:center;justify-content:center;gap:5px;background:#fff7df;border:1px solid #ddc88c;border-radius:6px;padding:7px 9px;min-height:44px;color:#735517;font-size:11px;font-weight:650;white-space:nowrap;cursor:pointer;pointer-events:auto}
#coin-exchange:hover{background:#ffedb9}#coin-exchange:focus-visible{outline:3px solid var(--red);outline-offset:2px}
#coin-exchange>span{font-size:17px}#coin-exchange.exchange-ready{border-color:#97c3aa;background:#eaf7ee;color:#286145}#coin-exchange.exchange-ready:hover{background:#d7efdf}
@media(min-width:541px) and (max-width:1100px){.battle-stats .exit-label{display:none}}
@media(max-width:540px){.battle-stats{padding:7px 9px}.battle-stats .map-hud{display:grid;grid-template-columns:auto 1fr;gap:5px 16px;width:100%}.battle-wallet{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) auto;gap:10px;padding-bottom:6px;border-bottom:1px solid var(--line)}.wallet-balance strong{font-size:14px}.battle-stats .hud-stat{height:23px}.battle-stats .exit-label{display:none}}
dialog:has(.collection-upgrades){width:min(900px,94vw)}
.collection-upgrades{padding:16px;margin:14px 0;background:#f2f7ff;border-color:#c5d6e8;color:var(--ink)}
.collection-totals strong{font-size:27px}.collection-totals{margin-bottom:12px}
.collection-actions{display:flex;gap:10px}.collection-actions button{flex:1;min-width:0;min-height:44px;font-size:12px}.collection-actions .primary-button{width:auto}
.collection-upgrades .reserve-note{padding:8px 10px}.reserve-note b{display:inline}
.recruit-section{margin:22px 0}.recruit-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.recruit-heading h3,.catalog-heading{font-size:18px;margin:0}.recruit-heading>span{font-size:11px;color:#456d54;background:#e6f2e9;padding:5px 9px;border-radius:20px;white-space:nowrap}
.catalog-heading{margin:20px 0 12px}.recruit-section .dex-entry{display:flex;flex-direction:column;min-width:0;border:1px solid #b7d4c0;background:#f7fcf8}
.recruit-section .collection-status{color:#316b47}.recruit-section .recruit-hint{font-size:11px;margin:12px 0 8px;color:var(--muted)}
.recruit-section .primary-button{width:100%;min-height:44px;margin-top:auto;font-size:12px}.recruit-section .shiny-toggle{align-self:flex-start}
.exchange-balances{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:15px;background:#f2f7ff;border:1px solid var(--line);border-radius:9px}
.exchange-balances small{display:block;font-size:10px;letter-spacing:.5px;color:var(--muted)}.exchange-balances strong{display:block;font-size:25px;margin-top:5px}
.exchange-offer{text-align:center;background:#fff8e2;border:1px solid #e1ce90;border-radius:9px;padding:22px 12px;margin:15px 0}.exchange-offer>strong{font-size:23px}.exchange-offer>strong>span{padding:0 12px;color:#997b34}.exchange-offer p{font-size:12px;margin:8px 0 0;color:#735e2c}.exchange-status{font-size:13px;color:#405b7b;line-height:1.6}
@media(max-width:540px){.collection-actions{flex-direction:column}.collection-actions button{width:100%}.recruit-heading h3{font-size:16px}.exchange-offer>strong{font-size:19px}.exchange-offer>strong>span{padding:0 5px}.exchange-balances{gap:8px;padding:12px}.exchange-balances small{font-size:8px}#confirm-exchange{font-size:11px;padding:12px 9px}}
@media(max-width:360px){.site-header{padding:0 8px;gap:6px}.brand{font-size:16px}.main-nav{gap:6px}}

.special-wallet{padding:10px;border:1px solid #d7c5e8;background:#fff;border-radius:7px;line-height:1.6}
.admin-banner{display:flex;align-items:center;gap:8px;background:#fff5d7;border:1px solid #d6b666;border-radius:9px;padding:8px 12px;margin:0 0 12px;color:#705113}
.admin-banner[hidden]{display:none}.admin-banner>div{flex:1;min-width:0}.admin-banner strong{display:block;font-size:11px;letter-spacing:.6px}.admin-banner span{display:block;font-size:10px;margin-top:3px}
.admin-banner button{min-height:44px;padding:8px 12px;border:1px solid #d6b666;background:#fffaf0;border-radius:6px;font-size:12px;white-space:nowrap}
.admin-entry{margin-top:8px;justify-content:center}.admin-login label,.admin-wave label{display:block;font-size:13px;font-weight:650;margin:0 0 8px}
.admin-login input,.admin-wave select{width:100%;min-height:44px;background:#f6f9fe;border:1px solid #b7cbe1;border-radius:7px;padding:10px;font:inherit;color:var(--ink)}
.admin-login input:focus-visible,.admin-wave select:focus-visible{outline:3px solid var(--red);outline-offset:2px}.admin-login #admin-error{font-size:12px;min-height:18px;color:#b4173c}
.admin-tools{display:grid;grid-template-columns:1fr 1fr;gap:9px}.admin-tools button,.admin-wave button{min-height:44px;justify-content:center;font-size:12px}
.admin-wave{margin:20px 0 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}.admin-wave label{grid-column:1/-1;margin:0}
.admin-testing .exit-label{display:none}
@media(max-width:540px){.admin-banner{padding:7px;gap:5px}.admin-banner strong{font-size:9px}.admin-banner span{font-size:9px}.admin-banner button{padding:7px;font-size:10px}.admin-tools{grid-template-columns:1fr}.admin-wave{grid-template-columns:1fr}.admin-wave label{grid-column:auto}.collection-totals small{font-size:8px}.special-wallet{font-size:11px}}
