@font-face {
  font-family: "Basteleur";
  src: url("/webfonts/Basteleur-Bold.woff2") format("woff2"),
       url("/webfonts/Basteleur-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Basteleur Moonlight";
  src: url("/webfonts/Basteleur-Moonlight.woff2") format("woff2"),
       url("/webfonts/Basteleur-Moonlight.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #10110e;
  --bg-deep: #0b0c0a;
  --panel: #171914;
  --text: #f5f5f2;
  --muted: #aaa99f;
  --muted-2: #7f8178;
  --eyebrow: #bfa882;
  --line: rgba(245,245,242,.11);
  --line-strong: rgba(245,245,242,.18);
  --accent-soft: rgba(191,168,130,.10);
  --accent-line: rgba(191,168,130,.30);
  --radius: 14px;
  --radius-lg: 22px;
  --shell: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -12%, rgba(191,168,130,.045), transparent 34rem),
    var(--bg);
  font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

/* PLACEHOLDERS — replace with real Map Doctor assets later. */




/* Brand only. Actual Basteleur webfont can be wired later. */
.brand-name {
  font-family: "Basteleur", Georgia, serif;
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 23px;
  line-height: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(245,245,242,.075);
  background: rgba(16,17,14,.90);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 20px;
  flex: 1;
}

.main-nav a {
  position: relative;
  color: #c1c0ba;
  font-size: 13px;
  font-weight: 500;
  transition: color .18s ease;
}

.main-nav a:hover,
.main-nav a.active { color: var(--text); }

.main-nav a.nav-coming-soon[aria-disabled="true"] {
  cursor: default;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 1px;
  background: var(--eyebrow);
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  padding: 7px 0 7px 8px;
  cursor: pointer;
}
.mobile-menu span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  margin: 5px 0;
}

.mobile-nav {
  display: none;
}

/* Buttons */
.button {
  min-height: 46px;
  padding: 0 19px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  background: var(--text);
  color: #151611;
}
.button-primary:hover { background: #fff; }

.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.button-secondary:hover {
  border-color: rgba(245,245,242,.32);
  background: rgba(245,245,242,.03);
}



.button-compact {
  min-height: 39px;
  padding: 0 15px;
  font-size: 12px;
}

.button-full { width: 100%; }

.button:disabled,
.download-row:disabled {
  opacity: .52;
  cursor: not-allowed;
  transform: none;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--eyebrow);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Home hero — ONLY large display type using Playfair */
.library-hero {
  padding: 68px 0 78px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(470px, 1.16fr);
  gap: 66px;
  align-items: center;
}

.hero-display {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: -.047em;
  line-height: .97;
  margin: 0;
  font-size: clamp(58px, 6vw, 92px);
}

.hero-lede {
  color: #b6b6ae;
  max-width: 610px;
  font-size: 17px;
  line-height: 1.55;
  margin: 24px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-preview {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  min-height: 405px;
  box-shadow: 0 34px 76px rgba(0,0,0,.24);
}

.hero-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-preview-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.02) 30%, rgba(7,8,6,.70) 100%);
}

.hero-preview-label {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(14,15,12,.78);
  border: 1px solid rgba(245,245,242,.12);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 500;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--eyebrow);
}

/* Library */
.library-section { padding: 84px 0 92px; }

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 500px);
  align-items: end;
  gap: 42px;
  margin-bottom: 34px;
}

.section-heading h2,
.membership-card h2,
.detail-info h2 {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.02;
}

.section-heading h2 { font-size: clamp(40px, 4.2vw, 58px); }

.section-copy {
  color: var(--muted);
  margin: 0;
  max-width: 500px;
  font-size: 14px;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(245,245,242,.013);
  border-radius: var(--radius);
}

.format-pills {
  display: flex;
  gap: 5px;
}

.pill,
.subfilter {
  appearance: none;
  border: 0;
  color: #aaa9a2;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.pill {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill:hover { color: var(--text); }
.pill.active {
  color: var(--text);
  background: rgba(245,245,242,.075);
}

.search-box {
  position: relative;
  width: min(100%, 320px);
}

.search-box input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 42px;
  color: var(--text);
  background: #0e0f0c;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  font-size: 12px;
}
.search-box input::placeholder { color: #74766e; }
.search-box input:focus { border-color: rgba(191,168,130,.52); }
.search-icon {
  position: absolute;
  left: 15px;
  top: 12px;
  pointer-events: none;
}

.subfilters {
  display: flex;
  gap: 23px;
  overflow-x: auto;
  padding: 19px 2px 2px;
  scrollbar-width: none;
}
.subfilters::-webkit-scrollbar { display: none; }

.subfilter {
  white-space: nowrap;
  padding: 0 0 8px;
  font-size: 12px;
  border-bottom: 1px solid transparent;
}
.subfilter.active {
  color: var(--text);
  border-bottom-color: var(--eyebrow);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
  margin-top: 30px;
}

.map-card[hidden] { display: none; }

.map-image-wrap {
  position: relative;
  display: block;
  height: 390px;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.map-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}

.map-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(5,6,5,.68));
  opacity: .18;
  transition: opacity .25s ease;
}

.card-open {
  position: absolute;
  right: 14px;
  bottom: 13px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(14,15,12,.84);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .22s ease, transform .22s ease;
}

.map-card:hover .map-image-wrap img { transform: scale(1.016); }
.map-card:hover .map-image-overlay { opacity: 1; }
.map-card:hover .card-open { opacity: 1; transform: translateY(0); }

.map-card-body { padding: 13px 1px 0; }

.map-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.map-title-row h3 {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
}

.map-title-row p {
  margin: 6px 0 0;
  color: #888a82;
  font-size: 11px;
}
.map-title-row p span { margin: 0 5px; }

.availability {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--eyebrow);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
}

.empty-state {
  padding: 56px 0 18px;
  color: var(--muted);
  text-align: center;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 46px;
}

/* Member callout */
.membership-callout { padding: 0 0 90px; }

.membership-card {
  padding: 38px 42px;
  border: 1px solid rgba(191,168,130,.26);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(115deg, rgba(191,168,130,.095), rgba(191,168,130,.018) 46%, rgba(245,245,242,.012));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}

.membership-card h2 { font-size: clamp(32px, 3.2vw, 46px); }
.membership-card p:not(.eyebrow) {
  max-width: 700px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-top {
  min-height: 176px;
  padding: 38px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.footer-brand p {
  color: var(--muted-2);
  font-size: 11px;
  margin: 7px 0 0;
}
.footer-logo {
  width: 50px;
  height: 50px;
  border-radius: 11px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
  color: #9d9c95;
  font-size: 12px;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  min-height: 58px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6c6e66;
  font-size: 10px;
}



/* Detail page */
.map-detail { padding-bottom: 0; }

.detail-heading { padding: 50px 0 38px; }

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  color: #92938b;
  font-size: 12px;
}
.back-link:hover { color: var(--text); }

.detail-title {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(52px, 5.2vw, 80px);
  letter-spacing: -.045em;
  line-height: .98;
}

.detail-meta {
  margin-top: 17px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #9a9c94;
  font-size: 12px;
}

.detail-content { padding-bottom: 88px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .62fr);
  gap: 30px;
  align-items: start;
}

.detail-preview {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}
.detail-preview img {
  width: 100%;
  height: auto;
}

.download-panel {
  position: sticky;
  top: 98px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}

.access-state {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}
.access-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.panel-kicker {
  font-size: 9px;
  margin-bottom: 5px;
}

.access-state h2 {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.02em;
}
.access-state p:not(.panel-kicker) {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0 0;
}

.download-group {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.download-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.download-group h3 {
  margin: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.download-group > p {
  color: var(--muted);
  font-size: 12px;
  margin: 9px 0 14px;
}



.variant-list {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

/* Long variant lists stay compact until the visitor asks to see them. */
.download-accordion {
  min-width: 0;
}

.download-accordion-summary {
  min-height: 38px;
  padding: 7px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.download-accordion-summary::-webkit-details-marker {
  display: none;
}

.download-accordion-summary::marker {
  content: "";
}

.download-accordion-summary:hover {
  color: #fff;
}

.download-accordion-count {
  margin-left: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

.download-accordion-chevron {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  transition: transform .16s ease;
}

.download-accordion[open] .download-accordion-chevron {
  transform: rotate(180deg);
}

.download-accordion-content {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.content-archive-section-collapsible .download-accordion-summary {
  padding-left: 0;
  padding-right: 0;
  font-size: 16px;
}

.download-group.locked .download-accordion-summary,
.download-group.locked .download-accordion-count,
.download-group.locked .download-accordion-chevron {
  color: #777970;
}

.download-row {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #12130f;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.download-row strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.download-row small {
  display: block;
  color: #777970;
  margin-top: 2px;
  font-size: 9px;
}

.detail-info {
  border-top: 1px solid var(--line);
  padding: 78px 0 90px;
  background: rgba(245,245,242,.010);
}



.detail-info h2 { font-size: clamp(38px, 4vw, 56px); }












/* Responsive */
@media (max-width: 1040px) {
  .main-nav { gap: 17px; margin-left: 6px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-preview { min-height: 350px; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-image-wrap { height: 430px; }
  .detail-grid { grid-template-columns: 1fr; }
  .download-panel { position: static; }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }

  .main-nav,
  .header-inner > .button-compact { display: none; }

  .header-inner { min-height: 66px; }
  .mobile-menu { display: block; margin-left: auto; }

  .mobile-nav.is-open {
    display: grid;
    gap: 1px;
    padding: 10px 16px 16px;
    border-top: 1px solid var(--line);
    background: rgba(16,17,14,.97);
  }
  .mobile-nav a {
    padding: 12px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
  }

  .library-hero { padding: 50px 0 58px; }
  .hero-display { font-size: clamp(48px, 12vw, 70px); }
  .hero-lede { font-size: 15px; }

  .section-heading { grid-template-columns: 1fr; gap: 14px; }
  .library-section { padding: 64px 0 72px; }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .search-box { width: 100%; }
  .format-pills { overflow-x: auto; }

  .membership-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 26px;
    gap: 26px;
  }

  .footer-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-links { justify-content: flex-start; }

  
}

@media (max-width: 590px) {
  .map-grid { grid-template-columns: 1fr; }
  .map-image-wrap { height: min(125vw, 520px); }
  .hero-preview {
    min-height: 275px;
    border-radius: 17px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .button { width: 100%; }

  .availability { display: none; }

  .detail-heading { padding-top: 34px; }
  .detail-title { font-size: clamp(44px, 13vw, 64px); }

  
  

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }
}


/* ==========================
   V3 — LIVE CATALOG
   ========================== */

.catalog-status,
.detail-loading {
  color: var(--muted-2);
  font-size: 12px;
}

.catalog-status {
  margin-top: 26px;
}

.catalog-status.is-error {
  padding: 16px 18px;
  border: 1px solid rgba(191,168,130,.26);
  border-radius: 12px;
  color: var(--eyebrow);
  background: rgba(191,168,130,.055);
}

.map-image-fallback,
.detail-preview-fallback {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  background:
    linear-gradient(135deg, rgba(191,168,130,.09), rgba(245,245,242,.02));
  font-size: 12px;
}

.detail-loading {
  padding-top: 72px;
  padding-bottom: 72px;
}

.detail-error {
  padding-top: 82px;
  padding-bottom: 120px;
}

.detail-error h1 {
  margin: 0 0 14px;
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(44px, 6vw, 74px);
  letter-spacing: -.045em;
  line-height: 1;
}

.detail-error p:not(.eyebrow) {
  color: var(--muted);
  margin: 0 0 28px;
}

.variant-preview-label {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--text);
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  letter-spacing: -.01em;
}

.variant-preview-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(191,168,130,.35) transparent;
}

.variant-thumb {
  appearance: none;
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  opacity: .64;
  cursor: pointer;
  transition: opacity .16s ease, border-color .16s ease, transform .16s ease;
}

.variant-thumb:hover,
.variant-thumb.active {
  opacity: 1;
}

.variant-thumb.active {
  border-color: rgba(245,245,242,.92);
  box-shadow:
    0 0 0 1px rgba(191,168,130,.42),
    0 0 0 3px rgba(15,16,12,.88);
}

.variant-thumb:hover {
  transform: translateY(-1px);
}

.variant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 590px) {
  .catalog-status {
    margin-top: 20px;
  }

  .variant-thumb {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
  }
}


/* ==================================
   V4 — MAP DOCTOR BRAND / TYPE PASS
   ================================== */

:root {
  --text: #F5F5F2;
  --eyebrow: #BFA882;
  --spacer-width: .25px;
}

/* Header / logo */
.header-inner {
  min-height: 82px;
}

.brand {
  gap: 14px;
}

.brand-mark {
  width: 66px;
  height: 60px;
  border-radius: 0;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-name {
  font-family: "Basteleur", Georgia, serif;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-nav {
  gap: 26px;
}

.main-nav a {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
}

.main-nav a.active::after {
  bottom: -11px;
}

/* Exact eyebrow style requested */
.eyebrow,
.panel-kicker {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: #BFA882;
  text-transform: uppercase;
}

/* Hero */
.hero-display {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 57px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero-lede {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
}

/* Patreon button everywhere */
.patreon-button {
  background: #F96854;
  color: #fff;
  border-color: #F96854;
}

.patreon-button:hover {
  background: #ff7868;
  border-color: #ff7868;
  color: #fff;
}

.patreon-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Framer-style fine separators */
.site-header,
.library-hero,
.site-footer,
.footer-bottom,
.detail-info,
.download-group{
  border-color: #C9C9C9;
}

.site-header,
.library-hero,
.site-footer,
.detail-info {
  border-width: 0 0 var(--spacer-width) 0;
}

.footer-bottom,
.download-group{
  border-width: var(--spacer-width) 0 0 0;
}





/* Find your map — deliberately smaller */
.section-heading h2 {
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Map pack names */
.map-title-row h3 {
  font-family: "Cinzel Decorative", Georgia, serif;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
}

.map-title-row {
  gap: 18px;
}

.map-title-row > div:first-child {
  min-width: 0;
}

.map-title-row p {
  margin-top: 9px;
}

/* Detail map title is also a map name */
.detail-title {
  font-family: "Cinzel Decorative", Georgia, serif;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
}

/* Technical-details-only block */
.detail-info {
  padding-top: 72px;
}





/* Footer real logo */
.footer-logo {
  width: 66px;
  height: 60px;
  border-radius: 0;
  object-fit: contain;
}

/* Keep logo legible without making the footer huge */
.footer-brand .brand-name {
  font-size: 30px;
}

/* Detail download panel: Patreon button uses brand color; keep other actions neutral */
.download-panel .patreon-button {
  margin-top: 2px;
}

/* Mobile tuning */
@media (max-width: 1040px) {
  .brand-mark {
    width: 58px;
    height: 53px;
  }

  .brand-name {
    font-size: 27px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    font-size: 13px;
  }

  .map-title-row h3 {
    font-size: 34px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 74px;
  }

  .brand-mark {
    width: 52px;
    height: 47px;
  }

  .brand-name {
    font-size: 25px;
  }

  .hero-display {
    font-size: 49px;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .map-title-row h3 {
    font-size: 34px;
  }

  
}

@media (max-width: 590px) {
  .hero-display {
    font-size: 44px;
  }

  .hero-lede {
    font-size: 15px;
  }

  .eyebrow,
  .panel-kicker {
    font-size: 13px;
  }

  .map-title-row h3,
  .detail-title {
    font-size: 31px;
  }

  

  
}


/* ==========================================
   V4.1 — HOMEPAGE MAP CARDS + SPACER PASS
   ========================================== */

:root {
  --shell: 1200px;
  --spacer-width-site: 1160px;
}

/* ------------------------------------------
   CENTERED 1160px SEPARATORS
   The site content stays 1200px wide.
   ------------------------------------------ */

.site-header,
.library-hero,
.detail-info,
.site-footer,
.footer-bottom {
  border-color: transparent !important;
}

.site-header,
.library-hero,
.detail-info,
.site-footer,
.footer-bottom {
  position: relative;
}

.site-header::after,
.library-hero::after,
.detail-info::before,
.site-footer::before,
.footer-bottom::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 40px), var(--spacer-width-site));
  height: .25px;
  background: #C9C9C9;
  opacity: 1;
  pointer-events: none;
}

.site-header::after,
.library-hero::after {
  bottom: 0;
}

.detail-info::before,
.site-footer::before,
.footer-bottom::before {
  top: 0;
}

/* Avoid doubling the footer divider where footer-bottom begins. */
.site-footer::before {
  display: block;
}

/* ------------------------------------------
   HOMEPAGE MAP PACK CARDS
   ------------------------------------------ */

.map-card {
  border: 1px solid #C9C9C9;
  border-radius: 5px;
  overflow: hidden;
  background: transparent;
}

/* Image lives inside the card border instead of carrying its own frame. */
.map-image-wrap {
  height: 390px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
}

/* 5px outer card radius controls the image corners through overflow:hidden. */
.map-image-wrap img {
  border-radius: 0;
}

/* Framer-like compact information area under the image. */
.map-card-body {
  padding: 12px 14px 14px;
}

/* Map pack names on the homepage:
   Rubik Regular / 14px / 1.6 / 0.05em.
   The 20px paragraph spacing is represented by the content spacing
   when multi-paragraph copy is introduced; current cards contain one title line. */
.map-title-row h3 {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: none;
}

/* Keep technical metadata compact beneath the title. */
.map-title-row p {
  margin-top: 1px;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .01em;
}

/* Badges remain subtle inside the bordered card. */
.format-badge {
  margin-top: 1px;
}

/* Slightly reduce grid gap because the borders now define each card clearly. */
.map-grid {
  gap: 20px;
}

/* Keep the hover treatment restrained with the new bordered card. */
.map-card:hover .map-image-wrap img {
  transform: scale(1.012);
}

@media (max-width: 1040px) {
  .map-title-row h3 {
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .site-header::after,
  .library-hero::after,
  .detail-info::before,
  .site-footer::before,
  .footer-bottom::before {
    width: min(calc(100% - 32px), var(--spacer-width-site));
  }
}

@media (max-width: 590px) {
  .map-card-body {
    padding: 11px 12px 13px;
  }

  .map-title-row h3 {
    font-size: 14px;
  }
}


/* ==========================================
   V4.2 — MEMBER ACCESS ICON + PATREON TYPE
   ========================================== */

/* Patreon CTA typography */
.patreon-button {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
}

/* Member access key icon */
.access-icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(191,168,130,.55);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(191,168,130,.055);
}

.access-icon svg {
  width: 24px;
  height: 24px;
  fill: #BFA882;
}

@media (max-width: 590px) {
  .access-icon {
    width: 48px;
    height: 48px;
  }

  .access-icon svg {
    width: 22px;
    height: 22px;
  }
}


/* ==========================================
   V4.3 — GRID / PHOSPHOR / DETAILS PASS
   ========================================== */

:root {
  --shell: 1200px;
  --spacer-width-site: 1200px;
}

/* Full 1200px centered separators */
.site-header::after,
.library-hero::after,
.detail-info::before,
.site-footer::before,
.footer-bottom::before {
  width: min(calc(100% - 32px), 1200px);
}

/* The archive section starts closer to the divider, matching the Framer spacing. */
.library-section {
  padding-top: 25px;
}

/* Four cards per row. The Framer card is fill-width with a 300px fixed preview. */
.map-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.map-image-wrap {
  height: 300px;
}

/* Card radius/border remain exactly as requested. */
.map-card {
  border: 1px solid #C9C9C9;
  border-radius: 5px;
}

.map-card-body {
  padding: 12px 14px 14px;
}

/* Patreon button stays Rubik Regular. */
.patreon-button {
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 400;
}

/* Proper Phosphor member-access icon */
.access-icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(191,168,130,.55);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(191,168,130,.055);
}

.access-icon .ph {
  color: #BFA882;
  font-size: 25px;
  line-height: 1;
}

/* More breathing room between the main map and its variant strip. */
.variant-preview-strip {
  padding-top: 28px;
}

/* Cleaner technical details inspired by the supplied reference. */
.detail-info {
  padding-top: 25px;
  padding-bottom: 74px;
}



.technical-details-panel {
  min-width: 0;
}

.technical-details-panel h3 {
  margin: 0 0 24px;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
}

.technical-detail-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 28px;
}

.technical-detail-label {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  color: #F5F5F2;
}

.technical-detail-label .ph {
  width: 24px;
  flex: 0 0 24px;
  color: #F5F5F2;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.technical-detail-value {
  min-width: 0;
  text-align: right;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  color: #F5F5F2;
  overflow-wrap: anywhere;
}

/* Old DL styling no longer used. */


/* Responsive: 3 / 2 / 1 cards rather than crushing 4 columns. */
@media (max-width: 1080px) {
  .map-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-image-wrap {
    height: 300px;
  }

  

  .technical-details-panel {
    max-width: 620px;
  }
}

@media (max-width: 590px) {
  .map-grid {
    grid-template-columns: 1fr;
  }

  .map-image-wrap {
    height: 300px;
  }

  .technical-details-panel h3 {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .technical-detail-row {
    min-height: 50px;
    grid-template-columns: minmax(145px, .9fr) minmax(0, 1.1fr);
    gap: 16px;
  }

  .technical-detail-label,
  .technical-detail-value {
    font-size: 14px;
  }

  .technical-detail-label {
    gap: 11px;
  }

  .technical-detail-label .ph {
    width: 21px;
    flex-basis: 21px;
    font-size: 21px;
  }
}


/* ==========================================
   V5 — PATREON ACCESS / LIVE DOWNLOADS
   ========================================== */


.download-row:not(:disabled) {
  cursor: pointer;
}

.download-row:not(:disabled):hover {
  border-color: rgba(245,245,242,.55);
  background: #171813;
}

.download-row .ph-download-simple {
  color: #BFA882;
  font-size: 18px;
}

.download-row.is-preparing {
  opacity: .68;
  cursor: wait;
}


/* ==========================================
   V5.2 — VISUAL CLEANUP PASS
   Titles / spacing / Phosphor / compact details / footer
   ========================================== */

/* Match the bolder Cinzel Decorative map title used on mapdoctor.net. */
.detail-title {
  font-family: "Cinzel Decorative", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
}

/* Pull the hero divider up. The space below the hero now mirrors the
   compact spacing above THE VTT ARCHIVE. */
.library-hero {
  padding-bottom: 28px;
}

/* Keep the archive's existing 25px top rhythm. */
.library-section {
  padding-top: 25px;
}

/* Search uses the same Phosphor system as the rest of the library. */
.search-icon {
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #8f9189;
  font-size: 17px;
  line-height: 1;
}

/* Remove the oversized air before the technical-details divider. */
.detail-content {
  padding-bottom: 42px;
}

/* Compact map-details section. */
.detail-info {
  padding-top: 34px;
  padding-bottom: 44px;
}





.technical-details-panel h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
}

.technical-detail-row {
  min-height: 44px;
  grid-template-columns: minmax(160px, .8fr) minmax(0, 1.2fr);
  gap: 22px;
}

.technical-detail-label,
.technical-detail-value {
  font-size: 14px;
}

.technical-detail-label {
  gap: 12px;
}

.technical-detail-label .ph {
  width: 20px;
  flex-basis: 20px;
  font-size: 20px;
}

/* All download/status affordances are now Phosphor icons. */
.download-group-status {
  flex: 0 0 auto;
  color: #777970;
  font-size: 19px;
  line-height: 1;
}

.download-group:not(.locked) .download-group-status {
  color: #BFA882;
}

.download-row-icon,
.download-row .ph-download-simple {
  flex: 0 0 auto;
  color: #777970;
  font-size: 18px;
  line-height: 1;
}

.download-row:not(:disabled) .download-row-icon,
.download-row:not(:disabled) .ph-download-simple {
  color: #BFA882;
}

#uvtt-bundle-button .ph {
  font-size: 16px;
  line-height: 1;
}

/* Footer proportions brought closer to the main Map Doctor map pages. */
.site-footer {
  background: #080906;
}

.footer-top {
  min-height: 138px;
  padding: 26px 0;
  gap: 32px;
}

.footer-brand {
  gap: 14px;
}

.footer-logo {
  width: 58px;
  height: 53px;
}

.footer-brand .brand-name {
  font-size: 28px;
  line-height: 1.15;
}

.footer-brand p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.footer-links {
  gap: 26px;
  font-size: 13px;
}

.footer-bottom {
  min-height: 46px;
  font-size: 11px;
}

@media (max-width: 820px) {
  .library-hero {
    padding-bottom: 28px;
  }

  .detail-content {
    padding-bottom: 34px;
  }

  .detail-info {
    padding-top: 30px;
    padding-bottom: 38px;
  }

  

  

  .footer-top {
    min-height: 0;
    padding: 30px 0;
  }
}

@media (max-width: 590px) {
  .detail-title {
    font-size: 31px;
  }

  .technical-detail-row {
    min-height: 42px;
    grid-template-columns: minmax(138px, .9fr) minmax(0, 1.1fr);
    gap: 14px;
  }

  .technical-detail-label,
  .technical-detail-value {
    font-size: 13px;
  }

  .footer-brand .brand-name {
    font-size: 26px;
  }
}


/* ==========================================
   V5.3 — ECOSYSTEM / VARIANT / DETAIL CLEANUP
   ========================================== */

/* Main Map Doctor identity always returns to the main Map Doctor site. */
.footer-brand {
  color: inherit;
  text-decoration: none;
}

.footer-brand:hover .brand-name {
  color: var(--text);
}

/* Give the key icon and access copy proper breathing room.
   V4.3 enlarged the icon to 52px, so the grid column must match it. */
.access-state {
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 22px;
}

.access-state > div:last-child {
  min-width: 0;
  padding-top: 1px;
}

/* Bring technical labels and values together instead of stretching values
   to the far edge of the 1200px shell. */


.technical-details-panel {
  width: min(100%, 540px);
  max-width: 540px;
  justify-self: start;
}

.technical-detail-row {
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 18px;
}

.technical-detail-value {
  text-align: left;
}

/* Main map preview and variant thumbnails use the same restrained 5px radius
   as the map cards on the library homepage. */
.detail-preview {
  border-radius: 5px;
}

.variant-thumb {
  border-radius: 5px;
  opacity: 1;
}

.variant-thumb:hover,
.variant-thumb.active {
  opacity: 1;
}

/* Keep all thumbnails visible immediately. The strip itself remains horizontally
   scrollable, so maps with 20–30+ variants are all reachable. */
.variant-thumb img {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 820px) {
  .technical-details-panel {
    width: min(100%, 540px);
    max-width: 540px;
  }
}

@media (max-width: 590px) {
  .access-state {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 18px;
  }

  .technical-detail-row {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 14px;
  }
}


/* ==========================================
   V5.4 — FOUNDRY THEME COLLECTIONS
   ========================================== */
.collection-index-hero {
  padding: 58px 0 44px;
  border-bottom: 1px solid var(--line);
}
.collection-index-hero-inner { max-width: none; }
.collection-index-hero h1 {
  max-width: 760px;
}
.collection-index-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.collection-index-section { padding: 34px 0 82px; }
.collection-section-heading { margin-bottom: 8px; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.collection-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(245,245,242,.015);
}
.collection-card-art {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.collection-card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.collection-card:hover .collection-card-art img { transform: scale(1.018); }
.collection-card-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--eyebrow);
  background: radial-gradient(circle at 50% 20%, rgba(191,168,130,.13), transparent 55%), #141510;
}
.collection-card-fallback .ph { font-size: 40px; }
.collection-card-fallback span { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.collection-card-body { padding: 22px; }
.collection-card-body h2 { margin: 0; font-size: 24px; font-weight: 500; }
.collection-card-body > p:not(.panel-kicker) { min-height: 66px; margin: 12px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.collection-card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 15px; border-top: 1px solid var(--line); color: #a8a9a2; font-size: 11px; }
.collection-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.collection-card-meta .ph { color: var(--eyebrow); font-size: 14px; }
.collection-card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 12px; font-weight: 600; }
.collection-card-link .ph { color: var(--eyebrow); }

.collection-detail-heading { padding: 46px 0 32px; border-bottom: 1px solid var(--line); }
.collection-detail-heading .detail-title { margin-top: 8px; }
.collection-description { max-width: 820px; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.collection-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.collection-stats > div { min-width: 132px; padding: 12px 14px; display: grid; grid-template-columns: 20px auto; grid-template-rows: auto auto; column-gap: 9px; border: 1px solid var(--line); border-radius: 5px; background: rgba(245,245,242,.018); }
.collection-stats .ph { grid-row: 1 / 3; align-self: center; color: var(--eyebrow); font-size: 20px; }
.collection-stats strong { font-size: 13px; font-weight: 500; line-height: 1.25; }
.collection-stats span { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.collection-download-section { padding: 42px 0 48px; }
.collection-download-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, .7fr); gap: 34px; align-items: start; }
.collection-preview { min-height: 420px; overflow: hidden; border-radius: 5px; border: 1px solid var(--line); background: var(--panel); }
.collection-preview > img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.collection-preview-fallback { min-height: 420px; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--panel); color: var(--muted); font-size: 13px; }
.collection-preview-fallback[hidden] { display: none !important; }
.collection-download-panel { position: sticky; top: 96px; }
.collection-download-box { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.collection-download-box h3 { margin: 0; font-size: 21px; font-weight: 500; }
.collection-download-box > div > p:not(.panel-kicker) { margin: 10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.included-maps-section { padding: 42px 0 86px; border-top: 1px solid var(--line); }
.collection-map-grid { margin-top: 26px; }

@media (max-width: 980px) {
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-download-grid { grid-template-columns: 1fr; }
  .collection-download-panel { position: static; }
}
@media (max-width: 590px) {
  .collection-index-hero { padding: 38px 0 32px; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection-card-body > p:not(.panel-kicker) { min-height: 0; }
  .collection-detail-heading { padding: 34px 0 26px; }
  .collection-stats > div { min-width: calc(50% - 5px); }
  .collection-preview, .collection-preview > img, .collection-preview-fallback { min-height: 300px; }
  .collection-preview-fallback { text-align: center; }
}

/* V5.8 — manifest-only Foundry Theme install */
.collection-help-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 15px; color: var(--text); font-size: 12px; text-decoration: none; }
.collection-help-link:hover { text-decoration: underline; }
.manifest-private-note { display: flex; align-items: flex-start; gap: 7px; margin: 14px 0 0 !important; color: var(--muted-2) !important; font-size: 10px !important; line-height: 1.5 !important; }
.manifest-private-note .ph { margin-top: 1px; color: var(--eyebrow); font-size: 14px; }
.foundry-help-hero { padding: 54px 0 42px; border-bottom: 1px solid var(--line); }
.foundry-help-shell { max-width: 900px; }
.foundry-help-hero h1 { max-width: 760px; margin: 10px 0 14px; font-family: "Playfair Display", serif; font-size: clamp(42px, 6vw, 70px); line-height: .98; }
.foundry-help-hero > .shell > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.foundry-help-section { padding: 46px 0 90px; }
.foundry-help-steps { display: grid; gap: 12px; }
.foundry-help-steps article { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.foundry-help-steps article > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(191,168,130,.55); border-radius: 50%; color: var(--eyebrow); font-weight: 500; }
.foundry-help-steps h2, .foundry-help-note h2 { margin: 0; font-size: 18px; font-weight: 500; }
.foundry-help-steps p, .foundry-help-note p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.foundry-help-note { display: grid; grid-template-columns: 32px 1fr; gap: 14px; margin-top: 24px; padding: 20px; border: 1px solid rgba(191,168,130,.35); border-radius: 5px; background: rgba(191,168,130,.045); }
.foundry-help-note > .ph { color: var(--eyebrow); font-size: 24px; }
.foundry-help-note-private { margin-top: 12px; }


/* V8.1 — Single Foundry module version/readiness state */
.module-title-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.module-version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(191, 168, 130, .38);
  border-radius: 999px;
  color: var(--eyebrow);
  background: rgba(191, 168, 130, .06);
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
}

.module-version-badge[hidden] {
  display: none !important;
}

.download-group.module-unavailable .download-group-status {
  color: #777970;
}

.download-group.module-unavailable .manifest-private-note,
.download-group.module-unavailable .collection-help-link {
  display: none;
}


/* ==========================================
   V8.2 — MATCH FRAMER HEADER VERTICAL SPACING
   Framer main-site header uses 20px vertical padding.
   Keep the same 66x60 Map Doctor brand sizing and
   horizontal shell alignment; only normalize height.
   ========================================== */
@media (min-width: 821px) {
  .header-inner {
    min-height: 0;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}


/* ==========================================
   V8.3 — HEADER OPTICAL ALIGNMENT + INSTRUCTIONS
   Match the Framer header's visual spacing:
   - a little more breathing room after the logo
   - nav text sits slightly lower for optical centering
   - Instructions is a first-class nav item
   ========================================== */
@media (min-width: 1041px) {
  .main-nav {
    margin-left: 40px;
    gap: 26px;
    transform: translateY(5px);
  }
}

@media (min-width: 821px) and (max-width: 1040px) {
  .main-nav {
    margin-left: 10px;
    gap: 15px;
    transform: translateY(4px);
  }

  .main-nav a {
    font-size: 12px;
  }
}

/* Foundry Themes hero help link */
.collection-hero-instructions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}

.collection-hero-instructions .ph {
  color: var(--eyebrow);
  font-size: 16px;
}

.collection-hero-instructions:hover {
  text-decoration: underline;
}


/* ==========================================
   MAP DETAIL — ARCHIVE + VTT SIDEBAR LAYOUT
   Archive and VTT stay to the RIGHT of the map.
   Member Access spans the sidebar; below it,
   Map Downloads sits left of Foundry/UVTT.
   ========================================== */
@media (min-width: 1041px) {
  .page-map-detail .detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(560px, .92fr);
    gap: 30px;
    align-items: start;
  }

  .page-map-detail .download-panel {
    position: static;
    top: auto;
  }
}

.page-map-detail .map-delivery-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  padding-top: 0;
  border-top: 0;
  min-width: 0;
  align-items: start;
}

.page-map-detail .map-delivery-column {
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: start;
}

.page-map-detail .map-delivery-column > .download-group {
  margin-top: 0;
  padding: 24px;
  border: 1px solid rgba(245,245,242,.16);
  border-radius: 22px;
  background: rgba(15,16,12,.62);
  min-width: 0;
}

.page-map-detail .map-delivery-column-vtt > .download-group + .download-group {
  margin-top: 0;
}

.page-map-detail #archive-download-list,
.page-map-detail #variant-list {
  min-width: 0;
}

.page-map-detail #archive-download-list .content-archive-section:first-child {
  margin-top: 0 !important;
}

.page-map-detail .download-row {
  min-width: 0;
}

.page-map-detail .download-row > span:first-child {
  min-width: 0;
}

.page-map-detail .download-row strong,
.page-map-detail .download-row small {
  overflow-wrap: anywhere;
}

/* When the page itself has already collapsed to one column, keep archive and
   VTT side-by-side while there is still enough room. */
@media (max-width: 1040px) and (min-width: 701px) {
  .page-map-detail .map-delivery-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .page-map-detail .map-delivery-columns {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   V9 — MAP DOCTOR LIBRARY HOMEPAGE HERO
   Full-width artwork with left-side copy overlay,
   matching the public Map Doctor homepage direction.
   ========================================== */
.page-library-home .library-hero {
  padding: 24px 0 28px;
}























@media (max-width: 820px) {
  .page-library-home .library-hero {
    padding: 18px 0 24px;
  }

  

  

  

  

  
}




/* V9.1 — Desktop brand-name optical alignment.
   The wordmark sits a few pixels low relative to the logo/nav centerline. */
@media (min-width: 821px) {
  .site-header .brand-name {
    transform: translateY(4px);
  }
}


/* ============================================================
   V10 — unified public staging shell
   ============================================================ */
.page-public-home main { display:block; }

.public-hero {
  position: relative;
  min-height: 385px;
  aspect-ratio: 1200 / 385;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #171914;
}
.public-hero-art {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  filter:saturate(.88) brightness(.78);
}

.public-hero-copy {
  position:relative; z-index:2; width:min(620px, 70%);
  padding:72px 56px;
}
.public-hero-copy h1{
  margin: 10px 0 20px;
  font-family:"Playfair Display", Georgia, serif;
  font-size:clamp(48px,5vw,76px);
  line-height:.98;
  letter-spacing:-.035em;
}
.public-hero-copy > p:not(.eyebrow) {
  max-width:540px; margin:0 0 28px; color:#dddcd5; font-size:17px;
}
.public-catalog { padding-top: 22px; padding-bottom: 72px; }
.public-toolbar {
  display:flex; align-items:center; gap:14px; justify-content:space-between; margin-bottom:18px;
}
.public-pills {
  display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; padding:2px 0;
}
.public-pills::-webkit-scrollbar { display:none; }
.public-pill {
  flex:0 0 auto; min-height:34px; padding:0 14px; border-radius:999px;
  border:1px solid var(--line); background:#171914; color:#c5c4bd;
  font-size:12px; cursor:pointer;
}
.public-pill.active { background:#b07a25; border-color:#b07a25; color:#fff; }
.public-search { width:min(270px, 30vw); flex:0 0 auto; }
.public-map-grid {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px;
}
.public-map-card {
  min-width:0; border:1px solid var(--line); background:#0b0c0a; overflow:hidden;
}
.public-map-image {
  display:block; aspect-ratio:1/1; background:#171914; overflow:hidden;
}
.public-map-image img {
  width:100%; height:100%; object-fit:cover; transition:transform .22s ease, filter .22s ease;
}
.public-map-card:hover .public-map-image img { transform:scale(1.015); filter:brightness(1.06); }
.public-map-meta {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  min-height:42px; padding:7px 8px 8px; font-size:11px; color:#8f9088;
}
.public-map-name {
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#f2f2ed; font-weight:500;
}
.public-support {
  position:relative; min-height:300px; margin-bottom:44px; padding:42px;
  overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-lg);
  background:#171914;
}
.public-support-art {
  position:absolute; inset:0;
  background:
    linear-gradient(90deg,rgba(10,11,8,.95),rgba(10,11,8,.66),rgba(10,11,8,.42)),
    url("/FooterBanner.webp") center/cover;
  opacity:.82;
}
.public-support-copy { position:relative; z-index:2; max-width:600px; }
.public-support-copy h2 { font-family:"Playfair Display",Georgia,serif; font-size:38px; margin:8px 0 10px; }
.public-support-copy p:not(.eyebrow) { color:#d0d0c9; max-width:560px; }
.public-benefits {
  position:absolute; right:38px; bottom:34px; z-index:2;
  display:grid; grid-template-columns:repeat(2,minmax(0,170px)); gap:10px 18px;
}
.public-benefits span { display:flex; gap:8px; align-items:center; font-size:12px; color:#deddd6; }
.public-benefits i { font-size:18px; color:var(--eyebrow); }
.public-list-page { padding-top:54px; padding-bottom:80px; }



.public-footer { margin-top:0; }

@media (max-width: 900px) {
  .public-map-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .public-benefits { position:relative; right:auto; bottom:auto; margin-top:28px; }
}
@media (max-width: 700px) {
  .public-hero { min-height:560px; margin-top:18px; }
  
  .public-hero-copy { width:100%; padding:220px 26px 30px; }
  .public-hero-copy h1 { font-size:48px; }
  .public-toolbar { align-items:stretch; flex-direction:column; }
  .public-search { width:100%; }
  .public-map-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .public-map-meta { font-size:10px; }
  .public-support { padding:30px 24px; }
  .public-support-copy h2 { font-size:34px; }
  .public-benefits { grid-template-columns:1fr 1fr; }
}



/* ============================================================
   V10.2 — homepage refinement pass
   ============================================================ */

/* Hero artwork is already authored with dark text-safe areas. */
.page-public-home .public-hero-art {
  filter: none;
}



.page-public-home .public-hero-copy {
  width: min(740px, 68%);
  padding: 58px 56px;
}

.page-public-home .public-hero-copy h1 {
  max-width: 690px;
  margin: 10px 0 16px;
  font-size: clamp(46px, 4.2vw, 64px);
  line-height: .96;
  letter-spacing: -.032em;
}

.page-public-home .public-hero-copy > p:not(.eyebrow) {
  max-width: 540px;
  margin-bottom: 24px;
}

/* The supplied dragon banner already has contrast; keep only a light veil. */
.page-public-home .public-support-art {
  background:
    linear-gradient(90deg, rgba(10,11,8,.50), rgba(10,11,8,.24) 55%, rgba(10,11,8,.12)),
    url("/FooterBanner.webp") center / cover;
  opacity: 1;
}

/* Map cards: stronger frame and vertically stacked title / dimensions. */
.public-map-card {
  border: 1px solid rgba(245,245,242,.34);
  border-radius: 8px;
}

.public-map-image {
  border-bottom: 1px solid rgba(245,245,242,.20);
}

.public-map-meta {
  min-height: 54px;
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.public-map-name {
  width: 100%;
  color: #f5f5f2;
  font-size: 12px;
  line-height: 1.25;
}

.public-map-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #898b82;
  font-size: 10px;
  line-height: 1.2;
}

.public-map-dot {
  opacity: .7;
}

/* True progressive browser on the homepage. */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

#home-load-more[hidden] {
  display: none;
}

/* Smooth Back to Top button, kept out of the way until the user scrolls. */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(245,245,242,.18);
  border-radius: 999px;
  background: rgba(18,19,16,.92);
  color: #d8d8d2;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease, border-color .18s ease;
}

.back-to-top:hover {
  color: #fff;
  border-color: rgba(245,245,242,.38);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top i {
  font-size: 14px;
}

.back-to-top span {
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .page-public-home .public-hero-copy {
    width: 100%;
    padding: 220px 26px 30px;
  }

  .page-public-home .public-hero-copy h1 {
    max-width: 520px;
    font-size: 46px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }

  .back-to-top span {
    display: none;
  }

  .back-to-top {
    width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }
}


/* ============================================================
   V10.3 — public content pages: Free Maps / All Maps / Membership / About
   ============================================================ */


/* Complete text index */
.all-maps-page {
  padding-top: 54px;
  padding-bottom: 88px;
}

.all-maps-heading {
  margin-bottom: 42px;
}

.all-maps-heading h1 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -.035em;
}

.all-maps-heading p {
  margin: 0;
  color: #d2d2cc;
  font-size: 14px;
}

.all-maps-index-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 42px;
  align-items: start;
}

.all-maps-column {
  min-width: 0;
}

.all-maps-group + .all-maps-group {
  margin-top: 28px;
}

.all-maps-group h2 {
  margin: 0 0 11px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  color: #f4f4ef;
}

.all-maps-links {
  display: grid;
  gap: 5px;
}

.all-maps-links a {
  color: #c98c19;
  font-size: 11px;
  line-height: 1.32;
  transition: color .15s ease, transform .15s ease;
}

.all-maps-links a:hover {
  color: #efb64b;
  transform: translateX(2px);
}

.all-maps-back-top {
  opacity: 0;
  visibility: hidden;
}

.page-all-maps .all-maps-back-top {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Membership */
.membership-page {
  padding-top: 58px;
  padding-bottom: 86px;
}

.membership-heading {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.membership-heading h1 {
  margin: 8px 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -.035em;
}

.membership-heading > p:not(.eyebrow) {
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  max-width: 620px;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.tier-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(245,245,242,.16);
  border-radius: 18px;
  background: rgba(18,19,16,.78);
  display: flex;
  flex-direction: column;
}

.tier-card-featured {
  border-color: rgba(198,139,45,.82);
  box-shadow: inset 0 0 0 1px rgba(198,139,45,.26);
}

.tier-ribbon {
  margin: -26px -26px 24px;
  padding: 8px 12px;
  border-radius: 17px 17px 0 0;
  background: #8e5b16;
  color: white;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
}

.tier-card h2 {
  margin: 0;
  font-size: 25px;
}

.tier-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 5px 0 14px;
}

.tier-price strong {
  font-size: 32px;
  line-height: 1;
}

.tier-price span {
  color: var(--muted);
  font-size: 13px;
}

.tier-card-head p {
  min-height: 52px;
  margin: 0;
  color: #d7d6d0;
  font-size: 14px;
}

.tier-join {
  width: 100%;
  margin: 18px 0 14px;
  border-radius: 9px;
  background: #9a6116;
  color: white;
}

.tier-join:hover {
  background: #ab6d1a;
}

.tier-plus {
  margin: 2px 0 7px;
  color: #d6d5ce;
  font-size: 13px;
}

.tier-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #d5d5cf;
  font-size: 13px;
  line-height: 1.45;
}

.tier-card li + li {
  margin-top: 5px;
}

.tier-note {
  color: var(--muted);
  font-style: italic;
}

.membership-footnote {
  max-width: 780px;
  margin: 28px auto 0;
  color: var(--muted-2);
  text-align: center;
  font-size: 11px;
}

/* About */
.about-hero {
  min-height: 520px;
  padding-top: 70px;
  padding-bottom: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 70px;
  align-items: center;
}

.about-hero-copy h1 {
  margin: 8px 0 20px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(56px, 6vw, 82px);
  line-height: .96;
  letter-spacing: -.04em;
}

.about-lead {
  max-width: 690px;
  margin: 0;
  color: #d1d1ca;
  font-size: 18px;
  line-height: 1.65;
}

.about-hero .hero-actions {
  margin-top: 28px;
}

.about-mark-wrap {
  display: grid;
  place-items: center;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 45%, rgba(191,168,130,.13), transparent 54%),
    rgba(15,16,13,.62);
}

.about-mark {
  width: min(250px, 70%);
  filter: drop-shadow(0 22px 34px rgba(0,0,0,.32));
}

.about-values {
  padding-top: 24px;
  padding-bottom: 70px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}

.about-value-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18,19,16,.62);
}

.about-value-card i {
  font-size: 28px;
  color: var(--eyebrow);
}

.about-value-card h2 {
  margin: 16px 0 8px;
  font-size: 19px;
}

.about-value-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.about-story {
  margin-bottom: 70px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18,19,16,.64);
}

.about-story-copy {
  padding: 44px;
}

.about-story-copy h2 {
  max-width: 620px;
  margin: 8px 0 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -.025em;
}

.about-story-copy p:not(.eyebrow) {
  color: #c8c8c1;
  font-size: 14px;
}

.about-signoff {
  margin-top: 26px !important;
  color: #eeeDE8 !important;
}

.about-story-art {
  min-height: 440px;
}

.about-story-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-cta {
  margin-bottom: 70px;
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15,16,13,.58);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.about-cta h2 {
  margin: 6px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
}

.about-cta .hero-actions {
  margin: 0;
  justify-content: flex-end;
}

/* The expanded desktop nav needs a little more room before it collapses. */
@media (max-width: 1160px) {
  .main-nav,
  .header-inner > .button-compact {
    display: none;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .all-maps-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .membership-grid {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin-inline: auto;
  }

  .tier-card-head p {
    min-height: 0;
  }

  .about-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-mark-wrap {
    min-height: 270px;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .about-story {
    grid-template-columns: 1fr;
  }

  .about-story-art {
    min-height: 300px;
  }

  .about-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-cta .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .all-maps-index-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px 22px;
  }

  .all-maps-links a {
    font-size: 10.5px;
  }

  .about-hero {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .about-hero-copy h1 {
    font-size: 52px;
  }

  .about-lead {
    font-size: 16px;
  }

  .about-story-copy {
    padding: 28px 24px;
  }

  .about-cta {
    padding: 28px 24px;
  }

  .about-cta .hero-actions,
  .about-cta .hero-actions .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .all-maps-index-grid {
    grid-template-columns: 1fr;
  }
}



/* ============================================================
   V10.5 — canonical public + member map page
   ============================================================ */

.page-map-detail .detail-heading {
  padding-bottom: 24px;
}

.page-map-detail .map-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.page-map-detail .map-public-actions[hidden],
.page-map-detail .map-public-action[hidden] {
  display: none !important;
}

.page-map-detail .map-public-action {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245,245,242,.18);
  border-radius: 9px;
  background: rgba(18,19,16,.70);
  color: #deded7;
  font-size: 11px;
  font-weight: 600;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.page-map-detail .map-public-action:hover {
  border-color: rgba(245,245,242,.38);
  background: rgba(29,31,25,.86);
  color: #fff;
  transform: translateY(-1px);
}

.page-map-detail .map-public-action i {
  font-size: 15px;
}

.page-map-detail .map-public-action img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.page-map-detail .map-public-action-patreon {
  border-color: rgba(255,255,255,.16);
  background: #000;
  color: #fff;
}

.page-map-detail .map-about {
  margin-top: 26px;
  margin-bottom: 0;
  padding: 34px 38px;
  display: grid;
  grid-template-columns: minmax(220px,.42fr) minmax(0,1fr);
  gap: 42px;
  align-items: start;
  border: 1px solid rgba(245,245,242,.14);
  border-radius: 22px;
  background: rgba(15,16,12,.56);
}

.page-map-detail .map-about[hidden] {
  display: none !important;
}

.page-map-detail .map-about-heading h2 {
  margin: 7px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(32px,3vw,46px);
  line-height: 1;
  letter-spacing: -.025em;
}

.page-map-detail .map-about-copy {
  max-width: 760px;
  color: #c9c9c2;
  font-size: 14px;
  line-height: 1.7;
}

.page-map-detail .map-about-copy p {
  margin: 0;
}

.page-map-detail .map-about-copy p + p {
  margin-top: 13px;
}

.page-map-detail .map-about-copy strong {
  color: #eeeeea;
}

.page-map-detail .map-about-copy em {
  color: #deddd7;
}

@media (max-width: 760px) {
  .page-map-detail .map-public-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .page-map-detail .map-public-action {
    justify-content: center;
  }

  .page-map-detail .map-about {
    padding: 28px 24px;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 460px) {
  .page-map-detail .map-public-actions {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   V10.6 — final map-page visual structure pass
   ============================================================ */

/* 1) Public actions should read as first-class actions, not tiny tags. */
.page-map-detail .map-public-actions {
  gap: 10px;
  margin-top: 20px;
}

.page-map-detail .map-public-action {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border-color: rgba(245,245,242,.18);
  background: rgba(20,21,17,.86);
}

.page-map-detail .map-public-action i,
.page-map-detail .map-public-action img {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.page-map-detail .map-public-action-patreon {
  background: #ff6757;
  border-color: #ff6757;
  color: #fff;
}

.page-map-detail .map-public-action-patreon:hover {
  background: #ff7466;
  border-color: #ff7466;
}

.page-map-detail .map-public-action-free {
  background: #f3f2ed;
  border-color: #f3f2ed;
  color: #151611;
}

.page-map-detail .map-public-action-free:hover {
  background: #fff;
  border-color: #fff;
  color: #11120f;
}

/* 2 + 4) Give Member Access a lighter shell so the black delivery cards pop. */
.page-map-detail .download-panel {
  background: #1b1d18;
  border-color: rgba(245,245,242,.18);
}

.page-map-detail .map-delivery-column > .download-group {
  background: #0f100d;
  border-color: rgba(245,245,242,.17);
}

/* Matching "Not Available Yet" treatment for Foundry + UVTT only. */
.page-map-detail .download-group.module-unavailable .button:disabled {
  opacity: 1;
  background: #a7aaa4;
  border-color: #a7aaa4;
  color: #171813;
}

.page-map-detail .download-group.module-unavailable .button:disabled .ph {
  color: #171813;
}

/* 3) Keep the UVTT bundle button on one line. */
.page-map-detail #uvtt-bundle-button {
  min-height: 42px;
  padding-left: 12px;
  padding-right: 12px;
  gap: 7px;
  font-size: 11px;
  white-space: nowrap;
}

/* 5) Accordion headings read as compact controls rather than plain text. */
.page-map-detail .download-accordion-summary {
  min-height: 38px;
  padding: 8px 12px;
  margin: 4px 0;
  border: 1px solid rgba(245,245,242,.14);
  border-radius: 999px;
  background: rgba(245,245,242,.035);
}

.page-map-detail .download-accordion-summary:hover {
  border-color: rgba(245,245,242,.28);
  background: rgba(245,245,242,.06);
}

.page-map-detail .download-accordion-count {
  color: #c9aa76;
}

.page-map-detail .download-accordion-chevron {
  color: #d5c19d;
}

/* Adventure hook gets slightly warmer editorial treatment. */
.page-map-detail .map-about {
  background: #141611;
  border-color: rgba(245,245,242,.16);
}

/* 6) Replace the old split details area with a member-panel style spec box. */
.page-map-detail .detail-info {
  padding: 30px 0 72px;
  border-top: 0;
  background: transparent;
}

.page-map-detail .map-spec-panel {
  padding: 28px;
  border: 1px solid rgba(245,245,242,.18);
  border-radius: 24px;
  background: #1b1d18;
}

.page-map-detail .map-spec-heading {
  margin-bottom: 18px;
}

.page-map-detail .map-spec-heading h2 {
  margin: 6px 0 0;
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 25px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.02em;
}

.page-map-detail .technical-details-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}

.page-map-detail .technical-details-panel h3 {
  display: none;
}

.page-map-detail .technical-detail-row {
  min-height: 108px;
  padding: 16px 17px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(245,245,242,.15);
  border-radius: 16px;
  background: #0f100d;
}

.page-map-detail .technical-detail-label {
  gap: 9px;
  color: #aaa99f;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-map-detail .technical-detail-label .ph {
  width: 18px;
  flex-basis: 18px;
  color: #c7a66f;
  font-size: 18px;
}

.page-map-detail .technical-detail-value {
  width: 100%;
  text-align: left;
  color: #f5f5f2;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .page-map-detail .technical-details-panel {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 560px) {
  .page-map-detail .map-spec-panel {
    padding: 22px;
  }

  .page-map-detail .technical-details-panel {
    grid-template-columns: 1fr;
  }

  .page-map-detail .technical-detail-row {
    min-height: 88px;
  }

  .page-map-detail #uvtt-bundle-button {
    font-size: 10.5px;
  }
}


/* ============================================================
   V10.7 — header/nav, map detail polish, and homepage mobile pass
   ============================================================ */

/* Header / mobile nav */
.mobile-nav a.js-patreon-connect {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav .patreon-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

@media (max-width: 820px) {
  .brand-name {
    font-family: "Basteleur", Georgia, serif;
    font-size: 24px;
    letter-spacing: -.035em;
  }
}

/* Homepage */
.page-public-home .public-hero {
  border-radius: 5px;
}

.page-public-home .public-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(6,7,5,.20), rgba(6,7,5,0) 48%, rgba(6,7,5,.18));
}

.page-public-home .public-support::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 30%, rgba(0,0,0,.18) 100%);
}

@media (max-width: 700px) {
  .page-public-home .public-hero {
    min-height: 500px;
    margin-top: 18px;
  }

  .page-public-home .public-hero-art {
    object-position: center center;
  }

  .page-public-home .public-hero::after {
    background:
      linear-gradient(180deg, rgba(9,10,7,.14) 0%, rgba(9,10,7,.05) 22%, rgba(9,10,7,.42) 55%, rgba(9,10,7,.72) 100%),
      radial-gradient(circle at 50% 25%, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,.28) 100%);
  }

  .page-public-home .public-hero-copy {
    padding: 170px 24px 28px;
  }

  .page-public-home .public-hero-copy .eyebrow {
    font-size: 12px;
    letter-spacing: .14em;
    color: rgba(191,168,130,.96);
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
  }

  .page-public-home .public-hero-copy h1 {
    font-size: 44px;
  }

  .page-public-home .public-support {
    padding: 28px 22px;
  }

  .page-public-home .public-support-art {
    background:
      linear-gradient(180deg, rgba(10,11,8,.48), rgba(10,11,8,.20) 38%, rgba(10,11,8,.56) 100%),
      url("/FooterBanner.webp") center / cover;
  }
}

/* Map detail */
.page-map-detail .detail-meta {
  gap: 11px;
  font-size: 15px;
}

.page-map-detail .detail-meta > span:not(:first-child):not(:last-child) {
  opacity: .75;
}

.page-map-detail .detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.page-map-detail .detail-tags[hidden] {
  display: none !important;
}

.page-map-detail .detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(191,168,130,.28);
  border-radius: 999px;
  background: rgba(191,168,130,.06);
  color: #d7c29e;
  font-size: 12px;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.page-map-detail .detail-tag:hover {
  border-color: rgba(191,168,130,.52);
  background: rgba(191,168,130,.12);
  color: #f1ddbc;
}

.page-map-detail .map-public-action {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: 13px;
}

.page-map-detail .map-public-action-patreon,
.page-map-detail .map-public-action-free,
.page-map-detail .map-public-action-roll20,
.page-map-detail .map-public-action-dtrpg {
  color: #fff;
}

.page-map-detail .map-public-action-free {
  color: #151611;
}

.page-map-detail .map-public-action-roll20 {
  background: #FF20A4;
  border-color: #FF20A4;
}

.page-map-detail .map-public-action-roll20:hover {
  background: #ff4cb6;
  border-color: #ff4cb6;
}

.page-map-detail .map-public-action-dtrpg {
  background: #9B5831;
  border-color: #9B5831;
}

.page-map-detail .map-public-action-dtrpg:hover {
  background: #ad6841;
  border-color: #ad6841;
}

.page-map-detail .download-group.module-unavailable .button:disabled {
  opacity: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-map-detail #uvtt-bundle-button,
.page-map-detail #foundry-manifest-button {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.page-map-detail #uvtt-bundle-button {
  min-height: 46px;
  gap: 8px;
  font-size: 12px;
}

.page-map-detail #uvtt-bundle-button .ph,
.page-map-detail #foundry-manifest-button .ph {
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.page-map-detail .download-accordion-summary {
  border-radius: 5px;
  font-size: 12px;
}

.page-map-detail .download-accordion-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.page-map-detail .download-accordion-count {
  margin-left: 0;
  font-size: 10px;
  white-space: nowrap;
}

.page-map-detail .map-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.page-map-detail .map-pagination[hidden] {
  display: none !important;
}

.page-map-detail .map-pagination-link,
.page-map-detail .map-pagination-spacer {
  min-height: 72px;
  padding: 13px 15px;
  border: 1px solid rgba(245,245,242,.14);
  border-radius: 12px;
  background: rgba(16,17,14,.42);
}

.page-map-detail .map-pagination-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.page-map-detail .map-pagination-link:hover {
  border-color: rgba(245,245,242,.26);
  background: rgba(18,19,16,.72);
  transform: translateY(-1px);
}

.page-map-detail .map-pagination-link.is-next {
  text-align: right;
}

.page-map-detail .map-pagination-kicker {
  color: #bfa882;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-map-detail .map-pagination-link strong {
  color: #f5f5f2;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

@media (max-width: 1040px) {
  .page-map-detail .download-panel {
    width: 100%;
    min-width: 0;
    padding: 20px;
  }

  .page-map-detail .map-delivery-columns,
  .page-map-detail .map-delivery-column,
  .page-map-detail .map-delivery-column > .download-group {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .page-map-detail .detail-title {
    font-size: clamp(42px, 12vw, 64px);
  }

  .page-map-detail .detail-meta {
    font-size: 16px;
  }

  .page-map-detail .detail-preview {
    border-radius: 16px;
  }

  .page-map-detail .detail-preview img {
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    margin-inline: auto;
  }

  .page-map-detail .variant-thumb {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
  }

  .page-map-detail .map-public-actions {
    grid-template-columns: 1fr;
  }

  .page-map-detail .map-public-action {
    width: 100%;
    justify-content: center;
  }

  .page-map-detail .map-delivery-columns {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .page-map-detail .map-delivery-column > .download-group {
    padding: 20px;
    border-radius: 18px;
  }

  .page-map-detail .download-row {
    min-height: 56px;
    padding: 10px 11px;
  }

  .page-map-detail .download-row strong {
    font-size: 13px;
    line-height: 1.28;
  }

  .page-map-detail .download-row small {
    font-size: 10px;
    line-height: 1.25;
  }

  .page-map-detail .map-pagination {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   V10.8 — corrective map-detail/mobile pass + real Basteleur hook
   ============================================================ */

/* The supplied brand font now has a real webfont target. */
.brand-name,
.footer-brand .brand-name {
  font-family: "Basteleur", Georgia, serif;
  font-weight: 700;
}

/* External SVGs are authored white; keep their presentation crisp. */
.page-map-detail .map-public-action-roll20 img,
.page-map-detail .map-public-action-dtrpg img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Preview variants become a deliberate component rather than a loose strip. */
.page-map-detail .variant-preview-panel {
  margin-top: 16px;
  padding: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(245,245,242,.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(191,168,130,.055), rgba(191,168,130,.015)),
    rgba(12,13,10,.62);
}

.page-map-detail .variant-preview-panel[hidden] {
  display: none !important;
}

.page-map-detail .variant-preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,245,242,.09);
}

.page-map-detail .variant-preview-kicker {
  flex: 0 0 auto;
  color: #bfa882;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-map-detail .variant-preview-label {
  min-height: 0;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: #f4f4ef;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-map-detail .variant-preview-strip {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 1px 1px 3px;
  gap: 9px;
}

.page-map-detail .variant-thumb {
  border-radius: 6px;
}

/* Foundry + UVTT unavailable controls use one exact size/typography definition. */
.page-map-detail .download-group.module-unavailable #foundry-manifest-button,
.page-map-detail .download-group.module-unavailable #uvtt-bundle-button {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.page-map-detail .download-group.module-unavailable #foundry-manifest-button .ph,
.page-map-detail .download-group.module-unavailable #uvtt-bundle-button .ph {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
}

/* Prevent intrinsic map/variant/sidebar widths from widening the mobile page. */
.page-map-detail,
.page-map-detail #detail-app,
.page-map-detail .detail-content,
.page-map-detail .detail-grid,
.page-map-detail .detail-grid > *,
.page-map-detail .download-panel,
.page-map-detail .map-delivery-columns,
.page-map-detail .map-delivery-column,
.page-map-detail .map-delivery-column > .download-group,
.page-map-detail .access-state,
.page-map-detail .access-state > *,
.page-map-detail .download-group-heading,
.page-map-detail .download-group-heading > *,
.page-map-detail .variant-list,
.page-map-detail .download-row,
.page-map-detail .download-row > span:first-child {
  min-width: 0;
  max-width: 100%;
}

.page-map-detail .detail-grid > div,
.page-map-detail .download-panel {
  width: 100%;
}

.page-map-detail .detail-preview {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 700px) {
  html,
  body.page-map-detail {
    overflow-x: clip;
  }

  .page-map-detail .shell {
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
  }

  .page-map-detail .detail-grid {
    display: block;
    width: 100%;
  }

  .page-map-detail .detail-preview img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .page-map-detail .variant-preview-panel {
    padding: 12px;
  }

  .page-map-detail .variant-preview-heading {
    align-items: flex-start;
  }

  .page-map-detail .variant-preview-label {
    max-width: 58%;
    font-size: 11px;
  }

  /* No horizontal thumbnail rail on phones: variants wrap inside the card. */
  .page-map-detail .variant-preview-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .page-map-detail .variant-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-width: 0;
  }

  .page-map-detail .download-panel {
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
    padding: 16px;
    overflow: hidden;
    border-radius: 16px;
  }

  .page-map-detail .access-state {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .page-map-detail .access-icon {
    width: 40px;
    height: 40px;
  }

  .page-map-detail .access-state h2,
  .page-map-detail .access-state p,
  .page-map-detail .download-group h3,
  .page-map-detail .download-group > p,
  .page-map-detail .download-row strong,
  .page-map-detail .download-row small {
    overflow-wrap: anywhere;
  }

  .page-map-detail .map-delivery-columns,
  .page-map-detail .map-delivery-column {
    display: block;
    width: 100%;
  }

  .page-map-detail .map-delivery-column > .download-group,
  .page-map-detail .map-delivery-column-vtt > .download-group + .download-group {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
  }

  .page-map-detail .map-delivery-column:first-child > .download-group:first-child {
    margin-top: 0;
  }

  .page-map-detail .download-group-heading {
    align-items: flex-start;
  }

  .page-map-detail .download-group h3 {
    font-size: 22px;
  }

  .page-map-detail .button,
  .page-map-detail .download-row {
    max-width: 100%;
  }

  .page-map-detail .download-group.module-unavailable #foundry-manifest-button,
  .page-map-detail .download-group.module-unavailable #uvtt-bundle-button {
    height: 46px;
    min-height: 46px;
    padding-inline: 12px;
    font-size: 12.5px;
  }
}

@media (max-width: 430px) {
  .page-map-detail .variant-preview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ============================================================
   V10.10 — tier-lock normalization + homepage catalog stability
   ============================================================ */

/* Locked tier controls share one visual language; entitlement labels stay accurate. */
.page-map-detail .download-group.locked:not(.module-unavailable) #foundry-manifest-button:disabled,
.page-map-detail .download-group.locked:not(.module-unavailable) #uvtt-bundle-button:disabled {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  gap: 8px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: #151611;
  opacity: .52;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.page-map-detail .download-group.locked:not(.module-unavailable) #foundry-manifest-button:disabled .ph,
.page-map-detail .download-group.locked:not(.module-unavailable) #uvtt-bundle-button:disabled .ph {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #151611;
  font-size: 16px;
  line-height: 16px;
}

/* Reserve the homepage catalog footprint while the first API response arrives. */
.public-map-skeleton {
  pointer-events: none;
}

.public-map-skeleton .public-map-image {
  position: relative;
  background: #171914;
}

.public-map-skeleton .public-map-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 22%, rgba(245,245,242,.035) 42%, transparent 62%);
  transform: translateX(-100%);
  animation: mapdoctor-skeleton 1.4s ease-in-out infinite;
}

.public-map-skeleton .public-map-meta span,
.public-map-skeleton .public-map-meta small {
  display: block;
  border-radius: 999px;
  background: rgba(245,245,242,.075);
}

.public-map-skeleton .public-map-meta span {
  width: 68%;
  height: 10px;
}

.public-map-skeleton .public-map-meta small {
  width: 42%;
  height: 7px;
  margin-top: 5px;
}

@keyframes mapdoctor-skeleton {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .public-map-skeleton .public-map-image::after {
    animation: none;
  }
}

/* ============================================================
   V10.11 — explicit logged-out tier lock parity
   ============================================================ */
.page-map-detail .download-group.locked:not(.module-unavailable) #foundry-manifest-button:disabled,
.page-map-detail .download-group.locked:not(.module-unavailable) #uvtt-bundle-button:disabled {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #9da09b;
  border-radius: 999px;
  background: #9da09b;
  color: #171813;
  opacity: 1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.page-map-detail .download-group.locked:not(.module-unavailable) #foundry-manifest-button:disabled .ph,
.page-map-detail .download-group.locked:not(.module-unavailable) #uvtt-bundle-button:disabled .ph {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #171813;
  font-size: 16px;
  line-height: 16px;
}


/* ============================================================
   V10.12 — warm light theme + header theme toggle
   Dark remains the Map Doctor baseline; light is a warm paper palette.
   ============================================================ */

.theme-toggle {
  width: 39px;
  height: 39px;
  min-width: 39px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 39px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(245,245,242,.025);
  color: var(--text);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(245,245,242,.34);
  background: rgba(245,245,242,.055);
}

.theme-toggle .theme-icon {
  grid-area: 1 / 1;
  font-size: 18px;
  line-height: 1;
}

html[data-theme="dark"] .theme-icon-dark,
html[data-theme="light"] .theme-icon-light {
  display: none;
}

@media (max-width: 1160px) {
  .header-inner {
    gap: 14px;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .mobile-menu {
    margin-left: 0;
  }
}

html[data-theme="light"] {
  --bg: #F2EADF;
  --bg-deep: #E7DDCF;
  --panel: #FBF7EF;
  --text: #29231C;
  --muted: #6E675D;
  --muted-2: #8A8175;
  --eyebrow: #8B6838;
  --line: rgba(67, 55, 40, .14);
  --line-strong: rgba(67, 55, 40, .24);
  --accent-soft: rgba(139, 104, 56, .09);
  --accent-line: rgba(139, 104, 56, .30);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 50% -12%, rgba(139,104,56,.08), transparent 34rem),
    var(--bg);
}

html[data-theme="light"] .site-header {
  border-bottom-color: rgba(67,55,40,.12);
  background: rgba(247, 241, 231, .92);
}

html[data-theme="light"] .main-nav a {
  color: #665E54;
}

html[data-theme="light"] .main-nav a:hover,
html[data-theme="light"] .main-nav a.active {
  color: var(--text);
}

html[data-theme="light"] .mobile-nav.is-open {
  border-top-color: var(--line);
  background: rgba(247,241,231,.98);
}

html[data-theme="light"] .theme-toggle {
  background: rgba(255,255,255,.44);
  border-color: rgba(67,55,40,.20);
  color: #3D342A;
}

html[data-theme="light"] .theme-toggle:hover {
  background: rgba(255,255,255,.72);
  border-color: rgba(67,55,40,.34);
}

html[data-theme="light"] .button-primary {
  background: #2D271F;
  color: #FFFDF8;
}

html[data-theme="light"] .button-primary:hover {
  background: #17130F;
}

html[data-theme="light"] .button-secondary:hover {
  border-color: rgba(67,55,40,.36);
  background: rgba(67,55,40,.045);
}

html[data-theme="light"] .pill,
html[data-theme="light"] .subfilter {
  color: #746C61;
}

html[data-theme="light"] .pill.active {
  background: rgba(67,55,40,.075);
}

html[data-theme="light"] .search-box input {
  background: #FFF9F0;
}

html[data-theme="light"] .search-box input::placeholder {
  color: #968C7F;
}

html[data-theme="light"] .library-toolbar {
  background: rgba(255,255,255,.24);
}

html[data-theme="light"] .map-title-row p,
html[data-theme="light"] .public-map-details,
html[data-theme="light"] .collection-card-meta,
html[data-theme="light"] .footer-links,
html[data-theme="light"] .footer-bottom,
html[data-theme="light"] .back-link,
html[data-theme="light"] .detail-meta {
  color: #756D62;
}

html[data-theme="light"] .map-card,
html[data-theme="light"] .public-map-card {
  border-color: rgba(67,55,40,.22);
  background: #FBF7EF;
}

html[data-theme="light"] .public-map-image,
html[data-theme="light"] .public-map-skeleton .public-map-image {
  background: #E8DED0;
}

html[data-theme="light"] .public-map-name {
  color: var(--text);
}

html[data-theme="light"] .public-pill {
  border-color: var(--line);
  background: #FBF7EF;
  color: #665F55;
}

html[data-theme="light"] .public-pill.active {
  background: #9B6D28;
  border-color: #9B6D28;
  color: #fff;
}

/* Image-led areas retain light text in both themes. */
html[data-theme="light"] .page-public-home .public-hero-copy h1,
html[data-theme="light"] .page-public-home .public-hero-copy > p:not(.eyebrow),
html[data-theme="light"] .page-public-home .public-support-copy h2,
html[data-theme="light"] .page-public-home .public-support-copy > p:not(.eyebrow),
html[data-theme="light"] .page-public-home .public-benefits span {
  color: #F5F5F2;
}

html[data-theme="light"] .page-public-home .public-hero-copy .eyebrow,
html[data-theme="light"] .page-public-home .public-support-copy .eyebrow {
  color: #D8BE91;
}

html[data-theme="light"] .site-footer {
  background: var(--bg-deep);
}

html[data-theme="light"] .download-panel,
html[data-theme="light"] .page-map-detail .download-panel,
html[data-theme="light"] .page-map-detail .map-spec-panel {
  background: #F9F3E9;
  border-color: rgba(67,55,40,.18);
}

html[data-theme="light"] .page-map-detail .map-delivery-column > .download-group,
html[data-theme="light"] .page-map-detail .technical-detail-row,
html[data-theme="light"] .download-row {
  background: #FFF9F0;
  border-color: rgba(67,55,40,.16);
}

html[data-theme="light"] .download-row small,
html[data-theme="light"] .download-group.locked .download-accordion-summary,
html[data-theme="light"] .download-group.locked .download-accordion-count,
html[data-theme="light"] .download-group.locked .download-accordion-chevron {
  color: #898074;
}

html[data-theme="light"] .download-accordion-summary:hover {
  color: #17130F;
}

html[data-theme="light"] .page-map-detail .download-accordion-summary {
  background: rgba(67,55,40,.035);
  border-color: rgba(67,55,40,.14);
}

html[data-theme="light"] .page-map-detail .download-accordion-summary:hover {
  background: rgba(67,55,40,.065);
  border-color: rgba(67,55,40,.25);
}

html[data-theme="light"] .page-map-detail .map-about {
  background: #F7F0E5;
  border-color: rgba(67,55,40,.16);
}

html[data-theme="light"] .page-map-detail .map-about-copy,
html[data-theme="light"] .page-map-detail .map-about-copy strong,
html[data-theme="light"] .page-map-detail .map-about-copy em {
  color: #554C42;
}

html[data-theme="light"] .page-map-detail .technical-detail-label {
  color: #756D62;
}

html[data-theme="light"] .page-map-detail .technical-detail-value {
  color: #29231C;
}

html[data-theme="light"] .page-map-detail .map-pagination-link,
html[data-theme="light"] .page-map-detail .map-pagination-spacer {
  background: rgba(255,255,255,.32);
  border-color: rgba(67,55,40,.14);
}

html[data-theme="light"] .page-map-detail .map-pagination-link:hover {
  background: rgba(255,255,255,.68);
  border-color: rgba(67,55,40,.25);
}

html[data-theme="light"] .page-map-detail .map-pagination-link strong {
  color: var(--text);
}

html[data-theme="light"] .collection-card {
  background: rgba(255,255,255,.30);
}

html[data-theme="light"] .collection-card-fallback {
  background:
    radial-gradient(circle at 50% 20%, rgba(139,104,56,.13), transparent 55%),
    #EFE6D8;
}

html[data-theme="light"] .tier-card,
html[data-theme="light"] .about-value-card,
html[data-theme="light"] .about-story,
html[data-theme="light"] .about-cta,
html[data-theme="light"] .about-mark-wrap {
  background: rgba(255,255,255,.38);
  border-color: rgba(67,55,40,.16);
}

html[data-theme="light"] .tier-card-head p,
html[data-theme="light"] .tier-plus,
html[data-theme="light"] .tier-card ul,
html[data-theme="light"] .about-lead,
html[data-theme="light"] .about-story-copy p:not(.eyebrow) {
  color: #5F574D;
}

html[data-theme="light"] .about-signoff {
  color: #332C24 !important;
}

html[data-theme="light"] .back-to-top {
  border-color: rgba(67,55,40,.18);
  background: rgba(249,244,235,.94);
  color: #4A4238;
}

html[data-theme="light"] .back-to-top:hover {
  color: #17130F;
  border-color: rgba(67,55,40,.34);
}

html[data-theme="light"] .public-map-skeleton .public-map-image::after {
  background: linear-gradient(110deg, transparent 22%, rgba(67,55,40,.04) 42%, transparent 62%);
}

html[data-theme="light"] .public-map-skeleton .public-map-meta span,
html[data-theme="light"] .public-map-skeleton .public-map-meta small {
  background: rgba(67,55,40,.10);
}

/* ============================================================
   V10.9 — desktop header links stay on one line
   ============================================================ */
@media (min-width: 1161px) {
  .site-header .header-inner {
    gap: 20px;
  }

  .site-header .main-nav {
    margin-left: 20px;
    gap: 16px;
  }

  .site-header .main-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}


/* ============================================================
   V10.9 — v0.18.2 light-mode CTA/category polish
   ============================================================ */

/* The homepage hero is image-led in both themes, so its outline CTA must
   retain strong light-on-image contrast even when the global theme is light. */
.page-public-home .public-hero .button-secondary {
  color: #F5F5F2;
  border-color: rgba(245,245,242,.62);
  background: rgba(8,9,7,.20);
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
}

.page-public-home .public-hero .button-secondary:hover {
  color: #FFFFFF;
  border-color: rgba(255,255,255,.88);
  background: rgba(8,9,7,.36);
}

html[data-theme="light"] .page-public-home .public-hero .button-secondary,
html[data-theme="light"] .page-public-home .public-hero .button-secondary:hover {
  color: #FFFFFF;
}

/* Category headings should switch to dark ink on the parchment theme. */
html[data-theme="light"] .all-maps-group h2 {
  color: #211B16;
}

/* About CTA: one clean desktop row with only the two useful actions. */
.about-cta .hero-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}

.about-cta .hero-actions .button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .about-cta .hero-actions {
    flex-wrap: wrap;
  }
}

/* Crawler-readable map-page snapshot, visible until live catalog data hydrates.
   This uses public artwork and text only; never show protected downloads. */
.map-seo-snapshot {
  color: var(--text);
}
.map-seo-snapshot h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  margin: 8px 0 26px;
}
.map-seo-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, .62fr);
  align-items: start;
  gap: 28px;
}
.map-seo-snapshot .detail-preview img {
  display: block;
  max-width: 100%;
  height: auto;
}
.map-seo-snapshot-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.map-seo-snapshot-copy p { margin: 0 0 18px; }
.map-seo-snapshot-copy dl { margin: 14px 0 24px; }
.map-seo-snapshot-copy dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.map-seo-snapshot-copy dt { color: var(--muted-2); }
.map-seo-snapshot-copy dd { margin: 0; text-align: right; color: var(--text); }
.map-seo-snapshot-copy a { color: var(--text); text-decoration: underline; }
@media (max-width: 760px) {
  .map-seo-snapshot-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Indexable public Foundry collection overview (replaced by live collection UI).
   Only public map names and artwork are exposed; no protected manifest URLs. */
.collection-seo-snapshot {
  color: var(--text);
  padding-bottom: 48px;
}
.collection-seo-snapshot .back-link {
  display: inline-block;
  margin-bottom: 26px;
}
.collection-seo-snapshot h1 {
  margin: 8px 0 26px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}
.collection-seo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(240px, .62fr);
  gap: 28px;
  align-items: start;
}
.collection-seo-grid .detail-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.collection-seo-copy {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.collection-seo-copy p { margin: 0 0 20px; }
.collection-seo-copy a,
.collection-seo-included a { color: var(--text); text-decoration: underline; }
.collection-seo-included {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.collection-seo-included h2 {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 22px;
  margin: 0 0 18px;
}
.collection-seo-included ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.collection-seo-included a { font-size: 14px; line-height: 1.5; }
@media (max-width: 800px) {
  .collection-seo-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-seo-included ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .collection-seo-included ul { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 4: meaningful related battle maps and actual Foundry membership links.
   These links remain in the initial HTML, inside the real hydrated map page. */
.page-map-detail .map-related {
  padding-top: 30px;
  padding-bottom: 78px;
}
.page-map-detail .map-related[hidden],
.page-map-detail .map-related-collections[hidden] { display: none !important; }
.page-map-detail .map-related-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-map-detail .map-related-heading h2 {
  margin: 8px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(29px, 3.6vw, 43px);
  line-height: 1.14;
}
.page-map-detail .related-browse-all {
  color: var(--text);
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}
.page-map-detail .related-browse-all:hover { text-decoration: underline; }
.page-map-detail .related-map-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.page-map-detail .related-map-grid .map-card { min-width: 0; }
.page-map-detail .related-map-theme {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted-2);
  margin-top: 6px;
}
.page-map-detail .map-related-collections {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}
.page-map-detail .map-related-collections nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-map-detail .map-related-collections nav a {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 11px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
}
.page-map-detail .map-related-collections nav a:hover {
  border-color: var(--eyebrow);
}
@media (max-width: 960px) {
  .page-map-detail .related-map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .page-map-detail .map-related-heading { align-items: start; flex-direction: column; }
  .page-map-detail .related-map-grid { gap: 12px; }
  .page-map-detail .map-related { padding-top: 18px; padding-bottom: 54px; }
}


/* ============================================================
   V10.13 — brand-first About, accessible theme controls, and
   footer polish. Presentation only; no download/auth changes.
   ============================================================ */

/* ABOUT — a more deliberate editorial composition, without extra copy. */
.page-about .about-hero {
  min-height: 500px;
  padding-top: clamp(48px, 6vw, 76px);
  padding-bottom: clamp(44px, 5vw, 66px);
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: clamp(32px, 5vw, 78px);
}

.page-about .about-hero-copy h1 {
  max-width: 750px;
  margin: 14px 0 22px;
  font-size: clamp(54px, 6.1vw, 80px);
  line-height: .98;
  letter-spacing: -.045em;
}

.page-about .about-lead {
  max-width: 610px;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.7;
}

.page-about .about-mark-wrap {
  position: relative;
  isolation: isolate;
  min-height: 370px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(191,168,130,.13), transparent 58%),
    linear-gradient(135deg, rgba(191,168,130,.055), transparent 62%),
    #12140f;
  border: 1px solid rgba(191,168,130,.25);
}

.page-about .about-mark-wrap::before {
  content: "";
  position: absolute;
  width: min(77%, 300px);
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  border-radius: 50%;
  border: 1px solid rgba(191,168,130,.22);
  box-shadow: 0 0 0 28px rgba(191,168,130,.035), 0 0 0 64px rgba(191,168,130,.017);
  pointer-events: none;
}

.page-about .about-mark {
  position: relative;
  z-index: 1;
  width: min(275px, 68%);
  filter: drop-shadow(0 22px 24px rgba(0,0,0,.25));
}

.page-about .about-mark-stamp {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 6px 13px;
  border: 1px solid rgba(191,168,130,.32);
  border-radius: 999px;
  color: #e3c99b;
  background: rgba(13,14,11,.75);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  white-space: nowrap;
}

.page-about .about-values {
  gap: 16px;
  padding-top: 0;
  padding-bottom: clamp(48px, 6vw, 74px);
}

.page-about .about-value-card {
  position: relative;
  padding: 30px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(191,168,130,.055), rgba(18,19,16,.25) 65%);
  border-color: var(--line);
}

.page-about .about-value-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 46px;
  height: 2px;
  background: var(--eyebrow);
  opacity: .85;
}

.page-about .about-value-card i { display: inline-block; font-size: 29px; }
.page-about .about-value-card h2 { margin-top: 18px; font-size: 19px; letter-spacing: -.02em; }
.page-about .about-value-card p { font-size: 13.5px; line-height: 1.7; }

.page-about .about-story {
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, .94fr);
  margin-bottom: clamp(48px, 6vw, 70px);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(191,168,130,.05), transparent 55%), var(--panel);
}

.page-about .about-story-copy {
  padding: clamp(30px, 4vw, 54px);
}

.page-about .about-story-copy h2 {
  max-width: 590px;
  margin-top: 12px;
  margin-bottom: 24px;
  font-size: clamp(34px, 3.9vw, 52px);
  line-height: 1.06;
}

.page-about .about-story-copy p:not(.eyebrow) {
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.8;
}

.page-about .about-story-copy p:not(.eyebrow) + p:not(.eyebrow) {
  margin-top: 17px;
}

.page-about .about-story-copy .about-signoff {
  display: inline-block;
  margin-top: 18px !important;
  padding-top: 16px;
  border-top: 1px solid var(--accent-line);
  line-height: 1.7;
}

.page-about .about-story-art {
  position: relative;
  min-height: 470px;
  overflow: hidden;
}

.page-about .about-story-art img {
  object-position: center center;
}

.page-about .about-story-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(11,12,10,.12), transparent 26%);
}

.page-about .about-cta {
  position: relative;
  overflow: hidden;
  padding: 36px clamp(28px, 4vw, 46px);
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(191,168,130,.09), transparent 60%), var(--panel);
}

.page-about .about-cta h2 { max-width: 650px; line-height: 1.1; }

/* ABOUT — respect the paper theme rather than retaining dark panels. */
html[data-theme="light"] .page-about .about-mark-wrap {
  background:
    radial-gradient(ellipse at 50% 46%, rgba(170,120,48,.13), transparent 58%),
    linear-gradient(135deg, rgba(139,104,56,.07), transparent 62%),
    #eee4d4;
  border-color: rgba(92,66,31,.24);
}

html[data-theme="light"] .page-about .about-mark-wrap::before {
  border-color: rgba(139,104,56,.26);
  box-shadow: 0 0 0 28px rgba(139,104,56,.045), 0 0 0 64px rgba(139,104,56,.025);
}

html[data-theme="light"] .page-about .about-mark-stamp {
  background: #392d20;
  border-color: #392d20;
  color: #fff7e8;
}

html[data-theme="light"] .page-about .about-value-card {
  background: linear-gradient(160deg, #fffaf2, #f5ecdf);
  border-color: rgba(67,55,40,.18);
}

html[data-theme="light"] .page-about .about-story,
html[data-theme="light"] .page-about .about-cta {
  background: linear-gradient(135deg, rgba(139,104,56,.06), transparent 58%), #fbf6ed;
  border-color: rgba(67,55,40,.18);
}

/* LIGHT MODE — readable map tags and keyboard-visible focus. */
html[data-theme="light"] .page-map-detail .detail-tag {
  background: #eee1ce;
  border-color: #b89b73;
  color: #533915;
  font-weight: 500;
}

html[data-theme="light"] .page-map-detail .detail-tag:hover,
html[data-theme="light"] .page-map-detail .detail-tag:focus-visible {
  background: #ddc5a2;
  border-color: #8a632f;
  color: #2e2114;
}

.page-map-detail .detail-tag:focus-visible {
  outline: 2px solid var(--eyebrow);
  outline-offset: 3px;
}

/* LIGHT MODE — the same high-contrast action in both format cards.
   Disabled tier-lock/not-available controls intentionally retain their states. */
html[data-theme="light"] .page-map-detail #foundry-manifest-button:not(:disabled),
html[data-theme="light"] .page-map-detail #uvtt-bundle-button:not(:disabled) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #29231c;
  border-radius: 999px;
  background: #29231c;
  color: #fffdf8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  opacity: 1;
}

html[data-theme="light"] .page-map-detail #foundry-manifest-button:not(:disabled) .ph,
html[data-theme="light"] .page-map-detail #uvtt-bundle-button:not(:disabled) .ph {
  color: inherit;
  font-size: 16px;
  flex: 0 0 auto;
}

html[data-theme="light"] .page-map-detail #foundry-manifest-button:not(:disabled):hover,
html[data-theme="light"] .page-map-detail #uvtt-bundle-button:not(:disabled):hover {
  background: #17130f;
  border-color: #17130f;
  color: #fffdf8;
}

html[data-theme="light"] .page-map-detail #foundry-manifest-button:not(:disabled):focus-visible,
html[data-theme="light"] .page-map-detail #uvtt-bundle-button:not(:disabled):focus-visible {
  outline: 2px solid #906627;
  outline-offset: 3px;
}

/* HOMEPAGE — shield icon labels from the busy illustrated banner. */
.page-public-home .public-benefits {
  padding: 16px 19px;
  right: 24px;
  bottom: 24px;
  gap: 12px 20px;
  border: 1px solid rgba(245,245,242,.27);
  border-radius: 13px;
  background: rgba(10,11,9,.86);
  backdrop-filter: blur(8px);
}

.page-public-home .public-benefits span,
html[data-theme="light"] .page-public-home .public-benefits span {
  color: #f9f7f1;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: none;
}

.page-public-home .public-benefits i,
html[data-theme="light"] .page-public-home .public-benefits i {
  color: #e2c99c;
  font-size: 19px;
  flex: 0 0 19px;
}

/* FOOTER — keep the current structure; improve hierarchy and contrast. */
.site-footer .footer-top {
  gap: 32px;
  min-height: 132px;
  padding-block: 30px;
}

.site-footer .footer-brand p {
  color: #b4b2a8;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer .footer-links {
  gap: 12px 25px;
  font-size: 13px;
}

.site-footer .footer-links a {
  color: #c6c4b9;
  text-underline-offset: 4px;
  transition: color .15s ease;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.site-footer .footer-bottom {
  color: #aaa79b;
  font-size: 11px;
}

html[data-theme="light"] .site-footer .footer-brand p,
html[data-theme="light"] .site-footer .footer-bottom {
  color: #665c4e;
}

html[data-theme="light"] .site-footer .footer-links a {
  color: #554a3e;
}

html[data-theme="light"] .site-footer .footer-links a:hover,
html[data-theme="light"] .site-footer .footer-links a:focus-visible {
  color: #211b16;
}

html[data-theme="light"] .site-footer::before,
html[data-theme="light"] .footer-bottom::before {
  background: rgba(67,55,40,.24);
}

/* Give the collection backlink above the map footer its own readable area. */
.page-map-detail .map-related-collections {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

html[data-theme="light"] .page-map-detail .map-related-collections {
  background: #fbf6ed;
  border-color: rgba(67,55,40,.18);
}

html[data-theme="light"] .page-map-detail .map-related-collections nav a {
  background: #eee1ce;
  border-color: #bc9e77;
  color: #49341d;
}

@media (max-width: 900px) {
  .page-about .about-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .page-about .about-mark-wrap { min-height: 300px; }
  .page-about .about-values { grid-template-columns: minmax(0, 1fr); }
  .page-about .about-story { grid-template-columns: minmax(0, 1fr); }
  .page-about .about-story-art { min-height: 300px; }
  .page-public-home .public-benefits {
    position: relative;
    right: auto;
    bottom: auto;
    width: fit-content;
    max-width: 100%;
    margin-top: 24px;
  }
}

@media (max-width: 620px) {
  .page-about .about-hero { padding-top: 40px; padding-bottom: 44px; }
  .page-about .about-hero-copy h1 { font-size: clamp(42px, 11vw, 58px); }
  .page-about .about-mark-wrap { min-height: 260px; }
  .page-about .about-mark { width: min(200px, 64%); }
  .page-about .about-value-card { padding: 26px; }
  .page-about .about-story-copy { padding: 28px 24px; }
  .page-about .about-story-art { min-height: 245px; }
  .page-about .about-cta { padding: 28px 24px; }
  .page-public-home .public-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 12px;
    width: 100%;
    padding: 14px;
  }
  .page-public-home .public-benefits span { font-size: 11px; }
  .site-footer .footer-top { padding-block: 28px; }
  .site-footer .footer-links { gap: 12px 20px; }
}

@media (max-width: 400px) {
  .page-public-home .public-benefits { grid-template-columns: minmax(0, 1fr); }
}
