/* Enjoy here — prototype styles. Dark editorial, wine-country palette. */

:root {
  --bg:        #0e0e0c;
  --bg-soft:   #161613;
  --bg-card:   #1c1c18;
  --line:      #2a2a25;
  --line-soft: #1f1f1b;
  --ink:       #f3ecdc;
  --ink-soft:  #b9b1a0;
  --ink-mute:  #807866;
  --accent:    #c8954a;       /* muted amber / ochre */
  --accent-2:  #d9a865;
  --danger:    #a23b3b;
  --good:      #5b8a5a;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 30px rgba(0,0,0,0.45);
  --serif:     "Fraunces", Georgia, "Times New Roman", serif;
  --sans:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #070706;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---------- Phone frame (desktop) ---------- */

.device-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(200,149,74,0.06), transparent 60%),
    #07070605;
}

.device-frame {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow), inset 0 0 0 1px #1d1d18;
  min-height: 760px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  .device-stage { padding: 0; }
  .device-frame {
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
    box-shadow: none;
  }
}

/* Status bar — purely decorative */
.status-bar {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--bg);
}
.status-bar .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); margin-left: 4px; }

/* ---------- App shell ---------- */

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  animation: screenIn 0.32s cubic-bezier(.2,.7,.2,1);
  padding-bottom: 78px; /* room for bottom nav */
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-header {
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-header .brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.app-header .brand em { color: var(--accent); font-style: normal; }
.app-header .where {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px;
}
.app-header .where::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,149,74,0.18);
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.back-btn:hover { color: var(--ink); }

/* ---------- Splash ---------- */

.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  gap: 20px;
}
.splash-logo {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.splash-logo em { color: var(--accent); font-style: italic; }
.splash-tag { color: var(--ink-soft); max-width: 280px; font-size: 14px; }
.splash-locating {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-mute);
  display: flex; align-items: center; gap: 10px;
}
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash-resolved {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Interest picker ---------- */

.section-title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 6px 20px 4px;
}
.section-sub {
  margin: 0 20px 18px;
  color: var(--ink-soft);
  font-size: 14px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px 20px;
}
.tile {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  text-align: left;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 112px;
}
.tile:hover { border-color: var(--accent); }
.tile:active { transform: scale(0.97); background: #201f1a; }
.tile .icon { font-size: 22px; }
.tile .label {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}
.tile .blurb { font-size: 12px; color: var(--ink-mute); line-height: 1.35; }

.age-band-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px 20px;
}
.age-tile {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--ink);
  text-align: left;
  transition: border-color 0.2s ease;
}
.age-tile:hover { border-color: var(--accent); }
.age-tile .age {
  font-family: var(--serif);
  font-size: 18px;
}
.age-tile .note { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }

/* ---------- Results ---------- */

.view-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin: 4px 20px 14px;
  align-self: flex-start;
}
.view-toggle button {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  font-weight: 500;
}
.view-toggle button.active {
  background: var(--accent);
  color: #1a1209;
}

.poi-list { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.poi-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.poi-card:hover { border-color: var(--accent); }
.poi-card:active { transform: scale(0.99); }

.poi-thumb {
  width: 96px;
  flex: 0 0 96px;
  background: linear-gradient(135deg, var(--c1, #3a2a1a), var(--c2, #1a1410));
  display: flex;
  align-items: flex-end;
  padding: 8px;
  color: rgba(255,255,255,0.85);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.2;
  position: relative;
}
.poi-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.5));
}
.poi-thumb span { position: relative; z-index: 1; }

.poi-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.poi-body .name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}
.poi-body .name-local { font-size: 11px; color: var(--ink-mute); margin-top: -2px; }
.poi-body .one-liner { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.poi-body .meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 4px;
  align-items: center;
}
.fit-chip {
  background: rgba(200,149,74,0.12);
  color: var(--accent-2);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
}

/* Map */
.map-wrap {
  margin: 0 16px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 380px;
  background: #111;
}
#map { width: 100%; height: 100%; }

.leaflet-container { background: #0b0b09 !important; font-family: var(--sans); }
.pin-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ---------- POI detail ---------- */

.hero {
  height: 200px;
  background: linear-gradient(135deg, var(--c1, #3a2a1a), var(--c2, #1a1410));
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7));
}
.hero .hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}
.hero .name-local { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 4px; }

.detail-meta {
  display: flex;
  gap: 14px;
  padding: 14px 20px 8px;
  font-size: 12px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.detail-meta .fit-chip { font-size: 12px; }

.detail-section { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.detail-section h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin: 0 0 10px;
}
.free-paragraph { font-size: 14.5px; line-height: 1.65; color: var(--ink); }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.info-grid > div { font-size: 13px; }
.info-grid .k {
  display: block;
  color: var(--ink-mute);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.info-grid .v { color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
}
.badge.kid-yes { color: var(--good); border-color: rgba(91,138,90,0.5); }
.badge.kid-no { color: var(--ink-mute); opacity: 0.55; text-decoration: line-through; }

.source-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}
.source-row .conf {
  background: rgba(91,138,90,0.15);
  color: #8fb88e;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
}

/* Locked premium section */
.locked-section {
  position: relative;
  padding: 22px 20px 28px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(200,149,74,0.04));
}
.locked-preview {
  position: relative;
  max-height: 140px;
  overflow: hidden;
  filter: blur(4px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  font-size: 14px;
  line-height: 1.6;
}
.locked-preview::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.unlock-cta {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #1a1209;
  border: none;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  margin-top: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.1s ease, background 0.2s ease;
}
.unlock-cta:hover { background: var(--accent-2); }
.unlock-cta:active { transform: scale(0.985); }
.unlock-cta .sub { display: block; font-size: 12px; font-weight: 500; opacity: 0.75; margin-top: 2px; }

.premium-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.premium-actions button {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.premium-actions button[disabled] { opacity: 0.55; cursor: not-allowed; }
.premium-actions button.saved { border-color: var(--accent); color: var(--accent-2); }
.tooltip { position: relative; }
.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: var(--ink);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.premium-chapter p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 14px;
}
.premium-chapter p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 44px;
  float: left;
  line-height: 0.9;
  padding: 6px 8px 0 0;
  color: var(--accent);
}

/* ---------- Paywall modal ---------- */

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  width: 100%;
  padding: 22px 20px 24px;
  animation: slideUp 0.3s cubic-bezier(.2,.7,.2,1);
  max-height: 90%;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--line); margin: 0 auto 14px;
}
.modal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 4px;
}
.modal .sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 16px; }

.pass-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  text-align: left;
  width: 100%;
  color: var(--ink);
}
.pass-option:hover { border-color: var(--accent); }
.pass-option.selected { border-color: var(--accent); background: rgba(200,149,74,0.08); }
.pass-option .name { font-family: var(--serif); font-size: 16px; }
.pass-option .desc { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.pass-option .price { font-family: var(--serif); font-size: 18px; color: var(--accent); }

.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions .btn-ghost {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}
.fake-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--ink-mute);
  text-align: center;
  font-style: italic;
}

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(14,14,12,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0));
  z-index: 20;
}
.bottom-nav button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  font-weight: 500;
}
.bottom-nav button .ico { font-size: 18px; }
.bottom-nav button.active { color: var(--accent); }

/* ---------- Stub screens ---------- */
.stub {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 30px;
  color: var(--ink-soft);
}
.stub h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--ink); margin: 0 0 8px; }
.stub p { font-size: 14px; max-width: 260px; }
.stub .phase-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 10px;
  background: rgba(200,149,74,0.12);
  color: var(--accent-2);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 60;
  animation: fadeIn 0.2s ease;
  border: 1px solid var(--line);
  white-space: nowrap;
}
