:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #f1ede8;
  --ink: #1b1918;
  --muted: #5d5652;
  --line: #e4ddd6;
  --brand: #0f6b5c;
  --brand-deep: #094a3f;
  --brand-soft: #e6f4f1;
  --emerg: #b42334;
  --emerg-soft: #fdecee;
  --accent: #ff8a5c;
  --warn: #8a5a00;
  --warn-soft: #fff6e0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

.emerg-bar {
  background: var(--emerg-soft);
  border-bottom: 1px solid #f5c6cc;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--emerg);
}

.emerg-pill {
  background: var(--emerg);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11.5px;
  text-decoration: none;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex: 0 0 auto;
}

.mark img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 11px;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.area-badge {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border: 1px solid #bfe3dc;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.card.acc {
  padding: 0;
}

.acc-head {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}

.acc-head::-webkit-details-marker {
  display: none;
}

.acc-head .step-h {
  margin: 0;
}

.acc-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.acc-meta .chev {
  font-style: normal;
  display: inline-block;
  transition: transform 0.15s ease;
}

details.acc[open] .acc-meta .chev {
  transform: rotate(180deg);
}

.acc-body {
  padding: 0 16px 16px;
}

.hidden {
  display: none !important;
}

.dur-wrap {
  margin-top: 10px;
}

.dur-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.dur-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dur-row button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.dur-row button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.step-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.seg button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.route-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
}

.route-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.route-sep {
  height: 1px;
  background: var(--line);
  margin: 8px 0 8px 28px;
}

.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  justify-self: center;
}

.pin-dot.from {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.pin-dot.to {
  background: #d94f2a;
  box-shadow: 0 0 0 3px #fdeae4;
}

.addr-wrap {
  position: relative;
  min-width: 0;
}

.addr-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2px;
}

.addr-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 3px 0;
}

.addr-input::placeholder {
  color: #9b928c;
  font-weight: 400;
}

.mini-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
  z-index: 30;
  overflow: hidden;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}

.suggest.open { display: block; }

.suggest button {
  width: 100%;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  padding: 9px 11px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.suggest button:last-child { border-bottom: 0; }
.suggest button:hover { background: var(--brand-soft); }
.suggest b { display: block; font-size: 12.5px; }
.suggest small { display: block; font-size: 11px; color: var(--muted); }

.route-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12.5px;
}

.route-meta strong { color: var(--brand-deep); }

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fleet-btn {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 11px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.fleet-btn[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.fleet-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
}

.fleet-top strong { font-size: 13.5px; }
.fleet-top span { font-size: 11.5px; font-weight: 700; color: var(--brand-deep); }
.fleet-desc { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

.addon-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.addon {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.addon-left {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.addon input {
  margin-top: 3px;
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}

.addon b { display: block; font-size: 13px; line-height: 1.25; }
.addon small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.addon-price { font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--brand-deep); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
}

.receipt {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: sticky;
  top: 16px;
}

.receipt-head {
  background: linear-gradient(155deg, var(--brand-deep), var(--brand));
  color: #fff;
  padding: 16px;
}

.receipt-head span {
  display: block;
  font-size: 11.5px;
  opacity: 0.88;
  margin-bottom: 4px;
}

.receipt-total {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.receipt-sub {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.92;
}

.receipt-body { padding: 16px; }

.r-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.r-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
}

.r-row:last-child { border-bottom: 0; padding-bottom: 0; }
.r-row span { color: var(--muted); }
.r-row b { font-weight: 700; white-space: nowrap; }

.trust-box {
  background: var(--warn-soft);
  border: 1px solid #f0d79a;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: var(--warn);
  line-height: 1.4;
  margin-bottom: 12px;
}

.cta-btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cta-sec {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.status-msg {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
  display: none;
}

.status-msg.show { display: block; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.trust-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.trust-item b {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  margin-bottom: 2px;
}

@media (max-width: 780px) {
  .container { grid-template-columns: 1fr; }
  .receipt { position: static; }
  .seg { grid-template-columns: 1fr 1fr; }
  .fleet-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
}
