:root {
  --bg-top: #07131b;
  --bg-mid: #0b1f2b;
  --bg-bottom: #061018;
  --panel: rgba(6, 18, 27, 0.82);
  --panel-strong: rgba(8, 14, 21, 0.94);
  --line: rgba(255, 211, 159, 0.18);
  --line-strong: rgba(255, 211, 159, 0.34);
  --text-main: #f3e6cf;
  --text-soft: #c7bba6;
  --text-faint: #94a8a9;
  --lagoon: #66d1ca;
  --reef: #103c47;
  --gold: #f0b86b;
  --ember: #ff7b4d;
  --sand: #f8ddae;
  --ink: #08141a;
  --success: #7de0bd;
  --danger: #ff9a7b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Barlow', sans-serif;
  --font-condensed: 'Barlow Condensed', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(55, 117, 135, 0.28), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 194, 114, 0.08), transparent 20%),
    radial-gradient(circle at 80% 15%, rgba(102, 209, 202, 0.08), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255, 123, 77, 0.08), transparent 26%);
}

body::after {
  opacity: 0.12;
  background-image:
    linear-gradient(0deg, transparent 24px, rgba(255, 255, 255, 0.09) 25px),
    linear-gradient(90deg, transparent 24px, rgba(255, 255, 255, 0.08) 25px);
  background-size: 25px 25px;
  mix-blend-mode: overlay;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px 10px 28px 10px;
  background: linear-gradient(180deg, rgba(12, 24, 35, 0.92) 0%, rgba(7, 16, 24, 0.88) 100%);
  box-shadow: var(--shadow);
}

.panel::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 27px 9px 27px 9px;
  background:
    linear-gradient(145deg, rgba(255, 222, 173, 0.07), transparent 35%),
    linear-gradient(180deg, rgba(20, 45, 52, 0.14), transparent 55%);
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(4, 14, 22, 0.9);
  border-bottom: 1px solid rgba(255, 211, 159, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-mark,
.eyebrow,
.meta-label,
.button,
.nav-toggle,
.site-menu a,
.status-pill,
.tag-chip,
.field-label {
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand-mark {
  font-size: 0.95rem;
  color: var(--lagoon);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-menu a {
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--text-soft);
  transition: color 180ms ease;
}

.site-menu a:hover,
.site-menu a:focus-visible,
.footer-link:hover,
.footer-link:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.atlas-card h3 a:hover,
.atlas-card h3 a:focus-visible {
  color: var(--sand);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: rgba(9, 20, 29, 0.72);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.7rem 1rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--sand);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 50;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 8.5rem;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(4, 13, 20, 0.22) 0%, rgba(4, 13, 20, 0.84) 72%, rgba(4, 13, 20, 0.98) 100%),
    radial-gradient(circle at 70% 18%, rgba(255, 186, 92, 0.24), transparent 26%),
    url('assets/photos/hero-mai-kai.jpg') center/cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.3), transparent 40%, rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: end;
}

.hero-copy h1,
.section-heading h2,
.detail-copy h1,
.detail-panel h2,
.error-card h1,
.loading-card h1,
.note-card h3,
.region-card h3,
.atlas-card h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.95;
}

.hero-copy h1 {
  font-size: clamp(3.5rem, 7vw, 6.6rem);
  max-width: 10.5ch;
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

.eyebrow,
.meta-label {
  margin: 0 0 0.8rem;
  color: var(--lagoon);
  font-size: 0.82rem;
}

.lede,
.section-heading p,
.poster-note,
.card-summary,
.note-card p,
.region-card p,
.detail-summary,
.detail-panel p,
.error-card p,
.loading-card p,
.active-filter-summary,
.atlas-caption,
.results-hint,
.footer-copy,
.tag-filter-display,
.detail-address {
  margin: 0;
  color: var(--text-soft);
}

.lede {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1.12rem;
}

.hero-actions,
.filter-actions,
.detail-chip-row,
.detail-link-block,
.atlas-legend,
.site-menu,
.footer-shell {
  display: flex;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  text-decoration: none;
  font-size: 0.82rem;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible,
.tag-chip:hover,
.tag-chip:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible,
input:focus-visible,
select:focus-visible,
.atlas-pin:focus-visible,
.atlas-card-media:focus-visible,
.text-link:focus-visible,
.back-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: var(--ink);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(10, 20, 29, 0.7);
  color: var(--text-main);
}

.hero-stats {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.personal-log {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(5, 13, 20, 0.62);
}

.personal-log__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.personal-log__grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.personal-log__grid span,
.personal-log__note {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.personal-log__note {
  margin: 0.85rem 0 0;
}

.stat-card {
  padding: 1rem 0.9rem;
  border: 1px solid rgba(255, 211, 159, 0.18);
  border-radius: 20px 8px 20px 8px;
  background: rgba(5, 13, 20, 0.6);
}

.stat-card dt {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
}

.stat-card dd {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.hero-panel {
  align-self: stretch;
}

.poster-frame {
  height: 100%;
  padding: 1.4rem;
  border: 1px solid rgba(255, 211, 159, 0.16);
  border-radius: 32px 10px 32px 10px;
  background: linear-gradient(165deg, rgba(16, 28, 39, 0.92), rgba(7, 13, 20, 0.92));
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.poster-kicker {
  margin: 0 0 1rem;
  color: var(--sand);
  font-family: var(--font-condensed);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.poster-copy {
  margin-top: 1rem;
}

.hero-credit {
  margin-top: 0.65rem;
  color: rgba(239, 230, 216, 0.54);
  font-size: 0.68rem;
  line-height: 1.3;
}

.hero-credit a {
  color: rgba(240, 184, 107, 0.76);
  text-decoration: none;
}

.poster-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.05;
}

.placeholder,
.media-frame {
  position: relative;
  min-height: 16rem;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 159, 0.15);
  border-radius: 28px 10px 28px 10px;
  background: rgba(8, 18, 26, 0.88);
}

.placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1.3rem;
  isolation: isolate;
}

.placeholder::before,
.placeholder::after {
  content: '';
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.placeholder::before {
  width: 10rem;
  height: 10rem;
  right: -2rem;
  top: -2rem;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(0.5px);
}

.placeholder::after {
  left: 1rem;
  top: 1rem;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 8px 24px 8px;
}

.placeholder strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 0.95;
}

.placeholder-meta,
.placeholder-location {
  position: relative;
  z-index: 1;
}

.placeholder-meta {
  font-family: var(--font-condensed);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.placeholder-location {
  color: rgba(255, 255, 255, 0.88);
}

.placeholder--hero {
  min-height: 20rem;
}

.placeholder--detail,
.media-frame--detail {
  min-height: 24rem;
}

.placeholder--lagoon {
  background:
    linear-gradient(145deg, rgba(20, 110, 118, 0.95), rgba(6, 34, 40, 0.98)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 20%);
}

.placeholder--lagoon::before {
  background: rgba(129, 232, 220, 0.36);
}

.placeholder--brass {
  background: linear-gradient(145deg, rgba(89, 67, 41, 0.96), rgba(19, 24, 28, 0.96));
}

.placeholder--brass::before {
  background: rgba(240, 184, 107, 0.38);
}

.placeholder--ember {
  background: linear-gradient(145deg, rgba(104, 35, 24, 0.96), rgba(23, 15, 17, 0.98));
}

.placeholder--ember::before {
  background: rgba(255, 123, 77, 0.45);
}

.placeholder--sunset {
  background: linear-gradient(145deg, rgba(114, 43, 57, 0.96), rgba(33, 18, 20, 0.96));
}

.placeholder--sunset::before {
  background: rgba(255, 183, 119, 0.34);
}

.placeholder--velvet {
  background: linear-gradient(145deg, rgba(72, 31, 50, 0.96), rgba(16, 11, 17, 0.98));
}

.placeholder--velvet::before {
  background: rgba(220, 114, 171, 0.35);
}

.placeholder--orchid {
  background: linear-gradient(145deg, rgba(72, 54, 102, 0.96), rgba(14, 12, 25, 0.98));
}

.placeholder--orchid::before {
  background: rgba(173, 156, 255, 0.34);
}

.placeholder--copper {
  background: linear-gradient(145deg, rgba(111, 66, 38, 0.96), rgba(20, 18, 14, 0.98));
}

.placeholder--copper::before {
  background: rgba(255, 199, 129, 0.34);
}

.placeholder--midnight {
  background: linear-gradient(145deg, rgba(16, 29, 51, 0.96), rgba(8, 13, 22, 0.98));
}

.placeholder--midnight::before {
  background: rgba(104, 183, 255, 0.28);
}

.placeholder--parchment {
  background: linear-gradient(145deg, rgba(96, 77, 53, 0.92), rgba(27, 20, 15, 0.98));
}

.placeholder--parchment::before {
  background: rgba(255, 222, 173, 0.28);
}

.placeholder.is-closed {
  filter: saturate(0.75);
}

.media-frame {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(4, 11, 17, 0.96);
}

.media-image {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
}

.media-credit {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.4rem;
  align-items: baseline;
  justify-content: flex-end;
  padding: 0.3rem 0.55rem 0.38rem;
  border-top: 1px solid rgba(255, 211, 159, 0.05);
  background: rgba(6, 14, 22, 0.82);
  color: rgba(239, 230, 216, 0.54);
  font-size: 0.56rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.media-credit a {
  color: rgba(240, 184, 107, 0.78);
  text-decoration: none;
}

.media-credit__label {
  color: rgba(239, 230, 216, 0.42);
}

.media-credit__meta {
  color: rgba(239, 230, 216, 0.52);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0.7rem;
}

.section-heading--compact {
  margin-bottom: 1.5rem;
}

.featured-grid,
.results-grid,
.region-grid,
.note-grid,
.detail-columns {
  display: grid;
  gap: 1.3rem;
}

.featured-grid,
.results-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-district-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 2rem;
}

.region-grid,
.note-grid,
.detail-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.world-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.3rem;
  align-items: start;
}

.world-section {
  background: linear-gradient(180deg, rgba(7, 24, 33, 0.42), rgba(7, 17, 24, 0));
}

.atlas-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.atlas-card--featured {
  border-color: rgba(255, 199, 129, 0.28);
}

.atlas-card-media {
  display: block;
  padding: 1rem 1rem 0;
}

.atlas-card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.atlas-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.atlas-card h3 {
  font-size: 2rem;
}

.atlas-card h3 a {
  color: var(--text-main);
  text-decoration: none;
}

.guide-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.15rem 1.2rem 1.25rem;
}

.guide-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.guide-mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  color: var(--text-soft);
  background: rgba(10, 24, 34, 0.82);
  border: 1px solid rgba(255, 211, 159, 0.12);
}

.guide-index-hero {
  padding-top: 8.5rem;
}

.guide-poster {
  padding: 1.2rem 1.25rem;
  min-height: 100%;
}

.guide-poster-copy {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.guide-detail-grid {
  margin-top: 1.5rem;
}

.guide-itinerary {
  margin: 0;
  padding-left: 1.2rem;
}

.guide-itinerary li + li {
  margin-top: 0.85rem;
}

.detail-list--timeline li strong {
  display: inline-block;
  min-width: 4.2rem;
  margin-right: 0.6rem;
  color: var(--sand);
  font-family: var(--font-condensed);
  letter-spacing: 0.08em;
}

.detail-list--timeline li span {
  color: var(--text-soft);
}

.detail-list--reading li + li,
.detail-list--timeline li + li {
  margin-top: 0.8rem;
}

.detail-reading-note {
  color: var(--text-faint);
}

.card-region,
.card-location,
.card-years {
  color: var(--text-faint);
}

.card-location,
.card-years {
  font-size: 0.96rem;
}

.status-pill,
.detail-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 17, 25, 0.56);
}

.status-pill--active {
  color: var(--success);
  border-color: rgba(125, 224, 189, 0.2);
}

.status-pill--closed {
  color: var(--danger);
  border-color: rgba(255, 154, 123, 0.24);
}

.detail-chip {
  color: var(--text-soft);
}

.detail-chip--accent {
  color: var(--sand);
  border-color: rgba(240, 184, 107, 0.28);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag-list--detail {
  margin-top: 0.8rem;
}

.card-links,
.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.card-links {
  margin-top: 0.1rem;
}

.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 211, 159, 0.16);
  background: rgba(10, 20, 29, 0.72);
  color: var(--lagoon);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  text-decoration: none;
  font-family: var(--font-condensed);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.external-link:hover,
.external-link:focus-visible {
  color: var(--sand);
  border-color: rgba(240, 184, 107, 0.28);
  background: linear-gradient(135deg, rgba(240, 184, 107, 0.18), rgba(255, 123, 77, 0.14));
}

.tag-chip {
  border: 1px solid rgba(255, 211, 159, 0.16);
  background: rgba(10, 20, 29, 0.72);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  text-decoration: none;
  font-size: 0.74rem;
}

.tag-chip--active,
.tag-chip--ghost:hover,
.tag-chip--ghost:focus-visible {
  background: linear-gradient(135deg, rgba(240, 184, 107, 0.18), rgba(255, 123, 77, 0.14));
  color: var(--sand);
  border-color: rgba(240, 184, 107, 0.28);
}

.tag-chip--static {
  cursor: default;
}

.tag-chip--ghost {
  align-self: flex-start;
}

.region-card,
.note-card,
.error-card,
.loading-card,
.detail-panel {
  padding: 1.4rem;
}

.region-metrics,
.fact-list {
  display: grid;
  gap: 0.9rem;
  margin: 1.1rem 0 1.25rem;
}

.region-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.region-metrics dt,
.fact-list dt {
  font-family: var(--font-condensed);
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.region-metrics dd,
.fact-list dd {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

.explorer-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.explorer-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  gap: 1.3rem;
  align-items: start;
}

.filter-panel,
.atlas-panel {
  padding: 1.35rem;
}

.filter-panel {
  position: sticky;
  top: 5.8rem;
}

.filter-form,
.field-group,
.detail-stack {
  display: flex;
  flex-direction: column;
}

.filter-form {
  gap: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field-group label,
.field-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 211, 159, 0.18);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(7, 14, 22, 0.85);
  color: var(--text-main);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

.field-group--toggle {
  padding: 0.2rem 0;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.filter-actions {
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.active-filter-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 211, 159, 0.12);
}

.atlas-header,
.results-toolbar,
.footer-shell {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.atlas-summary {
  font-family: var(--font-condensed);
  color: var(--sand);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.atlas-map {
  position: relative;
  margin-top: 1rem;
  min-height: 26rem;
  border-radius: 28px 10px 28px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 159, 0.14);
  background: linear-gradient(180deg, rgba(12, 42, 50, 0.55), rgba(5, 13, 20, 0.92));
}

.atlas-map--leaflet {
  isolation: isolate;
}

.atlas-map--leaflet .leaflet-control-zoom a {
  background: rgba(7, 16, 24, 0.92);
  color: var(--text-main);
  border-bottom-color: rgba(255, 211, 159, 0.12);
}

.atlas-map--leaflet .leaflet-control-attribution {
  background: rgba(7, 16, 24, 0.82);
  color: var(--text-faint);
}

.atlas-map--leaflet .leaflet-control-attribution a,
.leaflet-popup-card a {
  color: var(--sand);
  text-decoration: none;
}

.atlas-map--leaflet .leaflet-popup-content-wrapper,
.atlas-map--leaflet .leaflet-popup-tip {
  background: rgba(7, 16, 24, 0.96);
  color: var(--text-main);
}

.leaflet-popup-card {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 12rem;
}

.leaflet-popup-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.leaflet-popup-card span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.atlas-svg,
.atlas-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.atlas-water {
  fill: rgba(8, 28, 38, 0.95);
}

.atlas-grid-fill {
  fill: url(#atlas-grid);
}

.atlas-grid-fill--world {
  fill: url(#atlas-grid-world);
}

.continent {
  fill: rgba(243, 201, 140, 0.18);
  stroke: rgba(255, 230, 189, 0.22);
  stroke-width: 3;
}

.continent--small {
  opacity: 0.72;
}

.atlas-overlay {
  z-index: 1;
}

.atlas-pin {
  position: absolute;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(7, 14, 22, 0.8);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.atlas-pin:hover,
.atlas-pin:focus-visible {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.08);
}

.atlas-pin::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.7rem);
  transform: translateX(-50%);
  min-width: 12rem;
  max-width: 15rem;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  background: rgba(4, 11, 17, 0.94);
  color: var(--text-main);
  border: 1px solid rgba(255, 211, 159, 0.16);
  font-size: 0.82rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.atlas-pin:hover::after,
.atlas-pin:focus-visible::after {
  opacity: 1;
}

.atlas-pin--active {
  background: var(--lagoon);
}

.atlas-pin--closed {
  background: var(--ember);
}

.atlas-pin--featured {
  box-shadow: 0 0 0 5px rgba(240, 184, 107, 0.18), 0 0 20px rgba(240, 184, 107, 0.24);
}

.atlas-legend {
  gap: 1rem;
  margin-top: 1rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.atlas-legend--world {
  justify-content: flex-start;
}

.legend-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  vertical-align: middle;
}

.legend-dot--active {
  background: var(--lagoon);
}

.legend-dot--closed {
  background: var(--ember);
}

.legend-dot--featured {
  background: var(--gold);
}

.world-map-panel {
  padding: 1.35rem;
}

.atlas-map--world {
  min-height: 23rem;
}

.world-beacon {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 211, 159, 0.22);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(var(--beacon-scale, 1));
  background: radial-gradient(circle at 35% 35%, rgba(129, 232, 220, 0.95), rgba(11, 101, 109, 0.96));
  color: var(--text-main);
  box-shadow: 0 0 0 8px rgba(129, 232, 220, 0.08), 0 0 30px rgba(8, 179, 173, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.world-beacon:hover,
.world-beacon:focus-visible {
  transform: translate(-50%, -50%) scale(calc(var(--beacon-scale, 1) + 0.12));
  box-shadow: 0 0 0 10px rgba(240, 184, 107, 0.14), 0 0 34px rgba(240, 184, 107, 0.18);
}

.world-beacon::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.8rem);
  transform: translateX(-50%);
  min-width: 12rem;
  max-width: 15rem;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  background: rgba(4, 11, 17, 0.94);
  color: var(--text-main);
  border: 1px solid rgba(255, 211, 159, 0.16);
  font-size: 0.82rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.world-beacon:hover::after,
.world-beacon:focus-visible::after {
  opacity: 1;
}

.world-beacon--largest {
  background: radial-gradient(circle at 35% 35%, rgba(240, 184, 107, 0.98), rgba(133, 84, 24, 0.96));
  box-shadow: 0 0 0 8px rgba(240, 184, 107, 0.12), 0 0 34px rgba(240, 184, 107, 0.24);
}

.world-beacon__core {
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.results-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.results-count {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.tracker-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tracker-controls--card {
  margin-top: 0.9rem;
}

.tracker-controls--detail {
  margin-top: 1rem;
}

.tracker-toggle {
  border: 1px solid rgba(255, 211, 159, 0.18);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  background: rgba(9, 20, 29, 0.72);
  color: var(--text-soft);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tracker-toggle.is-active {
  border-color: rgba(240, 184, 107, 0.34);
  background: rgba(240, 184, 107, 0.12);
  color: var(--sand);
}

.tracker-toggle[data-tracker-action="visited"].is-active {
  border-color: rgba(102, 209, 202, 0.4);
  background: rgba(102, 209, 202, 0.12);
  color: var(--lagoon);
}

.empty-state {
  padding: 1.4rem;
}

.site-footer {
  padding: 2rem 0 3rem;
}

.ambient-player {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: min(21rem, calc(100% - 2rem));
  border-radius: 20px 8px 20px 8px;
  background: linear-gradient(180deg, rgba(12, 24, 35, 0.96) 0%, rgba(7, 16, 24, 0.94) 100%);
}

.ambient-player__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem 0.9rem;
}

.ambient-player__toggle {
  width: fit-content;
  border: 1px solid rgba(255, 211, 159, 0.18);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: rgba(9, 20, 29, 0.72);
  color: var(--text-main);
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ambient-player.is-playing .ambient-player__toggle {
  border-color: rgba(102, 209, 202, 0.35);
  color: var(--lagoon);
}

.ambient-player__track,
.ambient-player__credit {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.ambient-player__credit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--text-faint);
}

.ambient-player__credit a {
  color: var(--sand);
  text-decoration: none;
}

.footer-link,
.text-link,
.back-link {
  color: var(--lagoon);
  text-decoration: none;
}

.detail-main {
  padding-top: 5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.detail-container {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.contribution-panel {
  padding: 1.5rem;
}

.contribution-panel h2 {
  margin: 0 0 0.7rem;
}

.contribution-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.contribution-status,
.contribution-note {
  margin: 0;
  color: var(--text-soft);
}

.contribution-status.is-success {
  color: var(--lagoon);
}

.contribution-status.is-error {
  color: var(--ember);
}

.contribution-note {
  font-size: 0.86rem;
  color: var(--text-faint);
}

.back-link {
  align-self: flex-start;
  font-family: var(--font-condensed);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.detail-hero {
  padding: 1.6rem;
}

.detail-hero-grid,
.detail-grid {
  display: grid;
  gap: 1.2rem;
}

.detail-hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-copy h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
}

.detail-location {
  margin: 0.7rem 0 0;
  color: var(--lagoon);
  font-size: 1.08rem;
}

.detail-summary {
  margin-top: 1rem;
  font-size: 1.06rem;
  max-width: 46rem;
}

.detail-chip-row {
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.detail-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.detail-stack,
.detail-columns {
  gap: 1.2rem;
}

.fact-list {
  margin-bottom: 0;
}

.detail-list {
  margin: 1rem 0 0;
  padding-left: 1rem;
  color: var(--text-soft);
}

.detail-address--muted {
  color: var(--text-faint);
}

.detail-link-block {
  margin-top: 1rem;
}

.related-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error-card,
.loading-card {
  padding: 2rem;
}

.error-card h1,
.loading-card h1 {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  margin-bottom: 0.8rem;
}

.error-card--inline {
  grid-column: 1 / -1;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 480ms ease var(--reveal-delay, 0ms), transform 480ms ease var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid rgba(240, 184, 107, 0.9);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .hero-grid,
  .detail-hero-grid,
  .detail-grid,
  .explorer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 38rem;
  }

  .filter-panel {
    position: static;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .personal-log__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .featured-grid,
  .results-grid,
  .results-grid--compact,
  .region-grid,
  .note-grid,
  .detail-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding-bottom: 4rem;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 1.25rem, 1180px);
  }

  .section {
    padding: 4.25rem 0;
  }

  .site-nav {
    padding: 0.9rem 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0.625rem;
    left: 0.625rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 20px 8px 20px 8px;
    background: rgba(5, 13, 20, 0.98);
    box-shadow: var(--shadow);
  }

  .site-menu.is-open {
    display: flex;
  }

  .hero-copy h1,
  .detail-copy h1 {
    max-width: none;
  }

  .hero-stats,
  .personal-log__grid,
  .field-grid,
  .featured-grid,
  .results-grid,
  .results-grid--compact,
  .guide-grid,
  .guide-district-grid,
  .world-shell,
  .region-grid,
  .note-grid,
  .detail-columns,
  .region-metrics {
    grid-template-columns: 1fr;
  }

  .poster-frame {
    transform: none;
  }

  .atlas-map {
    min-height: 20rem;
  }

  .atlas-pin::after {
    min-width: 10rem;
    max-width: 12rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
