:root{color-scheme:dark;--yellow:#f6ce45;--muted:#929eae;--line:#303b49}*{box-sizing:border-box}body{margin:0;background:#10161e;color:#edf0f4;font:14px system-ui,'Segoe UI',sans-serif}header{height:94px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 5vw;background:#18212b}header b{font-size:31px;letter-spacing:2px}header em{color:var(--yellow)}header small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted)}header>span{font-size:11px;line-height:1.9;letter-spacing:2px;color:var(--muted)}select,input,textarea{background:#111820;border:1px solid #414c5a;color:#f1f3f7;padding:11px;border-radius:5px;font:inherit}button{cursor:pointer;font:inherit;background:#26323f;border:1px solid #414c5a;color:#e2e6ec;border-radius:5px;padding:8px 12px}button:hover{border-color:var(--yellow)}button:focus-visible,a:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}main{max-width:1540px;margin:auto;padding:36px 5vw 20px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--yellow);font-weight:700}h1{font-size:34px;letter-spacing:-1px;margin:10px 0}p{color:var(--muted);line-height:1.8;margin:0}.badge{border:1px solid #5b5331;background:#29291f;padding:10px 14px;color:var(--yellow);border-radius:5px}.badge span{font-size:11px;margin-left:8px;color:#bcb8a0}.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:8px;margin-bottom:24px;background:#18212b}.stats>div{padding:19px 24px;border-right:1px solid var(--line)}.stats>div:last-child{border:0}.stats small{display:block;color:var(--muted);font-size:11px}.stats b{display:block;font-size:30px;margin-top:5px}.stats strong{display:block;font-size:13px;margin-top:17px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px}.map-panel,aside{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#18212b}.toolbar{height:59px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 18px}.toolbar strong{font-size:12px}.toolbar button{padding:4px 10px}.toolbar span{font-size:10px;margin:0 8px;color:var(--muted)}.map-scroll{height:640px;overflow:auto;background:radial-gradient(ellipse at center,#293640,#111820 80%);padding:22px}svg{display:block;width:100%;min-width:420px;height:auto;margin:auto}svg rect{stroke:#141b24;stroke-width:2;cursor:pointer}svg rect:hover,svg rect:focus{filter:brightness(1.3);outline:none;stroke:#fff;stroke-width:3}svg rect.selected{stroke:#fff;stroke-width:4}svg text{pointer-events:none;fill:#e4e5dc;font:600 9px sans-serif;text-anchor:middle}svg text.owned{fill:#141b24}svg .label{font-size:8px}.map-footer{display:flex;justify-content:space-between;padding:13px 18px;color:var(--muted);font-size:10px;border-top:1px solid var(--line)}.yellow{color:var(--yellow)}aside{padding:22px}h2{font-size:21px;margin:16px 0 7px}.hint{font-size:11px;margin-bottom:24px}label{display:block;margin-bottom:17px}label>span{display:block;font-size:11px;color:#b7c0cc;margin-bottom:8px}label input:not([type=color]),textarea{width:100%}#swatches{display:inline-flex;gap:8px;margin:6px 12px 8px 0}#swatches button{width:22px;height:22px;border-radius:50%;padding:0;border:2px solid #ffffff44}input[type=color]{width:34px;height:34px;padding:3px;vertical-align:middle}.primary,.secondary{display:block;width:100%;margin-top:9px;font-weight:700}.primary{background:var(--yellow);color:#191c20;border-color:var(--yellow)}.secondary{background:transparent;color:#a5b0bf}.storage{border-top:1px solid var(--line);margin-top:25px;padding-top:21px}.storage strong{font-size:12px}.storage p{font-size:11px;margin:9px 0 15px}.storage button{font-size:11px}footer{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:#84909e;margin-top:24px}a{color:#a7b4c3}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:var(--yellow);color:#181c21;padding:12px 24px;border-radius:6px;display:none;font-weight:700}@media(max-width:900px){.workspace{grid-template-columns:1fr}.map-scroll{height:520px}header>span{display:none}.intro{display:block}.badge{display:inline-block;margin-top:16px}h1{font-size:27px}.stats>div{padding:14px 10px}.stats strong{font-size:11px}main{padding:25px 4vw}.map-footer{gap:12px}.toolbar{padding:0 10px}footer{gap:16px}}
/* Fit the entire square at 100%, with more space devoted to the map. */
main{max-width:1800px;padding:24px 2.5vw 16px}header{height:76px;padding:0 2.5vw}.intro{margin-bottom:16px}h1{font-size:28px;margin:7px 0}.stats{margin-bottom:18px}.stats>div{padding:12px 20px}.stats b{font-size:25px}.stats strong{margin-top:12px}.workspace{grid-template-columns:minmax(0,1fr) 290px;gap:18px;align-items:start}.map-scroll{--map-height:clamp(380px,calc(100dvh - 345px),1000px);--map-size:min(100cqw,var(--map-height));container-type:inline-size;height:calc(var(--map-height) + 24px);padding:12px;overflow:auto}#map{width:var(--map-size);min-width:0;max-width:none;height:auto;margin:0 auto}svg text{font-size:11px}aside{padding:18px}.toolbar{height:48px}.map-footer{min-height:36px;padding:10px 16px}
@media(max-width:900px){main{padding:20px 3vw}.workspace{grid-template-columns:1fr}.map-scroll{--map-height:min(85vw,calc(100dvh - 130px));height:calc(var(--map-height) + 24px)}.stats>div{padding:12px 10px}.intro{margin-bottom:18px}h1{font-size:25px}}
.saved-maps h3{font-size:14px;margin:0 0 14px}.saved-maps input,.saved-maps select,.saved-maps button{width:100%;margin-bottom:10px}.saved-maps select{font-size:11px;padding:6px}.saved-maps option{padding:8px;white-space:normal}.saved-maps button:disabled{opacity:.45;cursor:default}
.map-footer .yellow{display:flex;flex-wrap:wrap;gap:12px}.map-footer{gap:14px}.saved-maps select{min-height:180px}#swatches button:focus{outline:2px solid white;outline-offset:3px}
.saved-maps .delete-map{color:#f09b9f;border-color:#825057;background:#36242b}.saved-maps button:disabled{opacity:.4}
svg .target-outline{fill:none;stroke:#ff4c55;stroke-width:4;stroke-dasharray:8 4;filter:drop-shadow(0 0 2px #111);pointer-events:none}svg .target-badge{fill:#ff4c55;stroke:#fff;stroke-width:1.5;pointer-events:none}svg text.target-number{fill:#fff;font:bold 13px system-ui;pointer-events:none}.target-panel{margin:0 0 22px;padding:0 0 20px;border-top:0;border-bottom:1px solid var(--line)}.target-panel h3{margin:0 0 12px;font-size:15px}.target-panel>button{width:100%}.target-panel p{font-size:11px;margin:12px 0}.target-panel ol{list-style:none;padding:0;margin:0;max-height:220px;overflow:auto}.target-panel li{display:flex;gap:5px;margin:6px 0}.target-panel li button{padding:6px 9px;font-size:12px}.target-panel li button:first-child{flex:1;text-align:left}.target-panel .empty-targets{color:var(--muted);font-size:11px}.target-panel button:disabled{opacity:.4}
svg .target-outline-shadow{fill:none;stroke:#080b10;stroke-width:7;pointer-events:none}svg .target-outline{fill:none;stroke:#fff;stroke-width:3;stroke-dasharray:8 4;filter:none;pointer-events:none}svg .target-badge{fill:#10151c;stroke:#fff;stroke-width:1.5}.target-panel>button[aria-pressed=true]{background:#edf0f4;color:#10151c;border-color:#fff}
svg .target-icon-shadow{fill:none;stroke:#080b10;stroke-width:5;pointer-events:none}svg .target-icon{fill:none;stroke:#fff;stroke-width:2;pointer-events:none}
svg .target-outline{stroke:#ff4655}svg .target-badge{fill:#bd2033;stroke:#fff}svg .battle-icon{pointer-events:none}svg .battle-icon-disc{fill:#111820;stroke:#ff4655;stroke-width:1.5}svg .battle-sword{fill:#ff4655;stroke:#ff4655;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}.target-panel>button[aria-pressed=true]{background:#bd2033;border-color:#ff4655;color:white}
.toolbar .png-export{background:var(--yellow);color:#171c23;border-color:var(--yellow);font-weight:700;margin-left:8px}.toolbar .png-export:disabled{opacity:.5}@media(max-width:600px){.toolbar{height:auto;min-height:60px;flex-wrap:wrap;gap:8px;padding:10px}.toolbar>div{display:flex;align-items:center;flex-wrap:wrap;gap:4px}}
