:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #eef4f1;
  --ink: #16211d;
  --muted: #61706a;
  --line: #d5dfda;
  --brand: #0b5f4b;
  --brand-strong: #074839;
  --accent: #f2a900;
  --danger: #a12a2a;
  --danger-soft: #fff0f0;
  --ok: #1f6d4f;
  --shadow: 0 8px 28px rgba(18, 46, 36, .10);
  --radius: 18px;
  --tap: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { font-size: 18px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 4px solid rgba(242,169,0,.45);
  outline-offset: 2px;
}
.app-shell { min-height: 100dvh; padding-bottom: calc(86px + var(--safe-bottom)); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.topbar-inner { width: min(760px, 100%); margin: 0 auto; min-width: 0; }
h1 { margin: 0; font-size: 1.22rem; line-height: 1.15; }
.topbar-meta { display: flex; align-items: center; gap: 7px 10px; margin-top: 7px; font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topbar-meta span + span { position: relative; padding-left: 10px; }
.topbar-meta span + span::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: rgba(255,255,255,.32); }
.clock { font: inherit; }
.main { width: min(760px, 100%); margin: 0 auto; padding: 18px 16px 26px; }
.section { margin-bottom: 20px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 2px 10px;
}
.section-title h2 { margin: 0; font-size: 1.05rem; }
.subtle { color: var(--muted); font-size: .88rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.status-card { border-left: 6px solid var(--brand); }
.status-card.is-alert { border-left-color: var(--accent); }
.status-card.is-danger { border-left-color: var(--danger); }

/* Targeted visual only: Human primary-action clarification. */
.status-card.visual-no-left-accent { border-left: 1px solid var(--line); }
.big-cta.visual-shift-start-primary { background: #0b2b44; }
.big-cta.visual-board-primary { background: #0b5f4b; }
.big-cta.visual-dropoff-primary { background: var(--danger); }
.status-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.status-title { margin: 0; font-size: 1.25rem; }
.status-meta { margin: 5px 0 0; color: var(--muted); font-size: .9rem; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px;
  padding: 4px 11px; border-radius: 999px; background: var(--surface-soft);
  font-weight: 800; font-size: .78rem; white-space: nowrap;
}
.pill.ok { background: #e7f5ef; color: #14533d; }
.pill.warn { background: #fff4d6; color: #745200; }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.daily-method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.daily-method-grid .action-btn { min-width: 0; min-height: 72px; padding: 10px 6px; text-align: center; font-size: .98rem; }
.action-btn {
  min-height: 78px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  font-size: 1.05rem;
  padding: 12px;
  text-align: left;
  box-shadow: 0 4px 14px rgba(18,46,36,.06);
}
.action-btn small { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.action-btn:active { transform: translateY(1px); }
.big-cta {
  width: 100%; min-height: 72px; border: 0; border-radius: 18px;
  background: var(--brand); color: white; font-size: 1.25rem; font-weight: 900;
  padding: 14px 18px;
}
.big-cta.secondary { background: var(--surface); color: var(--brand); border: 2px solid var(--brand); }
.big-cta.danger { background: var(--danger); }
.big-cta:disabled { background: #cbd3cf; color: #6d7772; cursor: not-allowed; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.small-btn {
  min-height: 48px; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 800;
}
.small-btn.brand { border-color: var(--brand); color: var(--brand); }
.small-btn.danger { border-color: #e5b7b7; color: var(--danger); background: #fffafa; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.metric { background: var(--surface-soft); border-radius: 14px; padding: 12px; }
.metric-label { color: var(--muted); font-size: .78rem; }
.metric-value { margin-top: 3px; font-weight: 900; font-variant-numeric: tabular-nums; }
.timeline { margin: 16px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 15px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px #e6f0ec; }
.timeline strong { display: block; }
.timeline span { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.list-card { padding: 0; overflow: hidden; }
.list-item {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink);
  min-height: 78px; padding: 14px 16px; text-align: left;
}
.list-item:last-child { border-bottom: 0; }
.list-main strong { display: block; font-size: 1rem; }
.list-main span { display: block; color: var(--muted); font-size: .82rem; margin-top: 3px; }
.chev { color: var(--muted); font-size: 1.35rem; }
.shift-trip-summary .list-main { min-width: 0; }
.shift-trip-summary .shift-trip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; min-width: 0; }
.shift-trip-summary .shift-trip-head > strong:first-child { min-width: 0; }
.shift-trip-summary .shift-trip-fare { flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shift-trip-summary .shift-trip-places { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.shift-trip-summary .shift-trip-places > span:not(.shift-trip-arrow) { min-width: 0; max-width: 100%; }
.shift-trip-summary .shift-trip-arrow { flex: 0 0 auto; }
.kicker { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin: 0 0 7px; font-weight: 900; }
.form-hint { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 56px; border: 2px solid var(--line); border-radius: 13px;
  background: #fff; color: var(--ink); padding: 10px 12px;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.input[type="number"] { font-variant-numeric: tabular-nums; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); }
.boarding-time-input {
  display: block;
  width: 100%;
  width: -webkit-fill-available;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.dropoff-time-input {
  display: block;
  width: 100%;
  width: -webkit-fill-available;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.departure-time-input {
  display: block;
  width: 100%;
  width: -webkit-fill-available;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.record-block {
  margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft);
}
.record-block-head { display:flex; justify-content:space-between; gap:10px; align-items:baseline; margin-bottom:14px; }
.record-block-head strong { font-size:1rem; }
.record-block-head span { color:var(--muted); font-size:.74rem; font-weight:800; }
.time-collapse.record-block { padding: 0; overflow: hidden; }
.time-collapse + .location-editor.place-collapse { margin-top: 16px; }
.time-collapse-summary { list-style: none; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 58px; padding: 11px 14px; cursor: pointer; }
.time-collapse-summary::-webkit-details-marker { display: none; }
.time-collapse-summary::marker { content: ''; }
.time-collapse-label { font-size: .82rem; font-weight: 900; color: var(--muted); white-space: nowrap; }
.time-collapse-value { min-width: 0; font-size: 1rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.time-collapse-hint { color: var(--brand); font-size: .74rem; font-weight: 800; white-space: nowrap; }
.time-collapse-hint .when-open { display: none; }
.time-collapse[open] .time-collapse-hint .when-closed { display: none; }
.time-collapse[open] .time-collapse-hint .when-open { display: inline; }
.time-collapse[open] .time-collapse-summary { border-bottom: 1px solid var(--line); }
.time-collapse-body { padding: 12px 14px 14px; }
.time-collapse-body .form-group { margin-bottom: 10px; }

.sub-record-block { margin: 0 0 14px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.sub-record-title { margin-bottom:10px; font-weight:900; font-size:.88rem; }
.sub-record-block .form-group:last-child { margin-bottom:0; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact-box { background: var(--surface-soft); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.fact-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(97,112,106,.18); }
.fact-row:last-child { border-bottom: 0; }
.fact-row span:first-child { color: var(--muted); font-size: .82rem; }
.fact-row span:last-child { text-align: right; font-weight: 800; font-size: .86rem; }

.bottom-nav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 7px 6px calc(7px + var(--safe-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  box-shadow: 0 -5px 20px rgba(18,46,36,.08);
}
.nav-btn {
  position: relative; min-height: 64px; border: 0; border-radius: 14px; background: transparent;
  color: var(--muted); font-size: .72rem; font-weight: 800;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.nav-btn.is-active { color: var(--brand); background: #edf6f2; }
.nav-icon { font-size: 1.35rem; line-height: 1; }
.badge {
  position: absolute; top: 4px; right: calc(50% - 25px); min-width: 22px; height: 22px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem;
  display: grid; place-items: center; padding: 0 5px;
}
.sheet {
  width: min(760px, 100%); max-width: 100%; max-height: 92dvh; margin: auto 0 0;
  border: 0; border-radius: 24px 24px 0 0; padding: 0; background: #fff;
}
.sheet::backdrop { background: rgba(7,20,15,.45); }
.sheet-inner { padding: 8px 18px calc(22px + var(--safe-bottom)); overflow: auto; max-height: 92dvh; }
.sheet-grab { width: 48px; height: 5px; border-radius: 99px; background: #c9d0cd; margin: 2px auto 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; }
.icon-btn { width: 48px; height: 48px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 1.25rem; }
.post-dropoff-panel {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 30px 16px 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.post-dropoff-panel strong { display: block; font-size: 1rem; }
.post-dropoff-panel span { display: block; margin: 4px 0 12px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-bottom)); z-index: 60;
  background: #14211c; color: #fff; border-radius: 999px; padding: 11px 16px; font-size: .86rem; box-shadow: var(--shadow);
}
.today-window-section { margin-top: -2px; }
.today-window {
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.64);
  padding: 15px 16px 13px;
}
.today-window-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.today-window-head h2 { margin: 0; font-size: 1.05rem; }
.today-window-head span { color: var(--muted); font-size: .82rem; font-weight: 800; white-space: nowrap; }
.today-window-body { display: grid; gap: 14px; margin-top: 13px; }
.today-window-block + .today-window-block { border-top: 1px solid rgba(97,112,106,.18); padding-top: 12px; }
.today-window-label { margin: 0 0 4px; color: var(--muted); font-size: .82rem; font-weight: 800; }
.today-window-weather-text { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.5; }
.today-window-detail { margin: 4px 0 0; font-size: .94rem; font-weight: 800; }
.today-window-topics { display: grid; gap: 13px; }
.today-window-seed + .today-window-seed { margin-top: 13px; }
.today-window-seed-text { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.55; }
.today-window-seed-text + .today-window-seed-text { margin-top: 5px; }
.today-window-source { margin: 12px 0 0; color: var(--muted); font-size: .74rem; text-align: right; }
.notice { border-radius: 14px; padding: 12px 14px; background: #fff6dd; color: #624800; font-size: .84rem; line-height: 1.5; }
.danger-note { background: var(--danger-soft); color: #722020; }
.sep { height: 1px; background: var(--line); margin: 16px 0; }
.compact { margin: 0; }
.hidden { display: none !important; }
@media (min-width: 620px) {
  .action-grid { grid-template-columns: repeat(3, 1fr); }
  .main { padding-top: 24px; }
}
@media (max-width: 390px) {
  html { font-size: 17px; }
  .main { padding-left: 12px; padding-right: 12px; }
  .action-grid { gap: 9px; }
  .action-btn { min-height: 74px; padding: 10px; }
  .inline-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}


/* v1.3: history editing, spatial candidates, nearby facilities, passenger counts */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.h3-inline { overflow-wrap: anywhere; }
.location-editor { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.location-editor .form-label { margin-bottom: 10px; }
.location-editor.place-collapse { padding: 0; overflow: hidden; }
.place-collapse-summary { list-style: none; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 58px; padding: 11px 14px; cursor: pointer; }
.place-collapse-summary::-webkit-details-marker { display: none; }
.place-collapse-summary::marker { content: ''; }
.place-collapse-label { font-size: .82rem; font-weight: 900; color: var(--muted); white-space: nowrap; }
.place-collapse-value { min-width: 0; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.place-collapse-value.is-status { color: var(--muted); font-size: .88rem; }
.place-collapse-hint { color: var(--brand); font-size: .74rem; font-weight: 800; white-space: nowrap; }
.place-collapse-hint .when-open { display: none; }
.place-collapse[open] .place-collapse-hint .when-closed { display: none; }
.place-collapse[open] .place-collapse-hint .when-open { display: inline; }
.place-collapse[open] .place-collapse-summary { border-bottom: 1px solid var(--line); }
.place-collapse-body { padding: 12px 14px 14px; }
.location-fact { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.location-fact strong { display: block; margin-top: 3px; font-size: .82rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.candidate-list { display: grid; gap: 8px; margin: 10px 0; }
.candidate-btn { width: 100%; min-height: 58px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; background: #fff; color: var(--ink); }
.candidate-btn strong { display: block; line-height: 1.35; }
.candidate-btn span { display: block; color: var(--muted); font-size: .76rem; margin-top: 3px; }
.place-lookup { width: 100%; margin: 2px 0 10px; background: #fff; }
.place-input { background: #fff; }
.passenger-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.passenger-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--surface-soft); }
.passenger-card > span { display: block; font-size: .82rem; font-weight: 900; margin-bottom: 8px; text-align: center; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 5px; }
.stepper button { min-width: 44px; min-height: 48px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 1.35rem; font-weight: 900; color: var(--brand); }
.stepper input { width: 100%; min-width: 0; height: 48px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-weight: 900; background: #fff; }
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .passenger-grid { grid-template-columns: 1fr; }
  .passenger-card { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
  .passenger-card > span { margin: 0; text-align: left; }
}

/* v1.3: separate human-selectable place candidate groups */
.candidate-group { margin: 12px 0; }
.candidate-heading { margin: 0 2px 6px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.candidate-group .candidate-list { margin: 0; }


/* 勤務開始画面の過去勤務一覧 */
.shift-home-item {
  grid-template-columns: minmax(94px, auto) 1fr auto;
  gap: 14px;
  min-height: 84px;
}
.shift-date { min-width: 94px; }
.shift-date strong { display: block; font-size: 1rem; line-height: 1.25; }
.shift-date span { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.compact-empty { padding: 24px 18px; }
@media (max-width: 390px) {
  .shift-home-item { grid-template-columns: 86px 1fr auto; gap: 10px; padding-left: 13px; padding-right: 13px; }
  .shift-date { min-width: 86px; }
  .shift-date strong { font-size: .94rem; }
  .shift-date span, .shift-home-item .list-main span { font-size: .75rem; }
}

/* v1.6: 配車受付時の任意顧客情報 */
.preboard-info {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.preboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.preboard-head strong { display: block; font-size: 1rem; }
.preboard-head > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; }
.preboard-info .form-group:last-of-type { margin-bottom: 8px; }
.preboard-summary { margin: 16px 0 0; }
/* Dispatch info: reuse the existing details/summary disclosure grammar without sharing Location business logic. */
.dispatch-summary-disclosure { margin: 16px 0 0; }
.correction-disclosure.dispatch-summary-disclosure > summary { position: relative; padding-right: 42px; }
.correction-disclosure.dispatch-summary-disclosure > summary::after { position: absolute; right: 14px; top: 14px; float: none; }
.dispatch-summary-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dispatch-summary-title-row strong { display: block; min-width: 0; }
.dispatch-summary-toggle-hint { flex: 0 0 auto; color: var(--brand); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.dispatch-summary-toggle-hint .when-open { display: none; }
.dispatch-summary-disclosure[open] .dispatch-summary-toggle-hint .when-closed { display: none; }
.dispatch-summary-disclosure[open] .dispatch-summary-toggle-hint .when-open { display: inline; }
/* Accepted-stage editor stays outside native <details> so iPhone input controls use the ordinary form interaction path. */
.accepted-dispatch-summary .dispatch-summary-trigger { width: 100%; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; position: relative; padding: 13px 42px 13px 14px; cursor: pointer; font: inherit; font-weight: 800; }
.accepted-dispatch-summary .dispatch-summary-trigger::after { content: '›'; position: absolute; right: 14px; top: 14px; font-size: 22px; line-height: 18px; transform: rotate(90deg); }
.accepted-dispatch-summary.is-open .dispatch-summary-trigger::after { transform: rotate(-90deg); }
.accepted-dispatch-summary.is-open .dispatch-summary-toggle-hint .when-closed { display: none; }
.accepted-dispatch-summary.is-open .dispatch-summary-toggle-hint .when-open { display: inline; }
.dispatch-summary-line { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.dispatch-summary-editor { padding: 0 12px 12px; }
.dispatch-summary-editor .form-group:last-of-type { margin-bottom: 8px; }
.trip-dispatch-summary-disclosure { margin: 16px 0 18px; }
.customer-editor {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.customer-editor .form-group:last-child { margin-bottom: 0; }
.customer-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}
.customer-editor-head strong { font-size: 1rem; }
.customer-editor-head span { color: var(--muted); font-size: .76rem; text-align: right; }

/* v1.7: backup / restore */
.backup-actions { display: grid; gap: 10px; margin-top: 14px; }
.backup-restore-btn { width: 100%; min-height: 58px; font-size: 1.05rem; font-weight: 800; }

/* v1.12 test: post-payment calculation results */
.input[readonly] {
  background: #f2f5f3;
  color: var(--ink);
}
.calc-panel {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.calc-panel > strong {
  display: block;
  margin-bottom: 8px;
  font-size: .9rem;
}
.calc-panel > span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  align-items: baseline;
}
.calc-grid span {
  color: var(--muted);
  font-size: .8rem;
}
.calc-grid b {
  text-align: right;
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
}
.calc-panel.calc-wait {
  background: #f8faf9;
}
.calc-panel.calc-warn {
  background: #fff6dd;
  border-color: #ead69a;
  color: #624800;
}
.calc-note {
  margin-top: 8px;
  font-size: .72rem !important;
}

/* v1.13 Test: ride list within each shift */
.shift-rides-block{margin-top:2px}
.shift-rides-title{margin-bottom:10px}
.shift-rides-title h3{margin:0;font-size:18px}
.shift-rides-list{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.shift-rides-list .list-item:last-child{border-bottom:0}
.shift-editor-rides{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.shift-editor-rides .shift-rides-list{border-radius:14px}


/* v1.15: 配車受付時の迎車・予約ボタン */
.dispatch-charge-grid { display: grid; gap: 10px; margin: 14px 0 8px; }
.dispatch-choice { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.dispatch-choice-label { font-weight: 800; }
.dispatch-choice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-btn { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-weight: 800; }
.choice-btn.is-selected { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.choice-btn:active { transform: translateY(1px); }

/* v1.16 Location Test */
.location-correction-test{margin:12px 0;padding:10px 12px;border:1px dashed var(--line,#cfd6df);border-radius:12px;background:rgba(127,127,127,.04)}
.location-correction-test summary{font-weight:700;cursor:pointer;padding:4px 0}.correction-search-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;margin:8px 0}.correction-results{margin-top:8px}.correction-fact{margin-top:8px}


/* v1.17 UX Test: tactile feedback + in-place selected state */
.big-cta, .small-btn, .candidate-btn, .choice-btn { transition: transform .08s ease, box-shadow .08s ease, background-color .12s ease, border-color .12s ease; }
.big-cta:active, .small-btn:active, .candidate-btn:active, .choice-btn:active {
  transform: translateY(2px) scale(.992);
  box-shadow: inset 0 2px 5px rgba(18,46,36,.18);
}
.candidate-btn { box-shadow: 0 3px 8px rgba(18,46,36,.08); }
.candidate-btn.is-selected {
  transform: translateY(2px);
  border: 2px solid var(--brand);
  background: var(--surface-soft);
  box-shadow: inset 0 3px 7px rgba(18,46,36,.16);
}
.candidate-btn.is-selected strong { color: var(--brand); }
.candidate-btn.is-selected span { color: var(--brand); font-weight: 800; }
.manual-place-entry { margin-top: 10px; }
.manual-place-entry summary { cursor: pointer; color: var(--muted); font-size: .82rem; font-weight: 800; padding: 8px 2px; }
.manual-place-entry .place-input { margin-top: 8px; }
.gps-event { margin: 8px 0; padding: 10px 12px 10px 38px !important; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: inset 0 2px 5px rgba(18,46,36,.06); }
.gps-event.gps-pending { border-style: dashed; }
.gps-event.gps-captured { border-color: var(--brand); background: var(--surface-soft); box-shadow: inset 0 3px 7px rgba(18,46,36,.12); }
.gps-event.gps-captured strong { color: var(--brand); }

/* v1.19 Location Recovery UX Test */
.location-correction-test.is-required{border:2px solid var(--brand);background:var(--surface-soft);box-shadow:0 3px 10px rgba(18,46,36,.08)}
.correction-title{font-weight:900;font-size:.95rem;margin-bottom:4px}
.correction-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.correction-mode{min-height:48px;font-weight:900;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 3px 8px rgba(18,46,36,.10)}
.correction-mode.is-selected{transform:translateY(2px);border:2px solid var(--brand);background:var(--surface-soft);box-shadow:inset 0 3px 7px rgba(18,46,36,.18);color:var(--brand)}
.correction-fact.is-selected{border:2px solid var(--brand);background:var(--surface-soft);box-shadow:inset 0 3px 7px rgba(18,46,36,.12)}
.correction-search-btn:active{transform:translateY(3px) scale(.99);box-shadow:inset 0 3px 7px rgba(18,46,36,.22)}

/* v1.24 correction-route UI only */
.correction-disclosure{margin:12px 0;padding:0;border:1px solid var(--line,#cfd6df);border-radius:12px;background:var(--surface)}
.correction-disclosure>summary{list-style:none;cursor:pointer;font-weight:800;padding:13px 14px}
.correction-disclosure>summary::-webkit-details-marker{display:none}
.correction-disclosure>summary::after{content:'›';float:right;font-size:22px;line-height:18px;transform:rotate(90deg)}
.correction-disclosure[open]>summary::after{transform:rotate(-90deg)}
.correction-fields{padding:0 12px 12px}
.correction-fields .form-label{display:block;margin:10px 0 6px}
.correction-query{width:100%;box-sizing:border-box}
.correction-search-full{display:block;width:100%;margin-top:12px}
.correction-results{margin-top:10px}

/* v1.26: normal-route nearby candidate radius selector */
.place-radius { display:grid; grid-template-columns:auto repeat(4,1fr); gap:6px; align-items:center; margin:2px 0 8px; }
.place-radius > span { font-size:12px; color:var(--muted); white-space:nowrap; }
.place-radius .radius-btn { min-width:0; padding:8px 4px; }
.place-radius .radius-btn.is-selected { border-color:var(--brand); color:var(--brand); background:#f2f7ff; box-shadow:inset 0 1px 3px rgba(0,0,0,.12); transform:translateY(1px); }
@media (max-width:390px) { .place-radius { grid-template-columns:repeat(4,1fr); } .place-radius > span { grid-column:1/-1; } }


/* v1.39.16: Ride-level Human purpose selection */
.purpose-editor { margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.purpose-summary { width: 100%; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 0; background: transparent; color: var(--ink); text-align: left; font: inherit; }
.purpose-summary span { font-weight: 900; }
.purpose-summary strong { color: var(--brand); text-align: right; }
.purpose-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.purpose-choices[hidden] { display: none; }
.purpose-choices .choice-btn { width: 100%; padding: 8px; line-height: 1.25; }

@media (max-width: 390px) {
  .topbar-meta { gap: 6px 7px; font-size: .72rem; }
  .topbar-meta span + span { padding-left: 7px; }
  .daily-method-grid { gap: 8px; }
  .daily-method-grid .action-btn { font-size: .9rem; padding-left: 4px; padding-right: 4px; }
  .shift-trip-summary .shift-trip-head { align-items: flex-start; }
}

/* RIDE RECORD VISUAL BASELINE ADOPTION: Human visual source, visual-only layer. */
.daily-method-section .section-title {
  margin-bottom: 12px;
}
.daily-method-section .section-title h2 {
  font-size: 1rem;
  letter-spacing: .01em;
}
.daily-method-grid {
  gap: 10px;
}
.daily-method-grid .daily-method-btn {
  min-width: 0;
  min-height: 104px;
  padding: 11px 5px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-width: 1px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 5px 16px rgba(18,46,36,.08);
}
.daily-method-grid .daily-method-btn:active {
  background: var(--surface-soft);
}
.method-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  color: var(--brand);
}
.method-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.method-icon-letter {
  border: 2px solid currentColor;
  border-radius: 14px;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}
.method-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: .88rem;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}
.shift-trip-summary {
  min-height: 82px;
}
.shift-trip-summary .shift-trip-head {
  margin-bottom: 3px;
}
.shift-trip-summary .shift-trip-fare {
  font-size: 1rem;
}
.shift-trip-summary .shift-trip-places {
  line-height: 1.5;
}
@media (max-width: 390px) {
  .daily-method-grid { gap: 8px; }
  .daily-method-grid .daily-method-btn { min-height: 98px; padding-inline: 3px; }
  .method-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .method-icon svg { width: 39px; height: 39px; }
  .method-label { font-size: .82rem; }
}

/* HUMAN VISUAL BASELINE CORRECTION: adopted top-screen image, visual only. */
:root { --bg:#f7f8fa; --ink:#071f31; --muted:#526472; --line:#d7dde3; --brand:#0b2b44; --brand-strong:#071f31; --surface-soft:#eef1f5; }
html, body, .app-shell { background:#f7f8fa; color:#071f31; }
.topbar { position:sticky; top:0; padding:calc(18px + env(safe-area-inset-top,0px)) 18px 15px; background:#0b2b44; color:#fff; box-shadow:none; }
.topbar-inner { width:min(760px,100%); margin:0 auto; }
.topbar h1 { margin:0; text-align:center; font-size:1.62rem; line-height:1.12; font-weight:900; letter-spacing:-.035em; }
.topbar-meta { display:grid; grid-template-columns:auto auto auto 1fr; align-items:center; justify-content:center; column-gap:8px; margin-top:17px; font-size:.86rem; line-height:1; font-weight:900; white-space:nowrap; }
.topbar-meta span, .topbar-meta span + span { padding:0; }
.topbar-meta span + span::before { display:none; }
#headerVehicle, #headerSales { position:relative; margin-left:6px; padding-left:14px; }
#headerVehicle::before, #headerSales::before { content:""; position:absolute; left:0; top:-3px; bottom:-3px; width:1px; background:rgba(255,255,255,.38); }
#headerSales { justify-self:start; }
.main { padding:15px 18px 28px; }
.daily-method-section { margin:0 0 27px; }
.daily-method-section .section-title { margin:0 0 10px; }
.daily-method-section .section-title h2 { font-size:1.18rem; line-height:1.2; font-weight:900; color:#071f31; }
.daily-method-grid { gap:8px; }
.daily-method-grid .daily-method-btn { min-width:0; min-height:82px; padding:8px 4px 7px; gap:2px; border:1px solid #cfd6de; border-radius:9px; background:#eef1f5; color:#071f31; box-shadow:0 1px 3px rgba(7,31,49,.08); }
.daily-method-grid .daily-method-btn:active { background:#dce2e8; }
.method-icon { width:36px; height:36px; flex-basis:36px; color:#071f31; }
.method-icon svg { width:34px; height:34px; stroke-width:3; }
.method-icon-letter { border:0; border-radius:0; font-size:2rem; font-weight:950; }
.method-icon-uber { width:34px; height:34px; flex-basis:34px; border-radius:50%; background:#071f31; color:#fff; font-size:1.48rem; font-weight:950; line-height:1; }
.method-icon-didi { font-size:2rem; }
.method-icon-yobura svg { fill:currentColor; stroke:none; width:38px; height:34px; }
.method-label { font-size:.94rem; line-height:1.05; font-weight:900; color:#071f31; }
.shift-rides-title { margin:0 0 10px; }
.shift-rides-title h3 { margin:0; font-size:1.18rem; line-height:1.2; font-weight:900; color:#071f31; }
.shift-rides-title .subtle { font-size:.78rem; }
.shift-trip-summary { min-height:70px; margin-bottom:7px; border:1px solid #d7dde3; border-radius:8px; background:#fff; padding:9px 12px; box-shadow:0 1px 2px rgba(7,31,49,.04); }
.shift-trip-summary:last-child { border-bottom:1px solid #d7dde3; }
.shift-trip-summary .shift-trip-head { margin-bottom:3px; }
.shift-trip-summary .shift-trip-head > strong:first-child, .shift-trip-summary .shift-trip-fare { color:#071f31; }
.shift-trip-summary .shift-trip-places { color:#334b5b; }
@media (max-width:390px) {
  .topbar { padding-left:17px; padding-right:17px; }
  .topbar h1 { font-size:1.48rem; }
  .topbar-meta { column-gap:6px; font-size:.76rem; margin-top:15px; }
  #headerVehicle, #headerSales { margin-left:3px; padding-left:9px; }
  .main { padding-left:17px; padding-right:17px; }
  .daily-method-grid { gap:7px; }
  .daily-method-grid .daily-method-btn { min-height:82px; padding-inline:3px; }
  .method-label { font-size:.9rem; }
}

/* HOME HEADER VISUAL FIDELITY CORRECTION — Human Visual Baseline, header only. */
.topbar {
  padding: calc(25px + env(safe-area-inset-top, 0px)) 22px 17px;
  background: #0a2b44;
}
.topbar-inner {
  width: min(760px, 100%);
  margin: 0 auto;
}
.topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 1.72rem;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.035em;
}
.topbar-meta {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 10px;
  margin-top: 24px;
  font-size: .89rem;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  color: #fff;
}
.topbar-meta span,
.topbar-meta span + span {
  padding: 0;
  margin: 0;
}
.topbar-meta span + span::before { display: none; }
#headerVehicle,
#headerSales {
  position: relative;
  margin-left: 6px;
  padding-left: 17px;
}
#headerVehicle::before,
#headerSales::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  bottom: -4px;
  width: 1px;
  background: rgba(255,255,255,.34);
}
#headerSales { justify-self: auto; }

@media (max-width: 390px) {
  .topbar {
    padding-left: 21px;
    padding-right: 21px;
  }
  .topbar h1 { font-size: 1.62rem; }
  .topbar-meta {
    column-gap: 8px;
    margin-top: 22px;
    font-size: .82rem;
  }
  #headerVehicle,
  #headerSales {
    margin-left: 4px;
    padding-left: 13px;
  }
}

@media (max-width: 360px) {
  .topbar { padding-left: 17px; padding-right: 17px; }
  .topbar h1 { font-size: 1.52rem; }
  .topbar-meta { column-gap: 6px; font-size: .76rem; }
  #headerVehicle, #headerSales { margin-left: 2px; padding-left: 10px; }
}

/* HOME HEADER VISUAL FIDELITY CORRECTION — REVISION 02 — header only. */
.topbar {
  padding: calc(11px + env(safe-area-inset-top, 0px)) 18px 11px;
  background: #0a2b44;
}
.topbar h1 {
  font-size: 1.42rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.topbar-meta {
  grid-template-columns: auto auto auto auto;
  column-gap: 5px;
  margin-top: 15px;
  font-size: .79rem;
  line-height: 1.05;
  font-weight: 900;
}
#clock { margin-right: 4px; }
#headerVehicle,
#headerSales {
  margin-left: 2px;
  padding-left: 13px;
}
#headerVehicle::before,
#headerSales::before {
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: rgba(255,255,255,.56);
}
@media (max-width: 390px) {
  .topbar { padding-left: 17px; padding-right: 17px; }
  .topbar h1 { font-size: 1.38rem; }
  .topbar-meta { column-gap: 4px; margin-top: 14px; font-size: .75rem; }
  #clock { margin-right: 3px; }
  #headerVehicle, #headerSales { margin-left: 1px; padding-left: 11px; }
}
@media (max-width: 360px) {
  .topbar { padding-left: 14px; padding-right: 14px; }
  .topbar h1 { font-size: 1.34rem; }
  .topbar-meta { column-gap: 3px; margin-top: 13px; font-size: .70rem; }
  #headerVehicle, #headerSales { margin-left: 0; padding-left: 9px; }
}

/* HOME HEADER VISUAL FIDELITY — FINAL RESIDUAL CORRECTION — header only. */
.topbar {
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  padding-bottom: 8px;
}
.topbar h1 {
  font-size: 1.34rem;
  line-height: 1.02;
}
.topbar-meta {
  margin-top: 10px;
  column-gap: 4px;
  line-height: 1;
}
#headerVehicle,
#headerSales {
  margin-left: 3px;
  padding-left: 11px;
  border-left: 1px solid rgba(255,255,255,.58);
}
#headerVehicle::before,
#headerSales::before { content: none; }
@media (max-width: 390px) {
  .topbar h1 { font-size: 1.31rem; }
  .topbar-meta { margin-top: 9px; column-gap: 3px; }
  #headerVehicle, #headerSales { margin-left: 2px; padding-left: 10px; }
}
@media (max-width: 360px) {
  .topbar h1 { font-size: 1.28rem; }
  .topbar-meta { margin-top: 8px; column-gap: 2px; }
  #headerVehicle, #headerSales { margin-left: 1px; padding-left: 8px; }
}

/* Human Map Point Branch 4: Google Maps presentation. */
.human-map-actions { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 12px; }
.human-map-open { border-color:var(--brand); color:var(--brand); background:#fff; font-weight:900; }
.human-map-presentation {
  position:fixed; z-index:20; left:50%; bottom:0; transform:translateX(-50%);
  width:min(760px,100%); height:92dvh; padding:14px 14px calc(14px + var(--safe-bottom));
  background:#fff; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; gap:10px;
  border-radius:24px 24px 0 0;
}
.human-map-head h2 { margin:0; font-size:1.25rem; }
.human-map-frame { position:relative; min-height:300px; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface-soft); }
.human-map-canvas { position:absolute; inset:0; }
.human-map-center-pin { position:absolute; z-index:2; left:50%; top:50%; transform:translate(-50%,-100%); pointer-events:none; font-size:38px; line-height:1; filter:drop-shadow(0 2px 2px rgba(0,0,0,.28)); }
.human-map-center-pin::after { content:''; position:absolute; left:50%; bottom:-4px; width:8px; height:8px; border-radius:50%; background:rgba(0,0,0,.22); transform:translateX(-50%); }
.human-map-loading { position:absolute; z-index:3; inset:0; display:grid; place-items:center; background:rgba(255,255,255,.88); color:var(--muted); font-weight:800; }
.human-map-loading[hidden] { display:none; }
.human-map-center-readout { min-height:24px; text-align:center; color:var(--muted); font-size:.78rem; font-variant-numeric:tabular-nums; }
.human-map-actions-footer { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:10px; }
.human-map-actions-footer .small-btn, .human-map-actions-footer .big-cta { width:100%; min-height:58px; }
