/* Yonder — family adventure finder. Brand: teal + warm orange. Light/dark. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f5f9;
  --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --brand: #0f766e; --brand-600: #0d6b63; --brand-100: #ccfbf1;
  --accent: #ea580c; --accent-50: #fff7ed;
  --green: #15803d; --green-bg: #dcfce7; --amber: #b45309; --amber-bg: #fef3c7;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #131c2e; --surface-2: #0f1828;
    --text: #e5edf7; --muted: #94a3b8; --line: #253046;
    --brand: #2dd4bf; --brand-600: #14b8a6; --brand-100: #134e4a;
    --accent: #fb923c; --accent-50: #2a1c10;
    --green: #4ade80; --green-bg: #14331f; --amber: #fbbf24; --amber-bg: #3a2c08;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); }
.muted { color: var(--muted); font-size: .9rem; }
.grow { flex: 1; } .center { text-align: center; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 26px; }
.brand b { display: block; font-size: 1.1rem; }
.brand .tag { display: block; font-size: .78rem; color: var(--muted); }

/* Hero */
.hero { text-align: center; padding: 18px 8px 26px; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
.hero p { color: var(--muted); margin-top: 8px; }

.main { display: flex; flex-direction: column; gap: 16px; }

/* Cards & fields */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.loc .muted { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 600; font-size: .92rem; }
.field-hint { color: var(--muted); font-weight: 400; font-size: .82rem; }

/* Inputs */
input[type=text], input:not([type]), input[type=number], .money, .row input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--text); font-size: 1rem; }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.row { display: flex; gap: 8px; align-items: center; }
.money { display: flex; align-items: center; gap: 4px; padding: 0 0 0 12px; }
.money span { color: var(--muted); } .money input { border: 0; background: transparent; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Segmented control */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-btn { display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  color: var(--text); font-size: .9rem; cursor: pointer; transition: .12s; text-align: center; }
.seg-btn:hover { border-color: var(--brand); }
.seg-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.seg-ic { font-size: 1.05rem; }

/* Compass (4-way + center random) */
.compass { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 6px; width: 168px; margin: 2px auto; }
.compass-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  border-radius: 10px; font-weight: 700; font-size: .95rem; cursor: pointer; transition: .12s;
  padding: 10px 0; }
.compass-btn:hover:not(:disabled) { border-color: var(--brand); }
.compass-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.compass-n { grid-column: 2; grid-row: 1; }
.compass-w { grid-column: 1; grid-row: 2; }
.compass-c { grid-column: 2; grid-row: 2; border-radius: 50%; font-size: 1.1rem; font-weight: 400; }
.compass-e { grid-column: 3; grid-row: 2; }
.compass-s { grid-column: 2; grid-row: 3; }
.compass-off { opacity: .45; pointer-events: none; }

/* Range + stepper */
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--brand); }
.range-val { min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.stepper span { min-width: 40px; text-align: center; font-weight: 600; font-size: 1.1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: .12s; }
.btn:hover { border-color: var(--brand); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn.block { width: 100%; margin-top: 4px; }
.btn.big { padding: 15px; font-size: 1.05rem; margin-top: 18px; }
.btn.sm { padding: 8px 12px; font-size: .85rem; }
.btn.ghost { background: transparent; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* Feedback */
.err { color: #dc2626; font-size: .9rem; margin-top: 8px; }
.ok { color: var(--green); font-size: .9rem; margin-top: 12px; }
.warn { color: var(--amber); background: var(--amber-bg); padding: 8px 12px; border-radius: 10px; font-size: .85rem; margin-top: 10px; }
.banner { background: var(--brand-100); color: var(--brand-600); padding: 12px 14px; border-radius: 12px; font-size: .92rem; }
@media (prefers-color-scheme: dark) { .banner { color: var(--brand); } }

/* Results */
.results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.results-head h2 { font-size: 1.3rem; }
.results-cta { display: flex; gap: 8px; }
.feed { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.see-more { margin-top: 16px; }
.empty { text-align: center; }
.empty .btn { margin-top: 14px; }

/* Adventure card */
.adv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); }
.adv-spot { outline: 3px solid var(--accent); outline-offset: 2px; }
.adv-head { display: flex; gap: 14px; align-items: flex-start; }
.adv-ic { font-size: 2rem; line-height: 1; }
.adv h3 { font-size: 1.15rem; }
.adv-head .muted { margin-top: 3px; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 4px; }
.adv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); }
.pill-slate { color: var(--muted); }
.pill-green { color: var(--green); background: var(--green-bg); border-color: transparent; }
.pill-amber { color: var(--amber); background: var(--amber-bg); border-color: transparent; }
.pill-veh { color: var(--brand-600); background: var(--brand-100); border-color: transparent; }
@media (prefers-color-scheme: dark) { .pill-veh { color: var(--brand); } }
.pill-eff { color: var(--accent); background: var(--accent-50); border-color: transparent; }

/* Legend */
.legend { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; }
.legend summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 6px 0; }
.legend-grid { display: grid; gap: 8px; padding: 6px 0 10px; font-size: .86rem; color: var(--muted); }
.legend-grid b { color: var(--text); }

/* Sponsored + ad slots — calm, clearly labeled, never tacky */
.adv-sponsored { position: relative; border-style: dashed; background: linear-gradient(0deg, var(--accent-50), var(--surface)); }
.sponsored-tag, .adslot-label { position: absolute; top: 10px; right: 12px; font-size: .68rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.adslot { position: relative; border: 1px dashed var(--line); border-radius: 12px; padding: 22px 14px 14px;
  background: var(--surface); text-align: center; }
.adslot-demo { color: var(--muted); font-size: .85rem; }

/* Toast + footer */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .88rem; box-shadow: var(--shadow); }
.foot { margin-top: 30px; text-align: center; }
.foot p { color: var(--muted); font-size: .78rem; }
