.atlas [hidden] { display: none !important; }
.atlas a { color: #bbdedc; }
.atlas label { display: grid; gap: .25rem; color: #d8d6e8; font-weight: 600; }
.atlas input, .atlas select, .atlas button { max-width: 100%; min-width: 0; border: 1px solid #53617a; border-radius: .35rem; background: #172339; color: #f0f2f9; font: inherit; }
.atlas input, .atlas select { padding: .45rem .55rem; }
.atlas button { padding: .35rem .65rem; cursor: pointer; }
.atlas button:hover:not(:disabled), .atlas button[aria-pressed=true] { background: #313750; border-color: #c0b1d9; }
.atlas button:disabled { opacity: .45; cursor: default; }
.atlas-filters { display: grid; grid-template-columns: minmax(13rem,2fr) minmax(9rem,1fr) auto auto; align-items:end; gap: .75rem; margin: 1rem 0 .5rem; }
#atlas-results, #atlas-filters { position: relative; }
#atlas-filters > summary, #atlas-results > summary, #atlas-zone-index > summary { cursor:pointer; padding:.4rem 0; }
#atlas-filters > summary { border:1px solid #53617a; border-radius:.35rem; padding:.45rem .75rem; }
#atlas-filters > div, .atlas-result-menu { position:absolute; z-index:6; padding:.75rem; background:#172339; border:1px solid #53617a; border-radius:.4rem; box-shadow:0 4px 14px #080d1bbd; }
#atlas-filters > div { right:0; top:100%; display:grid; gap:.5rem; width:min(17rem,75vw); }
.atlas-result-menu { left:0; right:0; max-height:min(17rem,45dvh); overflow:auto; }
#atlas-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(16rem,100%),1fr)); gap: .35rem; }
#atlas-list button { width: 100%; height: 100%; text-align: left; }
#atlas-list small { display: block; color: #bfccdf; }
#atlas-more { margin-top: .5rem; }
.atlas-mapbar { display: flex; flex-wrap: wrap; justify-content:space-between; align-items: center; gap: .6rem 1rem; padding: .8rem 0 .55rem; }
#atlas-trail { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem; margin-bottom: .3rem; color: #c7d1e3; }
#atlas-trail button { background: none; padding: 0; border: none; text-decoration: underline; color: #c1e1dd; }
.atlas-zoom { position:absolute; z-index:3; top:.4rem; right:.4rem; display:flex; align-items:center; gap:.2rem; padding:.15rem; border:1px solid #677187; color:#f0f2f9; background:#172339ed; border-radius:.4rem; }
.atlas-zoom button { min-width: 2.5rem; font-weight: 600; }
#atlas-scale { min-width: 3em; text-align: center; }
.atlas-mapbar, #atlas-stage, #atlas-map-note, #atlas-zone-index { max-width:64rem; margin-inline:auto; }
#atlas-stage { position:relative; width:100%; max-width:64rem; min-height:13rem; background:#131e32; border-radius:.45rem; }
#atlas-viewport { display:flex; flex-direction:column; overflow: auto; width: 100%; max-width: 64rem; aspect-ratio: 3/2; background: #131e32; border: 1px solid #445169; border-radius: .45rem; overscroll-behavior-x:contain; }
#atlas-plane { flex:none; margin-block:auto; position: relative; width: 100%; aspect-ratio: 3/2; }
#atlas-image { width: 100%; height: auto; display: block; user-select: none; }
#atlas-pins button { position: absolute; transform: translate(-50%,-50%); z-index: 1; min-width: 1.7rem; height: 1.7rem; line-height: 1; padding: .15rem .25rem; border-radius: 1.5rem; border: 2px solid #fff1cb; color: #fff9e3; background: #604419; box-shadow: 0 1px 4px #152032; font-weight: 600; }
#atlas-pins button[data-state=done] { background: #205546; }
#atlas-pins button[data-state=active] { background: #563a76; }
#atlas-pins button[data-state=unknown] { background: #3d4958; }
#atlas-pins button[aria-pressed=true], #atlas-pins button:focus-visible { z-index: 2; outline: 3px solid #252238; outline-offset: 1px; }
#atlas-pins .atlas-territory { transform:none; min-width:0; min-height:0; padding:0; border:0; border-radius:30%; background:transparent; box-shadow:none; }
#atlas-pins .atlas-territory::before { content:""; position:absolute; top:var(--pin-y); left:var(--pin-x); width:.5rem; height:.5rem; transform:translate(-50%,-50%); border-radius:50%; background:#fff0c6; border:1px solid #473620; }
#atlas-pins .atlas-territory:is(:hover,:focus-visible) { background:#fff1a72b; }
#atlas-pins .atlas-territory span { display:none; position:absolute; z-index:2; left:var(--pin-x); top:var(--pin-y); transform:translate(-50%,-50%); color:#fff4d7; background:#302b24f0; border:1px solid #d7bd89; border-radius:.35rem; padding:.3rem .5rem; white-space:nowrap; pointer-events:none; }
#atlas-pins .atlas-territory:is(:hover,:focus-visible) span, #atlas-pins .atlas-continent span { display:block; }
.atlas-note, .atlas-credit { color: #bdc7db; font-size: .9rem; }
.atlas-note, #atlas-zones, .atlas-credit { margin-top: .6rem; }
#atlas-zones { display: flex; flex-wrap: wrap; gap: .35rem; }
html:has(#atlas-dialog) { scrollbar-gutter:stable; }
html:has(#atlas-dialog[open]) { overflow:hidden; }
#atlas-dialog { position:fixed; inset:auto; max-width:none; max-height:none; margin:0; padding:.5rem; border:0; background:#14142377; color:#352a22; overflow:hidden; box-sizing:border-box; }
#atlas-dialog[open] { display:grid; grid-template-rows:minmax(0,1fr); place-items:center; }
#atlas-dialog::backdrop { background:transparent; }
.atlas-parchment { color-scheme:light; width:min(100%,26rem); max-height:100%; min-height:0; display:flex; flex-direction:column; overflow:hidden; padding:clamp(.65rem,2vw,1.3rem); border:1px solid #ad9063; border-radius:.55rem; background:linear-gradient(125deg,#f2e4c4,#e6d0a7); box-shadow:0 0 0 2px #49394a,0 7px 26px #12101a88; }
#atlas-details { overflow:auto; min-height:0; overscroll-behavior:contain; }
.atlas-parchment header { flex:none; display:flex; justify-content:space-between; align-items:start; gap:.5rem; }
#atlas-heading { color:#3b2c3e; font:600 clamp(1.5rem,4vw,2rem)/1.08 var(--serif); margin:0; }
.atlas-parchment button { background:#eddec0; border-color:#a38963; color:#3d2d35; }
.atlas-parchment button:hover:not(:disabled), .atlas-parchment button[aria-pressed=true] { background:#534253; border-color:#594655; color:#fff5e0; }
#atlas-close { background:transparent; border:0; color:#44343d; font-size:1.5rem; line-height:1; padding:.1rem .4rem; }
#atlas-details :is(p,small) { color:#52453a; }
#atlas-details p { margin:.3rem 0; }
#atlas-details a { color:#543955; display:inline-block; margin-top:.7rem; text-decoration:underline; }
#atlas-details ul { display:grid; gap:.25rem; margin:.5rem 0; }
.atlas-endpoints { display:flex; flex-wrap:wrap; gap:.35rem; margin:.5rem 0; }
.atlas-endpoints button:last-child { margin-inline-start:auto; }
.atlas-location { display:grid; justify-items:start; gap:.16rem; padding:.35rem 0; }
.atlas-location button { margin-top:.2rem; }
@media(prefers-reduced-motion:no-preference) { #atlas-dialog[open] .atlas-parchment { animation:parchment-open .16s ease-out; } @keyframes parchment-open { from { opacity:.4; transform:translateY(4px); } } }
@media(max-width:52rem) { .atlas-filters { grid-template-columns: minmax(0,1fr) auto auto; } .atlas-search { grid-column:1/-1; } }
@media(max-width:35rem) { .atlas-filters { grid-template-columns: auto 1fr; } .atlas-filters > label { grid-column:1/-1; } .atlas-filters > button { justify-self:start; } #atlas-filters > div { left:0; right:auto; } }
@media(max-width:35rem) { #atlas-viewport, #atlas-stage { min-height:min(22rem,75svh); } .atlas-search { grid-column: 1/-1; } .atlas-zoom { margin-left: 0; } .atlas button, .atlas input, .atlas select { min-height: 2.6rem; } #atlas-pins button { min-height: 0; } .masthead nav { gap: .7rem; flex-wrap: wrap; } }
