/* One shared shell and palette for map, research, and source library. */
:root{--atlas-ink:#382b20;--atlas-muted:#77634d;--atlas-paper:#f5e7c5;--atlas-card:#fff6e2;--atlas-border:#bca07b;--atlas-dark:#251e1b;--atlas-active:#60442d;--atlas-font:"Noto Serif JP","Yu Mincho",serif}
body[data-atlas-page]{font-family:var(--atlas-font);color:var(--atlas-ink);background:linear-gradient(150deg,#f5e9cf,#e8d0a2);background-attachment:fixed}
body[data-atlas-page] .site{background:transparent}
.atlas-header,.atlas-header *,.atlas-nav,.atlas-nav *,.atlas-footer,.atlas-footer *{box-sizing:border-box}
body[data-atlas-page] .atlas-header{position:relative;z-index:900;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:72px;min-height:72px;padding:10px clamp(12px,2.6vw,32px);background:linear-gradient(100deg,#231d1a,#393027 56%,#241e1a);color:#ebddbf;border:0;border-bottom:2px solid #ad8045;box-shadow:0 3px 9px #180d084d;font-family:var(--atlas-font);line-height:1.4}
.atlas-header .atlas-brand{display:inline-flex;align-items:center;gap:10px;min-width:0;color:#ebddbf;text-decoration:none;white-space:nowrap;font-family:var(--atlas-font);font-size:27px;font-weight:700;line-height:1.2;letter-spacing:.04em}
.atlas-header .atlas-brand-mark{font:36px/1 Georgia,serif;color:#b68b4d}
.atlas-tools{display:flex;gap:8px;align-items:center;flex-shrink:0}
.atlas-header .atlas-utility{position:relative;margin:0;padding:0;border:0;background:transparent}
.atlas-header .atlas-utility>summary{display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;margin:0;padding:7px 11px;border:1px solid #bca07b;border-radius:5px;color:#4b3825;background:#f5e7c5;cursor:pointer;font:600 13px/1.3 var(--atlas-font);list-style:none;white-space:nowrap}
.atlas-header .atlas-utility>summary::-webkit-details-marker{display:none}
.atlas-header .atlas-utility[open]>summary{background:#e4cca0}
.atlas-header .atlas-utility-panel{position:absolute;right:0;top:calc(100% + 9px);width:270px;max-width:calc(100vw - 24px);margin:0;padding:12px;border:1px solid #ac8a58;border-radius:8px;background:#fff6e2;color:#382b20;box-shadow:0 6px 24px #251c1840;font:13px/1.6 var(--atlas-font);z-index:950}
.atlas-header .atlas-utility-panel label{display:block;font-size:12px;margin-bottom:6px;color:#60442d}
.atlas-header .atlas-utility-panel select{font:16px/1.4 var(--atlas-font);min-height:44px;padding:7px 10px;border:1px solid #ac8a58;border-radius:5px;background:#fffaf0;color:#382b20;width:100%}
.atlas-header .atlas-utility-panel p{font-size:11px;line-height:1.6;margin:9px 0 0;color:#77634d}
.atlas-header .atlas-utility-panel a{display:block;padding:10px 6px;min-height:44px;border-bottom:1px solid #ddc7a0;font-size:14px;color:#60442d;text-decoration:none}
.atlas-header .atlas-utility-panel a:last-child{border-bottom:0}
.atlas-header :is(a,summary,select):focus-visible,.atlas-nav a:focus-visible,.atlas-footer a:focus-visible{outline:3px solid #bd8b41;outline-offset:3px}
body[data-atlas-page] .atlas-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:100%;max-width:1280px;margin:10px auto;padding:0 12px;border:0;background:transparent;font-family:var(--atlas-font);line-height:1.5}
body[data-atlas-page] .atlas-nav a{display:flex;align-items:center;justify-content:center;text-align:center;min-height:46px;margin:0;padding:9px 5px;border:1px solid var(--atlas-border);border-radius:6px;box-shadow:none;background:var(--atlas-paper);color:#513c24;font:600 14px/1.5 var(--atlas-font);text-decoration:none;white-space:normal}
body[data-atlas-page] .atlas-nav a[aria-current=page]{background:var(--atlas-active);color:#fff9e8;border-color:#a98a5f}
body[data-atlas-page] .atlas-footer{display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;width:100%;min-height:52px;margin:0;padding:13px 12px;background:#30271f;border:0;border-top:2px solid #ad8045;font:12px/1.6 var(--atlas-font);text-align:center;letter-spacing:0}
body[data-atlas-page] .atlas-footer a{color:#ebddbf;font:inherit;text-decoration:underline;text-underline-offset:4px}
.atlas-language-scope{max-width:940px;margin:4px auto;padding:0 12px;color:#60442d;font:12px/1.6 var(--atlas-font)}
.atlas-language-scope[hidden]{display:none!important}
body[data-atlas-page=research]{--paper:#f5e7c5;--card:#fff6e2;--ink:#382b20;--muted:#77634d;--line:#bca07b;--accent:#60442d;--gold:#865e31}
body[data-atlas-page=sources] main{color:var(--atlas-ink)}
body[data-atlas-page] :is(.picker,.source-hero,.source-search,.source-myth-archive,.source-method){background:var(--atlas-paper);border-color:var(--atlas-border)}
body[data-atlas-page] :is(.finding,.source-record,.stage100-story){background:var(--atlas-card);border-color:var(--atlas-border)}
body[data-atlas-page] .source-category{background:#f4e5c5;border-color:var(--atlas-border)}
body[data-atlas-page] .source-overview{background:#ead8b4}
body[data-atlas-page] .discovery-entry{background:transparent}
@media(max-width:600px){
 body[data-atlas-page] .atlas-header{height:64px;min-height:64px;padding:9px 12px;gap:8px}
 .atlas-header .atlas-brand{font-size:22px;gap:7px;letter-spacing:.02em}.atlas-header .atlas-brand-mark{font-size:29px}
 .atlas-tools{gap:6px}.atlas-header .atlas-utility>summary{min-height:42px;padding:6px 8px;font-size:11px;gap:4px}
 body[data-atlas-page] .atlas-nav{gap:5px;margin:9px auto;padding:0 10px}
 body[data-atlas-page] .atlas-nav a{font-size:12px;min-height:44px;padding:8px 3px}
 body[data-atlas-page] .atlas-footer{gap:12px;min-height:50px;padding:12px 10px;font-size:11px}
}
@media(max-width:350px){.atlas-header .atlas-brand{font-size:20px;gap:5px}.atlas-header .atlas-brand-mark{font-size:25px}.atlas-header .atlas-utility>summary{padding:6px;font-size:10px}.atlas-tools{gap:4px}}
.atlas-header .atlas-utility{position:static}.atlas-header .atlas-utility-panel{top:calc(100% + 5px);right:clamp(12px,2.6vw,32px)}

/* Prevent long translated brand names from being covered by language/contribution controls. */
@media(max-width:600px){body[data-atlas-page] .atlas-header .atlas-brand{flex:1 1 auto;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:clamp(13px,3.4vw,18px);line-height:1.2}body[data-atlas-page] .atlas-header .atlas-brand-mark{flex:0 0 auto}body[data-atlas-page] .atlas-tools{flex:0 0 auto}}
