body.endless .intel p{margin:0;width:100%;overflow-wrap:anywhere}body.endless .controls{flex-wrap:wrap}body.endless .controls a{align-self:center;color:var(--gold)}body.endless select{font:inherit;background:var(--panel);color:var(--ink);border:1px solid var(--line);padding:8px;max-width:170px}body.endless .panel{display:block;min-width:0}body.endless .panel h2{font-size:17px;margin:0 0 8px}body.endless .purchase-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}body.endless .purchase-grid button{min-height:44px;padding:8px 5px}body.endless .panel hr{border:0;border-top:1px solid var(--line);margin:14px 0}body.endless .slot.locked{border-color:#8b8b76;background:rgba(12,20,24,.7)}body.endless .slot.moving{outline:3px solid #8fe0ff}body.endless .choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}body.endless .choice-grid button{white-space:normal;text-align:left;min-height:130px}body.endless .choice-grid strong,body.endless .choice-grid span{display:block}body.endless .choice-grid span{font-size:14px;margin-top:8px;color:var(--muted)}body.endless .guide{max-height:85vh;overflow:auto}body.endless .log ul{max-height:160px;overflow:auto;padding-left:20px}body.endless #panel-note{color:var(--gold)}body.endless #preview{color:var(--muted);font-size:13px}body.endless #status{color:var(--gold)}body.endless #storage.danger{color:var(--danger)}body.endless #extras{font-size:13px;color:var(--muted)}body.endless .muted{overflow-wrap:anywhere}
@media(max-width:700px){body.endless .brand{display:block}body.endless .brand strong{font-size:17px}body.endless .brand small{font-size:10px}body.endless .choice-grid{grid-template-columns:1fr}body.endless .choice-grid button{min-height:72px}body.endless select{max-width:155px}body.endless .controls button{padding:7px}body.endless .map-tools{flex-wrap:wrap}body.endless .eb2{row-gap:8px}}

body.endless .map-tools>div{display:flex;flex-wrap:wrap;gap:6px 10px}body.endless .map-tools label{display:flex;align-items:center;gap:4px;white-space:nowrap}

body.endless #preview.boss-alert{color:var(--gold);font-weight:600}

.endless .archive-tools { margin: 1rem 0; }
.endless .archive-tools select { display: block; width: 100%; max-width: 100%; margin: .4rem 0; }
.endless .archive-tools button { width: 100%; }

body.endless #end-review,body.endless #last-battle-copy{font-size:14px;line-height:1.6;overflow-wrap:anywhere}body.endless #end-review ul,body.endless #last-battle-copy ul{padding-left:20px}body.endless #end-review h3,body.endless #last-battle-copy h3{font-size:16px;margin:12px 0 8px}body.endless #end-review li+li{margin-top:7px}body.endless #last-battle{margin:12px 0}
body.endless #end .row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.endless #end #retry{grid-column:1/-1;min-height:44px}body.endless #end .row a{align-self:center;text-align:center}

body.endless #aim-status{position:absolute;top:6px;left:6px;right:6px;margin:0;padding:6px;background:rgba(17,26,30,.94);color:var(--gold);border-radius:6px;pointer-events:none;font-size:12px;z-index:4}

body.endless #wave-intel{width:100%;font-size:14px;line-height:1.6;min-width:0}
body.endless #wave-intel summary{cursor:pointer;padding-block:8px;color:var(--gold)}
body.endless #wave-intel ul{padding-left:1.25rem;margin:.5rem 0}
body.endless #wave-intel li+li{margin-top:.6rem}
body.endless #wave-intel p{margin:.2rem 0;color:var(--muted);overflow-wrap:anywhere}

body.endless #action-previews{font-size:14px;line-height:1.6;margin-block:12px}
body.endless #action-previews summary{cursor:pointer;padding-block:8px;color:var(--gold)}
body.endless #action-previews p{color:var(--muted)}
body.endless #action-previews h3{margin:12px 0 4px}
body.endless #action-previews ul{padding-left:1.25rem;margin:0 0 8px}
body.endless .sale-confirmation{padding:10px;margin-block:12px;border:1px solid var(--gold);border-radius:8px;font-size:14px;line-height:1.6}
body.endless .sale-confirmation h3{margin:0 0 6px}
body.endless .sale-confirmation button{min-height:44px;margin:4px 4px 0 0;white-space:normal}

body.endless .choice-grid .choice-impact{margin-top:12px;font-size:13px;color:var(--ink);line-height:1.55}
body.endless .choice-grid .choice-impact span{font-size:inherit;color:inherit;margin-top:5px}

body.endless #placement-previews{font-size:14px;line-height:1.6;margin-block:12px}
body.endless #placement-previews summary{cursor:pointer;padding-block:8px;color:var(--gold)}
body.endless #placement-previews ul{padding-left:1.25rem}
body.endless #placement-previews li+li{margin-top:10px}
body.endless #placement-previews p{margin:4px 0;color:var(--muted);overflow-wrap:anywhere}

body.endless #priority-panel{margin-block:12px;font-size:14px;line-height:1.6}
body.endless #priority-panel h3{font-size:15px;margin:0 0 6px}
body.endless .priority-options{display:flex;flex-wrap:wrap;gap:6px}
body.endless .priority-options button{flex:1;min-width:70px;min-height:44px;white-space:normal}
body.endless .priority-options button[aria-pressed=true]{border-color:var(--gold);background:var(--gold);color:#172126;font-weight:700}
body.endless #priority-copy{margin:6px 0}

body.endless #relocation-preview{margin-block:12px;padding:10px;border:1px solid var(--gold);border-radius:8px;font-size:14px;line-height:1.6}
body.endless #relocation-preview h3{font-size:16px;margin:0 0 8px}
body.endless #relocation-preview label{display:block;margin-bottom:4px}
body.endless #relocation-destination{width:100%;max-width:100%;min-height:44px}
body.endless #relocation-copy p{margin:8px 0}
body.endless #relocation-confirm{width:100%;min-height:44px;white-space:normal}
body.endless .slot.relocation-available{outline:2px dashed var(--gold);outline-offset:2px}

body.endless #pack-previews{font-size:14px;line-height:1.6;margin-block:12px}
body.endless #pack-previews summary{cursor:pointer;padding-block:8px;color:var(--gold)}
body.endless #pack-previews h4{font-size:15px;margin:14px 0 6px}
body.endless #pack-previews p{margin:6px 0;color:var(--muted)}
body.endless #pack-previews ul{padding-left:1.25rem;margin:8px 0;overflow-wrap:anywhere}
body.endless #pack-previews li+li{margin-top:8px}

body.endless #troops[hidden],body.endless #training-tools[hidden]{display:none}
body.endless #training-tools{font-size:14px;line-height:1.6;margin-block:12px}
body.endless #training-tools button{min-height:44px;width:100%;white-space:normal}
body.endless #training-tools p{margin:6px 0}
body.endless #run-details>p{font-size:14px;line-height:1.6}

body.endless #next-enemy-intel{border-top:1px solid var(--line);margin-top:14px;padding-top:4px}
body.endless #next-enemy-intel h3{font-size:16px;margin:14px 0 6px}
body.endless #next-enemy-intel h4{font-size:14px;margin:12px 0 4px}
body.endless #next-enemy-intel p{font-size:14px;overflow-wrap:anywhere}

body.endless #bar-legend{font-size:12px;line-height:1.5}

body.endless #record-progress{font-size:14px;line-height:1.6;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0;margin:12px 0}
body.endless #record-progress h3{font-size:16px;margin:0 0 6px}
body.endless #record-progress p{margin:5px 0;overflow-wrap:anywhere}
body.endless #record-category{color:var(--muted)}
body.endless #record-progress.record-improved #record-result{color:var(--gold);font-weight:700}

body.endless #return-to-slot{min-height:44px;margin-block:0 8px;white-space:normal}
body.endless #slot-help{font-size:14px;line-height:1.6;margin-block:0 12px}
body.endless #slot-help summary{cursor:pointer;color:var(--gold);padding-block:6px}
body.endless #slot-help p{margin:6px 0}

body.endless #archive-preview{font-size:14px;line-height:1.6;margin-block:12px;padding-block:10px;border-block:1px solid var(--line)}
body.endless #archive-preview h4{font-size:15px;margin:0 0 8px}
body.endless #archive-preview p{margin:6px 0}
body.endless #archive-preview ul{padding-left:1.2rem;overflow-wrap:anywhere}

body.endless .map-tools .map-actions{display:flex;flex-direction:column;gap:6px;align-items:stretch}
body.endless .map-actions button{min-height:44px;white-space:normal}
body.endless #viewport:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@media(min-width:861px){body.endless .map-tools .map-actions{flex-direction:row}}

body.endless #placement-previews [data-placement-preview]{min-height:44px;max-width:100%;white-space:normal;text-align:left}
body.endless #placement-previews [aria-pressed=true]{color:var(--bg);background:var(--gold)}
body.endless #route-coverage{font-size:14px;line-height:1.6;overflow-wrap:anywhere}

body.endless .intel #route-warning{color:var(--danger);font-size:13px;line-height:1.6}

body.endless #combat-dock{position:fixed;inset-inline:10px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:8;max-width:420px;margin-inline:auto;padding:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px}
body.endless #combat-dock[hidden]{display:none}
body.endless #combat-dock p{margin:0 0 6px;font-size:13px;color:var(--ink);font-variant-numeric:tabular-nums}
body.endless #combat-dock>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.endless #combat-dock button{min-height:44px;white-space:normal;font-size:14px}
body.endless.combat-docked .eb2{padding-bottom:calc(110px + env(safe-area-inset-bottom))}

body.endless #map-apply{min-height:44px;max-width:100%;white-space:normal}
body.endless #map-pending{flex-basis:100%;margin:0;font-size:13px;line-height:1.5}
