:root {
  color-scheme: light;
  --paper: #f4f2ec;
  --surface: #fffefa;
  --ink: #18232b;
  --muted: #68747a;
  --line: #d9ded9;
  --accent: #c35a32;
  --accent-dark: #994123;
  --blue: #315b66;
  --blue-soft: #e8f0ef;
  --warning-soft: #fbefdf;
  --shadow: 0 12px 32px rgba(27, 43, 47, .07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 320px;
  min-height: 100vh;
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
}
.masthead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 19px;
}
.brand-mark {
  width: 39px;
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  background: var(--accent);
  transform: rotate(-5deg);
}
.brand-mark span {
  display: block;
  width: 4px;
  border-radius: 4px;
  background: #fff8ed;
  transform: skew(-22deg);
}
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 21px; }
.brand-mark span:nth-child(3) { height: 16px; }
.eyebrow, .step-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
h1 { margin: 0; font-size: 20px; line-height: 1.1; letter-spacing: -.03em; }
h2 { margin: 4px 0 0; font-size: 25px; line-height: 1.12; letter-spacing: -.045em; }
.intro, .section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.intro { margin: 0 0 22px; }
.progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 27px;
}
.progress-step { display: flex; align-items: center; gap: 7px; color: #98a09e; white-space: nowrap; }
.progress-step span {
  width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #cbd2cd;
  border-radius: 50%; font-size: 10px; font-weight: 800;
}
.progress-step small { font-size: 11px; font-weight: 700; }
.progress-step.is-active { color: var(--ink); }
.progress-step.is-active span { border-color: var(--accent); background: var(--accent); color: white; }
.progress-step.is-complete span { border-color: var(--blue); background: var(--blue); color: white; }
.progress-line { height: 1px; flex: 1; min-width: 10px; background: #d5dbd6; }
.section-heading { margin-bottom: 16px; }
.section-heading > p { margin-top: 9px; }
.transport-options { display: grid; gap: 10px; }
.transport-card {
  width: 100%; min-height: 76px; display: grid; grid-template-columns: 39px 1fr 20px; align-items: center; gap: 12px;
  padding: 12px 14px; text-align: left; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--ink);
  cursor: pointer; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.transport-card:active { transform: scale(.99); }
.transport-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(195, 90, 50, .1); }
.card-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: #f8e6dc; color: var(--accent-dark); font-size: 11px; font-weight: 900; }
.card-icon-dark { background: #e3ebeb; color: var(--blue); }
.transport-card strong, .transport-card small { display: block; }
.transport-card strong { font-size: 15px; }
.transport-card small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.radio-dot { width: 17px; height: 17px; border: 1.5px solid #aab4b0; border-radius: 50%; }
.is-selected .radio-dot { border: 5px solid var(--accent); }
.field-block { position: relative; display: grid; gap: 7px; margin: 0 0 15px; }
.field-block label { color: #38454a; font-size: 12px; font-weight: 750; }
input, select {
  width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #cfd7d2; border-radius: 12px; background: #fff; color: var(--ink); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 91, 102, .1); }
input::placeholder { color: #a0aaa6; }
.field-note, .selection-status { display: block; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.compact-block { margin: 15px 0 22px; }
.route-heading { margin-top: 25px; }
.route-card, .cargo-card {
  min-width: 0; margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow);
}
.route-card legend, .cargo-card legend { padding: 0 5px; font-size: 13px; font-weight: 800; }
.route-index { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 3px; border-radius: 50%; background: #f7e6dc; color: var(--accent-dark); font-size: 10px; }
.route-index-destination { background: #e3eded; color: var(--blue); }
.route-card .field-block:last-child { margin-bottom: 2px; }
.autocomplete-wrap { z-index: 2; }
.suggestions {
  position: absolute; z-index: 5; top: calc(100% - 17px); left: 0; right: 0; overflow: hidden;
  border: 1px solid #ccd5d1; border-radius: 12px; background: white; box-shadow: 0 12px 24px rgba(22, 39, 43, .15);
}
.suggestion-option {
  width: 100%; min-height: 48px; display: block; padding: 9px 13px; border: 0; border-bottom: 1px solid #edf0ed; background: white; color: var(--ink); text-align: left; cursor: pointer;
}
.suggestion-option:last-child { border-bottom: 0; }
.suggestion-option:active, .suggestion-option:hover { background: var(--blue-soft); }
.suggestion-option strong, .suggestion-option small { display: block; }
.suggestion-option strong { font-size: 13px; }
.suggestion-option small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.suggestion-empty { padding: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.date-block { margin-top: 17px; }
.notice { display: grid; gap: 5px; padding: 13px 14px; border-radius: 14px; font-size: 12px; line-height: 1.45; }
.notice-info { margin: 13px 0 18px; background: var(--blue-soft); color: #31515a; }
.notice-warning { margin-bottom: 18px; background: var(--warning-soft); color: #754324; }
.notice-info strong { color: var(--ink); font-size: 13px; }
.cargo-groups { display: grid; gap: 4px; }
.cargo-card legend { width: calc(100% - 10px); display: flex; align-items: center; justify-content: space-between; }
.remove-group { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #9a6a54; font-size: 24px; line-height: 1; cursor: pointer; }
.group-fields { display: grid; }
.quantity-field { max-width: 180px; }
.dimensions-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dimensions-row input { padding: 0 9px; }
.dimensions-row label { font-size: 10px; }
.weight-field { max-width: 240px; margin-top: 1px; }
.secondary-button, .primary-button, .text-button {
  min-height: 48px; padding: 0 17px; border-radius: 13px; font-weight: 800; cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.secondary-button:active, .primary-button:active, .text-button:active { transform: scale(.985); }
.secondary-button { border: 1px solid #c6d0cb; background: transparent; color: var(--ink); }
.add-button { width: 100%; margin: 4px 0 17px; border-style: dashed; color: var(--blue); }
.add-button span { margin-right: 4px; font-size: 18px; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: white; box-shadow: 0 6px 14px rgba(195, 90, 50, .2); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.text-button { display: block; width: 100%; margin-top: 10px; border: 0; background: transparent; color: var(--blue); }
.totals-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 3px 0 20px; padding: 14px 10px; border-radius: 14px; background: #e6eeeb; }
.totals-panel div { display: grid; gap: 5px; text-align: center; }
.totals-panel span { color: #64726f; font-size: 10px; }
.totals-panel strong { font-size: 13px; }
.optional { color: #8c9692; font-weight: 500; }
.handling-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.review-summary { display: grid; gap: 10px; }
.summary-card { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.summary-card h3 { margin: 0 0 9px; color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.summary-card p { margin: 5px 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.review-note { margin: 15px 0; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; color: #59666b; font-size: 12px; line-height: 1.45; }
.consent-check input { flex: 0 0 19px; width: 19px; min-height: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--accent); }
.actions { display: flex; gap: 9px; margin-top: 20px; }
.actions .primary-button { flex: 1; }
.actions .secondary-button { min-width: 96px; }
.form-error { margin: 14px 0 0; padding: 11px 13px; border-radius: 12px; background: #fbe6df; color: #9b381f; font-size: 12px; line-height: 1.4; }
.status-view { padding: 35px 18px 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: center; box-shadow: var(--shadow); }
.status-mark { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: #e5efeb; }
.status-mark span { width: 19px; height: 10px; border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: translateY(-2px) rotate(-45deg); }
.status-view h2 { margin: 8px 0; font-size: 23px; }
.status-view > p:not(.step-kicker) { margin: 0 auto 20px; max-width: 390px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.estimate-panel { margin: 20px 0; padding: 15px; border-radius: 15px; background: #eaf0eb; text-align: left; }
.estimate-row { display: flex; justify-content: space-between; gap: 14px; margin: 9px 0; font-size: 13px; }
.estimate-row span { color: #53615e; }
.estimate-total { padding-top: 10px; border-top: 1px solid #c9d5ce; font-size: 16px; font-weight: 850; }
.page-footer { margin: 22px 0 0; color: #84908b; font-size: 10px; line-height: 1.45; text-align: center; }
[hidden] { display: none !important; }

@media (min-width: 600px) {
  .shell { padding-top: 34px; }
  .route-card { padding: 18px; }
  .transport-options { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
