:root {
  --bg: #1a0d40;
  --panel: #2d1a65;
  --card: #3a2472;
  --text: #f7fbff;
  --muted: #d9e5f3;
  --border: rgba(255,255,255,0.12);
  --gold: #ffd56f;
  --mint: #66e2cf;
  --coral: #ff7a5c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(160, 100, 255, 0.15), transparent 22%),
    radial-gradient(circle at right top, rgba(255, 213, 111, 0.10), transparent 22%),
    linear-gradient(145deg, #1a0d40 0%, #2d1a65 45%, #160a38 100%);
}

img { max-width: 100%; }

.page-shell {
  width: min(880px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero-card,
.panel {
  background: linear-gradient(145deg, rgba(45, 26, 101, 0.98), rgba(26, 13, 64, 0.98));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.hero-card {
  position: relative;
  padding: 0;
  margin-bottom: 0;
  text-align: center;
  overflow: hidden;
}

.hero-subtitle {
  position: relative;
  font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--gold);
  margin: 0;
  padding: 4px 4% 8px;
  text-align: center;
  letter-spacing: 0.12em;
  background: rgba(45, 26, 101, 0.98);
}

.hero-subtitle::before {
  content: '';
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(45, 26, 101, 0.98));
  pointer-events: none;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  filter: hue-rotate(12deg);
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.title-stack {
  flex: 1;
  display: grid;
  justify-items: center;
  text-align: center;
}

.cartoon-dollar {
  flex: 0 0 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  border-radius: 24px;
  background: linear-gradient(145deg, #ffe6a6, #ffb96d);
  color: #1a0d40;
  font-family: 'Trebuchet MS', 'Comic Sans MS', 'Segoe UI', sans-serif;
  font-size: clamp(4rem, 12vw, 6rem);
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(255, 213, 111, 0.18);
  transform: rotate(-4deg);
  text-shadow: 1px 1px 0 rgba(255,255,255,0.55);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.86rem;
  color: var(--gold);
  font-weight: 900;
  margin: 0 0 6px;
}

h1, h2 {
  font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
  line-height: 1.02;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 9vw, 5rem);
  color: #ffffff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35), 4px 4px 0 rgba(255, 213, 111, 0.12);
  margin-bottom: 4px;
}

h2 {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  color: #ffffff;
}

.subtitle {
  font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
  font-size: clamp(1.08rem, 4vw, 1.45rem);
  color: var(--gold);
  font-weight: 900;
  margin: 0;
  line-height: 1.15;
}

.hero-badge-row {
  text-align: center;
  padding: 12px 0 6px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 213, 111, 0.15);
  border: 1px solid rgba(255, 213, 111, 0.35);
  color: #ffeaa8;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 22px;
  letter-spacing: 0.06em;
}

.category-select {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 15px 16px;
  font: inherit;
  font-size: 1.15rem;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffd56f' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.category-select option {
  background: #2d1a65;
  color: #ffffff;
}

.lede,
.helper-text,
.result-meta,
.detail-value,
.search-copy p,
.results-panel p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 1.03rem;
  font-weight: 500;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.search-form {
  display: grid;
  gap: 10px;
}

.search-form label {
  display: grid;
  gap: 6px;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.08rem;
}

input {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
  font-size: 1.15rem;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

input::placeholder { color: #dfe8f4; }

button {
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ffd56f, #ff9d5c);
  color: #1a0d40;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 213, 111, 0.20);
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input { flex: 1; }

.panel-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 213, 111, 0.14);
  color: #ffeaa8;
  font-weight: 900;
  font-size: 0.95rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.result-card {
  display: grid;
  gap: 10px;
  background: linear-gradient(145deg, #3e2880, #2d1a65);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 14px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.result-card h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 900;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 213, 111, 0.18);
  border: 1px solid rgba(255, 213, 111, 0.4);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.card-tagline {
  margin: 2px 0 4px;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
}

.last-verified {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--mint);
  font-weight: 600;
}

.result-tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 213, 111, 0.16);
  color: #ffeaa8;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 0.92rem;
}

.detail-box {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
}

.result-card .detail-label {
  color: var(--gold);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
  margin: 0 0 4px;
}

.detail-value {
  color: #ffffff;
  line-height: 1.55;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.result-actions button {
  padding: 10px 12px;
  font-size: 0.95rem;
}

/* ── Ask For Me button ── */
.btn-ask {
  background: linear-gradient(135deg, #ffd56f, #ffb830);
  color: #1a0d40;
  font-weight: 900;
  font-size: 1rem;
  padding: 12px 32px;
}

/* ── Ask For Me modal ── */
.modal-overlay:not([hidden]) {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-card {
  background: linear-gradient(145deg, #3a2472, #2d1a65);
  border: 1px solid rgba(255, 213, 111, 0.35);
  border-radius: 28px;
  padding: 28px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-header h2 {
  color: var(--gold);
  font-size: 1.6rem;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f6ff;
  padding: 8px 13px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}

.modal-hint {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 12px;
}

.modal-script {
  font-size: 1.2rem;
  line-height: 1.65;
  color: #f0f8ff;
  font-style: italic;
  background: rgba(255, 213, 111, 0.07);
  border: 1px solid rgba(255, 213, 111, 0.2);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
}

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

.modal-actions button {
  flex: 1;
  min-width: 110px;
  font-size: 0.95rem;
  padding: 12px 14px;
}

.btn-show {
  background: linear-gradient(135deg, var(--mint), #3db9a8);
  color: #1a0d40;
  font-weight: 900;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.13);
  color: #f0f6ff;
}

.btn-text {
  background: rgba(255, 255, 255, 0.07);
  color: #c0d4e8;
}

/* ── Full-screen show mode ── */
.show-overlay:not([hidden]) {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  text-align: center;
}

.show-script {
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  color: #1a0d40;
  line-height: 1.7;
  max-width: 700px;
  font-style: italic;
}

.show-close {
  margin-top: 48px;
  background: #1a0d40;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 18px 36px;
}

/* ── Admin overlay ── */
.admin-preview {
  background: rgba(255, 200, 50, 0.07);
  border: 1px dashed rgba(255, 213, 111, 0.35);
  border-radius: 14px;
  padding: 12px;
}

.admin-preview-header {
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
  margin-bottom: 10px;
}

.btn-admin-fetch {
  background: rgba(255, 213, 111, 0.12);
  color: var(--gold);
  border: 1px solid rgba(255, 213, 111, 0.28);
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.admin-error {
  color: #ff8a7a;
  font-size: 0.9rem;
  margin: 0;
}

/* ── PWA install banner ── */
.install-banner:not([hidden]) {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2d1a65, #1a0d40);
  border-top: 2px solid rgba(255, 213, 111, 0.4);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 300;
  flex-wrap: wrap;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.4);
}

.install-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.install-copy {
  flex: 1;
  min-width: 200px;
}

.install-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 2px;
}

.install-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0;
}

.install-btn {
  background: linear-gradient(135deg, #ffd56f, #ffb830);
  color: #1a0d40;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: none;
}

.install-dismiss {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Location banner ── */
.location-banner {
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 0.97rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.location-banner--found {
  background: rgba(102, 226, 207, 0.12);
  border: 1px solid rgba(102, 226, 207, 0.35);
  color: var(--mint);
}

.location-banner--fallback {
  background: rgba(255, 213, 111, 0.08);
  border: 1px solid rgba(255, 213, 111, 0.2);
  color: var(--muted);
}

/* ── ZIP code row ── */
.zip-row {
  display: flex;
}

.zip-row input {
  width: 100%;
  border-color: rgba(102, 226, 207, 0.25);
}

.zip-row input:focus {
  outline: 2px solid rgba(102, 226, 207, 0.5);
  outline-offset: 2px;
}

/* ── Nearby result address line ── */
.card-address {
  margin: 2px 0 4px;
  font-size: 0.93rem;
  color: var(--mint);
  font-weight: 600;
}

/* ── Park badges ── */
.national-park-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.5);
  color: #c9a84c;
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.state-park-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(80, 180, 120, 0.15);
  border: 1px solid rgba(80, 180, 120, 0.45);
  color: #50b478;
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ── Nearby badge (Google Places results) ── */
.nearby-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(102, 226, 207, 0.15);
  border: 1px solid rgba(102, 226, 207, 0.4);
  color: var(--mint);
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ── Featured sponsor badge ── */
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--coral);
  border: 1px solid var(--coral);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-star {
  color: #000;
  font-style: normal;
  font-variant-emoji: text;
  font-size: 1.3em;
  line-height: 1;
}

.result-card--featured {
  border-color: rgba(255, 213, 111, 0.85);
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(255, 213, 111, 0.35), 0 8px 28px rgba(255, 213, 111, 0.18);
}

/* ── Local result badge ── */
.local-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(102, 226, 207, 0.15);
  border: 1px solid rgba(102, 226, 207, 0.4);
  color: var(--mint);
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Submission panel ── */
.submit-panel {
  margin-top: 4px;
}

.submit-copy p {
  color: var(--muted);
  margin: 6px 0 18px;
  font-size: 1.03rem;
  line-height: 1.5;
}

.submit-form {
  display: grid;
  gap: 12px;
}

.submit-row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.submit-row-3 {
  display: grid;
  grid-template-columns: 1fr 80px 110px;
  gap: 12px;
}

.submit-label {
  display: grid;
  gap: 6px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.02rem;
}

.submit-optional {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
}

.submit-label input,
.submit-label select {
  width: 100%;
}

.btn-submit {
  background: linear-gradient(135deg, var(--mint), #3db9a8);
  color: #1a0d40;
  font-weight: 900;
  font-size: 1.05rem;
  padding: 16px 28px;
  justify-self: start;
  border-radius: 999px;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-status {
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
}

.submit-status--success {
  background: rgba(102, 226, 207, 0.12);
  border: 1px solid rgba(102, 226, 207, 0.4);
  color: var(--mint);
}

.submit-status--error {
  background: rgba(255, 100, 100, 0.10);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff8a7a;
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100vw - 14px, 880px);
    padding-top: 10px;
  }

  .hero-image {
    width: 100%;
    max-height: none;
  }

  .title-row {
    flex-direction: column;
    align-items: center;
  }

  .cartoon-dollar {
    flex-basis: auto;
    width: 72px;
    min-height: 72px;
    height: 72px;
    font-size: 3.2rem;
    align-self: flex-end;
  }

  .search-row,
  .panel-heading-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row button,
  .result-actions button {
    width: 100%;
  }

  .search-form label {
    font-size: 1rem;
  }

  input {
    font-size: 1.02rem;
    padding: 14px 13px;
  }

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

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }

  .submit-row-3 {
    grid-template-columns: 1fr 1fr;
  }

  .submit-row-3 > :last-child {
    grid-column: 1 / -1;
  }

  .btn-submit {
    justify-self: stretch;
    text-align: center;
  }
}

