:root {
  --ink: #16202b; --muted: #5f6b78; --line: #dde3ea; --bg: #f6f8fb; --card: #fff;
  --accent: #2b7fd4; --accent-ink: #fff; --ok: #1f8f55; --warn: #b8741a; --bad: #c0392b;
  --f0: #9aa5b1; --f1: #b9dcf5; --f2: #6fb6ec; --f3: #2b7fd4; --f4: #7b3fd1;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.bar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.bar nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
main { min-height: calc(100vh - 52px); }
.page { max-width: 880px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow-page, body.narrow main { max-width: 560px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 28px; letter-spacing: -0.02em; margin: 4px 0 16px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
.muted { color: var(--muted); }
.credit { color: var(--muted); font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.button, button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: 10px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
button.link { background: none; color: var(--muted); padding: 6px 0; font-weight: 400; text-decoration: underline; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 8px; }
.messages { max-width: 880px; margin: 12px auto 0; padding: 0 16px; }
.msg { padding: 10px 12px; border-radius: 8px; background: #e8f4ec; margin: 8px 0; }
.msg.error { background: #fbe9e7; color: var(--bad); }

/* the map page */
body.full main { position: relative; height: calc(100vh - 52px); min-height: 0; }
#map { position: absolute; inset: 0; }
.panel { position: absolute; top: 12px; left: 12px; width: min(340px, calc(100% - 24px)); background: var(--card);
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 4px 24px rgba(20, 30, 45, .15); z-index: 1; }
.panel h1 { font-size: 20px; margin: 0 0 10px; }
.panel input { width: 100%; }
#results { margin-top: 6px; max-height: 40vh; overflow: auto; }
.result { display: block; padding: 8px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.result span { color: var(--muted); font-size: 13px; }
.result em { color: var(--accent); font-style: normal; font-size: 13px; }
.legend { font-size: 12px; color: var(--muted); line-height: 1.9; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin: 0 2px 0 6px; }
.dot.f0 { background: var(--f0); } .dot.f1 { background: var(--f1); } .dot.f2 { background: var(--f2); }
.dot.f3 { background: var(--f3); } .dot.f4 { background: var(--f4); }
.swatch { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: 3px; margin: 0 2px 0 6px; }
.swatch.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); }
.swatch.lift { background: #2b2b2b; height: 2px; }
.pop { display: block; text-decoration: none; color: var(--ink); } .pop span { display: block; color: var(--muted); font-size: 12px; }

/* resorts */
.view3d { padding: 0; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(#cfe3f7, #f4f8fc); }
.view3d iframe { width: 100%; height: 100%; border: 0; }
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.day strong { font-size: 20px; } .day small { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; background: var(--card); }
.table th, .table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
@media (max-width: 600px) { .table th:nth-child(2), .table td:nth-child(2) { display: none; } }

/* trips */
.trip-row { display: grid; gap: 2px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; margin: 8px 0; text-decoration: none; color: var(--ink); }
.trip-row span { color: var(--muted); font-size: 14px; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef2f6; color: var(--muted); justify-self: start; }
.status.on { background: #e3f4ea; color: var(--ok); } .status.full { background: #fdf0e1; color: var(--warn); }
.status.cancelled { background: #fbe9e7; color: var(--bad); }
.meter { position: relative; height: 10px; background: #eef2f6; border-radius: 999px; margin: 8px 0 12px; }
.meter span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; }
.meter i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.spots { padding-left: 18px; }
.join { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.join input[type=number] { width: 70px; }
.join input[name=note] { flex: 1 1 200px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.form .field { display: grid; gap: 4px; margin-bottom: 14px; }
.form small { color: var(--muted); }
.errorlist { color: var(--bad); margin: 0; padding-left: 18px; font-size: 14px; }
