/* layout */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── 검색바 ── */
.search-bar {
    display: flex;
    padding: 1.6rem 1.6rem 1.2rem;
    position: relative;
}
.search-bar input {
    flex: 1;
    padding: 1.6rem 1.4rem;
    border: 1.5px solid #ddd;
    border-radius: 0.8rem 0 0 0.8rem;
    font-size: 1.5rem;
    outline: none;
    padding-left: 4rem;
}
#regionSearch{padding-left: 1.4em;}

.search-bar button {
    padding: 1.2rem 1.8rem;
    background: #847F7F;
    color: #fff;
    border: none;
    border-radius: 0 0.8rem 0.8rem 0;
    font-size: 1.5rem;
    cursor: pointer;
}
.filter-btn {
    position: absolute;
    left: 2.8rem;
    top: 52%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: #aaa;
    text-decoration: none;
}

.filter-btn img {
    width: 1.8rem;
}

/* ── 퀵메뉴 ── */
.quick-menu {
    display: flex;
    gap: 0.8rem;
    padding: 0 1.6rem 1.2rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.quick-menu::-webkit-scrollbar { display: none; }
.quick-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    border: 1.5px solid #ddd;
    border-radius: 2rem;
    font-size: 1.3rem;
    color: #ACA9A9;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

/* ── 배지 ── */
.badge {
    display: inline-block;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    color: #fff;
    min-width: 3.4rem;
    text-align: center;
}
.badge.fav {margin-right: 1rem;}
.badge-maul      { background: #009127; }
.badge-gansun    { background: #013DD5; }
.badge-gwangyeok { background: #FF0000; }
.badge-sunhwan   { background: #FFD900; }
.badge-jisun     { background: #00D93A; }
.badge-express   { background: #8e44ad; }

/* ── 목록 아이템 ── */
.list-item {
    display: flex;
    align-items: center;
    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    gap: 1rem;
}
.list-item:active { background: #fafafa; }
.route-info { flex: 1; min-width: 0; }
.route-num {
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.route-num.fav{justify-content: space-between;margin-bottom: 1rem;}
.route-num.stop{margin-bottom: 1rem;}
.route-num-inner{font-size: 1.6rem;}
.route-num.bus{margin-bottom: 0;}
.route-ends {
    color: #888;
    margin-top: 0.3rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 5rem;
}
.route-ends.detail{padding: 1.5rem 2rem 0.5rem;}
.route-ends span { font-size: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #888;}
.route-ends .arrow { color: #bbb; text-align: center; }
.action-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #ccc;
    padding: 0.4rem;
    flex-shrink: 0;
}
.action-btn.active { color: #f39c12; }

/* ── 빈 상태 ── */
.empty-state {
    text-align: center;
    padding: 8rem 3rem;
    color: #999;
}
.empty-state .title {
    font-size: 1.7rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 1rem;
}
.empty-state .desc { font-size: 1.4rem; line-height: 1.6; color: #ACA9A9; }

/* ── 페이지 헤더 ── */
.page-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.6rem;
    gap: 1rem;
    border-bottom: 1px solid #f0f0f0;
}
.page-header.stop{justify-content: space-between;border: none;}
.page-header.stop > div{display: flex;align-items: center;gap: 1rem;}
.stop-header-info{padding: 1.4rem 1.6rem;}
.back-btn {
    font-size: 2.2rem;
    cursor: pointer;
    color: #444;
    background: none;
    border: none;
    text-decoration: none;
    line-height: 1;
}
.page-header .route-num { font-size: 1.8rem; font-weight: 700; }
.page-header .spacer { flex: 1; }
.icon-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
}
.icon-btn.active { color: #f39c12; }

/* ── 탭바 ── */
.tab-bar {
    display: flex;
    border-bottom: 1px solid #eee;
}
.tab-btn {
    flex: 1;
    padding: 1.1rem;
    text-align: center;
    font-size: 1.4rem;
    color: #888;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
}
.tab-btn.active { color: #222; font-weight: 600; border-bottom-color: #222; }

/* ── 정보 행 ── */
.info-row {
    display: flex;
    padding: 1rem 1.6rem;
    font-size: 1.4rem;
    border-bottom: 1px solid #f5f5f5;
}
.info-label { color: #999; width: 8rem; flex-shrink: 0; }
.info-value { color: #222; font-weight: 500; }

/* ── 섹션 타이틀 ── */
.section-title {
    padding: 1.4rem 1.6rem 0.6rem;
    font-size: 1.3rem;
    color: #999;
    font-weight: 500;
}

/* ── 로딩 ── */
.loading { text-align: center; padding: 4rem; color: #aaa; font-size: 1.4rem; }

/* ── 토스트 ── */
#toast {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%) translateY(2rem);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 버튼 ── */
.btn-primary {
    display: block;
    width: calc(100% - 3.2rem);
    margin: 1.2rem 1.6rem;
    padding: 1.4rem;
    background: #5865f2;
    color: #fff;
    border: none;
    border-radius: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}
.btn-primary:active { background: #4752c4; }

/* ── bus_detail ── */
.return-row {
 margin-left: 2.3rem;
 position: relative;
 top: -1rem;
}
.return-row img{position: absolute;}

.stops-list { padding-bottom: 0.8rem; }
.stop-row {
    display: flex; align-items: stretch;
    padding: 0 1.6rem; text-decoration: none;
    color: inherit; min-height: 5.8rem;
}
.stop-row:active { background: #fafafa; }
.stop-row.has-bus { background: #f3f5ff; }
.stop-line-col {
    display: flex; flex-direction: column;
    align-items: center; width: 3.2rem; flex-shrink: 0;
}
.line-seg { flex: 1; width: 2px; min-height: 1.2rem; background: #ccc;}
.line-seg.invisible { background: transparent !important; }
.stop-dot {
    width: 2rem; height: 2rem; border-radius: 50%;
    border: 1px solid #ccc; background: #fff;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.stop-dot img{width: 1rem;}
.bus-marker { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }
.stop-info {
    flex: 1; padding: 1.2rem 0 1.2rem 1rem;
    border-bottom: 1px solid #f5f5f5; min-width: 0;
}
.stop-name { font-size: 1.6rem; color: #222; }
.bus-here-text { font-weight: 700; color: #5773FA; }
.stop-id { font-size: 1.4rem; color: #bbb; margin-top: 0.3rem; }

/* ── search ── */
.tab-pill { padding: 0.7rem 1.6rem; border-radius: 2rem; border: 1.5px solid #ddd; background: #fff; font-size: 1.4rem; color: #ACA9A9; cursor: pointer; }
.tab-pill.active { background: #E3E8FF; border-color: #5773FA; color: #5773FA; font-weight: 600; }
.city-dropdown-wrap { position: relative; }
.city-dropdown-btn { padding: 0.7rem 1.2rem; border-radius: 2rem; border: 1.5px solid #ddd; background: #fff; font-size: 1.4rem; color: #ACA9A9; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; }
.city-menu { display: none; position: absolute; right: 0; top: calc(100% + 0.4rem); background: #fff; border: 1px solid #e0e0e0; border-radius: 1rem; box-shadow: 0 4px 16px rgba(0,0,0,0.10); z-index: 100; min-width: 7rem; max-height: 30rem; overflow-y: auto; }
.city-menu.open { display: block; }
.city-option { padding: 0.5rem 1.5rem; font-size: 1.4rem; color: #333; cursor: pointer; }
.city-option.active { color: #5773FA; background: #E3E8FF; }

/* ── region_setup ── */
.page-title {
    padding: 20px 16px 12px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

#regionList {
    padding: 0 16px 100px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.region-group {
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.region-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #f5f5f7;
    cursor: pointer;
    user-select: none;
    border-bottom: none;
}

.region-group-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.region-group-count {
    font-size: 1.3rem;
    font-weight: 400;
    color: #999;
    margin-left: 4px;
}

.region-group-arrow { font-size: 1.3rem; color: #aaa; transition: transform 0.2s; }
.region-group-arrow.open { transform: rotate(180deg); }

.region-group-btn {
    font-size: 1.2rem;
    color: #ACA9A9;
    border: 1px solid #ACA9A9;
    background: #fff;
    border-radius: 2rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.region-group-btn:hover {
    background: #ACA9A9;
    color: #fff;
    border-color: #ACA9A9;
}

.region-items {
    display: none;
}
.region-items.open {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.region-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
}
.region-item.selected {
    color: #5865f2;
    font-weight: 600;
}
.region-item .check {
    width: 18px;
    height: 18px;
    border: 1.5px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.region-item.selected .check {
    background: #5865f2;
    border-color: #5865f2;
}
.region-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.4rem; }

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    border-top: 1px solid #eee;
    background: #fff;
    padding: 8px;
    gap: 8px;
}
.btn-cancel {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    color: #888;
    cursor: pointer;
    font-weight: 500;
}
.btn-confirm {
    flex: 2;
    padding: 14px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    background: #5865f2;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-confirm:hover { background: #4752c4; }


/* bus detail */
.city-name {
    padding: 10px 16px 2px;
    font-size: 12px;
    color: #999;
}

.route-section {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-section .stop-label {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.route-section .arrow {
    color: #bbb;
    font-size: 13px;
}

.route-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.route-actions .action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1.5rem;
    color: #555;
    text-decoration: none;
    background: #fff;
}

.route-actions .refresh-btn {
    cursor: pointer;
    position: fixed;
    bottom: 3%;
    right: 3%;
}

.bus-running {
    padding: 10px 16px;
    font-size: 13px;
    color: #5773FA;
    font-weight: 600;
}

.map-refresh-btn{
        cursor: pointer;
    position: fixed;
    bottom: 3%;
    right: 3%;
    z-index: 1;
}
span.route-ends{font-size: 1.3rem;padding: 0 !important;gap: 1rem;}

/* =============================================
   map.css - 지도 페이지 전용 스타일
   ============================================= */

#mapContainer {
    width: 100%;
    height: calc(100vh - 56px);
}

/* ── 지도 마커 ── */
.map-marker-bus {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.map-marker-stop {
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* map */

#mapContainer {
    width: 100%;
    height: calc(100vh - 56px);
}

/* ── 인포윈도우 ── */
.map-infowindow {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}
.map-infowindow strong {
    display: block;
    color: #222;
}
.map-infowindow span {
    color: #999;
    font-size: 11px;
}


/* bus info */
.info-wrap { padding: 16px; }
.info-section-title {
    font-size: 1.5rem;
    color: #999;
    margin-bottom: 10px;
    margin-top: 16px;
}
.info-section-title:first-child { margin-top: 0; }
.info-route-ends {
    display: flex;
    align-items: center;
gap: 0.8rem;
margin-bottom: 2rem;
}
.info-route-ends span{font-size: 1.5rem;font-weight: 500;}
.info-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    margin-bottom: 6px;
}
.info-time-label {
font-size: 1.3rem;
    color: #c0c0c0;
border:1px solid #ddd;
    flex-shrink: 0;
    padding: 0.6rem 1.3rem;
}
.info-time-value { font-size: 14px; }
.info-running {
    font-size: 13px;
    color: #5773FA;
    font-weight: 600;
margin-top: 2rem;
margin-bottom: 3rem;
}
.info-interval {
    font-size: 15px;
    margin-bottom: 6px;
    color: #333;
}

/* stop detail */
.stop-header-name{font-size: 1.6rem;font-weight: 500;}
.stop-header-sub{font-size: 1.4rem;}
.arrival-bus-no{font-size: 1.6rem; margin-left: 1rem;}
.arrival-item { align-items: center; min-height: 7rem; justify-content: space-between;}
.arrival-row { display: flex; align-items: center; gap: 0.6rem; }
.arrival-row:nth-child(1){margin-bottom: 1rem;}
.arr-soon { font-size: 1.5rem; font-weight: 700; color: #e74c3c; }
.arr-time, .arr-time2 { font-size: 1.6rem; font-weight: 500; width: 7rem; text-align: right;}
.arr-stops { font-size: 1.5rem; color: #aaa; padding: 0.4rem 0.7rem; border: 1px solid #ddd;width: 8rem;text-align: center;}
.arrival-endnm{font-size: 1.4rem;color: #ACA9A9;margin-top: 1rem;;}



/* ════════════════════════════════
   express_bus
   ════════════════════════════════ */
  .express-title{
    font-size: 2.2rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.04em;
    margin-bottom: 1.6rem;
    margin-top: 2rem;
  }
  /* ── 탭 ── */
  .tab-group {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
  }
  
  .bus-tab-btn {
    padding: 0 1.6rem;
    height: 3rem;
    border-radius: 10rem;
    border: 1.5px solid #E2E2E2;
    background: #fff;
    font-size: 1.4rem;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    line-height: 1;
  }
  
  .bus-tab-btn.active {
    border: 1.5px solid #5773FA;
    background: #E3E8FF;
    color: #5773FA;
    font-weight: 600;
  }
  
  
  /* ── 출발지 / 도착지 행 ── */
  .route-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
    border-radius: 1rem;
    overflow: visible;
  }
  
  .sel-wrap {
    flex: 1;
    position: relative;
  }
  
  .sel-box {
    height: 5.2rem;
    padding: 0 1.4rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    background: #fff;
    border-radius: 1rem;
  }
  
  /* 구분선 — 스왑버튼 양쪽 */
  .route-row .sel-wrap:first-child .sel-box {
    border-right: none;
    border-radius: 1rem;
    border: 1px solid #ddd;
  }
  .route-row .sel-wrap:last-child .sel-box {
    border-left: none;
    border-radius:1rem;
    border: 1px solid #ddd;
  }
  
  .sel-ph {
    font-size: 1.4rem;
    color: #c0c0c0;
  }
  
  .sel-ph.hidden {
    display: none;
  }
  
  .sel-val {
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
    display: none;
  }
  
  .sel-val.show {
    display: block;
  }
  
  /* 셀렉트 드롭다운 */
  .sel-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1.5px solid #e2e2e2;
    border-radius: 1rem;
    list-style: none;
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  }
  
  .sel-dropdown.open {
    display: block;
  }
  
  .sel-dropdown li {
    padding: 1.3rem 1.6rem;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f2f2f2;
  }
  
  .sel-dropdown li:last-child {
    border-bottom: none;
  }
  
  .sel-dropdown li.chosen {
    color: #5773FA;
    font-weight: 600;
  }
  
  
  /* ── 스왑 버튼 ── */
  .swap-wrap {
    flex-shrink: 0;
    width: 3.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .swap-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 5.2rem;
  }
  
  .swap-img {
    width: 2rem;
    height: auto;
    display: none; /* src 있으면 표시되도록 JS로 처리하거나 직접 수정 */
  }
  
  .swap-svg {
    display: block;
  }
  
  
  /* ── 날짜 선택 ── */
  .date-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 1.6rem;
    border: 1.5px solid #e2e2e2;
    border-radius: 1rem;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
  }
  
  .date-box {
    flex: 1;
    height: 5.2rem;
    padding: 0 1.4rem;
    display: flex;
    align-items: center;
  }
  
  .date-arrow {
    padding-right: 1.4rem;
    display: flex;
    align-items: center;
  }
  
  /* 달력 드롭다운 */
  .cal-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e2e2e2;
    border-radius: 1.2rem;
    z-index: 200;
    padding: 1.6rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  }
  
  .cal-dropdown.open {
    display: block;
  }
  
  .cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
  }
  
  .cal-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111;
  }
  
  .cal-nav {
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #aaa;
    cursor: pointer;
    padding: 0 0.8rem;
    line-height: 1;
  }
  
  .cal-wdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 0.6rem;
  }
  
  .cal-wdays span {
    font-size: 1.2rem;
    color: #bbb;
    padding: 0.3rem 0;
  }
  
  .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.2rem;
  }
  
  .cal-days span {
    font-size: 1.3rem;
    color: #222;
    padding: 0.9rem 0;
    border-radius: 0.6rem;
    cursor: pointer;
    line-height: 1;
  }
  
  .cal-days span.dis {
    color: #ddd;
    cursor: default;
  }
  
  .cal-days span.sel {
    background: #5773FA;
    color: #fff;
    font-weight: 700;
  }
  
  
  /* ── 조회 버튼 ── */
  .search-btn {
    width: 100%;
    height: 5.4rem;
    background: #5773FA;
    border: none;
    border-radius: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
  }
  
  
  /* ── 결과 헤더 ── */
  .result-head {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #efefef;
    margin-bottom: 0;
  }
  
  .result-head span {
    font-size: 1.3rem;
    color: #333;
    font-weight: 400;
    text-align: center;
  }
  
  
  /* ── 결과 목록 ── */
  .result-empty {
    font-size: 1.4rem;
    color: #c8c8c8;
    text-align: center;
    padding: 3.6rem 0;
  }
  
  .r-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 1.6rem 0;
    border-bottom: 1px solid #f5f5f5;
  }
  
  .r-dep {
    font-size: 1.7rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.03em;
    text-align: center;
  }
  
  .r-grade {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 10rem;
    margin: 0 auto;
    width: fit-content;
  }
  
  .r-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: #111;
    text-align: center;
    letter-spacing: -0.02em;
  }

  /* ══════════════════════════════
   출발지/도착지 선택 모달 추가분
══════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
  }
  
  .modal-overlay.open {
    display: flex;
  }
  
  .modal-sheet {
    width: 100%;
    max-width: 48rem;
    height: 100dvh;
    background: #fff;
    display: flex;
    flex-direction: column;
  }
  
  .modal-head {
    padding: 2.4rem 2rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
  }
  
  .modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.04em;
  }
  
  .modal-search-row {
    display: flex;
    gap: 0.8rem;
    padding: 1.4rem 2rem;
    flex-shrink: 0;
  }
  
  .modal-search-input {
    flex: 1;
    height: 4.8rem;
    border: 1.5px solid #e2e2e2;
    border-radius: 0.8rem;
    padding: 0 1.4rem;
    font-size: 1.4rem;
    color: #222;
    outline: none;
  }
  
  .modal-search-input::placeholder {
    color: #c0c0c0;
  }
  
  .modal-search-btn {
    width: 7rem;
    height: 4.8rem;
    background: #888;
    border: none;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
  }
  
  .modal-list-wrap {
    display: flex;
    flex: 1;
    overflow: hidden;
    border-top: 1px solid #f0f0f0;
  }
  
  .modal-region-list {
    width: 13rem;
    flex-shrink: 0;
    overflow-y: auto;
    list-style: none;
    border-right: 1px solid #f0f0f0;
    background: #fafafa;
  }
  
  .modal-region-list li {
    padding: 1.3rem 1.6rem;
    font-size: 1.35rem;
    color: #888;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
  }
  
  .modal-region-list li.active {
    font-weight: 700;
    color: #111;
    background: #fff;
  }
  
  .modal-terminal-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
  }
  
  .modal-terminal-list li {
    padding: 1.4rem 1.8rem;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
  }
  
  .modal-terminal-list li.active {
    font-weight: 700;
    color: #5B68F5;
  }
  
  .modal-footer {
    padding: 1.4rem 2rem 2.8rem;
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #f0f0f0;
  }
  
  .modal-confirm-btn {
    width: 100%;
    height: 5.4rem;
    background: #5B68F5;
    border: none;
    border-radius: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    letter-spacing: -0.02em;
  }



  /* ══════════════════════════════
   조회 결과 섹션 추가분
══════════════════════════════ */

/* 섹션 래퍼 — 편도/왕복 각 블록 */
.r-section {
    margin-bottom: 3.2rem;
  }
  
  /* "동서울 → 부산" 타이틀 */
  .r-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.03em;
    margin-bottom: 3rem;
  }
  
  .r-section-title .r-arrow {
    font-weight: 400;
    color: #555;
    font-size: 20px;
  }
  
  /* 결과 헤더 — 섹션 내부로 이동 */
  .result-head {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding-bottom: 1rem;
    border-bottom: 1px solid #efefef;
  }
  
  .result-head span {
    font-size: 1.3rem;
    color: #aaa;
    font-weight: 400;
    text-align: center;
  }
  
  
  /* 결과 행 */
  .r-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 1.4rem 0;
    border-bottom: 1px solid #f5f5f5;
  }
  
  .r-dep {
    font-size: 1.5rem;
    font-weight: 400;
    color: #888;
  }
  
  .r-grade {
    font-size: 1.4rem;
    font-weight: 400;
    color: #888;
    text-align: center;
  }
  
  .r-price {
    font-size: 1.4rem;
    font-weight: 400;
    color: #888;
    text-align: center;
  }


  /* ══════════════════════════════
   시외버스 결과 4컬럼 추가분
══════════════════════════════ */

/* 4컬럼 헤더 */
.result-head-sub {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.result-head-sub span:nth-child(3),
.result-head-sub span:nth-child(4) {
  text-align: center;
}

/* 4컬럼 행 */
.r-item-sub {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.r-seat,
.r-resv {
  font-size: 1.4rem;
  font-weight: 400;
  color: #888;
  text-align: center;
}