.map-page { background: var(--bg); }
.map-page .page { padding-top: 28px; }
.map-heading { margin-bottom: 20px; }
.map-heading h1 { font: 400 clamp(2rem, 4vw, 3.25rem)/1.15 RussoOne, Arial, sans-serif; }
.map-heading p { margin-top: 14px; color: var(--muted); font-size: 1rem; }
.map-heading .feature-link { margin-top: 10px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: start; }
.map-canvas { min-width: 0; }
.pandora-map { display: block; width: 100%; height: auto; aspect-ratio: 790 / 1140; overflow: visible; border-radius: 18px; stroke: none; fill: none; }
.map-sea { fill: #111416; }
.map-land { fill: #28302B; stroke: #515C52; stroke-width: 2; }
.map-topography { fill: none; stroke: #8C977F; stroke-width: 2; opacity: .45; }
.map-route { stroke-dasharray: 4 9; stroke: #D9C3AB; opacity: .3; }
.map-compass { stroke: var(--muted); stroke-width: 2; }
.map-compass text { fill: var(--muted); stroke: none; font-size: 17px; text-anchor: middle; }
.map-region { cursor: pointer; outline: none; }
.territory-shape { fill: var(--region-color); fill-opacity: .12; stroke: var(--region-color); stroke-width: 2.5; vector-effect: non-scaling-stroke; transition: fill-opacity .25s, stroke-width .25s; }
.map-region text { fill: #F3F4F5; text-anchor: middle; stroke: #111416; stroke-width: 4; paint-order: stroke; font: 800 17px/1 Manrope, Arial, sans-serif; pointer-events: none; }
.territory-point { fill: var(--region-color); pointer-events: none; }
.map-region.is-active .territory-shape, .map-region:hover .territory-shape, .map-region:focus-visible .territory-shape { fill-opacity: .32; stroke-width: 4; }
.map-region:focus-visible .territory-shape { stroke-dasharray: 4 4; }
.map-information { position: sticky; top: 48px; min-width: 0; padding-left: 20px; border-left: 2px solid var(--selected-color, #E24C39); }
.map-information h2 { font: 400 1.75rem/1.25 RussoOne, Arial, sans-serif; overflow-wrap: anywhere; }
.map-information dl { margin: 22px 0; }
.map-information dt { margin-top: 16px; font-size: .75rem; color: var(--muted); }
.map-information dd { margin: 5px 0 0; font-size: .9375rem; }
.map-note, .map-hint { font-size: .75rem; line-height: 1.6; color: var(--muted); }
.map-note { margin-top: 16px; }
.clan-list { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; }
.clan-list button { min-height: 44px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 0; background: transparent; border: 0; color: var(--muted); font: 600 .875rem/1.4 Manrope, Arial, sans-serif; text-align: left; }
.clan-list button > span:last-child { margin-left: auto; color: var(--region-color); opacity: 0; }
.clan-list button.is-active, .clan-list button:hover { color: var(--text); }
.clan-list button.is-active > span:last-child { opacity: 1; }
.clan-swatch { width: 10px; height: 10px; flex: 0 0 10px; background: var(--region-color); border: 1px solid #64646466; }
html[data-theme="light"] .map-sea { fill: #E8EBE9; }
html[data-theme="light"] .map-land { fill: #D3DACF; stroke: #A8B1A6; }
html[data-theme="light"] .map-topography { stroke: #747E69; }
html[data-theme="light"] .map-region text { fill: #100C08; stroke: #E8EBE9; }
html[data-theme="light"] .map-route { stroke: #746957; }
html[data-theme="light"] [data-territory="miya"] { --region-color: #7B786F !important; }
html[data-motion="reduced"] .territory-shape { transition: none; }
@media (max-width: 1100px) { .map-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 220px; } }
@media (max-width: 899px) {
  .map-page .page { padding-top: 28px; }
  .map-layout { display: flex; flex-direction: column; gap: 28px; }
  .map-information { position: static; width: 100%; order: 0; }
  .map-canvas { width: 100%; order: 1; }
  .map-information dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px 12px; margin: 16px 0; }
  .map-information dt, .map-information dd { margin: 0; }
  .clan-list { flex-direction: row; flex-wrap: wrap; gap: 0 20px; margin-top: 12px; }
  .clan-list button { width: max-content; }
  .clan-list button > span:last-child { display: none; }
  .pandora-map { height: auto; aspect-ratio: 790 / 1140; }
}
/* The shared canvas provides the same quiet cursor distortion as the main page. */
.map-page .page { position: relative; z-index: 1; }
.map-information { transition: border-color .25s; }
.map-information[data-selected="miya"] { --selected-color: #E6DFCF; }
html[data-theme="light"] .map-information[data-selected="miya"] { --selected-color: #7B786F !important; }
.territory-point { transform-box: fill-box; transform-origin: center; }
.clan-list button { transition: color .2s, background-color .2s; }
.clan-list button:active { background-color: #CA3F161A; }
.map-region .territory-point { filter: drop-shadow(0 0 4px var(--region-color)); }
html[data-motion="reduced"] .map-information, html[data-motion="reduced"] .clan-list button { transition: none; }

/* The portrait map fills its column instead of shrinking inside a wide box. */
.map-page .page { max-width: 1660px; padding-left: 132px; padding-right: 28px; }
.map-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; }
.map-heading .feature-kicker { grid-column: 1 / -1; margin: 0; }
.map-heading p { grid-column: 1; margin: 0; }
.map-heading .feature-link { grid-column: 2; grid-row: 2 / 4; margin: 0; }
.map-information { top: 28px; }
@media (max-width: 899px) { .map-page .page { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 639px) { .map-heading { display: block; } .map-heading p { margin-top: 10px; } .map-heading .feature-link { margin-top: 8px; } }
