:root {
  color-scheme: dark;
  --bg: #121314;
  --panel: #191a1b;
  --ink: #f4f1eb;
  --muted: #b6b3ab;
  --line: #383838;
  --accent: #ff715e;
  --mono: ui-monospace, Consolas, monospace;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
}
.brand, .topbar-right, .eyebrow, .planner-head, .results-head, footer { font: 13px var(--mono); }
.brand { font-weight: bold; text-decoration: none; }
.brand span, .eyebrow { color: var(--accent); }
.topbar-right { display: flex; gap: 24px; }
.topbar-right a { text-decoration: none; }
.layout { min-height: calc(100vh - 146px); display: grid; grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); }
.sidebar { padding: 46px 40px 32px; display: flex; flex-direction: column; min-width: 0; }
.eyebrow { letter-spacing: .025em; }
.intro h1 { font-size: clamp(52px, 5vw, 76px); font-weight: 800; letter-spacing: -.075em; line-height: .9; margin: 22px 0 24px; }
.intro h1 span { color: var(--accent); }
.intro p { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 0 0 28px; max-width: 30ch; }
.planner { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 22px; }
.planner-head, .results-head { display: flex; justify-content: space-between; gap: 12px; color: var(--accent); }
.planner-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.planner-index { color: var(--muted); }
.input-wrap { padding: 17px 0 4px; }
.input-wrap label { display: block; margin-left: 25px; color: var(--muted); font: 11px var(--mono); }
.input-row { display: flex; align-items: center; gap: 14px; }
.point { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.start-point { border: 2px solid var(--ink); }
.end-point { background: var(--accent); }
.connector { position: absolute; left: 27px; top: 109px; width: 1px; height: 31px; border-left: 1px dashed #77736e; pointer-events: none; }
input { border: 0; background: transparent; color: var(--ink); font: 15px system-ui, sans-serif; width: 100%; padding: 9px 0; }
input::placeholder { color: #aaa69f; opacity: 1; }
button { border: 0; background: var(--accent); color: #161310; width: 100%; padding: 14px 17px; text-align: left; font: bold 13px var(--mono); cursor: pointer; margin-top: 15px; display: flex; justify-content: space-between; }
button:hover { background: var(--ink); }
button:disabled { opacity: .55; cursor: wait; }
.search-button { width: auto; flex: none; margin: 0; padding: 7px 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.search-button:hover { background: var(--ink); color: var(--bg); }
.location-button { width: auto; margin: 5px 0 0 25px; padding: 5px 0; background: transparent; color: var(--accent); font: 12px var(--mono); }
.location-button:hover { background: transparent; color: var(--ink); }
.place-options { margin-left: 25px; max-height: 230px; overflow-y: auto; }
.place-message, .place-confirmation { font: 11px/1.5 var(--mono); color: var(--muted); margin: 7px 0; }
.place-confirmation { color: var(--accent); }
.place-option { display: block; width: 100%; margin: 4px 0 0; padding: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 12px/1.4 system-ui, sans-serif; }
.place-option:hover { background: #343334; }
.place-option strong, .place-option span { display: block; }
.place-option span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.privacy-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.results-head { margin: 32px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.results { min-height: 140px; overflow: auto; max-height: 340px; }
.empty-icon { height: 32px; width: 32px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font: 20px var(--mono); }
.results h2 { font-size: 18px; letter-spacing: -.03em; margin: 14px 0 7px; }
.results p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.notice { display: flex; gap: 12px; border: 1px solid var(--line); background: var(--panel); padding: 15px; margin-top: auto; }
.notice > span { width: 17px; height: 17px; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font: 11px var(--mono); flex: none; }
.notice p { color: var(--muted); margin: 0; font-size: 12px; line-height: 1.55; }
.notice strong { color: var(--ink); }
.map-section { position: relative; min-height: 550px; background: #222; overflow: hidden; border-left: 1px solid var(--line); }
#map { height: 100%; min-height: 550px; width: 100%; z-index: 0; }
.map-label { position: absolute; z-index: 400; left: 26px; top: 25px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 16px 19px; min-width: 180px; pointer-events: none; }
.map-label span, .map-label small { display: block; font: 11px var(--mono); color: var(--muted); }
.map-label span { color: var(--accent); }
.map-label strong { display: block; font-size: 19px; letter-spacing: -.04em; margin: 9px 0; }
.map-label small i { font-size: 14px; float: right; font-style: normal; color: var(--accent); }
.map-hint { position: absolute; z-index: 400; left: 26px; bottom: 23px; background: var(--panel); border: 1px solid var(--line); padding: 13px 15px; font: 10px var(--mono); color: var(--ink); display: flex; align-items: center; gap: 7px; }
.map-hint > span:first-child { height: 8px; width: 8px; border: 1px solid var(--ink); background: #383838; border-radius: 50%; }
.hint-line { width: 22px; height: 3px; background: var(--accent); margin-left: 10px; }
.walk-line { width: 22px; border-top: 2px dashed var(--ink); margin-left: 10px; }
.map-error { position: absolute; z-index: 600; right: 20px; top: 20px; background: var(--panel); color: var(--ink); border: 1px solid var(--accent); padding: 12px; font-size: 12px; }
footer { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 20px max(24px, calc((100vw - 1120px) / 2)); border-top: 1px solid var(--line); color: var(--muted); }
footer a { color: var(--ink); }
.route-summary { color: var(--accent); font: 12px var(--mono); margin-bottom: 18px; }
.route-leg { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 0 0 18px; }
.route-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #161310; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.route-leg strong { font-size: 14px; }
.route-leg p { font-size: 12px; margin-top: 4px; }
.route-leg details { margin-top: 7px; font-size: 12px; color: var(--muted); }
.route-leg summary { cursor: pointer; }
.route-leg ol { padding-left: 18px; line-height: 1.8; }
.leaflet-control-zoom { margin-top: 155px !important; }
.leaflet-container { font-family: system-ui, sans-serif; background: #222; }
@media (max-width: 760px) {
  .topbar { min-height: 64px; padding: 20px 18px; }
  .topbar-right { gap: 12px; font-size: 12px; }
  .layout { display: flex; flex-direction: column; }
  .sidebar { padding: 35px 18px 24px; }
  .intro h1 { font-size: 55px; }
  .results { min-height: 100px; }
  .notice { margin-top: 20px; }
  .map-section, #map { min-height: 430px; height: 54vh; }
  .map-section { border-left: 0; border-top: 1px solid var(--line); }
  .map-label { top: 15px; left: 15px; }
  .map-hint { left: 15px; bottom: 25px; }
  footer { padding: 20px 18px; font-size: 11px; }
}
