/* One compact start-time chip inside the start/destination card. */
.places{--place-heading-height:35.2px;--place-row-inset:4.4px}
.places>.place-field:first-child,.places>.place-field:last-child{padding-block:var(--place-row-inset)}
.places>.place-field:first-child{grid-column:1 / -1}
.places>.place-field:first-child .input-line{padding-right:44px}
.places .place-heading{display:flex;align-items:center;justify-content:space-between;gap:3px 6px;min-height:var(--place-heading-height);flex-wrap:wrap}
.places .place-heading label{margin:0;flex:none}
.places #destination-field .place-input>label{display:flex;align-items:center;min-height:var(--place-heading-height);margin:0}
/* Both endpoint rows share their height; keep the connector between the icons. */
.places::before,.large-text .places::before{top:calc(50% - var(--place-row-inset) - var(--place-control-height)/2 + 12px);bottom:calc(var(--place-row-inset) + var(--place-control-height)/2 + 12px)}
/* Inline validation changes the icon alignment, so omit this decoration there. */
.places:has(.place-needs-selection)::before{display:none}
#departure-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:var(--place-heading-height);min-width:0;max-width:100%;padding:4px 5px;border:1px solid var(--line);border-radius:6px;background:var(--mode-surface,#e4eee8);color:var(--ink);font:inherit;font-size:.75rem;font-weight:600;white-space:nowrap}
/* Keep a 44px tap height around the smaller visible chip. */
#departure-toggle::after{content:"";position:absolute;inset:-4.4px 0}
#departure-toggle>svg{width:12px;height:12px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#departure-toggle>span{overflow:hidden;text-overflow:ellipsis}
#departure-toggle:hover{background:var(--line)}
[data-theme=dark] #departure-toggle{background:var(--surface)}
body[data-walk-mode=circular] .places>.place-field:first-child .input-line{padding-right:0}
.large-text #departure-toggle{font-size:.95rem}
.places .place-needs-selection .place-symbol,.large-text .places .place-needs-selection .place-symbol{margin-top:calc(var(--place-heading-height) + (var(--place-control-height) - 24px)/2)}
.departure-picker{display:grid;gap:14px}
.departure-picker>.dialog-scroll-content{display:grid;gap:14px}
.departure-time-tabs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-bottom:1px solid var(--line)}
.departure-time-tabs button{min-height:46px;width:100%;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--muted);padding:10px;font:inherit;font-weight:600}
.departure-time-tabs button[aria-selected=true]{border-bottom-color:var(--green);color:var(--green)}
/* Keep both tab footprints in one grid cell so the sheet never shrinks on Now.
   The inactive panel retains its size but stays invisible and inert. */
.departure-mode-panels{display:grid;min-width:0}
.departure-mode-panels>[role=tabpanel]{grid-area:1 / 1;min-width:0}
.departure-mode-panels>[hidden]{display:block!important;visibility:hidden;pointer-events:none}
.departure-mode-panels>.departure-now-message[hidden]{display:flex!important}
.departure-now-message{display:flex;min-height:230px;align-items:center;justify-content:center;flex-direction:column;gap:10px;text-align:center;padding:20px}
.departure-now-message .walk-tool-icon{width:34px;height:34px;color:var(--green)}
.departure-now-message strong{font-size:1.25rem}.departure-now-message p{margin:0;max-width:290px;color:var(--muted);line-height:1.5}
.departure-wheels{--departure-row:44px;display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,.75fr) minmax(0,.75fr);gap:6px;position:relative}
.departure-wheel-column{min-width:0}.departure-wheel-column>span{display:block;text-align:center;font-size:.8rem;color:var(--muted);margin-bottom:6px}
.departure-wheel{height:calc(var(--departure-row)*5);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scroll-snap-type:y mandatory;padding-block:calc(var(--departure-row)*2);scrollbar-width:none;border-radius:9px;outline-offset:-2px;font-variant-numeric:tabular-nums;background:linear-gradient(to bottom,transparent 40%,var(--line) 40%,var(--line) 60%,transparent 60%)}
.departure-wheel::-webkit-scrollbar{display:none}
.departure-wheel:focus-visible{outline:2px solid var(--green)}
.departure-wheel-option{height:var(--departure-row);min-height:var(--departure-row);display:flex;align-items:center;justify-content:center;scroll-snap-align:center;color:var(--muted);font-size:1.125rem;white-space:nowrap;cursor:pointer;padding-inline:2px}
.departure-wheel-option[aria-selected=true]{color:var(--ink);font-weight:650}
.large-text .departure-wheel-option{font-size:1.25rem}
#departure-day-wheel .departure-wheel-option{font-size:1rem}
.departure-date-summary{font-size:.8rem;color:var(--muted);text-align:center;margin:10px 0 0;line-height:1.4}
.departure-direct-entry{margin-top:12px}.departure-direct-entry summary{color:var(--green);font-size:.85rem;cursor:pointer;padding:6px 0}
.departure-direct-entry input{width:100%;min-width:0;min-height:48px;box-sizing:border-box;font:inherit;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:8px;margin-top:6px}
.departure-picker .data-note{margin:0;font-size:.85rem;line-height:1.45}
.departure-picker-open .dialog-actions.departure-picker-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;flex:none;width:100%;padding-top:15px;margin-top:14px;border-top:1px solid var(--line)}
.departure-picker-actions button,.departure-picker-actions button.primary{width:100%;min-width:0;min-height:48px;margin:0;display:flex;align-items:center;justify-content:center;padding:10px 4px;border-radius:9px;font-size:1rem;font-weight:600;white-space:nowrap;line-height:1.35}
.departure-picker-actions #departure-cancel{background:var(--paper);color:var(--ink);border:1px solid var(--line)}
.large-text .departure-picker-actions button{font-size:1.125rem}
.departure-picker-open .dialog-header{margin-bottom:14px;padding-bottom:10px}
.departure-picker-open .dialog-header h2{font-size:1.2rem}
@media(max-width:700px),(max-width:1000px) and (pointer:coarse){
  .departure-picker-open .feature-dialog{place-items:end center;padding:0}
  .departure-picker-open .dialog-card{width:100%;max-width:560px;max-height:calc(100dvh - env(safe-area-inset-top) - 12px);border-radius:22px 22px 0 0;padding:12px 18px max(18px,env(safe-area-inset-bottom));overflow:auto}
  .departure-picker-open .dialog-card::before{content:"";display:block;width:36px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 12px}
}
@media(max-width:360px){.departure-picker-open .dialog-card{padding-inline:14px}.departure-picker-actions button,.departure-picker-actions button.primary{font-size:.95rem}}
@media(max-height:600px){.departure-wheels{--departure-row:38px}.departure-wheel{height:calc(var(--departure-row)*3);padding-block:var(--departure-row);background:linear-gradient(to bottom,transparent 33.333%,var(--line) 33.333%,var(--line) 66.667%,transparent 66.667%)}.departure-now-message{min-height:130px}}
