/* TrailDuck web: the same palette and type as the Android app (from the TrailDuck artwork). */
:root {
  --navy: #0F2238; --mallard: #127A55; --ochre: #E0821A; --glacier: #2F7FC8; --ember: #C2410C;
  --bg: #F3F7FA; --surface: #FFFFFF; --surface2: #E2EAF1; --text: #0F2238; --muted: #465668; --line: #CAD5DF;
  --ok-bg: #D3EDE2; --ok-text: #07402B; --warn-bg: #FBE4C6; --warn-text: #4A2A04; --err-bg: #FCE1D4;
  --on-mallard: #FFFFFF; --on-glacier: #FFFFFF; --on-ember: #FFFFFF; --on-ochre: #0F2238;
  --sign: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: light;
}
/* Phone setting is the default (data-theme="system" on <html>); Settings → Appearance can pick Light or Dark. */
:root[data-theme="dark"] {
  --mallard: #4FC08D; --ochre: #F0A04B; --glacier: #7DB6EE; --ember: #FF9466;
  --bg: #0B1A2B; --surface: #15293F; --surface2: #213A57; --text: #F1F5F9; --muted: #C9D5E2; --line: #3A5675;
  --ok-bg: #0D5A3E; --ok-text: #C6F0DC; --warn-bg: #6A3E0A; --warn-text: #FFDDB8; --err-bg: #7A2A08;
  --on-mallard: #00140A; --on-glacier: #00325A; --on-ember: #4A1400; --on-ochre: #2A1600;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --mallard: #4FC08D; --ochre: #F0A04B; --glacier: #7DB6EE; --ember: #FF9466;
    --bg: #0B1A2B; --surface: #15293F; --surface2: #213A57; --text: #F1F5F9; --muted: #C9D5E2; --line: #3A5675;
    --ok-bg: #0D5A3E; --ok-text: #C6F0DC; --warn-bg: #6A3E0A; --warn-text: #FFDDB8; --err-bg: #7A2A08;
    --on-mallard: #00140A; --on-glacier: #00325A; --on-ember: #4A1400; --on-ochre: #2A1600;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 system-ui, -apple-system, sans-serif; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
h1, h2, h3, .sign { font-family: var(--sign); font-weight: 700; font-stretch: condensed; margin: 0; }
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; background: var(--bg);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.bar h1 { flex: 1; font-size: 26px; }
.logo { width: 36px; height: 36px; border-radius: 9px; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 6px; min-width: 40px; min-height: 40px; }
.icon-btn .ic { width: 26px; height: 26px; }
.ic { vertical-align: -0.2em; flex: none; }
main { padding: 4px 16px 24px; max-width: 640px; margin: 0 auto; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--surface2);
  padding-bottom: env(safe-area-inset-bottom); z-index: 3; }
.tabs a { flex: 1; text-align: center; padding: 8px 0 10px; color: var(--muted); text-decoration: none; font-size: 13px; }
.tabs a span { display: block; height: 26px; }
.tabs a.on { color: var(--mallard); font-weight: 700; }
.tabs a.on span { background: var(--ok-bg); border-radius: 14px; margin: 0 18%; }
.hero { position: relative; border-radius: 24px; overflow: hidden; height: 96px; margin-bottom: 14px;
  background: url(icons/hero.jpg) center 30%/cover; }
.hero h2 { position: absolute; left: 18px; bottom: 10px; color: #fff; font-size: 32px;
  text-shadow: 0 2px 12px rgba(15, 34, 56, .6); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(15,34,56,.8)); }
.hero h2 { z-index: 1; }
label.field { display: block; margin: 0 0 14px; }
label.field > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
textarea { min-height: 72px; resize: vertical; }
.return { position: relative; display: flex; align-items: center; gap: 14px; border: 2px solid var(--ochre); background: var(--warn-bg);
  color: var(--warn-text); border-radius: 16px; padding: 10px 16px; margin-bottom: 12px; min-height: 64px; }
.return.set { border-color: var(--mallard); background: var(--ok-bg); color: var(--ok-text); }
.return .big { font-family: var(--sign); font-weight: 700; font-size: 19px; }
/* The whole return-time box is the tap target: a see-through date box covers it. */
.return input.cover { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; }
.return .x { position: relative; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 18px; background: none; color: inherit; }
.row { display: flex; gap: 10px; align-items: center; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tile { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 16px; display: grid; place-items: center;
  text-align: center; font-size: 13px; color: var(--muted); position: relative; overflow: hidden; background: var(--surface); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile input { position: absolute; inset: 0; opacity: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; background: var(--surface); color: var(--text);
  font: 600 16px var(--sign); min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.chip.on { background: var(--ok-bg); border-color: var(--mallard); color: var(--ok-text); }
.chip.on::before { content: "✓ "; }
button { font: inherit; cursor: pointer; }
.primary { width: 100%; height: 72px; border: 0; border-radius: 36px; background: var(--mallard); color: var(--on-mallard);
  font: 700 24px var(--sign); margin-top: 16px; }
.primary:disabled { opacity: .45; }
/* The big green buttons (Send trip plan, Hold, I'm back, the status button): text half as tall again. */
.primary.big { font-size: 36px; }
.status { width: 100%; min-height: 76px; border: 0; border-radius: 36px; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; color: var(--on-mallard); font: 700 36px var(--sign); background: var(--mallard); transition: background .4s; }
.status.waiting { background: var(--glacier); color: var(--on-glacier); } .status.problem { background: var(--ember); color: var(--on-ember); }
.status .s { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .t { margin-left: 8px; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.actions button { height: 84px; border: 0; border-radius: 16px; background: var(--surface2); color: var(--text);
  font: 700 17px var(--sign); }
.actions button .ic { display: block; margin: 0 auto 4px; }
.actions .accent { background: var(--ochre); color: var(--on-ochre); }
/* I'm back ends the trip, so it's green, not the quietest button. */
.actions .back { background: var(--mallard); color: var(--on-mallard); }
.actions.two { grid-template-columns: 1fr 1fr; margin: 0 0 16px; } .actions.one { grid-template-columns: 1fr; }
.actions button.tall { height: 96px; font-size: 24px; }
.actions .back { font-size: 25px; } .actions .back.tall { font-size: 36px; }
.card.sky h3 { margin: 0 0 6px; } .card.sky p { margin: 4px 0; font-size: 17px; }
.overdue { border: 2px solid var(--ochre); background: var(--warn-bg); color: var(--warn-text); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.overdue b { font: 700 22px var(--sign); } .overdue p { margin: 4px 0 0; }
.link { background: none; border: 0; color: var(--mallard); font: 700 18px var(--sign); padding: 12px; display: block; margin: 24px auto 0; }
.notice { background: var(--err-bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.notice button { background: var(--mallard); color: var(--on-mallard); border: 0; border-radius: 10px; min-height: 36px; padding: 0 14px;
  font: 700 18px var(--sign); white-space: nowrap; }
.muted { color: var(--muted); font-size: 15px; }
.err { color: var(--ember); }
.trip-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.trip-head img { width: 76px; height: 76px; border-radius: 50%; }
.card { background: var(--surface); border-radius: 24px; padding: 18px; margin-bottom: 14px; }
/* Coordinates: the app's own type with even-width digits, so they line up. */
.coords { display: flex; flex-direction: column; gap: 4px; width: 100%; border: 0; text-align: left; color: var(--text);
  font: 600 19px system-ui, -apple-system, sans-serif; font-variant-numeric: tabular-nums; }
.coords .copy { color: var(--mallard); font-size: 14px; }
.big-num { font: 700 36px var(--sign); text-align: center; }
canvas.dial { width: 100%; max-width: 420px; aspect-ratio: 1; display: block; margin: 8px auto; }
.readout { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
/* The same sizes in Level, Plumb and Sight: as large as fits three across in Level. */
.readout b { display: block; font: 700 38px var(--sign); line-height: 1.1; }
.readout span { display: block; font-size: 17px; color: var(--text); }
.howto { display: block; text-align: center; margin: 20px auto 8px; color: var(--mallard); font: 700 18px var(--sign); }
.day { color: var(--mallard); font: 700 22px var(--sign); margin: 18px 0 6px; }
.entry { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.entry .what { flex: 1; } .entry .what b { font-family: var(--sign); font-size: 18px; }
.sight { position: relative; width: 82%; aspect-ratio: 1; margin: 0 auto 10px; border-radius: 24px; overflow: hidden; background: #000; }
.sight video, .sight canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sight .held { position: absolute; top: 10px; right: 14px; color: #fff; font: 700 18px var(--sign); }
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; background: rgba(11, 26, 43, .5); z-index: 5; display: flex; align-items: flex-end; }
.sheet > div { background: var(--bg); width: 100%; border-radius: 24px 24px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 85vh; overflow: auto; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px; color: var(--text); font: 600 17px var(--sign); }
.seg button.on { background: var(--warn-bg); color: var(--warn-text); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
:focus-visible { outline: 3px solid var(--glacier); outline-offset: 2px; }

/* A thin line between parts of a settings card. */
.sep{border:0;border-top:2px solid var(--muted);opacity:.45;margin:16px 0}
/* The trip screen's status lines (Seen, Late Email, Expected back): one size. */
.status-line{font-size:19px;margin:10px 8px 0}

/* Send to: the chosen people beside the heading, then + to choose. */
.sendto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
.sendto h3 { margin-right: 4px; }
.chip.add { padding: 0 10px; }
.tile .x { position: absolute; top: -2px; right: -2px; width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--bg);
  background: var(--text); color: var(--bg); display: grid; place-items: center; padding: 0; }
.tile .ic { display: block; margin: 0 auto 2px; color: var(--mallard); }
.wide { width: 100%; min-height: 56px; margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  color: var(--text); font: 700 19px var(--sign); }
.wide.quiet { border: 0; background: none; color: var(--muted); }
.ext { width: 100%; height: 72px; margin-top: 10px; border: 0; border-radius: 16px; background: var(--surface2); color: var(--text);
  display: flex; align-items: center; padding: 0 20px; font-family: var(--sign); }
.ext b { font-size: 26px; flex: 1; text-align: left; } .ext span { font-size: 20px; font-weight: 600; color: var(--muted); }
.ext.on { background: var(--ok-bg); color: var(--ok-text); border: 2px solid var(--mallard); } .ext.on span { color: inherit; }
.pick-time { margin-top: 10px; } .pick-time summary { min-height: 56px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 16px; font: 700 19px var(--sign); cursor: pointer; list-style: none; }
.pick { width: 100%; min-height: 52px; display: flex; gap: 14px; align-items: center; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--text); font: 17px system-ui, sans-serif; text-align: left; padding: 6px 2px; }
.pick b { font-family: var(--sign); width: 96px; }
.opts { display: flex; gap: 8px; } .opts .chip { flex: 1; line-height: 1.1; text-align: center; }
.undo { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); border-radius: 14px; padding: 4px 4px 4px 14px; margin-bottom: 10px; }
.undo span { flex: 1; } .undo button { min-height: 40px; border: 0; background: none; color: var(--mallard); font: 700 18px var(--sign); }
:root[data-theme="dark"] .undo button { color: #127A55; }
.entry .state { display: flex; gap: 4px; color: var(--glacier); } .entry .state.ok { color: var(--mallard); } .entry .state.bad { color: var(--ember); }
.pick b.all { width: auto; }

/* Position: distance across and up or down, each with its arrow. */
.dists { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin-top: 2px; }
.dist-part { display: inline-flex; align-items: center; gap: 6px; font: 700 24px var(--sign); }
.dist-part .ic { color: var(--mallard); }
/* Coordinates: each line copies on its own; the pin copies a Google Maps link. */
.coords { padding: 8px; gap: 0; }
.cline { display: flex; align-items: center; width: 100%; border: 0; background: none; color: var(--text); text-align: left;
  font: inherit; font-variant-numeric: tabular-nums; padding: 6px 8px; border-radius: 8px; }
.cline span { flex: 1; } .cline .ic { color: var(--mallard); }
.cline:active { background: var(--surface2); }
.cmeta { display: flex; align-items: center; gap: 8px; padding: 2px 0 0 8px; } .cmeta span { flex: 1; }
.cmeta:first-of-type { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.icon-btn.pin { color: var(--mallard); }
.copyall { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--mallard); font: 700 16px var(--sign); padding: 8px; }
