:root {
  --bg: #10110e;
  --bg-deep: #0b0c0a;
  --panel: #171914;
  --panel-2: #1b1d18;
  --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-sm: 10px;
  --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. */
.placeholder-art {
  background: linear-gradient(135deg, rgba(191,168,130,.18), rgba(191,168,130,.035));
  border: 1px dashed rgba(191,168,130,.46);
}

.icon-placeholder {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1px dashed rgba(245,245,242,.40);
  border-radius: 4px;
  flex: 0 0 auto;
}

/* 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.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-ghost {
  background: rgba(245,245,242,.026);
  border-color: var(--line);
}

.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;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* 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;
}

.lock-placeholder {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px dashed rgba(245,245,242,.38);
}

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

.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);
}

.info-grid {
  display: grid;
  grid-template-columns: .84fr 1.16fr;
  gap: 82px;
  align-items: start;
}

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

.info-grid > div > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 500px;
  margin: 16px 0 0;
  font-size: 14px;
}

.details-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  border-top: 1px solid var(--line);
}

.details-list div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.details-list div:nth-child(odd) { padding-right: 28px; }
.details-list div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }

.details-list dt {
  color: #73756d;
  font-size: 10px;
  margin-bottom: 6px;
}
.details-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

/* 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; }

  .info-grid { grid-template-columns: 1fr; gap: 38px; }
}

@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); }

  .details-list { grid-template-columns: 1fr; }
  .details-list div:nth-child(odd),
  .details-list div:nth-child(even) {
    padding: 16px 0;
    border-left: 0;
  }

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


/* ==========================
   V3 — LIVE SUPABASE 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-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 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;
  border-color: rgba(191,168,130,.62);
}

.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;
  --patreon: #F96854;
  --spacer: #C9C9C9;
  --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,
.details-list,
.details-list div {
  border-color: #C9C9C9;
}

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

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

.details-list div {
  border-bottom-width: var(--spacer-width);
}

.details-list div:nth-child(even) {
  border-left-width: var(--spacer-width);
}

/* 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;
}

.info-grid {
  grid-template-columns: .78fr 1.22fr;
  gap: 72px;
}

.detail-slogan h2 {
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* 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;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 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;
  }

  .detail-slogan h2 {
    font-size: 34px;
  }

  .details-list div:nth-child(even) {
    border-left-width: 0;
  }
}


/* ==========================================
   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;
}

.info-grid {
  grid-template-columns: minmax(0, .78fr) minmax(420px, 1.22fr);
  gap: 82px;
  align-items: start;
}

.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. */
.details-list {
  display: none;
}

/* 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;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .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-group:not(.locked) .lock-placeholder {
  border-style: solid;
  border-color: rgba(191,168,130,.72);
  background: rgba(191,168,130,.16);
}

.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;
}

.info-grid {
  grid-template-columns: minmax(0, .72fr) minmax(420px, 1.28fr);
  gap: 54px;
}

.detail-slogan h2 {
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -.02em;
}

.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;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-slogan h2 {
    font-size: 30px;
  }

  .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. */
.info-grid {
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 42px;
}

.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: 860px; }
.collection-index-hero h1 {
  margin: 0;
  font-family: "Cinzel Decorative", Georgia, serif;
  font-weight: 700;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.05;
}
.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; gap: 24px; padding: 40px; background: radial-gradient(circle at 25% 35%, rgba(191,168,130,.15), transparent 34%), linear-gradient(135deg, #181a14, #0d0e0b); }
.collection-preview-fallback > .ph { color: var(--eyebrow); font-size: 72px; }
.collection-preview-fallback div { display: grid; gap: 6px; }
.collection-preview-fallback span { color: var(--eyebrow); font-size: 11px; letter-spacing: .18em; }
.collection-preview-fallback strong { font-family: "Cinzel Decorative", Georgia, serif; font-size: 28px; line-height: 1.15; }
.collection-preview-fallback small { color: var(--muted); font-size: 13px; }
.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-index-hero h1 { font-size: 34px; }
  .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 { flex-direction: column; text-align: center; gap: 16px; }
  .collection-preview-fallback > .ph { font-size: 54px; }
  .collection-preview-fallback strong { font-size: 23px; }
}
