:root{--bg:#111a1c;--sidebar:#172123;--panel:#1d292a;--surface:#233032;--line:#303d3c;--text:#eef1e8;--muted:#9eafa8;--lime:#d6fa74;--faint:#768984;--side:308px;color-scheme:dark;font-family:Arial,Helvetica,sans-serif;font-synthesis:none;color:var(--text);background:var(--bg)}
*{box-sizing:border-box}body{margin:0;min-width:300px;overflow:hidden}button,input,textarea,select{font:inherit}button{cursor:pointer}button,input,textarea,select,a{-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--lime);outline-offset:3px}button{color:inherit}a{color:var(--lime)}i[data-icon],button svg,.progress-heading svg,.sidebar-footer svg{display:inline-flex;width:18px;height:18px;flex:none}svg{width:100%;height:100%}.topbar{position:relative;z-index:4;height:68px;display:grid;grid-template-columns:var(--side) auto 1fr;align-items:center;border-bottom:1px solid #344144;background:#141e20}.brand{height:100%;display:flex;align-items:center;gap:11px;padding:0 22px;text-decoration:none;color:var(--text);width:max-content}.brand strong,.brand small{display:block}.brand strong{font-size:19px;font-weight:900;letter-spacing:.06em;line-height:1}.brand strong span{color:var(--lime)}.brand small{font-size:8px;letter-spacing:.33em;color:#a7b8ad;margin-top:5px;font-weight:700}.topbar nav{display:flex;align-items:stretch;gap:26px;height:100%;padding-left:24px}.tab{border:0;border-bottom:2px solid transparent;background:none;padding:2px 2px 0;color:var(--muted);font-size:13px;font-weight:700;white-space:nowrap}.tab:hover,.tab.active{color:var(--lime)}.tab.active{border-color:var(--lime)}.header-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;padding:0 22px}.control{border:1px solid #41504e;background:#1a2628;color:#e6eee7;border-radius:8px;min-height:38px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;font-size:12px;font-weight:700}.control:hover,.control[aria-pressed=true]{background:#293938;border-color:#718781}.profile .chevron{width:12px;height:12px;color:var(--muted)}.square{width:38px;height:38px;padding:0}.shell{height:calc(100dvh - 68px);display:grid;grid-template-columns:var(--side) minmax(0,1fr);position:relative}.sidebar{z-index:3;min-height:0;display:flex;flex-direction:column;background:var(--sidebar);border-right:1px solid #344143}.sidebar-top{padding:25px 20px 0}.eyebrow{font-family:ui-monospace,monospace;font-size:10px;font-weight:700;letter-spacing:.12em;color:var(--lime);display:flex;align-items:center;gap:7px}.status-dot{width:7px;height:7px;background:var(--lime);display:inline-block;border-radius:50%;box-shadow:0 0 10px #d6fa7440;flex:none}h1,h2,p{margin:0}h1{font-size:26px;line-height:1.1;letter-spacing:-.05em;margin:9px 0 18px;font-weight:800}.search{min-height:40px;display:flex;align-items:center;gap:9px;padding:0 9px 0 11px;border:1px solid #3b4b4b;border-radius:8px;background:#202c2e;color:#a9b8b1}.search input{flex:1;min-width:0;background:none;border:0;color:var(--text);padding:7px 0;font-size:13px;outline:0}.search:focus-within{border-color:var(--lime)}.search input:focus-visible{outline:0}.search input::placeholder{color:#a5b4ad}.search input::-webkit-search-cancel-button{cursor:pointer}.search kbd{width:20px;height:20px;display:grid;place-items:center;border:1px solid #405050;border-radius:4px;font-size:11px;color:#a7b8b0}.progress{margin-top:17px;border:1px solid #3a4944;border-radius:9px;padding:12px;background:linear-gradient(120deg,#26342d,#202c2d 80%)}.progress-heading,.progress-bottom{display:flex;justify-content:space-between;align-items:center;gap:7px}.progress-heading>span{display:flex;gap:7px;align-items:center;font-size:12px;font-weight:700}.progress-heading svg{width:16px;height:16px;color:var(--lime)}.progress-heading strong{font:700 12px ui-monospace,monospace;color:var(--lime);white-space:nowrap}.progress progress{display:block;width:100%;height:4px;margin:10px 0;background:#42504a;border:0;border-radius:8px;overflow:hidden}.progress progress::-webkit-progress-bar{background:#42504a}.progress progress::-webkit-progress-value{background:var(--lime)}.progress progress::-moz-progress-bar{background:var(--lime)}.progress-bottom{font-size:11px;color:#b2c0b6}.toggle{cursor:pointer;display:inline-flex;align-items:center;gap:6px;position:relative;white-space:nowrap}.toggle input{position:absolute;opacity:0}.switch{display:inline-flex;width:23px;height:13px;border:1px solid #647773;border-radius:12px;align-items:center;padding:2px;background:#273536}.switch:before{content:'';background:#a3b2ac;width:7px;height:7px;border-radius:50%;transition:transform .15s ease}.toggle input:checked+.switch{background:#4b632f;border-color:#758d4b}.toggle input:checked+.switch:before{transform:translateX(10px);background:var(--lime)}.toggle input:focus-visible+.switch{outline:2px solid var(--lime);outline-offset:2px}.panel{flex:1;overflow:auto;padding:16px 20px;scrollbar-color:#42514f transparent;scrollbar-width:thin;overscroll-behavior:contain}.panel-head,.group-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.panel-head{margin:0 0 12px}.panel-head h2{font-size:16px;letter-spacing:-.025em}.panel-count,.group-title{font:700 10px ui-monospace,monospace;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}.all-toggle{border:0;background:none;color:var(--lime);font-size:11px;font-weight:700;padding:5px 0 5px 8px}.all-toggle:hover{text-decoration:underline}.category-group+.category-group{margin-top:14px}.group-title{padding:1px 0 6px}.category{display:flex;border:1px solid transparent;align-items:center;border-radius:7px;min-height:37px;padding:2px 3px}.category:hover{background:#222f30;border-color:#354342}.category label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;cursor:pointer;font-size:12px;font-weight:650}.category input{width:13px;height:13px;margin:0 1px 0 0;flex:none;accent-color:var(--lime);cursor:pointer}.category .category-icon,.row-icon{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;color:var(--category);background:color-mix(in srgb,var(--category) 13%,transparent);flex:none}.category-icon svg,.row-icon svg{width:15px;height:15px}.category-count{font:11px ui-monospace,monospace;color:var(--muted);min-width:22px;text-align:right}.category .jump{width:26px;height:26px;display:grid;place-items:center;border:0;background:none;color:var(--muted);border-radius:5px;padding:0;margin-left:3px}.category .jump:hover{background:#43534e;color:var(--lime)}.jump svg{width:14px;height:14px}.sidebar-footer{margin-top:auto;padding:11px 20px;border-top:1px solid #344143;color:#9dafa6;display:flex;gap:7px;align-items:center;font-size:10px;background:#151f21}.sidebar-footer svg{width:14px;height:14px;color:#b2c8ad}.row{width:100%;border:1px solid transparent;border-bottom-color:#344141;background:none;border-radius:6px;padding:8px 4px;display:flex;align-items:center;gap:9px;text-align:left}.row:hover,.row[aria-current=true]{background:#233231;border-color:#415450}.row .row-copy{min-width:0;flex:1}.row strong,.row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row strong{font-size:12px}.row small{margin-top:4px;font-size:10px;color:var(--muted)}.row>svg{width:14px;height:14px;color:var(--muted)}.row>svg.found{color:var(--lime)}.empty{font-size:13px;line-height:1.5;color:var(--muted);padding:10px 0}.empty+.control{margin-top:6px}
.atlas{min-width:0;position:relative;overflow:hidden;background:#183539;isolation:isolate}.viewport,.viewport canvas{position:absolute;inset:0;width:100%;height:100%}.viewport{touch-action:none;cursor:grab;outline-offset:-3px}.viewport canvas{pointer-events:none}.viewport.dragging{cursor:grabbing}.viewport.pointing{cursor:pointer}.viewport.placing{cursor:crosshair}.map-top{position:absolute;top:19px;left:21px;right:21px;display:flex;justify-content:space-between;align-items:center;gap:8px;pointer-events:none}.view-tools,.right-tools{display:flex;gap:7px;align-items:center;pointer-events:auto}.view-tools{background:#142123;border:1px solid #43534f;border-radius:9px;padding:3px;gap:2px;box-shadow:0 3px 12px #0003}.view-tools button{display:flex;align-items:center;gap:6px;background:none;color:#b7c4bc;border:0;border-radius:5px;padding:0 9px;height:30px;font-size:11px;font-weight:700}.view-tools button.active{background:#33433a;color:#e2f6d7}.view-tools button:hover{color:#f3f8ee}.view-tools svg{width:15px;height:15px}.right-tools .control,.navigation .control{box-shadow:0 3px 12px #0003}.right-tools .add{background:var(--lime);border-color:var(--lime);color:#172119}.right-tools .add:hover{background:#e8ffb0}.map-compass{position:absolute;top:80px;right:27px;width:28px;pointer-events:none;text-align:center}.map-compass b{font:700 11px ui-monospace,monospace;color:#e5f1df;display:block;margin-bottom:1px}.map-compass svg{height:36px}.navigation{position:absolute;right:21px;bottom:53px;display:flex;flex-direction:column;align-items:flex-end;gap:8px}.zoom-group{border:1px solid #43534f;border-radius:8px;overflow:hidden;box-shadow:0 3px 12px #0003}.zoom-group .control{border:0;border-radius:0;display:flex;box-shadow:none}.zoom-group .control+.control{border-top:1px solid #43534f}.map-meta{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-between;gap:10px;padding:10px 19px;background:#142123de;border-top:1px solid #3e5150;color:#bac7bf;font:10px ui-monospace,monospace;pointer-events:none}.map-attribution{display:flex;align-items:center;gap:7px;overflow:hidden;white-space:nowrap}.map-attribution .status-dot{width:5px;height:5px}.map-attribution span:last-child{overflow:hidden;text-overflow:ellipsis}#coords{white-space:nowrap}.placement{position:absolute;top:69px;left:50%;transform:translateX(-50%);border:1px solid #536b58;border-radius:10px;background:#182a27;box-shadow:0 4px 20px #0006;padding:6px 6px 6px 12px;display:flex;align-items:center;gap:12px;font-size:12px;white-space:nowrap}.placement .control{min-height:28px}.mobile-panel{display:none}.detail{position:absolute;left:21px;bottom:53px;width:min(345px,calc(100% - 81px));border-radius:11px;border:1px solid #495e58;background:#182426;box-shadow:0 10px 40px #0008;padding:15px;z-index:2}.detail-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.detail-title{min-width:0;overflow-wrap:anywhere}.detail-title .eyebrow{color:var(--category);letter-spacing:.07em;font-size:10px;line-height:1.5}.detail-title h2{font-size:22px;letter-spacing:-.045em;margin:3px 0 1px}.detail .muted{font-size:12px}.detail .description{font-size:12px;margin-top:11px;line-height:1.45;overflow-wrap:anywhere;max-height:120px;overflow:auto}.detail .square{width:29px;height:29px;min-height:29px}.detail .square svg{width:14px;height:14px}.detail-actions{display:flex;gap:5px;margin-top:12px;align-items:center}.detail-actions .found-button{flex:1}.found-button[aria-pressed=true]{background:var(--lime)!important;color:#172119!important;border-color:var(--lime)!important}.detail .note-box{margin:10px 0 0}.note-box textarea{min-height:48px}.detail .loc-source{font-size:10px;display:inline-block;margin-top:8px}.muted{color:var(--muted)}.danger{color:#ff9f9b}.map-expanded{position:fixed;inset:0;z-index:7}.map-expanded .detail{z-index:8}
dialog,#toast{border:1px solid #4b615a;border-radius:12px;background:#192628;color:var(--text);box-shadow:0 12px 50px #0009}dialog{max-height:calc(100dvh - 24px);width:min(490px,calc(100% - 28px));padding:21px;overflow:auto;overscroll-behavior:contain}dialog::backdrop{background:#080f12ad;backdrop-filter:blur(3px)}.dialog-header{display:flex;align-items:start;justify-content:space-between;gap:8px;margin-bottom:12px}.dialog-header h2{font-size:24px;letter-spacing:-.04em}.dialog-header .square{width:31px;height:31px;min-height:31px}.dialog-content{font-size:13px;line-height:1.5}.dialog-content p+p{margin-top:10px}.dialog-content form{margin-top:15px}.dialog-content label,.note-box label{display:block;font-size:12px;font-weight:700;margin-top:10px}.dialog-content input:not([type=file]),.dialog-content textarea,.dialog-content select,.note-box textarea{display:block;width:100%;margin-top:4px;padding:7px 8px;border:1px solid #4b615a;border-radius:6px;background:#111c1e;color:var(--text)}.dialog-content textarea,.note-box textarea{resize:vertical}.dialog-content input[type=file]{display:block;width:100%;margin-top:5px;color:var(--muted);font-size:12px}.dialog-content input::file-selector-button{background:#253837;color:var(--text);border:1px solid #4b615a;border-radius:6px;padding:4px 7px;cursor:pointer}.dialog-content code{overflow-wrap:anywhere;color:#d7f7a2}.dialog-content details{margin-top:10px;color:#b7c6bc}.dialog-content details summary{cursor:pointer;font-weight:700}.dialog-content hr{border:0;border-top:1px solid #3e504c;margin:16px 0}.dialog-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:14px}.dialog-error{color:#ffaba8;margin-top:8px}.dialog-error:empty{display:none}#toast{position:fixed;z-index:20;right:18px;bottom:49px;padding:10px 14px;color:#e1eee2;font-size:12px;max-width:calc(100% - 36px)}[hidden]{display:none!important}
@media(max-width:1000px){:root{--side:274px}.topbar nav{gap:18px;padding-left:20px}.sidebar-top,.panel{padding-left:16px;padding-right:16px}.sidebar-footer{padding-left:16px}.header-actions{padding-right:16px}.profile .chevron{display:none}.brand{padding-left:16px}}
@media(max-width:720px){.topbar{height:57px;display:flex;gap:10px;justify-content:space-between;padding:0 10px}.brand{padding:0;gap:6px}.brand img{width:30px;height:30px}.brand strong{font-size:13px}.brand small{font-size:6px;margin-top:3px;letter-spacing:.18em}.topbar nav{padding:0;gap:7px}.tab{font-size:11px;padding:1px 0 0}.header-actions{gap:4px;padding:0}.header-actions .control{padding:0;width:30px;min-height:30px}.header-actions .control i{width:15px;height:15px}.header-actions .control span{display:none}.shell{display:block;height:calc(100dvh - 57px)}.atlas{height:100%}.sidebar{display:none;position:absolute;inset:49px auto 36px 8px;width:min(303px,calc(100% - 16px));border:1px solid #40514d;border-radius:10px;overflow:hidden;box-shadow:0 10px 40px #0009}.sidebar.open{display:flex}.sidebar-top{padding-top:15px}.sidebar-top h1{font-size:22px;margin-bottom:12px}.mobile-panel{display:flex;position:absolute;left:8px;top:9px;z-index:3;min-height:34px}.map-top{top:8px;left:98px;right:8px}.view-tools button{height:26px;padding:0 6px}.right-tools .control{min-height:34px;height:34px;padding:0 7px}.right-tools .square{width:32px}.map-compass{top:57px;right:10px}.navigation{right:8px;bottom:42px}.map-meta{padding:8px;font-size:9px}.detail{left:8px;bottom:42px;max-height:calc(100% - 92px);overflow:auto}.placement{top:53px}.map-expanded .map-top{left:8px}}
@media(max-width:380px){.topbar{gap:6px;padding:0 7px}.topbar nav{gap:6px}.brand strong{font-size:11px}.brand small{font-size:5px}.right-tools .add span,.view-tools button i{display:none}.view-tools button{padding:0 6px}.topbar .control{width:28px}.placement{gap:6px}.placement button{padding:0 7px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}}

@media(max-width:470px){.topbar .tab{font-size:10px}.topbar nav{gap:6px}.map-top{left:83px}.mobile-panel{padding:0 7px}.right-tools .add span{display:none}}
.guide-page{height:calc(100dvh - 68px);overflow:auto;background:#142021;scrollbar-color:#42514f transparent}.guide-wrap{max-width:1380px;margin:auto;padding:25px 32px 0}.guide-hero{position:relative;isolation:isolate;min-height:350px;border:1px solid #3e524d;border-radius:16px;overflow:hidden;background:#18282a}.guide-hero:after{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#172728 9%,#172728f2 31%,#17272892 54%,#17272810 90%)}.guide-lead{padding:39px 46px;max-width:620px}.guide-lead h1{font-size:clamp(45px,6.5vw,97px);line-height:.94;letter-spacing:-.078em;margin:13px 0 18px}.guide-lead h1 span{color:var(--lime)}.guide-lead p{color:#d6e4d8;font-size:15px;line-height:1.5;max-width:355px}.guide-hero-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:20px}.guide-hero-actions .control{min-height:40px}
.guide-library{margin:35px 0 24px}.guide-bar{display:flex;justify-content:space-between;gap:10px;align-items:flex-end}.guide-bar .toggle{font-size:12px;color:var(--muted)}.guide-bar h2{margin-top:5px;font-size:30px;letter-spacing:-.055em;scroll-margin-top:18px}.guide-filters{display:flex;justify-content:space-between;gap:11px;flex-wrap:wrap;margin:15px 0}.guide-topics{display:flex;gap:6px;flex-wrap:wrap}.guide-topics .control[aria-pressed=true]{border-color:#899d63;background:#374a30;color:var(--lime)}.guide-search{width:min(100%,245px)}.guide-search svg{width:16px;height:16px}.guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;align-items:start}.guide-card{background:#1b2929;border:1px solid #394c48;border-radius:10px;min-width:0}.guide-card:hover,.guide-card[open]{border-color:#779174}.guide-card summary{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:10px;align-content:start;align-items:center;padding:14px;cursor:pointer;list-style:none}.guide-card summary::-webkit-details-marker{display:none}.guide-icon{grid-column:1;grid-row:1 / 3;width:32px;height:32px;display:grid;place-items:center;color:#caf191;background:#39543c;border-radius:7px}.guide-icon svg{width:19px;height:19px}.guide-icon[data-topic-color=driving]{color:#f5ce83;background:#5d482b}.guide-icon[data-topic-color=navigation]{color:#a4f2e8;background:#2b504d}.guide-icon[data-topic-color=completion]{color:#ecc0fa;background:#513957}.guide-card-topic{grid-column:2;color:#b0c1b3;font:700 9px ui-monospace,monospace;text-transform:uppercase;letter-spacing:.08em}.guide-card strong{grid-column:2;font-size:15px;line-height:1.2;letter-spacing:-.02em;margin-top:2px}.guide-summary,.guide-read{grid-column:1 / -1}.guide-summary{font-size:12px;line-height:1.5;color:#b8c8c0;margin-top:10px}.guide-read{display:flex;align-items:center;justify-content:space-between;color:var(--lime);font-size:11px;margin-top:10px}.guide-read svg{width:15px;height:15px}.guide-card[open] .guide-read svg{rotate:180deg}.guide-body{padding:12px 14px 14px;border-top:1px solid #3a4c48;font-size:12px;line-height:1.6;color:#e7efe9}.guide-body p+p{margin-top:9px}.guide-sources{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:12px;font-size:10px}.guide-footer{border-top:1px solid #3c4e48;padding:14px 0;display:flex;gap:12px;justify-content:space-between;font-size:11px;color:var(--muted)}
.checklist-summary{display:grid;grid-template-columns:max-content 1fr;align-items:center;gap:10px;margin:14px 0;padding:14px;border:1px solid #566848;border-radius:9px;background:#25352b}.checklist-summary>div strong{color:var(--lime);font-size:14px}.checklist-summary>div p,.checklist-summary>p{font-size:11px;color:var(--muted);margin-top:3px}.checklist-summary>progress,.checklist-summary>p{grid-column:1/-1}.checklist-summary progress{width:100%;height:7px;accent-color:var(--lime)}.checklist-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;align-items:start}.checklist-grid section{border:1px solid #3b4c47;background:#1c2a2b;border-radius:8px;padding:13px}.checklist-grid h3{margin:0 0 5px;font-size:16px}.metric{min-height:39px;display:grid;grid-template-columns:minmax(0,1fr) 67px 100px;gap:7px;align-items:center;border-bottom:1px solid #394a45;font-size:12px}.metric:last-child{border:0}.metric input{width:100%;padding:4px;border-radius:5px;border:1px solid #496053;background:#132021;color:var(--text);font-size:12px}.metric-target{color:var(--muted);font-size:11px;white-space:nowrap}
@media(max-width:1000px){.guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.guide-page{height:calc(100dvh - 57px)}.guide-wrap{padding:12px 10px 0}.guide-hero{min-height:275px}.guide-lead{padding:24px 17px}.guide-hero:after{background:linear-gradient(90deg,#172728 0%,#172728cf 49%,#17272842)}.guide-library{margin:21px 0}.guide-bar h2{font-size:24px}.checklist-grid{grid-template-columns:1fr}.guide-topics .control{min-height:33px;padding:0 7px}.guide-grid{gap:6px}.guide-card summary{column-gap:6px;padding:9px;grid-template-columns:25px minmax(0,1fr)}.guide-icon{width:24px;height:24px}.guide-icon svg{width:15px;height:15px}.guide-card strong{font-size:13px}.guide-card-topic{font-size:8px}.guide-summary{font-size:11px}.guide-read{font-size:10px}.guide-body{padding:8px}}
@media(max-width:370px){.guide-grid{grid-template-columns:1fr}.metric{grid-template-columns:minmax(0,1fr) 57px 96px}}

@media (max-height:770px) and (min-width:721px){.sidebar-top{padding-top:19px}.category{min-height:34px}.category-group+.category-group{margin-top:10px}.panel{padding-top:13px}}

.wire-atlas .progress,.wire-atlas .view-tools,.wire-atlas .tab[data-view="collection"]{display:none}
.wire-atlas .map-top{justify-content:flex-end}
.wire-layer b{display:inline-block;width:19px;height:3px;border-radius:4px}
.wire-atlas .region-head{margin-top:22px}
.wire-atlas .map-compass{top:76px}
.wire-atlas .row{min-height:33px}

.wire-download{display:inline-block;margin:8px 0;font-size:12px;font-weight:700}

.wire-atlas{--bg:#15172b;--sidebar:#1d2034;--panel:#25293e;--surface:#282d43;--line:#393d55;--text:#faf2f2;--muted:#b1b3c8;--lime:#ffafce;--faint:#898ca6}
.wire-atlas .topbar,.wire-atlas .sidebar-footer{background:#191c2e;border-color:#373a50}
.wire-atlas .sidebar{border-color:#3b3e54}
.wire-atlas .search,.wire-atlas .control,.wire-atlas .zoom-group{background:#24283c;border-color:#44475d}
.wire-atlas .control:hover,.wire-atlas .row:hover,.wire-atlas .category:hover{background:#32354b;border-color:#57576b}
.wire-atlas .row{border-bottom-color:#34394c}
.wire-atlas .map-meta{background:#191d31eb;border-color:#383e56;color:#d1ccdc}
.wire-atlas .wire-layer b{background:var(--swatch)}
.wire-atlas .wire-layer .swatch-regions{height:8px;background:linear-gradient(90deg,#71d4ac,#a998ff,#fe70b4,#ffa467)}
.wire-atlas .area-dot{width:6px;height:6px;flex:none;background:var(--area-color);border-radius:50%}
.wire-atlas.tints-off .area-dot{opacity:0}
.wire-atlas .status-dot{box-shadow:none}

.water-bed,.water-plane,.water-plane .water-tex{position:absolute;inset:0;pointer-events:none}
.water-bed{overflow:hidden;contain:strict}
.water-plane{inset:auto;left:0;top:0;transform-origin:top left}
.water-plane .water-tex{width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}
.water-plane .water-tex:nth-child(n+2){opacity:0;animation:coastal-swell 9s linear infinite}
.water-plane .water-tex:nth-child(3){animation-delay:-6s}
.water-plane .water-tex:nth-child(4){animation-delay:-3s}
@keyframes coastal-swell{0%,100%{opacity:1}33.333%,66.667%{opacity:0}}
.water-bed.paused .water-tex{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.water-plane .water-tex:nth-child(n+2){display:none;animation:none}}

.water-plane::after{content:"";position:absolute;inset:0;background:url("./water/vice-reflection.webp") center/100% 100% no-repeat;pointer-events:none}

.wire-atlas .control.add{color:#261f33;background:#ffafce;border-color:#ffafce}
.wire-atlas .control.add:hover,.wire-atlas .control.add[aria-pressed="true"]{background:#ffd0e2;border-color:#ffd0e2}

.wire-atlas .wire-layer .swatch-buildings{height:9px;width:15px;margin-inline:2px;border:1px solid #ead2f5;border-radius:1px;background:var(--swatch);box-shadow:1.5px 1.5px #45334f}

.wire-atlas .wire-layer .swatch-airfields{height:8px;border:2px solid #477d75;border-radius:1px;background:var(--swatch)}

/* The cover and field manual share a local, illustrated coastal postcard. */
.wire-atlas {
  --sidebar: #1c1b30;
  --text: #fff5ef;
  --muted: #bbb5c9;
  --lime: #ffb1b9;

  --display: "Avenir Next Condensed", "Arial Narrow", Impact, system-ui, sans-serif;
}
.wire-atlas .topbar {
  background: linear-gradient(105deg, #242036, #191829 60%, #252034);
  border-bottom-color: #514054;
}
.wire-atlas .brand strong { font-family: var(--display); font-weight: 900; font-style: italic; letter-spacing: .015em; }
.wire-atlas .brand small { color: #e2b5ac; }
.wire-atlas .tab { position: relative; }
.wire-atlas .tab.active { border-bottom-color: transparent; color: #ffcdc2; }
.wire-atlas .tab.active::after {
  content: ""; position: absolute; inset: auto 0 -2px; height: 3px;
  background: linear-gradient(90deg, #ffca83, #fa88b5);
}
.wire-atlas .sidebar-top { padding: 0; }
.wire-atlas .atlas-cover .eyebrow { color: #fff0c5; font-size: 9px; letter-spacing: .2em; }
.wire-atlas .atlas-cover .status-dot { background: #ffcd85; width: 14px; height: 2px; border-radius: 0; }
.wire-atlas .atlas-cover h1 {
  margin: 3px 0 0; color: #fff1dc; text-transform: uppercase;
  font: italic 900 clamp(38px, 5.8vh, 54px)/.98 var(--display);
  letter-spacing: -.05em; text-shadow: none;
}
.wire-atlas .sidebar-top .search { margin: 14px 16px 0; background: #252237; border-color: #514452; }
.wire-atlas .search:focus-within { border-color: #ffb2bb; }
.wire-atlas .panel { padding: 18px 16px; scrollbar-color: #655168 transparent; }
.wire-atlas .panel-head h2 { font-family: var(--display); letter-spacing: .012em; font-weight: 850; font-size: 18px; }
.wire-atlas .wire-layer { border: 0; border-bottom: 1px solid #393247; border-radius: 0; padding: 0 3px; }
.wire-atlas .wire-layer label { min-height: 34px; gap: 10px; }
.wire-atlas .wire-layer input {
  order: 1; appearance: none; position: relative; margin-left: auto; width: 24px; height: 14px;
  border: 1px solid #837383; border-radius: 8px; background: #302c3e;
}
.wire-atlas .wire-layer input::after {
  content: ""; position: absolute; width: 8px; height: 8px; top: 2px; left: 2px;
  border-radius: 100%; background: #c6bdc8; transition: transform .15s ease;
}
.wire-atlas .wire-layer input:checked { background: #854d68; border-color: #bd7c92; }
.wire-atlas .wire-layer input:checked::after { transform: translateX(10px); background: #ffdfcc; }
.wire-atlas .wire-layer label:has(input:not(:checked)) b { opacity: .4; }
.wire-atlas .wire-download { margin: 12px 0 0; color: #efb3ae; text-underline-offset: 3px; }
.wire-atlas .water-bed {
  background-image: radial-gradient(ellipse at 15% 20%, #41294460, transparent 58%),
                    radial-gradient(ellipse at 90% 88%, #11545c60, transparent 64%);
}
.wire-atlas .control.add { background: linear-gradient(110deg, #ffd39a, #ffacb5 74%); border-color: #ffcab2; }
.wire-atlas .control.add:hover { background: #ffe0c3; }
.wire-atlas .map-compass {
  width: 36px; height: 48px; color: #ffdac4;
  background: radial-gradient(circle at 50% 62%, transparent 14px, #d6b6bc66 15px, transparent 16px);
}
.wire-atlas .map-compass svg { height: 24px; }
.wire-atlas .guide-page { background: #161726; }
.wire-atlas .guide-hero {
  background: var(--cover-art) center 55% / cover no-repeat, #57394e;
  border-color: #735967;
}
.wire-atlas .guide-hero::after { background: linear-gradient(90deg, #23182df5 2%, #312039c7 36%, transparent 83%); }
.wire-atlas .guide-lead h1 { font-family: var(--display); font-style: italic; font-weight: 900; letter-spacing: -.045em; }
.wire-atlas .guide-card { background: #242236; border-color: #443c51; }
.wire-atlas .guide-card:hover, .wire-atlas .guide-card[open] { border-color: #956c85; }
.wire-atlas .guide-summary, .wire-atlas .guide-card-topic { color: #cdc3d0; }
.wire-atlas .guide-topics .control[aria-pressed=true] { background: #50364a; border-color: #ab7689; color: #ffdfd0; }
@media(max-width:720px), (max-height:560px) {
  .wire-atlas .atlas-cover h1 { font-size: 33px; }
  .wire-atlas .sidebar-top .search { margin-top: 9px; }
  .wire-atlas .panel { padding-top: 12px; }
}
@media(forced-colors:active) {
  .wire-atlas .wire-layer input { appearance: auto; }
  .wire-atlas .wire-layer input::after { display: none; }
}

.wire-atlas .progress {display:block;margin:12px 16px 0;padding:0;background:transparent;border:0}
.wire-atlas .progress-heading,.wire-atlas .progress-bottom {font-size:11px}
.wire-atlas .progress progress {height:3px}
.browse-tabs {display:flex;gap:4px;padding:3px;background:#171625;border:1px solid #44394e;border-radius:9px;margin:0 0 17px}
.browse-tabs button {flex:1;display:flex;align-items:center;justify-content:center;gap:7px;min-height:34px;background:none;border:0;border-radius:6px;color:#c8bdce;font-size:12px;font-weight:650}
.browse-tabs button[aria-pressed=true] {background:#4c3448;color:#ffddcd}
.browse-tabs svg,.group-symbol svg {width:16px;height:16px}
.field-groups {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.field-group {position:relative;text-align:left;min-height:85px;display:grid;align-content:start;gap:3px;padding:10px 11px;border-radius:9px;color:#fff4ed;background:linear-gradient(125deg,color-mix(in srgb,var(--ink) 9%,#282438),#252235 86%);border:1px solid color-mix(in srgb,var(--ink) 24%,#342d41)}
.field-group:hover,.field-group:focus-visible {border-color:var(--ink)}
.field-group strong {font-size:12px;line-height:1.24}
.field-group small {color:#c2b8ca;font-size:10px}
.group-symbol {display:block;color:var(--ink);margin-bottom:3px}
.back-groups {color:#f2b5c3;font-size:12px;background:none;border:0;padding:2px 0 12px}
.wire-atlas .detail {background:linear-gradient(145deg,#33283c,#211d31);border:1px solid #73566b;box-shadow:0 10px 35px #110e2280}
.detail-grid {display:flex;align-items:center;gap:8px;color:#d7cad8;font-size:11px;margin:12px 0 6px}
.detail-grid strong {border:1px solid #826779;border-radius:4px;padding:3px 6px;color:#ffdfcd;font:700 11px ui-monospace,monospace}
@media (max-height:620px){.wire-atlas .progress {margin-top:7px}.field-group {min-height:66px}}
.guide-map-links {margin:0 0 25px;padding-bottom:20px;border-bottom:1px solid #514153}
.guide-map-links h2 {margin:0 0 11px;font-size:19px}
.guide-map-links > div {display:flex;gap:8px;flex-wrap:wrap}
.guide-map-links .control {background:#30273b;border-color:#655064;color:#f4d5d1}
.guide-map-links .control:hover {border-color:#e9aaa9}
.guide-map-links .control svg:last-child {width:12px}

.sheet-close.control,.group-filter.control {display:none}
@media (max-width:720px) {
  .sidebar {inset:auto 5px max(4px,env(safe-area-inset-bottom));width:auto;max-height:calc(100% - 54px);height:min(78%,650px);border-radius:18px 18px 10px 10px;box-shadow:0 -8px 32px #100e2370}
  .sheet-close.control {display:flex;position:absolute;z-index:1;right:9px;top:8px;width:42px;height:42px;background:#231e30e8;color:#ffe2d6}
  .sidebar.open ~ .mobile-panel {visibility:hidden}
  .sidebar.open ~ .atlas .group-filter {display:none}
  .sidebar-top h1 {margin-right:46px}
  .wire-atlas .panel {min-height:0}
  .wire-atlas .field-group {min-height:68px}
  .wire-atlas .row,.wire-atlas .browse-tabs button {min-height:44px}
  .group-filter.control:not([hidden]) {display:inline-flex;position:absolute;left:8px;top:57px;max-width:calc(100% - 75px);min-height:40px;border-radius:20px;color:#ffe1cf;background:#3b2b3ef5;border-color:#9a7187}
  .group-filter i[data-icon] {width:15px;height:15px}
  .mobile-panel.control,.right-tools .control {min-height:42px}
  .wire-atlas .right-tools .control {min-width:42px}
}
@media (max-width:720px) and (max-height:530px) {
  .sidebar {height:calc(100% - 10px);max-height:none}
  .wire-atlas .sidebar .atlas-cover,.sidebar-footer {display:none}
  .wire-atlas .sidebar-top .search {margin-right:61px;margin-top:10px}
  .wire-atlas .sidebar-top .progress {margin-top:5px}
}

.map-chapter {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 16px 0;color:#d5cbd6;font-size:11px;font-weight:650}
.map-chapter select,.chapter-picker select,.wiki-filters select {min-height:32px;border:1px solid #655067;border-radius:7px;background:#30283c;color:#ffddce;font:inherit;padding:3px 7px}
.reward-shortcut {width:100%;display:flex;align-items:center;gap:9px;margin:0 0 10px;border:1px solid #785368;border-radius:9px;padding:10px 12px;color:#ffe1cb;background:linear-gradient(105deg,#4c314b,#30273d);font-size:12px;font-weight:700;text-align:left}
.reward-shortcut svg,.related-link svg {width:15px;height:15px}.reward-shortcut svg:last-child,.related-link svg{margin-left:auto}
.related-link {display:flex;align-items:center;gap:10px;width:100%;padding:9px 0;border:0;border-top:1px solid #514052;background:none;color:#ffcfbf;text-align:left;font-size:12px}




.wiki-page {background:#161624;color:#fff1e8;overflow:auto}
.wiki-wrap {width:min(1180px,100%);margin:0 auto;padding:24px clamp(13px,3vw,40px) 50px}
.wiki-hero h1 {margin:3px 0;letter-spacing:-.055em;font:italic 900 clamp(46px,6vw,80px)/1 var(--display,system-ui);color:#fff1dc}.wiki-hero h1 span {color:#ffa08f}.wiki-hero p {margin:8px 0 0;color:#f9d8d1}
.chapter-picker {display:grid;gap:5px;font-size:11px;font-weight:700;color:#f8d4c5;padding:10px;border:1px solid #9c7386;border-radius:10px;background:#241b2feb}
.wiki-tabs {display:flex;gap:4px;margin:17px 0 14px;border-bottom:1px solid #4b3c53}
.wiki-tabs button {background:none;border:0;border-bottom:3px solid transparent;padding:12px 14px;color:#c8baca;font-weight:750;font-size:14px}
.wiki-tabs button[aria-pressed=true]{color:#ffd6bf;border-color:#ff9fa8}.wiki-tools,.wiki-filters,.wiki-actions,.wiki-facts,.wiki-list-head {display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.wiki-tools .search {margin:0;min-width:min(210px,100%);flex:1}.wiki-tools .search svg{width:18px;height:18px;flex:none}
.wiki-filters select{font-size:12px;height:38px}.wiki-list-head{justify-content:space-between;margin:22px 0 12px}.wiki-list-head h2,.wiki-article h2{font-family:var(--display,system-ui);margin:0}
.wiki-list-head>span,.wiki-facts{color:#d6bccb;font-size:12px}
.wiki-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(245px,100%),1fr));gap:10px;margin-bottom:14px}
.wiki-card {position:relative;display:grid;align-content:start;gap:8px;text-align:left;padding:15px 30px 16px 16px;border:1px solid #574358;border-radius:10px;background:linear-gradient(135deg,#34283c,#242235);color:#fff1df}
.wiki-card:hover,.wiki-card:focus-visible {border-color:#ebadad;background:#3a2e44}.wiki-card small,.wiki-article .eyebrow {color:#ffb5aa;font-size:10px;letter-spacing:.09em;text-transform:uppercase}.wiki-card strong {font-size:17px}.wiki-card span {color:#d3c7d5;font-size:12px;line-height:1.5}.wiki-card>svg {position:absolute;right:10px;top:14px;width:13px;height:13px;color:#cf9bab}
.wiki-article {max-width:800px;padding:clamp(18px,4vw,40px);border:1px solid #735169;border-radius:14px;background:linear-gradient(130deg,#382a41,#242034)}
.wiki-article h2 {font-size:clamp(27px,4vw,42px);margin:7px 0 15px}.wiki-article p {font-size:16px;line-height:1.65;color:#e7dce6;max-width:65ch}.wiki-actions {margin:18px 0}.wiki-facts>* {background:#2c2236;border-radius:5px;padding:5px 8px}
@media(max-width:720px){.wiki-wrap {padding-top:12px}.chapter-picker{display:flex;align-items:center}.wiki-tabs button {font-size:12px;padding:10px}.wiki-hero p{font-size:13px}.wiki-card{padding:12px 28px 12px 13px}.wiki-grid{grid-template-columns:repeat(auto-fill,minmax(min(183px,100%),1fr))}.wiki-hero .eyebrow{font-size:9px}.map-chapter{margin-top:6px}}
@media(max-width:365px){.topbar .brand span{display:none}.header-actions .control{width:26px}}



.next-group{display:flex;width:100%;gap:7px;align-items:center;justify-content:space-between;background:#392c41;color:#ffd4bd;border:1px solid #67495e;border-radius:7px;padding:9px 11px;font-size:12px;font-weight:700;margin-bottom:6px}
.next-group svg{width:15px;height:15px}

.map-chapter select {max-width:68%;text-overflow:ellipsis}
.chapter-picker {max-width:100%;box-sizing:border-box}.chapter-picker select {min-width:0;max-width:100%;text-overflow:ellipsis}
.chapter-shelf {margin:12px 0 20px;padding:16px 18px;border:1px solid #856077;border-radius:12px;background:linear-gradient(110deg,#463044,#292339)}
.chapter-shelf h2 {font-size:20px;margin:0 0 12px;color:#ffe1c8}.chapter-shelf>div{display:flex;flex-wrap:wrap;gap:8px}
.chapter-shelf p{margin:12px 0 0;color:#f3c2a6;font-size:13px;line-height:1.8}.chapter-shelf p button{padding:0;color:inherit;background:transparent;border:0;text-decoration:underline;text-underline-offset:3px;cursor:pointer}

.wiki-tabs {flex-wrap:wrap}.resource-guide {margin:16px 0}.resource-guide small {color:#f3c6bb;font-weight:700}
.resource-code {display:inline-block;min-width:180px;max-width:100%;padding:12px 16px;background:#312535;color:#ffe6cf;border:1px solid #956e7d;border-radius:9px}
.resource-code summary {cursor:pointer;font-weight:700}.resource-code output {display:block;margin-top:10px;font:700 30px/1.3 ui-monospace,monospace;letter-spacing:.14em;color:#ffd4a9}

/* Shared navigation and the map field index. */
:root {font-family:"Avenir Next","Segoe UI",system-ui,sans-serif}
.wire-atlas {--side:clamp(310px,26vw,388px);--sidebar:#201c2d;--panel:#292332;--line:#4b4051;--muted:#c5b9c8}
.topbar {grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr)}
.topbar #nav {align-items:center;justify-content:center;gap:3px;padding:4px;height:auto;background:#141220;border:1px solid #44374c;border-radius:13px}
.topbar .tab {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:0 15px;border:0;border-radius:9px;font-size:13px;color:#cfc5d2}
.topbar .tab i {width:16px;height:16px}
.wire-atlas .topbar .tab.active,.topbar .tab.active {background:#473348;color:#ffe0cf;box-shadow:inset 0 0 0 1px #65465b}
.wire-atlas .tab.active::after {display:none}
.topbar .tab:hover {color:#fff4e9}
.wire-atlas .topbar {background:#211b2e}
.header-actions {min-width:0}.header-actions .profile {max-width:180px}.header-actions #profile-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wire-atlas .atlas-cover h1 {font-size:clamp(35px,4vw,48px)}
.wire-atlas .sidebar-top .search {margin:14px 16px 0;border-radius:10px;background:#171622;border-color:#58475b;min-height:42px}
.wire-atlas .panel {padding:10px 16px 18px}
.browse-tabs {margin:2px 0 17px;background:#171521;border-color:#4b3d50;gap:2px}
.browse-tabs button {gap:5px}.browse-tabs svg {width:14px}
.field-groups {gap:0 14px}
.wire-atlas .field-group {display:grid;align-content:center;align-items:center;grid-template-columns:29px minmax(0,1fr);column-gap:9px;row-gap:2px;min-height:63px;padding:7px 2px;border:0;border-bottom:1px solid #48394b;border-radius:0;background:transparent}
.field-group .group-symbol {grid-row:1/3;display:grid;place-items:center;width:29px;height:33px;border-radius:8px;margin:0;background:color-mix(in srgb,var(--ink) 14%,#252032);color:var(--ink)}
.field-group small {font-size:11px;color:#c4b7ca}.field-group strong {font-size:13px;font-weight:650}
.wire-atlas .field-group:hover,.wire-atlas .field-group:focus-visible {background:#302536;color:var(--ink)}
.map-guide-links {margin:18px 0 0}.map-guide-links h2 {font-size:15px;margin:0 0 8px}.map-guide-links>div {display:grid;grid-template-columns:1fr 1fr;gap:7px}
.map-guide-links .reward-shortcut {align-items:center;min-height:43px;margin:0;padding:8px;gap:6px;background:#302536;border-color:#594254;border-radius:8px;font-size:11px}
.map-guide-links .reward-shortcut svg {margin:0;color:#ffb6ac}
.place-kind {display:flex;align-items:center;gap:8px;color:#cfbfd0;font-size:12px;margin:0 0 10px}
.place-kind select {flex:1;padding:7px;color:#ffdfcd;background:#302536;border:1px solid #5c465b;border-radius:7px}
.search-group + .search-group {margin-top:18px}.search-empty {padding:12px 2px;color:#dfcddc}.search-empty>svg {width:22px;height:22px}.search-empty h2 {font-size:16px;overflow-wrap:anywhere}.guide-result {color:#ffbda6}
.sidebar-footer,.wire-atlas .sidebar-footer {display:block;flex-shrink:0;padding:8px 17px 12px;background:#1a1624;border-color:#493b4c}
.playthrough-summary summary {display:flex;align-items:center;gap:9px;min-height:30px;cursor:pointer;color:#e9dae4;font-size:12px;font-weight:650;list-style:none}
.playthrough-summary summary::-webkit-details-marker {display:none}.playthrough-summary summary strong {margin-left:auto;color:#ffc8b0;font:600 12px ui-monospace,monospace}
.playthrough-summary summary i {width:13px;height:13px}.playthrough-summary[open] summary i {transform:rotate(180deg)}
.playthrough-summary .map-chapter {margin:7px 0}.playthrough-summary .progress-bottom {padding:4px 0 8px;color:#d7c7d6}
#saving-status {display:block;margin:4px 0 8px;color:#c0afc2}
.sidebar-footer progress {display:block;width:100%;height:4px;border:0;border-radius:6px;overflow:hidden;background:#433646;accent-color:#f6abac}
.sidebar-footer progress::-webkit-progress-bar {background:#433646}.sidebar-footer progress::-webkit-progress-value {background:linear-gradient(90deg,#ffc88d,#ef8dae)}.sidebar-footer progress::-moz-progress-bar {background:#f6abac}
.wire-atlas .guide-return {font-size:12px;background:#33263c;border-color:#8b647c;color:#ffdfc8}

/* The Guidebook shares a header across reference material and gameplay tips. */
.wiki-wrap {max-width:1190px;padding-top:20px}
.wiki-tabs {gap:4px}.wiki-tabs button {min-height:44px}
.reader-layout {display:grid;grid-template-columns:minmax(0,2.4fr) minmax(200px,1fr);gap:22px;align-items:start}
.wiki-article {max-width:none;background:#282131;border-color:#62485c}
.reader-related {margin:0;padding:16px 18px;background:#231f2d;border:1px solid #493d50;border-radius:10px}.reader-related h3 {margin:0 0 7px;font-size:15px}
.reader-related .related-link {min-height:42px;text-align:left}
#wiki-page .guide-wrap {max-width:none;padding:0}#wiki-page .guide-library {margin:18px 0 24px}
.guide-library .guide-bar {align-items:center;flex-wrap:wrap}.guide-bar>div:first-child {margin-right:auto}.guide-bar h2 {margin:0}
.guide-map-links {margin:20px 0 0;padding:15px 0 0;border:0;border-top:1px solid #514153}
@media(max-width:880px) and (min-width:721px){.topbar .tab {padding:0 10px}.topbar .header-actions .data span {display:none}.header-actions .profile {max-width:125px}}
@media(max-width:720px){
  :root {--dock-height:calc(53px + env(safe-area-inset-bottom,0px))}
  .topbar {height:51px;display:flex;padding:0 13px}
  .topbar #nav {position:fixed;z-index:4;inset:auto 0 0;height:var(--dock-height);padding:2px 8px calc(2px + env(safe-area-inset-bottom,0px));gap:4px;background:#201b2b;border:0;border-top:1px solid #544051;border-radius:0}
  .topbar #nav .tab {flex:1;min-width:0;min-height:44px;flex-direction:column;gap:2px;padding:3px 4px;font-size:11px}
  .wire-atlas .topbar #nav .tab[data-view="collection"] {display:none}
  .topbar .brand>span {display:block}.topbar .brand strong span {display:inline}.topbar .header-actions .control {min-width:36px;min-height:36px}
  .topbar .header-actions .profile {width:auto;max-width:150px;gap:6px;padding:0 9px}.topbar .header-actions #profile-name {display:inline;font-size:11px}
  .shell,.wiki-page {height:calc(100dvh - 51px - var(--dock-height))}
  .sidebar {max-height:calc(100% - 8px);height:min(85%,660px)}.sidebar.open {z-index:4}
  .wire-atlas .atlas-cover h1 {font-size:33px}
  .wire-atlas .field-group {min-height:52px}.wire-atlas .sidebar-footer {padding:4px 15px 8px}
  .chapter-picker{padding:5px 8px}.wiki-tabs {gap:0}.wiki-tabs button {font-size:12px;padding:8px}
  .reader-layout {grid-template-columns:1fr;gap:12px}.wiki-wrap {padding-top:10px}
  .map-top .guide-return {gap:4px;padding:0 7px}.map-top .guide-return i {display:none}
}
@media(max-height:540px) and (max-width:720px){.wire-atlas .sidebar .atlas-cover {display:none}.wire-atlas .sidebar-top .search {margin-right:62px}.sidebar-top {flex-shrink:0}.sidebar {height:calc(100% - 8px)}.playthrough-summary[open]{max-height:90px;overflow:auto}}

/* Coastal dusk. Reserve the bright sunset tones for artwork, focus and selection. */
:root {
  --cover-art: url("./art/leonida-dusk.webp");
  --hairline: #ded2df24;
  --warm-white: #fff1e1;
  --peach: #ffc5ab;
  --sea-glass: #b0d8cf;
  --surface: #24232e;
  --quiet-text: #c9c1cc;
  --arrive: cubic-bezier(0.16, 1, 0.3, 1);
}
.wire-atlas { --sidebar: #201e29; --panel: var(--surface); --muted: var(--quiet-text); }
.wire-atlas .topbar {
  background: linear-gradient(105deg, #27212d, #1e202a 80%);
  border-bottom: 1px solid var(--hairline);
}
.topbar #nav { border-color: var(--hairline); background-color: #191820; }
.wire-atlas .topbar .tab.active { background: #44343e; color: var(--warm-white); box-shadow: inset 0 0 0 1px #ebc4b82b; }
:where(button, a, select, summary, input):focus-visible { outline: 2px solid var(--sea-glass); outline-offset: 2px; }
.wire-atlas .sidebar-top .search:focus-within { border-color: var(--sea-glass); }
.wire-atlas .sidebar { border-color: var(--hairline); }
.wire-atlas .sidebar-top .search, .wiki-tools .search { background: #1b1b25; border-color: #584c59; }
.wire-atlas .panel { padding-inline: 20px; }
.wire-atlas .sidebar-top .search { margin-inline: 20px; }
.wire-atlas .sidebar-footer { padding-inline: 20px; background: #1c1b25; border-color: var(--hairline); }
.wire-atlas .field-group { border-color: var(--hairline); }
.field-group .group-symbol { background: transparent; }
.browse-tabs { margin-block: 4px 16px; border-color: var(--hairline); }
.back-groups { display: inline-flex; align-items: center; gap: 4px; }
.back-groups svg { width: 15px; height: 15px; }
.map-guide-links { margin-block-start: 20px; }
.map-guide-links > div { gap: 8px; }
.map-guide-links .reward-shortcut { padding: 10px; background: #292530; border-color: var(--hairline); }
.map-guide-links .reward-shortcut:hover { border-color: #8a7078; }
.wire-atlas .detail { background: linear-gradient(145deg, #302832, #22232e); border-color: #60525e; }

.postcard {
  position: relative;
  width: 100%;
  aspect-ratio: 2.8 / 1;
  overflow: hidden;
  isolation: isolate;
  background: #614057;
  pointer-events: none;
}
.postcard-plane, .postcard-art { position: absolute; inset: 0; }
.postcard-plane {
  inset: -12px;
  transform: perspective(820px) translateY(var(--drift, 0px)) rotateX(var(--pitch, 0deg)) rotateY(var(--yaw, 0deg));
  transition: transform 180ms ease-out;
}
.postcard-art { background: var(--cover-art) center 55% / cover no-repeat; transition: transform 400ms var(--arrive); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-depth-hero]:hover .postcard-art { transform: scale(1.03); }
}
.atlas-cover, .wire-atlas .atlas-cover {
  display: grid; grid-template-areas: "cover"; align-items: end; justify-content: stretch;
  min-height: 0; padding: 0; background: #493245; box-shadow: none; border-bottom: 1px solid var(--hairline);
}
.atlas-cover > * { grid-area: cover; }
.atlas-cover .postcard::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(80deg, #211a2ac9, #211a2a28 76%), linear-gradient(0deg, #291d2b93, transparent 66%);
}
.cover-type { position: relative; padding: 14px 20px; pointer-events: none; }
.wire-atlas .atlas-cover h1 { text-shadow: none; color: var(--warm-white); }
.wire-atlas .atlas-cover .eyebrow { color: #ffdec6; }
.wire-atlas .atlas-cover .status-dot { display: none; }

.wiki-page, .wire-atlas .wiki-page { background: linear-gradient(150deg, #231e29, #1b1c26 52%, #19232b); }
.wiki-wrap { padding-block: clamp(16px, 3vw, 40px) 56px; }
.wiki-hero {
  display: grid; grid-template-columns: minmax(215px, 0.85fr) minmax(0, 1.5fr);
  align-items: center; min-height: 0; gap: 0; padding: 0; overflow: hidden;
  background: linear-gradient(110deg, #3c2b38, #2a252f 51%, #382d3b);
  border: 1px solid var(--hairline); border-radius: 16px;
}
.guide-heading { padding: clamp(16px, 2.8vw, 36px); }
.wiki-hero h1 { margin: 0 0 18px; color: var(--warm-white); font-size: clamp(42px, 5.1vw, 68px); }
.wiki-hero h1 span { color: var(--peach); }
.chapter-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 0; border: 0; background: none; color: var(--quiet-text); }
.chapter-picker select { background: #27232c; min-width: 0; max-width: 100%; }
.wiki-tabs { margin: 16px 0 24px; column-gap: 6px; border-color: var(--hairline); }
.wiki-tabs button { color: var(--quiet-text); border-bottom-width: 2px; }
.wiki-tabs button[aria-pressed=true] { color: var(--peach); border-color: var(--peach); }
.wiki-tools { gap: 12px; }
.wiki-list-head { margin: 28px 0 14px; }
.wiki-grid { gap: 12px; }
.wiki-card {
  gap: 7px; padding: 18px 32px 20px 18px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  transition: border-color 180ms, background-color 180ms;
}
.wiki-card strong { font-weight: 680; line-height: 1.28; }
.wiki-card small { color: #e8b59f; font-size: 10px; letter-spacing: .07em; }
.wiki-card span, .wiki-list-head > span { color: var(--quiet-text); }
.wiki-card > svg { top: 18px; right: 14px; color: #afa1ad; }
.wiki-card:hover, .wiki-card:focus-visible { background: #302a35; border-color: #816b77; }
.wiki-article, .reader-related, .wire-atlas .guide-card { background: var(--surface); border-color: var(--hairline); }
.reader-related { padding: 20px; }
.chapter-shelf, .guide-map-links, .map-guide-links {
  background-image: radial-gradient(ellipse at 14% calc(50% + var(--sheen, 0px)), #efab9820, transparent 66%);
}
.chapter-shelf, .guide-map-links {
  margin-block: 20px 24px; padding: clamp(16px, 2.5vw, 28px);
  border: 1px solid var(--hairline); border-radius: 12px; background-color: #29232e;
}
.map-guide-links { background-color: transparent; border-radius: 10px; }
.chapter-shelf h2, .guide-map-links h2 { color: var(--warm-white); }
#wiki-page .guide-library { margin-block: 24px 32px; }
#guide-page .guide-grid { gap: 12px; }
.arriving { animation: atlas-arrive 520ms var(--arrive) var(--delay, 0ms) backwards; }
@keyframes atlas-arrive { from { opacity: .66; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .wiki-wrap { padding-inline: 14px; }
  .wiki-hero { grid-template-columns: 1fr; }
  .wiki-hero .postcard { grid-row: 1; margin: 0; width: 100%; border-radius: 0; }
  .guide-heading { padding: 16px; }
  .wiki-hero h1 { margin-bottom: 10px; }
  .wiki-tabs { margin: 12px 0 16px; }
  .wiki-card { padding: 14px 24px 16px 14px; }
  .wiki-card > svg { top: 14px; right: 9px; }
  .cover-type { padding: 10px 16px; }
  .wire-atlas .sidebar-top .search { margin-inline: 16px; }
  .wire-atlas .panel, .wire-atlas .sidebar-footer { padding-inline: 16px; }
}
@media (max-width: 720px) and (max-height: 540px) {
  .wire-atlas .sidebar-top .search { margin-right: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .postcard-plane, .postcard-art, [data-depth-hero]:hover .postcard-art { transform: none; transition: none; }
  .arriving { animation: none; }
}

/* Pause-menu navigation and the map inspection view */
#map-rail, .map-heading, .place-prompt, .map-prompts { display:none; }
.wire-atlas .topbar .tab.active {
  color:#fff4e7; background:linear-gradient(108deg,#4a4660,#354158);
  box-shadow:inset 0 -2px #d3c1d5; font-style:italic; font-weight:800;
}
.map-heading { position:absolute; left:24px; top:18px; pointer-events:none; color:#fff1e1; }
.map-heading small { display:block; font-size:10px; font-weight:700; letter-spacing:.18em; color:#c9d4da; }
.map-heading strong { display:block; font:italic 850 clamp(32px,3.1vw,52px)/1.08 var(--display); letter-spacing:-.05em; }
#pin-leader { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
#pin-leader line { stroke:#fff2dd; stroke-width:1.25px; filter:drop-shadow(0 1px 1px #191626); }
.detail.off-map { visibility:hidden; }
.wire-atlas .detail, .detail {
  left:var(--pin-left,12px); top:var(--pin-top,64px); bottom:auto;
  width:min(304px,calc(100% - 24px)); max-height:calc(100% - 112px); overflow:auto;
  padding:16px; border:1px solid #a099aa75; border-left:3px solid #ffead2;
  border-radius:5px; background:linear-gradient(115deg,#2b293a,#212232); box-shadow:0 8px 22px #11132366;
}
.detail-title h2 { color:#fff1e1; font:italic 800 24px/1.06 var(--display,system-ui); margin:0 0 6px; }
.detail-title .eyebrow { color:var(--category); }
.detail-title .muted { display:inline-block; margin-top:3px; }
.detail .detail-actions { gap:6px; flex-wrap:wrap; }
.layer-section { margin:18px 0 12px; }
.layer-section h3, .recent-place h3 { margin:0 0 6px; color:#d5becf; font:700 11px/1.4 system-ui; text-transform:uppercase; letter-spacing:.1em; }
.wire-atlas .wire-layer:focus-within { background:#424356; outline:1px solid #b0d8cf; }
.wire-atlas .wire-layer label { min-height:40px; }
.recent-place { margin:0 0 20px; padding:14px; border-left:2px solid #b0d8cf; background:#292a37; }
.recent-place .row { padding:0; border:0; background:none; }
.wiki-grid { display:block; border-block:1px solid var(--hairline); }
.wiki-grid .wiki-card {
  display:grid; grid-template-columns:minmax(100px,.75fr) minmax(120px,1.15fr) minmax(130px,2fr) 16px;
  align-items:center; gap:16px; width:100%; min-height:58px; padding:12px 16px;
  border:0; border-radius:0; border-bottom:1px solid var(--hairline); background:transparent;
}
.wiki-grid .wiki-card:last-child { border-bottom:0; }
.wiki-grid .wiki-card:hover, .wiki-grid .wiki-card:focus-visible { background:#30303e; }
.wiki-grid .wiki-card strong { font-size:16px; }
.wiki-grid .wiki-card > svg { position:static; }
@media (min-width:721px) {
  .shell.rail-view { --rail-width:68px; display:grid; grid-template-columns:var(--rail-width) minmax(0,1fr); }
  .rail-view #map-rail { display:flex; flex-direction:column; align-items:stretch; gap:3px; padding:12px 5px; background:linear-gradient(180deg,#292631,#1f202c); border-right:1px solid #b7adc42e; overflow-y:auto; scrollbar-width:thin; }
  #map-rail button { display:grid; flex-shrink:0; place-content:center; justify-items:center; gap:3px; min-height:44px; border:0; border-radius:5px; background:transparent; color:#ded8e1; font-size:10px; }
  #map-rail button svg, #map-rail i { width:18px; height:18px; }
  #map-rail button:hover, #map-rail button:focus-visible, #map-rail button[aria-pressed=true] { background:#424155; color:#fff4e4; }
  #rail-groups { display:grid; gap:2px; margin:5px 0; padding:8px 0; border-block:1px solid var(--hairline); }
  #rail-groups button { min-height:36px; color:var(--ink); }
  .shell.rail-view:has(#rail-toggle[aria-expanded=true]) { --rail-width:clamp(172px,18vw,218px); }
  #map-rail #rail-toggle { position:sticky; top:0; z-index:1; background:#292631; border-bottom:1px solid var(--hairline); }
  #map-rail #rail-toggle:hover, #map-rail #rail-toggle:focus-visible { background:#424155; }
  #rail-toggle[aria-expanded=false] .rail-when-expanded,
  #rail-toggle[aria-expanded=true] .rail-when-compact { display:none; }
  #rail-toggle[aria-expanded=false] i { transform:rotate(180deg); }
  #map-rail:has(#rail-toggle[aria-expanded=false]) #rail-groups button span { display:none; }
  #map-rail:has(#rail-toggle[aria-expanded=true]) button {
    grid-template-columns:20px minmax(0,1fr); align-items:center; justify-items:start;
    gap:10px; padding:7px 10px; text-align:left; font-size:13px; line-height:1.3;
  }
  #map-rail:has(#rail-toggle[aria-expanded=true]) #rail-groups button span { color:#eee6e3; }
  .rail-view .sidebar { display:none; position:absolute; inset:0 auto 0 var(--rail-width); width:min(var(--side),calc(100% - var(--rail-width))); z-index:5; box-shadow:10px 0 24px #14142445; }
  .rail-view.drawer-open .sidebar { display:flex; }
  .rail-view .sheet-close { display:grid; place-items:center; position:absolute; z-index:2; right:8px; top:8px; }
  .rail-view:not(.drawer-open) .map-heading { display:block; }
  .viewport:focus-visible ~ .map-meta .map-prompts, .placing-pin .map-prompts { display:inline-flex; align-items:center; gap:16px; color:#f4e9dc; }
  .map-prompts kbd { color:#d5e5e2; font:650 11px system-ui; padding-right:3px; }
  .placing-pin .map-prompts .place-prompt { display:inline; }
  .placing-pin .map-prompts > span:not(.place-prompt) { display:none; }
}
@media (max-width:720px) {
  .wiki-grid .wiki-card { grid-template-columns:minmax(0,1fr) 16px; gap:3px 8px; min-height:72px; padding:12px 8px; }
  .wiki-grid .wiki-card > :not(svg) { grid-column:1; }
  .wiki-grid .wiki-card > svg { grid-column:2; grid-row:1/4; }
  .atlas.has-selection { --sheet-size:min(36%,250px); }
  .has-selection .viewport { height:calc(100% - var(--sheet-size)); }
  .has-selection .navigation { bottom:calc(var(--sheet-size) + 8px); }
  .has-selection .map-meta { display:none; }
  .has-selection .detail { inset:auto 0 0; width:100%; height:var(--sheet-size); max-height:none; padding:12px 16px 16px; border-radius:12px 12px 0 0; border-width:1px 0 0; }
  .detail .detail-actions .control, .detail-head .control, .wire-atlas .wire-layer label { min-height:44px; }
  .detail .detail-actions .square, .detail-head .square { min-width:44px; }
}
@media (min-width:721px) and (pointer:coarse) { #rail-groups button { min-height:44px; } }
.place-options > summary { display:flex; justify-content:flex-end; align-items:center; gap:6px; min-height:36px; color:#efdfd9; cursor:pointer; font-size:12px; list-style:none; }
.place-options > summary::-webkit-details-marker { display:none; }
.place-options > summary svg { width:14px; height:14px; }
.place-options[open] > summary svg { transform:rotate(180deg); }
.place-options[open] > summary { justify-content:flex-start; }
.secondary-actions { display:flex; gap:6px; }
.place-options .detail-grid { margin:12px 0; }
@media (max-width:720px) { .place-options > summary { min-height:44px; } }
#rail-hint { display:none; }
@media (min-width:721px) {
  .rail-view #rail-hint { display:block; position:absolute; left:73px; transform:translateY(-50%); z-index:6; pointer-events:none; padding:7px 11px; border:1px solid #ad99ad6b; border-radius:5px; background:#292536; color:#fff1e1; font-size:12px; }
}

/* Cyan is reserved for the player's current waypoint. */
.waypoint-hud {
  position:absolute; left:18px; bottom:47px; display:flex; align-items:stretch;
  max-width:min(300px,calc(100% - 88px)); isolation:isolate;
  border:1px solid #8eacb66b; border-left:3px solid #70e5ef; border-radius:5px;
  background:linear-gradient(115deg,#26303b,#232432); box-shadow:0 5px 16px #11132350;
}
.waypoint-hud button { display:flex; gap:10px; align-items:center; min-width:0; min-height:44px; padding:6px 12px; border:0; background:none; color:#fff1e1; text-align:left; }
.waypoint-hud button:hover { background:#38404b; }
.waypoint-hud i, .waypoint-action svg, .area-waypoint svg { width:17px; height:17px; flex:none; }
#waypoint-go i { color:#70e5ef; }
#waypoint-go > span { min-width:0; }
#waypoint-go small { display:block; font-size:10px; letter-spacing:.1em; color:#adecf0; text-transform:uppercase; }
#waypoint-go strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
#waypoint-clear { flex:none; padding-inline:10px; border-left:1px solid var(--hairline); }
.waypoint-action[aria-pressed=true], .area-waypoint[aria-pressed=true] { color:#a7f5f7; background:#253e48; }
.detail .waypoint-action { justify-self:start; }
.place-result { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; border-bottom:1px solid var(--hairline); }
.place-result .row { border-bottom:0; }
.area-waypoint { display:grid; place-items:center; min-width:40px; min-height:40px; border:0; border-radius:5px; background:transparent; color:#b5c3c9; }
.area-waypoint:hover { color:#a7f5f7; background:#323440; }
.search-group .row:focus-visible { outline-offset:-2px; background:#373546; }
@media (max-width:720px) {
  .waypoint-hud { left:8px; bottom:36px; }
  .has-selection .waypoint-hud { bottom:calc(var(--sheet-size) + 8px); }
  .area-waypoint, #waypoint-clear { min-width:44px; min-height:44px; }
}
.saved-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:3px; margin:4px 0 16px; gap:2px; border:1px solid var(--hairline); border-radius:8px; background:#1b1a24; }
.saved-filters button { min-width:0; min-height:36px; border:0; border-radius:5px; font-size:12px; font-weight:650; background:transparent; color:#c9c1cc; }
.saved-filters button[aria-pressed=true] { background:#403746; color:#fff1e1; }
.row-copy .saved-note { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; white-space:normal; margin-top:3px; font-size:12px; line-height:1.45; color:#d6cbd6; }
@media (max-width:720px) { .saved-filters button { min-height:44px; } }

/* Map orientation */
.map-heading { padding:12px 20px 14px 16px; background:linear-gradient(100deg,#192134df,#19213495 50%,transparent); border-left:2px solid #ecc9ac; }
.map-heading small { color:#eccebd; font:650 10px/1.2 system-ui; letter-spacing:.15em; text-transform:uppercase; }
.map-heading strong { font-family:var(--display); font-size:clamp(31px,3vw,44px); }
#zoom-readout { display:grid; place-items:center; min-height:21px; padding:1px 3px; color:#e5d8d9; background:#282733; font:650 10px/1.2 ui-monospace,monospace; font-variant-numeric:tabular-nums; }
.wire-atlas .map-meta { background:linear-gradient(0deg,#161b2aee,#1f2233e0); }

/* Location index */
.field-groups { grid-template-columns:minmax(0,1fr); gap:0; }
.wire-atlas .field-group { grid-template-columns:32px minmax(0,1fr) auto; column-gap:12px; min-height:48px; padding:6px 4px; }
.field-group .group-symbol { grid-row:auto; width:32px; height:32px; border-radius:8px; background:color-mix(in srgb,var(--ink) 9%,#22212b); }
.group-name { display:grid; gap:2px; }
.group-name strong { font-size:14px; }
.group-total { color:#dbcfd5; font:600 12px/1.3 ui-monospace,monospace; font-variant-numeric:tabular-nums; padding-right:4px; }
#rail-groups .is-filtered { box-shadow:inset 2px 0 var(--ink); background:#35313f; }
@media (min-width:721px) {
  .rail-view:not(.drawer-open) .group-filter.control:not([hidden]) { display:inline-flex; gap:8px; position:absolute; top:109px; left:24px; min-height:34px; max-width:min(240px,38%); background:#292636; border:1px solid #695a6c; border-radius:6px; font-size:12px; }
}

/* Search groups and matched text */
.search-group > summary { display:flex; align-items:center; gap:8px; min-height:44px; padding:5px 8px; border-bottom:1px solid var(--hairline); cursor:pointer; list-style:none; color:var(--warm-white); }
.search-group > summary::-webkit-details-marker { display:none; }
.search-group > summary strong { margin-right:auto; font-size:15px; }
.search-group > summary span { font:600 12px ui-monospace,monospace; color:var(--quiet-text); }
.search-group > summary svg { width:14px; height:14px; transform:rotate(-90deg); }
.search-group[open] > summary svg { transform:none; }
.row-copy mark { color:#ffdbbc; background:#61434a; border-radius:2px; }
.search-group .row { min-height:48px; }

/* Pin inspector */
.wire-atlas .row[data-point][aria-current=true] {
  background: #344b61;
  color: #fff0da;
  box-shadow: inset 3px 0 #ffe4c6;
}
.row[data-point][aria-current=true] .row-copy strong { font-style: italic; }
.detail .detail-title h2 { color: #fff0da; }

.detail-title { flex:1; min-width:0; overflow-wrap:anywhere; }
.pin-context { display:flex; align-items:center; gap:6px; color:var(--category); font-size:12px; font-weight:650; }
.pin-context svg { flex:none; width:16px; height:16px; }
.detail .detail-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; margin-top:12px; }
.detail .detail-actions .control { width:100%; justify-self:stretch; justify-content:center; }
.detail .description { line-height:1.5; margin:12px 0; }
.detail .place-options { margin-top:10px; border-top:1px solid var(--hairline); }
.detail .place-options > summary { justify-content:space-between; }
.detail .expand-place { display:none; }
@media (max-width:720px) {
  .detail .expand-place { display:inline-flex; }
  .expand-place[aria-expanded=false] svg { transform:rotate(180deg); }
  .atlas.has-selection.sheet-expanded { --sheet-size:min(66%,520px); }
  .detail .detail-head { align-items:flex-start; gap:4px; }
}

/* Guidebook cover, section navigation and chapter index */
.wiki-hero { grid-template-columns:1fr; isolation:isolate; background:#2d2432; }
.wiki-hero .postcard, .wiki-hero .guide-heading { grid-column:1; grid-row:1; }
.wiki-hero .postcard { margin:0; width:74%; justify-self:end; border-radius:0; }
.wiki-hero .postcard::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#2d2432,transparent 54%),linear-gradient(0deg,#2d243237,transparent); }
.wiki-hero .guide-heading { position:relative; z-index:1; align-self:end; pointer-events:none; }
.wiki-hero h1 { margin:0; text-shadow:0 2px 5px #241d2e80; }
.guide-toolbar { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; margin:12px 0 20px; border-bottom:1px solid var(--hairline); }
.guide-toolbar .wiki-tabs { margin:0; border:0; }
.guide-toolbar .chapter-picker { min-width:0; padding:4px 0; }
.chapter-shelf .campaign-index { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:0; }
.campaign-index .control { display:grid; align-content:start; justify-content:start; gap:5px; padding:8px 12px; border:0; border-left:1px solid #a18c9b55; border-radius:0; background:transparent; text-align:left; white-space:normal; }
.campaign-index .control:hover, .campaign-index .control:focus-visible { background:#463740; }
.campaign-index small { color:var(--peach); font-size:11px; }
.campaign-index strong { color:var(--warm-white); font-size:14px; line-height:1.35; }
@media (max-width:720px) {
  .wiki-hero .postcard { width:100%; }
  .wiki-hero .postcard::after { background:linear-gradient(80deg,#291e30ce,transparent 88%); }
  .guide-toolbar { display:grid; gap:4px; margin:8px 0 16px; padding-bottom:8px; }
  .guide-toolbar .wiki-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; }
  .guide-toolbar .wiki-tabs button { flex:none; }
  .guide-toolbar .chapter-picker { padding:4px; }
  .chapter-shelf .campaign-index { display:flex; flex-wrap:nowrap; overflow-x:auto; padding:3px; scroll-snap-type:x proximity; }
  .campaign-index .control { flex:0 0 min(62%,170px); scroll-snap-align:start; }
}

/* Original regional Guidebook covers */
[data-region="vice"] { --cover-art: url("./art/vice-city.webp"); }
[data-region="keys"] { --cover-art: url("./art/leonida-keys.webp"); }
[data-region="grass"] { --cover-art: url("./art/grassrivers.webp"); }
.region-guides { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; }
.region-guides button {
  position:relative; isolation:isolate; overflow:hidden; aspect-ratio:2.65;
  display:flex; align-items:flex-end; justify-content:space-between; gap:6px;
  padding:12px; border:1px solid var(--hairline); border-radius:7px;
  background:#2b303c; color:#fff3df; text-align:left;
}
.region-scene { position:absolute; z-index:-1; inset:0; background:var(--cover-art) center / cover; }
.region-guides button::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg,#151922e8,transparent 80%); }
.region-guides strong { font:italic 800 clamp(17px,2vw,25px)/1.04 var(--display); }
.region-guides svg { flex:none; width:16px; height:16px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .region-scene { transition:transform 400ms var(--arrive); }
  .region-guides button:hover .region-scene { transform:scale(1.03); }
}
@media(max-width:600px) {
  .region-guides { grid-template-columns:1fr; gap:8px; }
  .region-guides button { aspect-ratio:4.5; }
}

/* Playthrough library */
.saved-filters { border-radius:9px; padding:4px; }
.saved-filters button { display:grid; place-content:center; gap:3px; min-height:56px; }
.saved-filters strong { color:var(--warm-white); font-size:18px; line-height:1; font-variant-numeric:tabular-nums; }
.saved-filters span { font-size:11px; }
.saved-filters button[aria-pressed=true] { box-shadow:inset 0 -2px #f3c5ad; }
.recent-place { padding:14px 16px; border-radius:0 7px 7px 0; background:linear-gradient(105deg,#30353c,#292733); }
.recent-place .row-copy strong { font-size:16px; }
.saved-empty { padding:18px 14px; background:#26232e; border:1px solid var(--hairline); border-radius:8px; }
.saved-empty > svg { width:20px; height:20px; color:var(--peach); }
.saved-empty p { max-width:34ch; color:var(--quiet-text); font-size:14px; line-height:1.5; margin:8px 0 12px; }
.saved-empty .control { min-height:44px; }

.fan-notice {
  border: 0;
  background: transparent;
  color: #e2d1c8;
  padding: 6px;
  min-height: 36px;
  font-size: 12px;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: #ac9489;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.fan-notice:hover, .fan-notice:focus-visible { color: #fff4e8; }
.expanded-notice { display: none; }
.map-expanded .expanded-notice {
  display: block;
  position: absolute;
  top: 70px;
  right: 16px;
  padding-inline: 10px;
  border-radius: 6px;
  background: #201d2c;
}
@media (min-width: 721px) and (max-width: 920px), (max-width: 440px) {
  .topbar .header-actions .profile { width: 36px; padding: 0; justify-content: center; }
  .topbar .header-actions #profile-name, .topbar .header-actions .chevron { display: none; }
}

/* Keep guide entry points together above the map's location index. */
.map-guide-links { margin:14px 0 18px; padding:0; border:0; background:none; }
.map-guide-links h2 { margin:0 0 8px; font-size:14px; }
.map-guide-links .reward-shortcut { min-height:44px; font-size:12px; line-height:1.3; }
.map-guide-links [data-guide-section="journal"] { background:linear-gradient(110deg,#483346,#302938); border-color:#72515e; }
.map-guide-links .reward-shortcut svg { flex:none; }
.journal-steps { margin:14px 0; padding:0 14px; background:#272532; border:1px solid var(--hairline); border-radius:9px; }
.journal-steps summary { padding:13px 0; cursor:pointer; font-weight:650; color:var(--peach); }
.journal-steps ol { margin:0 0 16px; padding-inline-start:24px; }
.journal-steps li { padding-inline-start:4px; margin:8px 0; line-height:1.55; }
.journal-steps li::marker { color:#e9bca9; font-weight:700; }
.wiki-actions [data-complete][aria-pressed=true] { color:#b9e2cc; border-color:#739d90; }

.area-results { padding:0 12px 12px; }
.area-list { margin:18px 0; max-width:42rem; }
.area-list h3,.area-caption { font-size:.86rem; line-height:1.5; color:var(--muted); }
.area-caption { margin:0 15px 10px; }
.area-list .related-link,.area-results .related-link { width:100%; min-height:44px; text-align:left; gap:10px; border-bottom:1px solid var(--hairline); }
.area-list .related-link span,.area-results .related-link span { flex:1; }
.place-result .area-guide-count { grid-column:1; justify-self:start; background:transparent; border:0; margin:-4px 0 3px 28px; padding:5px 8px; color:#a5d7d1; cursor:pointer; font-size:12px; }
.area-disclosure { border-bottom:1px solid var(--hairline); }
.area-disclosure summary { display:flex; gap:12px; align-items:center; padding:12px 2px; cursor:pointer; }
.area-disclosure summary span { flex:1; }
.area-disclosure summary svg { width:16px; height:16px; }
.area-disclosure > div { padding:4px 0 12px 12px; }
.area-disclosure[open] summary svg { transform:rotate(180deg); }
.more-results { margin:6px 12px 12px; }
.card-set-list { max-width:34rem; margin:16px 0; }
.card-set-list label { display:grid; grid-template-columns:minmax(0,1fr) 4rem 3rem; align-items:center; gap:.6rem; padding:7px 0; border-bottom:1px solid var(--hairline); }
.card-set-list input { box-sizing:border-box; width:100%; min-height:40px; text-align:center; }

html[data-chapter-pending] body > :not(#chapter-welcome) { display:none !important }
#atlas-app:not([hidden]) { display:contents }
#chapter-welcome[hidden] { display:none }
#chapter-welcome { height:100vh;height:100dvh;overflow:auto;display:grid;place-items:safe center;padding:24px;color:#fff4ed;background:radial-gradient(ellipse at 20% 95%,#40304a,transparent 62%),linear-gradient(145deg,#142931,#1e1c30 72%) }
.chapter-card { box-sizing:border-box;width:min(100%,440px);margin:auto;padding:clamp(24px,5vw,42px);border:1px solid #ffffff29;border-radius:18px;background:#1d2332;box-shadow:0 24px 90px #080c172b }
.welcome-brand { display:flex;align-items:center;gap:12px;color:#f4b8bc;font-size:14px;font-weight:700 }
.chapter-card h1 { margin:28px 0 12px;font-size:clamp(32px,6vw,44px);line-height:1.04;letter-spacing:-.04em }
.chapter-card p { margin:0;color:#c8cad4;line-height:1.55 }
#chapter-form { display:grid;gap:9px;margin-top:26px }
#chapter-form label { font-size:14px;font-weight:600 }
#chapter-form select,#chapter-form button { width:100%;min-height:46px;border-radius:8px;padding:10px 12px;font:inherit }
#chapter-form select { background:#171c29;color:#fff4ed;border:1px solid #697080 }
#chapter-form button { margin-top:8px;background:#ffc0b7;color:#2b1d2a;border:0;font-weight:700;cursor:pointer }
#chapter-form :focus-visible { outline:2px solid #a6ddd8;outline-offset:3px }
#chapter-form button:disabled { opacity:.55;cursor:default }

.story-controls { margin:12px 20px 0; }
.story-controls .map-chapter { margin:0; gap:12px; font-size:12px; }
.story-controls select { min-height:36px; }
.story-visibility { margin:6px 0 0; font-size:11px; line-height:1.4; color:var(--muted); }
.sidebar-top .story-controls + .search { margin-top:12px; }
.guide-toolbar { flex-wrap:wrap; }
.guide-toolbar .story-visibility { flex-basis:100%; margin:0; text-align:right; }
.wiki-filters { flex-wrap:wrap; gap:8px; }
.wiki-filters [data-reset-filters] { min-height:36px; padding:6px 12px; font-size:12px; }
.search-empty p { font-size:12px; line-height:1.5; color:var(--muted); }
@media(max-width:720px) {
  .story-controls { margin-inline:16px; }
  .guide-toolbar .story-visibility { text-align:left; }
}
.map-chapter select,.chapter-picker select {
  appearance:none;
  padding-right:28px;
  background-image:linear-gradient(45deg,transparent 50%,#dfcbd6 50%),linear-gradient(135deg,#dfcbd6 50%,transparent 50%);
  background-position:calc(100% - 14px) 50%,calc(100% - 10px) 50%;
  background-size:4px 4px;
  background-repeat:no-repeat;
}

.all-content-toggle { min-height:36px; font-size:12px; padding:7px 12px; }
.story-controls .all-content-toggle { margin-top:10px; width:100%; }
.all-content-toggle[aria-pressed=true] { border-color:var(--sea-glass); color:#bce4de; }

/* Touch targets: keep primary controls at least 44px on phones. */
@media (max-width:720px) {
  .topbar .control,.topbar #fan-notice,.right-tools .control,.mobile-panel.control,#add-pin,#fullscreen,#reset,#zoom-in,#zoom-out {min-height:44px;min-width:44px}
  .topbar .header-actions #fan-notice,.topbar .header-actions #profiles {height:44px;min-height:44px;display:inline-flex;align-items:center}
}

/* Tier 1 polish: stronger pin leader, slimmer sidebar header, compact guide hero on articles. */
#pin-leader line { stroke-width:2px; stroke-linecap:round; filter:drop-shadow(0 0 3px #ffb39a99) drop-shadow(0 1px 1px #191626); }
#pin-leader circle { fill:#fff2dd; filter:drop-shadow(0 0 4px #ffb39acc); }
@media (min-width:721px) {
  .wire-atlas .atlas-cover { min-height:0; }
  .wire-atlas .atlas-cover .postcard { max-height:78px; overflow:hidden; }
  .wire-atlas .atlas-cover h1 { font-size:clamp(30px,4.4vh,40px); }
  .story-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:8px; padding:0; margin:0 16px; }
  .story-controls .map-chapter { margin:8px 0 0; grid-column:1 / -1; }
  .story-controls .story-visibility { grid-column:1; grid-row:2; margin:5px 0 0; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .story-controls .all-content-toggle { grid-column:2; grid-row:2; margin:5px 0 0; width:auto; min-height:26px; padding:0 9px; white-space:nowrap; font-size:11px; }
}
.wiki-hero.compact { min-height:0; }
.wiki-hero.compact .postcard { display:none; }
.wiki-hero.compact { grid-template-columns:1fr; }
.wiki-hero.compact .guide-heading { padding:12px 22px; }
.wiki-hero.compact h1 { margin:0; font-size:clamp(28px,3.4vw,40px); }

/* ============================================================
   Tier 2 + 3: GTA VI visual language, motion, time of day
   ============================================================ */
.wire-atlas, :root {
  --neon-cyan:#70e5ef; --hot-pink:#ff5fa2; --band-blue:#2f5bd6; --band-violet:#5a3fc0;
  --sunset:linear-gradient(100deg,#ffb36b 0%,#ff6fa8 55%,#9b6bff 100%);
  --band:linear-gradient(90deg,var(--band-blue),var(--band-violet) 70%,#a444a8);
}

/* Header: sunset hairline under the bar. */
.topbar { position:relative; }
.topbar::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:var(--sunset); opacity:.75; pointer-events:none; }

/* Active destination: broad blue band, white glyph, larger italic lettering (pause-menu cue). */
.wire-atlas .topbar .tab.active, .topbar .tab.active {
  background:var(--band); color:#fff; box-shadow:0 4px 18px #2f5bd655, inset 0 0 0 1px #ffffff2a;
  font-family:var(--display,system-ui); font-style:italic; font-weight:850; font-size:15px; letter-spacing:.01em;
}
.topbar .tab { transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease; }
.topbar .tab:not(.active):hover { transform:translateY(-1px); }
@media (min-width:721px) {
  #map-rail button { transition:background .16s ease,transform .16s ease,color .16s ease; }
  #map-rail button[aria-pressed=true] {
    background:var(--band); color:#fff; box-shadow:inset 3px 0 0 var(--neon-cyan), 0 4px 16px #2f5bd640;
    font-family:var(--display,system-ui); font-style:italic; font-weight:850;
  }
  #map-rail button[aria-pressed=true] svg { color:#fff; filter:drop-shadow(0 0 4px #70e5ef88); }
  #map-rail button:not([aria-pressed=true]):hover { transform:translateX(2px); }
}

/* Primary actions: hot-pink sunset, not flat peach. */
.control.filled, .wire-atlas .control.filled, #add-pin {
  background:var(--sunset); color:#2a1424; border-color:transparent; font-weight:800;
  box-shadow:0 6px 20px #ff6fa84d; transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.control.filled:hover, #add-pin:hover { transform:translateY(-1px); box-shadow:0 10px 26px #ff6fa873; filter:saturate(1.1); }
.control.filled:active, #add-pin:active { transform:translateY(0); }

/* Navigation ink: cyan is reserved for the current target (waypoint, active leader). */
#pin-leader line { stroke:var(--neon-cyan); filter:drop-shadow(0 0 4px #70e5efaa) drop-shadow(0 1px 1px #191626); }
#pin-leader circle { fill:var(--neon-cyan); filter:drop-shadow(0 0 5px #70e5efcc); }
.wire-atlas .detail, .detail { border-left-color:var(--neon-cyan); }

/* Motion: panels and rows ease in; callout rises. All disabled under reduced motion. */
@keyframes atlas-rise { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:none; } }
@keyframes atlas-slide { from { opacity:0; transform:translateX(-10px); } to { opacity:1; transform:none; } }
@keyframes atlas-fade { from { opacity:0; } to { opacity:1; } }
.detail:not([hidden]) { animation:atlas-rise .26s cubic-bezier(.2,.8,.2,1); }
#panel > * { animation:atlas-slide .28s cubic-bezier(.2,.8,.2,1) both; }
#panel > *:nth-child(2){animation-delay:.03s} #panel > *:nth-child(3){animation-delay:.06s}
#panel > *:nth-child(4){animation-delay:.09s} #panel > *:nth-child(5){animation-delay:.12s}
#panel .row, #panel .category { transition:background .14s ease, transform .14s ease; }
#panel .row:hover, #panel .category:hover { transform:translateX(3px); }
.wiki-wrap, .guide-wrap { animation:atlas-fade .3s ease both; }
.wiki-card, .guide-card { transition:transform .2s ease, box-shadow .2s ease; }
.wiki-card:hover, .guide-card:hover { transform:translateY(-3px); box-shadow:0 14px 32px #0b0c1c80; }

/* Saved: stat tiles read like a phone home screen. */
.saved-filters strong { font:italic 900 24px/1 var(--display,system-ui); background:var(--sunset); -webkit-background-clip:text; background-clip:text; color:transparent; }
.saved-filters button[aria-pressed=true] { background:var(--band); box-shadow:0 4px 16px #2f5bd655; }
.saved-filters button[aria-pressed=true] strong { background:none; color:#fff; }
.saved-empty { background:linear-gradient(145deg,#2c2540,#1f1d31); border-color:#ff6fa84d; text-align:left; }
.saved-empty > svg { width:28px; height:28px; color:var(--hot-pink); filter:drop-shadow(0 0 8px #ff5fa288); }

/* First-run chapter prompt: dusk poster behind a glass card. */
#chapter-welcome {
  background:linear-gradient(180deg,#14122ccc,#1b1030f2 70%),url("./art/leonida-dusk.webp") center/cover no-repeat;
}
.chapter-card { backdrop-filter:blur(14px); background:#1a1a2fcc; border-color:#ffffff33; box-shadow:0 30px 100px #05061488, 0 0 0 1px #ff6fa81f; animation:atlas-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.chapter-card h1 { font-family:var(--display,system-ui); font-style:italic; font-weight:900; letter-spacing:-.02em; }
.chapter-card .brand-row img, .chapter-card img { animation:atlas-rise .9s .15s cubic-bezier(.2,.8,.2,1) both; }

/* Time of day: regrade the base map and water only. */
#atlas[data-tod="night"] #viewport > canvas:first-of-type, #atlas[data-tod="night"] .water-bed { filter:brightness(.62) saturate(1.15) hue-rotate(-14deg) contrast(1.08); }
#atlas[data-tod="dawn"]  #viewport > canvas:first-of-type, #atlas[data-tod="dawn"]  .water-bed { filter:sepia(.28) saturate(1.35) hue-rotate(-24deg) brightness(1.08); }
#atlas[data-tod="day"]   #viewport > canvas:first-of-type, #atlas[data-tod="day"]   .water-bed { filter:brightness(1.42) saturate(.95) contrast(.96); }
#atlas #viewport > canvas:first-of-type, #atlas .water-bed { transition:filter .5s ease; }

@media (prefers-reduced-motion:reduce) {
  .detail:not([hidden]), #panel > *, .wiki-wrap, .guide-wrap, .chapter-card, .chapter-card img { animation:none !important; }
  .topbar .tab, #map-rail button, .control.filled, #add-pin, #panel .row, #panel .category, .wiki-card, .guide-card, #atlas #viewport > canvas:first-of-type, #atlas .water-bed { transition:none !important; }
  .topbar .tab:not(.active):hover, #map-rail button:not([aria-pressed=true]):hover, #panel .row:hover, #panel .category:hover, .wiki-card:hover, .guide-card:hover, .control.filled:hover, #add-pin:hover { transform:none; }
}

/* Shops & services mode */
.shop-types { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 14px; }
.shop-type-actions { display:flex; gap:6px; width:100%; margin-bottom:2px; }
.shop-type-actions button { min-height:30px; padding:0 12px; border:1px solid #ffffff2e; border-radius:999px; background:transparent; color:#d9d0e2; font-size:12px; font-weight:700; }
.shop-type-actions button:hover { background:#ffffff14; }
.shop-type { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:0 11px; border:1px solid #ffffff2e; border-radius:999px; background:#1c1c31; color:#bdb6cc; font-size:12px; font-weight:650; transition:background .16s ease,color .16s ease,border-color .16s ease; }
.shop-type b { color:#8d86a0; font-size:11px; font-variant-numeric:tabular-nums; }
.shop-type[aria-pressed=true] { background:linear-gradient(100deg,#2f5bd6,#5a3fc0); border-color:#8fb0ff66; color:#fff; box-shadow:0 3px 12px #2f5bd640; }
.shop-type[aria-pressed=true] b { color:#cfe0ff; }
.shop-type:hover { border-color:#70e5ef99; }
.shop-topic { display:block; margin-top:2px; color:#9a93ab; font-size:11px; font-weight:500; }
@media (max-width:720px) { .shop-type, .shop-type-actions button { min-height:44px; } }
@media (prefers-reduced-motion:reduce) { .shop-type { transition:none; } }
.shop-types { max-height:176px; overflow-y:auto; padding-right:4px; scrollbar-width:thin; }
@media (max-width:720px) { .shop-types { max-height:132px; } }

/* Phones: slimmer sheet header so lists and chips start higher. */
@media (max-width:720px) and (min-height:531px) {
  .wire-atlas .sidebar .atlas-cover { min-height:0; max-height:88px; overflow:hidden; }
  .wire-atlas .sidebar .atlas-cover .postcard { max-height:88px; }
  .wire-atlas .sidebar .atlas-cover h1 { font-size:30px; }
  .story-controls .story-visibility { display:none; }
  .story-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:8px; }
  .story-controls .map-chapter { grid-column:1; margin:8px 0 0; }
  .story-controls .all-content-toggle { grid-column:2; width:auto; margin:8px 0 0; min-height:44px; padding:0 12px; font-size:12px; white-space:nowrap; }
}

/* First-run prompt: same sunset primary action as the rest of the atlas. */
#chapter-form button { background:var(--sunset,linear-gradient(100deg,#ffb36b,#ff6fa8 55%,#9b6bff)); color:#2a1424; font-weight:800; box-shadow:0 6px 20px #ff6fa84d; transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
#chapter-form button:not(:disabled):hover { transform:translateY(-1px); box-shadow:0 10px 26px #ff6fa873; }
#chapter-form button:disabled { background:#4a3a4c; color:#c9b9c8; box-shadow:none; opacity:1; }
@media (prefers-reduced-motion:reduce) { #chapter-form button { transition:none; } #chapter-form button:not(:disabled):hover { transform:none; } }

/* ============================================================
   Phase 1 motion: tab highlight, view wipe, celebration banner, textures
   ============================================================ */
@media (min-width:721px) { .topbar #nav { position:relative; } }
.topbar #nav .nav-indicator {
  position:absolute; left:0; top:0; z-index:0; border-radius:9px; pointer-events:none;
  background:var(--band); box-shadow:0 4px 18px #2f5bd655, inset 0 0 0 1px #ffffff2a; will-change:transform,width;
}
.topbar #nav .tab { position:relative; z-index:1; }
.wire-atlas .topbar #nav.has-indicator .tab.active, .topbar #nav.has-indicator .tab.active { background:transparent; box-shadow:none; }

#view-wipe {
  position:fixed; inset:0 -15% 0 -15%; z-index:60; pointer-events:none; visibility:hidden;
  clip-path:polygon(14% 0,100% 0,86% 100%,0 100%);
  background:
    linear-gradient(100deg,transparent 0 30%,#ffffff1f 30% 31%,transparent 31% 62%,#ffffff1f 62% 63%,transparent 63%),
    linear-gradient(100deg,#ffb36b 0%,#ff6fa8 42%,#9b6bff 72%,#241a48 100%);
}

#atlas-banner {
  position:fixed; left:0; right:0; top:22%; z-index:55; display:grid; place-items:center; pointer-events:none;
}
#atlas-banner[hidden] { display:none; }
#atlas-banner .banner-band {
  display:grid; justify-items:center; gap:4px; min-width:min(640px,92vw); padding:18px 32px 16px;
  transform-origin:left center; transform:skewX(-8deg);
  background:linear-gradient(90deg,#0b0d1cdd,#1b1030f2 20%,#1b1030f2 80%,#0b0d1cdd);
  border-top:2px solid #ff6fa8; border-bottom:2px solid #70e5ef; box-shadow:0 18px 60px #05061488;
}
#atlas-banner strong {
  font:italic 900 clamp(34px,6vw,58px)/1 var(--display,system-ui); letter-spacing:.01em;
  background:var(--sunset); -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 2px 0 #0b0d1c);
}
#atlas-banner span { color:#fff1e1; font-size:14px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }

/* Print-like grain and halftone on hero art only, never over the live map. */
.wiki-hero, .atlas-cover, .chapter-card { position:relative; }
.wiki-hero::before, .atlas-cover::before, .chapter-card::before {
  content:""; position:absolute; inset:0; z-index:2; pointer-events:none; border-radius:inherit; opacity:.07; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wiki-hero::after {
  content:""; position:absolute; right:0; bottom:0; width:42%; height:60%; z-index:1; pointer-events:none; border-radius:inherit;
  background-image:radial-gradient(#ff6fa82e 1.2px,transparent 1.6px); background-size:9px 9px;
  -webkit-mask-image:linear-gradient(135deg,transparent 30%,#000 90%); mask-image:linear-gradient(135deg,transparent 30%,#000 90%);
}
.wiki-hero.compact::after { display:none; }

/* Display face: Anton (SIL Open Font License 1.1, see fonts/OFL-Anton.txt), served from the app. */
@font-face { font-family:"Anton"; font-style:normal; font-weight:400; font-display:swap;
  src:url("./fonts/anton-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Anton"; font-style:normal; font-weight:400; font-display:swap;
  src:url("./fonts/anton-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
:root, .wire-atlas { --display:"Anton","Avenir Next Condensed","Arial Narrow",Impact,system-ui,sans-serif; }
/* Anton ships one upright weight: allow a slanted style for the italic headings, never a faux bold. */
:root { font-synthesis-style:auto; font-synthesis-weight:none; }

/* ============================================================
   Phase 2: living map (cloud shadows, night neon), intro, dashboard
   ============================================================ */
.sky-plane { position:absolute; left:0; top:0; transform-origin:0 0; pointer-events:none; overflow:hidden; }
.cloud-drift {
  position:absolute; left:0; top:0; width:200%; height:100%; background-size:50% 50%; background-repeat:repeat;
  opacity:.5; mix-blend-mode:multiply; animation:cloud-drift 260s linear infinite; will-change:transform;
}
@keyframes cloud-drift { to { transform:translateX(-50%); } }
.neon-spot {
  position:absolute; border-radius:50%; opacity:0; mix-blend-mode:screen; transition:opacity .9s ease;
  background:radial-gradient(circle,#ff5fa266 0%,#ff5fa230 32%,#70e5ef22 52%,transparent 70%);
}
#atlas[data-tod="night"] .neon-spot { opacity:1; animation:neon-breathe 3.6s ease-in-out infinite alternate; }
#atlas[data-tod="night"] .neon-spot:nth-child(2n) { animation-delay:-1.3s; }
@keyframes neon-breathe { from { opacity:.72; } to { opacity:1; } }
#atlas[data-tod="day"] .cloud-drift { opacity:.32; }
#atlas[data-tod="night"] .cloud-drift { opacity:.7; }
.sky-plane.off .cloud-drift { display:none; }
.sky-plane.off .neon-spot { animation:none; }
.sky-plane.paused .cloud-drift, .sky-plane.paused .neon-spot { animation-play-state:paused; }
@media (prefers-reduced-motion:reduce) { .cloud-drift, .neon-spot { animation:none !important; } }

/* Opening sequence */
#atlas-intro {
  position:absolute; inset:0; z-index:30; display:grid; place-items:center; cursor:pointer;
  background:radial-gradient(ellipse at 50% 55%,transparent 30%,#0b0d1ccc 85%),linear-gradient(180deg,#1b1030aa,transparent 40%,#0b0d1c99);
}
#atlas-intro .intro-copy { display:grid; justify-items:center; gap:2px; transform:skewX(-6deg); }
#atlas-intro small { color:#fff1e1; font-size:15px; font-weight:800; letter-spacing:.42em; text-transform:uppercase; }
#atlas-intro strong {
  font:400 clamp(72px,13vw,168px)/.9 var(--display); text-transform:uppercase; letter-spacing:.01em; font-style:italic;
  background:var(--sunset); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 6px 0 #0b0d1c) drop-shadow(0 0 30px #ff6fa866);
}
#atlas-intro span { color:#70e5ef; font-size:13px; font-weight:800; letter-spacing:.5em; text-transform:uppercase; }
#atlas-intro .intro-skip { position:absolute; bottom:24px; margin:0; color:#d9d0e2; font-size:12px; letter-spacing:.08em; opacity:.8; }

/* Saved: progress dashboard */
.dash { margin:2px 0 14px; padding:14px; border:1px solid #ffffff1f; border-radius:14px; background:linear-gradient(150deg,#2a2342,#1b1a2e); box-shadow:inset 0 1px 0 #ffffff14; }
.dash-top { display:flex; align-items:center; gap:14px; }
.dash-ring { width:80px; height:80px; flex:none; transform:rotate(-90deg); }
.dash-ring circle { fill:none; stroke-width:8; }
.dash-ring .track { stroke:#ffffff17; }
.dash-ring .fill { stroke:#ff6fa8; stroke-linecap:round; stroke-dasharray:var(--dash); stroke-dashoffset:var(--gap); filter:drop-shadow(0 0 4px #ff6fa880); }
.dash-ring text { transform:rotate(90deg); transform-origin:40px 40px; fill:#fff1e1; font:400 19px var(--display); text-anchor:middle; }
.dash-copy { display:grid; gap:2px; min-width:0; }
.dash-copy strong { font:400 26px/1 var(--display); color:#fff1e1; letter-spacing:.01em; }
.dash-copy > span { color:#b9b1c9; font-size:12px; }
.dash-chapters { display:flex; gap:4px; margin-top:8px; }
.dash-chapters span { display:grid; place-items:center; width:24px; height:22px; border-radius:5px; background:#ffffff12; color:#8d86a0; font-size:11px; font-weight:800; transform:skewX(-10deg); }
.dash-chapters span.on { background:var(--band); color:#fff; }
.dash-chapters span.now { box-shadow:0 0 0 2px #70e5ef; }
.dash-sets { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:7px; }
.dash-sets li { display:grid; grid-template-columns:1fr auto; gap:3px 8px; font-size:12px; color:#ddd6e6; }
.dash-sets b { color:#fff1e1; font-variant-numeric:tabular-nums; }
.dash-sets i { grid-column:1 / -1; transform-origin:left center; height:4px; border-radius:4px; background:linear-gradient(90deg,var(--set) calc(var(--fill)*100%),#ffffff14 0); }
.dash-heading { margin:12px 0 6px; color:#b9b1c9; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.dash-recent-list { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
.dash-recent { display:flex; align-items:center; gap:8px; width:100%; min-height:36px; padding:0 8px; border:0; border-radius:8px; background:#ffffff0d; color:#fff1e1; font-size:12px; text-align:left; }
.dash-recent:hover { background:#ffffff1a; }
.dash-recent svg { width:16px; height:16px; color:#70e5ef; }
@media (max-width:720px) { .dash-recent { min-height:44px; } }
.dash-intro .dash-ring .fill { animation:dash-ring 1s cubic-bezier(.2,.8,.2,1) both; }
.dash-intro .dash-sets i { animation:dash-bar .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes dash-ring { from { stroke-dashoffset:var(--dash); } }
@keyframes dash-bar { from { transform:scaleX(0); } }
@media (prefers-reduced-motion:reduce) { .dash-intro .dash-ring .fill, .dash-intro .dash-sets i { animation:none; } }
/* Feather the cloud plane so its world rectangle never shows at low zoom. */
.sky-plane, .water-plane {
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent),linear-gradient(180deg,transparent,#000 7%,#000 93%,transparent);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent),linear-gradient(180deg,transparent,#000 7%,#000 93%,transparent);
  mask-composite:intersect;
}

/* ============================================================
   Phase 3: run planner, route controls, second-screen mode
   ============================================================ */
.run-plan { width:100%; justify-content:center; gap:8px; margin:2px 0 10px; min-height:42px; background:linear-gradient(100deg,#3a2342,#2a2142); border-color:#ff8fb066; color:#ffe1ec; }
.run-plan:hover { border-color:#ff8fb0; }
.run-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:2px 0 10px; padding:8px 10px; border-radius:10px; background:#ff6fa81f; border:1px solid #ff8fb066; color:#ffe1ec; font-size:13px; font-weight:700; }
.run-bar span { display:inline-flex; align-items:center; gap:7px; }
.run-bar svg, .run-plan svg { width:16px; height:16px; color:#ff8fb0; }
.companion-toggle { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; padding:12px; border-radius:10px; background:#ffffff0d; font-weight:700; }
.companion-toggle small { flex-basis:100%; color:#b9b1c9; font-weight:500; font-size:12px; }

/* Second-screen mode: everything a thumb needs while a controller is in the other hand. */
.companion body { font-size:17px; }
.companion .control { min-height:50px; font-size:15px; }
.companion .control.square { min-width:50px; }
.companion #panel .row, .companion .category { min-height:62px; font-size:16px; }
.companion #map-rail button { min-height:54px; font-size:15px; }
.companion .detail .detail-actions .control { min-height:58px; font-size:17px; }
.companion .detail-title h2 { font-size:30px; }
.companion .right-tools .control, .companion .navigation .control { min-width:54px; min-height:54px; }
.companion .topbar #nav .tab { min-height:46px; font-size:15px; }
@media (min-width:721px) { .companion { --side:360px; } }

/* ============================================================
   Phase 4: magazine Guidebook
   ============================================================ */
/* Chapter timeline */
.chapter-timeline { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:14px 0 16px; counter-reset:none; }
.tl-card {
  position:relative; display:grid; justify-items:start; gap:3px; min-width:0; padding:14px 14px 13px; text-align:left;
  border:1px solid #ffffff1c; border-radius:12px; background:linear-gradient(160deg,#2b2340,#1d1b2e); color:#fff1e1;
  transform:skewX(-4deg); transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tl-card > * { transform:skewX(4deg); }
.tl-card small { color:#b9b1c9; font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.tl-card strong { font:400 19px/1.05 var(--display); letter-spacing:.01em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.tl-card span { color:#d7cfe2; font-size:12px; }
.tl-ring { width:44px; height:44px; margin-bottom:4px; transform:rotate(-90deg) skewX(4deg); }
.tl-ring circle { fill:none; stroke-width:4.5; }
.tl-ring .track { stroke:#ffffff17; }
.tl-ring .fill { stroke:#ff6fa8; stroke-linecap:round; stroke-dasharray:113.1; stroke-dashoffset:calc(113.1 * (1 - var(--p))); }
.tl-ring text { transform:rotate(90deg); transform-origin:22px 22px; fill:#fff1e1; font:400 17px var(--display); text-anchor:middle; }
.tl-done .tl-ring .fill { stroke:#70e5ef; }
.tl-now { border-color:#ff8fb0; background:linear-gradient(160deg,#3d2647,#24203a); box-shadow:0 10px 30px #ff6fa833, inset 0 0 0 1px #ff8fb044; }
.tl-now small { color:#ff8fb0; }
.tl-later { opacity:.55; }
.tl-later strong { color:#9e97b0; }
button.tl-card:hover { transform:skewX(-4deg) translateY(-3px); border-color:#70e5ef88; }
@media (max-width:900px) { .chapter-timeline { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(170px,1fr); overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:6px; } .tl-card { scroll-snap-align:start; } }

/* Character dossiers */
/* Character dossiers: a monogram badge leads the row */
.wiki-grid .wiki-card.dossier { grid-template-columns:44px minmax(90px,.6fr) minmax(120px,1.15fr) minmax(130px,2fr) 16px; background:linear-gradient(90deg,#2c2340,transparent 70%); }
.wiki-card.dossier .monogram {
  display:grid; place-items:center; width:40px; height:46px; font:400 18px/1 var(--display); font-style:normal; color:#1b1030;
  background:var(--sunset); clip-path:polygon(50% 0,100% 22%,100% 78%,50% 100%,0 78%,0 22%);
}
.wiki-grid .wiki-card.dossier strong { font:400 20px/1.05 var(--display); letter-spacing:.01em; }

/* Quest journal: mission board */
/* Quest journal: mission board rows with a mission tag and a completion stamp */
.wiki-grid .wiki-card.quest { grid-template-columns:96px minmax(100px,.7fr) minmax(120px,1.15fr) minmax(130px,2fr) 16px; border-left:3px solid #ff8fb0; }
.wiki-grid .wiki-card.quest > .quest-no { grid-column:1; }
.wiki-grid .wiki-card.quest > small { grid-column:2; }
.wiki-grid .wiki-card.quest > strong { grid-column:3; }
.wiki-grid .wiki-card.quest > span { grid-column:4; }
.wiki-grid .wiki-card.quest > svg { grid-column:5; }
.wiki-card.quest .quest-no { justify-self:start; padding:3px 8px; border-radius:4px; background:#ffffff12; color:#ffd2a8; font-style:normal; font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; white-space:nowrap; }
.wiki-card.quest[data-done] { border-left-color:#70e5ef; }
.wiki-card.quest[data-done] strong { color:#c9c2d6; }
.wiki-card.quest .quest-stamp {
  position:absolute; right:40px; top:50%; translate:0 -50%; padding:3px 8px; border:2px solid #70e5ef; border-radius:4px; color:#70e5ef;
  font:400 13px/1 var(--display); letter-spacing:.08em; text-transform:uppercase; rotate:-8deg; background:#0b0d1ccc;
}
@media (max-width:720px) {
  .wiki-grid .wiki-card.dossier, .wiki-grid .wiki-card.quest { grid-template-columns:minmax(0,1fr) 16px; }
  .wiki-grid .wiki-card.quest > :not(svg):not(.quest-stamp) { grid-column:1; }
  .wiki-grid .wiki-card.quest > svg { grid-column:2; }
}

/* Collectible card sets: tiles with completion bars */
.card-set-list { max-width:none; display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
.card-set-list label {
  position:relative; grid-template-columns:minmax(0,1fr) 4rem 2.6rem; padding:12px 12px 16px; border:1px solid #ffffff1c; border-radius:10px;
  background:linear-gradient(150deg,#2a2342,#1d1b2e); overflow:hidden;
}
.card-set-list label::after { content:""; position:absolute; left:0; bottom:0; height:4px; width:calc(var(--fill,0) * 100%); background:var(--sunset); transition:width .4s cubic-bezier(.2,.8,.2,1); }
.card-set-list label.complete { border-color:#70e5ef88; box-shadow:inset 0 0 0 1px #70e5ef33; }
.card-set-list label.complete::after { background:#70e5ef; }
.card-set-list label.complete span::after { content:" ✓"; color:#70e5ef; }

/* Region cards tilt toward the pointer */
.region-guides { perspective:900px; }
.region-guides button { transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transition:transform .25s cubic-bezier(.2,.8,.2,1); transform-style:preserve-3d; }
@media (prefers-reduced-motion:reduce) { .region-guides button, .tl-card, .card-set-list label::after { transition:none; } .region-guides button { transform:none; } }
.card-set-list label { grid-template-columns:minmax(0,1fr) 4.5rem 2.8rem; row-gap:8px; }
.card-set-list label > span { grid-column:1 / -1; font-weight:700; color:#fff1e1; }
.card-set-list label > input { grid-column:2; }
.card-set-list label > small { grid-column:3; }

/* Final UX pass: one-tap follow-ups on the pin card */
.detail .detail-actions .wide-action { grid-column:1 / -1; justify-content:center; gap:8px; }
.detail .detail-actions .wide-action svg { width:16px; height:16px; }
.detail .detail-actions .wide-action:not(.filled) { border-color:#70e5ef66; color:#c9f6fa; }
.detail .detail-actions .wide-action.filled { background:var(--sunset); color:#2a1424; border-color:transparent; }
@media (max-width:720px) {
  .detail .secondary-actions .control, .detail .secondary-actions .control.square { min-width:44px; min-height:44px; }
  .detail .secondary-actions { gap:8px; }
}
@media (max-width:720px) {
  .wiki-grid .wiki-card.dossier { grid-template-columns:40px minmax(0,1fr) 16px; column-gap:12px; }
  .wiki-grid .wiki-card.dossier > .monogram { grid-column:1; grid-row:1 / 4; align-self:center; }
  .wiki-grid .wiki-card.dossier > small, .wiki-grid .wiki-card.dossier > strong, .wiki-grid .wiki-card.dossier > span { grid-column:2; }
  .wiki-grid .wiki-card.dossier > svg { grid-column:3; grid-row:1 / 4; }
}

/* Chapter must-do checklist */
.task-card { margin-top:16px; padding:16px 18px; border:1px solid #ff8fb055; border-radius:12px; background:linear-gradient(150deg,#2f2340,#1e1c30); }
.task-card header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.task-card h3 { margin:0; font:400 22px/1.1 var(--display); letter-spacing:.01em; color:#fff1e1; }
.task-card header b { font:400 20px/1 var(--display); color:#ff8fb0; font-variant-numeric:tabular-nums; }
.task-card ul { list-style:none; margin:12px 0 10px; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:2px 18px; }
.task-card label { display:flex; align-items:flex-start; gap:10px; min-height:44px; padding:10px 6px; border-radius:8px; cursor:pointer; color:#eee6f2; line-height:1.35; }
.task-card label:hover { background:#ffffff0d; }
.task-card input { flex:none; width:20px; height:20px; margin:1px 0 0; accent-color:#ff6fa8; }
.task-card input:checked + span { color:#9f98b1; text-decoration:line-through; }
.task-card em { font-style:normal; margin-left:4px; padding:1px 6px; border-radius:4px; background:#ffffff14; color:#ffd2a8; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; text-decoration:none; display:inline-block; }
.task-card p { margin:0; color:#b9b1c9; font-size:12px; }
.task-card p button { border:0; background:none; padding:0; color:#70e5ef; text-decoration:underline; font:inherit; }
.dash-todo { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:44px; margin-top:12px; padding:0 12px; border:1px solid #ff8fb055; border-radius:10px; background:#ff6fa814; color:#ffe1ec; font-size:13px; font-weight:700; }
.dash-todo b { color:#ff8fb0; font-variant-numeric:tabular-nums; }
.dash-todo:hover { background:#ff6fa826; }

/* Personal pin suggestions and unverified locations */
.pin-privacy { margin:4px 0 0; color:#70e5ef; font-size:12px; font-weight:700; }
.pin-unverified { margin:6px 0 0; padding:5px 9px; border:1px dashed #ffd08a; border-radius:6px; color:#ffe1b8; font-size:12px; font-weight:700; }
.pin-share-toggle { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:10px 0; font-weight:700; }
.pin-share-toggle small { flex-basis:100%; color:#b9b1c9; font-weight:500; font-size:12px; }
.share-pins h3 { margin:0 0 6px; font:400 20px var(--display); }

/* ============================================================
   Flatter menus: one level wherever possible
   ============================================================ */
/* Pin card: every action visible, no "More actions" drawer. */
.detail .place-options { margin-top:10px; padding-top:10px; border-top:1px solid var(--hairline); }
.detail .secondary-actions { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:6px; }
.detail .control.quick { display:grid; justify-items:center; gap:3px; min-height:48px; padding:6px 2px; font-size:10px; font-weight:700; letter-spacing:.02em; color:#d9d0e2; }
.detail .control.quick svg { width:17px; height:17px; }
.detail .control.quick[aria-pressed=true], .detail .control.quick[aria-expanded=true] { border-color:#70e5ef88; color:#c9f6fa; background:#70e5ef1a; }
.detail .note-box { margin-top:10px; }
/* Desktop: the rail already switches Locations / Places / Layers, so the in-panel copy goes. */
@media (min-width:721px) { .rail-view .browse-tabs { display:none; } }
/* Story progress lives in the header menu, not on top of every list. */
.sidebar .story-controls { display:none; }
.profile-chapter { flex:none; padding:2px 7px; border-radius:999px; background:var(--band); color:#fff; font:400 12px/1.3 var(--display); letter-spacing:.04em; }
/* Menu dialog tabs */
.menu-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:4px; margin:0 0 16px; border:1px solid var(--hairline); border-radius:10px; background:#14131f; }
.menu-tabs button { min-height:40px; border:0; border-radius:7px; background:transparent; color:#cfc5d2; font-weight:700; font-size:13px; }
.menu-tabs button[aria-selected=true] { background:var(--band); color:#fff; }
.menu-panel[hidden] { display:none; }
@media (max-width:720px) { .menu-tabs button { min-height:44px; } }
@media (max-width:720px) { .atlas.has-selection { --sheet-size:min(46%,340px); } }
#change-chapter .dialog-actions, #choose-profile .dialog-actions { display:none; }
@media (max-width:720px) { .topbar .header-actions .profile, .topbar .header-actions #profiles { width:auto; min-width:44px; padding:0 8px; gap:5px; } }

/* Activities and shops: areas expand in place instead of opening another page */
.area-group { border-bottom:1px solid var(--hairline); }
.area-group > summary { display:flex; align-items:center; gap:10px; min-height:44px; padding:0 4px; cursor:pointer; list-style:none; color:#fff1e1; font-weight:700; }
.area-group > summary::-webkit-details-marker { display:none; }
.area-group > summary span { flex:1; min-width:0; }
.area-group > summary b { color:#ff8fb0; font-variant-numeric:tabular-nums; }
.area-group > summary svg { width:14px; height:14px; color:#b9b1c9; transition:transform .16s ease; }
.area-group[open] > summary svg { transform:rotate(180deg); }
.area-group[open] { padding-bottom:8px; background:#ffffff08; }
.area-group .related-link { padding-left:14px; }
.area-center { display:inline-flex; align-items:center; gap:6px; margin:0 0 4px 12px; min-height:32px; padding:0 10px; border:1px solid #70e5ef55; border-radius:999px; background:transparent; color:#c9f6fa; font-size:12px; font-weight:700; }
.area-center svg { width:14px; height:14px; }
@media (max-width:720px) { .area-center { min-height:44px; } }
@media (prefers-reduced-motion:reduce) { .area-group > summary svg { transition:none; } }

/* ============================================================
   Device pass: large iPhones, landscape, and folding displays
   ============================================================ */
/* The header button always fits its chapter chip. */
.topbar .header-actions .profile, .topbar .header-actions #profiles { width:auto; min-width:44px; padding:0 9px; gap:6px; }
/* Keep content clear of the notch or camera housing when the phone is sideways. */
body { padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right); box-sizing:border-box; background:#15172b; }
/* Finger-sized controls on any touch screen, whatever its width. */
@media (max-width:720px), (pointer:coarse) {
  .control, .wiki-tabs button, .guide-topics .control, .playthrough-summary > summary, .topbar .tab, #group-filter { min-height:44px; }
  .control.square, dialog .control.square { min-width:44px; min-height:44px; }
  select { min-height:44px; }
  .topbar #fan-notice, .fan-notice { min-height:44px; display:inline-flex; align-items:center; }
}
/* Short and wide (a phone on its side, a folded Duo held sideways): give the map the room. */
@media (max-height:500px) and (min-width:721px) {
  .shell.rail-view:has(#rail-toggle[aria-expanded=true]) { --rail-width:60px; }
  #map-rail:has(#rail-toggle[aria-expanded=true]) button { grid-template-columns:none; justify-items:center; padding:0; }
  #map-rail button span, #map-rail #rail-toggle { display:none; }
  .map-heading, .map-compass, .map-meta .map-prompts { display:none !important; }
  .wire-atlas .detail, .detail { max-height:calc(100% - 76px); overflow:auto; }
  .wiki-hero:not(.compact) .postcard { max-height:120px; }
}
/* Folding displays that report two side-by-side segments: the browse panel fills the left
   half up to the hinge so nothing important sits on the fold. */
@media (horizontal-viewport-segments:2) and (min-width:721px) {
  .rail-view .sidebar { width:calc(env(viewport-segment-width 0 0, 50vw) - var(--rail-width)); }
  .wire-atlas .detail, .detail { max-width:calc(env(viewport-segment-width 1 0, 50vw) - 24px); }
}
@media (max-width:720px) { .atlas.has-selection:not(.sheet-expanded) { --sheet-size:min(52%, var(--sheet-fit, 340px)); } }
/* Mid-width screens (an unfolded Duo, a small tablet): icon rail so the map keeps its width. */
@media (min-width:721px) and (max-width:1000px) {
  .shell.rail-view:has(#rail-toggle[aria-expanded=true]) { --rail-width:64px; }
  #map-rail:has(#rail-toggle[aria-expanded=true]) button { grid-template-columns:none; justify-items:center; padding:0; }
  #map-rail button span, #map-rail #rail-toggle { display:none; }
}

/* ============================================================
   Batch 1: in-place rows, list ticks, undo, less duplicate chrome
   ============================================================ */
/* The header chip owns story progress; the Guidebook no longer repeats it. */
.guide-toolbar .chapter-picker, .guide-toolbar .all-content-toggle, .guide-toolbar .story-visibility { display:none; }
/* Programmatic focus on headings is for screen readers, not a visible box. */
.wiki-content h2[tabindex="-1"]:focus, #guide-page h2[tabindex="-1"]:focus { outline:none; }
.row-wrap { position:relative; border-bottom:1px solid var(--hairline); }
.row-wrap > .wiki-card { border-bottom:0; }
.row-wrap.has-tick > .wiki-card { padding-right:132px; }
.row-wrap.open { background:linear-gradient(90deg,#2c2340,#1f1d30); }
.row-wrap.open > .wiki-card > svg { transform:rotate(90deg); }
.row-tick { position:absolute; right:44px; top:13px; display:inline-flex; align-items:center; gap:5px; min-height:32px; padding:0 10px; border:1.5px solid #ffffff3d; border-radius:6px; background:transparent; color:#cfc5d2; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.row-tick svg { width:14px; height:14px; opacity:.45; }
.row-tick:hover { border-color:#70e5ef; color:#fff; }
.row-tick[aria-pressed=true] { border-color:#70e5ef; color:#70e5ef; background:#70e5ef14; rotate:-4deg; }
.row-tick[aria-pressed=true] svg { opacity:1; }
.row-detail { padding:2px 18px 18px; animation:atlas-rise .22s cubic-bezier(.2,.8,.2,1); }
.row-detail p { margin:0 0 10px; max-width:70ch; color:#e6deee; line-height:1.5; }
.row-detail .row-meta { color:#b9b1c9; font-size:13px; }
.row-detail .wiki-actions { margin-top:10px; }
@media (max-width:720px) {
  .row-wrap.has-tick > .wiki-card { padding-right:8px; padding-bottom:52px; }
  .row-tick { top:auto; bottom:8px; right:auto; left:8px; min-height:40px; }
  .row-wrap.open .row-tick { bottom:auto; top:auto; position:static; margin:0 0 8px 8px; }
}
@media (prefers-reduced-motion:reduce) { .row-detail { animation:none; } }
#toast { pointer-events:auto; }
.toast-undo { margin-left:10px; min-height:32px; padding:0 12px; border:1px solid #70e5ef88; border-radius:999px; background:#70e5ef1a; color:#c9f6fa; font-weight:800; font-size:12px; }
.toast-undo:hover { background:#70e5ef33; }
.row-wrap.has-tick > .wiki-card > svg { display:none; }
.row-wrap.has-tick > .wiki-card { padding-right:128px; }
.row-tick { right:14px; }
@media (max-width:720px) { .row-wrap.has-tick > .wiki-card { padding-right:8px; } .row-tick { right:auto; } }

/* ============================================================
   Batch 2: stars, counters, chapter cleared
   ============================================================ */
.stars { display:inline-flex; gap:1px; font-size:12px; line-height:1; letter-spacing:0; }
.stars .star { color:#ffffff26; transition:color .3s ease, text-shadow .3s ease; }
.stars .star.on { color:#ffd27a; text-shadow:0 0 6px #ffb36b99; }
.stars.full .star.on { color:#70e5ef; text-shadow:0 0 8px #70e5efaa; }
.dash-sets li { grid-template-columns:1fr auto auto; align-items:center; }
.dash-copy .stars { margin-top:6px; font-size:15px; }
.dash-intro .stars .star.on { animation:star-pop .45s cubic-bezier(.2,.8,.2,1) both; }
.dash-intro .stars .star.on:nth-child(2){animation-delay:.08s} .dash-intro .stars .star.on:nth-child(3){animation-delay:.16s}
.dash-intro .stars .star.on:nth-child(4){animation-delay:.24s} .dash-intro .stars .star.on:nth-child(5){animation-delay:.32s}
@keyframes star-pop { from { transform:scale(0) rotate(-40deg); opacity:0; } 70% { transform:scale(1.35); } to { transform:none; opacity:1; } }
.task-card.cleared { border-color:#70e5ef88; box-shadow:0 0 0 1px #70e5ef33, 0 10px 30px #70e5ef1f; }
.task-card.cleared header b { color:#70e5ef; }
.task-card.cleared header h3::after { content:" · CLEARED"; color:#70e5ef; }
@media (prefers-reduced-motion:reduce) { .dash-intro .stars .star.on { animation:none; } .stars .star { transition:none; } }

/* Saved & found: five filters */
.saved-filters { grid-template-columns:repeat(5,minmax(0,1fr)); }
.saved-filters button { font-size:11px; padding:0 2px; }

/* The fan-guide notice lives in the footer, not the header. */
.footer-notice { min-height:0; padding:0; margin-left:12px; border:0; background:none; color:#b9b1c9; font:inherit; font-size:12px; text-decoration:underline; text-underline-offset:3px; pointer-events:auto; cursor:pointer; }
.footer-notice:hover, .footer-notice:focus-visible { color:#fff4e8; }
.map-meta .map-attribution { pointer-events:auto; display:inline-flex; align-items:center; }
.site-footer { display:flex; align-items:center; justify-content:center; gap:4px; margin:40px 0 0; padding:18px 0 28px; border-top:1px solid var(--hairline); color:#8d86a0; font-size:12px; }
@media (max-width:720px), (pointer:coarse) { .footer-notice { min-height:44px; display:inline-flex; align-items:center; } .site-footer { padding-bottom:84px; } }

/* Visual pass */
.header-actions .profile { max-width:260px; }
.map-meta .footer-notice { font-size:11px; letter-spacing:.02em; }
.group-divider { margin:18px 0 6px; padding-top:14px; border-top:1px solid var(--hairline); color:#70e5ef; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.group-divider small { display:block; margin-top:3px; color:#9f98b1; font-weight:500; letter-spacing:0; text-transform:none; font-size:12px; }
.map-heading { background:linear-gradient(100deg,#15172bf5,#15172be6 62%,#15172b00); padding-right:56px; border-radius:0 12px 12px 0; }
.map-heading strong { letter-spacing:-.01em; }
.map-compass { background:radial-gradient(circle,#15172bd9 45%,#15172b00 72%); border-radius:50%; }
.detail-title h2, .detail .detail-title h2 { letter-spacing:.005em; }

/* Per-set quick controls in the Locations list */
.set-row { display:grid; grid-template-columns:minmax(0,1fr) 36px 36px; align-items:center; gap:2px; border-bottom:1px solid var(--hairline); }
.set-row .field-group, .wire-atlas .set-row .field-group { border-bottom:0; width:100%; }
.set-tool { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:8px; background:transparent; color:#b9b1c9; }
.set-tool svg { width:17px; height:17px; }
.set-tool:hover:not(:disabled), .set-tool:focus-visible { background:#ffffff14; color:var(--ink,#fff); }
.set-tool:disabled { opacity:.25; }
.set-row.is-hidden .field-group { opacity:.45; }
.set-row.is-hidden [data-set-toggle] { color:#ff9d8f; }
.set-row .group-total { min-width:44px; text-align:right; }
.set-bulk { display:flex; gap:6px; margin:0 0 8px; }
.set-bulk button { min-height:30px; padding:0 12px; border:1px solid #ffffff2e; border-radius:999px; background:transparent; color:#d9d0e2; font-size:12px; font-weight:700; }
.set-bulk button:hover { background:#ffffff14; }
@media (max-width:720px), (pointer:coarse) { .set-row { grid-template-columns:minmax(0,1fr) 44px 44px; } .set-tool { width:44px; height:44px; } .set-bulk button { min-height:44px; } }

/* Locations list: sets under foldable headings */
.set-section { margin-top:10px; border-top:1px solid var(--hairline); }
.set-section .group-divider { margin:0; padding:0; border:0; }
.group-divider button { display:grid; grid-template-columns:minmax(0,1fr) auto 18px; align-items:center; gap:10px; width:100%; min-height:44px; padding:0 4px; border:0; background:transparent; color:#70e5ef; font:inherit; letter-spacing:inherit; text-transform:inherit; text-align:left; cursor:pointer; }
.set-section.is-reference .group-divider button { color:#c9bfe0; }
.group-divider button small { display:inline; margin:0; color:#9f98b1; font-weight:600; font-variant-numeric:tabular-nums; }
.group-divider button svg { width:16px; height:16px; transition:transform .2s ease; }
.group-divider button[aria-expanded=false] svg { transform:rotate(-90deg); }
.group-divider button:hover span { color:#fff; }
@media (prefers-reduced-motion:reduce) { .group-divider button svg { transition:none; } }

/* Fish & animals finder */
.species-note { margin:0 0 10px; }
.species-filter { display:flex; align-items:center; gap:8px; min-height:44px; margin:0 0 6px; padding:0 12px; border:1px solid #ffffff26; border-radius:10px; background:#1b1a29; color:#9f98b1; }
.species-filter:focus-within { border-color:#70e5ef; }
.species-filter svg { width:16px; height:16px; flex:none; }
.species-filter input { flex:1; min-width:0; border:0; background:transparent; color:#fff1e1; font:inherit; font-size:14px; outline:0; }
.species-kind { margin:16px 0 4px; color:#70e5ef; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.species-kind small { margin-left:6px; color:#9f98b1; font-weight:600; letter-spacing:0; }
.species-row { display:grid; grid-template-columns:34px minmax(0,1fr) 18px; align-items:center; gap:12px; width:100%; min-height:52px; padding:6px 8px 6px 4px; border:0; border-bottom:1px solid var(--hairline); border-radius:8px; background:transparent; color:#fff1e1; text-align:left; cursor:pointer; }
.species-row[hidden] { display:none; }
.species-row .group-symbol { color:var(--ink); }
.species-row .group-name small { display:block; margin-top:2px; color:#a9a2ba; font-size:12px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.species-row > svg { width:16px; height:16px; color:#8f88a3; }
.species-row:hover { background:#ffffff0f; }
.species-row.is-active { background:color-mix(in srgb, var(--ink) 18%, #1f1d2c); box-shadow:inset 3px 0 var(--ink); }
.species-row.is-active > svg { color:var(--ink); }

/* Region progress badges on the state view */
.region-layer { position:absolute; inset:0; pointer-events:none; visibility:hidden; opacity:0; transition:opacity .25s ease, visibility 0s .25s; }
.region-layer.on { visibility:visible; opacity:1; transition:opacity .35s ease; }
.region-badge { position:absolute; left:0; top:0; display:grid; justify-items:center; gap:4px; padding:4px; border:0; background:transparent; color:#fff1e1; cursor:pointer; pointer-events:auto; will-change:transform; }
.region-ring { display:grid; place-items:center; width:54px; height:54px; border-radius:50%; background:conic-gradient(var(--ink) calc(var(--fill)*360deg), #ffffff26 0); box-shadow:0 6px 18px #0009, 0 0 22px color-mix(in srgb, var(--ink) 45%, transparent); transition:scale .2s cubic-bezier(.2,.8,.2,1.4); }
.region-ring b { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:#141629f2; font:800 13px/1 system-ui; font-variant-numeric:tabular-nums; color:#fff; }
.region-ring svg { width:20px; height:20px; color:var(--ink); }
.region-copy { display:grid; justify-items:center; padding:3px 9px 4px; border-radius:8px; background:#141629d9; backdrop-filter:blur(4px); }
.region-copy strong { font-family:var(--display, inherit); font-size:13px; font-style:italic; letter-spacing:.02em; text-transform:uppercase; white-space:nowrap; color:var(--ink); }
.region-copy small { font-size:11px; color:#cfc7dc; font-variant-numeric:tabular-nums; }
.region-badge:hover .region-ring, .region-badge:focus-visible .region-ring { scale:1.12; }
.region-badge:focus-visible { outline:2px solid #70e5ef; outline-offset:2px; border-radius:12px; }
.region-badge.is-done .region-ring { background:var(--ink); }
@media (max-width:720px) { .region-ring { width:42px; height:42px; } .region-ring b { width:34px; height:34px; font-size:11px; } .region-copy { padding:2px 6px; } .region-copy strong { font-size:10px; } .region-copy small { display:none; } }
@media (prefers-reduced-motion:reduce) { .region-layer, .region-layer.on, .region-ring { transition:none; } }
/* Dashboard regions and card series */
.dash-region { padding:0; border:0; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; text-decoration:underline; text-decoration-color:#ffffff40; text-underline-offset:3px; }
.dash-region:hover { color:#fff; text-decoration-color:var(--set); }
.subset-note { margin:0 0 6px; }
.subset > summary { background:linear-gradient(90deg, #ff8fb01f calc(var(--fill)*100%), transparent 0); border-radius:6px; }
.subset.is-done > summary b { color:#9fe3b4; }
.subset > summary .stars { flex:none; }

/* Near here run */
.near-start { width:100%; margin:0 0 10px; }
.near-note { margin:0 0 10px; }
.near-list { list-style:none; margin:8px 0 0; padding:0; }
.near-row { display:grid; grid-template-columns:26px minmax(0,1fr) 44px; align-items:center; gap:6px; border-bottom:1px solid var(--hairline); }
.near-row .row { border-bottom:0; min-width:0; }
.near-row .row > svg:last-child { display:none; }
.near-step { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#70e5ef; color:#101425; font:800 12px/1 system-ui; font-variant-numeric:tabular-nums; }
.near-tick { display:grid; place-items:center; width:44px; height:44px; border:1.5px solid #ffffff3d; border-radius:50%; background:transparent; color:#cfc5d2; cursor:pointer; transition:scale .15s ease; }
.near-tick svg { width:18px; height:18px; opacity:.5; }
.near-tick:hover { border-color:#70e5ef; color:#fff; }
.near-tick:active { scale:.92; }
.near-tick[aria-pressed=true] { border-color:#9fe3b4; background:#9fe3b426; color:#9fe3b4; }
.near-tick[aria-pressed=true] svg { opacity:1; }
.near-row.is-found .row-copy { opacity:.5; text-decoration:line-through; text-decoration-color:#ffffff66; }
.near-row.is-found .near-step { background:#ffffff26; color:#cfc5d2; }
@media (prefers-reduced-motion:reduce) { .near-tick { transition:none; } }

/* Wrong-spot report on a location card */
.spot-report { display:flex; align-items:center; gap:8px; margin:8px 0 0; font-size:12px; color:#b9b1c9; }
.spot-report button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:0 2px; border:0; background:none; color:#b9b1c9; font:inherit; text-decoration:underline; text-decoration-color:#ffffff40; text-underline-offset:3px; cursor:pointer; }
.spot-report button:hover { color:#fff; }
.spot-report svg { width:14px; height:14px; flex:none; }
.spot-report.is-on { padding:6px 9px; border:1px dashed #ffb08a; border-radius:6px; color:#ffd9c2; }
.spot-report.is-on span { flex:1; }
.spot-report.is-on button { color:#fff1e1; font-weight:700; }
@media (pointer:coarse) { .spot-report button { min-height:44px; } }
/* During a run the phone sheet drops its cover and tabs so the stops fill it */
@media (max-width:720px) { .sidebar.run-focus .atlas-cover, .sidebar.run-focus .browse-tabs, .sidebar.run-focus .near-note { display:none; } }

/* Account */
.account-panel label { display:block; margin:10px 0 4px; }
.account-panel input { width:100%; }
.account-who { display:flex; align-items:center; gap:10px; margin:0 0 6px; }
.account-who svg { width:22px; height:22px; color:#70e5ef; flex:none; }
.account-who small { display:block; color:#a9a2ba; font-size:12px; }
.role-badge { margin-left:6px; padding:2px 7px; border-radius:999px; background:#ffd08a; color:#2a1a08; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.account-leave { margin-top:10px; padding:12px; border:1px solid var(--hairline); border-radius:12px; }
.account-leave .muted { margin:0 0 10px; }
.account-delete { margin-top:18px; border-top:1px solid var(--hairline); padding-top:10px; }
.account-delete summary { cursor:pointer; color:#b9b1c9; font-size:13px; }
.admin-inbox { margin-top:16px; padding-top:12px; border-top:1px solid var(--hairline); }
.admin-inbox ul { list-style:none; margin:8px 0; padding:0; display:grid; gap:6px; }
.admin-inbox li { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; align-items:center; gap:6px; }
.admin-inbox li small { display:block; color:#a9a2ba; font-size:12px; }
#profiles[data-sync=synced]::after, #profiles[data-sync=syncing]::after, #profiles[data-sync=offline]::after { content:''; position:absolute; right:6px; top:6px; width:8px; height:8px; border-radius:50%; background:#9fe3b4; box-shadow:0 0 0 2px #1c1b2a; }
#profiles[data-sync=syncing]::after { background:#70e5ef; animation:sync-pulse 1s ease-in-out infinite; }
#profiles[data-sync=offline]::after { background:#ffb08a; }
#profiles { position:relative; }
@keyframes sync-pulse { 50% { opacity:.35; } }
@media (prefers-reduced-motion:reduce) { #profiles[data-sync=syncing]::after { animation:none; } }

@media (max-width:420px) { .menu-tabs button { font-size:12px; padding:0 2px; } }

/* Strategy guide (handbook) */
.handbook { max-width:860px; margin:0 auto; padding:4px 0 40px; }
.book-cover { padding:clamp(18px,4vw,34px); border:1px solid var(--hairline); border-radius:14px; background:linear-gradient(120deg,#3a2a48,#221f33 70%); }
.book-cover h2 { margin:6px 0 8px; font:italic 900 clamp(28px,5vw,46px)/1 var(--display); text-transform:uppercase; }
.book-cover p { margin:0; max-width:60ch; color:#e7dce6; font-size:16px; line-height:1.5; }
.book-progress { display:flex; align-items:center; gap:12px; margin-top:16px; font-size:13px; color:#cfc7dc; font-variant-numeric:tabular-nums; }
.book-progress i { flex:1; max-width:260px; height:8px; border-radius:8px; background:linear-gradient(90deg,#70e5ef calc(var(--fill)*100%),#ffffff1f 0); transition:background .4s ease; }
.book-part { margin-top:26px; }
.book-part h3 { display:flex; align-items:baseline; gap:10px; margin:0 0 8px; font:italic 900 22px/1.1 var(--display); text-transform:uppercase; color:#fff1e1; }
.book-part h3 span { font:800 11px/1 system-ui; letter-spacing:.14em; color:#70e5ef; }
.book-part ol { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.book-chapter { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:14px; width:100%; min-height:64px; padding:10px 16px 10px 10px; border:1px solid var(--hairline); border-radius:12px; background:#231f31; color:#fff1e1; text-align:left; cursor:pointer; transition:translate .18s ease, border-color .18s ease, background .18s ease; }
.book-chapter:hover, .book-chapter:focus-visible { translate:4px 0; border-color:#70e5ef; background:#2a2540; }
.book-number { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:#ffffff12; font:italic 900 20px/1 var(--display); color:#ffb6ac; }
.book-chapter.is-read .book-number { background:#9fe3b426; color:#9fe3b4; }
.book-copy strong { display:block; font-size:16px; }
.book-copy small { display:block; margin-top:2px; color:#b9b1c9; font-size:13px; line-height:1.35; }
.book-meta { display:inline-flex; align-items:center; gap:5px; color:#a9a2ba; font-size:12px; white-space:nowrap; }
.book-meta svg { width:14px; height:14px; color:#9fe3b4; }
.book-page { margin-top:10px; padding:clamp(18px,4vw,40px); border:1px solid var(--hairline); border-radius:14px; background:var(--surface,#231f31); }
.book-page h2 { margin:6px 0 6px; font:italic 900 clamp(28px,5vw,44px)/1 var(--display); text-transform:uppercase; }
.book-lede { margin:0 0 18px; color:#ffcfc4; font-size:18px; line-height:1.45; }
.book-page p, .book-page li { max-width:62ch; font-size:17px; line-height:1.65; color:#ece3ee; }
.book-steps { margin:14px 0; padding:0; list-style:none; counter-reset:step; display:grid; gap:10px; }
.book-steps li { position:relative; padding-left:46px; counter-increment:step; }
.book-steps li::before { content:counter(step); position:absolute; left:0; top:0; display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:#70e5ef; color:#101425; font:800 15px/1 system-ui; }
.book-list { margin:14px 0; padding-left:22px; display:grid; gap:8px; }
.book-table { margin:16px 0; overflow-x:auto; border:1px solid var(--hairline); border-radius:10px; }
.book-table table { width:100%; border-collapse:collapse; font-size:15px; }
.book-table th, .book-table td { padding:10px 12px; text-align:left; vertical-align:top; border-bottom:1px solid var(--hairline); }
.book-table thead th { background:#ffffff0d; color:#70e5ef; font-size:11px; letter-spacing:.12em; text-transform:uppercase; }
.book-table tbody tr:last-child > * { border-bottom:0; }
.book-table tbody th { color:#fff1e1; font-weight:700; }
.book-table td { color:#e2d9e6; }
.book-tabs { margin:16px 0; border:1px solid var(--hairline); border-radius:12px; overflow:hidden; }
.book-tablist { display:flex; gap:4px; padding:4px; background:#14131f; }
.book-tablist button { flex:1; min-height:44px; border:0; border-radius:8px; background:transparent; color:#cfc5d2; font-weight:700; cursor:pointer; }
.book-tablist button[aria-selected=true] { background:var(--band); color:#fff; }
.book-keys { margin:0; padding:4px 14px; }
.book-keys > div { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--hairline); }
.book-keys > div:last-child { border-bottom:0; }
.book-keys dt { color:#ece3ee; }
.book-keys dd { margin:0; padding:2px 10px; border-radius:6px; background:#ffffff14; color:#fff; font-weight:700; white-space:nowrap; }
.book-note { margin:16px 0; padding:12px 14px; border-left:4px solid var(--tone); border-radius:0 10px 10px 0; background:color-mix(in srgb, var(--tone) 12%, #1c1a29); }
.book-note strong { display:flex; align-items:center; gap:7px; color:var(--tone); font-size:12px; letter-spacing:.1em; text-transform:uppercase; }
.book-note strong svg { width:16px; height:16px; }
.book-note p { margin:5px 0 0; font-size:16px; }
.book-note.is-tip { --tone:#70e5ef; } .book-note.is-warn { --tone:#ffb08a; } .book-note.is-reported { --tone:#c5adff; }
.book-link { margin:6px 8px 0 0; }
.book-foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-top:26px; padding-top:18px; border-top:1px solid var(--hairline); }
.book-foot nav { display:flex; flex-wrap:wrap; gap:8px; }
@media (max-width:720px) { .book-chapter { grid-template-columns:40px minmax(0,1fr); } .book-meta { grid-column:2; } .book-page p, .book-page li { font-size:16px; } .book-keys > div { flex-direction:column; gap:4px; align-items:flex-start; } }
@media (prefers-reduced-motion:reduce) { .book-chapter, .book-progress i { transition:none; } .book-chapter:hover { translate:none; } }

/* Guidebook sections stay on one row at every width; the row scrolls if it has to */
.guide-toolbar .wiki-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; max-width:100%; }
.guide-toolbar .wiki-tabs button { flex:none; padding-inline:11px; white-space:nowrap; }
.guide-toolbar .wiki-tabs button:first-child { color:#70e5ef; }

/* Help and the first-visit tour */
.help-mark { font:800 17px/1 system-ui; }
.help-steps { list-style:none; margin:0 0 16px; padding:0; display:grid; gap:12px; }
.help-steps li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; align-items:start; font-size:15px; line-height:1.5; color:#e7dce6; }
.help-steps svg { width:22px; height:22px; margin-top:2px; padding:6px; box-sizing:content-box; border-radius:9px; background:#ffffff12; color:#70e5ef; }
.help-steps strong { color:#fff1e1; }
#tour { position:fixed; inset:0; z-index:400; }
.tour-spot { position:fixed; border-radius:14px; box-shadow:0 0 0 9999px #0a0b18d9, 0 0 0 3px #70e5ef, 0 0 28px 6px #70e5ef66; transition:left .35s cubic-bezier(.2,.8,.2,1), top .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1); pointer-events:none; animation:tour-breathe 2.2s ease-in-out infinite; }
.tour-card { position:fixed; padding:16px 18px; border:1px solid #70e5ef66; border-radius:14px; background:#1d1b2c; box-shadow:0 18px 50px #000a; color:#fff1e1; transition:left .35s cubic-bezier(.2,.8,.2,1), top .35s cubic-bezier(.2,.8,.2,1); }
.tour-count { margin:0; color:#70e5ef; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.tour-card h2 { margin:4px 0 6px; font:italic 900 24px/1.05 var(--display); text-transform:uppercase; }
.tour-card p#tour-text { margin:0; font-size:16px; line-height:1.5; color:#e7dce6; }
.tour-actions { display:flex; justify-content:space-between; gap:10px; margin-top:14px; }
.tour-actions .control { min-height:44px; }
@keyframes tour-breathe { 50% { box-shadow:0 0 0 9999px #0a0b18d9, 0 0 0 3px #70e5ef, 0 0 40px 12px #70e5ef99; } }
#tour.still .tour-spot, #tour.still .tour-card { transition:none; animation:none; }

/* Controller diagram and bar chart in the Strategy guide */
.pad-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:10px 18px; align-items:start; padding:14px; }
.pad-art { width:100%; height:auto; }
.pad-body { fill:#2b2740; stroke:#ffffff26; stroke-width:1.5; }
.pad-key { cursor:pointer; outline:none; }
.pad-key > rect:first-child, .pad-key > circle:first-child { fill:#3a3552; stroke:#ffffff40; stroke-width:1.5; transition:fill .18s ease, stroke .18s ease, filter .18s ease; }
.pad-key text { fill:#cfc7dc; font:700 10px system-ui; text-anchor:middle; pointer-events:none; }
.pad-glyph { fill:none; stroke:#cfc7dc; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.pad-key:hover > :first-child, .pad-key:focus-visible > :first-child { stroke:#70e5ef; }
.pad-key.is-lit > :first-child { fill:#70e5ef; stroke:#fff; filter:drop-shadow(0 0 8px #70e5efcc); animation:pad-pop .32s cubic-bezier(.2,.8,.2,1.6); transform-box:fill-box; transform-origin:center; }
.pad-key.is-lit text { fill:#101425; } .pad-key.is-lit .pad-glyph { stroke:#101425; }
@keyframes pad-pop { 0% { transform:scale(.8); } 100% { transform:scale(1); } }
.pad-actions { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
.pad-actions button { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:40px; padding:6px 10px; border:1px solid transparent; border-radius:8px; background:transparent; color:#ece3ee; font:inherit; font-size:15px; text-align:left; cursor:pointer; }
.pad-actions button b { padding:2px 8px; border-radius:6px; background:#ffffff14; font-size:13px; white-space:nowrap; }
.pad-actions button:hover { background:#ffffff0d; }
.pad-actions button.is-lit { border-color:#70e5ef; background:#70e5ef1a; }
.pad-readout { margin:10px 0 0; min-height:1.5em; color:#70e5ef; font-size:14px !important; font-weight:700; }
.book-bars { margin:18px 0; padding:14px 16px; border:1px solid var(--hairline); border-radius:12px; }
.book-bars figcaption { margin-bottom:10px; color:#70e5ef; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.book-bar { display:grid; grid-template-columns:11em minmax(0,1fr) 9.5em; align-items:center; gap:12px; padding:6px 0; font-size:15px; color:#ece3ee; }
.book-bar i { height:14px; border-radius:7px; background:linear-gradient(90deg,#ffb1bd,#ffd9b0); transform-origin:left center; scale:var(--fill) 1; animation:bar-grow .8s cubic-bezier(.2,.8,.2,1) both; }
.book-bar b { font-variant-numeric:tabular-nums; white-space:nowrap; text-align:right; }
@keyframes bar-grow { from { scale:0 1; } }
.book-chapter { animation:book-in .4s cubic-bezier(.2,.8,.2,1) both; animation-delay:calc(var(--i,0) * 28ms); }
@keyframes book-in { from { opacity:0; translate:0 10px; } }
@media (max-width:720px) { .pad-layout { grid-template-columns:1fr; } .book-bar { grid-template-columns:1fr auto; } .book-bar i { grid-column:1 / -1; order:3; } }
@media (prefers-reduced-motion:reduce) { .pad-key.is-lit > :first-child, .book-bar i, .book-chapter { animation:none; } }

.search-ideas { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:10px 0 14px; }
.search-ideas .control { min-height:36px; text-transform:capitalize; }

/* What next? suggestions at the top of Locations */
.what-next { margin:14px 0 4px; display:grid; gap:7px; }
.what-next h2 { margin:0 0 2px; font-size:15px; }
.next-card { display:grid; grid-template-columns:36px minmax(0,1fr) 16px; align-items:center; gap:12px; width:100%; min-height:58px; padding:8px 12px 8px 8px; border:1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius:12px; background:color-mix(in srgb, var(--ink) 9%, #1f1d2c); color:#fff1e1; text-align:left; cursor:pointer; transition:translate .18s ease, background .18s ease; }
.next-card > svg:first-child { width:20px; height:20px; padding:8px; box-sizing:content-box; border-radius:10px; background:color-mix(in srgb, var(--ink) 22%, transparent); color:var(--ink); }
.next-card > svg:last-child { width:16px; height:16px; color:var(--ink); }
.next-card strong { display:block; font-size:14px; }
.next-card small { display:block; margin-top:1px; color:#b9b1c9; font-size:12px; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.next-card:hover, .next-card:focus-visible { translate:3px 0; background:color-mix(in srgb, var(--ink) 16%, #1f1d2c); }
@media (prefers-reduced-motion:reduce) { .next-card { transition:none; } .next-card:hover { translate:none; } }

/* Spoiler cover inside the Strategy guide */
.book-spoiler { margin:16px 0; border:1px dashed #c5adff80; border-radius:10px; background:#c5adff0f; }
.book-spoiler > summary { display:flex; align-items:center; gap:10px; min-height:48px; padding:8px 14px; cursor:pointer; list-style:none; color:#dccfff; font-size:15px; font-weight:700; }
.book-spoiler > summary::-webkit-details-marker { display:none; }
.book-spoiler > summary svg { width:18px; height:18px; flex:none; }
.book-spoiler[open] > summary { border-bottom:1px dashed #c5adff55; color:#a9a2ba; font-weight:500; }
.book-spoiler > :not(summary) { margin-inline:14px; }

/* Nearest shortcuts */
.nearest-title { margin:10px 0 2px !important; }
.nearest-row { display:flex; flex-wrap:wrap; gap:6px; }
.nearest-chip { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 12px; border-color:color-mix(in srgb, var(--ink) 45%, transparent); font-size:13px; }
.nearest-chip svg { width:16px; height:16px; color:var(--ink); }
@media (pointer:coarse) { .nearest-chip { min-height:44px; } }

/* Weird Leonida: filterable encounter cards in the Strategy guide. */
.book-odd { margin:18px 0; }
.odd-filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.odd-filters button { min-height:40px; padding:8px 14px; border:1px solid var(--hairline); border-radius:999px; background:#ffffff0a; color:#e2d9e6; font:inherit; font-size:14px; font-weight:700; cursor:pointer; transition:background .16s, border-color .16s, transform .16s; }
.odd-filters button b { margin-left:4px; color:#a9a2ba; font-weight:600; }
.odd-filters button[aria-pressed="true"] { background:linear-gradient(120deg,#ff8a5b,#c95bd6); border-color:transparent; color:#1a1024; }
.odd-filters button[aria-pressed="true"] b { color:#1a1024; }
.odd-filters button:active { transform:scale(.96); }
.odd-cards { list-style:none; margin:0; padding:0; display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr)); }
.odd-card { padding:16px; border:1px solid var(--hairline); border-radius:14px; background:#ffffff08; display:flex; flex-direction:column; gap:8px; animation:odd-in .28s ease both; }
.odd-card[hidden] { display:none; }
.odd-card h3 { margin:0; font-size:19px; color:#fff1e1; }
.odd-card p { margin:0; font-size:15px; line-height:1.5; }
.odd-tags { display:flex; gap:6px; flex-wrap:wrap; }
.odd-tags span { padding:2px 9px; border-radius:999px; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; background:#70e5ef22; color:#70e5ef; }
.odd-tags .is-sure { background:#7be49a22; color:#7be49a; }
.odd-tags .is-thin { background:#ffc96b22; color:#ffc96b; }
.odd-where { display:flex; gap:6px; align-items:flex-start; color:#b9b1c9; font-size:14px !important; }
.odd-where svg { width:16px; height:16px; flex:none; margin-top:3px; }
.odd-card details { border-top:1px solid var(--hairline); padding-top:8px; }
.odd-card summary { cursor:pointer; font-weight:700; color:#ffb48a; min-height:32px; display:flex; align-items:center; }
.odd-card details p { margin-top:8px; }
.odd-note { color:#ffc96b; }
.odd-card .book-link { margin-top:auto; align-self:flex-start; }
@keyframes odd-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .odd-card { animation:none; } .odd-filters button { transition:none; } }
.odd-progress { display:flex; align-items:center; gap:10px; margin:0 0 12px; font-size:14px; color:#b9b1c9; }
.odd-progress b { color:#fff1e1; font-size:18px; }
.odd-progress i { flex:1; height:8px; border-radius:999px; background:#ffffff14; position:relative; overflow:hidden; }
.odd-progress i::after { content:''; position:absolute; inset:0; transform-origin:left; transform:scaleX(var(--fill,0)); background:linear-gradient(90deg,#70e5ef,#7be49a); transition:transform .4s ease; }
.odd-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; }
.odd-card .odd-actions .book-link { margin-top:0; }
.odd-seen[aria-pressed="true"] { background:#7be49a22; border-color:#7be49a66; color:#7be49a; }
.odd-card.is-seen { border-color:#7be49a55; }
.odd-card.is-seen h3::after { content:' ✓'; color:#7be49a; }
@media (prefers-reduced-motion: reduce) { .odd-progress i::after { transition:none; } }
/* A passage reached from search flashes once so the eye lands on it. */
.book-hit { animation:book-hit 2.2s ease 1; border-radius:10px; }
tr.book-hit > * { animation:book-hit 2.2s ease 1; }
@keyframes book-hit { 0%, 55% { background:#ffc96b33; box-shadow:0 0 0 2px #ffc96b88; } 100% { background:transparent; box-shadow:0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .book-hit, tr.book-hit > * { animation:none; outline:2px solid #ffc96b; } }
/* Phones: tighter table cells, and long words may break rather than push the table off-screen. */
@media (max-width: 480px) { .book-table th, .book-table td { padding:9px 9px; overflow-wrap:break-word; } .book-table td { overflow-wrap:anywhere; } .book-table table { font-size:14.5px; } }
/* Finder: a long list with kind chips (special guns). */
.finder-rows { list-style:none; margin:0; padding:0; border:1px solid var(--hairline); border-radius:12px; overflow:hidden; }
.finder-rows li { display:grid; grid-template-columns:minmax(0,220px) minmax(0,1fr); gap:4px 16px; padding:11px 14px; border-bottom:1px solid var(--hairline); font-size:15px; line-height:1.45; }
.finder-rows li:last-child { border-bottom:0; }
.finder-rows li[hidden] { display:none; }
.finder-rows strong { color:#fff1e1; }
.finder-rows span { color:#e2d9e6; }
@media (max-width: 560px) { .finder-rows li { grid-template-columns:1fr; } }
/* Coverage tracker: known things that have no pin yet. */
.book-known { margin:18px 0; }
.known-sum { font-size:17px; margin:0 0 12px; }
.known-sum b { color:#ffc96b; font-size:24px; }
.known-row { border:1px solid var(--hairline); border-radius:12px; margin-bottom:8px; background:#ffffff08; }
.known-row summary { display:grid; grid-template-columns:1fr auto; gap:6px 12px; align-items:center; padding:13px 14px; cursor:pointer; list-style:none; min-height:44px; }
.known-row summary::-webkit-details-marker { display:none; }
.known-title { font-weight:800; color:#fff1e1; }
.known-count { color:#ffc96b; font-weight:700; font-size:14px; white-space:nowrap; }
.known-row summary i { grid-column:1 / -1; height:6px; border-radius:999px; background:#ffffff14; position:relative; overflow:hidden; }
.known-row summary i::after { content:''; position:absolute; inset:0; transform-origin:left; transform:scaleX(var(--fill,0)); background:linear-gradient(90deg,#70e5ef,#7be49a); }
.known-row[open] summary { border-bottom:1px solid var(--hairline); }
.known-row > p, .known-group { padding:0 14px; }
.known-note { color:#b9b1c9; font-size:14px; margin:10px 0 0; }
.known-group h3 { margin:14px 0 6px; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:#70e5ef; }
.known-group h3 span { color:#a9a2ba; margin-left:4px; }
.known-group ul { margin:0 0 12px; padding:0; list-style:none; display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr)); gap:4px 16px; font-size:14.5px; color:#e2d9e6; }
.known-group li { padding:3px 0; overflow-wrap:anywhere; }

/* A set's panel says how many more of that set are known but unplaced. */
.known-hint { display:flex; gap:10px; align-items:flex-start; width:100%; margin:0 0 10px; padding:10px 12px; border:1px dashed #ffc96b77; border-radius:12px; background:#ffc96b12; color:#f3e7d3; font:inherit; font-size:14px; text-align:left; cursor:pointer; }
.known-hint svg { width:18px; height:18px; flex:none; color:#ffc96b; margin-top:2px; }
.known-hint strong { color:#ffc96b; }

.known-group li { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.known-place { flex:none; display:inline-flex; align-items:center; gap:4px; min-height:32px; padding:4px 10px; border:1px solid var(--hairline); border-radius:999px; background:#ffffff0a; color:#70e5ef; font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; }
.known-place svg { width:13px; height:13px; }
.known-place:hover { background:#70e5ef1f; }
#admin-export { margin-top:10px; }

.subset-missing { margin:8px 0 4px; padding:10px 12px; border:1px dashed #ffc96b66; border-radius:10px; background:#ffc96b0f; }
.subset-missing h3 { margin:0 0 6px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:#ffc96b; }
.subset-missing h3 span { color:#a9a2ba; margin-left:4px; }
.subset-missing ul { margin:0; padding:0; list-style:none; font-size:13.5px; color:#e2d9e6; display:grid; gap:3px; }

/* Guide diagrams: the picture and its words are the same block */
.book-diagram { margin:18px 0; padding:14px 16px; border:1px solid var(--hairline); border-radius:12px; }
.book-diagram figcaption { margin-bottom:10px; color:#70e5ef; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.book-diagram ul, .book-diagram ol { margin:0; padding:0; list-style:none; display:grid; gap:10px; }
.book-diagram .dg-row { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:14px; border-radius:8px; }
.book-diagram .dg-row b { display:block; color:#fff; font-size:15.5px; }
.book-diagram .dg-row p { margin:2px 0 0; color:#d9d0de; font-size:14.5px; line-height:1.45; }
.book-diagram .dg-row small { display:block; color:#a9a2ba; font-size:12.5px; margin-top:1px; }
.dg-stars { min-width:3.4em; padding:6px 8px; border-radius:8px; background:#0b0a12; font-size:19px; letter-spacing:2px; text-align:center; line-height:1; }
.dg-stars.is-gray { color:#8d8a96; } .dg-stars.is-outline, .dg-stars.is-white { color:#fff; } .dg-stars.is-red, .dg-stars.is-red-outline { color:#ff5a5f; }
.dg-chip { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#70e5ef1a; color:#70e5ef; }
.dg-chip svg { width:20px; height:20px; }
.is-ladder ol { gap:0; }
.is-ladder .dg-row { position:relative; padding:9px 0; align-items:start; }
.is-ladder .dg-row + .dg-row::before { content:''; position:absolute; left:20px; top:-9px; height:18px; border-left:2px dashed #ffffff33; }
.dg-heart { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#0b0a12; font-size:22px; line-height:1; }
.dg-heart.is-flame { color:#ff9d3c; text-shadow:0 0 10px #ff6a00, 0 -4px 12px #ffd24a; }
.dg-heart.is-pink { color:#ff7eb6; }
.dg-heart.is-half { background-image:linear-gradient(90deg,#ff7eb6 50%,#6b6480 50%), linear-gradient(#0b0a12,#0b0a12); background-clip:text, padding-box; -webkit-background-clip:text, padding-box; color:transparent; }
.dg-heart.is-broken { color:#9a6bd6; opacity:.75; text-decoration:line-through; }
.dg-stack { display:flex; height:22px; border-radius:11px; overflow:hidden; gap:2px; margin-bottom:12px; }
.is-shares ul { gap:6px; }
.is-shares .dg-row { grid-template-columns:14px minmax(0,1fr) auto; gap:10px; font-size:15px; color:#ece3ee; }
.is-shares .dg-row > i { width:14px; height:14px; border-radius:4px; }
.is-shares .dg-row b { font-variant-numeric:tabular-nums; }
.dg-part-0 { background:#ffb1bd; } .dg-part-1 { background:#ffd9b0; } .dg-part-2 { background:#70e5ef; } .dg-part-3 { background:#a78bfa; } .dg-part-4 { background:#8be28b; }

/* Pointer targets are at least 24px tall on wide screens too */
.fan-notice { min-height:24px; display:inline-flex; align-items:center; }
.odd-status { margin:6px 0 0; font-size:13px; color:#a9a2ba; min-height:1.2em; }

/* Welcome screen name: Vice. StreetMap.app, with the tagline under it */
.welcome-brand > span { display:grid; line-height:1.25; }
.welcome-brand strong { color:#fff4e8; font-family:var(--display, inherit); font-size:20px; letter-spacing:.02em; display:inline; }
.welcome-brand small { color:#b9b1c9; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
