.nearby-dialog {
  box-sizing: border-box;
  width: min(548px, calc(100vw - 32px));
  max-width: none;
  max-height: min(82vh, 760px);
  max-height: min(82dvh, 760px);
  margin: auto;
  padding: 0;
  border: 1px solid #c5d1cd;
  border-radius: 23px;
  color: #192d3c;
  background: #fcfbf7;
  box-shadow: 0 22px 90px #102f3c40;
  overflow: hidden;
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: left;
}
.nearby-dialog::backdrop { background: #14293680; }
body:has(.nearby-dialog[open]) { overflow: hidden; }
.nearby-dialog *, .nearby-dialog *::before, .nearby-dialog *::after { box-sizing: border-box; }
.nearby-panel { display: flex; flex-direction: column; max-height: inherit; }
.nearby-header { display: flex; align-items: center; gap: 12px; flex: none; padding: 18px 22px 12px; }
.nearby-title { flex: 1; margin: 0; color: #192d3c; font: 700 26px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -.03em; }
.nearby-title:focus { outline: none; }
.nearby-glyph { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nearby-glyph svg { display: block; }
.nearby-dialog button { appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.nearby-dialog button:focus-visible, .nearby-extra-label:focus-visible { outline: 2px solid #16776f; outline-offset: -2px; }
.nearby-dialog .nearby-close { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #edf0ea; color: #465d63; }
.nearby-body { min-height: 140px; padding: 0 22px 20px; overflow-y: auto; overscroll-behavior: contain; }
.nearby-summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 0 10px; border-bottom: 1px solid #dce3df; }
.nearby-summary-text { display: grid; gap: 2px; }
.nearby-range { color: #4b6469; font-size: 13px; }
.nearby-accuracy { color: #69716a; font-size: 12px; }
.nearby-dialog .nearby-retry { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; min-height: 40px; padding: 4px 10px; border: 1px solid #bfcec6; border-radius: 9px; color: #116761; font-size: 13px; font-weight: 650; }
.nearby-list { margin: 0; padding: 0; list-style: none; }
.nearby-stop { margin: 0; padding: 0; border-bottom: 1px solid #dce3df; }
.nearby-stop:last-child { border-bottom: none; }
.nearby-dialog .nearby-select { display: block; width: 100%; min-height: 54px; padding: 15px 4px 12px; border-radius: 5px; }
.nearby-meta, .nearby-name-row { display: flex; align-items: center; gap: 9px; }
.nearby-meta { margin-bottom: 4px; color: #5b6d70; font-size: 12px; line-height: 1.35; }
.nearby-distance { padding-left: 9px; border-left: 1px solid #c6d2cc; color: #19675e; font-variant-numeric: tabular-nums; font-weight: 650; }
.nearby-name-row { justify-content: space-between; margin-bottom: 4px; }
.nearby-name { font-size: 17px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.nearby-name-row > .nearby-glyph { color: #587678; }
.nearby-direction { display: flex; align-items: baseline; gap: 6px; line-height: 1.55; overflow-wrap: anywhere; }
.nearby-numbers { color: #394f57; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; }
.nearby-terminus { color: #506269; font-size: 13px; }
.nearby-preview { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 7px; padding: 3px 8px; border-radius: 5px; background: #e9f1eb; color: #1a645c; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.nearby-extra { padding: 0 4px 6px; }
.nearby-extra-label { display: list-item; width: fit-content; max-width: 100%; min-height: 36px; padding: 7px 0; border-radius: 3px; color: #156a63; font-size: 13px; cursor: pointer; }
.nearby-extra-directions { display: grid; gap: 4px; margin: 2px 0 7px; padding-left: 9px; border-left: 2px solid #cbdcd3; }
.nearby-message { padding: 14px 6px 19px; }
.nearby-message > .nearby-glyph { width: 43px; height: 43px; border-radius: 50%; background: #e6efea; color: #1d7067; }
.nearby-message-title { margin: 10px 0 5px; color: #192d3c; font-size: 17px; }
.nearby-message-body { margin: 0; color: #506269; font-size: 14px; }
.nearby-message .nearby-retry { margin-top: 15px; }
.nearby-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) {
  .nearby-dialog .nearby-select:hover { background: #eff4ee; }
  .nearby-dialog .nearby-close:hover, .nearby-dialog .nearby-retry:hover { background: #e4ece5; }
}
@media (max-width: 560px) {
  .nearby-dialog { width: calc(100% - 16px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .nearby-header { padding: 14px 16px 9px; }
  .nearby-title { font-size: 24px; }
  .nearby-body { padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
}
