:root {
  --ink: #171713;
  --muted: #69645c;
  --soft: #2f2d28;
  --paper: #f7f4ec;
  --panel: #fffdf8;
  --panel-strong: #ffffff;
  --line: rgba(31, 29, 24, 0.14);
  --gold: #9f7b2d;
  --sand: #f1e4c8;
  --sand-soft: #f2eadb;
  --brick: #b76547;
  --brick-soft: #f5e2da;
  --moss: #6f8060;
  --moss-soft: #e7eddf;
  --blue: #647f91;
  --blue-soft: #e2edf3;
  --ink-soft: #ebe6dc;
  --shadow: 0 22px 70px rgba(50, 43, 31, 0.16);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.intro {
  min-height: 64vh;
  padding: 24px;
  background: #faf7ef;
  display: grid;
  grid-template-rows: auto 1fr;
}

.intro-nav,
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.intro-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 0;
  padding: 44px 0 34px;
}

.intro-copy {
  max-width: 100%;
  border: 1px solid rgba(159, 123, 45, 0.16);
  border-radius: 8px;
  padding: 30px 36px;
  background: var(--sand-soft);
}

.eyebrow,
.tiny-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(38px, 4.25vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  max-width: none;
  white-space: nowrap;
}

h2 {
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.08;
}

h3 {
  margin-bottom: 12px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro-lede {
  width: min(980px, 100%);
  color: #39352e;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.primary-button,
.ghost-button,
.mobile-layer-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.primary-button {
  background: var(--gold);
  color: #fffdf8;
}

.ghost-button,
.mobile-layer-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
}

.ghost-button.small {
  min-height: 29px;
  padding: 0 11px;
  font-size: 8px;
}

.map-workspace {
  height: 100vh;
  min-height: 720px;
  display: block;
  background: var(--paper);
}

.layer-panel {
  position: fixed;
  z-index: 42;
  top: 50%;
  left: 50%;
  width: min(500px, calc(100% - 36px));
  max-height: min(78vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.layer-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.panel-header h2 {
  font-size: 18px;
  white-space: nowrap;
}

.layer-panel .eyebrow,
.layer-panel h3 {
  font-size: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(23, 23, 19, 0.04);
  color: var(--ink);
  font-size: 24px;
}

.close-panel {
  display: grid;
}

.trust-strip {
  display: grid;
  gap: 4px;
  margin-bottom: 15px;
  border: 1px solid rgba(202, 169, 104, 0.35);
  border-radius: 5px;
  padding: 10px;
  background: rgba(202, 169, 104, 0.08);
}

.trust-strip strong {
  color: var(--gold);
}

.trust-strip span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  white-space: nowrap;
}

.layer-section {
  margin-top: 16px;
}

.layer-list {
  display: grid;
  gap: 7px;
}

.layer-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background: #f4ecdc;
}

.layer-card.locked {
  background: #f2e5e0;
}

.layer-card[data-type="core"] {
  background: #f4ecdc;
}

.layer-card[data-type="curator"] {
  background: #f3e4dd;
}

.layer-card[data-type="bundle"] {
  background: #efe8d8;
}

.layer-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.layer-card h4 {
  margin: 0 0 3px;
  font-size: 11px;
}

.meta {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.layer-description {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.layer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.layer-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bundle-layer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bundle-layer-chips span {
  border: 1px solid rgba(23, 23, 19, 0.14);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 38px;
  max-width: 66px;
  min-height: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--soft);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 36px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #e7e1d6;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #8b8378;
  transition: transform 180ms ease, background 180ms ease;
}

.switch.active::after {
  transform: translateX(14px);
  background: var(--gold);
}

.unlock-link {
  min-height: 24px;
  border: 1px solid rgba(202, 169, 104, 0.45);
  border-radius: 4px;
  padding: 0 8px;
  background: rgba(202, 169, 104, 0.08);
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
}

.map-stage {
  position: relative;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: #ece8dd;
}

.map-hero-bar {
  position: absolute;
  z-index: 12;
  top: 0;
  left: 0;
  right: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(31, 29, 24, 0.08);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.map-hero-bar div {
  display: grid;
  gap: 3px;
}

.map-hero-bar strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

.map-hero-bar span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.top-bar {
  position: absolute;
  z-index: 14;
  top: 61px;
  left: 18px;
  right: 18px;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.top-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: auto;
}

.compact {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 12px 7px 7px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.mobile-layer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 70px;
  min-height: 29px;
  line-height: 1;
  padding: 0 11px;
  text-align: center;
  font-size: 8px;
}

.map-canvas {
  position: relative;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #ebe7dc;
}

.google-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.15) saturate(0.72) contrast(0.96) brightness(1.03);
  pointer-events: auto;
}

.google-js-map {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

#pinLayer {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.pin {
  position: absolute;
  z-index: 4;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px 999px 999px 2px;
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(50, 43, 31, 0.2);
  transform: translate(-50%, -100%) rotate(-45deg);
  transition: transform 160ms ease, filter 160ms ease;
  pointer-events: auto;
}

.pin::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background: #ffffff;
}

.pin:hover,
.pin.active {
  filter: brightness(1.14);
  transform: translate(-50%, -100%) rotate(-45deg) scale(1.12);
}

.pin[data-color="brick"] { background: var(--brick); }
.pin[data-color="moss"] { background: var(--moss); }
.pin[data-color="blue"] { background: var(--blue); }

.detail-panel {
  position: absolute;
  z-index: 16;
  right: 24px;
  bottom: 24px;
  width: min(340px, calc(100% - 48px));
  max-height: min(72vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.place-card {
  min-height: 0;
  font-size: 70%;
}

.place-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.place-hero {
  min-height: 150px;
  margin: -16px -16px 14px;
  background-position: center;
  background-size: cover;
}

.place-card h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.place-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.place-facts {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.place-facts div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #faf7ef;
}

.place-facts span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.place-facts strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.related-layer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 4px;
}

.mini-layer {
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: #f4ecdc;
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
}

.story-block {
  margin: 14px 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.story-block h3 {
  margin-bottom: 6px;
}

.story-block p {
  color: #39352e;
  line-height: 1.65;
}

.external-actions {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.place-card .primary-button,
.place-card .ghost-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 10px;
}

.access-status {
  margin: 0;
  color: var(--brick);
  font-size: 11px;
  font-weight: 800;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.share-url {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 10px;
  background: #faf7ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-width {
  width: 100%;
}

.hidden {
  display: none !important;
}

.paywall-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 23, 19, 0.24);
  backdrop-filter: blur(12px);
}

.modal-overlay {
  position: fixed;
  z-index: 48;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 23, 19, 0.2);
  backdrop-filter: blur(10px);
}

.access-gate-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(247, 244, 236, 0.76);
  backdrop-filter: blur(14px);
}

.access-gate-card {
  width: min(390px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.access-gate-card h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.06;
}

.access-gate-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.access-gate-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-gate-card input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 12px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.app-access-locked .app-shell,
body.app-access-locked .modal-overlay,
body.app-access-locked .paywall-overlay {
  pointer-events: none;
  user-select: none;
}

.paywall-card,
.layer-detail-card,
.account-card {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.layer-detail-card {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
}

.paywall-close,
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.account-card {
  width: min(520px, 100%);
  padding: 20px;
  font-size: 70%;
}

.account-card h2 {
  font-size: 22px;
  line-height: 1.08;
}

.account-card p,
.account-card .paywall-copy {
  font-size: 10px;
  line-height: 1.5;
}

.account-form {
  display: grid;
  gap: 8px;
  margin: 15px 0 8px;
}

.account-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.account-mode-row .ghost-button.small,
.account-mode-row .unlock-link {
  min-height: 24px;
  border-radius: 999px;
  font-size: 8px;
}

.account-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-form input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.account-status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: #faf7ef;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.account-summary {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.account-section-title {
  margin-top: 15px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  background: #f8f3ea;
}

.account-layer-row strong {
  font-size: 9px;
  letter-spacing: 0.06em;
}

.account-layer-row span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.account-card .primary-button,
.account-card .ghost-button,
.account-card .unlock-link {
  min-height: 30px;
  padding: 0 10px;
  font-size: 9px;
}

.paywall-copy {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.65;
}

.included-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.included-grid div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: rgba(23, 23, 19, 0.035);
}

.included-grid strong {
  color: var(--gold);
  font-size: 20px;
}

.included-grid span,
.included-list {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bundle-paywall-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.bundle-paywall-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.bundle-paywall-list span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.included-list {
  margin: 0 0 22px;
  padding-left: 18px;
}

.layer-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 24px;
  margin-bottom: 24px;
}

.curator-preview {
  display: grid;
  align-content: end;
  min-height: 210px;
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(rgba(23, 23, 19, 0.1), rgba(23, 23, 19, 0.58)),
    var(--layer-image);
  background-position: center;
  background-size: cover;
  color: #fffdf8;
}

.curator-preview strong {
  font-size: 20px;
}

.sample-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 24px;
}

.sample-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8f3ea;
}

.sample-card strong {
  display: block;
  margin-bottom: 6px;
}

.layer-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-workspace {
  min-height: 100vh;
  border-top: 1px solid var(--line);
  padding: 40px 20px;
  background: #faf7ef;
  font-size: 70%;
}

body:not(.admin-visible) .admin-workspace {
  display: none;
}

.admin-heading {
  width: min(1180px, 100%);
  margin: 0 auto 17px;
}

.admin-heading h2 {
  margin-bottom: 7px;
  font-size: clamp(22px, 2.8vw, 36px);
  white-space: nowrap;
}

.admin-heading p:not(.eyebrow) {
  width: min(720px, 100%);
  color: var(--muted);
  line-height: 1.45;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
}

.admin-toolbar span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.admin-auth {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.admin-auth input {
  min-height: 24px;
  width: 120px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 8px;
  font-weight: 700;
}

.admin-auth input[type="password"] {
  width: 100px;
}

.admin-stats {
  width: min(1180px, 100%);
  margin: 0 auto 13px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.admin-stats div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  background: var(--panel-strong);
}

.admin-stats strong {
  color: var(--gold);
  font-size: 17px;
}

.admin-stats span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.connection-panel {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  border: 1px solid #d5c8ad;
  border-radius: 8px;
  padding: 18px;
  background: #f5ecdc;
}

.connection-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.connection-panel-header h3 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.connection-panel-header > span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.connection-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.connection-values div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fffaf1;
}

.connection-values strong {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connection-values span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-panel ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.connection-panel li {
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-top-width: 5px;
  border-radius: 6px;
  padding: 13px;
  background: var(--panel-strong);
}

.connection-panel li.ready {
  border-top-color: #5c7f78;
}

.connection-panel li.needs-setup {
  border-top-color: var(--gold);
}

.connection-panel li > span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f3ecd8;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.connection-panel li.ready > span {
  background: #e6eee8;
  color: #456a62;
}

.connection-panel li strong {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.connection-panel li p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.launch-checklist {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fffaf1;
}

.launch-checklist-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.launch-checklist-header h3 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.launch-checklist-header > span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.launch-checklist ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.launch-checklist li {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 6px;
  padding: 13px;
  background: var(--panel-strong);
}

.launch-checklist li.ready {
  border-left-color: #5c7f78;
}

.launch-checklist li.needs-setup {
  border-left-color: var(--gold);
}

.launch-checklist li strong {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.launch-checklist li span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f3ecd8;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.launch-checklist li.ready span {
  background: #e6eee8;
  color: #456a62;
}

.launch-checklist li p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.content-qa {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #f8f3ea;
}

.content-qa-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.content-qa-header h3 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.content-qa-header > span {
  flex: 0 0 auto;
  border: 1px solid rgba(167, 127, 33, 0.3);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fffaf1;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.content-qa-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.content-qa-summary div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--panel-strong);
}

.content-qa-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.content-qa-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.content-qa-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.content-qa-row {
  min-height: 118px;
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid var(--line);
  border-left: 6px solid var(--brick);
  border-radius: 6px;
  padding: 12px;
  background: var(--panel-strong);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.content-qa-row:hover {
  border-color: rgba(183, 101, 71, 0.45);
  background: #fffaf1;
}

.content-qa-row strong {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.content-qa-row span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(183, 101, 71, 0.1);
  color: var(--brick);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-qa-row p,
.content-qa-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr minmax(360px, 1.2fr);
  gap: 10px;
  align-items: start;
}

.admin-list-panel,
.admin-editor {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px;
  background: var(--panel-strong);
}

.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-list-header h3 {
  margin-bottom: 0;
}

.admin-list {
  display: grid;
  gap: 6px;
  max-height: 430px;
  overflow: auto;
}

.admin-row {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  background: #f8f3ea;
  text-align: left;
}

.admin-row.active {
  border-color: rgba(159, 123, 45, 0.55);
  background: var(--sand-soft);
}

.admin-row strong {
  font-size: 8px;
  letter-spacing: 0.06em;
}

.admin-row span {
  color: var(--muted);
  font-size: 8px;
}

#adminForm {
  display: grid;
  gap: 8px;
}

#adminForm label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#adminForm input,
#adminForm select,
#adminForm textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 8px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#adminForm textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.45;
}

.admin-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-checks label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #f8f3ea;
  color: var(--soft) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.admin-checks input {
  width: auto !important;
}

.layer-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#adminForm .layer-checkbox-grid label {
  display: flex;
  align-items: flex-start;
  gap: 6px !important;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px;
  background: #f8f3ea;
  color: var(--soft) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.layer-checkbox-grid input {
  width: auto !important;
  margin-top: 2px;
}

.layer-checkbox-grid span {
  display: grid;
  gap: 3px;
}

.layer-checkbox-grid strong {
  color: var(--ink);
  font-size: 8px;
  line-height: 1.25;
}

.layer-checkbox-grid small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px;
  background: #f8f3ea;
}

.admin-upload-row div {
  display: grid;
  gap: 3px;
}

.admin-upload-row strong {
  color: var(--ink);
  font-size: 9px;
}

.admin-upload-row span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

#adminForm .upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  min-width: 86px;
  border: 1px solid rgba(159, 123, 45, 0.32);
  border-radius: 999px;
  padding: 0 9px;
  background: #fffdf8;
  color: var(--ink) !important;
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.upload-button input {
  display: none;
}

.unlock-link.danger {
  border-color: rgba(183, 101, 71, 0.35);
  background: rgba(183, 101, 71, 0.08);
  color: var(--brick);
}

@media (max-width: 1120px) {
  .map-workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .launch-checklist ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-panel {
    position: absolute;
    z-index: 14;
    right: 18px;
    bottom: 18px;
    width: min(340px, calc(100% - 36px));
    max-height: 70vh;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 820px) {
  .intro {
    min-height: auto;
    padding: 18px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 24px;
    padding: 42px 0 18px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 58px);
    line-height: 1;
    white-space: normal;
  }

  .intro-copy {
    padding: 24px 20px;
  }

  .intro-lede {
    width: 100%;
  }

  .intro-nav .ghost-button {
    display: none;
  }

  .map-workspace {
    height: 100svh;
    min-height: 680px;
    display: block;
    position: relative;
  }

  .layer-panel {
    position: absolute;
    z-index: 20;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 78svh;
    border: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    box-shadow: var(--shadow);
    transform: translateY(104%);
    transition: transform 220ms ease;
    padding: 16px;
  }

  .layer-panel.open {
    transform: translateY(0);
  }

  .close-panel {
    display: grid;
  }

  .mobile-layer-button {
    display: inline-flex;
    min-width: 70px;
    min-height: 29px;
    padding: 0 11px;
    font-size: 8px;
  }

  .map-stage {
    height: 100%;
  }

  .compact {
    display: none;
  }

  .detail-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 62svh;
    padding: 14px;
    border-radius: 12px;
  }

  .place-hero {
    min-height: 120px;
    margin: -14px -14px 12px;
  }

  .included-grid {
    grid-template-columns: 1fr;
  }

  .layer-detail-hero,
  .sample-list {
    grid-template-columns: 1fr;
  }

  .modal-overlay,
  .paywall-overlay,
  .access-gate-overlay {
    align-items: end;
    padding: 12px;
  }

  .layer-detail-card,
  .paywall-card,
  .account-card,
  .access-gate-card {
    width: 100%;
    max-height: 88svh;
    border-radius: 14px 14px 8px 8px;
    padding: 16px 14px;
  }

  .curator-preview {
    min-height: 150px;
  }

  .layer-detail-actions {
    display: grid;
  }

  .top-actions {
    gap: 8px;
  }

  .admin-workspace {
    padding: 40px 18px;
  }

  .admin-heading h2 {
    white-space: normal;
  }

  .admin-stats,
  .connection-values,
  .connection-panel ul,
  .launch-checklist ul,
  .content-qa-summary,
  .content-qa-list,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .connection-panel,
  .launch-checklist {
    padding: 14px;
  }

  .connection-panel-header,
  .launch-checklist-header,
  .content-qa-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-list {
    max-height: none;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 39px;
    white-space: normal;
  }

  .intro-lede {
    font-size: 17px;
  }

  .intro-actions {
    align-items: stretch;
  }

  .primary-button {
    width: 100%;
  }

  .paywall-card {
    padding: 24px 18px;
  }

  .panel-header h2 {
    font-size: 18px;
  }

  .trust-strip span {
    white-space: normal;
  }

  .layer-card-head {
    align-items: flex-start;
  }

  .layer-actions {
    align-items: flex-end;
  }

  .place-card h2,
  .layer-detail-card h2,
  .paywall-card h2 {
    font-size: 22px;
  }

  .top-actions .ghost-button.small {
    min-height: 29px;
    padding: 0 11px;
    font-size: 8px;
  }

  .account-layer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-two-col {
    grid-template-columns: 1fr;
  }

  .layer-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .admin-upload-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-auth,
  .admin-auth input,
  .admin-auth .unlock-link {
    width: 100%;
  }
}
