/* assets/css/pages/buggy.css — 버기카 서비스 공통 스타일 */


:root {
  --buggy-primary: #f59e0b;
  --buggy-dark:    #92400e;
  --buggy-bg:      #fffbeb;
  --buggy-card:    #fff;
  --buggy-border:  #fde68a;
  --buggy-text:    #1c1917;
  --buggy-muted:   #78716c;
  --buggy-green:   #16a34a;
  --buggy-red:     #dc2626;
  --buggy-blue:    #2563eb;
}

/* ── 공통 레이아웃 ────────────────────────────────── */
.buggy-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--buggy-bg);
  min-height: 100dvh;
}

.buggy-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 16px;
}
.buggy-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--buggy-text);
  margin: 0;
}
.buggy-header .buggy-icon {
  font-size: 1.6rem;
  line-height: 1;
}

/* ── 지도 ─────────────────────────────────────────── */
#buggyMap {
  width: 100%;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--buggy-border);
  margin-bottom: 14px;
}

.buggy-map-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--buggy-muted);
  margin: -10px 0 12px;
}

/* ── 정보 카드 ────────────────────────────────────── */
.buggy-card {
  background: var(--buggy-card);
  border: 1px solid var(--buggy-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.buggy-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--buggy-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

.buggy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.9rem;
}
.buggy-row .k { color: var(--buggy-muted); }
.buggy-row .v { font-weight: 600; color: var(--buggy-text); }

/* ── 상태 배지 ───────────────────────────────────── */
.buggy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
}
.buggy-badge--searching { background: #fef3c7; color: #92400e; }
.buggy-badge--accepted  { background: #dbeafe; color: #1e40af; }
.buggy-badge--arriving  { background: #ede9fe; color: #5b21b6; }
.buggy-badge--riding    { background: #dcfce7; color: #14532d; }
.buggy-badge--completed { background: #f0fdf4; color: #15803d; }
.buggy-badge--cancelled, .buggy-badge--cancelled_by_user, .buggy-badge--cancelled_by_driver { background: #fee2e2; color: #991b1b; }
.buggy-badge--payment_failed { background: #fef2f2; color: var(--buggy-red); }
.buggy-badge--online  { background: #dcfce7; color: #14532d; }
.buggy-badge--offline { background: #f3f4f6; color: #6b7280; }

/* ── 입력 필드 ───────────────────────────────────── */
.buggy-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--buggy-border);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s;
}
.buggy-input:focus { border-color: var(--buggy-primary); }

.buggy-input-label {
  font-size: 0.82rem;
  color: var(--buggy-muted);
  margin-bottom: 4px;
  display: block;
}

.buggy-field { margin-bottom: 10px; }

/* ── 버튼 ────────────────────────────────────────── */
.buggy-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-bottom: 8px;
}
.buggy-btn:active { transform: scale(.98); }
.buggy-btn:disabled { opacity: .5; cursor: not-allowed; }

.buggy-btn--primary  { background: var(--buggy-primary); color: #fff; }
.buggy-btn--danger   { background: var(--buggy-red);     color: #fff; }
.buggy-btn--success  { background: var(--buggy-green);   color: #fff; }
.buggy-btn--info     { background: var(--buggy-blue);    color: #fff; }
.buggy-btn--ghost    { background: #f3f4f6; color: var(--buggy-text); }

/* ── 탑승 위치 표시 ──────────────────────────────── */
.buggy-location-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1.5px solid var(--buggy-border);
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.buggy-location-box .loc-icon { font-size: 1.2rem; margin-top: 1px; }
.buggy-location-box .loc-text { flex: 1; line-height: 1.4; }
.buggy-location-box .loc-label { font-size: 0.75rem; color: var(--buggy-muted); }

/* ── 잔액 박스 ───────────────────────────────────── */
.buggy-balance-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--buggy-border);
  border-radius: 12px;
  margin-bottom: 14px;
}
.buggy-balance-box .bal-label { font-size: 0.82rem; color: var(--buggy-muted); }
.buggy-balance-box .bal-amount { font-size: 1.1rem; font-weight: 800; color: var(--buggy-dark); }

/* ── 타이머 ──────────────────────────────────────── */
.buggy-timer {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--buggy-dark);
  letter-spacing: .05em;
  padding: 8px 0;
}
.buggy-timer-label {
  text-align: center;
  font-size: 0.8rem;
  color: var(--buggy-muted);
  margin-top: -6px;
  margin-bottom: 8px;
}

/* ── 요금 미리보기 ───────────────────────────────── */
.buggy-fare-preview {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--buggy-green);
  padding: 6px 0 10px;
}

/* ── 기사 정보 ───────────────────────────────────── */
.buggy-driver-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1.5px solid var(--buggy-border);
  border-radius: 12px;
  margin-bottom: 10px;
}
.buggy-driver-info .drv-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--buggy-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.buggy-driver-info .drv-name  { font-weight: 700; font-size: 0.95rem; }
.buggy-driver-info .drv-plate {
  font-size: 0.82rem; color: var(--buggy-muted);
  background: #f3f4f6; padding: 1px 6px; border-radius: 4px;
  display: inline-block; margin-top: 2px;
}

/* ── 로딩 스피너 ─────────────────────────────────── */
.buggy-loading {
  text-align: center;
  padding: 24px;
  color: var(--buggy-muted);
  font-size: 0.9rem;
}
.buggy-spinner {
  display: inline-block;
  width: 32px; height: 32px;
  border: 3px solid var(--buggy-border);
  border-top-color: var(--buggy-primary);
  border-radius: 50%;
  animation: buggy-spin .8s linear infinite;
  margin-bottom: 8px;
}
@keyframes buggy-spin { to { transform: rotate(360deg); } }

/* ── 빈 상태 ─────────────────────────────────────── */
.buggy-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--buggy-muted);
  font-size: 0.9rem;
}
.buggy-empty-icon { font-size: 2.5rem; margin-bottom: 8px; }

/* ── 알림 토스트 ─────────────────────────────────── */
.buggy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1c1917;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 9999;
  transition: transform .3s ease;
  white-space: nowrap;
  pointer-events: none;
}
.buggy-toast.show { transform: translateX(-50%) translateY(0); }

/* ── 관리자 테이블 ───────────────────────────────── */
.buggy-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.buggy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.buggy-table th {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--buggy-border);
}
.buggy-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.buggy-table tr:hover td { background: #fffbeb; }

/* ── 탭 ──────────────────────────────────────────── */
.buggy-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}
.buggy-tab {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--buggy-muted);
  transition: background .2s, color .2s;
}
.buggy-tab.active {
  background: #fff;
  color: var(--buggy-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ── 통계 그리드 ─────────────────────────────────── */
.buggy-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.buggy-stat-card {
  background: #fff;
  border: 1px solid var(--buggy-border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
}
.buggy-stat-card .stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--buggy-dark);
}
.buggy-stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--buggy-muted);
  margin-top: 2px;
}

/* ── 기사 앱 전용 ─────────────────────────────────── */
.buggy-driver-ride-card {
  background: #fff;
  border: 2px solid var(--buggy-primary);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.buggy-driver-ride-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--buggy-dark);
}

/* ── 검색 중 애니메이션 ──────────────────────────── */
.buggy-searching {
  text-align: center;
  padding: 24px 16px;
}
.buggy-searching-pulse {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--buggy-primary);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  animation: buggy-pulse 1.5s ease-in-out infinite;
}
@keyframes buggy-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.12); opacity: .8; }
}
.buggy-searching p { font-size: 0.9rem; color: var(--buggy-muted); margin: 0; }
.buggy-searching strong { display: block; font-size: 1.05rem; color: var(--buggy-text); margin-bottom: 4px; }

/* ── 전환 ────────────────────────────────────────── */
.buggy-section { display: none; }
.buggy-section.active { display: block; }

/* 모달 오버레이 */
.buggy-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.buggy-modal-overlay.open { display: flex; }
.buggy-modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 80dvh;
  overflow-y: auto;
}
.buggy-modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--buggy-text);
}

/* ══════════════════════════════════════════════════════
   사용자 앱 Uber/KakaoTaxi 스타일 전체 레이아웃
   ══════════════════════════════════════════════════════ */

/* Full-screen app shell */
#buggyApp {
  position: fixed;
  inset: 0;
  background: #d6d3cc;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Map layers */
.map-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* #buggyMap 등 기존 border/radius 규칙 무력화 (full-screen 레이아웃) */
#buggyApp .map-layer {
  border: none;
  border-radius: 0;
  margin: 0;
  height: 100%;
  overflow: hidden;
}

/* ── 플로팅 상단 바 ──────────────────────────────────── */
#topBar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: linear-gradient(to bottom, rgba(255,255,255,0.96) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.topbar-icon-btn {
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #1c1917;
  flex-shrink: 0;
  transition: transform .1s;
}
.topbar-icon-btn:active { transform: scale(.93); }

.topbar-title {
  flex: 1;
  font-size: 0.97rem;
  font-weight: 800;
  color: #1c1917;
  white-space: nowrap;
}

.topbar-balance {
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 5px 11px;
  border-radius: 99px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

/* ── 내 위치 FAB ───────────────────────────────────── */
.fab-location {
  position: absolute;
  right: 16px;
  bottom: calc(var(--bs-h, 280px) + 16px);
  z-index: 80;
  width: 46px; height: 46px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #374151;
  transition: transform .1s;
}
.fab-location:active { transform: scale(.93); }

/* ── 사이드 드로어 ────────────────────────────────── */
#drawerOverlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
#drawerOverlay.open {
  opacity: 1;
  pointer-events: all;
}

#drawerMenu {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  z-index: 210;
  background: #fff;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
#drawerMenu.open {
  transform: translateX(0);
}

.drawer-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px 18px;
  background: var(--buggy-bg);
  border-bottom: 1px solid var(--buggy-border);
}
.drawer-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--buggy-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.drawer-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1c1917;
  line-height: 1.3;
}
.drawer-email {
  font-size: 0.78rem;
  color: #78716c;
  margin-top: 2px;
  word-break: break-all;
}

.drawer-balance {
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
}
.drawer-balance .bal-label {
  font-size: 0.74rem;
  color: #9ca3af;
  margin-bottom: 2px;
}
.drawer-balance .bal-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  line-height: 1.4;
}

.drawer-nav { padding: 8px 0; flex: 1; }
.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  font-size: 0.93rem;
  font-weight: 500;
  color: #1c1917;
  text-decoration: none;
  transition: background .15s;
}
.drawer-link:active { background: #f3f4f6; }
.drawer-link-icon { font-size: 1.15rem; }
.drawer-divider { height: 1px; background: #f3f4f6; margin: 6px 0; }

/* ── 바텀 시트 ─────────────────────────────────────── */
#bottomSheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 32px rgba(0,0,0,.14);
  padding: 0 20px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.bs-handle {
  width: 44px; height: 4px;
  background: #d1d5db;
  border-radius: 99px;
  margin: 14px auto 18px;
}

/* Section display */
#bottomSheet .buggy-section { display: none; }
#bottomSheet .buggy-section.active { display: block; }

/* ── 섹션 공통 ─────────────────────────────────────── */
.bs-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1c1917;
  margin: 0 0 14px;
}
.bs-subtitle {
  font-size: 0.84rem;
  color: #9ca3af;
  text-align: center;
  margin: 0 0 14px;
}
.bs-fare-note {
  font-size: 0.74rem;
  color: #9ca3af;
  text-align: center;
  margin: 0 0 14px;
}

/* ── 위치 입력 카드 ────────────────────────────────── */
.location-input-card {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 4px 16px;
  margin-bottom: 14px;
  position: relative;
}
.loc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.loc-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-pickup {
  background: var(--buggy-primary);
  box-shadow: 0 0 0 3px rgba(245,158,11,.2);
}
.dot-dest {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}
.loc-content { flex: 1; min-width: 0; }
.loc-hint { font-size: 0.7rem; color: #9ca3af; margin-bottom: 2px; }
.loc-value {
  font-size: 0.88rem;
  color: #374151;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dest-inline-input {
  width: 100%;
  border: none; outline: none;
  background: transparent;
  font-size: 0.88rem;
  color: #374151;
  font-weight: 500;
  padding: 0;
  font-family: inherit;
}
.dest-inline-input::placeholder { color: #9ca3af; font-weight: 400; }
.loc-divider {
  height: 1px;
  background: #e5e7eb;
  margin-left: 25px;
}
.loc-clear-btn {
  background: none; border: none;
  font-size: 0.88rem; color: #9ca3af;
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
}

/* Destination suggestions dropdown */
.dest-suggestions-dropdown {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  z-index: 300;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 14px 14px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* ── 바텀 시트 버튼 ────────────────────────────────── */
.bs-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  margin-bottom: 8px;
  font-family: inherit;
}
.bs-btn:active { transform: scale(.98); }
.bs-btn:disabled { opacity: .5; cursor: not-allowed; }
.bs-btn--primary { background: var(--buggy-primary); color: #fff; }
.bs-btn--ghost   { background: #f3f4f6; color: #374151; }
.bs-btn--sm      { padding: 11px; font-size: 0.88rem; }

/* ── 기사 찾는 중 애니메이션 ──────────────────────── */
.searching-animation {
  display: flex;
  justify-content: center;
  padding: 8px 0 14px;
}
.searching-pulse {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--buggy-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.3rem;
  animation: uber-pulse 1.5s ease-in-out infinite;
}
@keyframes uber-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(245,158,11,.55); transform: scale(1); }
  50%  { box-shadow: 0 0 0 22px rgba(245,158,11,0);  transform: scale(1.06); }
  100% { box-shadow: 0 0 0 0   rgba(245,158,11,0);  transform: scale(1); }
}

/* ── 기사 카드 ──────────────────────────────────────── */
.driver-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 12px;
}
.driver-card--compact { padding: 11px 14px; }

.drv-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--buggy-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.drv-avatar--sm { width: 38px; height: 38px; font-size: 1.1rem; }

.drv-meta { flex: 1; min-width: 0; }
.drv-name  { font-weight: 700; font-size: 0.95rem; color: #1c1917; }
.drv-plate {
  font-size: 0.78rem; color: #78716c;
  background: #e5e7eb;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-block;
  margin-top: 3px;
}

/* ── 상태 필 (새 버전) ────────────────────────────── */
.status-pill {
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
/* JS sets buggy-badge-- classes on rideStatusBadge */
.status-pill.buggy-badge--accepted { background: #dbeafe; color: #1e40af; }
.status-pill.buggy-badge--arriving { background: #ede9fe; color: #5b21b6; }
.status-pill.buggy-badge--riding   { background: #dcfce7; color: #14532d; }
.status-pill--riding               { background: #dcfce7; color: #14532d; }

/* ── 정보 리스트 ─────────────────────────────────── */
.info-list { margin-bottom: 12px; }
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #f3f4f6;
}
.info-item:last-child { border-bottom: none; }
.info-k { color: #9ca3af; flex-shrink: 0; }
.info-v { font-weight: 600; color: #1c1917; text-align: right; }

/* ── 탑승 중 ─────────────────────────────────────── */
.riding-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.riding-half {
  flex: 1;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.riding-half--fare { border-color: #bbf7d0; background: #f0fdf4; }
.riding-timer {
  font-size: 2rem;
  font-weight: 900;
  color: #1c1917;
  letter-spacing: .04em;
}
.riding-fare {
  font-size: 1.35rem;
  font-weight: 900;
  color: #16a34a;
}
.riding-label {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 3px;
}

/* ── 기사 거리/ETA 칩 ─────────────────────────────── */
.route-eta {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 12px;
}
.eta-icon { font-size: 1rem; }

/* ── 완료 섹션 ───────────────────────────────────── */
.done-icon {
  text-align: center;
  font-size: 3.5rem;
  padding-top: 4px;
  margin-bottom: 8px;
}
.done-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 14px;
}
.done-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #f3f4f6;
}
.done-row:last-child { border-bottom: none; }
.done-k { color: #6b7280; }
.done-v { font-weight: 700; color: #1c1917; }
.done-pay-status {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ── 지도 확대 버튼 (기사앱) ──────────────────────── */
.map-wrap {
  position: relative;
  margin-bottom: 14px;
}
.map-wrap > [id^="drv"] {
  margin-bottom: 0;
}
.map-expand-btn {
  position: absolute;
  top: 10px; right: 10px; z-index: 10;
  width: 36px; height: 36px;
  border: none; border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 6px rgba(0,0,0,.22);
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s;
}
.map-expand-btn:active { transform: scale(.93); }
.map-wrap.map-fullscreen {
  position: fixed; inset: 0; z-index: 500;
  margin: 0; border-radius: 0;
}
.map-wrap.map-fullscreen > [id] {
  height: 100% !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}
.map-wrap.map-fullscreen .map-expand-btn {
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
}

/* ── 사용자앱 지도 확대 FAB ─────────────────────── */
.fab-map-expand {
  position: absolute;
  right: 16px;
  bottom: calc(var(--bs-h, 280px) + 70px);
  z-index: 80;
  width: 42px; height: 42px;
  border: none; border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #374151;
  transition: transform .1s;
}
.fab-map-expand:active { transform: scale(.93); }

/* ── 바텀시트 슬라이드 트랜지션 ─────────────────── */
#bottomSheet {
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
#buggyApp.map-expanded #bottomSheet {
  transform: translateY(calc(100% - 60px));
}
#buggyApp.map-expanded .fab-map-expand {
  bottom: 74px;
}
#buggyApp.map-expanded .fab-location {
  bottom: 128px;
}

/* ── 바텀시트 핸들 — 터치 영역 넓게 ─────────────── */
.bs-handle {
  cursor: ns-resize;
  touch-action: none;
  padding: 6px 0 2px;
}

/* ── 기사앱 반응형 지도 ────────────────────────────── */
.drv-map-el {
  width: 100%;
  height: clamp(220px, 42vh, 400px);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--buggy-border);
  background: #e5e7eb;  /* 로딩 전 placeholder */
}

/* ── 기사앱 전체화면 지도 오버레이 UI ──────────────── */
#mapFsClose {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 502;
  width: 46px; height: 46px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 16px rgba(0,0,0,.28);
  cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 1.3rem; color: #1c1917;
  transition: transform .1s;
  display: none;
}
#mapFsClose.visible { display: flex; }
#mapFsClose:active { transform: scale(.9); }

#mapFsBar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 501;
  padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 28px rgba(0,0,0,.15);
  display: none;
}
#mapFsBar.visible { display: block; }
.map-fs-handle {
  width: 42px; height: 4px;
  background: #d1d5db; border-radius: 99px;
  margin: 14px auto 12px;
}
.map-fs-title {
  font-size: 1rem; font-weight: 800; color: #1c1917;
  margin-bottom: 4px;
}
.map-fs-sub {
  font-size: 0.85rem; color: #78716c;
  margin-bottom: 12px;
}

/* ── 전체화면 상태 확대버튼 숨김 ───────────────────── */
.map-wrap.map-fullscreen .map-expand-btn {
  display: none;
}
