/* =====================================================================
   VaarMaat - design system ("quiet luxury": navy, ivory, brass, serif)
   ===================================================================== */
:root {
  --navy: #0c2233;
  --navy-2: #163a52;
  --navy-3: #1f4a66;
  --water: #2c7387;
  --aqua: #9cc7cf;
  --sand: #f5f1ea;          /* page background (ivory) */
  --paper: #fffdf9;         /* card surface */
  --ink: #121c24;
  --muted: #6c7378;
  --line: #e7e0d3;
  --line-strong: #d6cdbd;
  --brass: #a8875a;
  --brass-2: #c4a675;
  --brass-soft: #f3ece0;
  --ok: #2e7a57;
  --ok-bg: #e6f1ea;
  --warn: #9a6a12;
  --warn-bg: #f8efdc;
  --bad: #a3342c;
  --bad-bg: #f8e6e3;
  --rivier: #2c7387;
  --kanaal: #5a4c8f;
  --gemengd: #a8875a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 1px rgba(12, 34, 51, .03), 0 18px 40px -22px rgba(12, 34, 51, .22);
  --shadow-lg: 0 30px 60px -30px rgba(12, 34, 51, .45);
  --font: "Inter Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--navy-3); text-decoration: none; }
a:hover { color: var(--brass); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.005em; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.eyebrow { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: 6px; }
.serif { font-family: var(--serif); }
.boot-splash { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-family: var(--serif); font-size: 1.4rem; letter-spacing: .04em; }
::selection { background: var(--brass-2); color: var(--navy); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: radial-gradient(120% 60% at 0% 0%, #163a52 0%, var(--navy) 60%);
  color: #c9d5dc; padding: 28px 16px 20px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; padding: 0 12px 28px; }
.brand img { width: 34px; height: 34px; }
.brand-word { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; letter-spacing: .02em; line-height: 1; }
.brand-word small { display: block; font-family: var(--font); font-size: .58rem; letter-spacing: .32em; text-transform: uppercase; color: var(--brass-2); margin-top: 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; color: #b9c7cf; padding: 11px 14px; border-radius: 12px; font-weight: 450;
  position: relative; transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { color: #fff; background: rgba(196,166,117,.12); }
.nav a.active::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass-2); }
.nav .ico { width: 20px; text-align: center; opacity: .9; }
.sidebar .spacer { flex: 1; }
.sidebar .who { font-size: .82rem; padding: 14px 12px 0; color: #8fa3af; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .who b { display: block; color: #fff; font-weight: 500; }
.main { padding: 36px clamp(16px, 3.5vw, 56px) 56px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { margin: 0; }

.tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 22px 16px 100px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(12,34,51,.97); backdrop-filter: blur(10px); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(196,166,117,.25);
  }
  .tabbar a { color: #9fb2bd; display: flex; flex-direction: column; align-items: center; font-size: .66rem; padding: 4px 0; gap: 3px; letter-spacing: .02em; }
  .tabbar a .ico { font-size: 1.15rem; }
  .tabbar a.active { color: var(--brass-2); }
  h1 { font-size: 1.9rem; }
}

/* ---------- Cards & grid ---------- */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border: 1px solid var(--line); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--brass); }
.grid { display: grid; gap: 20px; }
.grid.dash { grid-template-columns: 1.45fr 1fr; align-items: start; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid.dash, .grid.two, .grid.three { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 20px; }
.grid > *, .routes-layout > *, .shell > * { min-width: 0; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: #4d565c; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 4px; text-transform: none; letter-spacing: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 4px rgba(168,135,90,.15); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
textarea { min-height: 80px; resize: vertical; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: .9rem; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-family: var(--serif); font-size: 1.3rem; padding: 0; margin-bottom: 12px; color: var(--navy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .88rem; letter-spacing: .02em;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 22px; cursor: pointer; background: var(--navy); color: #fff;
  text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.gold { background: var(--brass); color: #fff; }
.btn.gold:hover { background: #95774d; }
.btn.secondary { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--navy); color: var(--navy); background: rgba(12,34,51,.03); }
.btn.ghost { background: transparent; color: var(--navy); padding: 8px 12px; }
.btn.ghost:hover { background: rgba(12,34,51,.05); color: var(--navy); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 7px 14px; font-size: .8rem; }
.btn.block { width: 100%; }
.btn.fav { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn.fav.on { background: var(--brass-soft); border-color: var(--brass-2); color: #7a5c2e; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--ink);
  transition: all .15s;
}
.chip:hover { border-color: var(--navy); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 14px; }
.alert.error { background: var(--bad-bg); color: var(--bad); }
.alert.info { background: var(--brass-soft); color: #6b5230; border: 1px solid #eadfcb; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  background:
    radial-gradient(90% 70% at 85% 10%, rgba(196,166,117,.18) 0%, transparent 60%),
    linear-gradient(170deg, #0c2233 0%, #10324a 55%, #1d4f68 100%);
  color: #d9e2e7; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-hero .brand { padding-left: 0; }
.auth-hero h1 { font-size: 3.4rem; color: #fff; max-width: 13ch; line-height: 1.05; margin-top: 56px; }
.auth-hero h1 em { color: var(--brass-2); font-style: italic; }
.auth-hero .waves { position: absolute; left: 0; right: 0; bottom: 0; opacity: .5; }
.auth-hero ul { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; max-width: 42ch; }
.auth-hero li { padding-left: 28px; position: relative; color: #c3d0d7; }
.auth-hero li::before { content: ""; position: absolute; left: 0; top: .7em; width: 16px; height: 1px; background: var(--brass-2); }
.auth-panel { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; padding: 36px; }
.auth-card h2 { font-size: 2rem; }
.auth-card .brand { color: var(--navy); padding-left: 0; }
.pw-meter { height: 4px; border-radius: 4px; background: #ebe5da; overflow: hidden; margin-top: 8px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 22px 70px; }
  .auth-hero h1 { font-size: 2.2rem; margin-top: 28px; }
  .auth-hero ul { display: none; }
  .auth-card { padding: 26px; }
}

/* ---------- Weather ---------- */
.wx-now { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.wx-icon { font-size: 3rem; line-height: 1; }
.wx-temp { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.wx-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; flex: 1; min-width: 220px; }
.wx-meta div { background: #f6f3ed; border-radius: 10px; padding: 8px 10px; }
.wx-meta b { display: block; font-size: 1.05rem; }
.wx-meta small { display: block; font-size: .75rem; }
.wx-meta b .arrow { font-size: .9rem; }
.wx-meta span:not(.arrow) { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wx-advice { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.wx-advice.ok { background: var(--ok-bg); color: var(--ok); }
.wx-advice.caution { background: var(--warn-bg); color: var(--warn); }
.wx-advice.danger { background: var(--bad-bg); color: var(--bad); }
.wx-hours { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: thin; }
.wx-hour { flex: 0 0 64px; text-align: center; background: #f6f3ed; border-radius: 10px; padding: 8px 4px; font-size: .8rem; }
.wx-hour .t { color: var(--muted); }
.wx-hour .i { font-size: 1.3rem; }
.wx-hour .bft { font-weight: 700; }
.wx-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.wx-day { text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; font-size: .82rem; }
.wx-day .i { font-size: 1.4rem; }
.wx-day .d { font-weight: 600; text-transform: capitalize; }
.arrow { display: inline-block; transition: transform .2s; }
@media (max-width: 560px) { .wx-days { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Routes ---------- */
.routes-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.filters { position: sticky; top: 16px; }
.filters h3 { margin-top: 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.range-out { float: right; font-weight: 600; color: var(--navy); }
input[type=range] { width: 100%; accent-color: var(--water); }
.filter-toggle { display: none; }
@media (max-width: 1000px) {
  .routes-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filter-toggle { display: inline-flex; }
  .filters.collapsed .filter-body { display: none; }
}

.map { height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid #ddd6ca; z-index: 0; }
.map.tall { height: 460px; }
@media (max-width: 860px) { .map, .map.tall { height: 300px; } }

.route-list { display: grid; gap: 12px; margin-top: 16px; }
.route-card { display: grid; grid-template-columns: 6px 1fr auto; gap: 14px; padding: 0; overflow: hidden; }
.route-card .stripe { background: var(--rivier); }
.route-card .stripe.kanaal { background: var(--kanaal); }
.route-card .stripe.gemengd { background: var(--gemengd); }
.route-card .body { padding: 14px 0; min-width: 0; }
.route-card .side { padding: 14px 14px 14px 0; display: flex; flex-direction: column; align-items: end; gap: 8px; }
.route-card h3 { margin: 0 0 2px; }
.route-card h3 a { color: var(--ink); }
.route-card .sub { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; }
.stats span b { font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge.rivier { background: #e1f2f8; color: #0f6d88; }
.badge.kanaal { background: #ece6fa; color: #5135a3; }
.badge.gemengd { background: #f8eadc; color: #8e4f10; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: #eee9e0; color: var(--muted); }
@media (max-width: 560px) {
  .route-card { grid-template-columns: 6px 1fr; }
  .route-card .side { grid-column: 2; flex-direction: row; align-items: center; padding: 0 14px 14px 0; justify-content: space-between; }
}

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.specs div { background: #f6f3ed; border-radius: 10px; padding: 10px 12px; }
.specs span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.specs b { font-size: 1.1rem; }
.fitlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fitlist li { padding: 8px 10px; border-radius: 8px; font-size: .9rem; }
.fitlist li.bad { background: var(--bad-bg); color: var(--bad); }
.fitlist li.warn { background: var(--warn-bg); color: var(--warn); }
.fitlist li.ok { background: var(--ok-bg); color: var(--ok); }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .meta { font-size: .82rem; color: var(--muted); }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .big { font-size: 2rem; }

/* ---------- Boats ---------- */
.boat-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.boat-card .actions { margin-left: auto; }
.boat-card .boat-ico { width: 48px; height: 48px; border-radius: 12px; background: #e6f3f8; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.boat-card .grow { flex: 1 1 220px; min-width: 0; }

.geo-results { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.geo-results li button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 9px 12px; cursor: pointer; }
.geo-results li button:hover, .geo-results li button:focus { background: #f2eee6; }
.geo-results li + li { border-top: 1px solid var(--line); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 2000; font-size: .9rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) { .toast { bottom: 84px; } }

.sources { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 4px; }
.disclaimer { font-size: .78rem; color: var(--muted); margin-top: 18px; }
.leaflet-container { font-family: var(--font); }
.home-dot { width: 18px; height: 18px; border-radius: 50%; background: #e4572e; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(228,87,46,.35); }
.home-pin { background: none; border: 0; }

/* ---------- Navigation (full screen) ---------- */
body.nav-mode .sidebar, body.nav-mode .tabbar { display: none; }
body.nav-mode .shell { grid-template-columns: 1fr; }
body.nav-mode .main { padding: 0; max-width: none; }
.nav-screen { position: fixed; inset: 0; z-index: 1500; background: #dfe9ee; overflow: hidden; }
.nav-map { position: absolute; inset: 0; }
.nav-top {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 1000;
  display: flex; gap: 14px; align-items: center; background: var(--navy); color: #fff; border-radius: 16px;
  padding: 12px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: 560px; margin: 0 auto;
}
.nav-top.bad { background: var(--bad); }
.nav-top.report { background: #c2701d; }
.nav-top-icon { font-size: 2rem; width: 48px; height: 48px; display: grid; place-items: center; background: rgba(255,255,255,.12); border-radius: 12px; flex: none; }
.nav-top-text { min-width: 0; }
.nav-top-dist { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.nav-top-text > div:nth-child(2) { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-top-sub { font-size: .85rem; opacity: .85; }
.nav-alert {
  position: absolute; top: calc(104px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 1000; max-width: 560px; margin: 0 auto;
  padding: 10px 14px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow);
}
.nav-alert.warn { background: var(--warn-bg); color: var(--warn); }
.nav-alert.bad { background: var(--bad); color: #fff; }
.nav-badge { position: absolute; top: calc(104px + env(safe-area-inset-top)); right: 12px; z-index: 999; background: #6b4fbb; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; padding: 4px 8px; border-radius: 6px; }
.nav-fab { position: absolute; right: 12px; bottom: 170px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.fab { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.2); font-size: 1.4rem; cursor: pointer; color: var(--navy); }
.fab.report { background: #e4892b; color: #fff; font-size: 1.6rem; }
.nav-bottom {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1000; max-width: 560px; margin: 0 auto;
  background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.nav-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.nav-stats b { display: block; font-size: 1.5rem; line-height: 1.1; }
.nav-stats span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.nav-progress { height: 6px; background: #e6e1d7; border-radius: 6px; margin: 10px 0 8px; overflow: hidden; }
.nav-progress span { display: block; height: 100%; width: 0; background: var(--water); transition: width .5s; }
.nav-bottom-row { display: flex; justify-content: space-between; align-items: center; }
.nav-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1100; background: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.25); max-width: 600px; margin: 0 auto;
}
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.report-type { border: 1px solid var(--line); background: #faf8f4; border-radius: 12px; padding: 10px 6px; font: inherit; font-size: .82rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); }
.report-type span { font-size: 1.6rem; }
.report-type:hover { background: #f1ece3; }
.nav-sheet input { margin-bottom: 10px; }
.nav-overlay { position: absolute; inset: 0; z-index: 1200; background: rgba(11,58,83,.45); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.nav-start-card { width: 100%; max-width: 460px; }
.boat-pin { background: none; border: 0; }
.boat-arrow {
  width: 34px; height: 34px; border-radius: 50%; background: var(--water); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35);
  position: relative; transition: transform .4s;
}
.boat-arrow::after {
  content: ""; position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 14px solid #fff;
}
.poi { background: #fff; border: 2px solid var(--navy); border-radius: 50%; display: grid !important; place-items: center; font-size: .8rem; line-height: 1; }
.poi.lock { border-color: #6b4fbb; }
.poi.movable { border-color: #c2701d; }
.poi.bad { border-color: var(--bad); background: var(--bad-bg); }
.report-pin { background: #fff; border: 2px solid #e4892b; border-radius: 50%; display: grid !important; place-items: center; font-size: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.report-pop .actions { margin-top: 8px; }
.nav-pick { display: flex; align-items: center; gap: 12px; }
.nav-pick .grow { flex: 1; min-width: 0; }
.nav-pick h3 { margin: 0 0 2px; }
.nav-pick .sub { color: var(--muted); font-size: .85rem; }
.bad-text { color: var(--bad); }
#nav-q { margin-bottom: 4px; }

/* =====================================================================
   Luxe components: dashboard hero, tiles, fleet, boat profile
   ===================================================================== */
.i { display: inline-block; vertical-align: middle; flex: none; }
.btn .i { margin: -2px 0; }
.nav .ico, .tabbar .ico { display: inline-flex; }
.back-link { display: inline-block; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.back-link:hover { color: var(--brass); }
.warn-text { color: var(--warn) !important; }
.bad-text { color: var(--bad) !important; }
.neutral-text { color: var(--muted) !important; }

/* Dashboard hero */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; min-height: 320px; margin-bottom: 22px;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding: 40px;
  background: radial-gradient(80% 90% at 100% 0%, rgba(196,166,117,.22), transparent 60%), linear-gradient(160deg, #0c2233, #18435d);
  color: #fff; box-shadow: var(--shadow-lg);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,22,33,.82) 0%, rgba(8,22,33,.45) 55%, rgba(8,22,33,.15) 100%), linear-gradient(0deg, rgba(8,22,33,.55), transparent 50%); }
.hero-content, .hero-weather { position: relative; z-index: 1; }
.hero h1 { font-size: 3.2rem; color: #fff; margin-bottom: 8px; }
.hero h1 em { font-style: italic; color: var(--brass-2); }
.hero .eyebrow { color: var(--brass-2); text-transform: uppercase; }
.hero-sub { font-size: 1.05rem; color: #d7e0e5; max-width: 46ch; margin-bottom: 22px; }
.hero-sub b { color: #fff; font-weight: 600; }
.btn.hero-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(6px); }
.btn.hero-ghost:hover { background: rgba(255,255,255,.16); }
.hero-weather { min-width: 230px; max-width: 280px; padding: 18px 20px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(12px); font-size: .86rem; color: #dbe4e9; }
.hero-weather:empty { display: none; }
.hero-weather a { color: #fff; }
.hw-top { display: flex; align-items: center; gap: 10px; }
.hw-icon { font-size: 1.8rem; }
.hw-temp { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: #fff; }
.hw-line { margin: 6px 0 10px; }
.hw-advice { font-weight: 600; font-size: .82rem; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.hw-advice.ok { color: #b9e3c9; } .hw-advice.caution { color: #f3d49b; } .hw-advice.danger { color: #f4b2a9; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 26px 22px; min-height: 0; border-radius: 20px; }
  .hero h1 { font-size: 2.3rem; }
  .hero-weather { max-width: none; }
}

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); transition: transform .15s, border-color .15s; min-width: 0; }
.tile:hover { transform: translateY(-2px); border-color: var(--brass-2); color: var(--ink); }
.tile-ico { color: var(--brass); margin-bottom: 8px; }
.tile-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tile b { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { color: var(--muted); font-size: .8rem; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .tiles { gap: 10px; } .tile { padding: 16px; } .tile b { font-size: 1.3rem; } }

/* Tasks / logs / lists */
.task-list, .log-list, .doc-list { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.task:last-child, .log:last-child, .doc-list li:last-child { border-bottom: 0; }
.task-ico, .doc-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brass-soft); color: var(--brass); flex: none; }
.task.setup .task-ico { background: #edf2f4; color: var(--navy-3); }
.task .grow, .log .grow, .doc-list .grow { flex: 1; min-width: 0; }
.log { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.log-date { width: 52px; flex: none; text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.log-date b { display: block; font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1; }
.log-date span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.log-cost { font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; }
.log-actions { display: flex; gap: 2px; }
.log p { margin: 6px 0 0; color: #3d474e; }
.year-head { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin: 18px 0 2px; display: flex; justify-content: space-between; }
.year-head:first-child { margin-top: 0; }
.doc-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.done-list { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.done-list summary { cursor: pointer; font-weight: 600; }
.done-list ul { padding-left: 18px; }
.empty-inline { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.empty-state { text-align: center; padding: 48px 24px; color: var(--brass); }
.empty-state h2 { color: var(--navy); margin-top: 12px; }

/* Fleet */
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-bottom: 22px; }
.fleet-card { padding: 0; overflow: hidden; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.fleet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.fleet-photo { aspect-ratio: 16 / 10; background: linear-gradient(160deg, #0c2233, #1d4f68); display: grid; place-items: center; color: rgba(196,166,117,.7); }
.fleet-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fleet-body { padding: 22px 24px 24px; }
.fleet-body h2 { font-size: 1.8rem; margin-bottom: 2px; }
.fleet-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.fleet-stats span, .boat-stats span, .summary-card span { display: block; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fleet-stats b { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }

/* Boat profile */
.boat-hero { position: relative; border-radius: 24px; overflow: hidden; min-height: 340px; background: linear-gradient(160deg, #0c2233, #1d4f68); box-shadow: var(--shadow-lg); display: flex; align-items: flex-end; }
.boat-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.boat-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,22,33,.85) 0%, rgba(8,22,33,.2) 55%, transparent 100%); }
.boat-hero-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: rgba(196,166,117,.85); font-size: .9rem; }
.boat-hero-overlay { position: relative; z-index: 1; padding: 34px 38px; color: #fff; }
.boat-hero-overlay h1 { color: #fff; font-size: 3.4rem; margin: 0; }
.boat-hero-overlay p { color: #cfdae0; margin: 4px 0 0; }
.boat-hero-overlay .eyebrow { color: var(--brass-2); }
.boat-hero-actions { position: absolute; z-index: 1; top: 20px; right: 20px; }
.file-btn { cursor: pointer; }
.boat-stats { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: -34px 28px 0; position: relative; z-index: 2; }
.boat-stats > div { padding: 18px 20px; border-right: 1px solid var(--line); }
.boat-stats > div:last-child { border-right: 0; }
.boat-stats b { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; white-space: nowrap; }
@media (max-width: 1000px) {
  .boat-stats { grid-template-columns: repeat(3, 1fr); margin: -28px 12px 0; }
  .boat-stats > div:nth-child(3) { border-right: 0; }
  .boat-stats > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .boat-hero-overlay h1 { font-size: 2.4rem; }
  .boat-hero-overlay { padding: 24px 24px 50px; }
  .boat-hero { min-height: 260px; }
}
.tabs { display: flex; gap: 4px; margin: 28px 0 22px; border-bottom: 1px solid var(--line-strong); overflow-x: auto; scrollbar-width: none; }
.tabs a { position: relative; padding: 12px 18px; color: var(--muted); font-weight: 500; white-space: nowrap; letter-spacing: .01em; }
.tabs a:hover { color: var(--navy); }
.tabs a.on { color: var(--navy); }
.tabs a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brass); }
.tabs .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: middle; }
.spec-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.spec-list dt { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.spec-list dd { margin: 2px 0 0; font-weight: 500; }
.mini-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.summary-card { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 20px 10px; }
.summary-card b { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.details-form fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(0deg, var(--paper) 70%, transparent); padding: 14px 0 4px; }
.danger-zone { border-color: #ecd3cf; }
.danger-zone h2 { color: var(--bad); font-size: 1.3rem; }

/* Gallery */
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 26px; margin-bottom: 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--brass); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .95rem; transition: border-color .15s, background .15s; text-align: center; }
.dropzone span { color: var(--navy); }
.dropzone:hover, .dropzone.over { border-color: var(--brass); background: var(--brass-soft); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.photo { margin: 0; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.photo.cover { border-color: var(--brass-2); box-shadow: 0 0 0 2px var(--brass-soft); }
.photo-open { all: unset; display: block; cursor: zoom-in; width: 100%; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.cover-tag { position: absolute; top: 10px; left: 10px; background: rgba(12,34,51,.85); color: var(--brass-2); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; font-weight: 600; }
.photo figcaption { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; }
.photo figcaption input { border: 0; padding: 6px 4px; font-size: .85rem; background: transparent; }
.photo figcaption input:focus { box-shadow: none; border-bottom: 1px solid var(--brass); border-radius: 0; }
.photo-actions { display: flex; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(6,16,24,.92); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox p { color: #d9e2e7; font-family: var(--serif); font-size: 1.3rem; text-align: center; margin-top: 12px; }
.lb-close { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* Refinements of earlier components */
.badge { letter-spacing: .02em; font-weight: 600; border-radius: 999px; padding: 4px 10px; }
.badge.neutral { background: #efeae1; color: var(--muted); }
.route-card { border-radius: var(--radius); }
.route-card h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.specs div, .wx-meta div, .wx-hour { background: #f7f3ec !important; }
.wx-temp { font-family: var(--serif); font-weight: 500; }
.mini-list li { padding: 12px 0; }
.toast { background: var(--navy); border: 1px solid rgba(196,166,117,.35); border-radius: 999px; padding: 11px 20px; }
/* Lining figures for numbers set in the serif */
.tile b, .fleet-stats b, .boat-stats b, .summary-card b, .log-date b, .log-cost, .hw-temp, .wx-temp, .year-head, .specs b { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
label.btn { text-transform: none; letter-spacing: .02em; font-size: .88rem; margin: 0; color: #fff; }
label.btn.small { font-size: .8rem; }
label.btn:not(.gold):not(.secondary) { color: #fff; }
@media (max-width: 560px) {
  .boat-stats { grid-template-columns: repeat(2, 1fr); }
  .boat-stats > div, .boat-stats > div:nth-child(3), .boat-stats > div:nth-child(-n+3) { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .boat-stats > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .boat-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
  .boat-stats b { font-size: 1.25rem; }
  .spec-list { grid-template-columns: 1fr; }
  .summary-card b { font-size: 1.2rem; }
}
.year-head .muted { font-family: var(--font); font-size: .82rem; font-weight: 500; }

/* Continue with Google / Microsoft */
.social { display: grid; gap: 10px; margin: 18px 0 4px; }
.social:empty { display: none; }
.btn.social-btn { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); font-weight: 600; gap: 12px; padding: 12px 18px; }
.btn.social-btn:hover { background: #faf8f4; border-color: var(--navy); color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-methods { list-style: none; margin: 0; padding: 0; }
.login-methods li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.login-methods li:last-child { border-bottom: 0; }
.login-methods .grow { flex: 1; min-width: 0; }
.lm-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #f7f3ec; color: var(--brass); flex: none; }

/* =====================================================================
   Route community: stars, stops, reviews, tips, admin editor
   ===================================================================== */
.stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 2px; color: #e4dccd; vertical-align: -1px; white-space: nowrap; font-size: .9rem; }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars.md { font-size: 1.1rem; }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--brass); width: 0; }
.stars-fill::before { content: "\2605\2605\2605\2605\2605"; }
.route-meta { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px; font-size: .85rem; flex-wrap: wrap; }
.rating-line { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink); font-size: .9rem; }
.rating-line:hover { color: var(--brass); }
.rating-line b { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; font-variant-numeric: lining-nums; }
.rating-line span:last-child { color: var(--muted); }
.admin-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--brass-2); border-radius: var(--radius-sm); background: var(--brass-soft); color: #6b5230; font-size: .85rem; font-weight: 600; }
.admin-bar > span:first-of-type { margin-right: auto; }

/* stops */
.stop-list { list-style: none; margin: 0; padding: 0; }
.stop { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); transition: background .3s; }
.stop:last-child { border-bottom: 0; }
.stop.flash { background: var(--brass-soft); }
.stop .grow { flex: 1; min-width: 0; }
.stop p { margin: 4px 0 6px; color: #3d474e; font-size: .92rem; }
.stop-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; display: block; line-height: 1.2; }
.stop-km { width: 44px; flex: none; text-align: center; padding-top: 2px; }
.stop-km b { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.stop-km span { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stop-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brass-soft); color: var(--brass); }
.stop-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.stop-links .badge { display: inline-flex; gap: 4px; align-items: center; }
.row-actions, .tip-actions { display: flex; gap: 2px; flex: none; }
.t-restaurant { --pin: #9a4f2c; } .t-cafe { --pin: #7a5c2e; } .t-bezienswaardigheid { --pin: #5a4c8f; }
.t-aanlegplaats, .t-jachthaven { --pin: #2c7387; } .t-brandstof { --pin: #6c7378; } .t-overig { --pin: var(--brass); }
.stop-ico[class*="t-"] { color: var(--pin); background: color-mix(in srgb, var(--pin) 12%, white); }
.stop-pin { background: #fff; border: 2px solid var(--pin, var(--brass)); border-radius: 50%; color: var(--pin, var(--brass)); display: grid !important; place-items: center; box-shadow: 0 2px 8px rgba(12,34,51,.3); }
.stop-pin.placing { background: var(--brass); color: #fff; border-color: #fff; cursor: grab; }
.placing-mode { cursor: crosshair !important; }
.stop-form { margin-top: 18px; padding: 18px; border: 1px solid var(--brass-2); border-radius: var(--radius-sm); background: #fffaf2; }

/* reviews */
.review-summary { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.review-score { display: grid; justify-items: center; gap: 4px; min-width: 110px; }
.review-score b { font-family: var(--serif); font-size: 3rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.review-bars { display: grid; gap: 5px; }
.bar-row { display: grid; grid-template-columns: 14px 1fr 24px; gap: 10px; align-items: center; font-size: .8rem; }
.bar { height: 6px; border-radius: 6px; background: #eee8de; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--brass); border-radius: 6px; transition: width .4s; }
.review-form { padding: 18px 0; border-bottom: 1px solid var(--line); }
.star-picker { display: flex; align-items: center; gap: 2px; margin: 4px 0 12px; }
.star-picker button { background: none; border: 0; font-size: 1.9rem; line-height: 1; color: #e4dccd; cursor: pointer; padding: 0 2px; transition: color .1s, transform .1s; }
.star-picker button.on { color: var(--brass); }
.star-picker button:hover { transform: scale(1.12); }
.star-picker:hover button { color: var(--brass-2); }
.star-picker button:hover ~ button { color: #e4dccd; }
.star-word { margin-left: 10px; }
.review-list { list-style: none; margin: 0; padding: 0; }
.review-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-list li:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-head .btn { margin-left: auto; }
.review-list p { margin: 6px 0 0; color: #3d474e; }
@media (max-width: 560px) { .review-summary { grid-template-columns: 1fr; gap: 14px; } }

/* tips */
.tip-list { list-style: none; margin: 0 0 8px; padding: 0; }
.tip { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.tip .grow { flex: 1; min-width: 0; }
.tip p { margin: 2px 0 4px; }
.tip-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f6; color: var(--navy-3); flex: none; }
.btn.helpful { gap: 5px; color: var(--muted); }
.btn.helpful.on { color: var(--brass); background: var(--brass-soft); }
.btn.helpful:disabled { opacity: .5; cursor: default; }
.tip-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

/* admin route editor */
.editor-map { cursor: crosshair; }
.edit-pin { background: var(--navy); color: #fff; border: 2px solid #fff; border-radius: 50%; display: grid !important; place-items: center; font-size: .72rem; font-weight: 700; box-shadow: 0 2px 8px rgba(12,34,51,.4); }
.edit-pin.start { background: var(--ok); } .edit-pin.end { background: var(--brass); }
.point-list { list-style: none; margin: 0 0 16px; padding: 0; }
.point-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.point-list li .pt-label { font-weight: 600; min-width: 100px; }
.point-list li .btn { margin-left: auto; }
.preview-specs { margin-top: 16px; }

/* =====================================================================
   Routes: filter bar + photo tiles
   ===================================================================== */
.filterbar { padding: 18px 20px; margin-bottom: 18px; position: relative; z-index: 2; }
.fb-search { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 0 4px 14px; margin-bottom: 14px; color: var(--brass); }
.fb-search input { border: 0; padding: 6px 0; font-size: 1.05rem; background: transparent; box-shadow: none !important; }
.fb-search input::placeholder { color: #9aa1a6; }
.fb-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.fb-field, .fb-sort { display: grid; gap: 4px; margin: 0; text-transform: none; letter-spacing: 0; }
.fb-field span, .fb-sort span { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fb-field select, .fb-sort select { padding: 9px 30px 9px 12px; font-size: .88rem; border-radius: 10px; background-color: #fff; }
.fb-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fb-row .check { font-size: .88rem; }
.fb-spacer { flex: 1; }
.fb-sort { display: flex; align-items: center; gap: 10px; }
.fb-sort select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: #fff; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--navy); color: #fff; }
@media (max-width: 1200px) { .fb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .fb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fb-row { gap: 12px; }
  .fb-spacer { display: none; }
}
.result-line { margin: 4px 2px 16px; font-size: .9rem; }
.result-line b { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; font-variant-numeric: lining-nums; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.tile-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile-grid .tile-empty { grid-column: 1 / -1; }
.tile-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.tile-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #0c2233; }
.tile-media img, .tile-media .tile-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.tile-card:hover .tile-media img { transform: scale(1.04); }
.tile-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,22,33,.7) 0%, rgba(8,22,33,0) 45%); pointer-events: none; }
.tile-type { position: absolute; top: 12px; left: 12px; z-index: 1; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.tile-fav { position: absolute; top: 10px; right: 12px; z-index: 1; color: var(--brass-2); font-size: 1.3rem; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.tile-rating { position: absolute; left: 14px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 6px; color: #fff; font-size: .8rem; }
.tile-rating b { font-weight: 600; }
.tile-rating > span:last-child { opacity: .8; }
.tile-rating .stars { color: rgba(255,255,255,.35); }
.tile-rating .stars-fill { color: var(--brass-2); }
.tile-credit { position: absolute; right: 10px; bottom: 10px; z-index: 1; max-width: 45%; font-size: .6rem; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile-body .eyebrow { margin-bottom: 2px; }
.tile-body h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.15; margin: 0; }
.tile-body h3 a { color: var(--ink); }
.tile-body h3 a:hover { color: var(--brass); }
.tile-sub { color: var(--muted); font-size: .86rem; margin: 0 0 8px; }
.tile-stats { display: flex; gap: 0; flex-wrap: wrap; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.tile-stats span + span::before { content: "\00b7"; margin: 0 8px; color: var(--line-strong); }
.tile-stats b { color: var(--ink); font-weight: 600; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.tile-grid.compact .tile-body { padding: 14px 16px 16px; }
.tile-grid.compact .tile-body h3 { font-size: 1.2rem; }

.route-hero { position: relative; margin: 0 0 22px; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 6; min-height: 220px; background: #0c2233; box-shadow: var(--shadow-lg); }
.route-hero img, .route-hero .tile-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.route-hero figcaption { position: absolute; right: 14px; bottom: 10px; font-size: .7rem; color: rgba(255,255,255,.85); background: rgba(8,22,33,.45); padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(4px); }
.route-hero figcaption a { color: #fff; text-decoration: underline; }
@media (max-width: 860px) { .route-hero { aspect-ratio: 16 / 9; border-radius: 18px; } }
