:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #ef4444;
  --navy: #0f172a;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius: 20px;
  --radius-sm: 13px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(37, 99, 235, 0.09), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(6, 182, 212, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo",
    "Malgun Gothic", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.appHeader {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 34px);
  background: rgba(243, 245, 250, 0.84);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brandMark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  flex: none;
}
.brandMark svg { width: 24px; height: 24px; }

.brandText { min-width: 0; }
.brandText h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.brandText p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.headerMeta { display: flex; gap: 6px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8efff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pillAlt { background: #e6fbfa; color: #0f766e; }
.pill.isOff { background: #f1f5f9; color: var(--faint); }

.layout {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px clamp(12px, 2.6vw, 30px) 40px;
  display: grid;
  grid-template-columns: 388px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 86px;
}

.modeTabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: #eef2f7;
  border-radius: 999px;
  margin-bottom: 16px;
}
.modeTab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  height: 38px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.modeTab:hover { color: var(--ink); }
.modeTab.isActive {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.10);
}

.points { display: flex; flex-direction: column; }
.pointRow {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  transition: opacity 0.15s ease;
}
.pointDot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  margin-top: 8px;
  flex: none;
}
.pointDot.start { background: var(--green); }
.pointDot.end { background: var(--red); }
.pointDot.via { background: var(--amber); }

.inputWrap { position: relative; min-width: 0; }
.pointInput {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  padding: 0 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pointInput::placeholder { color: #a3aec2; }
.pointInput:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.pointRow.hasPoint .pointInput {
  background: #f8fbff;
  border-color: rgba(37, 99, 235, 0.32);
  font-weight: 600;
}
.pointMeta {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pointMeta:empty { display: none; }

.miniBtn {
  width: 36px;
  height: 36px;
  margin-top: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}
.miniBtn svg { width: 18px; height: 18px; }
.miniBtn:hover { border-color: var(--line-strong); color: var(--accent); background: #f8fbff; }
.miniBtn.removeVia:hover { color: var(--red); border-color: #fecaca; background: #fff7f7; }

.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1200;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  max-height: 288px;
  overflow: auto;
  padding: 4px;
}
.suggestItem {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 9px 10px;
}
.suggestItem:hover, .suggestItem.isActive { background: #eff6ff; }
.sName { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sAddr { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sCat {
  display: inline-block;
  margin-top: 4px;
  font-size: 10.5px;
  color: #0f766e;
  background: #ecfdf5;
  border-radius: 999px;
  padding: 1px 7px;
}
.suggestEmpty { padding: 12px; color: var(--muted); font-size: 12.5px; text-align: center; }

.pointActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 4px;
  padding-left: 34px;
}
.addViaBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  height: 34px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.addViaBtn svg { width: 15px; height: 15px; }
.addViaBtn:hover { color: var(--accent); border-color: rgba(37, 99, 235, 0.45); background: #f8fbff; }
.addViaBtn:disabled { opacity: 0.45; cursor: not-allowed; }
.swapBtn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 2px;
}
.swapBtn:hover { color: var(--accent); }

.modeOptions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.modeOptions.isHidden { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.fieldLabel { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.01em; }
select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  padding: 0 10px;
  outline: none;
}
select:focus { border-color: rgba(37, 99, 235, 0.55); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.switchRow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.switchRow input { width: 17px; height: 17px; accent-color: var(--accent); }
.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
}

.submitRow { margin-top: 16px; }
.primaryBtn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.primaryBtn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(37, 99, 235, 0.3); }
.primaryBtn:active { transform: translateY(0); }
.primaryBtn:disabled { cursor: wait; filter: saturate(0.8); transform: none; }
.btnSpinner {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btnSpinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.providerNote {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.5;
}
.providerNote.isHidden { display: none; }

.recent {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.recent.isHidden { display: none; }
.recentHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.recentHead button {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11.5px;
  padding: 2px 4px;
}
.recentHead button:hover { color: var(--red); }
.recentList { display: flex; flex-direction: column; gap: 5px; }
.recentItem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 8px 10px;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
}
.recentItem:hover { border-color: rgba(37, 99, 235, 0.35); background: #f8fbff; }
.recentItem .rMode {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #1d4ed8;
  background: #e8efff;
  border-radius: 999px;
  padding: 1px 7px;
}
.recentItem .rPath {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink);
  font-weight: 600;
}

.resultPane { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.mapCard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
#map { height: 460px; width: 100%; background: #e9eef6; }
#map.picking { cursor: crosshair; }
.mapBadge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: var(--muted);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.mapHint {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.mapHint.isHidden { display: none; }

.result { display: flex; flex-direction: column; gap: 14px; }
.resultCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.resultCard.padSm { padding: 16px; }

.emptyState {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 54px 24px;
  text-align: center;
}
.emptyArt { width: 140px; margin: 0 auto 12px; }
.emptyArt svg { width: 100%; display: block; }
.emptyState h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.emptyState p { margin: 0 auto 20px; color: var(--muted); font-size: 13.5px; max-width: 420px; }
.quickChips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted);
}
.chip:hover { border-color: rgba(37, 99, 235, 0.4); color: var(--accent); background: #eff6ff; }

.summaryHero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(56, 189, 248, 0.28), transparent 60%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
  border-radius: 17px;
  padding: 20px 22px;
}
.heroMain { min-width: 0; }
.heroLabel { display: block; font-size: 11.5px; color: #bfdbfe; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 2px; }
.heroTime { font-size: clamp(30px, 4vw, 40px); font-weight: 850; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.heroSub { margin-top: 4px; font-size: 12.5px; color: #c7d2fe; }
.heroBadges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.heroBadge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #e0f2fe;
  white-space: nowrap;
}

.metricGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.metric {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}
.metric .mLabel { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.metric .mValue { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.sectionTitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 2px 0;
}
.sectionTitle h2 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.sectionTitle span { font-size: 11.5px; color: var(--muted); }

.legCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px 15px;
  box-shadow: var(--shadow-sm);
}
.legHead { display: flex; align-items: center; gap: 10px; }
.legNum {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8efff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}
.legTitle { min-width: 0; flex: 1; }
.legTitle strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legTitle span { font-size: 11.5px; color: var(--muted); }
.legStats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.statPill {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.statPill b { color: var(--ink); }

.guides { margin-top: 9px; }
.guides summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.guides summary::-webkit-details-marker { display: none; }
.guides summary::before { content: "＋"; font-size: 13px; color: var(--faint); }
.guides[open] summary::before { content: "－"; }
.guideList {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  max-height: 240px;
  overflow: auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.guideList li { margin-bottom: 3px; }

.compareWrap { overflow-x: auto; margin-top: 10px; }
.compareTable { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 480px; }
.compareTable th, .compareTable td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: right; white-space: nowrap; }
.compareTable th:first-child, .compareTable td:first-child { text-align: left; }
.compareTable th { font-size: 11px; color: var(--muted); font-weight: 700; }
.compareTable tr.isSelected { background: #eff6ff; }
.compareTable tr.isSelected td { font-weight: 700; color: #1d4ed8; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
}
.tag.green { background: #ecfdf5; color: #047857; }
.tag.amber { background: #fffbeb; color: #b45309; }

.planTabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.planTab {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 9px 12px;
  text-align: left;
  min-width: 118px;
}
.planTab:hover { border-color: rgba(37, 99, 235, 0.35); }
.planTab.isActive { border-color: var(--accent); background: #eff6ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1); }
.planTab strong { display: block; font-size: 12px; color: var(--muted); }
.planTab .pT { display: block; font-size: 19px; font-weight: 850; letter-spacing: -0.03em; margin-top: 2px; }
.planTab .pM { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }

.transitLeg { margin-top: 14px; }
.transitLeg:first-of-type { margin-top: 10px; }
.transitLegHead {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
}
.transitLegHead strong { font-size: 13.5px; }
.transitLegHead span { font-size: 11.5px; color: var(--muted); }
.transitLegMeta { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.timeline { display: flex; flex-direction: column; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  padding: 7px 0;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 43px;
  bottom: -5px;
  width: 2px;
  background: var(--line);
}
.stepIcon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--line);
  z-index: 1;
}
.stepIcon svg { width: 18px; height: 18px; }
.stepIcon.subway, .stepIcon.bus, .stepIcon.rail, .stepIcon.ferry { color: #fff; border: 0; font-size: 10px; font-weight: 800; letter-spacing: -0.02em; }
.stepBody { min-width: 0; padding-top: 1px; }
.stepTop { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.stepTop strong { font-size: 13.5px; }
.stepTop .stepTime { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stepDesc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.stops { margin-top: 5px; }
.stops summary {
  cursor: pointer;
  font-size: 11.5px;
  color: #1d4ed8;
  list-style: none;
}
.stops summary::-webkit-details-marker { display: none; }
.stops summary::before { content: "▸ "; }
.stops[open] summary::before { content: "▾ "; }
.stationList {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  max-height: 190px;
  overflow: auto;
  border-left: 2px solid var(--line);
  padding-left: 10px;
}
.stationList li {
  position: relative;
  font-size: 11.5px;
  color: var(--muted);
  padding: 2px 0;
}
.stationList li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.stationList li:first-child, .stationList li:last-child { color: var(--ink); font-weight: 700; }

.notice {
  border-radius: 13px;
  padding: 14px 15px;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}
.notice.isWarn { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.notice.isError { border-color: #fecaca; background: #fff5f5; color: #b91c1c; }
.notice h3 { margin: 0 0 4px; font-size: 14px; }
.notice p { margin: 0; }
.notice .small { font-size: 11.5px; opacity: 0.85; margin-top: 6px; }

.loadingCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.loadingSpinner {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  border: 3px solid #dbeafe;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.loadingText strong { display: block; font-size: 14px; }
.loadingText span { font-size: 12px; color: var(--muted); }
.skeletonLines { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.skeletonLines i {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.skeletonLines i:nth-child(1) { width: 72%; }
.skeletonLines i:nth-child(2) { width: 54%; }
.skeletonLines i:nth-child(3) { width: 63%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.routeMarker { background: transparent; border: 0; }
.markerDot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  border: 3px solid #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.4);
}
.markerDot.start { background: var(--green); }
.markerDot.end { background: var(--red); }
.markerDot.via { background: var(--amber); }

.appFooter {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 2.6vw, 30px) 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--faint);
  font-size: 11px;
}
.appFooter a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 3000;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.isShow { opacity: 1; transform: translate(-50%, 0); }

*:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.3); outline-offset: 2px; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 344px minmax(0, 1fr); gap: 16px; }
  #map { height: 400px; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
  .resultPane { display: flex; }
  #map { height: 340px; }
  .emptyState { padding: 40px 18px; }
}

@media (max-width: 600px) {
  .appHeader { padding: 11px 14px; }
  .brandMark { width: 38px; height: 38px; border-radius: 12px; }
  .brandText h1 { font-size: 16px; }
  .brandText p { font-size: 10.5px; }
  .headerMeta .pillAlt { display: none; }
  .layout { padding: 14px 10px 30px; }
  .panel { padding: 13px; }
  .pointRow { grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 6px; }
  .pointDot { width: 24px; height: 24px; margin-top: 9px; }
  .miniBtn { width: 32px; height: 32px; }
  .miniBtn svg { width: 16px; height: 16px; }
  .pointInput { height: 40px; }
  #map { height: 300px; }
  .mapHint { font-size: 11px; }
  .summaryHero { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
  .heroBadges { justify-content: flex-start; }
  .heroTime { font-size: 34px; }
  .resultCard { padding: 16px; }
  .transitLegMeta { margin-left: 0; }
  .transitLegHead { flex-wrap: wrap; }
  .appFooter { padding: 0 14px 20px; }
  .suggest { max-height: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
