



#dir-mode button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#dir-mode button svg { width: 15px; height: 15px; }
.dir-field { position: relative; margin-bottom: 8px; }

.dir-field .dir-dot { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 11px; height: 11px;
  border-radius: 2px; pointer-events: none; }
.dir-field input { padding-left: 30px; padding-right: 34px; }

.dir-ac { position: absolute; top: calc(100% + 3px); left: 0; right: 0; z-index: 6; display: none;
  background: var(--fa-surface); border: 1px solid var(--fa-line); border-radius: var(--fa-r-md);
  box-shadow: var(--fa-shadow-md); overflow: hidden; max-height: 240px; overflow-y: auto; }
.dir-ac.open { display: block; }
.dir-ac .ac-row { padding: 9px 12px; font-size: 15px; line-height: 1.3; cursor: pointer; color: var(--fa-text);
  border-bottom: 1px solid var(--fa-line-2); border-left: 2px solid transparent; }
.dir-ac .ac-row:last-child { border-bottom: none; }
.dir-ac .ac-row small { display: block; color: var(--fa-mut); font-size: 13.5px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-ac .ac-row:hover, .dir-ac .ac-row.sel { background: var(--fa-accent-soft); border-left-color: var(--fa-accent); }
.dir-me { position: absolute; top: 50%; transform: translateY(-50%); right: 6px; width: 26px; height: 26px; border: none;
  background: transparent; color: var(--fa-mut); cursor: pointer; border-radius: var(--fa-r-sm);
  display: inline-flex; align-items: center; justify-content: center; }
.dir-me svg { width: 16px; height: 16px; }
.dir-me:hover { background: var(--fa-line-2); color: var(--fa-text); }
.dir-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box;
  border: none; background: var(--fa-accent); color: #fff; padding: 11px; cursor: pointer; margin-top: 2px; }
.dir-primary svg { width: 16px; height: 16px; }
.dir-primary:hover { background: var(--fa-accent-strong); }

.dir-addstop { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; cursor: pointer;
  padding: 4px 2px; margin: 2px 0 8px; }
.dir-addstop:hover { text-decoration: underline; }
#dir-stops:empty { display: none; }
.dir-field.dir-stop .dir-dot { background: var(--fa-mut); }

#dir-opts { display: flex; gap: 6px; margin: 2px 0 10px; }
#dir-opts.hide { display: none; }
.dir-opt { flex: 1; border: 1px solid var(--fa-line); background: var(--fa-surface); color: var(--fa-mut); cursor: pointer;
  padding: 8px 6px; font-family: var(--fa-body); font-weight: 600;
  font-size: 13.5px; border-radius: var(--fa-r-sm); white-space: nowrap; }
.dir-opt[aria-pressed="true"] { color: var(--fa-accent-strong); border-color: var(--fa-accent); background: var(--fa-accent-soft); }

.dir-alts { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
.dir-alt { display: flex; align-items: baseline; gap: 10px; padding: 9px 11px; cursor: pointer; text-align: left;
  font-family: var(--fa-body); background: var(--fa-surface); border: 1px solid var(--fa-line); border-radius: var(--fa-r-md); }
.dir-alt:hover { border-color: var(--fa-accent); }
.dir-alt.sel { border-color: var(--fa-accent); background: var(--fa-accent-soft); }
.dir-alt .a-time { font-weight: 700; font-size: 17px; letter-spacing: -0.005em; color: var(--fa-text); }
.dir-alt .a-dist { font-weight: 500; font-size: 13.5px; color: var(--fa-mut); }
.dir-alt .a-tag { margin-left: auto; font-weight: 600; font-size: 11.5px; color: var(--fa-faint); }
.dir-alt.sel .a-tag { color: var(--fa-accent-strong); }

.saved-marker { width: 26px; height: 26px; border-radius: var(--fa-r-md); border: 2px solid #fff; box-shadow: var(--fa-shadow-md);
  background: var(--fa-accent-strong); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.saved-marker svg { width: 15px; height: 15px; }
.maplibregl-popup-content .pop-remove { color: var(--fa-danger); }




#dirpanel:not([data-tab="route"])   .route-only,
#dirpanel:not([data-tab="reach"])   .reach-only,
#dirpanel:not([data-tab="dayaway"]) .day-only { display: none; }



#day-hours { margin-bottom: 6px; }
#day-note { margin: 0 2px 10px; line-height: 1.35; }
#day-result:empty { display: none; }
#day-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--fa-line); }
#day-result ol { list-style: none; margin: 10px 0 0; padding: 0; }
#day-result li { display: flex; align-items: baseline; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--fa-line-2); cursor: pointer; }
#day-result li:hover { background: var(--fa-accent-soft); }
#day-result li .t { flex: 1; min-width: 0; }
#day-result li .t b { font-weight: 600; font-size: 15px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#day-result li .t small { display: block; font-size: 13.5px; color: var(--fa-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#day-result li .band { flex: none; font-weight: 500; font-size: 13.5px; color: var(--fa-faint); white-space: nowrap; }
#day-result .day-hol { color: var(--fa-accent-strong); }


#day-result .day-fest { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px;
  background: var(--fa-wash); border-radius: var(--fa-r-md); }
#day-result .day-fest .t { flex: 1; min-width: 0; }
#day-result .day-fest .t b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#day-result .day-fest .t small { display: block; font-size: 13.5px; color: var(--fa-mut); }
#day-result .day-step { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
#day-result .day-step .linkbtn[disabled] { color: var(--fa-faint); cursor: default; }


.keylist [role="option"]:focus-visible { outline: 2px solid var(--fa-accent); outline-offset: -2px; border-radius: var(--fa-r-sm); }
#day-result .day-wait { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fa-mut); }
#day-result .day-wait i { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--fa-line); border-top-color: var(--fa-accent); animation: pm-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { #day-result .day-wait i { animation: none; } }

#dir-iso-min { display: flex; gap: 6px; margin-bottom: 8px; }
#dir-iso-min button { flex: 1; border: 1px solid var(--fa-line); background: var(--fa-surface); color: var(--fa-mut);
  padding: 8px 4px; cursor: pointer; font-family: var(--fa-body); font-weight: 600; font-size: 13.5px; border-radius: var(--fa-r-sm); }
#dir-iso-min button.active { color: var(--fa-accent-strong); border-color: var(--fa-accent); background: var(--fa-accent-soft); }
#reach-what { display: flex; align-items: center; gap: 8px; padding: 8px 0 2px; font-size: 15px; }
#reach-what .rw-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#reach-what small { color: var(--fa-faint); font-size: 13.5px; }
#reach-result:empty { display: none; }
#reach-result { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--fa-line); }
#reach-result ol { list-style: none; margin: 8px 0 0; padding: 0; }
#reach-result li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--fa-line-2); font-size: 15px; cursor: pointer; }
#reach-result li:hover { background: var(--fa-accent-soft); }
#reach-result li .n { flex: none; font-weight: 600; font-size: 13.5px; color: var(--fa-accent); min-width: 16px; }
#reach-result li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#reach-result li .d { color: var(--fa-faint); font-size: 13.5px; white-space: nowrap; flex: none; font-weight: 500; }
#reach-more { width: 100%; border: none; background: none; cursor: pointer; padding: 8px 0 2px; }
#dir-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--fa-line); }
#dir-result:empty { border-top: none; padding-top: 0; margin-top: 0; }











#dir-result .dir-head, #reach-result .dir-head, #day-result .dir-head { display: flex; align-items: baseline; gap: 8px; }
#dir-result .dir-summary, #reach-result .dir-summary, #day-result .dir-summary { font-weight: 700; font-size: 24px; letter-spacing: -0.015em;
  color: var(--fa-text); line-height: 1.1; }
#dir-result .dir-dist, #reach-result .dir-dist, #day-result .dir-dist { font-weight: 500; font-size: 13.5px; color: var(--fa-mut); }
#dir-result .dir-clear, #reach-result .dir-clear, #day-result .dir-clear { margin-left: auto; border: none; background: none; cursor: pointer; padding: 2px 4px; }



#day-result .day-share { border: none; background: none; cursor: pointer; padding: 2px 4px; color: var(--fa-mut); }
#day-result .day-share svg { width: 16px; height: 16px; display: block; }
#day-result .day-share:hover { color: var(--fa-text); }
#dir-result .dir-sub, #reach-result .dir-sub, #day-result .dir-sub { font-weight: 500; font-size: 13.5px; color: var(--fa-mut); margin: 1px 0 8px; }
#dir-result .dir-err, #reach-result .dir-err, #day-result .dir-err { font-size: 13.5px; color: var(--fa-danger); }
#dir-result ol { list-style: none; margin: 12px 0 0; padding: 0; }
#dir-result li { padding: 11px 2px; border-top: 1px solid var(--fa-line-2); font-size: 15px; color: var(--fa-text);
  display: flex; align-items: baseline; gap: 12px; }
#dir-result li .n { flex: none; font-weight: 600; font-size: 13.5px; color: var(--fa-accent);
  min-width: 16px; }
#dir-result li .t { flex: 1; }
#dir-result li .d { color: var(--fa-faint); font-size: 13.5px; white-space: nowrap; flex: none; }
.dir-marker { width: 28px; height: 28px; border-radius: var(--fa-r-md); border: 2px solid #fff; box-shadow: var(--fa-shadow-md);
  display: flex; align-items: center; justify-content: center; color: #fff; }
.dir-marker svg { width: 16px; height: 16px; }





.iso-start { display: flex; align-items: center; gap: 7px; cursor: grab; }
.iso-start:active { cursor: grabbing; }
.iso-start i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: #5980a6;
  border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(89, 128, 166, 0.35), var(--fa-shadow-sm); }
.iso-start span { font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--fa-text);
  background: var(--fa-surface); padding: 2px 7px; border-radius: var(--fa-r-sm); box-shadow: var(--fa-shadow-sm); }
:root[data-fa-dark] .iso-start i { background: #7ea3c8; box-shadow: 0 0 0 3px rgba(126, 163, 200, 0.35), var(--fa-shadow-sm); }


:root[data-iso-me] .maplibregl-user-location-dot,
:root[data-iso-me] .maplibregl-user-location-dot::before { display: none; }

#toast { position: absolute; left: 50%; bottom: 44px; z-index: 6; transform: translate(-50%, 10px);
         max-width: min(92vw, 520px); text-align: center; line-height: 1.35;
         background: var(--fa-text); color: var(--fa-surface); padding: 8px 15px;
         box-shadow: var(--fa-shadow-lg); opacity: 0; pointer-events: none;
         transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }





.dir-field.armed input { border-color: var(--fa-accent); box-shadow: 0 0 0 3px var(--fa-accent-soft); }
.dir-armed-note { display: flex; align-items: center; gap: 6px; margin: -4px 0 8px 30px; font-size: 13.5px; color: var(--fa-accent-strong); }
.dir-armed-note svg { width: 14px; height: 14px; flex: none; }




.dir-primary-row { display: flex; gap: 8px; align-items: stretch; }
.dir-primary-row .dir-primary { flex: 1 1 auto; }
.dir-primary-row #dir-share { flex: none; width: 44px; }
#dir-share:disabled { opacity: 0.45; cursor: default; }
