body.maps-page{margin:0}
body.maps-page .site-page-intro{padding:12px 20px;margin-block:12px}
body.maps-page .site-page-intro__description{display:none}
#chapter-map-app{width:min(var(--site-content-max,1480px),calc(100% - 24px));margin:0 auto 24px;color:var(--maple-text);font-size:14px}
#chapter-map-app *{box-sizing:border-box}#chapter-map-app [hidden]{display:none!important}
.cm-panel{padding:8px 0;background:transparent;border:0;border-radius:0;box-shadow:none}
.cm-sidebar,.cm-canvas{min-width:0}
.cm-controls{display:grid;grid-template-columns:minmax(290px,1.4fr) minmax(110px,.6fr) minmax(140px,.7fr) auto;gap:14px;align-items:end}
#chapter-map-app button,#chapter-map-app select{min-height:40px;border:1px solid var(--maple-line);border-radius:8px;background:var(--maple-surface);color:var(--maple-text);font:inherit;padding:6px 12px;cursor:pointer}
#chapter-map-app :is(button,select,input):focus-visible{outline:3px solid var(--maple-positive);outline-offset:2px}
#chapter-map-app button:hover{background:var(--maple-panel)}#chapter-map-app button:disabled{opacity:.4;cursor:default}
.cm-modes{display:flex;padding:3px;background:var(--maple-panel);border-radius:10px;border:1px solid var(--maple-line)}
#chapter-map-app .cm-modes button{flex:1;border:0;background:transparent;font-size:14px;white-space:nowrap}
#chapter-map-app .cm-modes [aria-pressed="true"]{background:var(--maple-surface);color:var(--maple-accent);box-shadow:0 1px 4px #0002}
.cm-field{display:grid;gap:4px;font-size:12px;color:var(--maple-muted);min-width:0}.cm-field select{width:100%;font-size:15px!important}
.cm-step{display:flex;gap:5px}#chapter-map-app .cm-step button{width:40px;font-size:24px;line-height:1;padding:0}
.cm-metrics{display:grid;grid-template-columns:1.2fr 1fr .8fr 1fr;border-block:1px solid var(--maple-line);margin:15px 0 12px}
.cm-metrics>div{padding:10px 16px;border-right:1px solid var(--maple-line);min-width:0}.cm-metrics>div:first-child{padding-left:0}.cm-metrics>div:last-child{border:0}
.cm-metrics span,.cm-metrics small{display:block;font-size:12px;color:var(--maple-muted)}.cm-metrics strong{display:block;font-size:22px;font-variant-numeric:tabular-nums;line-height:1.5;white-space:nowrap}.cm-metrics small{font-size:11px;line-height:1.3}.cm-rate strong{color:var(--maple-positive)}
.cm-maphead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}#chapter-map-app h2{font-size:17px;margin:0}
.cm-layers{display:flex;gap:13px;flex-wrap:wrap}.cm-layers label{display:flex;align-items:center;gap:5px;font-size:12px;cursor:pointer;white-space:nowrap}.cm-layers input{width:16px;height:16px;margin:0;accent-color:var(--maple-positive)}
.cm-mapbox{position:relative;background:var(--maple-page);border:1px solid var(--maple-line);border-radius:10px;overflow:hidden}
#cm-map{width:100%;height:clamp(290px,calc(100dvh - 380px),440px);display:block}
.cm-gridline{stroke:var(--maple-line);stroke-opacity:.24;stroke-width:1}.cm-axis{font-family:var(--ui-font-sans,sans-serif);font-size:10px;fill:var(--maple-muted)}
.cm-zero{stroke:var(--maple-muted);stroke-opacity:.5;stroke-width:1;stroke-dasharray:4 4}
.cm-segment{stroke:var(--maple-text);stroke-width:2.8;stroke-linecap:round}.cm-segment.is-ground{stroke:var(--maple-positive);stroke-width:3.8}.cm-segment.is-wall{stroke:var(--maple-purple);stroke-dasharray:4 3;stroke-width:2}.cm-segment.is-selected{stroke:var(--maple-accent);stroke-width:5}
.cm-hit{stroke:transparent;stroke-width:13;cursor:pointer;fill:none}.cm-hit:focus{stroke:var(--maple-accent);stroke-opacity:.25}.cm-spawn{fill:var(--maple-accent);stroke:var(--maple-surface);stroke-width:1}.cm-spawn.is-special{fill:var(--maple-surface);stroke:var(--maple-purple);stroke-width:2}.cm-hit-dot{fill:transparent;cursor:pointer}.cm-hit-dot:focus{stroke:var(--maple-accent);stroke-width:2}.cm-start{fill:var(--maple-positive);stroke:var(--maple-surface);stroke-width:1}.cm-ring{fill:none;stroke:var(--maple-text);stroke-width:1.5}
.cm-tooltip{position:absolute;pointer-events:none;background:var(--maple-surface);color:var(--maple-text);border:1px solid var(--maple-line);border-radius:7px;max-width:min(380px,95%);padding:7px 10px;font-size:12px;box-shadow:0 3px 12px #0002}
.cm-legend{display:flex;align-items:center;gap:8px 15px;flex-wrap:wrap;font-size:11px;color:var(--maple-muted);margin:8px 0}.cm-legend span{display:flex;align-items:center;gap:5px}.cm-legend small{margin-left:auto;font-size:11px}.cm-key{display:inline-block;width:15px;border-top:3px solid var(--maple-text)}.cm-key.cm-ground{border-color:var(--maple-positive)}.cm-key.cm-wall{border-color:var(--maple-purple);border-top-style:dashed}.cm-key.cm-dot{width:6px;height:6px;border:0;border-radius:50%;background:var(--maple-accent)}.cm-key.cm-frame{height:9px;border:1px dashed var(--maple-muted)}
.cm-selected{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0;min-height:32px}.cm-selected p{margin:0;font-size:12px;overflow-wrap:anywhere}#chapter-map-app .cm-selected button{min-height:27px;padding:1px 8px;font-size:11px}
.cm-note{font-size:11px;color:var(--maple-muted);margin:7px 0 0}.cm-details{margin-top:10px;font-size:12px}.cm-details summary{cursor:pointer;color:var(--maple-muted)}.cm-tablewrap{overflow:auto;max-height:260px;margin-top:8px}.cm-tablewrap table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}.cm-tablewrap th,.cm-tablewrap td{padding:5px 8px;text-align:left;border-bottom:1px solid var(--maple-line);white-space:nowrap}.cm-tablewrap th{background:var(--maple-surface);position:sticky;top:0}#chapter-map-app .cm-tablewrap button{min-height:28px;padding:2px 8px;font-size:12px}
@media(max-width:900px){.cm-controls{grid-template-columns:1fr 1fr auto;gap:8px}.cm-modes{grid-column:1/-1}.cm-metrics strong{font-size:19px}.cm-metrics>div{padding-inline:10px}}
@media(min-width:1000px){.cm-panel{display:grid;grid-template-columns:265px minmax(0,1fr);gap:20px;align-items:start}.cm-controls{grid-template-columns:1fr 1fr;gap:10px}.cm-modes{grid-column:1/-1;flex-direction:column}.cm-step{grid-column:1/-1}#chapter-map-app .cm-step button{flex:1}.cm-metrics{grid-template-columns:1fr 1fr;margin:16px 0 0;border-bottom:0}.cm-metrics>div{padding:12px 8px!important;border-bottom:1px solid var(--maple-line)}.cm-metrics>div:nth-child(even){border-right:0}.cm-metrics>div:first-child{grid-column:1/-1;border-right:0}.cm-metrics>div:nth-child(2){border-right:1px solid var(--maple-line)}.cm-metrics>div:nth-child(3){border-right:0}.cm-metrics>div:last-child{grid-column:1/-1;padding-top:18px!important}.cm-metrics strong{font-size:20px}.cm-metrics .cm-rate strong{font-size:25px}.cm-maphead{min-height:30px}#cm-map{height:clamp(280px,calc(100dvh - 370px),460px)}}
@media(max-width:550px){#chapter-map-app{width:calc(100% - 16px)}.cm-panel{padding:4px 0}.cm-metrics{grid-template-columns:1.15fr 1fr;margin-top:12px}.cm-metrics>div{padding:8px 10px!important}.cm-metrics>div:nth-child(even){border-right:0}.cm-metrics>div:nth-child(-n+2){border-bottom:1px solid var(--maple-line)}.cm-metrics strong{font-size:17px}.cm-metrics span{font-size:11px}.cm-maphead{align-items:flex-start;flex-direction:column;gap:6px}.cm-layers{gap:12px}#cm-map{height:280px}.cm-legend{gap:7px 10px}.cm-legend small{margin-left:0;flex-basis:100%}.cm-axis{font-size:9px}.cm-modes button{font-size:13px!important}.cm-field select{font-size:14px!important}}
