:root {
  color-scheme: light;
  font:
    16px/1.45 system-ui,
    sans-serif;
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-end)
  );
  --shadow-action: 0 3px 8px rgb(0 0 0 / 13%);
  --shadow-card: 0 2px 12px rgb(0 0 0 / 7%);
  background-color: var(--page);
  color: var(--text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  max-width: 680px;
  margin: auto;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}
header,
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--chrome);
}
header strong {
  font-size: 26px;
  letter-spacing: -1.8px;
  font-style: italic;
}
.header-profile {
  min-height: 44px;
  padding: 4px 9px;
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: 14px;
  font-weight: 650;
}
.header-profile[aria-current="true"] {
  background: var(--selected-bg);
}
header span {
  color: var(--link);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.service-options {
  display: grid;
  gap: 8px;
}
.service-options button {
  text-align: left;
  font-weight: 650;
}
.service-options button[aria-pressed="true"] {
  background: var(--selected-bg);
  color: var(--selected-text);
  border-color: var(--focus);
}
@media (max-width: 365px) {
  header {
    padding-inline: 12px;
  }
  header strong {
    font-size: 21px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions a {
    font-size: 12px;
  }
}
.header-actions a {
  font-size: 14px;
  text-decoration: none;
  padding: 8px 0;
}
#theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  color: var(--link);
  background: var(--field);
  font-size: 24px;
  line-height: 1;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
small,
label,
#summary {
  color: var(--muted);
}
article,
#panel,
#notice {
  padding: 0 20px;
}
h1,
h2 {
  letter-spacing: -0.045em;
  margin: 16px 0 12px;
}
h1 {
  font-size: 30px;
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--field);
  min-height: 46px;
  padding: 9px 14px;
}
button {
  cursor: pointer;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
button:disabled,
button[aria-busy="true"] {
  opacity: 0.45;
}
button:disabled {
  cursor: default;
}
button[aria-busy="true"] {
  cursor: progress;
}
button:active:not(:disabled, [aria-busy="true"]) {
  transform: scale(0.98);
}
@media (hover: hover) {
  button:not(:disabled, [aria-busy="true"]):hover {
    background-color: var(--selected-bg);
  }
  button.accent:not(:disabled, [aria-busy="true"]):hover {
    filter: brightness(1.08);
  }
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
label {
  font-size: 14px;
  display: block;
  margin: 12px 0;
}
select,
input,
textarea {
  width: 100%;
  margin-top: 4px;
}
button.accent {
  background-color: var(--primary);
  background-image: var(--gradient-primary);
  box-shadow: var(--shadow-action);
  color: var(--primary-text);
  border: 0;
  min-height: 52px;
  font-weight: 700;
  width: 100%;
  margin-top: 12px;
}
nav {
  position: fixed;
  z-index: 500;
  bottom: 0;
  width: min(100%, 680px);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  gap: 3px;
  border-top: 1px solid var(--line);
}
nav button {
  border: 0;
  background: transparent;
  font-size: 14px;
  flex: 1;
  padding: 8px 2px;
}
nav button[aria-current="true"] {
  background: var(--selected-bg);
  color: var(--selected-text);
}
nav button.accent,
nav button.accent[aria-current="true"] {
  margin-top: 0;
  background: var(--gradient-primary);
  color: var(--primary-text);
  font-size: 17px;
}
.mapwrap {
  position: relative;
  z-index: 0;
}
#map {
  height: clamp(230px, calc(100dvh - 188px), 820px);
  background: radial-gradient(
    ellipse at 80% 100%,
    var(--selected-bg),
    var(--field)
  );
}
#mode-toggle {
  margin: 8px 12px;
  border: 0;
  color: var(--link);
}
.trip-sheet h1 {
  margin-top: 0;
}
#locate {
  position: absolute;
  right: 10px;
  bottom: 34px;
  z-index: 450;
  background: var(--field);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  font-size: 23px;
}
.pin {
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: var(--primary);
  border: 2px solid var(--primary-text);
  border-radius: 50%;
  color: var(--primary-text);
  text-align: center;
  font-weight: 800;
}
.stop,
.choice {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
}
.stop b {
  display: block;
  color: var(--link);
  font-size: 13px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 16px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.card button,
.card a {
  margin: 4px;
}
.card button.accent {
  margin-inline: 0;
}
a {
  color: var(--link);
}
dialog {
  width: min(94vw, 500px);
  max-height: 84dvh;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--elevated);
  color: inherit;
  padding: 20px;
}
dialog.trip-sheet {
  width: min(100%, 680px);
  margin: auto auto 0;
  padding: 18px 20px max(24px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  border-bottom: 0;
}
dialog.trip-sheet::backdrop {
  background: #0003;
}
#checkout-notice:empty {
  display: none;
}
#checkout-notice {
  color: var(--link);
}
#finish-map-pick {
  margin: 12px;
}
.sheet-frame {
  position: relative;
}
#sheetbody h2 {
  margin: 0 44px 14px 0;
}
#dismiss {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 38px;
  width: 38px;
  padding: 0;
  border: 0;
  background: var(--field);
  border-radius: 50%;
}
dialog[data-kind="address"] {
  width: min(100%, 680px);
  max-height: 89dvh;
  margin: auto auto 0;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  border-bottom: 0;
}
.route-fields {
  display: grid;
  gap: 8px;
}
.route-field {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
  overflow-wrap: anywhere;
}
.route-field strong {
  color: var(--muted);
  font-size: 13px;
}
.route-field:not(button) {
  border: 1px solid var(--line);
  border-radius: 16px;
}
.address-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.address-search input {
  margin: 0;
}
.map-choice {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--link);
}
.address-results {
  overflow-wrap: anywhere;
}
.address-results .choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.address-results .choice > span:last-child {
  color: var(--link);
}
.address-results mark {
  color: var(--selected-text);
  background: var(--selected-bg);
  font-weight: 750;
  border-radius: 3px;
}
.address-paging {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
dialog::backdrop {
  background: #0009;
}
#notice {
  color: var(--link);
  white-space: pre-line;
}
[hidden] {
  display: none !important;
}
#summary {
  margin-top: 12px;
}
#summary .external-route {
  display: block;
  margin-top: 8px;
}
p {
  overflow-wrap: anywhere;
}
.preference {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  color: inherit;
  cursor: pointer;
}
.preference input {
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 0;
  accent-color: var(--link);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input::file-selector-button {
  font: inherit;
  color: var(--selected-text);
  background: var(--selected-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px 8px;
  margin-inline-end: 8px;
}
@media (prefers-reduced-motion: reduce) {
  :root[data-palette-ready],
  button {
    transition: none;
  }
  button:active:not(:disabled, [aria-busy="true"]) {
    transform: none;
  }
}

#map > .map-status {
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 20px 64px 20px 20px;
  color: var(--muted);
  text-align: center;
}
.checkout-navigation {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.checkout-navigation button {
  flex: 1;
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.driver-account {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.driver-account h2,
.driver-account p {
  margin: 0;
}
.driver-account p {
  width: 100%;
}
.shift-status {
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 650;
  background: #e8e9eb;
  color: #444952;
}
.shift-status[data-online="true"] {
  background: #e2f3e7;
  color: #23583c;
}
:root[data-theme="dark"] .shift-status {
  background: #343740;
  color: #e1e3e9;
}
:root[data-theme="dark"] .shift-status[data-online="true"] {
  background: #224333;
  color: #c4eed2;
}
.cargo-preview {
  display: block;
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  border-radius: 12px;
}
#cargo-photo-skip {
  display: block;
  margin-top: 10px;
}
