:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #0f2233;
  --muted: #5b6b7a;
  --line: #dfe5eb;
  --accent: #0b6bcb;
  --accent-2: #4aa3df;
  --accent-soft: #e7f1fb;
  --warn: #b45309;
  --warn-soft: #fff5e6;
  --bad: #b42318;
  --good: #2b8a3e;
  --r1: #0b6bcb;
  --r2: #d9480f;
  --r3: #2b8a3e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 34, 51, .06), 0 4px 16px rgba(15, 34, 51, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  height: 56px; display: flex; align-items: center; gap: 20px; padding: 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.poc { font-weight: 500; font-size: 11px; color: var(--warn); background: var(--warn-soft); padding: 2px 8px; border-radius: 99px; }
.steps { display: flex; gap: 4px; flex: 1; justify-content: center; }
.steps button {
  border: 0; background: none; padding: 6px 10px; border-radius: 99px; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap;
}
.steps button .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 11px; font-weight: 700; color: var(--muted); }
.steps button.done .n { background: var(--accent-soft); color: var(--accent); }
.steps button.active { color: var(--ink); background: var(--accent-soft); }
.steps button.active .n { background: var(--accent); color: #fff; }
.steps button:disabled { cursor: default; opacity: .6; }
.user { font-size: 13px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.credits { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 99px; font-weight: 600; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 420px 1fr; height: calc(100% - 56px); }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 20px; }
.mapwrap { position: relative; }
#map { position: absolute; inset: 0; }

@media (max-width: 900px) {
  .steps button .lbl { display: none; }
  .poc { display: none; }
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 60vh; height: auto; }
  .sidebar { order: 2; border-right: 0; padding: 16px; }
  .mapwrap { order: 1; height: 60vh; }
  .timeline { left: 8px !important; right: 8px !important; flex-wrap: wrap; }
  .readout { display: none; }
}

/* ---------- sidebar content ---------- */
.eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
h2 { margin: 4px 0 6px; font-size: 22px; }
h3 { margin: 22px 0 8px; font-size: 15px; }
p { margin: 0 0 12px; line-height: 1.45; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; border-color: transparent; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.swap { border: 1px dashed var(--line); background: none; border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font-size: 12px; background: var(--bg); border: 1px solid var(--line); padding: 3px 9px; border-radius: 99px; }
.callout { font-size: 13px; background: var(--accent-soft); color: #0b4f94; padding: 10px 12px; border-radius: 8px; margin: 12px 0; line-height: 1.4; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.actions { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  border: 1px solid var(--line); background: #fff; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.btn:hover { border-color: #c6d0da; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; flex: 1; }
.btn.primary:hover { background: #095aab; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 6px 10px; font-size: 13px; }
a.btn { text-decoration: none; text-align: center; color: inherit; display: block; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }

.seg { display: flex; background: var(--bg); border-radius: 8px; padding: 3px; margin: 12px 0; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; }
.match { display: flex; gap: 10px; align-items: flex-start; }
.match .tick { color: var(--good); font-weight: 700; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; margin-top: 8px; }
.specs b { display: block; font-size: 14px; }

.polar-box { display: flex; gap: 12px; align-items: center; }
.polar-legend { font-size: 12px; display: grid; gap: 4px; }
.polar-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.ptable { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.ptable th { background: var(--bg); font-weight: 600; padding: 4px; position: sticky; top: 0; }
.ptable td { padding: 0; border: 1px solid var(--line); }
.ptable input { width: 100%; border: 0; padding: 4px 2px; text-align: center; font-size: 12px; background: transparent; }
.ptable input:focus { outline: 2px solid var(--accent-2); }
.ptable-wrap { max-height: 260px; overflow: auto; border-radius: 8px; border: 1px solid var(--line); }

.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 10px 0; cursor: pointer; }

/* tiers */
.tiers { display: grid; gap: 10px; margin: 14px 0; }
.tier {
  text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px 14px; cursor: pointer;
}
.tier.active { border-color: var(--accent); background: var(--accent-soft); }
.tier-top { display: flex; justify-content: space-between; align-items: baseline; }
.tier-top b { font-size: 15px; }
.price { font-size: 13px; font-weight: 700; color: var(--accent); }
.tier ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.divider { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0; }

/* loading */
.progress { list-style: none; padding: 0; margin: 20px 0; }
.progress li { padding: 8px 0; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.progress li.on { color: var(--ink); }
.progress li .s { width: 18px; text-align: center; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* results */
.plan-title { font-size: 20px; font-weight: 700; margin: 2px 0; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.depart-row { display: flex; gap: 8px; margin: 12px 0; }
.depart-row input { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }
.rcard {
  width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 12px 14px 12px 18px; margin: 8px 0; cursor: pointer; position: relative; overflow: hidden;
}
.rcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.rcard.sel { border-color: var(--c); box-shadow: var(--shadow); }
.rc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rc-top b { font-size: 15px; }
.rc-eta { font-size: 15px; font-weight: 700; }
.rc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.rc-grid b { display: block; color: var(--ink); font-size: 14px; }
.rc-via { font-size: 12px; color: var(--muted); margin-top: 8px; }
.rc-warn { font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 6px 8px; border-radius: 6px; margin-top: 8px; }
.ok { color: var(--good); } .low { color: var(--warn); }

.locked { position: relative; border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0; background: repeating-linear-gradient(-45deg, #fafbfc, #fafbfc 8px, #f3f5f7 8px, #f3f5f7 16px); }
.locked b { color: var(--ink); display: block; margin-bottom: 4px; }

.sched { width: 100%; border-collapse: collapse; font-size: 12px; }
.sched th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.sched td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
.sched tr:hover td { background: var(--bg); cursor: pointer; }

.sweep svg { width: 100%; height: auto; display: block; }
.sweep .dot { cursor: pointer; }
.export { display: grid; gap: 8px; }
.soon { font-size: 10px; background: var(--bg); padding: 1px 6px; border-radius: 99px; margin-left: 6px; color: var(--muted); }
.rejected { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.rejected li { margin: 3px 0; }

/* ---------- map ---------- */
.layers {
  position: absolute; top: 12px; right: 12px; z-index: 500; background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 12px; font-size: 13px; display: grid; gap: 6px;
}
.layers label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.toggles { display: flex; gap: 4px; }
.tgl { flex: 1; justify-content: center; padding: 4px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; user-select: none; }
.tgl input { position: absolute; opacity: 0; pointer-events: none; }
.tgl:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.tgl:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.timeline {
  position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 500; background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 14px; display: flex; gap: 14px; align-items: center;
}
.play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; font-size: 14px; flex: none; }
.tl-main { flex: 1; min-width: 180px; }
.tl-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.tl-main input { width: 100%; accent-color: var(--accent); }
/* fixed-size readout: changing values never resize the slider next to it */
.readout { flex: none; font-size: 12px; display: grid; grid-template-columns: repeat(3, 150px); grid-template-rows: repeat(3, 34px); gap: 2px 14px; border-left: 1px solid var(--line); padding-left: 14px; }
.readout > div { min-width: 0; overflow: hidden; }
.readout span { color: var(--muted); white-space: nowrap; }
.readout b { display: block; color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.harbour-label { background: rgba(255,255,255,.9); border: 0; box-shadow: none; font-size: 11px; font-weight: 600; padding: 1px 5px; color: var(--ink); }
.harbour-label::before { display: none; }
.tide-arrow { position: relative; width: 40px; height: 40px; pointer-events: none; }
.wind-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.legend .wind-scale { height: 6px; border-radius: 3px; margin-top: 4px; }
.legend .wind-ticks { display: flex; justify-content: space-between; margin-top: 1px; font-size: 9.5px; }
.tide-arrow .lbl { position: absolute; left: 50%; top: 31px; transform: translateX(-50%); font-size: 9.5px; font-weight: 700; line-height: 1; padding: 1px 3px; border-radius: 4px; background: rgba(255,255,255,.85); }
.depth-lbl { display: block; text-align: center; font-size: 10px; font-weight: 700; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; pointer-events: none; }
.legend { border-top: 1px solid var(--line); padding-top: 6px; font-size: 11px; color: var(--muted); display: grid; gap: 5px; width: 204px; }
.legend:empty { display: none; }
.legend b { color: var(--ink); }
.legend .lg > div { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; }
.lg-item { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.lg-item i { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.endpoint { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.endpoint.a { background: var(--ink); }
.endpoint.b { background: var(--good); }

/* course-change slider */
.cc { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0; }
.cc-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.cc input[type=range] { width: 100%; accent-color: var(--accent); margin: 8px 0 2px; }
.cc-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }

/* progress (plans & weather preview) */
.pbar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.pbar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.pbar.thin { height: 4px; margin: 6px 0 0; }
.prow { display: flex; justify-content: space-between; font-size: 13px; }
.progress li.done { color: var(--ink); }
.progress li.done .s { color: #2b8a3e; font-weight: 700; }
.pdetail { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* weather & tide preview (step 1) */
.wx-chart svg { width: 100%; height: auto; display: block; }
.wx-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.wx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.wx-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 10px; }
.wx-sum span { color: var(--muted); display: block; font-size: 11px; }
.wx-sum b { font-size: 13px; }
.wx-sum-h { grid-column: 1 / -1; font-weight: 600; font-size: 12px; }
.wx-loading { font-size: 13px; padding: 6px 0; }

/* waypoints */
.wp-icon { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: #7048e8; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); flex: none; }
.wp-icon.via { background: #0f2233; }
.wp-icon.gate { background: #0b6bcb; border-radius: 4px; }
.wp-icon.suggest { background: #f08c00; }
.wps { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.wp { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--panel); }
.wp-top { display: flex; gap: 6px; align-items: center; }
.wp-name { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 13px; }
.wp-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; align-items: center; }
.wp-row select { border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px; font-size: 12px; background: #fff; }
.wp-num input { width: 52px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px; font-size: 12px; }
.icon { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 12px; padding: 0; }
.icon:disabled { opacity: .35; cursor: default; }
.wp-mark { font-size: 11px; color: #5f3dc4; font-weight: 600; margin-top: 2px; }
.sched tr.mark-row td { background: #f3f0ff; }
.rc-strategy { font-size: 12px; margin: 2px 0 6px; color: var(--ink); }
.ok-callout { background: #ebfbee; color: #1b5e20; }
#modeSeg { margin-top: 10px; }

/* sign-in (Supabase email code) */
.signin { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 34, 51, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.signin-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 380px; padding: 22px 22px 18px; }
.signin-card h2 { margin: 16px 0 6px; }
.signin-card .btn { width: 100%; margin-top: 8px; justify-content: center; }
.signin-card #siCode { font-size: 22px; letter-spacing: 6px; text-align: center; }

/* environment badge (sandbox / local): see release-process.md */
.env-badge { font-weight: 700; font-size: 11px; letter-spacing: .5px; color: #fff; background: #7048e8; padding: 2px 8px; border-radius: 99px; }

/* account (account.js): menu, profile, boats */
.acct-btn { white-space: nowrap; }
.acct-menu { position: fixed; z-index: 3100; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 180px; }
.acct-menu button, .acct-menu a { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--ink); }
.acct-menu button:hover, .acct-menu a:hover { background: var(--bg); }
.acct-card { max-height: calc(100vh - 32px); overflow-y: auto; }
.acct-card.wide { max-width: 520px; }
.acct-card .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.acct-card .actions .btn { width: auto; margin-top: 0; }
.acct-card .seg { margin: 8px 0; }
.boatlist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.boatrow { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.boatrow-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.boatrow-actions .btn { width: auto; margin: 0; }
.toggle.pref { align-items: flex-start; margin: 8px 0; }
.toggle.pref .muted { font-size: 12px; }
@media (max-width: 520px) { .boatrow { flex-direction: column; align-items: stretch; } }

.acct-card textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }

/* account: your data */
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.btn.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
.data-actions .btn { width: auto; margin-top: 0; }

/* sea state (2.6b) */
.sea-pill, .readout .sea-pill, .rcard .sea-pill, .muted .sea-pill { display: inline-block; padding: 0 6px; border-radius: 99px; background: var(--sc); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; white-space: nowrap; }
.rc-sea { font-size: 12px; margin-top: 6px; color: var(--ink); text-align: left; }
.wvt { font-size: 10px; font-weight: 700; color: #ea580c; }

/* guided route steps: what's been chosen so far */
.trip { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; margin: 6px 0 12px; font-size: 13px; background: var(--bg); }
.trip-row { display: grid; grid-template-columns: 82px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; }
.trip-row span { color: var(--muted); font-size: 12px; }
.trip-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.link { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; }

/* ---------- phones (≤ 700px): map on top, the form below with its buttons always in reach ---------- */
.layers-btn { display: none; }
@media (max-width: 700px) {
  /* header: logo only, compact step dots, a short account button */
  .topbar { gap: 8px; padding: 0 10px; height: 52px; position: sticky; top: 0; }
  .brand > span:not(.env-badge) { display: none; }
  .steps { min-width: 0; gap: 0; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .steps::-webkit-scrollbar { display: none; }
  .steps button { padding: 4px 3px; }
  .steps button.active .lbl { display: inline; font-size: 12px; margin-right: 2px; }
  .steps button .n { width: 22px; height: 22px; }
  .credits { display: none; }
  .user .btn { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 8px; }

  /* map on top (fixed height), then the timeline, then the form; the page scrolls */
  .layout { display: flex; flex-direction: column; height: auto; }
  .mapwrap { order: 1; height: auto; }
  .sidebar { order: 2; }
  #map { position: relative; height: 44vh; min-height: 240px; }
  .sidebar { overflow: visible; padding: 14px 14px 0; }

  /* layer panel folds away behind a button */
  .layers-btn { display: block; position: absolute; top: 10px; right: 10px; z-index: 600; border: 0; border-radius: 99px; padding: 7px 14px;
    background: var(--panel); box-shadow: var(--shadow); font-weight: 600; font-size: 13px; cursor: pointer; }
  .layers { display: none; top: 50px; right: 10px; left: auto; max-width: calc(100% - 20px); }
  .layers.open { display: grid; }
  .legend { width: auto; max-width: 260px; }

  /* timeline under the map instead of on top of it, with a compact readout */
  .timeline { position: static; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .tl-main { min-width: 0; }
  .readout { display: grid; width: 100%; border-left: 0; padding-left: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 30px; gap: 2px 12px; }
  .readout b { font-size: 12px; }

  /* the step's buttons stay at the bottom of the screen */
  .sidebar .actions { position: sticky; bottom: 0; z-index: 5; background: var(--panel); margin: 12px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(15, 34, 51, .06); }
  .sidebar .actions .btn { flex: 1; }

  /* no zoom-on-focus on iPhone: form text at least 16px */
  input, select, textarea { font-size: 16px !important; }

  /* wide content scrolls sideways inside its box, never the page */
  .sched { display: block; overflow-x: auto; white-space: nowrap; }
  .rc-grid { grid-template-columns: repeat(2, 1fr); }
  .harbour-label { font-size: 10px; padding: 0 4px; }
  .place-label { opacity: .85; }
  .acct-menu { right: 8px !important; }
  .signin-card, .acct-card { max-height: calc(100vh - 32px); overflow-y: auto; }
}

/* help "?" icons and their tip */
.help { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted);
  font-size: 11px; font-weight: 700; line-height: 1; cursor: help; vertical-align: 2px; margin-left: 6px; user-select: none; flex: none; }
.help:hover, .help:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
h2 .help { vertical-align: 4px; }
.tip { position: fixed; z-index: 5000; display: none; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; font-weight: 400;
  padding: 8px 11px; border-radius: 8px; box-shadow: 0 6px 20px rgba(15, 34, 51, .25); pointer-events: none; white-space: pre-line; }

/* touch screens: hint shown when someone drags the map with one finger (two fingers move it) */
.map-hint { position: absolute; inset: 0; z-index: 650; display: grid; place-items: center; background: rgba(15, 34, 51, .45); color: #fff;
  font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.map-hint.on { opacity: 1; }

/* departure-time check before it has run: faded example chart + button */
.sweep-teaser { position: relative; border: 1px dashed var(--line); border-radius: var(--radius); overflow: hidden; margin: 8px 0;
  background: repeating-linear-gradient(-45deg, #fafbfc, #fafbfc 8px, #f3f5f7 8px, #f3f5f7 16px); }
.sweep-teaser svg { width: 100%; height: auto; display: block; filter: blur(1.5px) grayscale(.4); opacity: .55; }
.teaser-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 12px 18px; background: rgba(255, 255, 255, .55); font-size: 13px; color: var(--muted); }
.teaser-cta b { color: var(--ink); font-size: 14px; }
.teaser-cta .btn { margin-top: 4px; }

/* the saved boat a plan will use (Start step, when the Boat step is skipped) */
.boat-chip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; background: var(--accent-soft); border-radius: var(--radius); padding: 8px 12px; margin: 4px 0 12px; }
.boat-chip .link { margin-left: auto; }
