:root {
  --ink: #18231f;
  --muted: #73807a;
  --line: #dce4de;
  --paper: #f5f7f1;
  --panel: #ffffff;
  --accent: #d7f36b;
  --accent-deep: #aecb42;
  --orange: #e7774e;
  --shadow: 0 24px 60px rgba(24, 35, 31, 0.1);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(circle at 8% 10%, rgba(215, 243, 107, 0.24), transparent 27rem), linear-gradient(135deg, transparent 50%, rgba(255,255,255,.72) 50%);
  font-family: "DM Sans", sans-serif;
}

.container { width: min(1380px, calc(100% - 64px)); margin: 0 auto; padding: 52px 0 64px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0; }
.eyebrow, .section-kicker { margin: 0 0 14px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.eyebrow span { display: inline-block; width: 22px; height: 1px; margin: 0 8px 3px; background: var(--orange); }
h1, h2 { margin: 0; font-family: "Space Grotesk", sans-serif; letter-spacing: -.05em; }
h1 { font-size: clamp(42px, 5vw, 76px); line-height: .94; }
h1 em { color: var(--orange); font-style: normal; }
.intro { max-width: 390px; margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.header-mark { display: grid; width: clamp(254px, 29vw, 399px); height: clamp(254px, 29vw, 399px); place-items: center; border-radius: 50%; background: transparent; transform: translate(-28px, -33px) rotate(-12deg); }
.header-mark-image { width: 78%; height: 78%; object-fit: contain; transform: rotate(12deg); }

.workspace { display: grid; grid-template-columns: minmax(360px, .78fr) minmax(480px, 1.22fr); gap: 24px; align-items: stretch; }
.settings-panel, .map-panel { background: var(--panel); border: 1px solid rgba(24, 35, 31, .08); border-radius: 18px; box-shadow: var(--shadow); }
.settings-panel { padding: 32px; }
.section-heading, .map-toolbar { display: flex; justify-content: space-between; align-items: flex-start; }
h2 { font-size: 27px; }
.status-dot { width: 11px; height: 11px; margin-top: 8px; border-radius: 50%; background: var(--accent-deep); box-shadow: 0 0 0 5px rgba(174, 203, 66, .18); }
.route-fields { display: grid; gap: 22px; margin-top: 34px; }
.stops-section { margin-top: 24px; }
.stops-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.add-stop-button, .remove-stop-button { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; color: var(--ink); background: #fbfcf9; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.add-stop-button:hover, .remove-stop-button:hover { border-color: var(--accent-deep); background: var(--accent); }
.stops-list { display: grid; gap: 10px; margin-top: 12px; }
.stop-row { display: flex; align-items: center; gap: 8px; }
.stop-row .input-wrap { flex: 1; }
.stop-row .input-icon { background: var(--orange); color: #fff; }
.remove-stop-button { flex: 0 0 auto; padding: 7px 9px; color: var(--orange); }
.detail-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 21px 16px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.field-label { font-size: 12px; font-weight: 700; }
.field-label small { color: var(--muted); font-size: 11px; font-weight: 400; }
.input-wrap { display: flex; align-items: center; min-height: 46px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcf9; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgba(215, 243, 107, .35); }
.input-icon { display: grid; width: 34px; height: 34px; margin-left: 5px; place-items: center; border-radius: 7px; background: var(--ink); color: var(--accent); font-size: 12px; font-weight: 700; }
.input-icon-end { background: var(--orange); color: #fff; }
input, select { width: 100%; min-width: 0; border: 0; outline: 0; padding: 0 12px; color: var(--ink); background: transparent; font: inherit; font-size: 14px; }
select { cursor: pointer; }
.map-pick-button { align-self: flex-start; min-height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; color: var(--ink); background: #fbfcf9; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.map-pick-button span { margin-left: 5px; color: var(--orange); font-size: 16px; }
.map-pick-button:hover { border-color: var(--accent-deep); background: var(--accent); }
.map-pick-button.active { border-color: var(--orange); color: var(--orange); background: #fff4ef; }
.divider { height: 1px; margin: 29px 0 24px; background: var(--line); }
.provider-field { margin-top: 22px; }
.calculate-button { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 30px; border: 0; border-radius: 9px; padding: 16px 19px; color: var(--ink); background: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .2s, background .2s; }
.calculate-button span { font-size: 23px; line-height: 12px; }
.calculate-button:hover { background: #c9e75b; transform: translateY(-2px); }

.map-panel { min-width: 0; padding: 32px 32px 25px; }
.map-live { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 100px; color: var(--muted); background: #f2f6ef; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.map-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-deep); }
.map { width: 100%; height: 490px; margin: 27px 0 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); }
.result { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0; margin-top: 20px; }
.result-item { display: flex; min-width: 0; flex-direction: column; gap: 7px; padding: 0 18px; border-left: 1px solid var(--line); }
.result-item:first-child { padding-left: 0; border-left: 0; }
.result-item span { color: var(--muted); font-size: 11px; }
.result-item strong { overflow: hidden; text-overflow: ellipsis; font-family: "Space Grotesk", sans-serif; font-size: 20px; white-space: nowrap; }
.result-main strong { font-size: 26px; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .map { height: 400px; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 32px, 480px); padding: 30px 0 42px; }
  .page-header { margin-bottom: 0; }
  .header-mark { width: 81px; height: 81px; font-size: 22px; transform: translate(-12px, -33px) rotate(-12deg); }
  .settings-panel, .map-panel { padding: 23px; border-radius: 14px; }
  .detail-fields { grid-template-columns: 1fr 1fr; }
  .map { height: 300px; }
  .result { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .result-item:nth-child(3) { padding-left: 0; border-left: 0; }
}
