.brand {
  text-decoration: none;
  color: var(--ink);
}
.app {
  grid-template-columns: 410px 1fr;
}
aside {
  padding: 24px;
}
.main-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.main-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 12px 0;
  color: var(--muted);
  font-weight: 800;
}
.main-tabs button.active {
  color: var(--dark);
  box-shadow: inset 0 -3px var(--green);
}
.modes {
  grid-template-columns: repeat(3, 1fr);
}
.hero {
  padding: 12px 14px 0;
  gap: 16px;
  background: linear-gradient(115deg, #f8fced, #edf7dd);
  border-color: #e0edce;
}
.hero img {
  width: 78px;
  filter: none;
}
.hero p {
  font-size: 13px;
  line-height: 1.75;
}
.between {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 -12px;
}
.options {
  padding: 11px 12px;
  border: 1px solid #e6eddc;
  border-radius: 13px;
  background: #fafcf6;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.options label,
.checkline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.options input,
.checkline input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  flex: none;
}
.checkline {
  margin-top: 18px;
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 12px;
}
.result-head h2 {
  margin: 0;
}
.notice {
  background: #fff6dd;
  color: #775713;
  padding: 12px;
  border-radius: 12px;
  line-height: 1.65;
  font-size: 12px;
}
.route-card {
  margin: 10px 0;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 17px;
  background: white;
}
.route-card.selected {
  border-color: var(--green);
  background: var(--light);
}
.route-select {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  width: 100%;
  color: var(--ink);
}
.route-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.route-time {
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -1px;
}
.route-time small {
  font-size: 14px;
  letter-spacing: 0;
}
.mode-strip {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 9px 0;
  font-size: 12px;
  font-weight: 750;
}
.transport-tag {
  border-radius: 6px;
  padding: 4px 6px;
  background: #e8f1df;
}
.transport-tag.bicycle {
  background: #dbfac0;
  color: #286911;
}
.transport-tag.bus {
  background: #ddf3fa;
  color: #12627f;
}
.transport-tag.subway {
  background: #e9e5fb;
  color: #5a4196;
}
.leg-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.leg-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
}
.leg-list .leg-time {
  color: var(--muted);
  font-size: 12px;
}
.leg-list strong {
  font-weight: 750;
  display: block;
}
.leg-list p {
  margin: 2px 0;
  color: var(--muted);
}
details {
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
summary {
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.wide {
  width: 100%;
  margin-top: 10px;
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
}
.profile-summary img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--soft);
}
.profile-summary h2 {
  margin: 9px 0 0;
}
.account-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.security-notice {
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid #edcf87;
  border-radius: 14px;
  background: #fff9e9;
  color: #634c15;
  font-size: 12px;
  line-height: 1.65;
}
.security-notice strong {
  display: block;
  color: #533c08;
  font-size: 13px;
}
.security-notice p {
  margin: 5px 0;
}
.security-notice ul {
  margin: 6px 0;
  padding-left: 19px;
}
.security-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  color: #533c08;
}
.security-check input {
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--green);
}
.ride-help {
  margin: 18px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfff6;
  overflow: hidden;
}
.ride-help summary {
  padding: 14px;
  color: var(--dark);
  font-size: 13px;
}
.ride-help[open] summary {
  border-bottom: 1px solid var(--line);
}
.ride-help img {
  display: block;
  width: calc(100% - 24px);
  height: auto;
  margin: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.ride-help ol {
  margin: 14px 18px 8px;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.65;
}
.ride-help li {
  margin-bottom: 10px;
  padding-left: 3px;
}
.ride-help .hint {
  margin: 8px 16px 16px;
}
.upload-box {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.file-label {
  display: block;
  padding: 20px 14px;
  text-align: center;
  border: 1.5px dashed var(--green);
  border-radius: 15px;
  background: var(--light);
  cursor: pointer;
  color: var(--dark);
}
.file-label span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.crop-preview {
  position: relative;
  margin-top: 14px;
  max-height: 420px;
  overflow: auto;
  background: #eef2e9;
  border-radius: 12px;
}
.crop-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.crop-preview .crop-frame {
  position: relative;
}
.crop-preview .crop-frame > div {
  position: absolute;
  left: 0;
  right: 0;
  background: #14261299;
  pointer-events: none;
}
.crop-preview #cropShadeTop {
  top: 0;
  border-bottom: 2px solid var(--lime);
}
.crop-preview #cropShadeBottom {
  bottom: 0;
  border-top: 2px solid var(--lime);
}
.crop-controls label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 10px 0 0;
}
.crop-controls input {
  padding: 0;
  accent-color: var(--green);
}
#ocrReview {
  margin-top: 24px;
}
#editFields label {
  font-size: 12px;
  margin-top: 12px;
}
#editFields input {
  padding: 10px;
}
.mapping-row {
  margin: 5px 0;
}
.mapping-row.bad {
  color: #a73425;
}
.history-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  margin: 9px 0;
  font-size: 12px;
  line-height: 1.7;
}
.history-item p {
  margin: 0;
}
.history-item .history-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.history-item button {
  font-size: 12px;
  padding: 3px 6px;
}
.danger-text {
  border: 0;
  background: none;
  color: #a73425;
  font-size: 12px;
  margin: 18px 0;
  padding: 8px;
}
.map-legend {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: white;
  padding: 9px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 15px #0001;
  z-index: 500;
  display: flex;
  gap: 12px;
  font-size: 12px;
}
.map-legend span:before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  background: var(--green);
}
.map-legend .legend-bus:before {
  background: #1183b1;
}
.map-legend .legend-subway:before {
  background: #7953ae;
}
.map-legend .legend-walk:before {
  background: #778272;
}
.busy {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.busy:before {
  content: '';
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 2px solid var(--line);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.status:empty {
  display: none;
}
#jobStatus {
  white-space: pre-line;
  line-height: 1.55;
}
#jobStatus.busy {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5faed;
}
#jobStatus.error {
  padding: 10px 12px;
  border: 1px solid #efc6bd;
  border-radius: 12px;
  background: #fff6f3;
}
.leaflet-container {
  font-family: inherit;
}
button {
  min-height: 38px;
}
#departure {
  margin-top: 8px;
}
#personalPanel {
  padding-bottom: 16px;
}
@media (max-width: 800px) {
  .app {
    display: block;
  }
  aside {
    padding: 0 18px calc(24px + env(safe-area-inset-bottom));
    height: var(--sheet-h, 62dvh);
    max-height: 94dvh;
  }
  .dragzone {
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .header .logo {
    display: block !important;
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .header .pill {
    display: inline-block !important;
  }
  .header {
    justify-content: space-between;
  }
  .main-tabs {
    padding-top: 0;
  }
  .main-tabs button {
    padding: 9px 0;
  }
  .hero {
    margin-top: 10px;
  }
  .hero img {
    width: 65px;
  }
  .hero p {
    font-size: 12px;
  }
  h1.title {
    text-align: left;
    font-size: 24px;
    margin-top: 18px;
  }
  .topbar {
    left: 12px;
    right: 12px;
    top: calc(12px + env(safe-area-inset-top));
  }
  .floating {
    font-size: 12px;
    padding: 10px 12px;
    max-width: 72%;
  }
  .floating small {
    font-size: 12px;
  }
  .topbar .secondary {
    font-size: 12px;
    padding: 8px 10px;
  }
  .map-legend {
    bottom: auto;
    top: calc(84px + env(safe-area-inset-top));
    right: 12px;
    font-size: 12px;
    padding: 7px 10px;
    gap: 8px;
  }
  .modes .mode {
    font-size: 12px;
  }
  .modes .mode small {
    font-size: 12px;
  }
  .map {
    min-height: 0;
  }
  .leaflet-control-zoom {
    display: none;
  }
  .primary {
    padding: 14px;
  }
  .route-card {
    padding: 14px;
  }
  .profile-summary img {
    width: 58px;
    height: 58px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .busy:before {
    animation: none;
  }
}

.map-credit {
  position: absolute;
  right: 12px;
  top: 116px;
  z-index: 500;
  background: #ffffffed;
  color: #4a6146;
  font-size: 12px;
  padding: 3px 5px;
  border-radius: 4px;
}

.photo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.photo-toolbar button {
  min-height: 44px;
}
.photo-feedback {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #e7b7a4;
  border-radius: 14px;
  background: #fff8f3;
  color: #703727;
  scroll-margin: 80px;
}
.photo-feedback h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.photo-feedback p,
.photo-feedback li {
  font-size: 13px;
  line-height: 1.65;
}
.photo-feedback ul:empty {
  display: none;
}
.photo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.photo-actions button {
  font-size: 12px;
  flex: 1 1 90px;
}
#photoPreviewDetails {
  margin-top: 10px;
}
#photoPreviewDetails summary {
  padding: 8px 0;
}
#ocrReview {
  scroll-margin: 78px;
}
#openPhotoEditor {
  margin-top: 18px;
}

.personal-guide {
  padding: 12px 14px;
  margin: 8px 0 16px;
  background: var(--light);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
}
.personal-guide p {
  margin: 0 0 6px;
}
.personal-guide details {
  margin: 6px 0 0;
  padding: 6px 0;
}
.personal-note {
  background: var(--light);
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
}
.route-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: #f4f8ec;
  color: var(--dark);
  font-size: 12px;
  font-weight: 700;
}
.chip:hover { background: var(--soft); }
.chip span { font-size: 16px; }


/* ===== 결과 유형 탭 (전체 / 통합 / 대중교통 / 따릉이) ===== */
.route-filter {
  display: flex;
  gap: 6px;
  margin: 6px 0 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.route-filter::-webkit-scrollbar {
  display: none;
}
.filter-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 800;
}
.filter-chip small {
  font-size: 12px;
  font-weight: 750;
  opacity: 0.85;
}
.filter-chip[aria-selected='true'] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--onlime);
}
.filter-chip.empty:not([aria-selected='true']) {
  opacity: 0.55;
}
.route-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pill.best {
  background: var(--ink);
  color: #fff;
}
.empty-state {
  margin: 10px 0;
  padding: 22px 16px;
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.empty-state p {
  margin: 0;
}


/* ===== 검색 화면 ↔ 결과 화면 전환 ===== */
.result-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.result-nav[hidden] {
  display: none;
}
.back-btn {
  flex: none;
  min-height: 40px;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.route-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
#routesPanel.view-results #serverStatus {
  display: none;
}
#routesPanel.view-results #jobStatus:not(.error):not(.busy) {
  display: none;
}


/* ===== 이동 안내: 마스코트 위치 마커 + 안내 카드 ===== */
.go-bar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  margin: 12px 0 0;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(#fff0, #fff 28%);
}
.go-bar[hidden] {
  display: none;
}
.go-bar .primary {
  margin-top: 0;
}
.rider-icon {
  background: none;
  border: 0;
}
.rider-badge {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--lime);
  background: #fff;
  box-shadow: 0 4px 12px #0003;
}
.rider-badge img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  padding: 3px;
  background: var(--light);
}
.rider-badge::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 14px;
  height: 14px;
  background: var(--lime);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 3px 0;
  z-index: -1;
}
.rider-shadow {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 22px;
  height: 7px;
  margin-left: -11px;
  border-radius: 50%;
  background: #0003;
}
.rider-icon.moving .rider-badge {
  animation: rider-hop 0.55s ease-in-out infinite;
}
@keyframes rider-hop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
.guide-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100% - 36px));
  padding: 10px 12px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 22px #0002;
}
.guide-card[hidden] {
  display: none;
}
.guide-avatar {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  object-fit: contain;
  padding: 3px;
  background: var(--light);
}
.guide-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.guide-text strong {
  font-size: 14px;
}
.guide-text small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.guide-actions {
  display: flex;
  gap: 6px;
  flex: none;
}
.guide-actions .secondary {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.guide-actions .secondary[hidden] {
  display: none;
}
#guideFollow.on {
  background: var(--light);
  border-color: var(--green);
}
@media (max-width: 800px) {
  .guide-card {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: calc(min(var(--sheet-h, 62dvh), 70dvh) + 12px);
  }
  .guide-actions {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rider-icon.moving .rider-badge {
    animation: none;
  }
}

/* A quieter surface keeps the original green identity. */
.primary {
  min-height: 50px;
  border-radius: 16px;
  background: linear-gradient(105deg, #98ed3b, #b6f265);
  box-shadow: 0 5px 16px #78ae292b;
}
.primary:hover { filter: brightness(0.98); }
.route-card { box-shadow: 0 3px 14px #20341008; }
.route-card.selected { background: #f6fce9; }
.filter-chip[aria-selected='true'] { background: #e8f8cf; border-color: #b3de7e; }
.main-tabs { border-bottom-color: #e7eedf; }
h1.title { font-size: 27px; line-height: 1.45; }
@media (max-width: 800px) {
  h1.title { font-size: 24px; }
  .hero { gap: 12px; }
  .route-tools { margin-top: 10px; }
}

/* ===== web_update: 출발·도착 한 박스 UI ===== */
/* ===== 출발·도착 통합 입력 (카카오맵/네이버지도 스타일) ===== */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px !important;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.route-box {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 18px;
  padding: 4px 8px 4px 10px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fcfff7;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.route-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px #4cc40a22;
}
.route-fields {
  flex: 1;
  min-width: 0;
}
.route-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  padding-left: 24px;
}
/* 출발(초록) / 도착(검정) 점 — 지도 핀 색과 같게 */
.route-field::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--green);
}
.route-field.is-to::before {
  border-color: var(--ink);
}
/* 두 점을 잇는 점선 */
.route-field::after {
  content: '';
  position: absolute;
  left: 8px;
  border-left: 2px dotted #b9d98f;
}
.route-field.is-from::after {
  top: calc(50% + 10px);
  bottom: 0;
}
.route-field.is-to::after {
  top: 0;
  bottom: calc(50% + 10px);
}
/* 두 입력칸 사이 구분선 */
.route-field.is-to {
  background: linear-gradient(var(--line), var(--line)) 24px 0 / calc(100% - 24px) 1px no-repeat;
}
.route-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px 4px;
  font-weight: 600;
}
.route-field input::placeholder {
  font-weight: 500;
  color: #9db296;
}
.route-field input:focus-visible {
  outline: none;
}
.field-btn {
  flex: none;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.field-btn:hover {
  background: var(--soft);
  color: var(--dark);
}
.field-btn[data-pick] {
  color: var(--dark);
}
/* 입력값이 없으면 지우기(×) 버튼 숨김 */
.route-field input:placeholder-shown ~ .clear-btn {
  display: none;
}
.swap-btn {
  align-self: flex-start;
  margin-top: 33px; /* 출발·도착 두 줄 사이에 고정 (검색 목록이 열려도 안 밀림) */
  flex: none;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--dark);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px #1d3d0f14;
}
.swap-btn:hover {
  background: var(--light);
}
.swap-btn:active {
  transform: scale(0.94);
}
.route-fields .sugg {
  margin: 0 0 6px 24px;
}

.route-field input[aria-invalid='true'] { border-color: #d64545; }
.route-fields .field-feedback { margin: 0 0 6px 24px; }

/* ===== UX 개선 (2026-11) ===== */
/* 1. 검색 버튼 하단 고정 · 상세 설정 접기 */
#searchButton {
  position: sticky;
  bottom: 0;
  z-index: 4;
  width: 100%;
  margin-top: 14px;
  box-shadow: 0 -10px 14px 6px #fff, 0 5px 16px #78ae292b;
}
.adv { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fafcf6; padding: 0 12px; }
.adv summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-weight: 800; font-size: 14px; color: var(--dark); cursor: pointer; list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::after { content: '＋'; font-weight: 700; color: var(--muted); }
.adv[open] summary::after { content: '－'; }
.adv summary small { margin-left: auto; margin-right: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.adv[open] { padding-bottom: 12px; }
.adv .options { margin-top: 10px; }
/* 2. 최근 장소 · 지도 선택 안내 · 오류 표시 */
.recent-places { display: flex; align-items: center; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.recent-places::-webkit-scrollbar { display: none; }
.recent-label { flex: none; font-size: 12px; font-weight: 800; color: var(--muted); }
.recent-chip { flex: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-feedback.error::before { content: '⚠ '; }
.pick-banner { position: absolute; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 700; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: #17301a; color: #fff; border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px #0003; white-space: nowrap; }
.pick-banner[hidden] { display: none; }
.pick-banner button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--lime); color: var(--onlime); font-weight: 800; }
/* 3. 이동 방법 탭 */
.mode { min-height: 52px; }
.mode small { font-size: 12px; }
.mode[aria-selected='true'] { background: var(--lime); color: var(--onlime); box-shadow: 0 3px 12px #78ae2940; }
/* 4. 결과 카드 */
.route-time { font-size: 30px; }
.route-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.route-facts span { padding: 4px 10px; border-radius: 999px; background: var(--light); color: var(--dark); font-size: 13px; font-weight: 800; }
.route-card.selected { border-width: 2.5px; }
/* 5. 주행 안내 */
.guide-text strong { font-size: 18px; }
.guide-text small { font-size: 14px; }
.guide-toggle { flex: none; order: 5; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--light); color: var(--dark); display: grid; place-items: center; }
.guide-card.folded .guide-actions, .guide-card.folded .guide-text small { display: none; }
.guide-card.folded .guide-toggle svg { transform: rotate(180deg); }
.guide-card.folded { padding: 8px 10px; }
#guideFollow:not(.on) { background: #fff; color: var(--muted); }
/* 6. 터치 영역 44px · 줌 버튼 */
.chip, .secondary, .textbtn, .main-tabs button, .pillbtn { min-height: 44px; }
.field-btn, .clear-btn { width: 40px; height: 44px; min-height: 44px; border-radius: 12px; }
.swap-btn { width: 44px; height: 44px; min-height: 44px; margin-top: 27px; }
.guide-actions .secondary { min-height: 44px; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; }
@media (max-width: 800px) {
  .leaflet-control-zoom { display: block !important; }
  .leaflet-top.leaflet-right { top: 130px; }
  .hero img { width: 52px; }
  .hero p { font-size: 13px; }
  .pick-banner { max-width: calc(100% - 24px); font-size: 13px; }
}

/* 이동 방법 탭: 한 줄 유지 (PC 사이드바 폭에서 줄바꿈 방지) */
.mode { white-space: nowrap; padding-left: 4px; padding-right: 4px; word-break: keep-all; }
.mode small { white-space: nowrap; font-size: 12px; letter-spacing: -0.3px; }
@media (min-width: 801px) {
  .modes { gap: 4px; }
  .mode { font-size: 14px; }
  .mode small { font-size: 12px; letter-spacing: -0.5px; }
}
