/* The geography stays fixed; names and controls follow each edition's reading direction. */
body:has(.kingdom-atlas) .app-shell.atlas-shell { width:calc(100% - 32px); max-width:none; }
.kingdom-atlas { --atlas-gold:#d9b76b; min-height:calc(100svh - 110px); padding:20px 0 30px; }
.atlas-heading { text-align:center; padding:0 16px 3px; }
.kingdom-atlas .atlas-heading :is(h1,p) { text-align:center; }
.atlas-presenter { color:#d5bc86; font:700 10px/1.5 Inter,system-ui,sans-serif; letter-spacing:.26em; margin:0 0 4px; }
.atlas-heading h1 { font-family:"Cinzel Decorative","Cormorant Garamond",serif; font-size:clamp(30px,3vw,48px); line-height:1.18; margin:0; max-width:none; color:#f3dfaf; text-shadow:0 3px 16px #000,0 0 35px #c59b4d22; }
.atlas-subtitle { font:600 clamp(16px,1.5vw,21px)/1.3 "Cormorant Garamond",serif; color:#c5c0b2; margin:4px 0 2px; }
.atlas-heading-rule { display:flex; align-items:center; justify-content:center; gap:14px; color:#d4b16b; margin:2px auto; max-width:420px; }
.atlas-heading-rule::before,.atlas-heading-rule::after { content:""; height:1px; flex:1; background:linear-gradient(90deg,transparent,#ad894c); }
.atlas-heading-rule::after { transform:rotate(180deg); }
.atlas-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:8px 0 14px; padding:8px 12px; border:1px solid #b99b593a; border-radius:12px; background:#09130de8; }
.atlas-view-controls { display:flex; gap:4px; padding:3px; border:1px solid #b99b592b; border-radius:8px; background:#030807; }
.atlas-view-controls button { border:1px solid transparent; background:transparent; color:#b9c1ae; cursor:pointer; font:600 12px/1.4 Inter,system-ui,sans-serif; padding:9px 13px; border-radius:6px; }
.atlas-view-controls button[aria-pressed="true"] { color:#f5e6c0; background:#6e54243d; border-color:#c6a25b65; }
.atlas-search { display:flex; align-items:center; gap:8px; width:270px; max-width:100%; border:1px solid #8c80504a; border-radius:7px; background:#020805; padding:4px 10px; color:#cfb775; }
.atlas-search input { min-width:0; width:100%; border:0; outline:0; box-shadow:none; background:transparent; color:#e8e6d8; height:30px; font:12px Inter,system-ui,sans-serif; padding:3px; }
.atlas-search:focus-within { border-color:#d9b76b; box-shadow:0 0 0 2px #d9b76b22; }
.atlas-search button { background:none; border:0; color:#e6d2a4; font-size:23px; cursor:pointer; }
.resource-crest { position:relative; display:grid; place-items:center; flex-shrink:0; width:clamp(32px,3.2vw,52px); height:clamp(32px,3.2vw,52px); border:2px solid #b69353; border-radius:50%; background:radial-gradient(circle at 30% 20%,#3d4437,#111b18 75%); box-shadow:0 2px 0 #fff0ba88,0 3px 7px #2d1d1760,inset 0 0 0 2px #d6bb772f; overflow:hidden; }
.resource-crest::after { content:""; position:absolute; inset:0; border-radius:inherit; box-shadow:inset 0 1px 3px #ffeab366; pointer-events:none; }
.resource-crest img { position:absolute; width:74%; height:74%; object-fit:contain; }
.resource-initial { color:#e6c986; font:800 12px/1 Inter,system-ui,sans-serif; }
.resource-crest:has(img) .resource-initial { visibility:hidden; }
.kingdom-directory { margin-top:24px; }
.kingdom-directory[hidden],.atlas-map[hidden],.atlas-resource[hidden],.atlas-directory-kingdom[hidden],.atlas-empty[hidden],.atlas-search button[hidden] { display:none; }
.atlas-directory-heading { display:flex; align-items:baseline; justify-content:space-between; gap:18px; padding:0 6px 12px; }
.atlas-directory-heading h2 { font:700 27px "Cormorant Garamond",Georgia,serif; color:#e6cb91; margin:0; }
.atlas-results { color:#afb7a4; font:12px Inter,system-ui,sans-serif; margin:0; }
.atlas-directory-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.atlas-directory-kingdom { padding:18px; border:1px solid #d3b66a35; border-top:2px solid var(--kingdom-color); border-radius:9px; background:linear-gradient(145deg,#15231bea,#060d0af0); }
.atlas-directory-kingdom h3 { display:flex; align-items:baseline; gap:10px; margin:0 0 16px; color:#ebd4a5; font:700 22px "Cormorant Garamond",serif; }
.atlas-directory-kingdom h3>span { font:800 11px Inter,system-ui,sans-serif; color:var(--kingdom-color); }
.atlas-directory-links { display:grid; gap:8px; }
.atlas-directory-links .atlas-resource { display:grid; grid-template-columns:44px minmax(0,1fr) 18px; grid-template-rows:1fr 1fr; column-gap:12px; padding:8px; border-radius:7px; border:1px solid #b49b5930; background:#02090666; color:#e3dec8; min-height:60px; }
.atlas-directory-links .resource-crest { grid-row:1/3; width:44px; height:44px; }
.atlas-directory-links .resource-name { align-self:end; font:700 13px/1.4 Inter,system-ui,sans-serif; }
.resource-domain { grid-column:2; align-self:start; color:#92a699; font:11px/1.5 Inter,system-ui,sans-serif; overflow-wrap:anywhere; }
.resource-arrow { grid-column:3; grid-row:1/3; align-self:center; color:#c7b471; }
.atlas-directory-links .atlas-resource:hover { background:#2d3c1b66; border-color:#d9b76b80; }
.atlas-empty { padding:34px; text-align:center; border:1px dashed #cab47e66; border-radius:10px; color:#e1ca96; }
.atlas-shell>.guide-page { margin-top:72px; width:min(1480px,100%); padding-top:30px; border-top:1px solid #b19b5644; }
.atlas-shell .guide-construction-overlay { left:0; right:0; top:clamp(210px,18vw,340px); }
.atlas-shell .guide-construction-overlay img { width:min(1500px,100%); }
.atlas-shell>.tiermaker-seo { width:min(1480px,100%); margin-inline:auto; }
.atlas-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.kingdom-atlas :is(button,a):focus-visible { outline:2px solid #e8c974; outline-offset:4px; }
html:is([lang="ar"],[lang="he"],[lang="ur"],[lang="fa"],[lang="bn"],[lang="th"],[lang="ja"],[lang="ko"],[lang="zh-CN"],[lang="zh-TW"]) .kingdom-atlas :is(h1,h2,h3,.kingdom-title,.kingdom-title-label,.atlas-subtitle) { font-family:inherit; letter-spacing:normal; }

/* Each realm occupies its own irregular territory on the illustrated map. */
.atlas-resource { position:relative; text-decoration:none; }
.atlas-map { position:relative; isolation:isolate; width:100%; height:var(--atlas-height,76svh); overflow:hidden; border:1px solid #be944e; border-radius:12px; background:#17251f66; box-shadow:0 22px 60px #0009; }
.atlas-world { position:relative; width:100%; height:100%; }
.atlas-landscape { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; opacity:.5; filter:saturate(.8); pointer-events:none; }
.atlas-territories { position:relative; height:100%; box-sizing:border-box; }
.atlas-map:not(.is-composed) .atlas-world { display:none; }
.atlas-kingdom { position:absolute; left:var(--kingdom-x); top:var(--kingdom-y); translate:-50% -50%; width:29%; min-width:0; scroll-margin-block:90px; isolation:isolate; }
.atlas-kingdom::before { content:""; position:absolute; inset:-20px -15px; z-index:-1; pointer-events:none; background:radial-gradient(ellipse,color-mix(in srgb,var(--kingdom-color) 20%,#18251f33),transparent 72%); }
.kingdom-boundary { position:absolute; inset:-16px -14px; width:calc(100% + 28px); height:calc(100% + 32px); z-index:-1; overflow:visible; pointer-events:none; }
.kingdom-boundary path { fill:color-mix(in srgb,var(--kingdom-color) 5%,transparent); stroke:color-mix(in srgb,var(--kingdom-color) 42%,#77522e); stroke-width:1.25; vector-effect:non-scaling-stroke; stroke-dasharray:5 6; }
.atlas-kingdom:has(.atlas-map-resource:is(:hover,:focus-visible)) .kingdom-boundary path { stroke:var(--kingdom-color); stroke-width:2; fill:color-mix(in srgb,var(--kingdom-color) 12%,transparent); }
.atlas-kingdom[data-map-kingdom="builds"],.atlas-kingdom[data-map-kingdom="addons"] { width:23%; }
.atlas-kingdom h2 { margin:0 0 8px; padding:0; line-height:1; text-align:center; }
.atlas-kingdom h2 button { display:block; width:100%; padding:0; border:0; background:none; cursor:pointer; line-height:1; }
.kingdom-number { display:none; }
.kingdom-title { position:relative; display:grid; place-items:center; height:clamp(48px,6.6svh,84px); box-sizing:border-box; margin-inline:8%; }
.kingdom-title-label { font:900 clamp(21px,2vw,35px)/1.05 "Cinzel Decorative","Cormorant Garamond",Georgia,serif; color:var(--kingdom-color); text-wrap:balance; -webkit-text-stroke:1px #332313; paint-order:stroke fill; text-shadow:0 3px 0 #30261c,0 5px 5px #302015,0 0 18px var(--kingdom-color); }
.kingdom-wordmark { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; filter:var(--title-tone,brightness(1)) drop-shadow(0 3px 2px #221d19aa); }
.atlas-kingdom[data-map-kingdom="rankings"] { --title-tone:hue-rotate(-25deg) saturate(1.25); }
.atlas-kingdom[data-map-kingdom="addons"] { --title-tone:hue-rotate(-10deg) saturate(1.35); }
.atlas-kingdom[data-map-kingdom="economy"] { --title-tone:hue-rotate(8deg) saturate(1.2) brightness(1.12); }
.kingdom-title:has(.kingdom-wordmark) .kingdom-title-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.atlas-kingdom:nth-child(odd) .kingdom-title { rotate:-2deg; }
.atlas-kingdom[data-map-kingdom="pvp"] .kingdom-title { margin-inline:24%; rotate:3deg; }
.kingdom-sites { display:grid; grid-template-columns:repeat(var(--site-columns),minmax(0,1fr)); align-items:start; gap:36px 20px; padding:6px 0; }
.atlas-map-resource { --tilt:-2deg; display:flex; align-items:center; width:min(99%,218px); aspect-ratio:21/8; box-sizing:border-box; justify-self:center; gap:5px; padding:6px 9px; color:#f0d5a0; background:url('/assets/kingdoms/resource-banner.webp') center/100% 100% no-repeat; border:0; border-radius:10px; rotate:var(--tilt); filter:drop-shadow(0 5px 4px #37261680); transition:transform .2s,filter .2s; }
.atlas-map-resource:nth-child(even) { --tilt:2deg; translate:0 9px; }
.atlas-map-resource:nth-child(3n) { --tilt:1deg; translate:6px 0; }
.atlas-map-resource:nth-child(4n) { --tilt:-3deg; }
.atlas-kingdom[data-map-kingdom="rankings"] .atlas-map-resource:nth-child(4) { translate:25% 3px; }
.atlas-kingdom[data-map-kingdom="rankings"] .atlas-map-resource:nth-child(5) { translate:40% 7px; }
.atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(1) { translate:-7px 7px; --tilt:-4deg; }
.atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(2) { translate:0 18px; --tilt:3deg; }
.atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(3) { translate:-4px -3px; }
.atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(4) { translate:10px -2px; }
.atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(5) { translate:-8px 8px; --tilt:-4deg; }
.atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(6) { translate:8px 12px; --tilt:2deg; }
.atlas-kingdom[data-map-kingdom="analytics"] .atlas-map-resource:nth-child(1) { translate:0 9px; --tilt:3deg; }
.atlas-kingdom[data-map-kingdom="community"] .atlas-map-resource:nth-child(3) { translate:0 12px; --tilt:-3deg; }
.atlas-kingdom[data-map-kingdom="community"] .atlas-map-resource:nth-child(4) { translate:7px -4px; }
.atlas-kingdom[data-map-kingdom="economy"] .atlas-map-resource:nth-child(2) { translate:0 -10px; --tilt:-3deg; }
.atlas-kingdom[data-map-kingdom="pvp"] .atlas-map-resource:nth-child(3) { translate:0 -8px; --tilt:4deg; }
.atlas-kingdom[data-map-kingdom="strategy"] .atlas-map-resource:nth-child(2) { translate:0 14px; --tilt:-3deg; }
.atlas-kingdom[data-map-kingdom="guides"] .kingdom-title { translate:-7% 0; }
.atlas-kingdom[data-map-kingdom="analytics"] .kingdom-title { translate:5% 0; }
.atlas-kingdom[data-map-kingdom="community"] .kingdom-title { translate:-5% 0; }
.atlas-map-resource .resource-crest { width:clamp(37px,2.9vw,70px); height:clamp(37px,2.9vw,70px); border:0; border-radius:8px; background:#040b0844; box-shadow:none; overflow:visible; }
.atlas-map-resource .resource-crest::after { display:none; }
.atlas-map-resource .resource-crest img { width:100%; height:100%; filter:drop-shadow(0 3px 3px #0009); }
.atlas-map-resource .resource-initial { font-size:18px; }
.atlas-map-resource .resource-name { flex:1; font:700 clamp(21px,1.6vw,35px)/.98 "Cormorant Garamond",Georgia,serif; font-variant:small-caps; text-align:left; text-wrap:balance; text-shadow:0 2px 3px #000; min-width:0; }
.atlas-map-resource[data-resource="tsm"] .resource-name { font-family:"Cormorant Garamond",Georgia,serif; }
.atlas-map-resource:hover,.atlas-map-resource:focus-visible { color:#fff0e0; transform:translateY(-5px) scale(1.07); filter:drop-shadow(0 0 3px #f1ceff) drop-shadow(0 0 8px #bd63ff) drop-shadow(0 0 19px #982bffc9); z-index:2; }
.atlas-kingdom:has(.atlas-map-resource:is(:hover,:focus-visible)) { z-index:3; }
.atlas-kingdom:has(.atlas-resource:hover) .kingdom-wordmark,.atlas-kingdom.is-selected .kingdom-wordmark { filter:var(--title-tone,brightness(1)) drop-shadow(0 0 8px var(--kingdom-color)); }
.kingdom-atlas [hidden] { display:none !important; }
/* Viewport-clamped lore cards remain outside the map's clipping boundary. */
.atlas-resource-note { pointer-events:none; position:fixed; z-index:1000; width:min(440px,calc(100vw - 24px)); box-sizing:border-box; padding:24px; color:#e4e8df; background:linear-gradient(140deg,#251c35fa,#081410fa); border:2px solid #ba83ef; border-radius:15px; box-shadow:0 15px 45px #000c,0 0 12px #bd63ff66,0 0 35px #982bff44; backdrop-filter:blur(14px); animation:atlas-note-in .16s ease-out; }
.atlas-resource-note header { display:flex; align-items:center; gap:12px; padding-bottom:12px; border-bottom:1px solid #d8c59530; }
.atlas-resource-note header .resource-crest { width:82px; height:82px; border-color:var(--kingdom-color); }
.atlas-resource-note header .resource-crest img { width:85%; height:85%; }
.atlas-resource-note header small { display:block; color:var(--kingdom-color); font:600 12px/1.5 Inter,system-ui,sans-serif; }
.atlas-resource-note strong { display:block; color:#f4dfb0; font:700 30px/1.15 "Cormorant Garamond",serif; }
.atlas-resource-note p { font:400 15px/1.65 Inter,system-ui,sans-serif; margin:16px 0; }
.atlas-resource-note .atlas-note-strength { color:#cbd5b7; padding-inline-start:12px; border-inline-start:2px solid var(--kingdom-color); }
.atlas-resource-note footer { display:flex; justify-content:space-between; color:var(--kingdom-color); font:500 11px/1.3 Inter,system-ui,sans-serif; }
.atlas-note-language { display:block; color:#acbba9; font:10px Inter,system-ui,sans-serif; margin-top:10px; }
@keyframes atlas-note-in { from { opacity:0; translate:0 4px; } to { opacity:1; translate:0 0; } }
@media(min-width:2000px) { body:has(.kingdom-atlas) .app-shell.atlas-shell { width:calc(100% - 48px); } }
@media(min-width:1101px) and (max-height:850px) {
 .kingdom-atlas { padding-top:8px; }
 .atlas-heading h1 { font-size:30px; }
 .atlas-presenter { font-size:8px; margin-bottom:2px; }
 .atlas-subtitle { font-size:15px; }
 .atlas-heading-rule { display:none; }
 .atlas-toolbar { padding:3px 10px; margin:5px 0 8px; }
 .atlas-view-controls button { padding:5px 9px; font-size:10px; }
 .atlas-search input { height:24px; }
 .kingdom-title { height:36px; }
 .kingdom-title-label { font-size:21px; }
 .atlas-kingdom h2 { margin-bottom:5px; }
 .kingdom-sites { gap:14px 5px; }
 .atlas-map-resource { padding:5px 6px; gap:4px; }
 .atlas-map-resource .resource-crest { width:30px; height:30px; }
 .atlas-map-resource .resource-name { font-size:22px; }
 .atlas-kingdom[data-map-kingdom] .kingdom-sites .atlas-map-resource:nth-child(n) { translate:0 3px; }
 .atlas-kingdom[data-map-kingdom] .kingdom-sites .atlas-map-resource:nth-child(even) { translate:0 6px; }
}
@media(max-width:1100px),(max-height:620px) {
 .atlas-map { height:auto; }
 .atlas-world { height:auto; }
 .atlas-landscape { object-fit:cover; opacity:.3; }
 .atlas-territories { grid-template-columns:repeat(2,minmax(0,1fr)); gap:50px 36px; padding:40px 28px 60px; }
 .atlas-territories { display:grid; height:auto; }
 .atlas-territories .atlas-kingdom { position:relative; left:auto; top:auto; translate:none; width:100%; }
 .atlas-kingdom:nth-child(even) { margin-top:45px; }
 .atlas-kingdom::before { inset:-30px -25px; background-image:url('/assets/kingdoms/kingdoms-map-roads.webp'); background-size:300% auto; background-position:var(--kingdom-x) var(--kingdom-y); mask-image:radial-gradient(ellipse,#000 35%,transparent 75%); opacity:.5; filter:saturate(.8); }
 .kingdom-title { height:96px; }
 .kingdom-title-label { font-size:27px; }
 .kingdom-sites { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
 .atlas-map-resource { width:99%; padding:7px 10px; }
 .atlas-kingdom[data-map-kingdom] .kingdom-sites .atlas-map-resource:nth-child(n) { translate:none; }
 .kingdom-sites:has(>a:nth-child(3)):not(:has(>a:nth-child(4))) >a:last-child,.kingdom-sites:has(>a:nth-child(5)):not(:has(>a:nth-child(6))) >a:last-child { width:50%; }
 .atlas-map-resource .resource-crest { width:47px; height:47px; }
 .atlas-map-resource .resource-name { font-size:27px; }
 .atlas-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
 body:has(.kingdom-atlas) .app-shell.atlas-shell { width:calc(100% - 20px); }
 .kingdom-atlas { padding-top:14px; }
 .atlas-presenter { font-size:9px; letter-spacing:.15em; }
 .atlas-heading h1 { font-size:clamp(27px,7.5vw,42px); }
 .atlas-toolbar { flex-wrap:wrap; justify-content:center; gap:8px; padding:8px; }
 .atlas-search { width:100%; }
 .atlas-view-controls { flex:1; }
 .atlas-view-controls button { flex:1; font-size:11px; padding:7px; }
 .atlas-territories { grid-template-columns:1fr; gap:65px; padding:35px 24px 60px; }
 .atlas-kingdom:nth-child(n) { margin-top:0; }
 .kingdom-title { height:110px; }
 .kingdom-title-label { font-size:32px; }
 .atlas-map-resource .resource-crest { width:51px; height:51px; }
 .atlas-map-resource .resource-name { font-size:28px; }
 .atlas-resource-note { padding:18px; }
 .atlas-resource-note header .resource-crest { width:68px; height:68px; }
 .atlas-directory-grid { grid-template-columns:1fr; }
 .atlas-directory-heading { align-items:start; flex-direction:column; gap:7px; }
 .atlas-shell>.guide-page { margin-top:45px; }
}
@media(max-width:480px) {
 .kingdom-sites { grid-template-columns:1fr; gap:16px; padding-inline:6px; }
 .atlas-kingdom[data-map-kingdom] .kingdom-sites .atlas-map-resource:nth-child(n) { grid-column:auto; width:93%; justify-self:start; padding:9px 12px; gap:8px; translate:none; }
 .atlas-kingdom[data-map-kingdom] .kingdom-sites .atlas-map-resource:nth-child(even) { justify-self:end; margin-bottom:12px; }
 .atlas-map-resource .resource-crest { width:62px; height:62px; }
 .atlas-map-resource .resource-name { font-size:30px; }
}
/* Ultrawide displays give the landmarks more presence without changing 16:9 sizing. */
@media(min-width:1600px) and (min-aspect-ratio:2/1) and (min-height:851px) {
 .atlas-kingdom { width:31.5%; }
 .atlas-kingdom[data-map-kingdom="builds"],.atlas-kingdom[data-map-kingdom="addons"] { width:25%; }
 .kingdom-atlas { padding-top:8px; }
 .atlas-heading h1 { font-size:42px; }
 .atlas-subtitle { font-size:18px; }
 .atlas-heading-rule { display:none; }
 .atlas-toolbar { padding:3px 12px; margin:5px 0 8px; }
 .atlas-view-controls button { padding:5px 13px; }
 .kingdom-title { height:clamp(66px,6.1svh,84px); }
 .kingdom-sites { gap:18px 24px; }
 .atlas-kingdom[data-map-kingdom="guides"] { top:20%; }
 .atlas-kingdom[data-map-kingdom="rankings"] { top:21%; }
 .atlas-kingdom[data-map-kingdom="analytics"] { top:20%; }
 .atlas-kingdom[data-map-kingdom="builds"],.atlas-kingdom[data-map-kingdom="addons"] { top:52%; }
 .atlas-kingdom[data-map-kingdom="community"] { top:81%; }
 .atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(1) { translate:-7px 1px; }
 .atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(2) { translate:0 5px; }
 .atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(4) { translate:3px -2px; }
 .atlas-kingdom[data-map-kingdom="guides"] .atlas-map-resource:nth-child(5) { translate:-2px 8px; }
 .atlas-map-resource { width:min(99%,270px); }
 .atlas-map-resource .resource-crest { width:clamp(70px,3.1vw,80px); height:clamp(70px,3.1vw,80px); }
 .atlas-map-resource .resource-name { font-size:clamp(28px,1.6vw,41px); }
}
@media(prefers-reduced-motion:reduce) { .atlas-map-resource { transition:none; } .atlas-resource-note { animation:none; } }
