/* ========================================
   예약 관리 페이지 스타일 (v6.5 Collapse)
   ========================================
   수정일: 2026-02-15
   - 투어 섹션 접기/펼치기 기능 추가
   - 전체 접기/펼치기 버튼 추가
   ======================================== */

/* ==========================================
   1. 공통 기본 스타일
   ========================================== */

.tab-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-top h2 {
    margin: 0;
    display: flex;
    align-items: center;
}

/* 탭 컨테이너 */
.tabs {
    display: flex;
    justify-content: flex-start;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* 탭 버튼 */
.tab-button {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.tab-button:hover:not(.active) {
    background: #f3f4f6;
}

/* 날짜 네비게이션 */
.date-navigation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.date-nav-btn {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.date-nav-btn:hover {
    background: #f3f4f6;
}

.date-picker {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.date-today-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.date-today-btn:hover {
    background: #2563eb;
}

/* ✅ v3.13: 담당 선생님 필터 - 기본 */
.teacher-filter {
    margin-left: auto;
    flex-shrink: 0;
}

.teacher-filter-select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
    background: white;
    cursor: pointer;
    outline: none;
}

/* ✅ v3.14: 접기/펼치기 스타일 */
.tour-header-clickable {
    cursor: pointer;
    user-select: none;
}

.tour-header-clickable:hover {
    background: #f9fafb;
    border-radius: 8px;
}

.tour-collapse-arrow {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    transition: color 0.15s;
}

.tour-header-clickable:hover .tour-collapse-arrow {
    color: #3b82f6;
}

.toggle-all-btn {
    white-space: nowrap;
    font-size: 13px;
}

/* 빈 상태 메시지 */
.empty-state,
.empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
    padding: 40px 20px;
    color: #6b7280;
}

/* ==========================================
   2. PC 스타일 (769px 이상) - 원래대로 유지
   ========================================== */

@media (min-width: 769px) {
    .tab-header {
        gap: 0;
        margin-bottom: 16px;
    }
    
    .header-top {
        margin-bottom: 16px;
    }
    
    .header-top h2 {
        font-size: 28px;
        font-weight: 700;
        color: #1f2937;
    }
    
    .header-top .btn-primary,
    .header-top .btn-secondary {
        height: 36px;
        padding: 0 16px;
        font-size: 14px;
    }
    
    .tabs {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .tab-button {
        height: 40px;
        padding: 0 40px;
        font-size: 14px;
        white-space: nowrap;
        min-width: 160px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .date-navigation {
        gap: 8px;
    }
    
    .date-nav-btn {
        height: 36px;
        padding: 0 14px;
        font-size: 14px;
        flex: 0 0 auto;
    }
    
    .date-picker {
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
        min-width: 180px;
        max-width: 200px;
        flex: 0 0 auto;
    }
    
    .date-today-btn {
        height: 36px;
        padding: 0 16px;
        font-size: 14px;
        flex: 0 0 auto;
    }
    
    /* ✅ v3.13: 담당 필터 - PC */
    .teacher-filter {
        margin-left: auto;
    }
    
    .teacher-filter-select {
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
        min-width: 140px;
    }
    
    /* ✅ v3.14: 전체 접기/펼치기 버튼 - PC */
    .toggle-all-btn {
        height: 36px;
        padding: 0 14px;
        font-size: 13px;
        margin-left: 8px;
    }
    
    /* ✅ v3.14: 접기 화살표 - PC */
    .tour-collapse-arrow {
        font-size: 13px;
        margin-right: 4px;
    }
    
    /* ==========================================
       PC 투어 헤더 - 1줄 배치
       ========================================== */
    .tour-header {
        display: flex;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding-bottom: 12px;
        margin-bottom: 12px;
        border-bottom: 2px solid #f3f4f6;
    }
    
    /* 투어명 + 담당 영역 */
    .tour-header-top {
        display: flex;
        align-items: baseline;          /* ✅ 텍스트 기준선 맞춤 */
        gap: 12px;
        flex-wrap: nowrap;
    }
    
    .tour-header-top .tour-name {
        font-size: 17px;
        font-weight: 700;
        color: #1f2937;
        white-space: nowrap;
    }
    
    /* ✅ 담당 1줄: "담당: @계정명" */
    .tour-header-top .tour-guide {
        display: flex;
        align-items: baseline;          /* ✅ 내부도 baseline */
        gap: 4px;
        margin-left: 0;
        white-space: nowrap;
    }
    
    .tour-header-top .tour-guide > span {
        font-size: 13px;
        font-weight: 600;
        color: #6b7280;
    }
    
    .tour-header-top .tour-guide > span::after {
        content: ":";
    }
    
    /* 폭을 못 박는다 (2026-09-17). width 가 없으면 select 는 **가장 긴 선택지**에 맞춰 늘어난다.
       선택지에 회차마다 다른 꼬리표가 붙어서 — 🟢 김상아 (오전 반차) / ⚪ 김정엽 (자격 없음) —
       회차마다 박스 폭이 달라 보였다. 닫힌 상태엔 담당 이름만 뜨니 160px 이면 넉넉하고,
       펼치면 꼬리표는 그대로 다 보인다. */
    .tour-header-top .tour-guide select {
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        width: 160px;
        min-width: 160px;
        max-width: 160px;
        text-overflow: ellipsis;
    }
    
    /* 날짜/시간/인원/상태 - 같은 줄 */
    .tour-header-bottom {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 0;
        margin-left: auto;
    }
    
    .tour-header-bottom .tour-date {
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        width: 145px;       /* ✅ 날짜 너비 */
        text-align: center;
    }
    
    /* ✅ 시간 너비 증가 */
    .tour-header-bottom .tour-time {
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        width: 128px;       /* "오전 09:45 🕐"가 잘리지 않는 폭 */
        min-width: 128px;
        text-align: center;
    }
    
    .tour-header-bottom .tour-count {
        font-size: 14px;
        font-weight: 600;
        color: #1e40af;
        white-space: nowrap;
        padding: 6px 12px;
        background: #dbeafe;
        border-radius: 6px;
    }
    
    /* ✅ 확정 드롭다운 - 중앙 정렬 */
    .tour-header-bottom .tour-status {
        height: 32px;
        min-width: 90px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 6px;
        font-weight: 600;
        text-align: center;
        text-align-last: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* ==========================================
       PC 액션 버튼 - 크기 증가
       ========================================== */
    .btn-sm {
        padding: 6px 16px !important;
        min-width: 70px !important;
        font-size: 13px !important;
        height: 32px !important;
    }
    
    .reservation-table-desktop td .btn-sm,
    .reservation-table-desktop td button {
        padding: 6px 16px !important;
        min-width: 70px !important;
        font-size: 13px !important;
        height: 32px !important;
    }
}

/* ==========================================
   3. 모바일 스타일 (768px 이하)
   ========================================== */

@media (max-width: 768px) {
    /* ✅ 예약관리 페이지 전용 padding 제거 - 다른 페이지에는 영향 없음 */
    #reservationContent,
    #reservationManagementContent {
        padding: 0 !important;
    }
    
    .tab-header {
        gap: 10px;
        margin-bottom: 12px;
        padding: 8px 12px 0 12px;
    }
    
    .header-top {
        margin-bottom: 4px;
    }
    
    .header-top h2 {
        font-size: 18px;
        font-weight: 700;
        color: #1f2937;
    }
    
    .header-top .btn-primary,
    .header-top .btn-secondary {
        height: 26px !important;
        min-height: 26px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
        margin-top: 2px;
    }
    
    .tabs {
        gap: 8px;
        width: 100%;
        max-width: none;
        margin-bottom: 2px;
    }
    
    .tab-button {
        flex: 1;
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 8px;
        font-size: 12px;
    }
    
    .date-navigation {
        gap: 6px;
        width: 100%;
        flex-wrap: wrap;        /* ✅ v3.13: 좁은 화면에서 담당필터 줄바꿈 */
        justify-content: center; /* ✅ v3.26: 모바일 가운데 정렬 */
    }
    
    .date-nav-btn {
        flex: 0 0 auto;
        width: auto;
        height: 28px;
        min-height: 28px;
        padding: 0 10px;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .date-picker {
        flex: 1;
        height: 28px;
        min-height: 28px;
        padding: 0 8px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-width: 120px;
    }
    
    /* ✅ v3.26: 모바일에서 오늘 버튼 숨김 (이전/날짜/다음/할일만 노출) */
    .date-today-btn {
        display: none !important;
    }
    
    /* ✅ v3.13: 담당 필터 - 모바일 */
    .teacher-filter {
        margin-left: 0;         /* ✅ 줄바꿈 시 왼쪽 정렬 */
        flex: 1 1 auto;         /* ✅ 남은 공간 채우기 */
        min-width: 80px;
    }
    
    .teacher-filter-select {
        height: 28px;
        min-height: 28px;
        padding: 0 6px;
        font-size: 11px;
        width: 100%;            /* ✅ 부모 너비에 맞춤 */
        min-width: 80px;
        box-sizing: border-box;
    }
    
    /* ✅ v3.14: 전체 접기/펼치기 버튼 - 모바일 */
    .toggle-all-btn {
        height: 28px;
        min-height: 28px;
        padding: 0 8px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    /* ✅ v3.20: 필터+검색 영역 모바일 */
    .filter-search-row {
        flex-direction: column !important;
        gap: 6px !important;
        margin-top: 6px !important;
    }
    
    .filter-group {
        width: 100%;
        gap: 6px !important;
        flex-wrap: wrap !important;
    }
    
    .filter-item {
        height: 26px !important;
        padding: 2px 6px !important;
        font-size: 11px !important;
        flex: 1 1 auto;
    }
    
    .filter-item select {
        min-width: 60px !important;
        font-size: 11px !important;
        padding: 2px 4px !important;
    }
    
    .filter-toggle-btn {
        height: 26px !important;
        padding: 0 8px !important;
        font-size: 10px !important;
    }
    
    .search-input {
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 0 !important;
        font-size: 13px !important;
        height: 32px;
    }
    
    /* ✅ v3.20: 통계 바 모바일 */
    .stats-bar {
        gap: 6px 10px !important;
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
    
    .stats-bar > span {
        font-size: 11px !important;
    }
    
    /* 월별 통계 + 일치 — 모바일에서 같은 줄에 */
    .stats-bar > span[style*="border-left"] {
        border-left: none !important;
        padding-left: 0 !important;
        font-size: 10px !important;
    }
    
    /* ✅ 일치 — 모바일에서 줄 안 바꿈 */
    .stats-bar > span[style*="margin-left"] {
        margin-left: auto !important;
        font-size: 10px !important;
    }
    
    /* ✅ v3.14: 접기 화살표 - 모바일 */
    .tour-collapse-arrow {
        font-size: 10px;
        margin-right: 2px;
    }
    
    .tour-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
    }
    
    /* ==========================================
       투어 헤더 모바일 - 완전 재설계
       ========================================== */
    .tour-header {
        background: #f9fafb;
        border-radius: 6px;
        padding: 8px 10px;
        border-bottom: none;
        margin-bottom: 10px;
        width: 100%;                /* ✅ 추가 */
        box-sizing: border-box;     /* ✅ 추가 */
    }
    
    /* 상단: 투어명 + 담당 (1줄, baseline 정렬) */
    .tour-header-top {
        display: flex;
        align-items: baseline;          /* ✅ 텍스트 기준선 맞춤 */
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 6px;
        padding-top: 4px;               /* ✅ 전체 내림 */
        flex-wrap: nowrap !important;
        overflow: hidden;
        width: 100%;
    }
    
    .tour-header-top .tour-name {
        flex: 0 1 auto;
        font-size: 13px;
        font-weight: 700;
        color: #111827;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    /* ✅ 담당 영역 - 우측 정렬 */
    .tour-header-top .tour-guide {
        display: flex;
        align-items: baseline;          /* ✅ 내부도 baseline */
        gap: 2px;
        margin-left: auto !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    .tour-header-top .tour-guide > span {
        font-size: 10px;
        font-weight: 600;
        color: #6b7280;
        white-space: nowrap;
    }
    
    .tour-header-top .tour-guide select {
        height: 22px !important;
        padding: 0 8px !important;
        font-size: 10px !important;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        min-width: 90px;
        max-width: 110px;
    }
    
    /* ==========================================
       하단: 날짜/시간/인원/상태
       ========================================== */
    .tour-header-bottom {
        display: flex;
        gap: 4px;
        margin-top: 0;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;                /* ✅ 추가 */
    }
    
    /* ✅ 날짜 - 가운데 정렬 */
    .tour-header-bottom .tour-date {
        flex: 0 0 95px !important;
        width: 95px !important;
        min-width: 95px !important;
        max-width: 95px !important;
    }
    
    /* ✅ 시간 - 가운데 정렬. 한국어 시간 입력은 "오전 09:45 🕐"라 82px에서는 잘린다 */
    .tour-header-bottom .tour-time {
        flex: 0 0 108px !important;
        width: 108px !important;
        min-width: 108px !important;
        max-width: 108px !important;
        margin-right: auto;             /* ✅ 시간 이후 공간 밀기 */
    }
    
    .tour-header-bottom .tour-date,
    .tour-header-bottom .tour-time {
        height: 26px !important;
        border-radius: 4px;
        font-size: 10px !important;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px !important;      /* ✅ 패딩 증가 */
        box-sizing: border-box;
        background: white;
        color: #374151;
        border: 1px solid #d1d5db;
        text-align: center;
    }
    
    /* ✅ 현재 N명 - 우측 정렬 */
    .tour-header-bottom .tour-count {
        flex: 0 0 auto;
        min-width: 50px;
        height: 26px !important;
        border-radius: 4px;
        font-size: 10px !important;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 6px;
        box-sizing: border-box;
        color: #1e40af;
        background: #dbeafe;
        border: 1px solid #bfdbfe;
        white-space: nowrap;
    }
    
    /* ✅ 상태 드롭다운 - 우측 정렬 */
    .tour-header-bottom .tour-status {
        flex: 0 0 50px !important;
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        height: 26px !important;
        padding: 0 2px !important;
        font-size: 9px !important;
        font-weight: 600;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tour-card button:not(.res-memo-btn) {
        height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }
    
    /* ==========================================
       예약 카드 하단 버튼 (1:1 비율, 높이 32px)
       ========================================== */
    .reservation-card-mobile .btn-mobile,
    .reservation-card-mobile button {
        flex: 1 1 50% !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 6px !important;
        font-size: 12px !important;
    }
    
    /* ✅ 정산보류 체크박스 & 이동 드롭다운 높이 맞춤 */
    .reservation-card-mobile label,
    .reservation-card-mobile select {
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        box-sizing: border-box !important;
    }
    
    /* ==========================================================
     * ✅ v3.26: 모바일 투어 카드 세로 스택 레이아웃
     *   (이전 23-mobile-reservation.css 통합)
     *   - tour-header를 좌/우 분할에서 세로 스택으로 강제
     *   - v3.26.1: 담당을 투어명 옆에 배치 (한 줄), 라벨 숨김, 긴 투어명 자동 줄바꿈
     * ========================================================== */
    
    /* 카드 패딩 축소 */
    .tour-card {
        padding: 12px !important;
    }
    
    /* ⭐ 부모 tour-header를 세로 flex로 (좌/우 분할 방지) */
    .tour-card .tour-header {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    /* 상단: 투어명/✏️/담당/✂️ — 가로 flex + 줄바꿈 허용 */
    .tour-card .tour-header-top {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    
    /* 투어명 — 자기 크기만큼만 차지, 긴 경우 줄바꿈 (유연) */
    .tour-card .tour-name {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        line-height: 1.4 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }
    
    /* ✏️ 편집 아이콘 — 투어명 바로 옆에 붙음 */
    .tour-card .tour-header-top > span[title="투어명 변경"] {
        flex-shrink: 0 !important;
    }
    
    /* 💡 담당 영역 — 고정 폭 100px, 왼쪽부터 자연스럽게 배치
     *    짧은 투어명: 투어명 옆 / 긴 투어명 wrap: 다음 줄 왼쪽 */
    .tour-card .tour-guide {
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        flex: 0 0 100px !important;
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        margin: 0 !important;
        height: 28px !important;
    }
    
    /* 💡 모바일에서 "담당" 라벨 숨김 (드롭다운만 표시) */
    .tour-card .tour-guide > span {
        display: none !important;
    }
    
    /* 💡 담당 드롭다운 — 박스 꽉 채우기 (100% of .tour-guide) + 높이 28px 고정 */
    .tour-card .tour-header-top .tour-guide select,
    .tour-card .tour-guide select {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        padding: 2px 6px !important;
        font-size: 12px !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        background: white !important;
        box-sizing: border-box !important;
    }
    
    /* ✂️ 팀 분리 버튼 — 담당과 높이/스타일 완전 동일 (28px, 흰색 테두리)
     *    담당 바로 옆 6px gap으로 붙음, 폭 32px 고정 */
    .tour-card button[title*="새 팀으로 분리"] {
        width: 32px !important;
        max-width: 32px !important;
        min-width: 32px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        padding: 0 !important;
        font-size: 14px !important;
        line-height: 1 !important;
        flex: 0 0 32px !important;
        flex-shrink: 0 !important;
        margin-left: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: white !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        color: #374151 !important;
        cursor: pointer !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }
    
    .tour-card button[title*="새 팀으로 분리"]:hover,
    .tour-card button[title*="새 팀으로 분리"]:active {
        background: #f3f4f6 !important;
    }
    
    /* ℹ️ 하단(날짜/시간/인원/상태)은 기존 스타일(668~735라인) 그대로 사용 */
    
    /* 취소 탭 요소 */
    .tour-card .tour-cancelled-badge {
        font-size: 12px !important;
        padding: 2px 8px !important;
    }
    
    .tour-card .btn-restore,
    .tour-card .btn-delete {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

/* ==========================================
   4. 상태별 색상
   ========================================== */

.tour-status-confirmed,
.status-select.confirmed {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tour-status-unconfirmed,
.status-select.unconfirmed {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.tour-status-cancelled,
.status-select.cancelled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.confirmed {
    background: #dcfce7;
    color: #166534;
}

.badge.unconfirmed {
    background: #fef3c7;
    color: #92400e;
}

.badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================
   5. 버튼 스타일
   ========================================== */

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

.btn-restore {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 13px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-restore:hover {
    background: #059669;
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 13px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-delete:hover {
    background: #dc2626;
}

/* ==========================================
   취소된 투어 헤더 전용 스타일
   ========================================== */

/* 취소 배지 스타일 (기본) */
.tour-cancelled-badge {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* ✅ PC: 취소된 투어 헤더 버튼 영역 */
@media (min-width: 769px) {
    /* 취소 배지 - 버튼과 동일 높이 */
    .tour-header-top .tour-cancelled-badge {
        height: 28px !important;
        padding: 0 10px !important;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .tour-header-top .btn-restore,
    .tour-header-top .btn-delete {
        height: 28px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
        min-width: auto !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ✅ 모바일: 취소된 투어 헤더 버튼 최적화 */
@media (max-width: 768px) {
    /* 취소 배지 - 버튼과 동일 높이 */
    .tour-header-top .tour-cancelled-badge {
        height: 22px !important;
        min-height: 22px !important;
        max-height: 22px !important;
        padding: 0 6px !important;
        font-size: 9px !important;
        border-radius: 4px;
        white-space: nowrap;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 복구/삭제 버튼 - 높이 및 크기 축소 */
    .tour-header-top .btn-restore,
    .tour-header-top .btn-delete {
        height: 22px !important;
        min-height: 22px !important;
        max-height: 22px !important;
        padding: 0 6px !important;
        font-size: 9px !important;
        border-radius: 4px !important;
        gap: 2px !important;
        min-width: auto !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* 투어명 - 최소 너비 보장 */
    .tour-header-top .tour-name {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        max-width: none !important;
    }
}

.btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    background: white;
    cursor: pointer;
}

/* ✅ PC 액션 버튼 색상 */
.btn-warning {
    background: #f59e0b !important;
    color: white !important;
    border: 1px solid #f59e0b !important;
}

.btn-warning:hover {
    background: #d97706 !important;
}

.btn-success {
    background: #10b981 !important;
    color: white !important;
    border: 1px solid #10b981 !important;
}

.btn-success:hover {
    background: #059669 !important;
}

.btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border: 1px solid #ef4444 !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
}

/* ==========================================
   6. 테이블 (PC용)
   ========================================== */

.reservation-table-desktop {
    width: 100%;
    background: white;
    border-radius: 8px;
    /* 폴드 PC보기처럼 좁은 화면에서 칸이 내용보다 좁아지면 글자가 겹친다 —
       숨기지 말고 가로 스크롤로 흘려보낸다 */
    overflow: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.reservation-table-desktop table {
    width: 100%;
    /* 9칸(고객명~보류)이 겹치지 않는 최소폭. 인라인 table-layout:fixed 는
       %폭을 실제 표 폭 기준으로 나누므로, 최소폭만 보장하면 배분이 유지된다 */
    min-width: 1240px;
    border-collapse: collapse;
}

/* 칸 내용이 칸보다 넓어도 옆 칸(연락처 등) 위로 삐져나가지 않게 자른다 —
   고객명 칸의 버튼+이름 묶음이 연락처를 덮던 폴드 겹침의 직접 원인 */
.reservation-table-desktop td {
    overflow: hidden;
}

.reservation-table-desktop th {
    background: #f9fafb;
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.reservation-table-desktop td {
    padding: 12px;
    font-size: 13px;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
}

@media (max-width: 768px) {
    .reservation-table-desktop {
        display: none;
    }
}

/* ==========================================
   7. 카드 (모바일용)
   ========================================== */

.reservation-cards-mobile {
    display: none;
}

@media (max-width: 768px) {
    .reservation-cards-mobile {
        display: block;
    }
}

/* ========================================
   헤더 버튼 스타일
   ======================================== */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-btn {
    width: 90px;
    height: 34px;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
}

.header-btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.header-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.header-btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
}

/* 모바일 헤더 버튼 */
@media (max-width: 768px) {
    .header-buttons {
        gap: 4px;
    }
    
    .header-btn {
        width: 65px;
        height: 28px;
        font-size: 10px;
    }
}

/* 전체 날짜 예약 검색 */
.global-search-panel {
    margin-top: 8px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.global-search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
}

.global-search-summary span,
.global-search-result small {
    color: #64748b;
}

.global-search-list {
    max-height: 340px;
    overflow-y: auto;
}

.global-search-result {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 120px minmax(150px, 1fr) minmax(180px, 1.4fr) 52px;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: #fff;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
}

.global-search-result:hover,
.global-search-result:focus-visible {
    background: #f8fafc;
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

.global-search-result-date,
.global-search-result-customer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.global-search-result-date {
    color: #2563eb;
    font-weight: 700;
}

.global-search-result-customer strong,
.global-search-result-tour {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-result-status {
    justify-self: end;
    padding: 3px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
}

.global-search-result-status.is-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.global-search-message,
.global-search-limit {
    padding: 12px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.global-search-error {
    color: #b91c1c;
    background: #fef2f2;
}

.global-search-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 7px;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: -2px;
}

.reservation-search-target {
    animation: reservation-search-highlight 2.6s ease-out;
}

@keyframes reservation-search-highlight {
    0%, 35% { box-shadow: inset 0 0 0 3px #2563eb; background: #dbeafe; }
    100% { box-shadow: inset 0 0 0 0 transparent; }
}

@media (max-width: 768px) {
    .global-search-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .global-search-list {
        max-height: 55vh;
    }

    .global-search-result {
        grid-template-columns: 92px minmax(0, 1fr) 44px;
        gap: 8px;
        padding: 10px;
    }

    .global-search-result-tour {
        grid-column: 2 / 3;
        color: #475569;
        font-size: 12px;
    }

    .global-search-result-status {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

/* ==========================================
   예약 접수 화면 개편 (2026-09-15) — PC 전용
   왼쪽 「오늘 회차」 목록 + 오른쪽 카드, 같은 시간 팀 묶음(목록/팀 나란히),
   행 동작 단추 3×2 격자 또는 수정·이동·더보기. 모바일(≤768)은 예전 그대로.
   ========================================== */
@media (min-width: 769px) {
    /* 머리 두 줄 */
    .rv2-head { gap: 0; margin-bottom: 12px; }
    .rv2-row1 { display: flex; align-items: center; gap: 16px; width: 100%; margin-bottom: 10px; flex-wrap: nowrap; }
    .rv2-title { font-size: 20px !important; font-weight: 700; color: #111827; margin: 0; white-space: nowrap; }
    .rv2-date { gap: 4px !important; }
    .rv2-date .date-nav-btn { width: 34px; height: 34px !important; padding: 0 !important; font-size: 18px; line-height: 1; }
    .rv2-date .date-picker { height: 34px !important; min-width: 150px !important; max-width: 170px !important; font-weight: 700; }
    .rv2-date .date-today-btn { height: 34px !important; padding: 0 12px !important; background: #fff; color: #374151; border: 1px solid #d1d5db; }
    .rv2-date .date-today-btn:hover { background: #f3f4f6; }
    .rv2-seg { gap: 0 !important; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; margin: 0 !important; }
    .rv2-seg .tab-button { min-width: 0; padding: 0 14px; height: 32px; border: none; border-right: 1px solid #e5e7eb; border-radius: 0; font-size: 13px; font-weight: 500; color: #6b7280; }
    .rv2-date .memo-daily-btn { margin-left: 4px !important; padding: 0 14px !important; min-width: 64px; font-size: 13px !important; font-weight: 600; }
    .rv2-date .date-today-btn { padding: 0 14px !important; min-width: 56px; }
    .rv2-seg .tab-button:last-child { border-right: none; }
    .rv2-seg .tab-button.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
    .rv2-actions { margin-left: auto; display: flex; gap: 8px; }
    .rv2-actions .header-btn { width: auto; padding: 0 14px; height: 34px; border-radius: 8px; font-weight: 600; }
    .rv2-actions .header-btn-primary { background: #2563eb; }
    .rv2-row2 { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 0 !important; flex-wrap: nowrap !important; }
    /* 둘째 줄 컨트롤은 전부 32px 로 — 기본 input/select 규칙(16px 글자·content-box)이 높이를 제각각 만들던 것 (2026-09-15) */
    .rv2-row2 .rv2-search { flex: 0 1 280px !important; min-width: 200px !important; height: 32px !important; box-sizing: border-box; padding: 0 12px !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; font-size: 13px !important; line-height: 30px; background: #fff; }
    .rv2-row2 .rv2-sel { display: inline-flex; align-items: center; gap: 4px; height: 32px; box-sizing: border-box; padding: 0 4px 0 10px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 13px; color: #6b7280; white-space: nowrap; }
    .rv2-row2 .rv2-sel select { height: 30px; line-height: 30px; padding: 0 18px 0 2px !important; margin: 0; border: none !important; background: transparent !important; font-size: 13px !important; color: #374151; cursor: pointer; outline: none; min-width: 0 !important; width: auto; -webkit-appearance: auto; appearance: auto; }
    .rv2-row2 .rv2-ghost { height: 32px !important; box-sizing: border-box; padding: 0 12px !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; background: #fff !important; font-size: 12px !important; line-height: 30px !important; color: #374151; cursor: pointer; }
    .rv2-row2 .rv2-ghost:hover { background: #f3f4f6 !important; }
    .rv2-row2 > * { margin: 0 !important; vertical-align: middle; }
    .rv2-row2 .rv2-sel select { width: auto !important; max-width: 160px; background-image: none !important; }
    .rv2-switch { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; white-space: nowrap; cursor: pointer; user-select: none; }
    .rv2-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
    .rv2-switch .rv2-knob { width: 30px; height: 18px; border-radius: 9999px; background: #d1d5db; position: relative; transition: background .15s; }
    .rv2-switch .rv2-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 9999px; background: #fff; transition: left .15s; }
    .rv2-switch input:checked + .rv2-knob { background: #2563eb; }
    .rv2-switch input:checked + .rv2-knob::after { left: 14px; }
    .rv2-head .stats-bar { margin-top: 0 !important; }

    /* 왼쪽 목록 + 오른쪽 카드 */
    .rv2-layout { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; }
    .rv2-rail { flex: 0 0 290px; position: sticky; top: 8px; max-height: calc(100vh - 16px); display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
    .rv2-rail-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
    .rv2-rail-toggle { width: 26px; height: 26px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; color: #6b7280; font-size: 14px; cursor: pointer; line-height: 1; padding: 0; }
    .rv2-rail-toggle:hover { background: #f3f4f6; }
    .rv2-rail-title { font-size: 13px; font-weight: 700; color: #111827; white-space: nowrap; }
    .rv2-rail-list { overflow-y: auto; flex: 1 1 auto; }
    .rv2-rail-item { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; border-bottom: 1px solid #f3f4f6; font-size: 13px; color: #374151; cursor: pointer; }
    .rv2-rail-item:hover { background: #f9fafb; }
    .rv2-rail-item.on { background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }
    .rv2-rail-item.drag-hover { background: #fffbeb; box-shadow: inset 0 0 0 2px #f59e0b; }
    .rv2-rail-item .tm { width: 40px; flex: 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; color: #111827; }
    .rv2-rail-item .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rv2-rail-item .who { font-size: 12px; color: #6b7280; white-space: nowrap; }
    .rv2-rail-item.bad .who { color: #b91c1c; font-weight: 600; }
    /* 담당 이름을 눌러 그 자리에서 바꾼다 (2026-09-16) */
    .rv2-rail-who { padding: 2px 6px; margin: -2px -6px; border-radius: 6px; cursor: pointer; }
    .rv2-rail-who:hover { background: #e5e7eb; color: #111827; }
    .rv2-rail-item.bad .rv2-rail-who:hover { background: #fee2e2; color: #b91c1c; }
    .rv2-rail-who.off { color: #b45309; font-weight: 600; }
    .rv2-rail-who.off:hover { background: #fef3c7; }
    .rv2-rgp { position: fixed; z-index: 10002; min-width: 240px; max-width: 320px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgba(17, 24, 39, .18); }
    .rv2-rgp-head { font-size: 12px; font-weight: 600; color: #6b7280; padding: 0 2px 8px; border-bottom: 1px solid #f3f4f6; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rv2-rgp-row { display: flex; align-items: center; gap: 8px; margin: 0 0 6px !important; font-size: 12px; color: #6b7280; font-weight: 600; }
    .rv2-rgp-row:last-child { margin-bottom: 0 !important; }
    .rv2-rgp-row > span { flex: 0 0 auto; width: 34px; }
    .rv2-rgp-row > select { flex: 1 1 auto; width: auto !important; min-width: 0; height: 32px !important; box-sizing: border-box; margin: 0 !important; padding: 0 8px !important; border: 1px solid #d1d5db !important; border-radius: 8px !important; background: #fff; font-size: 12.5px !important; color: #111827; appearance: auto; }
    /* 접힌 띠에서는 시간만 남으므로 담당 누르기는 펼친 상태에서만 */
    .rv2-collapsed .rv2-rail-who { display: none; }
    .rv2-rail-item .ct { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .rv2-rail-foot { padding: 6px 10px; border-top: 1px solid #f3f4f6; font-size: 11px; color: #9ca3af; }
    .rv2-collapsed .rv2-rail { flex-basis: 52px; }
    .rv2-collapsed .rv2-rail-title, .rv2-collapsed .rv2-rail-foot, .rv2-collapsed .rv2-rail-item .nm, .rv2-collapsed .rv2-rail-item .who, .rv2-collapsed .rv2-rail-item .ct { display: none; }
    .rv2-collapsed .rv2-rail-head { justify-content: center; }
    .rv2-collapsed .rv2-rail-item { justify-content: center; padding: 0; height: 30px; font-size: 11px; }
    .rv2-collapsed .rv2-rail-item .tm { width: auto; font-size: 11px; color: #6b7280; }
    .rv2-collapsed .rv2-rail-item.bad .tm { color: #b45309; font-weight: 700; }
    .rv2-collapsed .rv2-rail-item.on .tm { color: #1d4ed8; font-weight: 700; }
    .rv2-main { flex: 1 1 auto; min-width: 0; }
    .rv2-main > .tour-card, .rv2-slot { margin-bottom: 14px !important; }
    /* 카드 머리의 팀 분리·시트 복사·시트대로 배정 — 크기·모양을 담당 선택과 맞춤 (2026-09-15) */
    .rv2-main .tour-header-top { align-items: center; gap: 10px; }
    .rv2-main .tour-header-top .tour-name { display: inline-flex; align-items: center; }
    .rv2-main .tour-rename-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; margin: 0 !important; padding: 0 !important; color: #9ca3af; border-radius: 8px; }
    .rv2-main .tour-rename-btn:hover { background: #f3f4f6; color: #374151; }
    .rv2-main .tour-header-top .tour-guide { align-items: center; gap: 6px; }
    .rv2-main .tour-header-top .tour-guide > span { font-size: 12.5px; }
    .rv2-main .tour-header-top .tour-guide select { height: 32px; box-sizing: border-box; padding: 0 28px 0 10px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 12.5px; color: #111827; appearance: auto; }
    .rv2-main .tour-header-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: 0; }
    .rv2-main .tour-header-actions button, .rv2-main .tour-header-actions .rv2-sheet-btn { height: 32px !important; box-sizing: border-box; margin: 0 !important; padding: 0 12px !important; border-radius: 8px !important; font-size: 12.5px !important; font-weight: 600 !important; line-height: 30px !important; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
    .rv2-main .tour-header-actions .qr-copy-sheet-btn, .rv2-main .tour-header-actions .team-split-btn { border: 1px solid #d1d5db !important; background: #fff !important; color: #374151 !important; }
    .rv2-main .tour-header-actions .qr-copy-sheet-btn:hover, .rv2-main .tour-header-actions .team-split-btn:hover { background: #f3f4f6 !important; }
    .rv2-main .tour-header-actions .qr-copy-sheet-ico { display: none; }
    .rv2-main .tour-header-actions .rv2-sheet-btn { border: 1px solid #93c5fd !important; background: #eff6ff !important; color: #1d4ed8 !important; }
    .rv2-main .tour-header-actions .rv2-sheet-btn:hover { background: #dbeafe !important; }
    .rv2-main .tour-header-actions .rv2-sheet-btn.unknown { border-color: #fca5a5 !important; background: #fef2f2 !important; color: #b91c1c !important; }
    .tour-card.rv2-flash { box-shadow: 0 0 0 3px #bfdbfe !important; }

    /* 여러 건 고르기 (2026-09-15): 행 체크 칸 + 고른 행 + 아래 막대 */
    .rv2-c-sel { width: 28px; text-align: center; padding: 6px 2px !important; }
    .rv2-sel-cb { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: #2563eb; vertical-align: middle; }
    .rv2-row.rv2-row-sel, .rv2-compact-table tr.rv2-row-sel { background: #eff6ff !important; }
    .rv2-selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 12px; background: #111827; color: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font-size: 13px; white-space: nowrap; }
    .rv2-selbar[hidden] { display: none; }
    .rv2-selbar-n { font-weight: 700; font-variant-numeric: tabular-nums; }
    .rv2-selbar-sep { width: 1px; height: 20px; background: #374151; }
    .rv2-selbar-lab { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin: 0 !important; font-size: 12px; font-weight: 400; color: #9ca3af; }
    .rv2-selbar-lab > select, .rv2-selbar-lab > input { margin: 0 !important; }
    .rv2-selbar-sel, .rv2-selbar-date { height: 30px !important; box-sizing: border-box; padding: 0 8px !important; border: 1px solid #374151 !important; border-radius: 8px !important; background: #1f2937 !important; color: #fff !important; font-size: 12.5px !important; max-width: 320px; appearance: auto; }
    .rv2-selbar-sel option { color: #111827; background: #fff; }
    #rv2SelTeacher { min-width: 104px; }
    #rv2SelTarget { min-width: 300px; }
    .rv2-main { padding-bottom: 72px; }   /* 막대가 마지막 행을 가리지 않게 */
    .rv2-selbar-date { color-scheme: dark; }
    .rv2-selbar-btn { height: 30px; padding: 0 12px; border: 1px solid #4b5563; border-radius: 8px; background: transparent; color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
    .rv2-selbar-btn:hover { background: #1f2937; }
    .rv2-selbar-btn.primary { background: #2563eb; border-color: #2563eb; }
    .rv2-selbar-btn.danger { border-color: #7f1d1d; color: #fca5a5; }
    .rv2-selbar-btn.danger:hover { background: #7f1d1d; color: #fff; }
    .rv2-selbar-btn.primary:hover { background: #1d4ed8; }

    /* 같은 시간 팀 묶음 */
    .rv2-slot { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
    .rv2-slot-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #e5e7eb; background: #fff; }
    .rv2-slot-time { font-size: 15px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; }
    .rv2-slot-name { font-size: 16px; font-weight: 700; color: #111827; }
    .rv2-slot-meta { font-size: 13px; color: #6b7280; }
    .rv2-slot-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 9999px; background: #f3f4f6; color: #374151; font-size: 11px; font-weight: 600; }
    .rv2-seg2 { margin-left: auto; display: inline-flex; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; }
    .rv2-seg2 button { height: 30px; padding: 0 12px; border: none; border-right: 1px solid #e5e7eb; background: #fff; color: #6b7280; font-size: 12px; font-weight: 500; cursor: pointer; }
    .rv2-seg2 button:last-child { border-right: none; }
    .rv2-seg2 button.on { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
    .rv2-slot-body { padding: 0; }
    .rv2-slot-body .tour-card.rv2-team { border: none !important; border-top: 1px solid #e5e7eb !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
    .rv2-slot-body .tour-card.rv2-team:first-child { border-top: none !important; }
    .rv2-slot-body.rv2-side { display: grid; gap: 12px; padding: 12px; background: #f9fafb; }
    .rv2-slot-body.rv2-side .tour-card.rv2-team-side { border: 1px solid #e5e7eb !important; border-radius: 10px !important; padding: 10px !important; background: #fff; }
    .rv2-slot-body.rv2-side .tour-header { flex-wrap: wrap; gap: 6px; padding-bottom: 8px; margin-bottom: 8px; }
    .rv2-slot-body.rv2-side .tour-header-top .tour-name { font-size: 14px; white-space: normal; }
    .rv2-slot-body.rv2-side .tour-header-bottom { margin-left: 0; flex-wrap: wrap; gap: 6px; }
    .rv2-slot-body.rv2-side .tour-header-bottom .tour-date { display: none; }
    .rv2-slot-body.rv2-side .tour-header-top .tour-guide select { min-width: 90px; }
    .rv2-compact-table { width: 100%; border-collapse: collapse; }
    .rv2-compact-table td { padding: 8px 8px; border-bottom: 1px solid #f3f4f6; font-size: 13px; vertical-align: middle; }
    .rv2-compact-table tr:last-child td { border-bottom: none; }
    .rv2-compact-table .rv2-c-info { max-width: 0; }
    .rv2-compact-table tr[draggable="true"] { cursor: grab; }

    /* 표 머리·행·셀 — 행이 낮아져 옛 최소폭(1240px)이 필요 없다. 폴드처럼 좁으면 여전히 가로 스크롤 */
    .rv2-main .reservation-table-desktop table { table-layout: fixed; min-width: 860px; box-shadow: none !important; border-radius: 0 !important; }
    /* 예약자 칸: 왼쪽 44px 에 복제·복사됨 세로, 나머지 폭 가운데에 이름 (2026-09-15 지시) */
    .rv2-namebox { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 8px; }
    .rv2-namebox > .rv2-nm { order: 2; text-align: center; white-space: normal; }
    /* 「방금 추가」는 복제·복사와 같은 폭·높이의 칩으로 왼쪽 줄에 세운다 (2026-09-16 지시) —
       이름 아래 따로 놓이면 행 높이가 튀고 옆 칸을 덮는다 */
    .rv2-newchip { display: block; box-sizing: border-box; width: 50px; height: 20px; line-height: 16px; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; border: 1px solid #fdba74; border-radius: 4px; background: #ffedd5; color: #c2410c; }
    .rv2-mini { order: 1; display: flex; flex-direction: column; gap: 6px; }
    .reservation-table-desktop td .rv2-mini button { width: 50px; box-sizing: border-box; min-width: 0 !important; height: 20px !important; padding: 0 2px !important; font-size: 11px !important; line-height: 18px !important; text-align: center; }
    .rv2-c-name { text-align: center; }
    /* 팀 나란히: 카드 머리를 한 칸에 맞게 */
    .rv2-team-side .tour-header-top { flex-wrap: wrap; gap: 6px; }
    .rv2-team-side .tour-header-top .tour-name { font-size: 13px; }
    .rv2-team-side .tour-header-actions button { white-space: nowrap; }
    .rv2-team-side .qr-copy-sheet-label { display: none; }
    .rv2-team-side .tour-header-bottom > * { flex: 0 0 auto; }
    .rv2-team-side .tour-header-bottom .tour-status { width: auto; min-width: 84px; }
    .rv2-team-side .tour-header-bottom .tour-time { width: 110px; min-width: 110px; }
    .rv2-compact-table { table-layout: fixed; }
    .rv2-compact-table .rv2-c-info { max-width: none; overflow: hidden; }
    .rv2-compact-table .rv2-c-name { white-space: normal; overflow: hidden; }
    .rv2-thead th { padding: 6px 10px; text-align: center; font-size: 12px; font-weight: 600; color: #6b7280; background: #fafafa; border-bottom: 1px solid #f3f4f6; white-space: nowrap; }
    /* 머리글자를 아래 값과 같은 줄에 맞춘다 (2026-09-16 지시) —
       「예약자」는 왼쪽 44px 칩 자리를 건너뛰고 이름 위에, 「금액」은 오른쪽 맞춤 숫자 위에 */
    .rv2-thead th.rv2-th-name { text-align: center; padding-left: 68px; }
    .rv2-thead th.rv2-th-n { text-align: right; padding-right: 8px; }
    .rv2-row { border-bottom: 1px solid #f3f4f6; transition: background .15s; }
    .rv2-row:hover { background: #f9fafb; }
    .rv2-row-hold { background: #fffbeb; }
    .rv2-row-hold:hover { background: #fef9e7; }
    .rv2-row-cancelled .rv2-name, .rv2-row-cancelled .rv2-c-phone, .rv2-row-cancelled .rv2-info, .rv2-row-cancelled .rv2-c-n, .rv2-row-cancelled .rv2-c-src { color: #9ca3af !important; }
    .rv2-row td { padding: 9px 10px; font-size: 13px; color: #374151; vertical-align: middle; }
    .rv2-c-name { text-align: left; white-space: nowrap; font-weight: 600; color: #111827; font-size: 14px; }
    .rv2-c-phone { text-align: center; color: #6b7280; font-variant-numeric: tabular-nums; }
    .rv2-c-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .rv2-c-amt { padding-right: 8px !important; }   /* 머리글자 「금액」과 같은 오른쪽 여백 */
    .rv2-c-pax { text-align: center; font-weight: 600; color: #1e40af; }
    .rv2-c-amt { font-weight: 600; color: #111827; }
    .rv2-c-src { text-align: center; color: #92400e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rv2-c-status { text-align: center; }
    .rv2-c-hold { text-align: center; }
    .rv2-c-info { text-align: left; max-width: 0; }
    .rv2-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280; }
    .rv2-name { font-weight: 600; color: #111827; }
    .rv2-sub { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }
    /* 참여자 칸: 두 줄까지, 넘치면 말줄임 (메모는 옆 칸으로 옮김, 2026-09-16) */
    .rv2-info.rv2-info-2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
    .rv2-c-memo { text-align: left; vertical-align: middle; }
    .rv2-memo2 { display: flex; align-items: flex-start; gap: 4px; font-size: 12.5px; line-height: 1.35; color: #374151; cursor: pointer; }
    .rv2-memo2 svg { flex: 0 0 auto; margin-top: 3px; color: #b45309; }
    .rv2-memo2 > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
    .rv2-memo2:hover > span { color: #111827; }
    .rv2-memo-add { display: none; font-size: 12px; color: #c4c9d1; cursor: pointer; white-space: nowrap; }
    .rv2-row:hover .rv2-memo-add { display: inline; }
    .rv2-memo-add:hover { color: #2563eb; }
    .rv2-row-cancelled .rv2-memo2 { color: #9ca3af; }
    .rv2-memo { display: flex; align-items: flex-start; gap: 4px; margin-top: 3px; font-size: 12px; color: #b45309; line-height: 1.35; white-space: normal; word-break: break-word; cursor: pointer; }
    .rv2-memo svg { flex: 0 0 auto; margin-top: 2px; }
    .rv2-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; }
    .rv2-pill.ok { background: #dcfce7; color: #15803d; }
    .rv2-pill.w { background: #fef3c7; color: #b45309; }
    .rv2-pill.x { background: #fee2e2; color: #b91c1c; }
    /* 「미발송」도 「미확정」과 같은 알약 — 모양·크기가 달라 나란히 두면 어긋나 보였다 (2026-09-16) */
    .rv2-pill.send { background: #ffedd5; color: #c2410c; cursor: pointer; }
    .rv2-pill.send:hover { background: #fed7aa; }

    /* 동작 단추 — 표 안 버튼을 키우는 옛 규칙(.reservation-table-desktop td button)을 덮는다 */
    .rv2-c-acts { text-align: right; }
    .rv2-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
    /* 동작 단추: 3열 격자가 칸 폭을 똑같이 나눠 갖고 가운데 (2026-09-15 지시) */
    .rv2-acts.rv2-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px 6px; width: 100%; }
    .rv2-acts.rv2-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 6px; width: 100%; }
    .reservation-table-desktop td .rv2-acts.rv2-grid3 .rv2-btn, .reservation-table-desktop td .rv2-acts.rv2-grid2 .rv2-btn { width: 100%; height: 28px !important; padding: 0 !important; justify-content: center; }
    .reservation-table-desktop td .rv2-btn, .rv2-btn {
        min-width: 0 !important; height: 26px !important; padding: 0 9px !important; font-size: 12px !important; font-weight: 500;
        border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; cursor: pointer; white-space: nowrap; line-height: 1;
    }
    .rv2-btn:hover { background: #f3f4f6; }
    .rv2-btn.warn { color: #b45309; border-color: #fcd34d; }
    .rv2-btn.ok { color: #15803d; border-color: #86efac; }
    .rv2-btn.danger { color: #b91c1c; border-color: #fca5a5; }
    .rv2-lk { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 9999px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer; }
    .rv2-lk.split { background: #fee2e2; color: #b91c1c; }
    .rv2-lk-add { display: none; margin-top: 4px; font-size: 11px; color: #9ca3af; cursor: pointer; }
    .rv2-row:hover .rv2-lk-add { display: inline-block; }
    .rv2-lk-add:hover { color: #2563eb; }
    .rv2-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 10000; }
    .rv2-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 520px; max-width: 92vw; max-height: 84vh; display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); z-index: 10001; overflow: hidden; }
    .rv2-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #e5e7eb; font-size: 15px; color: #111827; }
    .rv2-modal-sub { font-size: 12px; color: #6b7280; font-weight: 400; margin-top: 2px; }
    .rv2-modal-body { overflow-y: auto; flex: 1 1 auto; }
    .rv2-party-hint { padding: 10px 16px; font-size: 12px; color: #6b7280; background: #f9fafb; border-bottom: 1px solid #f3f4f6; }
    .rv2-party-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f3f4f6; cursor: pointer; font-size: 13px; }
    .rv2-party-row:hover { background: #f9fafb; }
    .rv2-party-row input { width: 16px; height: 16px; }
    .rv2-party-name { font-weight: 600; color: #111827; min-width: 110px; }
    .rv2-party-name small { color: #6b7280; font-weight: 400; margin-left: 4px; }
    .rv2-party-tour { color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rv2-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid #e5e7eb; background: #f9fafb; }
    .rv2-modal .rv2-btn { height: 32px !important; padding: 0 14px !important; font-size: 13px !important; }
    .rv2-btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
    .rv2-btn.primary:hover { background: #1d4ed8; }
    .rv2-sheet-btn { height: 28px; padding: 0 10px; border: 1px solid #2563eb; border-radius: 8px; background: #fff; color: #2563eb; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; margin-left: 6px; }
    .rv2-sheet-btn:hover { background: #eff6ff; }
    .rv2-sheet-btn.unknown { border-color: #fca5a5; color: #b91c1c; }
    .rv2-more { position: relative; }
    .rv2-more > summary { list-style: none; width: 28px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; color: #374151; font-size: 14px; user-select: none; }
    .rv2-more > summary::-webkit-details-marker { display: none; }
    .rv2-more[open] > summary { background: #f3f4f6; }
    .rv2-menu { position: absolute; right: 0; top: 30px; z-index: 30; display: flex; flex-direction: column; gap: 4px; min-width: 120px; padding: 6px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
    .rv2-menu .rv2-btn { width: 100%; justify-content: flex-start; text-align: left; border: none; height: 30px !important; }
    .rv2-menu .rv2-btn:hover { background: #f3f4f6; }
    .rv2-menu #sheetcopy-placeholder { display: none; }
}

/* ==========================================
   예약 접수 모바일 개편 (2026-09-15) — 768px 이하
   두 줄 행 + 위쪽 시간 칩 + 행을 누르면 아래 시트
   ========================================== */
@media (max-width: 768px) {
    .rv2m-head { gap: 8px; padding: 8px 12px 0; }
    .rv2m-row1 { display: flex; align-items: center; justify-content: space-between; width: 100%; }
    .rv2m-title { margin: 0; font-size: 18px; font-weight: 700; color: #111827; }
    .rv2m-right { display: flex; align-items: center; gap: 6px; }
    .rv2m-new { width: auto !important; height: 36px !important; padding: 0 14px !important; font-size: 13px !important; border-radius: 10px; background: #2563eb; }
    .rv2m-ib { width: 36px; height: 36px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #374151; font-size: 18px; line-height: 1; cursor: pointer; }
    .rv2m-ib.on { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
    /* B안 (2026-09-16): 날짜가 제목 자리로 + 아래 날짜 띠. 옛 날짜 줄(‹ 입력칸 › 오늘)은 안 쓴다 */
    .rv2m-datebtn { position: relative; display: inline-flex; align-items: center; gap: 7px; margin: 0 !important; padding: 2px 4px 2px 0; min-width: 0; cursor: pointer; }
    .rv2m-datebtn .d { font-size: 19px; font-weight: 800; letter-spacing: -.4px; color: #111827; white-space: nowrap; }
    .rv2m-datebtn .dow { font-size: 19px; font-weight: 800; color: #374151; }
    .rv2m-datebtn .dow.sat { color: #2563eb; } .rv2m-datebtn .dow.sun { color: #dc2626; }
    .rv2m-datebtn .tchip { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 9999px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 700; }
    /* 기기 기본 달력을 그대로 쓰되 칸은 안 보이게 — 날짜 글씨를 누르면 달력이 열린다 */
    .rv2m-picker { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; }
    .rv2m-striprow { display: flex; align-items: center; gap: 8px; width: 100%; padding-top: 2px; }
    .rv2m-month { font-size: 11px; font-weight: 700; color: #9ca3af; }
    .rv2m-only { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 4px 0 8px; border: 0; background: transparent; font-size: 11px; font-weight: 700; color: #9ca3af; cursor: pointer; }
    .rv2m-only.on { color: #1d4ed8; }
    .rv2m-only .knob { position: relative; display: inline-block; width: 30px; height: 18px; border-radius: 9999px; background: #d1d5db; transition: background .15s; }
    .rv2m-only .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 9999px; background: #fff; transition: transform .15s; }
    .rv2m-only.on .knob { background: #2563eb; }
    .rv2m-only.on .knob::after { transform: translateX(12px); }
    .rv2m-strip { display: flex; gap: 6px; width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .rv2m-strip::-webkit-scrollbar { display: none; }
    .rv2m-day { flex: 0 0 auto; width: 47px; padding: 6px 0 7px; border: 0; border-radius: 10px; background: #f3f4f6; text-align: center; cursor: pointer; }
    .rv2m-day .w { display: block; font-size: 10px; font-weight: 600; color: #9ca3af; line-height: 1.2; }
    .rv2m-day .n { display: block; font-size: 15px; font-weight: 800; color: #111827; line-height: 1.2; margin-top: 1px; }
    .rv2m-day .c { display: block; font-size: 10px; color: #6b7280; line-height: 1.2; margin-top: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .rv2m-day.sat .n { color: #2563eb; } .rv2m-day.sun .n { color: #dc2626; }
    .rv2m-day.none { background: #f9fafb; } .rv2m-day.none .n { color: #9ca3af; } .rv2m-day.none .c { color: #d1d5db; }
    .rv2m-day.today { box-shadow: inset 0 0 0 1.5px #bfdbfe; }
    .rv2m-day.on { background: #2563eb; box-shadow: none; }
    .rv2m-day.on .w, .rv2m-day.on .c { color: #bfdbfe; }
    .rv2m-day.on .n { color: #fff; }
    .rv2m-cnt { font-style: normal; margin-left: 4px; font-size: 11px; font-weight: 700; color: #9ca3af; }
    /* 요약은 한 줄로 — 두 줄로 접히며 자리를 먹던 것 (2026-09-16 B안). 넘치면 옆으로 민다 */
    .stats-bar { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: 4px 10px !important; padding: 6px 10px !important; font-size: 11.5px !important; }
    .stats-bar::-webkit-scrollbar { display: none; }
    .stats-bar > * { flex: 0 0 auto; }
    .rv2m-chip.active .rv2m-cnt { color: #60a5fa; }
    .rv2m-chips { display: flex; gap: 6px !important; width: 100%; }
    .rv2m-chip { flex: 0 0 auto !important; height: 34px !important; min-height: 34px !important; padding: 0 12px !important; border-radius: 9999px !important; font-size: 13px !important; background: #fff; color: #374151; border: 1px solid #d1d5db; }
    .rv2m-chip.active { background: #eff6ff !important; color: #1d4ed8 !important; border-color: #bfdbfe !important; font-weight: 600; }
    .rv2m-panel { flex-direction: column; gap: 8px; width: 100%; padding: 10px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; box-sizing: border-box; margin-top: 0 !important; }
    .rv2m-search { height: 40px !important; border-radius: 10px !important; padding: 0 12px !important; font-size: 14px !important; }
    .rv2m-sels { display: flex; gap: 6px; flex-wrap: wrap; }
    .rv2m-sels .rv2-sel { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 30%; min-width: 0; height: 36px; padding: 0 6px 0 10px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; font-size: 13px; color: #6b7280; white-space: nowrap; }
    .rv2m-sels .rv2-sel select { border: none; background: transparent; font-size: 13px; color: #374151; min-width: 0; flex: 1 1 auto; }
    .rv2m-tools { display: flex !important; flex-wrap: wrap; gap: 6px !important; width: 100%; }
    .rv2m-tools .header-btn { width: auto !important; height: 36px !important; padding: 0 12px !important; font-size: 12.5px !important; border-radius: 10px; }
    .rv2m-times { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 6px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; width: calc(100% + 24px); scrollbar-width: none; }
    .rv2m-times::-webkit-scrollbar { display: none; }
    .rv2m-time { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; height: 46px; padding: 0 8px; border-radius: 10px; border: 1px solid #e5e7eb; background: #fff; color: #374151; }
    .rv2m-time .t { font-size: 13px; font-weight: 700; color: #111827; }
    .rv2m-time .n { font-size: 10px; color: #6b7280; white-space: nowrap; }
    .rv2m-time.bad { border-color: #fca5a5; }
    .rv2m-time.bad .t { color: #b91c1c; }

    .rv2m-rows { display: flex; flex-direction: column; }
    .rv2m-row { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 4px; border-bottom: 1px solid #f3f4f6; cursor: pointer; -webkit-tap-highlight-color: rgba(37, 99, 235, .08); }
    .rv2m-row:last-child { border-bottom: none; }
    .rv2m-row.hold { background: #fffbeb; }
    .rv2m-row.cancelled .rv2m-name, .rv2m-row.cancelled .rv2m-sub, .rv2m-row.cancelled .rv2m-amt { color: #9ca3af !important; }
    .rv2m-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .rv2m-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; font-weight: 600; color: #111827; }
    .rv2m-name .new { color: #c2410c; font-weight: 800; }
    .rv2m-pax { font-size: 12px; font-weight: 400; color: #6b7280; }
    .rv2m-sub { font-size: 12px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rv2m-main .rv2-memo { display: flex; align-items: flex-start; gap: 4px; margin-top: 2px; font-size: 13px; color: #b45309; line-height: 1.35; }
    .rv2m-main .rv2-memo svg { flex: 0 0 auto; margin-top: 2px; }
    .rv2m-main .rv2-lk { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 8px; border-radius: 9999px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 600; width: fit-content; }
    .rv2m-main .rv2-lk.split { background: #fee2e2; color: #b91c1c; }
    .rv2m-amt { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
    .rv2m-amt .a { font-size: 14px; font-weight: 600; color: #111827; }
    .rv2m-amt .b { font-size: 11px; color: #6b7280; }
    .rv2m-chev { flex: 0 0 auto; }
    .rv2m-cxl { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 8px; font-size: 12px; color: #6b7280; background: #fafafa; border-radius: 8px; margin-top: 4px; }
    .rv2m-cxl span { margin-left: auto; color: #2563eb; font-weight: 600; }
    .rv2-pill { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; line-height: 1; white-space: nowrap; }
    .rv2-pill.ok { background: #dcfce7; color: #15803d; }
    .rv2-pill.w { background: #fef3c7; color: #b45309; }
    .rv2-pill.x { background: #fee2e2; color: #b91c1c; }
    /* 「미발송」도 「미확정」과 같은 알약 — 모양·크기가 달라 나란히 두면 어긋나 보였다 (2026-09-16) */
    .rv2-pill.send { background: #ffedd5; color: #c2410c; cursor: pointer; }
    .rv2-pill.send:hover { background: #fed7aa; }

    .rv2m-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 10000; }
    .rv2m-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); z-index: 10001; padding: 0 0 max(12px, env(safe-area-inset-bottom)); }
    .rv2m-grip { width: 40px; height: 4px; border-radius: 9999px; background: #d1d5db; margin: 10px auto 4px; }
    .rv2m-sheet-head { position: relative; padding: 8px 56px 10px 20px; border-bottom: 1px solid #f3f4f6; }
    .rv2m-sheet-tools { position: absolute; right: 8px; top: 2px; display: flex; gap: 2px; }
    .rv2m-sheet-x { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: #9ca3af; border-radius: 10px; }
    .rv2m-sheet-x:active { background: #f3f4f6; color: #374151; }
    /* 정보 칸이 곧 입력칸 (2026-09-15) — 글처럼 보이다가 누르면 칸이 드러난다. 바뀌면 저장 줄 */
    .rv2m-in { box-sizing: border-box; min-height: 36px; margin: 0 !important; padding: 4px 8px !important; border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important; font: inherit; font-size: 15px !important; font-weight: 500; color: #111827; text-align: right; appearance: none; -webkit-appearance: none; }
    .rv2m-in:focus { outline: none; background: #f9fafb !important; border-color: #93c5fd !important; }
    .rv2m-kv > .rv2m-in { flex: 1 1 auto; width: auto !important; min-width: 0; }
    .rv2m-kv > span { flex: 0 0 auto; }
    .rv2m-in-name { flex: 1 1 0; width: 0 !important; min-width: 0; height: 36px; padding: 0 6px !important; margin-left: -6px !important; font-size: 19px !important; font-weight: 700; text-align: left; }
    .rv2m-pillsel { flex: 0 0 auto; width: auto !important; height: 24px !important; margin: 0 !important; padding: 0 22px 0 10px; border: none; border-radius: 9999px; font-size: 11px; font-weight: 600; line-height: 1; appearance: none; -webkit-appearance: none; background-repeat: no-repeat; background-position: right 7px center; background-size: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
    .rv2m-pillsel.ok { background-color: #dcfce7; color: #15803d; }
    .rv2m-pillsel.w { background-color: #fef3c7; color: #b45309; }
    .rv2m-pillsel.x { background-color: #fee2e2; color: #b91c1c; }
    .rv2m-call { flex: 0 0 auto; width: 40px; height: 36px; margin-left: 2px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #2563eb; background: #eff6ff; }
    .rv2m-nums { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; flex: 1 1 auto; min-width: 0; font-size: 15px; color: #111827; }
    .rv2m-in-n { width: 60px !important; flex: 0 0 auto; padding: 4px 6px !important; -moz-appearance: textfield; }
    .rv2m-in-n::-webkit-outer-spin-button, .rv2m-in-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .rv2m-in-price { width: 104px !important; }
    .rv2m-in-sel { width: auto !important; max-width: 62%; text-align-last: right; padding-right: 26px !important; background-repeat: no-repeat !important; background-position: right 8px center !important; background-size: 12px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important; }
    .rv2m-kv-top { align-items: flex-start; }
    .rv2m-kv-top > span { padding-top: 8px; }
    .rv2m-in-ta { text-align: left; font-size: 13px !important; font-weight: 400; color: #374151; line-height: 1.45; resize: none; padding: 7px 8px !important; }
    .rv2m-savebar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px 0; }
    .rv2m-savebar[hidden] { display: none; }
    .rv2m-savebar .rv2m-act { grid-column: auto; }
    .rv2m-act.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
    .rv2m-act.primary:disabled { opacity: .6; }
    .rv2m-sheet-name { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; color: #111827; }
    .rv2m-sheet-tour { font-size: 13px; color: #6b7280; margin-top: 2px; }
    .rv2m-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 20px; font-size: 14px; }
    .rv2m-kv > span { color: #6b7280; flex: 0 0 auto; }
    .rv2m-kv > b { color: #111827; font-weight: 500; text-align: right; }
    .rv2m-kv > a { color: #2563eb; text-decoration: none; font-weight: 500; }
    .rv2m-kv > em { color: #b45309; font-style: normal; text-align: right; }
    .rv2m-kv > i { color: #374151; font-style: normal; text-align: right; font-size: 13px; }
    /* 동작은 두 칸 격자 타일 (2026-09-15) — 한 화면에 다 들어오게. 넓은 줄(.wide)은 한 줄 통째로 */
    .rv2m-acts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 6px; padding: 12px 16px 4px; border-top: 1px solid #f3f4f6; }
    .rv2m-act { grid-column: span 3; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; font-weight: 600; color: #111827; text-align: center; cursor: pointer; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    .rv2m-act:active { background: #f3f4f6; }
    .rv2m-act.third { grid-column: span 2; padding: 0 6px; }
    .rv2m-act.wide { grid-column: 1 / -1; }
    .rv2m-sec { grid-column: 1 / -1; margin-top: 6px; font-size: 12px; font-weight: 600; color: #9ca3af; letter-spacing: .02em; }
    .rv2m-act.ok { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
    .rv2m-act.warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
    .rv2m-act.danger { border-color: #fecaca; background: #fff5f5; color: #b91c1c; }
    .rv2m-act.row { justify-content: flex-start; min-height: 44px; border: none; background: transparent; font-weight: 500; color: #374151; padding: 0 4px; }
    .rv2m-act.row input { width: 20px; height: 20px; margin: 0; accent-color: #e67e22; }
    .rv2m-act.row small { font-size: 12px; color: #9ca3af; font-weight: 400; }
    body.rv2m-noscroll { overflow: hidden; }
    /* 옛 모바일 카드 버튼 규칙이 새 행/시트에 닿지 않게 */
    .reservation-cards-mobile.rv2m-rows { display: flex; }
}

/* ── 취소 대기 안내 (2026-09-16) ──
   미달 회차를 바로 취소하지 않고 먼저 묻는다. 여러 건을 골라도 한 사람씩 문구를 보고
   보내므로, 보내기·건너뛰기·그만두기 세 갈래가 필요해 confirm 대신 작은 창을 쓴다. */
.rv2-pill.wait{background:#fef3c7;color:#b45309;border:1px solid #fde68a}
.rv2-cw-scrim{position:fixed;inset:0;z-index:10060;background:rgba(17,24,39,.42);display:flex;align-items:center;justify-content:center;padding:20px}
.rv2-cw-box{width:100%;max-width:460px;max-height:88vh;display:flex;flex-direction:column;background:#fff;border-radius:14px;box-shadow:0 18px 44px rgba(15,23,42,.24);overflow:hidden}
.rv2-cw-head{padding:13px 16px;border-bottom:1px solid #f1f3f5;font-size:15px;font-weight:800;letter-spacing:-.3px;color:#111827}
.rv2-cw-body{padding:13px 16px;overflow:auto}
.rv2-cw-who{font-size:15px;font-weight:800;letter-spacing:-.3px;display:flex;align-items:baseline;gap:8px}
.rv2-cw-who span{font-size:12.5px;font-weight:600;color:#2563eb;font-variant-numeric:tabular-nums}
.rv2-cw-sub{margin-top:3px;font-size:12.5px;color:#6b7280;line-height:1.6}
.rv2-cw-sub b.warn{color:#b45309}.rv2-cw-sub b.ok{color:#15803d}.rv2-cw-sub .dim{color:#9ca3af}
.rv2-cw-warn{margin-top:9px;padding:8px 10px;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;font-size:12px;color:#92400e;line-height:1.6}
.rv2-cw-prev{margin:10px 0 0;padding:11px 12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:9px;font:12px/1.65 -apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Segoe UI',sans-serif;color:#374151;white-space:pre-wrap;word-break:break-word}
.rv2-cw-hint{margin-top:8px;font-size:11.5px;color:#9ca3af;line-height:1.6}
.rv2-cw-foot{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#fafbfc;border-top:1px solid #f1f3f5}
.rv2-cw-btn{height:42px;padding:0 16px;border:1px solid #d1d5db;border-radius:9px;background:#fff;color:#374151;font-size:14px;font-weight:700;cursor:pointer}
.rv2-cw-btn.send{flex:1;background:#f59e0b;border-color:#f59e0b;color:#fff}
.rv2-cw-btn.ghost{border-color:transparent;color:#9ca3af}
.rv2-cw-cnt{margin-left:auto;font-size:11.5px;color:#9ca3af;white-space:nowrap}
@media(max-width:768px){.rv2-cw-box{max-width:none}.rv2-cw-foot{flex-wrap:wrap}.rv2-cw-btn{flex:1 1 auto}.rv2-cw-cnt{flex-basis:100%;text-align:center;margin:2px 0 0}}

/* ── 상태 배지를 눌러 바꾸기 (2026-09-16) ──
   손님 답(기다릴지·옮길지·취소할지)은 카톡·문자로 개별로 오니 자동으로 못 받는다.
   들으신 대로 여기에 찍어 두면 D-3 에 「기다림 3 · 옮김 1」이 화면에 남는다. */
.rv2-pill.click{cursor:pointer;border:1px solid transparent}
.rv2-pill.click:hover{border-color:#94a3b8;filter:brightness(.97)}
.rv2-pill.cwr{background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe}
.rv2-pill.cwr.ok{background:#dcfce7;color:#15803d;border-color:#bbf7d0}
.rv2-pill.cwr.mv{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}
.rv2-pill.cwr.x{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.rv2-stm{position:fixed;z-index:10055;width:264px;max-width:calc(100vw - 16px);box-sizing:border-box;padding:6px;background:#fff;border:1px solid #e2e8f0;border-radius:11px;box-shadow:0 12px 30px rgba(15,23,42,.18)}
.rv2-stm-head{padding:6px 8px 7px;font-size:12px;font-weight:800;color:#0f172a;border-bottom:1px solid #f1f5f9;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rv2-stm-row{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:8px;border:0;border-radius:8px;background:#fff;color:#334155;font-size:12.5px;font-weight:700;line-height:1.4;text-align:left;cursor:pointer}
.rv2-stm-row:hover{background:#f1f5f9}
.rv2-stm-row.on{background:#eff6ff;color:#1d4ed8}
.rv2-stm-row>span{word-break:keep-all}
.rv2-stm-row i{font-style:normal;font-size:11px;font-weight:500;color:#94a3b8;line-height:1.45;word-break:keep-all}
.rv2-stm-row.on i{color:#60a5fa}
.rv2-stm-sep{margin:6px 0 3px;padding:0 8px;font-size:10.5px;font-weight:800;color:#94a3b8;letter-spacing:.2px}
.rv2-stm-note{padding:8px;font-size:11.5px;color:#64748b;line-height:1.6}
.rv2-stm-reply{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:6px 8px 2px}
.rv2-stm-reply>span{flex:0 0 100%;font-size:10.5px;font-weight:700;color:#94a3b8;margin-bottom:2px}
.rv2-stm-rb{flex:1 1 auto;padding:6px 7px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#475569;font-size:11.5px;font-weight:700;cursor:pointer;white-space:nowrap}
.rv2-stm-rb:hover{border-color:#94a3b8}
.rv2-stm-rb.on{background:#2563eb;border-color:#2563eb;color:#fff}
.rv2-stm-foot{padding:7px 8px 4px;font-size:10.5px;color:#94a3b8;line-height:1.55}

/* ── 필터 세 칸 너비 맞춤 (2026-09-16) ──
   select 가 width:auto 라 「가장 긴 선택지」에 맞춰 넓어진다. 담당(이름) 125px,
   투어(긴 투어명) 206px, 시간 119px 로 제각각이어서 줄이 들쭉날쭉했다.
   세 칸을 한 너비로 못 박고 select 가 그 안을 채우게 한다 — 긴 투어명은
   닫힌 상태에서만 잘리고, 펼치면 전체가 보인다. */
.rv2-row2 .rv2-sel { flex: 0 0 auto; width: 150px; }
.rv2-row2 .rv2-sel select { flex: 1 1 auto; width: 100% !important; max-width: none !important; text-overflow: ellipsis; }
@media (max-width: 1100px) { .rv2-row2 .rv2-sel { width: 128px; } }

/* ── 모바일 머리 단추 높이 통일 + 필터 잘림 (2026-09-16) ──
   실측: 「할일」 28px, 「+ 새 예약」·「≡」 36px 으로 8px 어긋났고 윗선도 4px 달랐다.
   필터는 select 이 부모(36px)보다 큰 40.5px 로 삐져나오고 폭이 63px 뿐이라
   「전체」가 「전차」로 잘렸다. */
.rv2m-right { align-items: center; }
.rv2m-right .date-nav-btn,
.rv2m-right .memo-daily-btn { height: 36px !important; min-height: 36px !important; padding: 0 12px !important; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 10px !important; font-size: 12.5px !important; line-height: 1 !important; margin: 0 !important; }
.rv2m-sels .rv2-sel { padding: 0 6px 0 9px; gap: 3px; font-size: 11.5px; }
.rv2m-sels .rv2-sel select { height: 34px !important; min-height: 34px !important; margin: 0 !important; padding: 0 !important; font-size: 12.5px !important; flex: 1 1 auto; min-width: 0; width: 100%; text-overflow: ellipsis; }

/* ==========================================
   예약 접수 모바일 3판 (2026-10-27 사장님 시안 「이렇게 해서 실수없이 올려봐」) — 768px 이하
   머리 정리 · 요약 네 칸 + 문제 있을 때만 칩 · 시간 먼저 카드 · ⋯ 투어 메뉴 · 줄 시트 압축 · 폴드 2단.
   함수·id 는 예전 그대로이고 모양만 바꾼다. --rv2m-v 는 _ensureFreshCss 가 새 판인지 보는 표식.
   ========================================== */
@media (max-width: 768px) {
    .rv2m-head { --rv2m-v: 3; gap: 10px; padding: 6px 12px 0; }
    .rv2m-datebtn .d, .rv2m-datebtn .dow { font-size: 20px; }
    .rv2m-caret { flex: none; color: #6b7280; margin-left: -3px; }
    .rv2m-right { gap: 6px; }
    .rv2m-new { height: 40px !important; padding: 0 12px !important; font-size: 14px !important; font-weight: 700; background: #1b64da !important; }
    .rv2m-ib { width: 40px; height: 40px; }
    .rv2m-right .date-nav-btn, .rv2m-right .memo-daily-btn { height: 40px !important; min-height: 40px !important; font-size: 13.5px !important; }

    .rv2m-strip { gap: 6px; }
    .rv2m-day { width: 50px; padding: 0; height: 64px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
    .rv2m-day .w { font-size: 11px; font-weight: 500; color: #4e5968; white-space: nowrap; }
    .rv2m-day .n { font-size: 18px; font-weight: 700; margin-top: 0; }
    .rv2m-day .c { font-size: 11px; color: #4e5968; margin-top: 0; }
    .rv2m-day.sat .n { color: #1b64da; } .rv2m-day.sun .n { color: #d22e2e; }
    .rv2m-day.today { box-shadow: inset 0 0 0 2px #1b64da; }
    .rv2m-day.on { background: #1b64da; box-shadow: none; }
    .rv2m-day.on .w, .rv2m-day.on .c, .rv2m-day.on .n { color: #fff; }

    .rv2m-tabrow { display: flex; align-items: center; gap: 10px; width: 100%; }
    .rv2m-tabrow .rv2m-chips { flex: 1 1 auto; min-width: 0; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 !important; padding: 3px; background: #f2f4f6; border-radius: 10px; }
    .rv2m-tabrow .rv2m-chip { height: 36px !important; min-height: 36px !important; padding: 0 4px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: #4e5968 !important; font-size: 14px !important; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
    .rv2m-tabrow .rv2m-chip.active { background: #fff !important; color: #191f28 !important; font-weight: 700; box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }
    .rv2m-tabrow .rv2m-chip.active .rv2m-cnt { color: #1b64da; }
    .rv2m-tabrow .rv2m-only { flex: none; margin-left: 0; height: 44px; padding: 0; gap: 6px; font-size: 13px; font-weight: 500; color: #4e5968; }
    .rv2m-tabrow .rv2m-only.on { color: #333d4b; }
    .rv2m-tabrow .rv2m-only .knob { width: 40px; height: 24px; }
    .rv2m-tabrow .rv2m-only .knob::after { top: 3px; left: 3px; width: 18px; height: 18px; }
    .rv2m-tabrow .rv2m-only.on .knob { background: #1b64da; }
    .rv2m-tabrow .rv2m-only.on .knob::after { transform: translateX(16px); }

    .rv2m-time { align-items: flex-start; min-width: 0; height: 48px; padding: 0 12px; border-radius: 12px; }
    .rv2m-time .t { font-size: 14px; color: #191f28; }
    .rv2m-time .n { font-size: 12px; color: #4e5968; }
    .rv2m-time.bad { border-color: #f0b44c; background: #fffbf2; }
    .rv2m-time.bad .t { color: #191f28; }
    .rv2m-time.bad .n { color: #8a4b00; }

    /* 요약 — 네 칸 + 문제 있을 때만 칩 + 월 누계 */
    .rv2m-sum { margin-top: 8px; padding: 12px 14px; background: #fff; border: 1px solid #e5e8eb; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
    .rv2m-sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
    .rv2m-sum-grid > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
    .rv2m-sum-grid span { font-size: 12px; color: #4e5968; }
    .rv2m-sum-grid b { font-size: 17px; font-weight: 700; color: #191f28; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .rv2m-sum-grid > div:last-child b { font-size: 16px; }
    .rv2m-flags { display: flex; flex-wrap: wrap; gap: 6px; }
    .rv2m-flags:not(:has(> :not([data-state="ok"]):not([data-state="loading"]))) { display: none; }
    .rv2m-flag { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid #e5e8eb; border-radius: 15px; background: #f7f8fa; font: inherit; font-size: 13px; font-weight: 700; color: #333d4b; white-space: nowrap; box-sizing: border-box; }
    button.rv2m-flag { cursor: pointer; }
    .rv2m-flag.w { border-color: #fcd9a0; background: #fff6e5; color: #8a4b00; }
    .rv2m-flag.b { border-color: #bfd6fb; background: #eef5ff; color: #1b4fb0; }
    .rv2m-flag[data-state="ok"], .rv2m-flag[data-state="loading"] { display: none; }
    .rv2m-month-line { padding-top: 8px; border-top: 1px solid #f2f4f6; font-size: 13px; color: #4e5968; }
    .rv2m-month-line b { color: #191f28; font-weight: 700; }

    /* 카드 — 시간 먼저 · 머리 한 줄(담당·상태·인원) · 오른쪽 시트 복사·⋯ */
    .rv2m-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
    .tour-card.rv2m-card { padding: 0 !important; margin: 0 !important; background: #fff; border: 1px solid #e5e8eb; border-radius: 16px; box-shadow: none; overflow: hidden; }
    .rv2m-card-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px 10px 12px; cursor: pointer; }
    .rv2m-clock { flex: none; width: 58px; padding: 6px 0; border-radius: 10px; background: #f2f4f6; display: flex; flex-direction: column; align-items: center; }
    .rv2m-clock span { font-size: 11px; color: #4e5968; line-height: 1.3; }
    .rv2m-clock b { font-size: 19px; font-weight: 700; letter-spacing: -.5px; color: #191f28; line-height: 1.2; font-variant-numeric: tabular-nums; }
    .rv2m-card-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 1px; }
    .rv2m-card-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
    .rv2m-card-title h3 { margin: 0; min-width: 0; font-size: 16px; font-weight: 700; color: #191f28; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rv2m-idx { flex: none; width: 20px; height: 20px; border-radius: 10px; background: #e8ebef; font-size: 11px; font-weight: 700; color: #333d4b; display: inline-flex; align-items: center; justify-content: center; }
    .rv2m-fold { flex: none; width: auto !important; font-size: 10px !important; color: #8b95a1 !important; }
    .rv2m-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: default; }
    .rv2m-guide { display: inline-flex; margin: 0; }
    .rv2m-guide select, select.rv2m-status { height: 30px !important; min-height: 30px !important; width: auto !important; max-width: 150px; margin: 0 !important; padding: 0 24px 0 8px !important; border-radius: 8px !important; font-size: 13px !important; line-height: 28px; appearance: none; -webkit-appearance: none; background-repeat: no-repeat !important; background-position: right 7px center !important; background-size: 11px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e5968' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important; cursor: pointer; }
    .rv2m-guide select { border: 1px solid #e5e8eb !important; background-color: #fff !important; color: #333d4b !important; }
    .rv2m-guide.unset select { border: 1px dashed #c77700 !important; background-color: #fffbf2 !important; color: #8a4b00 !important; font-weight: 600; }
    select.rv2m-status { font-weight: 700 !important; }
    .rv2m-count { font-size: 13px; font-weight: 700; color: #1b64da; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .rv2m-count.under { color: #8a4b00; }
    .rv2m-count.full { color: #b42318; }
    .rv2m-carry { align-self: flex-start; height: 26px; padding: 0 9px; border: 1px solid #f0b44c; border-radius: 13px; background: #fff6e5; font-size: 12px; font-weight: 700; color: #8a4b00; cursor: pointer; }
    .rv2m-mini { height: 30px; padding: 0 10px; border: 1px solid #e5e8eb; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; color: #333d4b; cursor: pointer; }
    .rv2m-mini.ok { color: #11713d; border-color: #bbe5c9; }
    .rv2m-mini.danger { color: #b42318; border-color: #f3b4ae; }
    .rv2m-card-tools { flex: none; display: flex; }
    .rv2m-tool { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #4e5968; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .rv2m-tool:active { background: #f2f4f6; }
    .rv2m-card .rv2m-rows { border-top: 1px solid #f2f4f6; }
    .rv2m-card .rv2m-row { min-height: 0; padding: 11px 6px 11px 14px; border-bottom: 1px solid #f2f4f6; }
    .rv2m-card .rv2m-row:last-child { border-bottom: none; }
    .rv2m-card .rv2m-cxl { margin: 0; min-height: 44px; padding: 0 14px; border-radius: 0; border-top: 1px solid #f2f4f6; font-size: 13px; color: #4e5968; }
    .rv2m-card .empty-message { padding: 14px; font-size: 13px; color: #6b7280; }
    .rv2m-main { gap: 3px; }
    .rv2m-name { gap: 5px; font-size: 16px; font-weight: 700; color: #191f28; }
    .rv2m-pax { font-size: 13px; color: #4e5968; }
    .rv2m-sub { font-size: 13px; color: #4e5968; }
    .rv2m-tel { font-size: 12px; color: #6b7684; font-variant-numeric: tabular-nums; }
    .rv2m-amt .a { font-size: 15px; font-weight: 700; color: #191f28; }
    .rv2m-amt .b { font-size: 12px; color: #4e5968; }
    .rv2m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    /* 빈 날 — 짧은 안내 + 다음 투어일 + 이날 예약 추가 */
    .empty-state.rv2m-empty { margin-top: 12px; padding: 24px 16px 16px !important; background: #fff; border: 1px solid #e5e8eb; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
    .rv2m-empty p { margin: 0; }
    .rv2m-empty .t { margin-top: 4px; font-size: 18px; font-weight: 700; color: #191f28; }
    .rv2m-empty .s { font-size: 14px; color: #4e5968; }
    .rv2m-empty-acts { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
    .rv2m-next { height: 60px; padding: 0 12px 0 16px; border: 0; border-radius: 12px; background: #f2f4f6; font: inherit; color: #191f28; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
    .rv2m-next > span { flex: 1; display: flex; flex-direction: column; gap: 1px; }
    .rv2m-next i { font-style: normal; font-size: 12px; color: #4e5968; }
    .rv2m-next b { font-size: 15px; font-weight: 700; }
    .rv2m-next svg { color: #4e5968; }
    .rv2m-add { height: 48px; border: 1px solid #c9dcfb; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 700; color: #1b64da; cursor: pointer; }

    /* ⋯ 투어 메뉴 */
    .rv2m-tsheet { padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
    .rv2m-ts-head { display: flex; align-items: center; gap: 8px; padding: 4px 0 12px; }
    .rv2m-ts-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .rv2m-ts-head b { font-size: 18px; font-weight: 700; color: #191f28; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rv2m-ts-head span { font-size: 13px; color: #4e5968; }
    .rv2m-tsheet .rv2m-sheet-x, .rv2m-sheet3 .rv2m-sheet-x { flex: none; width: 40px; height: 40px; border-radius: 20px; background: #f2f4f6; color: #333d4b; }
    .rv2m-ts-sec { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #4e5968; }
    .rv2m-ts-sec small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; }
    .rv2m-ts-dt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
    .rv2m-ts-dt label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: #333d4b; }
    .rv2m-ts-dt input { box-sizing: border-box; width: 100% !important; height: 48px !important; min-height: 48px !important; margin: 0 !important; padding: 0 12px !important; border: 1px solid #d1d6db !important; border-radius: 12px !important; background: #fff; font-size: 16px !important; color: #191f28; }
    .rv2m-menu { display: flex; flex-direction: column; border: 1px solid #e5e8eb; border-radius: 14px; overflow: hidden; }
    .rv2m-menu-item { width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-top: 1px solid #f2f4f6; background: #fff; font: inherit; font-size: 16px; color: #191f28; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
    .rv2m-menu-item:first-child { border-top: 0; }
    .rv2m-menu-item:active { background: #f7f8fa; }
    .rv2m-menu-item svg { flex: none; color: #4e5968; }
    .rv2m-menu-item span { flex: 1; }
    .rv2m-menu-item small { font-size: 12px; color: #4e5968; }
    .rv2m-ts-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #f7f8fa; font-size: 13px; color: #333d4b; }

    /* 줄 시트 3판 — 참여자 맨 위, 칸 압축, 아이콘 4칸 격자, 정산보류 스위치 */
    .rv2m-sheet3 { padding: 0 16px max(14px, env(safe-area-inset-bottom)); }
    .rv2m-sh-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 10px; }
    .rv2m-sh-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; margin: 0; }
    .rv2m-sh-name { width: 100% !important; height: 36px !important; min-height: 36px !important; box-sizing: border-box; margin: 0 0 0 -6px !important; padding: 0 6px !important; border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important; font: inherit; font-size: 20px !important; font-weight: 700 !important; color: #191f28; }
    .rv2m-sh-name:focus { outline: none; background: #f7f8fa !important; border-color: #93c5fd !important; }
    .rv2m-sh-tour { font-size: 13px; color: #4e5968; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rv2m-sheet3 .rv2m-pillsel { height: 32px !important; padding: 0 24px 0 10px; font-size: 13px; }
    .rv2m-sh-body { display: flex; flex-direction: column; gap: 12px; }
    .rv2m-sh-pd { display: flex; flex-direction: column; gap: 6px; }
    .rv2m-sh-pdhead { display: flex; align-items: center; gap: 8px; }
    .rv2m-sh-pdhead label { flex: 1; margin: 0; font-size: 13px; font-weight: 700; color: #333d4b; }
    .rv2m-sh-pdhead label i { font-style: normal; font-weight: 400; color: #4e5968; }
    .rv2m-ask { height: 32px; padding: 0 10px; border: 1px solid #bfd6fb; border-radius: 16px; background: #eef5ff; font: inherit; font-size: 13px; font-weight: 700; color: #1b4fb0; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; }
    .rv2m-sh-ta { box-sizing: border-box; width: 100% !important; min-height: 0 !important; margin: 0 !important; padding: 8px 10px !important; border: 1px solid #c9dcfb !important; border-radius: 10px !important; background: #fff !important; font: inherit; font-size: 15px !important; line-height: 1.45; color: #191f28; resize: vertical; }
    .rv2m-sh-ta:focus { outline: none; border-color: #1b64da !important; }
    .rv2m-sh-fields { display: grid; grid-template-columns: 1.25fr .75fr 1fr; gap: 6px; }
    .rv2m-f { min-width: 0; white-space: nowrap; height: 44px; box-sizing: border-box; margin: 0; padding: 0 8px 0 10px; border-radius: 10px; background: #f7f8fa; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4e5968; }
    .rv2m-f.wide { grid-column: 1 / -1; padding-right: 2px; }
    .rv2m-f input, .rv2m-f select { flex: 1 1 auto; min-width: 0; width: 100% !important; height: 40px !important; min-height: 40px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; font: inherit; font-size: 15px !important; color: #191f28; -moz-appearance: textfield; }
    .rv2m-f input::-webkit-outer-spin-button, .rv2m-f input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .rv2m-f select { font-size: 14px !important; }
    .rv2m-f input:focus, .rv2m-f select:focus { outline: none; }
    .rv2m-f:focus-within { box-shadow: inset 0 0 0 1px #93c5fd; }
    .rv2m-f .rv2m-call { width: 40px; height: 40px; margin: 0; background: transparent; }
    .rv2m-sh-memo { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.45; color: #8a4b00; }
    .rv2m-sh-memo svg { flex: none; margin-top: 3px; }
    .rv2m-sh-pending { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 12px; border-radius: 10px; background: #fdecec; }
    .rv2m-sh-pending span { flex: 1; font-size: 13px; font-weight: 500; color: #8f1d12; }
    .rv2m-sh-pending button { height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: #b42318; font: inherit; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; }
    .rv2m-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .rv2m-tile { position: relative; height: 60px; margin: 0; padding: 0 2px; border: 0; border-radius: 10px; background: #f7f8fa; font: inherit; font-size: 12px; font-weight: 500; color: #333d4b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .rv2m-tile svg { color: #4e5968; }
    .rv2m-tile:active { background: #eef0f3; }
    .rv2m-tile.ok, .rv2m-tile.ok svg { color: #11713d; }
    .rv2m-tile.danger, .rv2m-tile.danger svg { color: #b42318; }
    .rv2m-hold input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
    .rv2m-hold .sw { position: relative; width: 34px; height: 20px; border-radius: 10px; background: #b0b8c1; transition: background .15s; }
    .rv2m-hold .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 8px; background: #fff; transition: transform .15s; }
    .rv2m-hold.on { background: #fff6e5; color: #8a4b00; }
    .rv2m-hold.on .sw { background: #e08a00; }
    .rv2m-hold.on .sw::after { transform: translateX(14px); }
    .rv2m-hold input:focus-visible + .sw { outline: 2px solid #1b64da; outline-offset: 2px; }
    .rv2m-sh-foot { display: flex; align-items: center; gap: 8px; min-height: 48px; }
    .rv2m-cancel { height: 48px; padding: 0 8px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: #b42318; cursor: pointer; }
    .rv2m-sheet3 .rv2m-savebar { margin-left: auto; display: flex; gap: 8px; padding: 0; }
    .rv2m-sheet3 .rv2m-savebar[hidden] { display: none; }
    .rv2m-sheet3 .rv2m-savebar .rv2m-act { width: auto; min-height: 48px; padding: 0 16px; font-size: 15px; }
    .rv2m-sheet3 .rv2m-savebar .rv2m-act.primary { padding: 0 26px; background: #1b64da; border-color: #1b64da; }

    /* 투어 확정 메시지 창 — 휴대폰은 아래에서 올라오는 창, 내용 높이만큼 (firebase-automation.js) */
    #tourConfirmationMessageModal { align-items: flex-end !important; }
    #tourConfirmationMessageModal .modal-content { width: 100% !important; max-width: none !important; max-height: 92vh !important; margin: 0 !important; padding: 16px 16px max(16px, env(safe-area-inset-bottom)) !important; border-radius: 20px 20px 0 0 !important; overflow-y: auto; box-sizing: border-box; }
    #tourConfirmationMessageModal h3 { margin-bottom: 12px !important; font-size: 18px !important; }
    #tourConfirmationMessageModal textarea { min-height: 0 !important; height: 240px; }
    /* 단추: 「확정하고 N명에게 보내기」 한 줄 통째, 그 아래 「취소」 · 「보내지 않고 확정만」 작게 */
    #tourConfirmationMessageModal .modal-content > div:last-child { flex-wrap: wrap; gap: 8px !important; }
    #tourConfirmModalSendBtn { order: -1; flex: 1 1 100%; height: 50px; font-size: 16px !important; font-weight: 700 !important; }
    #tourConfirmModalCloseBtn, #tourConfirmModalSilentBtn { flex: 1 1 0; height: 44px; padding: 0 10px !important; font-size: 13px !important; font-weight: 500 !important; white-space: nowrap; }
    #tourConfirmModalSilentBtn { color: #4e5968 !important; border-color: #d1d6db !important; }
}

/* 에이전트 동그라미가 마지막 줄을 가리지 않게 목록 아래 여백 */
@media (max-width: 768px) {
    .rv2m-cards, .empty-state.rv2m-empty { margin-bottom: 84px; }
}

/* 폴드처럼 600px 넘는 모바일 화면 — 카드 두 줄 */
@media (min-width: 600px) and (max-width: 768px) {
    .rv2m-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
