:root {
  color-scheme: dark;
  --bg: #10151e;
  --panel: #182231;
  --surface: #1b2636;
  --line: #344255;
  --fg: #edf2f7;
  --muted: #b8c4d4;
  --accent: #f2bd6b;
  --success: #bce1a0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
h1, h2, h3, h4 { font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; color: inherit; }
button, select, input:not([type=checkbox]) { min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: #111c29; }
button, select { cursor: pointer; }
button { padding: .38rem .68rem; }
button:hover { border-color: #8b9aad; }
button[aria-pressed=true] { background: #283648; border-color: #71839b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.frame { width: min(100% - 48px, 1430px); margin-inline: auto; }
.skip-link { position: fixed; inset: .5rem auto auto .5rem; z-index: 10; background: var(--bg); padding: 1rem; transform: translateY(-140%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header, .site-footer { background: #111a27; border-block: 1px solid #293547; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.masthead { min-height: 65px; }
.masthead nav { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; }
.masthead a { min-height: 44px; display: inline-flex; align-items: center; color: var(--fg); text-decoration: none; }
.masthead a:hover, .footer-inner a:hover { color: var(--accent); }
.brand { gap: .55rem; font-weight: 750; }
.brand-mark { display: grid; place-items: center; background: #243044; color: var(--accent); border: 1px solid #4a5b70; border-radius: 8px; font-size: 1.35rem; width: 33px; aspect-ratio: 1; }
.intro { margin-block: 1.4rem 1.25rem; }
.intro h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.045em; }
.intro p, .section-lead { margin-top: .44rem; color: var(--muted); }
.atlas { display: grid; grid-template-columns: 298px minmax(0, 1fr); min-height: 635px; height: min(720px, 78vh); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--surface); }
.atlas:fullscreen { height: 100%; border: 0; border-radius: 0; }
.atlas-sidebar { min-height: 0; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.search-area, .atlas-filters { padding: .8rem 1rem; }
.search-area { padding-bottom: .4rem; }
.atlas label, .atlas legend { display: block; font-size: .85rem; font-weight: 650; color: var(--muted); }
.search-control { display: flex; gap: .35rem; margin-top: .35rem; }
.search-control input { width: 100%; min-width: 0; padding: .48rem .65rem; }
.search-control input::-webkit-search-cancel-button { appearance: none; }
.search-control button, .map-actions button, .close-point, .close-drawer { min-width: 44px; }
.atlas-filters select { width: 100%; margin: .2rem 0 .6rem; padding-inline: .55rem; }
.atlas-filters fieldset { border: 0; padding: 0; margin: .1rem 0 .5rem; min-width: 0; }
.layer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .38rem; margin-top: .26rem; }
.layer-grid button, .filter-options button, #clear-progress { font-size: .81rem; }
.layer-grid button { display: flex; gap: .4rem; align-items: center; text-align: left; }
.marker-swatch { display: inline-grid; place-items: center; flex: none; width: 1.42rem; aspect-ratio: 1; font-size: .78rem; font-weight: 800; border-radius: 50%; color: #111a24; background: var(--point, #acb8c8); }
.atlas-icon-library { position: absolute; pointer-events: none; }
.category-icon, .pin-glyph { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.category-icon { width: 1rem; height: 1rem; }
.filter-options { margin-bottom: .75rem; display: flex; justify-content: space-between; gap: .35rem; }
.result-pane { min-height: 0; flex: 1; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.result-top { padding: .55rem 1rem .3rem; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .86rem; }
.nearby-station { display: grid; gap: .25rem; padding: .32rem 1rem; color: var(--muted); font-size: .86rem; }
#atlas-results { list-style: none; padding: .25rem .75rem .55rem; margin: 0; overflow: auto; overscroll-behavior: contain; }
.result-button { width: 100%; text-align: left; display: flex; align-items: center; gap: .6rem; background: transparent; border-color: transparent; }
.result-button:hover, .result-button.keyboard-active { background: #27364a; }
.result-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.result-text small { color: var(--muted); margin-top: .15rem; }
.found-mark, .route-available { color: var(--success); }
.empty-result { padding: .5rem; color: var(--muted); }
.map-panel { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.map-toolbar { background: #152030; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .8rem; z-index: 1; border-bottom: 1px solid var(--line); }
.map-toolbar h2 { font-size: 1rem; }
.map-toolbar button { font-size: .84rem; }
.map-viewport { position: relative; background: #131d2a; overflow: hidden; flex: 1; touch-action: pan-y; min-height: 0; }
.map-viewport.gestures-enabled { touch-action: none; }
.map-viewport:focus-visible { outline-offset: -3px; }
#atlas-svg { height: 100%; width: 100%; display: block; }
.map-region, .map-pin { cursor: pointer; }
.map-region rect { fill: color-mix(in srgb, var(--region) 49%, #101925); stroke: var(--region); stroke-width: 1.8; }
.map-region:hover rect, .map-region.selected rect { stroke: var(--accent); stroke-width: 2.7; }
.map-region text { text-anchor: middle; font-size: 12px; fill: #fff; font-weight: 720; paint-order: stroke; stroke: #131d2a; stroke-width: 3px; pointer-events: none; }
#atlas-lines path, .map-compass path { fill: none; stroke: #9eabbd; stroke-opacity: .58; stroke-width: 2.4; }
#atlas-one-way { pointer-events: none; }
#atlas-one-way path { fill: none; stroke: #efc375; stroke-width: 2.4; }
#one-way-arrow path { fill: #efc375; }
.map-view-controls { display: flex; flex-wrap: wrap; gap: .35rem; }
#atlas-svg [hidden] { display: none; }
#atlas-game-rooms rect { cursor: pointer; fill: color-mix(in srgb, var(--region) 54%, #111923); stroke: var(--region); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
#atlas-game-rooms rect:hover { stroke: #efc375; }
#atlas-game-rooms image { cursor: pointer; }
#atlas-game-rooms .room-hit-area { fill: transparent; stroke: none; }
.map-compass text { fill: #b7c1cc; text-anchor: middle; font-size: 12px; }
#atlas-landmarks { pointer-events: none; }
#atlas-landmarks circle { fill: #b8c4d4; stroke: #152132; stroke-width: 1px; }
#atlas-landmarks text { text-anchor: middle; font-size: 5.2px; fill: #e7edf4; paint-order: stroke; stroke: #131d2a; stroke-width: 1.5px; }
#atlas-landmarks .world-area-label { font-size: 15px; font-weight: 700; stroke-width: 3px; }
.map-pin .pin-disc { fill: var(--point); stroke: #10151e; stroke-width: 2; }
.map-pin:hover .pin-disc, .map-pin.selected .pin-disc { stroke: #fff; stroke-width: 3; }
.pin-glyph { color: #10151e; }
.pin-check-bg { fill: #10151e; stroke: var(--point); pointer-events: none; }
.pin-check { fill: none; stroke: #fff; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.map-pin text { font-size: 12px; font-weight: 900; fill: #10151e; text-anchor: middle; pointer-events: none; }
.map-pin.is-found { opacity: .72; }
.point-game-rooms { margin-block: .5rem; padding-inline-start: 1.25rem; }
.map-route-status { position: absolute; left: .75rem; top: .75rem; max-width: calc(100% - 5rem); border: 1px solid var(--route-status); border-radius: 6px; padding: .3rem .5rem; color: var(--route-status); background: #101a26; font-size: .8rem; pointer-events: none; }
[data-status="available"], [data-route-status="available"] { --route-status: #a6e4ac; }
[data-status="missing"], [data-route-status="missing"] { --route-status: #ffc0b5; }
[data-status="unknown"], [data-route-status="unknown"] { --route-status: #f2bd6b; }
.map-pin .map-pin-route-ring, .map-pin.selected .map-pin-route-ring { fill: none; stroke: var(--route-status); stroke-width: 2.5; pointer-events: none; }
.map-pin[data-route-status="unknown"] .map-pin-route-ring { stroke-dasharray: 4 3; }
.map-actions { position: absolute; display: grid; gap: .35rem; top: .8rem; right: .8rem; }
.map-actions button { padding: .25rem; font-size: 1.2rem; }
.map-actions .touch-mode { display: none; }
.map-caption { position: absolute; bottom: .7rem; left: .75rem; max-width: calc(100% - 1.5rem); border: 1px solid var(--line); border-radius: 6px; background: #101a26; padding: .23rem .48rem; font-size: .72rem; color: var(--muted); pointer-events: none; }
.point-panel { z-index: 2; position: absolute; right: 4.2rem; top: 4.15rem; width: min(330px, 66%); max-height: calc(100% - 5rem); overflow: auto; overscroll-behavior: contain; background: #172333; border: 1px solid #566781; border-radius: 10px; padding: 1rem; box-shadow: 0 10px 32px #070a12a0; }
.point-panel h3 { padding: .33rem 3.1rem .25rem 0; font-size: 1.3rem; }
.point-panel p { margin-block: .45rem; }
.point-location { color: var(--muted); font-size: .86rem; }
.close-point { position: absolute; right: .6rem; top: .65rem; }
.point-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.primary { background: var(--accent); color: #19140a; border-color: var(--accent); font-weight: 700; }
.route-panel { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .75rem; }
.route-panel h4 { margin-bottom: .45rem; }
.route-panel select { max-width: 100%; padding-inline: .55rem; }
.route-panel > select { width: 100%; }
.route-result small, .route-alternatives strong { display: block; color: var(--muted); }
.ability-options label, .route-alternatives { display: grid; gap: .3rem; margin-top: .5rem; }
.share-fallback { display: grid !important; margin-top: .65rem; gap: .3rem; }
.share-fallback input { width: 100%; padding-inline: .4rem; }
.atlas-error, .atlas-warnings { position: absolute; z-index: 3; left: .8rem; bottom: 2.6rem; right: .8rem; }
.atlas-warnings { display: grid; gap: .35rem; pointer-events: none; }
.atlas-error, .storage-warning { padding: .85rem; background: #282018; border: 1px solid #a58157; border-radius: 7px; }
.atlas-error p, #atlas-layer-warning p { margin-bottom: .4rem; }
#atlas-layer-retry { pointer-events: auto; }
dialog { max-width: min(410px, 100% - 2rem); background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 1.35rem; }
dialog p { margin-block: .6rem; }
dialog::backdrop { background: #070b13a8; }
.mobile-actions, .drawer-heading { display: none; }
.no-js-note { padding: 1rem; }
@media (scripting: none) {
  .atlas { display: block; height: auto; min-height: 0; }
  .atlas-sidebar, .map-view-controls, .map-actions { display: none; }
  .atlas .map-viewport { aspect-ratio: 940 / 745; height: auto; min-height: 0; }
  .static-index li > .interactive-location { display: none; }
}
.content-section { margin-block: 3.2rem; }
.content-section h2 { font-size: clamp(1.55rem, 2.5vw, 2.25rem); letter-spacing: -.025em; }
.content-section h3 { font-size: 1.13rem; }
.section-lead { max-width: 74ch; }
.area-grid, .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.area-card, .example, .steps li, .faq-list details { padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.area-card { border-top: 3px solid var(--area); display: flex; flex-direction: column; }
.area-card p, .steps p { margin-block: .45rem .6rem; color: var(--muted); }
.area-card a { margin-top: auto; min-height: 44px; display: flex; align-items: center; gap: .4rem; }
.task-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.task-links a { display: inline-flex; align-items: center; min-height: 44px; gap: .5rem; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: var(--panel); color: var(--fg); }
.task-links a:hover { border-color: var(--accent); }
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-left: 0; list-style-position: inside; }
.steps h3 { display: inline; }
.steps li::marker { color: var(--accent); font-weight: 750; }
.example { max-width: 79ch; margin-top: .85rem; }
.example p, .prose p { margin-block: .5rem; color: var(--muted); }
.prose { max-width: 82ch; }
.prose h3 { margin-top: 1.2rem; }
.prose h2:not(:first-child) { margin-top: 1.15rem; }
.table-wrap { overflow-x: auto; margin-top: .85rem; }
table { border-collapse: collapse; width: min(100%, 720px); background: var(--panel); }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: .65rem .85rem; }
thead th { color: var(--muted); }
.checklist { margin-block: 1.1rem; max-width: 960px; }
.checklist-top { padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.checklist-top output { display: block; margin-block: .25rem; font-size: 2rem; color: var(--accent); font-weight: 750; }
.checklist-top progress { width: 100%; accent-color: var(--accent); }
.checklist-controls { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; margin-top: .65rem; }
.checklist-controls input[type=search] { display: block; max-width: 100%; padding-inline: .5rem; }
.checklist-controls label:has([type=checkbox]) { min-height: 44px; display: flex; align-items: center; gap: .35rem; }
.checklist-groups { display: grid; gap: .6rem; margin-top: .75rem; }
.checklist-group { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; }
.checklist-group summary { padding: .7rem .9rem; }
.group-score { float: right; color: var(--muted); }
.checklist-group ul { list-style: none; margin: 0; padding: 0 .8rem .65rem; }
.checklist-group li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .55rem; align-items: center; border-top: 1px solid var(--line); }
.checklist-group li label { min-height: 44px; display: flex; align-items: center; gap: .48rem; cursor: pointer; }
.checklist-group li a { min-height: 44px; display: inline-flex; align-items: center; font-size: .87rem; }
.checklist-group small { color: var(--muted); white-space: nowrap; }
.faq-list { max-width: 82ch; display: grid; gap: .55rem; margin-top: 1rem; }
summary { cursor: pointer; min-height: 32px; font-weight: 650; }
details p { margin-top: .4rem; color: var(--muted); }
.static-index { columns: 2; padding-left: 1.4rem; }
.text-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: .7rem; padding: 0; list-style: none; }
.text-index li { padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.area-collectibles { margin-top: .75rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 8px; }
.directory-link { margin-top: 1rem; }
.search-result-group { padding: .35rem .75rem; color: var(--muted); font-weight: 600; }
.site-footer { padding-block: 2.5rem 1rem; background: linear-gradient(180deg, #162232, #111a27); color: var(--muted); font-size: .9rem; }
.footer-inner, .footer-nav { display: grid; gap: 1.5rem; }
.footer-inner { grid-template-columns: 1fr 1.4fr; }
.footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }
.footer-inner .brand, .footer-heading { color: var(--fg); font-weight: 700; }
.footer-brand p { margin-block: .4rem; }
.footer-brand a { max-width: 100%; overflow-wrap: anywhere; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-disclaimer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #293547; text-align: center; }
@media (pointer: coarse), (max-width: 690px) { .map-actions .touch-mode { display: block; width: 79px; font-size: .72rem; line-height: 1.15; } .map-actions button { justify-self: end; } }
@media (max-width: 900px) { .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 690px) {
  .frame { width: calc(100% - 24px); }
  .masthead { min-height: 54px; gap: .3rem; }
  .masthead nav { gap: .15rem .65rem; }
  .masthead a { font-size: .88rem; }
  .brand-mark { width: 28px; }
  .intro { margin-block: .9rem; }
  .intro p { font-size: .95rem; }
  .atlas { display: flex; flex-direction: column; position: relative; height: auto; min-height: 0; }
  .atlas-sidebar { border: 0; }
  .search-area { padding: .5rem .65rem; }
  .mobile-actions { display: flex; gap: .35rem; padding: 0 .65rem .55rem; flex-wrap: wrap; }
  .mobile-actions button { font-size: .79rem; }
  .atlas-filters, .result-pane, .point-panel { display: none; position: absolute; inset: auto 0 0; width: 100%; z-index: 3; max-height: min(462px, 75%); overflow: auto; overscroll-behavior: contain; background: var(--panel); border: 1px solid #566781; border-radius: 10px 10px 0 0; padding-bottom: max(.85rem, env(safe-area-inset-bottom)); }
  .point-panel { max-height: calc(100% - 1.25rem); }
  #atlas-filters .filter-options .spoiler-toggle { display: none; }
  .atlas[data-drawer=filters] .atlas-filters, .atlas[data-drawer=point] .point-panel { display: block; }
  .atlas[data-drawer=results] .result-pane { display: flex; }
  .drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
  .result-pane .drawer-heading { padding: .55rem .75rem 0; }
  .map-panel { flex: 1; }
  .map-toolbar { align-items: flex-start; flex-direction: column; padding-inline: .55rem; }
  .map-viewport { flex: none; height: 55svh; min-height: 290px; }
  .atlas:fullscreen .map-viewport { flex: 1; }
  .map-actions { right: .35rem; top: .35rem; }
  .map-caption { bottom: .4rem; left: .4rem; }
  .map-region text { font-size: 15px; }
  .map-pin .pin-disc { r: 16px; }
  .content-section { margin-block: 2.45rem; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { column-gap: 1rem; }
}
@media (max-width: 380px) { .area-grid, .static-index { display: block; columns: auto; } .area-card + .area-card { margin-top: .6rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
