/* =========================================================
   호출 진행 · 차량 찾는 중 / 차량 배정 / 도착 임박
   ========================================================= */

.map-page { min-height: 100vh; }

/* 지도 위 흰 버튼 (테두리 있는 형태) */
.btn-float--line {
    border: 1px solid var(--color-border-strong);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-pill-float {
    position: absolute;
    top: var(--space-8);
    right: var(--space-16);
    z-index: 2;
    display: flex;
    align-items: center;
    height: var(--touch-size);
    padding: 0 var(--space-14);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-21);
}

/* ---------- 차량 찾는 중 ---------- */
/* 탑승 위치에서 연한 파란 원 3겹이 가운데에서 차례로 퍼져 나감 (크기 0 상자 · 가운데가 탑승 위치) */
.map-pulse {
    position: relative;
    width: 0;
    height: 0;
    pointer-events: none;
}

.map-pulse img {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    max-width: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
    animation: pulse 3.6s ease-out infinite;
}

.map-pulse img:nth-child(2) { animation-delay: 1.2s; }
.map-pulse img:nth-child(3) { animation-delay: 2.4s; }

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.1); opacity: 1; }
    70% { opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* 움직임 줄이기 설정이면 3겹을 겹쳐 멈춘 채로 보여줌 */
@media (prefers-reduced-motion: reduce) {
    .map-pulse img { animation: none; opacity: 1; }
    .map-pulse img:nth-child(1) { transform: translate(-50%, -50%); }
    .map-pulse img:nth-child(2) { transform: translate(-50%, -50%) scale(0.68); }
    .map-pulse img:nth-child(3) { transform: translate(-50%, -50%) scale(0.38); }
}

/* 탑승 위치 핀 (말풍선 + 점) */
.map-pin--wait { gap: var(--space-4); }

.map-pin--wait .map-pin__label {
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-md);
    box-shadow: none;
    line-height: 20px;
}

.map-pin--wait .map-pin__dot {
    width: 16px;
    height: 16px;
    margin: 0 0 -8px;
    background: var(--color-primary);
}

.sheet--progress {
    gap: var(--space-20);
    padding-top: var(--space-12);
    padding-bottom: var(--space-16);
    box-shadow: none;
}

.sheet--progress .sheet__grabber {
    height: 4px;
    border-radius: 2px;
}

/* 시트 안 묶음 (상태·예상 / 경로·전달 정보 / 안내·버튼) */
.progress-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.progress-group--route { gap: var(--space-10); }

.status-head {
    display: flex;
    align-items: center;
    gap: var(--space-14);
}

.status-head__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-primary-bg);
}

/* 디자인의 아이콘 자리 표시 (아이콘 확정 전) */
.icon-placeholder {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
}

.status-head__text { flex: 1; min-width: 0; }

.status-head__title {
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: calc(30px * var(--font-scale));
    color: var(--color-text-secondary);
}

.status-head__desc {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.wait-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding: var(--space-14) var(--space-16);
    border-radius: var(--radius-lg);
    background: var(--color-bg-gray);
}

.wait-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.wait-card__label {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

/* 실시간 라벨 */
.live-badge {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--space-4);
    padding: 3px var(--space-8);
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    font-size: var(--fs-12);
    font-weight: var(--font-weight-bold);
    line-height: normal;
    color: var(--color-primary);
}

.live-badge img { width: 6px; height: 6px; }

.wait-card__minutes {
    font-size: calc(32px * var(--font-scale));
    font-weight: var(--font-weight-bold);
    line-height: calc(40px * var(--font-scale));
}

.wait-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.wait-card__nearby {
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    font-size: var(--fs-13);
    font-weight: var(--font-weight-medium);
    line-height: normal;
    color: var(--color-text-secondary);
}

.wait-card__more {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 7px 7px 7px var(--space-12);
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    background: var(--color-bg);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-bold);
    line-height: normal;
    color: var(--color-text);
}

.wait-card__more .icon { color: var(--color-text-sub); }

.route-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.route-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.route-list__item img { width: 10px; height: 10px; }

/* 출발 ↔ 도착 점선 */
.route-list__line {
    position: absolute;
    top: 19px;
    left: 4px;
}

.route-list__line img { width: 2px; height: 14px; }

.route-list__label {
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.route-list__place {
    flex: 1;
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
}

.tag {
    padding: 3px 7px;
    border: 1px solid var(--color-border-strong);
    border-radius: 3px;
    background: var(--color-bg);
    font-size: var(--fs-12);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-17);
    color: var(--color-text-secondary);
}

/* 강조 배지 (UD 가능) — 테두리 없음 */
.tag--warning {
    border: 0;
    background: var(--color-warning-bg);
    font-weight: var(--font-weight-bold);
    color: var(--color-warning);
}

.tag--primary {
    border: 0;
    background: var(--color-primary-soft);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

/* 안내 줄 (윗줄 구분선 + 아이콘) */
.notice-line {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-12) var(--space-2) var(--space-4);
    border-top: 1px solid var(--color-border);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.btn-row {
    display: flex;
    gap: var(--space-8);
}

.btn-row .btn {
    flex: 1;
    min-height: var(--touch-size);
    border-color: var(--color-border-strong);
    font-size: var(--fs-15);
    line-height: var(--lh-21);
}

/* E4a 대기 현황 시트 (스크림 위) */
.modal-sheet__panel--wait { gap: var(--space-20); }

.wait-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.wait-detail--status { gap: var(--space-8); }

.wait-detail__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.wait-detail__label {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.wait-detail__minutes {
    font-size: calc(32px * var(--font-scale));
    font-weight: var(--font-weight-bold);
    line-height: calc(40px * var(--font-scale));
}

.wait-detail__basis {
    font-size: var(--fs-13);
    line-height: var(--lh-18);
    color: var(--color-text-sub);
}

.wait-rows { padding: 0 var(--space-16); }

.wait-rows__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-14) 0;
}

.wait-rows__row + .wait-rows__row { border-top: 1px solid var(--color-divider); }

.wait-rows__label {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    color: var(--color-text-sub);
}

.wait-rows__label span:first-child {
    font-size: var(--fs-15);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.wait-rows__label span:last-child {
    font-size: var(--fs-13);
    line-height: var(--lh-18);
}

.wait-rows__value {
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.wait-detail__note {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.btn--close {
    min-height: var(--touch-size);
    background: var(--color-divider);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
    color: var(--color-text);
}

/* ---------- 차량 배정 / 도착 임박 ---------- */
.map-car {
    width: 31px;
    height: 21px;
    pointer-events: none;
}

.map-car img {
    width: 16px;
    height: 28px;
    margin: -3.5px 0 0 7.5px;
    transform: rotate(-79deg);
}

.map-chip {
    padding: var(--space-6) var(--space-10);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
}

.map-chip--primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.map-chip--light {
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.sheet--assigned { gap: var(--space-8); }

/* 묶음으로 나눈 시트 (차량 배정) */
.sheet--grouped { gap: var(--space-20); }

.assigned-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.assigned-group--summary { gap: var(--space-10); }
.assigned-group--contact { gap: var(--space-6); }

/* 제목 줄 + 더보기 */
.assigned-head {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.assigned-head__text { flex: 1; min-width: 0; }

.assigned-title {
    font-size: var(--fs-20);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-28);
}

.assigned-desc,
.pickup-row__place,
.riders-row__value,
.quick-msg__desc {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

/* 동그란 아이콘 버튼 (더보기 · 보호자 공유 · 접수 취소) */
.btn-icon-round {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text);
}

/* 탑승 위치 · 탑승 인원 */
.info-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.icon--user-multiple { --icon-url: url("../image/user--multiple.svg"); }
.icon--help { --icon-url: url("../image/help.svg"); }

.pickup-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-8);
}

.pickup-row__label {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
}

.pin-pickup-icon { width: 24px; height: 24px; }

/* 탑승 안내 (고정 66 · 내용만 바뀜) */
.boarding-note {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    min-height: 66px;
    padding: var(--space-12) var(--space-12) var(--space-12) var(--space-14);
    border-radius: var(--radius-md);
    background: var(--color-primary-bg);
    font-size: var(--fs-14);
    line-height: var(--lh-20);
}

.boarding-note .icon { color: var(--color-primary); }

/* 기사·차량 카드 (회색 면 · 테두리 없음) */
.driver-card {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    padding: var(--space-14);
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-bg-gray);
}

.driver-card__photo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: var(--color-divider);
    object-fit: cover;
    object-position: 40% 20%;
}

.driver-card__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.driver-card__plate {
    font-size: calc(22px * var(--font-scale));
    font-weight: var(--font-weight-bold);
    line-height: calc(30px * var(--font-scale));
}

.driver-card__info {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.driver-card__car {
    flex-shrink: 0;
    width: 70px;
    height: 47px;
    object-fit: cover;
}

.riders-row {
    display: flex;
    gap: var(--space-6);
}

.riders-row__label {
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.contact-block__title {
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.btn-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    min-height: var(--touch-size);
    padding: 0 var(--space-16);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.btn-line-row {
    display: flex;
    gap: var(--space-8);
}

.btn-line-row .btn-line { flex: 1; }
.btn-line-row .btn-line--more { flex: 0 0 108px; }

.quick-msg {
    padding-top: var(--space-4);
}

.quick-msg__title {
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
}

.quick-msg__desc { margin-top: var(--space-2); }

.quick-msg__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    min-height: 104px;
}

.quick-msg__btn {
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.quick-msg__btn .icon { color: var(--color-text-sub); }

/* 도움이 필요해요 (글자 버튼) */
.help-row {
    display: flex;
    justify-content: center;
    padding-top: var(--space-4);
}

.btn-help {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    min-height: var(--touch-size);
    padding: 0 var(--space-8);
    border-radius: var(--radius-md);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-22);
    color: var(--color-text-secondary);
}

.btn-help .icon { color: var(--color-text); }

/* 기사님께 메시지 시트 */
.modal-sheet--dim { background: rgba(0, 0, 0, 0.4); }

.modal-sheet__panel--msg {
    gap: var(--space-20);
    padding-top: var(--space-12);
    border-radius: 20px 20px 0 0;
}

.modal-sheet__panel--msg .sheet__grabber {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--color-border-strong);
}

.msg-sheet__head {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.msg-sheet__title {
    font-size: var(--fs-20);
    font-weight: var(--font-weight-bold);
    line-height: normal;
}

.msg-sheet__desc,
.msg-sheet__caption {
    font-size: var(--fs-14);
    line-height: normal;
    color: var(--color-text-sub);
}

.msg-sheet__caption { font-weight: var(--font-weight-medium); }

.msg-sheet__group {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.quick-msg__btn--sheet {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    min-height: var(--touch-size);
    padding: 0 var(--space-14) 0 var(--space-16);
    border: 1px solid var(--color-border-strong);
    border-radius: 12px;
    background: var(--color-bg);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-medium);
    line-height: normal;
}

/* 직접 입력 */
.msg-input {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    min-height: var(--touch-size);
    padding: 0 var(--space-4) 0 var(--space-16);
    border-radius: 12px;
    background: var(--color-bg-gray);
}

.msg-input__field {
    flex: 1;
    min-width: 0;
    height: var(--touch-size);
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: var(--fs-15);
    color: var(--color-text);
    outline: none;
}

.msg-input__field::placeholder { color: var(--color-text-placeholder); }

.msg-input:focus-within { box-shadow: 0 0 0 2px var(--color-primary); }

.msg-input__mic {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
}

/* =========================================================
   F 흐름 · 진행 화면 위로 열리는 시트·확인 창 (js/actions.js)
   ========================================================= */
.icon--close { --icon-url: url("../image/close.svg"); }
.icon--help-octagon { --icon-url: url("../image/help-octagon.svg"); }
.icon--warning-alt { --icon-url: url("../image/warning--alt.svg"); }

/* 공통 시트 */
.action-sheet {
    gap: var(--space-12);
    padding-bottom: var(--space-24);
}

.action-sheet .sheet__grabber { background: var(--color-border-strong); }

.action-sheet__head {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.action-sheet__head--close {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.action-sheet__title {
    font-size: var(--fs-20);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-28);
}

.action-sheet__title--lg {
    font-size: var(--fs-24);
    line-height: calc(30px * var(--font-scale));
}

.action-sheet__head:has(.action-sheet__title--lg) { gap: var(--space-10); padding-top: var(--space-8); }

.action-sheet__desc {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.action-sheet__label {
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
}

.action-sheet__foot {
    font-size: var(--fs-13);
    line-height: var(--lh-18);
    color: var(--color-text-sub);
}

.action-sheet__x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: -8px;
}

/* 회색 안내 상자 (공유되는 것 · 끝나는 때) */
.info-box {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: var(--space-12) var(--space-14);
    border-radius: var(--radius-lg);
    background: var(--color-bg-tile);
    font-size: var(--fs-14);
    line-height: var(--lh-20);
}

/* 빨간 테두리 버튼 (공유 중단 · 호출 취소하기) */
.btn--danger-line {
    border: 1.5px solid var(--color-danger);
    background: var(--color-bg);
    color: var(--color-error);
}

.btn--danger-text { color: var(--color-error); }

.btn[disabled] {
    background: var(--color-bg-tile);
    color: var(--color-text-sub);
    cursor: default;
}

/* 글자만 있는 닫기 (48) */
.btn-text-close {
    min-height: var(--touch-size);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-22);
    color: var(--color-text-sub);
}

/* F8 더보기 메뉴 · 누를 수 있는 줄 버튼 (아이콘 · 글자 · 화살표) */
.menu-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding-top: var(--space-4);
}

.menu-row {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    width: 100%;
    min-height: 60px;
    padding: var(--space-10) var(--space-14) var(--space-10) var(--space-12);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    text-align: left;
}

.menu-row:active { background: var(--color-bg-gray); }

.menu-row__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

.menu-row__icon .icon { --icon-size: 20px; }

.menu-row__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.menu-row__sub {
    font-size: var(--fs-13);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-18);
    color: var(--color-primary);
}

.menu-row__arrow { color: var(--color-text-sub); }

.menu-row--danger { color: var(--color-error); }

.menu-row--danger .menu-row__icon {
    background: var(--color-error-bg);
    color: var(--color-error);
}

/* F3 공유할 보호자 */
.guardian-pick {
    padding: 0 var(--space-16);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
}

.guardian-pick__row {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    padding: var(--space-14) 0;
    cursor: pointer;
}

.guardian-pick__row + .guardian-pick__row { border-top: 1px solid var(--color-border); }

.guardian-pick__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg-tile);
}

.guardian-pick__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.guardian-pick__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-6);
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.guardian-pick__badge {
    padding: 1px var(--space-6);
    border-radius: var(--radius-sm);
    background: var(--color-bg-gray);
    font-size: var(--fs-12);
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.guardian-pick__phone {
    font-size: var(--fs-14);
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.cancel-reason {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.cancel-reason__label {
    font-size: var(--fs-13);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.cancel-reason__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.reason-chip {
    min-height: 38px;
    padding: var(--space-8) var(--space-12);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
}

.reason-chip[aria-pressed="true"] {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

/* F6a · F6b 도움 요청 */
.help-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding-top: var(--space-4);
}

.help-options__pair {
    display: flex;
    gap: var(--space-8);
}

.help-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    min-width: 0;
    padding: var(--space-16) var(--space-8) var(--space-14);
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    text-align: center;
}

.help-card__title {
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.help-card__desc {
    font-size: var(--fs-13);
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.help-card--row {
    align-items: flex-start;
    gap: var(--space-2);
    min-height: 64px;
    padding: var(--space-12) var(--space-16);
    text-align: left;
}

.help-card--row .help-card__title {
    font-size: var(--fs-17);
    line-height: var(--lh-24);
}

.help-card--row .help-card__desc {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
}

/* 시트를 열 때 제목으로 옮긴 초점은 테두리 없이 */
.action-sheet h2[tabindex="-1"]:focus,
.confirm-dialog__box h2[tabindex="-1"]:focus { outline: none; }

/* 이번 이동의 요청 내역 · 도움 요청 시트 오른쪽 위 */
.help-history-top {
    position: absolute;
    top: 26px;
    right: var(--page-padding);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-height: 40px;
    padding: 0 var(--space-8) 0 var(--space-12);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
    color: var(--color-text-secondary);
}

.help-history-top .icon { color: var(--color-text-sub); }

.help-history-top__count {
    min-width: 20px;
    padding: 0 var(--space-6);
    border-radius: var(--radius-full);
    background: var(--color-primary);
    font-size: var(--fs-12);
    font-weight: var(--font-weight-bold);
    line-height: 20px;
    color: var(--color-text-inverse);
    text-align: center;
}

.help-history-top + .action-sheet__head .action-sheet__title { padding-right: 112px; }

.help-history {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--touch-size);
    padding: var(--space-12) var(--space-20);
    font-size: var(--fs-15);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-22);
}

.help-history span {
    font-size: var(--fs-18);
    color: var(--color-text-sub);
}

.help-119 {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    min-height: 64px;
    padding: var(--space-12) var(--space-16);
    border: 1.5px solid #f3b4b4;
    border-radius: var(--radius-md);
    background: var(--color-error-bg);
}

.help-119__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

.help-119__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.help-119__title {
    font-size: var(--fs-17);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-24);
    color: var(--color-error);
}

.help-119__desc {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

/* F6c 관제센터에 메시지 보내기 */
.compose-box {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    min-height: 160px;
    padding: var(--space-12) var(--space-14);
    border: 2px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
}

.compose-box:focus-within { border-color: var(--color-primary); }

.compose-box__label {
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
}

.compose-box__input {
    flex: 1;
    min-height: 48px;
    padding: 0;
    border: 0;
    outline: 0;
    resize: none;
    font: inherit;
    font-size: var(--fs-16);
    line-height: var(--lh-24);
    color: var(--color-text);
}

.compose-box__input::placeholder { color: var(--color-text-sub); }

.compose-box__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compose-fail {
    padding: var(--space-12) var(--space-14);
    border-radius: var(--radius-md);
    background: var(--color-error-bg);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
    color: var(--color-error);
}

.compose-fail[hidden] { display: none; }

/* F6d 이번 이동의 요청 내역 */
.request-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.request-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding: var(--space-14) var(--space-16);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.request-item__title {
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-22);
}

.request-item__meta {
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.request-item__text {
    font-size: var(--fs-15);
    line-height: var(--lh-22);
}

.request-empty {
    padding: var(--space-16) 0;
    font-size: var(--fs-15);
    line-height: var(--lh-22);
    color: var(--color-text-sub);
}

/* 빠른 메시지 · 전송 결과 (같은 자리 · 화면 전환 없음) */
.quick-msg__btn.is-sent {
    justify-content: flex-start;
    border-color: #0b8760;
    background: var(--color-success-bg);
    color: var(--color-success-icon);
}

.quick-msg__btn.is-sent .icon { color: var(--color-success-icon); }

.quick-msg__btn.is-failed {
    border-color: var(--color-danger);
    background: var(--color-error-bg);
    color: var(--color-error);
}

/* 탑승 중 · 도움 요청 상태 줄 (요청 보낸 뒤에만) */
.help-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--touch-size);
    padding: 0 var(--space-14);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-medium);
    line-height: var(--lh-20);
    text-align: left;
}

.help-status[hidden] { display: none; }
.help-status__more { color: var(--color-primary); }

/* =========================================================
   F4 · F5 기사님과 대화 (chat.html)
   ========================================================= */
.chat-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.chat-head {
    display: flex;
    flex: none;
    align-items: center;
    gap: var(--space-12);
    min-height: 64px;
    padding: var(--space-4) var(--space-20);
    border-bottom: 1px solid var(--color-border);
}

.chat-head__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: -8px;
}

.chat-head__who {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    line-height: 1.4;
    text-align: center;
}

.chat-head__name {
    font-size: var(--fs-17);
    font-weight: var(--font-weight-bold);
}

.chat-head__sub {
    font-size: var(--fs-13);
    color: var(--color-text-secondary);
}

.chat-round {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-bg-gray);
}

.chat-round--help { background: var(--color-error-bg); }

.chat-round--send {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.chat-notice {
    display: flex;
    flex: none;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-20);
    background: var(--color-bg-gray);
    font-size: var(--fs-13);
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.chat-notice .icon { color: var(--color-text-sub); }

.chat-log {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-12);
    min-height: 0;
    overflow-y: auto;
    padding: var(--space-16) var(--space-20);
}

/* 대화가 적을 때는 아래쪽에 붙음 */
.chat-log > :first-child { margin-top: auto; }

.chat-chip {
    align-self: center;
    max-width: 100%;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    background: var(--color-bg-gray);
    font-size: var(--fs-12);
    line-height: 1.4;
    color: var(--color-text-sub);
    text-align: center;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 236px;
}

.chat-msg--me { align-self: flex-end; align-items: flex-end; }
.chat-msg--driver { align-self: flex-start; align-items: flex-start; }

.chat-msg__bubble {
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-lg);
    font-size: var(--fs-16);
    line-height: 1.4;
}

.chat-msg--me .chat-msg__bubble {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.chat-msg--driver .chat-msg__bubble { background: var(--color-bg-gray); }

.chat-msg__meta {
    font-size: var(--fs-12);
    line-height: 1.4;
    color: var(--color-text-sub);
}

.chat-quick {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: var(--space-10);
    padding: var(--space-12) var(--space-20);
    background: var(--color-bg-gray);
}

.chat-quick__title {
    font-size: var(--fs-16);
    font-weight: var(--font-weight-bold);
    line-height: 1.4;
}

.chat-quick__desc {
    margin-top: calc(var(--space-6) * -1);
    font-size: var(--fs-14);
    line-height: 1.4;
    color: var(--color-text-secondary);
}

.chat-quick__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.chat-quick__chip {
    padding: var(--space-10) var(--space-14);
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    font-size: var(--fs-16);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    text-align: left;
}

.chat-input {
    display: flex;
    flex: none;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-20) var(--space-12);
    border-top: 1px solid var(--color-border);
}

.chat-input__box {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--space-8);
    min-width: 0;
    height: 48px;
    padding: 0 var(--space-4) 0 var(--space-16);
    border-radius: var(--radius-lg);
    background: var(--color-bg-gray);
}

.chat-input__box:focus-within { box-shadow: 0 0 0 2px var(--color-primary); }

.chat-input__field {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: var(--fs-15);
    color: var(--color-text);
}

.chat-input__field::placeholder { color: var(--color-text-placeholder); }

.chat-input__mic {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-secondary);
}

.chat-input__mic.is-listening { color: var(--color-primary); }

.msg-sheet__hint {
    font-size: var(--fs-13);
    line-height: normal;
    color: var(--color-text-sub);
}

.divider-line {
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--color-divider);
}

.icon-img { width: 20px; height: 20px; }

/* ---------- 탑승 중 ---------- */
.map-view__route--long {
    width: 130px;
    height: 240px;
}

.map-pin--start .map-pin__label {
    font-weight: var(--font-weight-medium);
}

.map-car--riding {
    width: 31px;
    height: 31px;
}

.map-car--riding img {
    margin: 1.5px 0 0 7.5px;
    transform: rotate(45deg);
}

.sheet--riding {
    gap: var(--space-8);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

.sheet--riding .sheet__grabber {
    margin-bottom: var(--space-8);
    background: var(--color-border);
}

.riding-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.riding-head__eta {
    flex-shrink: 0;
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    font-size: var(--fs-14);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-20);
    color: var(--color-text-inverse);
}

/* 탑승 중 시트를 올리면 보이는 묶음 (굵은 회색 띠로 나눔) */
.sheet--riding .boarding-note { min-height: 0; }

.riding-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    margin: var(--space-12) calc(var(--page-padding) * -1) 0;
    padding: var(--space-20) var(--page-padding) 0;
    border-top: 8px solid var(--color-bg-gray);
}

.riding-section__title {
    font-size: var(--fs-17);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-24);
}

.riding-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    margin: 0;
    padding: var(--space-14) var(--space-16);
    border-radius: var(--radius-md);
    background: var(--color-bg-gray);
}

.riding-rows dd { margin: 0; }

.riding-rows__row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-12);
    font-size: var(--fs-15);
    line-height: var(--lh-22);
}

.riding-rows__row dt { color: var(--color-text-sub); }
.riding-rows__row dd { font-weight: var(--font-weight-bold); }

.riding-info,
.riding-guardian {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    font-size: var(--fs-14);
    line-height: var(--lh-20);
    color: var(--color-text-sub);
}

.icon-img--22 { width: 22px; height: 22px; }
