:root {
  --bg: #f4efe5;
  --bg-soft: #efe4d0;
  --panel: rgba(255, 251, 245, 0.84);
  --panel-strong: rgba(255, 251, 245, 0.95);
  --text: #233127;
  --muted: #6d715b;
  --accent: #2b6a39;
  --accent-strong: #184a28;
  --sand: #baab89;
  --sand-soft: #d8c8a7;
  --outline: rgba(58, 73, 49, 0.14);
  --shadow: 0 18px 40px rgba(68, 52, 21, 0.12);
  --mainland-left: 20%;
  --mainland-top: 6.5%;
  --mainland-width: 71.5%;
  --mainland-height: 64%;
  --alaska-left: 5%;
  --alaska-top: 55%;
  --alaska-width: 30%;
  --alaska-height: 40%;
  --hawaii-left: 32%;
  --hawaii-top: 73.6%;
  --hawaii-width: 25%;
  --hawaii-height:15%;
  --marker-visited-image: url("../images/marker-visited.svg");
  --marker-unvisited-image: url("../images/marker-unvisited.svg");
}

body.pin-style-pins {
  --marker-visited-image: url("../images/logo_sm.svg");
  --marker-unvisited-image: url("../images/logo_sm_unvisited.svg");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Aptos, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(100, 147, 94, 0.18), transparent 30%),
    radial-gradient(circle at right 20%, rgba(186, 171, 137, 0.24), transparent 26%),
    linear-gradient(180deg, #f6f0e4 0%, #efe2cb 100%);
}

.page-shell {
  width: min(1380px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero-copy,
.stats-card,
.panel,
.map-card {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 32px;
  padding: 2.5rem;
}

.card-menu {
  position: relative;
  margin-left: auto;
  z-index: 6;
}

.card-menu-trigger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1px solid rgba(35, 49, 39, 0.12);
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.78);
  color: var(--accent-strong);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(68, 52, 21, 0.1);
}

.card-menu-trigger::-webkit-details-marker {
  display: none;
}

.card-menu-trigger::marker {
  content: "";
}

.card-menu-trigger span {
  width: 1.05rem;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
}

.card-menu-popover {
  position: absolute;
  top: 100%;
  right: 0;
  display: grid;
  gap: 0.25rem;
  width: min(220px, calc(100vw - 2rem));
  margin-top: 0.55rem;
  padding: 0.6rem;
  border: 1px solid rgba(35, 49, 39, 0.12);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.card-menu-popover a {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.card-menu-popover a:hover,
.card-menu-popover a:focus-visible {
  background: rgba(43, 106, 57, 0.1);
}

.panel,
.stats-card {
  scroll-margin-top: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.brand-logo {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
}

.brand-home-link {
  display: inline-flex;
  flex: 0 0 auto;
}

.brand-name {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.eyebrow,
.panel-kicker,
.stats-label {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 400;
  line-height: 1;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 6vw, 5.8rem);
}

.hero-text {
  max-width: 56ch;
  margin: 1.2rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-solid {
  background: var(--accent);
  color: #f9f5ef;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent-strong);
  border: 1px solid rgba(35, 49, 39, 0.1);
}

.stats-card {
  border-radius: 28px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-progress {
  margin-top: 1.5rem;
}

.donate-card {
  margin-top: 1.5rem;
}

.map-pin-options {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  justify-content: flex-start;
  margin: 0.8rem 0 0;
  margin-left: auto;
  padding: 0;
  border: 0;
}

.map-pin-options legend {
  display: contents;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 800;
}

.option-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
}

.option-choice input {
  accent-color: var(--accent);
}

.donate-text {
  margin: 0.2rem 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.donate-widget {
  min-height: 48px;
}

.page-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.page-progress-header .stats-label {
  margin-bottom: 0;
}

.page-progress-share {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
}

.page-progress-share .share-trigger-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.stats-number {
  display: flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 0.35rem;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.stats-progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.95rem;
}

.stats-progress-row .progress-track {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}

.stats-divider,
.progress-message {
  color: var(--muted);
}

.progress-track {
  height: 12px;
  margin-top: 1.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(120, 94, 45, 0.12);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7540 0%, #5e9f59 100%);
}

.progress-message {
  margin: 0.9rem 0 0;
  line-height: 1.5;
}

.progress-message a {
  color: var(--accent);
  font-weight: 800;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.about-layout {
  display: grid;
  gap: 1.5rem;
}

.panel {
  border-radius: 28px;
  padding: 1.2rem;
}

.about-card {
  padding: 2rem;
}

.about-card > p:not(.panel-kicker) {
  max-width: 72ch;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.photo-gallery-card {
  overflow: hidden;
}

.photo-gallery-header {
  align-items: center;
}

.photo-gallery-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.photo-gallery-park-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.photo-gallery-park-filter select {
  min-width: 10rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(35, 49, 39, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent-strong);
  font: inherit;
  font-weight: 800;
}

.photo-gallery-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.photo-gallery {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.photo-gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.7), rgba(232, 224, 205, 0.8));
  border: 1px solid rgba(35, 49, 39, 0.08);
}

.photo-gallery-image {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.photo-gallery-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.photo-gallery-nav:focus-visible {
  outline: 2px solid rgba(26, 76, 42, 0.45);
  outline-offset: -6px;
}

.photo-gallery-nav:disabled {
  cursor: default;
}

.photo-gallery-nav-previous {
  left: 0;
}

.photo-gallery-nav-next {
  right: 0;
}

.photo-gallery-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.photo-gallery-indicator {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.photo-gallery-dot {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border: 1px solid rgba(35, 49, 39, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.photo-gallery-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

.photo-gallery.is-empty .photo-gallery-stage,
.photo-gallery.is-empty .photo-gallery-indicator {
  display: none;
}

.photo-gallery:not(.is-empty) .photo-gallery-empty {
  display: none;
}

.panel-header,
.map-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.checklist-panel {
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.search-field input {
  width: min(260px, 100%);
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(35, 49, 39, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font: inherit;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0;
}

.checklist-controls {
  align-items: center;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-chip {
  border: 1px solid rgba(35, 49, 39, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-strong);
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip-action {
  background: rgba(255, 255, 255, 0.46);
}

.filter-chip.is-active {
  background: var(--accent);
  color: #fff;
}

.park-list {
  column-width: 240px;
  column-gap: 0.85rem;
  padding-right: 0;
}

.park-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(35, 49, 39, 0.08);
  background: rgba(255, 251, 245, 0.55);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
  break-inside: avoid;
}

.park-item:hover {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(43, 106, 57, 0.18);
}

.park-item.is-visited {
  background: rgba(228, 241, 225, 0.45);
  border-color: rgba(43, 106, 57, 0.18);
}

.park-item-readonly {
  grid-template-columns: 1fr;
  cursor: default;
}

.park-item-readonly:hover {
  background: rgba(255, 251, 245, 0.55);
  border-color: rgba(35, 49, 39, 0.08);
}

.park-item-readonly.is-visited:hover {
  background: rgba(228, 241, 225, 0.45);
  border-color: rgba(43, 106, 57, 0.18);
}

.park-item-readonly.is-unvisited {
  opacity: 0.42;
}

.park-checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0;
  accent-color: var(--accent);
}

.park-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.park-name {
  font-weight: 700;
  font-size: 0.97rem;
  line-height: 1.25;
  min-width: 0;
}

.park-meta {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.park-meta:empty {
  display: none;
}

.map-panel {
  display: flex;
  flex-direction: column;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.map-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
}

.share-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.map-share-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
}

.share-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  padding: 0;
  border-radius: 50%;
}

.share-trigger-icon {
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
}

.share-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(35, 49, 39, 0.14);
  backdrop-filter: blur(8px);
}

.share-dialog-backdrop[hidden] {
  display: none;
}

.share-dialog {
  width: min(360px, 100%);
  padding: 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(35, 49, 39, 0.1);
  background: rgba(255, 251, 245, 0.96);
  box-shadow: var(--shadow);
}

.share-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.share-dialog-close {
  appearance: none;
  border: 0;
  background: rgba(35, 49, 39, 0.06);
  color: var(--accent-strong);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.share-dialog-preview {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1200 / 630;
}

.share-dialog-text {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.share-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.legend-tree {
  width: 22px;
  height: 28px;
  display: inline-block;
  background: center / contain no-repeat;
}

.legend-tree-visited {
  background-image: var(--marker-visited-image);
}

.legend-tree-unvisited {
  background-image: var(--marker-unvisited-image);
}

.map-frame {
  --map-pin-width: 26px;
  --map-pin-height: 34px;
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(103, 167, 117, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(250, 248, 243, 0.85), rgba(232, 224, 205, 0.9));
  border: 1px solid rgba(35, 49, 39, 0.08);
}

@supports (width: 1cqw) {
  .map-frame {
    container-type: inline-size;
    --map-pin-width: clamp(14px, 2.59cqw, 37px);
    --map-pin-height: clamp(19px, 3.39cqw, 48px);
  }
}

.map-frame-standalone {
  margin-top: 1rem;
}

.usa-image-map {
  min-height: 0;
  aspect-ratio: 3 / 2;
}

.usa-reference-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.marker-layer {
  position: absolute;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: center / contain no-repeat var(--marker-unvisited-image);
  width: var(--map-pin-width);
  height: var(--map-pin-height);
  padding: 0;
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
  transition: transform 160ms ease;
  z-index: 1;
}

.map-marker-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  display: grid;
  gap: 0.12rem;
  min-width: max-content;
  max-width: 12rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(35, 49, 39, 0.12);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.96);
  color: var(--accent-strong);
  box-shadow: 0 10px 22px rgba(68, 52, 21, 0.16);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 0.18rem);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.map-marker-tooltip-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.map-marker:hover,
.map-marker:focus-visible {
  z-index: 10;
}

.map-marker:hover .map-marker-tooltip,
.map-marker:focus-visible .map-marker-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.marker-layer-mainland {
  left: var(--mainland-left);
  top: var(--mainland-top);
  width: var(--mainland-width);
  height: var(--mainland-height);
}

.marker-layer-alaska {
  left: var(--alaska-left);
  top: var(--alaska-top);
  width: var(--alaska-width);
  height: var(--alaska-height);
}

.marker-layer-hawaii {
  left: var(--hawaii-left);
  top: var(--hawaii-top);
  width: var(--hawaii-width);
  height: var(--hawaii-height);
}

.marker-layer-territories {
  inset: 0;
}

.map-marker.is-visited {
  background-image: var(--marker-visited-image);
  z-index: 2;
}

.map-marker:not(.map-marker-static):hover,
.map-marker:not(.map-marker-static):focus-visible {
  transform: translate(-50%, -50%) scale(1.12);
}

.map-marker:focus-visible {
  outline: 2px solid rgba(26, 76, 42, 0.4);
  outline-offset: 4px;
  border-radius: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-only-shell {
  width: min(1120px, calc(100% - 2rem));
}

.map-only-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}

.map-only-panel,
.map-only-progress-card {
  width: 100%;
}

.map-only-header {
  align-items: center;
}

.map-only-header .panel-kicker {
  text-align: left;
}

.map-only-header .legend {
  justify-content: flex-end;
  margin-left: auto;
}

.map-only-title {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.map-only-subtitle {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.map-only-progress {
  margin-top: 0.95rem;
}

.map-only-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.map-only-progress-head .progress-track {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}

.map-only-count {
  flex: 0 0 auto;
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.4rem;
  font-weight: 800;
}

.park-list-readonly {
  margin-top: 1rem;
}

.map-only-linkline {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-only-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.map-only-link:hover {
  text-decoration: underline;
}

@media (max-width: 1080px) {
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1380px);
  }

  .map-only-shell {
    width: min(100% - 1rem, 1120px);
  }

  .hero-copy,
  .stats-card,
  .panel,
  .map-card {
    border-radius: 24px;
  }

  .hero-copy,
  .stats-card {
    padding: 1.4rem;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
  }

  .panel {
    padding: 1rem;
  }

  .map-panel {
    overflow: hidden;
    padding-inline: 0;
  }

  .map-panel > .panel-header,
  .map-panel > .map-pin-options,
  .map-panel > .map-only-linkline {
    padding-inline: 1rem;
  }

  .map-panel > .map-frame {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
  }

  .panel-header {
    flex-direction: column;
  }

  .park-copy {
    display: grid;
    gap: 0.18rem;
    justify-content: start;
  }

  .park-list {
    column-width: auto;
    columns: 1;
  }

  .park-meta {
    white-space: normal;
  }

  .map-toolbar,
  .share-actions,
  .photo-gallery-controls {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .photo-gallery-park-filter {
    width: 100%;
    justify-content: space-between;
  }

  .photo-gallery-park-filter select {
    min-width: 0;
    width: min(100%, 14rem);
  }

  .search-field input {
    width: 100%;
  }

  .filter-group {
    width: 100%;
  }

  .usa-image-map {
    aspect-ratio: 1.45 / 1;
  }

  .share-dialog-actions {
    flex-direction: column;
  }
}
