/* DualFuel. Phone-first; one column that caps at 640px on a fold or tablet. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #14171c;
  --text-2: #5b6472;
  --border: #dde2e8;
  --accent: #0b6b58;
  --accent-ink: #ffffff;
  --accent-soft: #e0f1ec;
  --warn: #9a5a05;
  --warn-soft: #fcefd9;
  --bad: #b8322a;
  --star: #c98a04;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 1px 3px rgb(16 24 40 / 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --tap: 44px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215;
    --surface: #171b20;
    --surface-2: #20262d;
    --text: #e8ebef;
    --text-2: #9ba5b1;
    --border: #2b323b;
    --accent: #45c4a6;
    --accent-ink: #06201a;
    --accent-soft: #15302a;
    --warn: #f0a74f;
    --warn-soft: #33260f;
    --bad: #ff7a6e;
    --star: #f2c14e;
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

main:focus {
  outline: none;
}

.boot {
  padding: 48px var(--gutter);
  color: var(--text-2);
  text-align: center;
}

/* Boot screen (index.html). It fades in after a beat, so a fast start shows
   nothing but the app, and a slow one shows the tagline instead of a blank. */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80dvh;
  padding: 48px var(--gutter);
  text-align: center;
}

.splash-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 16px;
}

.splash-line {
  max-width: 22ch;
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.25;
  text-wrap: balance;
}

.splash-punch {
  max-width: 28ch;
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  text-wrap: balance;
}

.splash .road {
  margin-top: 28px;
}

.splash-status {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

/* Road markings: the loading mark on the boot screen, the first-run card and
   the planning wait. Decorative; it only moves when motion is welcome. */
.road {
  display: block;
  width: 96px;
  height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 12px, transparent 12px 22px);
  opacity: 0.8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

a {
  color: var(--accent);
}

.muted {
  color: var(--text-2);
}

p.muted {
  margin: 4px 0 0;
}

.icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
}

.icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: env(safe-area-inset-top) 8px 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  font-size: 20px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn .icon {
  width: 22px;
  height: 22px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px var(--gutter) 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
  font-weight: 600;
}

.banner a {
  margin-left: auto;
  color: inherit;
}

/* Results (2026-09-24, js/where.js): where the drive really starts and ends,
   a caption under the title; and, when Google only partly matched a place, a
   warning in the sample banner's amber, one sentence per place. */
.drive-ends {
  margin: 0 var(--gutter);
  padding: 0 2px;
  font-size: 13px;
  color: var(--text-2);
}

.banner.guess {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 8px;
}

.banner.guess p {
  margin: 0;
  /* The note quotes what was typed (up to 200 characters); an unbroken
     string must wrap, not widen the page (2026-09-24 review). */
  overflow-wrap: anywhere;
}

/* ---------- sections, cards, lists ---------- */

.section {
  padding: 8px var(--gutter) 0;
}

.section-title {
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.empty {
  margin-top: 12px;
  padding: 28px 20px;
  text-align: center;
  color: var(--text-2);
}

.empty h2 {
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--text);
}

.empty p {
  margin: 0 0 16px;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list > li + li {
  border-top: 1px solid var(--border);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row:hover {
  background: var(--surface-2);
}

.row.static {
  cursor: default;
}

.row.static:hover {
  background: transparent;
}

.row-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.row-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  font-size: 14px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-dot {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Buy me a coffee (2026-09-25, support.js). Dan's other apps' card: "more of
   a box/graphic, again tho, not obnoxious". A hairline box on the page
   ground, no fill, no shadow, so it is quieter than every list above it; a
   40px tile like .cat-dot in the icon's gold with its cup; the whole card
   one tap target, 56px tall. No badge, no animation. */
.support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.support-card:hover {
  background: var(--surface-2);
}

.support-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.support-glyph {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--star) 14%, transparent);
  color: var(--star);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--text-2);
}

.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.note {
  margin: 10px 2px 0;
  font-size: 13px;
  color: var(--text-2);
}

.note.first {
  margin-top: 0;
}

.hint {
  display: block;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-2);
}

p.hint {
  margin: 4px 0 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--surface-2);
}

.btn.primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  filter: brightness(1.07);
}

.btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 15px;
}

.btn.small .icon {
  width: 18px;
  height: 18px;
}

.btn.danger {
  color: var(--bad);
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn:focus-visible,
.icon-btn:focus-visible,
.row:focus-visible,
.stop-name:focus-visible,
.star:focus-visible,
.chip input:focus-visible + span,
.seg input:focus-visible + span,
.file-btn:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- plan form ---------- */

.field {
  display: block;
  margin-bottom: 14px;
}

.field > .label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

input:not([type]),
input[type='text'],
input[type='url'],
input[type='number'],
textarea,
select {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

textarea {
  margin-top: 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

.stops {
  display: grid;
  gap: 8px;
}

.stop-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.add-stop {
  margin: -4px 0 16px;
}

/* Messages under a place box, and the note that takes the place of "Add
   another stop" at 5 places (2026-09-24 pressure test; a proposal for Dan's
   design pass). */
.field-error {
  display: block;
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--bad);
}

input[aria-invalid='true'] {
  border-color: var(--bad);
}

p.add-stop-limit {
  margin: -4px 0 16px;
}

.field-error[hidden],
.btn.add-stop[hidden],
p.add-stop-limit[hidden] {
  display: none;
}

.add-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.add-row input {
  flex: 1;
}

/* Address suggestions (2026-09-24): the list under a place box
   (js/autocomplete.js). It floats over the form below it, under the sticky
   top bar (z-index 5), and uses the list rows' type. */
.combo {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
}

.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 4;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}

.suggest ul {
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
}

.suggest-opt {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 8px 12px;
  cursor: pointer;
}

.suggest-opt:hover {
  background: var(--surface-2);
}

.suggest-opt[aria-selected='true'] {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Google's attribution for its suggestions shown without a Google map: the
   words "Google Maps", 12 to 16 px, in #5E5E5E (or #1F1F1F) on light and
   white on dark, untranslated (translate="no"), in the same box as the list. */
.suggest-attrib {
  margin: 0;
  padding: 2px 12px 6px;
  color: #5e5e5e;
  font: 400 12px/1.5 Roboto, Arial, sans-serif;
  text-align: right;
}

/* When there is no list (offline, the day's suggestions used up, the server
   refusing): one line under the box, in the hint's type and place, saying so
   (2026-09-24, design pass). In the page, not floating, so it never covers
   the next box. */
.suggest-note {
  display: block;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-2);
}

.suggest-note[hidden] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .suggest-attrib {
    color: #ffffff;
  }
}

/* ---------- results ---------- */

.leg-head {
  padding: 16px 2px 4px;
}

.leg-head h2 {
  margin-top: 4px;
  font-size: 19px;
}

/* A leg's drive facts, with the Google Maps attribution on the right of a
   live drive (2026-09-25). The 4px above moved from the facts line to this
   row, so a sample drive, which has no attribution, sits exactly as before. */
.leg-facts {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.leg-facts > p.muted {
  margin: 0;
}

/* Google Maps attribution (2026-09-25, js/attribution.js), required wherever
   Google Places content shows without a Google map. Google's text rules, not
   the app's tokens, set the look: the words "Google Maps" on one line, weight
   400, normal style and spacing, 12 to 16 px, Roboto or the product's own sans
   serif, in #5E5E5E (or #1F1F1F) on light and white on dark, at 4.5:1 or
   better (6.0:1 on the page, 6.5:1 in the white box; white on dark is over
   17:1). https://developers.google.com/maps/documentation/places/web-service/policies */
.gmp-attrib {
  flex: none;
  margin: 0;
  color: #5e5e5e;
  font: 400 12px/1.45 Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: normal;
  white-space: nowrap;
}

/* In the stop sheet: the last line of the box of Google facts. */
.kv-list > .gmp-attrib {
  padding: 0 0 8px;
  text-align: right;
}

@media (prefers-color-scheme: dark) {
  .gmp-attrib {
    color: #ffffff;
  }
}

.window {
  margin-top: 14px;
}

.window-title {
  margin: 0 2px 8px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-2);
}

.stop {
  position: relative;
  padding: 14px;
}

.stop + .stop {
  margin-top: 8px;
}

.stop.alt {
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  box-shadow: none;
}

.stop-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* On a card the name and the drive facts are the point: wrap, don't clip. */
.stop .row-title,
.stop .row-sub {
  white-space: normal;
}

/* Gas price against this drive (2026-09-25): a price below the drive's
   median reads in the accent, the one thing on the line worth a glance. */
.price-below {
  color: var(--accent);
  font-weight: 600;
}

/* The same line under the stop sheet's Regular price. */
.kv-sub {
  display: block;
  font-size: 14px;
  color: var(--text-2);
}

.stop-name {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

/* Stretch the name's hit area over the whole card. */
.stop-name::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.stop-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.reasons {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 14px;
}

.reasons li + li {
  margin-top: 2px;
}

details.all {
  margin-top: 16px;
}

details.all summary {
  padding: 8px 2px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

details.all .list {
  margin-top: 6px;
}

/* ---------- stop sheet ---------- */

dialog.sheet {
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--bg);
  color: var(--text);
}

dialog.sheet::backdrop {
  background: rgb(0 0 0 / 0.45);
}

@media (min-width: 700px) {
  dialog.sheet {
    margin: auto;
    border-radius: 20px;
  }
}

.sheet-inner {
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 4px 20px;
}

.sheet-head h2 {
  flex: 1;
  font-size: 18px;
}

.sheet-body {
  padding: 0 20px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.sheet-sub {
  margin: 20px 0 0;
  font-size: 15px;
}

.kv-list {
  margin-top: 12px;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
}

.kv + .kv {
  border-top: 1px solid var(--border);
}

.kv > span:last-child {
  text-align: right;
}

.stars {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--star);
  cursor: pointer;
}

.star:hover {
  background: var(--surface-2);
}

/* ---------- settings ---------- */

.prio {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.prio + .prio {
  border-top: 1px solid var(--border);
}

@media (min-width: 520px) {
  .prio {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.prio-label {
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip,
.seg label {
  position: relative;
}

.chip input,
.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  cursor: pointer;
}

.chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.seg {
  display: grid;
  flex: none;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
}

.seg input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.panel > .seg {
  margin-bottom: 14px;
}

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 14px;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

/* ---------- charging (2026-09-24, proposal for the design pass) ----------
   Existing tokens only. Chips and radios here are 44px tall (--tap). */

.chips.tap span {
  min-height: var(--tap);
}

.chips.tap {
  margin-top: 8px;
}

.chips.tap input:focus-visible + span,
.seg input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input.ev-other {
  max-width: 9em;
}

.ev-panel .field {
  margin-top: 14px;
}

.ev-group {
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ev-main {
  margin: 10px 2px 0;
  font-weight: 650;
}

.ev-warnings {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.ev-warn {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.ev-warn.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.ev-warn.bad {
  border: 1px solid var(--bad);
  color: var(--bad);
  font-weight: 600;
}

.ev-stop {
  margin-top: 10px;
}

.ev-backup {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.ev-bar-wrap {
  margin-top: 8px;
}

.ev-bar {
  display: block;
  width: 100%;
  height: auto;
}

.ev-bar-track {
  fill: var(--surface-2);
}

.ev-bar-ok {
  fill: var(--accent);
}

.ev-bar-window {
  fill: var(--star);
}

.ev-bar-below {
  fill: var(--bad);
}

.ev-bar-site {
  fill: var(--text);
}

.ev-bar-site.off {
  fill: var(--surface);
  stroke: var(--text-2);
  stroke-width: 1;
}

.ev-bar-pick {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
}

.ev-bar-end {
  fill: var(--text-2);
}

.ev-credit a {
  color: inherit;
}

/* 2026-09-25 review: the drive's one-line answer under the questions, and
   the chargers this car can't use, greyed in "Every fast charger". */
.ev-summary {
  margin: 12px 0 0;
  font-weight: 650;
}

.ev-summary.ev-warn {
  margin-top: 12px;
}

.ev-off .row-title {
  color: var(--text-2);
  font-weight: 500;
}

.ev-group .window-title:focus {
  outline: none;
}

.ev-group .window-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Settings v2 (2026-09-24): layout only, no new colour or token. A favorite's
   tick row with its remove button at the right, like a reward's head row; the
   "That's 3" note sits under it, inside the list. */
.pick-row {
  display: flex;
  align-items: center;
  padding-right: 6px;
}

.pick-row > .check {
  flex: 1;
  min-width: 0;
}

.pick-note {
  padding: 0 14px 10px 48px;
}

/* ---------- rewards (2026-09-24) ---------- */

/* On a stop's card: a quiet reminder, not a call to action. It sits above the
   card's stretched tap area only visually; taps on it still open the details. */
.cue {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 14px;
}

.cue > .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--accent);
}

.cue-main {
  min-width: 0;
}

.cue-lead {
  display: block;
  font-weight: 600;
}

.cue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
}

.row-title.wrap,
.row-sub.wrap {
  white-space: normal;
}

.reward-list {
  margin-top: 10px;
}

.reward {
  padding: 8px 6px 12px 14px;
}

.reward-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

input.reward-note {
  display: block;
  width: calc(100% - 8px);
  margin: 8px 0 0;
}

.reward-add {
  margin-top: 10px;
}

.panel-sub {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-2);
}

.panel-sub.first {
  margin-top: 0;
}

.panel-sub + .chips {
  margin-top: 8px;
}

.reward-add .add-row {
  margin-top: 16px;
}

/* ---------- first run and the planning wait ---------- */

.welcome {
  margin-top: 12px;
  padding: 20px 18px 18px;
}

.welcome .road {
  width: 64px;
  margin-bottom: 16px;
}

.welcome h2 {
  font-size: 20px;
  font-weight: 650;
  text-wrap: balance;
}

.welcome-punch {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

.welcome-body {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

.welcome .note {
  margin: 10px 0 0;
}

.welcome .actions {
  margin-top: 16px;
}

.planning {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 14px;
  text-align: center;
}

.planning .road {
  margin-bottom: 10px;
}

.planning-line,
.planning-punch {
  max-width: 34ch;
  text-wrap: balance;
}

.planning-line {
  color: var(--text);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .splash {
    animation: rise-in 360ms ease-out 250ms both;
  }

  .planning {
    animation: rise-in 300ms ease-out 200ms both;
  }

  .welcome {
    animation: rise-in 360ms ease-out both;
  }

  .road {
    animation: road-roll 900ms linear infinite;
  }
}

/* Reduced motion: nothing moves, but the boot screen and the planning line
   still hold back a beat, so a fast load doesn't flash them. */
@media (prefers-reduced-motion: reduce) {
  .splash {
    animation: appear 0s 250ms both;
  }

  .planning {
    animation: appear 0s 200ms both;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes road-roll {
  to {
    background-position: 22px 0;
  }
}

/* ---------- driver thumbs (2026-09-24, one pool for every driver; for the design pass) ---------- */

/* The thumbs sit at the right-hand end of a stop card's actions, above the
   stretched name button like Navigate and Details. The row may wrap only
   when it carries thumbs, so a card without them is laid out as before. */
.stop-actions:has(.votes) {
  flex-wrap: wrap;
  align-items: center;
}

.votes {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: var(--tap);
  height: var(--tap);
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.vote:hover {
  background: var(--surface-2);
}

/* Your own thumb: filled, in the accent colour. */
.vote[aria-pressed='true'],
.vote-choice[aria-pressed='true'] {
  color: var(--accent);
}

.vote[aria-pressed='true'] svg,
.vote-choice[aria-pressed='true'] svg {
  fill: currentColor;
}

.vote-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.vote-choice[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* The sheet's "Other drivers" block: our own counts, in a bordered block of
   its own so they read apart from Google's rating (Places policy). */
.votes-block {
  margin-top: 20px;
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.votes-block .sheet-sub {
  margin-top: 0;
}

.votes-counts {
  margin: 6px 0 0;
  font-size: 15px;
}

.vote:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
  /* Taps go through to what is under it (design pass, 2026-09-24, PR #9
     Q11): it holds only text, and a quick tap on a Bathroom star under it
     used to land on the toast. */
  pointer-events: none;
}

/* Empty, it stays in the page for screen readers but off the screen (design
   pass, 2026-09-24, PR #9 Q12; toast() in app.js). The same clip as .sr-only. */
.toast:empty {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  box-shadow: none;
}

