    :root {
      --primary: #1a3a6b;
      --primary-light: #2d6a9f;
      --accent: #c8a951;
      --accent-light: #e8c97a;
      --bg: #f4f6fb;
      --white: #ffffff;
      --text: #1a1a1a;
      --text-light: #666;
      --error: #c0392b;
      --success: #27ae60;
      --border: #e8eaef;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    html { height: 100%; }
    body {
      font-family: 'Noto Sans KR', sans-serif;
      background: var(--bg);
      min-height: 100vh;
      height: 100%;
      color: var(--text);
      display: flex;
      flex-direction: column;
    }

    /* ── 헤더 ── */
    .header {
      background: white;
      border-bottom: 1px solid var(--border);
      padding: 0 32px;
      height: 64px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky; top: 0; z-index: 100;
      box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    }
    .header-left {
      display: flex; align-items: center; gap: 14px;
    }
    .header-emblem {
      width: 40px; height: 40px;
      border-radius: 50%;
      border: 2px solid var(--primary);
      overflow: hidden;
      display: flex; align-items: center; justify-content: center;
    }
    .header-emblem img { width: 40px; height: 40px; object-fit: cover; }
    .header-title {
      display: flex; flex-direction: column;
    }
    .header-sub { font-size: 10px; color: var(--text-light); font-weight: 500; }
    .header-name { font-size: 18px; font-weight: 900; color: var(--primary); line-height: 1.1; }
    .header-badge {
      font-size: 11px; font-weight: 700;
      background: var(--primary); color: white;
      padding: 4px 12px; border-radius: 20px;
    }
    .header-right { display: flex; align-items: center; gap: 10px; }
    .admin-btn {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 12px; font-weight: 600; font-family: inherit;
      padding: 7px 16px; border-radius: 20px;
      border: 1.5px solid var(--border);
      background: white; color: var(--text-light);
      text-decoration: none; cursor: pointer;
      transition: all 0.18s; line-height: 1; white-space: nowrap;
    }
    .admin-btn:hover { border-color: #aaa; color: #444; }
    #adminBtn, #cvAdminBtn {
      background: var(--primary); color: white; border-color: var(--primary);
    }
    #adminBtn:hover, #cvAdminBtn:hover {
      background: #0f2548; border-color: #0f2548; color: white;
    }
    #logoutBtn, #cvLogoutBtn {
      border-color: #ddd; color: #888;
    }
    #logoutBtn:hover, #cvLogoutBtn:hover {
      border-color: #c0392b; color: #c0392b; background: #fff5f5;
    }

    /* ── 메인 ── */
    .main {
      width: 100%;
      max-width: 100%;
      margin: 0;
      padding: 20px 20px 16px;
      box-sizing: border-box;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    /* ── 벤토 그리드 ── */
    .bento {
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr);
      grid-template-rows: 1fr 1fr;
      gap: clamp(10px, 1.2vw, 20px);
      flex: 1;
    }

    /* 공통 카드 */
    .bento-card {
      border-radius: 20px;
      overflow: hidden;
      position: relative;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .bento-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 32px rgba(0,0,0,0.13);
    }

    /* 차량신청 카드 */
    .card-vehicle {
      background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
      padding: 20px;
      display: flex; flex-direction: column;
      justify-content: space-between;
      position: relative; overflow: hidden;
      min-height: 200px;
      transition: transform 0.2s, box-shadow 0.2s;
      box-shadow: 0 6px 28px rgba(26,58,107,0.28);
      cursor: default;
    }
    .card-vehicle:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 40px rgba(26,58,107,0.35);
    }
    /* 차량카드 헤더 */
    .vcard-hd { margin-bottom: 10px; }
    .vcard-refresh-btn {
      background: rgba(255,255,255,0.15);
      border: none; color: white; font-size: 16px;
      width: 28px; height: 28px; border-radius: 8px;
      cursor: pointer; flex-shrink: 0; line-height: 1;
      transition: background 0.15s;
    }
    .vcard-refresh-btn:hover { background: rgba(255,255,255,0.28); }
    .vcard-refresh-btn.spinning { animation: vcard-spin 0.7s linear infinite; }
    @keyframes vcard-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
    .vcard-btn {
      background: rgba(255,255,255,0.15);
      color: white; font-size: 12px; font-weight: 700;
      padding: 5px 10px; border-radius: 8px;
      text-decoration: none; white-space: nowrap;
      transition: background 0.15s;
    }
    .vcard-btn:hover { background: rgba(255,255,255,0.28); }
    .vcard-btn-full {
      display: block; text-align: center;
      margin-top: 8px; padding: 8px;
    }
    /* 차량 6칸 그리드 */
    .vehicle-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      flex: 1;
      align-content: center;
    }
    .vg-card {
      background: rgba(0,0,0,0.22);
      border-radius: 10px;
      padding: 12px 8px 10px;
      display: flex; flex-direction: column;
      align-items: center; justify-content: flex-end; gap: 5px;
      text-decoration: none; cursor: pointer;
      transition: background 0.15s;
      overflow: hidden;
    }
    .vg-card:hover { background: rgba(0,0,0,0.35); }
    .vg-car { width: 88%; max-width: 80px; display: block; }
    .vg-name { font-size: 12px; font-weight: 700; color: white; text-align: center; line-height: 1.2; }
    .vg-plate { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 500; }
    .vg-status {
      display: flex; align-items: center; gap: 4px;
      font-size: 11px; color: rgba(255,255,255,0.82); font-weight: 600;
    }
    .vg-dot {
      width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    }
    .vg-dot.avail { background: #44ee88; box-shadow: 0 0 5px #44ee88; }
    .vg-dot.busy  { background: #ee4444; box-shadow: 0 0 5px #ee4444; }
    .vg-txt-busy  { color: #ee4444; font-weight: 700; }
    /* ── 실시간 차량 현황 배너 ── */
    .realtime-banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, rgba(0,180,100,0.10) 0%, rgba(0,180,100,0.03) 100%); border: 1px solid rgba(0,230,118,0.18); border-radius: 10px; padding: 10px 16px; margin-bottom: 14px; position: relative; overflow: hidden; }
    .realtime-banner::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #00e676; box-shadow: 0 0 10px #00e676; }
    .rt-wave-icon { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
    .rt-wave-bar { width: 3px; border-radius: 2px; background: #00e676; animation: rtWave 0.8s ease-in-out infinite; }
    .rt-wave-bar:nth-child(1) { height: 6px;  animation-delay: 0s; }
    .rt-wave-bar:nth-child(2) { height: 12px; animation-delay: 0.15s; }
    .rt-wave-bar:nth-child(3) { height: 18px; animation-delay: 0.3s; }
    .rt-wave-bar:nth-child(4) { height: 12px; animation-delay: 0.45s; }
    .rt-wave-bar:nth-child(5) { height: 6px;  animation-delay: 0.6s; }
    @keyframes rtWave { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
    .rt-text-wrap { flex: 1; }
    .rt-title { font-size: 12px; font-weight: 700; color: #00e676; letter-spacing: 0.5px; }
    .rt-sub { font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 1px; }
    /* ── 사용중 차량 X 오버레이 ── */
    .vg-card { position: relative; }
    .vg-card.in-use::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(20, 20, 40, 0.45); pointer-events: none; z-index: 1; }
    .vg-card.in-use::before { content: '✕'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); font-size: 52px; font-weight: 900; color: rgba(255, 60, 60, 0.85); text-shadow: 0 0 20px rgba(255,60,60,0.6), 0 2px 4px rgba(0,0,0,0.5); pointer-events: none; z-index: 2; line-height: 1; }
    .pixel-art {
      position: absolute;
      right: 16px; bottom: 16px;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      opacity: 0.55;
      pointer-events: none;
    }

    /* 장소신청 카드 */
    .card-facility {
      background: #2d5016;
      border-radius: 20px;
      padding: 22px 22px 0;
      display: flex; flex-direction: column;
      min-height: 200px;
      text-decoration: none;
      overflow: hidden;
      box-shadow: 0 6px 28px rgba(45,80,22,0.4);
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .card-facility:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 40px rgba(45,80,22,0.5);
    }

    /* ── 신청서 PC 모달 ── */
    .form-modal-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(10,20,40,0.72);
      z-index: 9000;
      align-items: center; justify-content: center;
      backdrop-filter: blur(6px);
    }
    .form-modal-overlay.open { display: flex; }
    .form-modal-box {
      position: relative;
      width: min(96vw, 1100px);
      height: 94vh;
      background: white;
      border-radius: 22px;
      overflow: hidden;
      box-shadow: 0 24px 80px rgba(0,0,0,0.45);
      display: flex; flex-direction: column;
    }
    .form-modal-close {
      position: absolute; top: 14px; right: 14px; z-index: 10;
      width: 40px; height: 40px;
      background: rgba(0,0,0,0.18); color: white; border: none;
      border-radius: 50%; font-size: 18px; cursor: pointer;
      transition: background 0.2s; line-height: 1;
    }
    .form-modal-close:hover { background: rgba(220,50,50,0.8); }
    #formModalIframe { flex: 1; width: 100%; border: none; }

    /* 클릭 가능한 신청 카드 */
    .apply-card-clickable {
      cursor: pointer;
      transition: transform 0.18s, box-shadow 0.18s !important;
    }
    .apply-card-clickable:hover {
      transform: translateY(-5px) !important;
    }
    .apply-btn-trigger {
      background: rgba(255,255,255,0.18);
      color: white; font-size: 13px; font-weight: 700;
      padding: 9px 14px; border-radius: 10px; border: none;
      width: 100%; cursor: pointer;
      flex-shrink: 0;
      transition: background 0.15s;
      font-family: 'Noto Sans KR', sans-serif;
    }
    .apply-btn-trigger:hover { background: rgba(255,255,255,0.32); }

    /* 모바일: 페이지 이동 (모달 사용 안 함) */
    @media (max-width: 640px) {
      .form-modal-overlay { display: none !important; }
    }

    /* 중간 열 래퍼: 두 카드를 세로로 50:50 배치 */
    .bento-mid-col {
      display: flex;
      flex-direction: column;
      gap: clamp(10px, 1.2vw, 20px);
      min-height: 0;
    }
    .bento-mid-col .bento-card {
      flex: 1;
      min-height: 0;
    }

    /* 차량신청 바로가기 카드 (중간 상단) */
    .card-vehicle-apply {
      background: linear-gradient(145deg, #1a1f4e 0%, #2d3580 100%);
      border-radius: 20px;
      padding: 22px 22px 0;
      display: flex; flex-direction: column;
      min-height: 200px;
      overflow: hidden;
      box-shadow: 0 6px 28px rgba(26,58,107,0.35);
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .card-vehicle-apply:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 40px rgba(26,31,78,0.45);
    }
    .apply-desc {
      font-size: 12px; color: rgba(255,255,255,0.65);
      margin-bottom: 10px; line-height: 1.5;
    }
    .apply-vehicle-list {
      display: flex; flex-wrap: wrap; gap: 6px;
      flex: 1; align-content: flex-start;
    }
    .apply-veh-btn {
      background: rgba(255,255,255,0.12);
      color: white; font-size: 11px; font-weight: 600;
      padding: 5px 10px; border-radius: 8px;
      text-decoration: none; white-space: nowrap;
      transition: background 0.15s;
    }
    .apply-veh-btn:hover { background: rgba(255,255,255,0.26); }
    .apply-veh-btn--wide { flex: 1 0 100%; text-align: center; }

    /* 중간 열 카드 이미지 영역 */
    .apply-icon-wrap {
      flex: 1;
      min-height: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 8px 0;
    }
    .apply-car-svg {
      width: 85%;
      max-width: 220px;
      max-height: 100%;
      display: block;
      drop-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .apply-church-svg {
      width: 55%;
      max-width: 160px;
      display: block;
    }

    /* vg-card 커서 override for non-link divs */
    div.vg-card { cursor: default; }

    .card-tag {
      font-size: 10px; font-weight: 700;
      color: rgba(255,255,255,0.6);
      letter-spacing: 1px;
      margin-bottom: 4px;
      display: inline-block; width: fit-content;
    }
    .card-main-title {
      font-size: 20px; font-weight: 900;
      color: white; line-height: 1.2;
      margin-bottom: 4px;
    }
    .card-main-desc {
      font-size: 11px; color: rgba(255,255,255,0.45);
      line-height: 1.5;
    }
    .card-illust {
      margin-top: auto;
      display: flex;
      justify-content: center;
      overflow: hidden;
    }
    .card-arrow-btn {
      margin: 0 -22px;
      padding: 11px 22px;
      background: rgba(255,255,255,0.1);
      display: flex; align-items: center; justify-content: space-between;
      color: white; font-size: 13px; font-weight: 700;
      border-top: 1px solid rgba(255,255,255,0.08);
      transition: background 0.2s;
    }
    .card-vehicle-apply:hover .card-arrow-btn,
    .card-facility:hover .card-arrow-btn {
      background: rgba(255,255,255,0.18);
    }

    /* 오늘 예약 패널 */
    .today-panel {
      background: #f7f9fd; border-radius: 12px;
      border: 1.5px solid #e0e8f5;
      margin-bottom: 14px; overflow: hidden;
    }
    .today-panel-header {
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
      padding: 9px 14px;
      display: flex; align-items: center; justify-content: space-between;
    }
    .today-panel-title { font-size: 14px; font-weight: 800; color: white; display: flex; align-items: center; gap: 8px; }
    .live-badge { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
    .live-badge-bar { width: 2.5px; border-radius: 2px; background: #00e676; animation: rtWave 0.8s ease-in-out infinite; }
    .live-badge-bar:nth-child(1) { height: 5px;  animation-delay: 0s; }
    .live-badge-bar:nth-child(2) { height: 10px; animation-delay: 0.15s; }
    .live-badge-bar:nth-child(3) { height: 14px; animation-delay: 0.3s; }
    .live-badge-bar:nth-child(4) { height: 10px; animation-delay: 0.45s; }
    .live-badge-bar:nth-child(5) { height: 5px;  animation-delay: 0.6s; }
    .today-panel-date { font-size: 13px; color: rgba(255,255,255,0.8); }
    .today-panel-body {
      padding: 10px;
      max-height: 200px; overflow-y: auto;
      display: flex; flex-wrap: wrap; gap: 8px;
    }
    .today-empty { text-align:center; color:var(--text-light); font-size:12px; padding:10px 0; width:100%; }
    .today-item {
      display: flex; flex-direction: column; gap: 4px;
      padding: 8px 10px; border-radius: 10px;
      background: white; border: 1px solid #eef1f8;
      font-size: 12px; cursor: default;
      flex: 1 1 calc(50% - 4px); min-width: 120px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .today-item.vehicle { border-left: 3px solid #4a7fd4; }
    .today-item.facility { border-left: 3px solid var(--accent); }
    .today-item-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
    .today-item-subject { font-size: 13px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .today-item-badge {
      font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
    }
    .today-item-badge.confirmed { background: #dbeafe; color: #1e40af; }
    .today-item-badge.pending { background: #fff8e1; color: #f57f17; }
    .today-item-badge.cancelled { background: #fce4ec; color: #c62828; }
    .today-item-name { font-size: 17px; font-weight: 800; color: var(--text); }
    .today-item-time { font-size: 11px; color: var(--primary); font-weight: 600; }

    /* 캘린더 카드 */
    .card-calendar:hover {
      transform: none;
      box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    }
    .card-calendar {
      background: white;
      padding: 24px;
      display: flex;
      flex-direction: column;
      grid-column: 3;
      grid-row: 1 / 3;
      box-shadow: 0 2px 16px rgba(0,0,0,0.07);
      border: 1px solid var(--border);
    }
    .cal-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 14px;
      flex-wrap: wrap; gap: 8px;
    }
    .cal-nav { display: flex; align-items: center; gap: 10px; }
    .cal-nav-btn {
      width: 30px; height: 30px;
      border: 1.5px solid var(--border); background: white;
      border-radius: 8px; font-size: 12px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.2s; color: var(--text-light);
    }
    .cal-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
    .cal-month-label { font-size: 20px; font-weight: 800; color: var(--primary); }
    .cal-refresh-btn {
      font-size: 12px; font-weight: 700; color: var(--primary);
      background: #f0f4fb; border: none; padding: 6px 12px;
      border-radius: 8px; cursor: pointer; transition: all 0.2s;
    }
    .cal-refresh-btn:hover { background: #e0e8f8; }
    .cal-tab-bar {
      display: flex; gap: 6px; margin-bottom: 14px;
    }
    .cal-tab {
      padding: 5px 14px; border-radius: 20px;
      font-size: 14px; font-weight: 700;
      border: 1.5px solid var(--border); background: white;
      cursor: pointer; color: var(--text-light);
      transition: all 0.2s;
    }
    .cal-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
    .cal-legend {
      display: flex; gap: 12px; margin-bottom: 12px;
    }
    .cal-legend-item {
      display: flex; align-items: center; gap: 5px;
      font-size: 13px; color: var(--text-light);
    }
    .cal-legend-dot {
      width: 10px; height: 10px; border-radius: 3px;
    }
    .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; flex: 1; align-content: start; }
    .cal-day-hd {
      text-align: center; font-size: 14px; font-weight: 700;
      color: var(--text-light); padding: 6px 0;
    }
    .cal-day-hd:first-child { color: var(--error); }
    .cal-day-hd:last-child { color: var(--success); }
    .cal-cell {
      min-height: 70px; border: 1px solid #f0f0f0;
      border-radius: 8px; padding: 6px;
      transition: background 0.15s;
    }
    .cal-cell.other-month { opacity: 0.3; }
    .cal-cell.today { border-color: #1e40af; background: #eff6ff; }
    .cal-date {
      font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px;
      display: inline-flex; align-items: center; justify-content: center;
      width: 24px; height: 24px; border-radius: 50%;
    }
    .cal-cell.today .cal-date { background: #1e40af; color: #ffffff; }
    .cal-cell.sunday .cal-date { color: #ef4444; }
    .cal-cell.saturday .cal-date { color: #3b82f6; }
    .cal-cell.today.sunday .cal-date,
    .cal-cell.today.saturday .cal-date { color: #ffffff; }
    .cal-event {
      font-size: 12px; font-weight: 600;
      padding: 2px 7px; border-radius: 4px;
      margin-bottom: 2px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      color: #ffffff;
    }
    .cal-event.vehicle  { background: #8b7a35; }
    .cal-event.facility { background: #1d6b52; }
    .cal-event.confirmed { background: #1e3a6e; }
    .cal-loading {
      grid-column: 1/-1; text-align: center;
      padding: 40px 0; color: var(--text-light); font-size: 14px;
    }
    .cal-cell:not(.other-month) { cursor: pointer; }
    .cal-cell:not(.other-month):hover { background: #f0f4fb; }
    .cal-cell.selected { background: #e8f0fb !important; border-color: var(--primary) !important; }

    /* ── 타임라인 패널 ── */
    .timeline-panel {
      background: white;
      border-radius: 20px;
      border: 1px solid var(--border);
      box-shadow: 0 4px 24px rgba(0,0,0,0.09);
      padding: 24px;
      margin-top: clamp(10px, 1.2vw, 20px);
      animation: tlSlideDown 0.25s ease;
    }
    @keyframes tlSlideDown {
      from { opacity: 0; transform: translateY(-10px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .timeline-hd {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 16px;
    }
    .timeline-title { font-size: 15px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
    .timeline-close {
      width: 28px; height: 28px;
      border: 1.5px solid var(--border); background: white;
      border-radius: 50%; cursor: pointer; font-size: 13px;
      color: var(--text-light);
      display: flex; align-items: center; justify-content: center;
      transition: all 0.2s;
    }
    .timeline-close:hover { border-color: var(--error); color: var(--error); }
    /* 타임라인 CSS Grid — 자원명 컬럼 자동 너비, 트랙 끝점 동일 */
    .tl-grid-container {
      display: grid;
      grid-template-columns: max-content 1fr;
      align-items: center;
      row-gap: 4px;
    }
    .timeline-row { display: contents; }
    .timeline-axis {
      position: relative; height: 22px;
      border-bottom: 1px solid #e2e8f0; margin-bottom: 2px;
    }
    .tl-axis-label { /* 빈 셀 — max-content 컬럼 너비 확보 */ }
    .tl-ax-lbl {
      position: absolute; font-size: 11px; font-weight: 600; color: #94a3b8;
      transform: translateX(-50%); white-space: nowrap;
    }
    .tl-resource {
      font-size: 13px; font-weight: 600; color: #334155;
      padding: 5px 14px 5px 0;
      white-space: nowrap;
      border-bottom: 1px solid #f1f5f9;
    }
    .tl-track {
      position: relative; height: 34px;
      background: #f8fafc; border-radius: 8px;
      border: 1px solid #f1f5f9; overflow: hidden;
      border-bottom-color: #f1f5f9;
    }
    .tl-gridline {
      position: absolute; top: 0; bottom: 0; width: 1px;
      background: #e2e8f0; pointer-events: none;
    }
    .tl-now {
      position: absolute; top: 0; bottom: 0;
      width: 2px; background: #ef4444;
      z-index: 5; pointer-events: none;
    }
    .tl-now::before {
      content: ''; position: absolute;
      top: -3px; left: -4px;
      width: 10px; height: 10px;
      background: #ef4444; border-radius: 50%;
    }
    .tl-now::after {
      content: '현재';
      position: absolute;
      top: -16px; left: 50%;
      transform: translateX(-50%);
      font-size: 10px; font-weight: 700;
      color: #ef4444; white-space: nowrap;
      pointer-events: none; line-height: 1;
    }
    .tl-block {
      position: absolute; top: 3px; height: calc(100% - 6px);
      border-radius: 5px;
      display: flex; align-items: center; padding: 0 8px;
      font-size: 13px; font-weight: 600; color: #ffffff;
      overflow: hidden; white-space: nowrap;
      cursor: default; min-width: 8px;
    }
    .tl-block.vehicle  { background: #8b7a35; }
    .tl-block.facility { background: #1d6b52; }
    .tl-block.confirmed { background: #1e3a6e; }
    .tl-dot {
      width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-right: 4px;
      background: rgba(255,255,255,0.6);
    }
    .tl-empty { text-align: center; color: var(--text-light); padding: 28px 0; font-size: 14px; }
    .tl-legend { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
    .tl-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-light); }
    .tl-legend-box { width: 12px; height: 12px; border-radius: 3px; }

    /* 마감일 카드 */
    .card-deadline {
      background: white;
      padding: 24px 28px;
      display: flex;
      flex-direction: column;
      box-shadow: 0 2px 16px rgba(0,0,0,0.07);
      border: 1px solid var(--border);
    }
    .card-section-title {
      font-size: 13px; font-weight: 800; color: var(--primary);
      margin-bottom: 14px;
      display: flex; align-items: center; gap: 6px;
    }
    .deadline-list { display: flex; flex-direction: column; gap: 10px; }
    .deadline-item {
      display: flex; align-items: center;
      justify-content: space-between;
      padding: 11px 14px;
      background: #f9f9fb;
      border-radius: 10px;
      border: 1px solid var(--border);
    }
    .deadline-name { font-size: 13px; font-weight: 600; color: var(--text); }
    .deadline-right { display: flex; align-items: center; gap: 8px; }
    .deadline-date { font-size: 13px; font-weight: 700; color: var(--primary); }
    .deadline-badge {
      font-size: 10px; font-weight: 700;
      padding: 2px 8px; border-radius: 10px;
      background: #ffeaea; color: var(--error);
    }

    /* 공지사항 카드 */
    .card-notice {
      background: white;
      padding: 24px 28px;
      display: flex;
      flex-direction: column;
      box-shadow: 0 2px 16px rgba(0,0,0,0.07);
      border: 1px solid var(--border);
    }
    .notice-list { display: flex; flex-direction: column; flex: 1; overflow-y: auto; }
    .notice-item {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 11px 0;
      border-bottom: 1px solid #f5f5f5;
    }
    .notice-item:last-child { border-bottom: none; }
    .notice-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: var(--accent); flex-shrink: 0; margin-top: 5px;
    }
    .notice-dot.new { background: var(--error); }
    .notice-content { flex: 1; }
    .notice-text { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.5; margin-bottom: 3px; }
    .notice-date { font-size: 11px; color: var(--text-light); }
    .new-badge {
      font-size: 10px; font-weight: 700;
      background: var(--error); color: white;
      padding: 2px 6px; border-radius: 4px; flex-shrink: 0; margin-top: 2px;
    }

    /* 장소 파이차트 카드 */
    .card-chart {
      background: white; padding: 22px 20px;
      display: flex; flex-direction: column;
      border: 1px solid var(--border);
    }
    .chart-wrap {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 12px;
    }
    .chart-canvas-wrap { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
    .chart-center-label {
      position: absolute; top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      text-align: center; pointer-events: none;
    }
    .chart-center-total { font-size: 20px; font-weight: 900; color: var(--primary); }
    .chart-center-sub { font-size: 10px; color: var(--text-light); font-weight: 600; }
    .chart-legend {
      width: 100%; display: flex; flex-direction: column; gap: 5px;
    }
    .chart-legend-item {
      display: flex; align-items: center; gap: 7px;
      font-size: 11px; color: var(--text);
    }
    .chart-legend-dot {
      width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
    }
    .chart-legend-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chart-legend-count { font-weight: 700; color: var(--primary); }
    .chart-empty { text-align:center; color:var(--text-light); font-size:12px; padding:20px 0; }

    /* 하단 3열 (마감일 + 공지 + 말씀) */
    .bento-bottom {
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr);
      gap: clamp(10px, 1.2vw, 20px);
      grid-column: 1 / 3;
      align-self: stretch;
    }

    /* 성경말씀 카드 */
    .card-verse {
      background: linear-gradient(135deg, #4a1a6b 0%, #7b3fa0 100%); /* JS로 덮어씀 */
      padding: 28px 32px;
      box-shadow: 0 6px 24px rgba(26,58,107,0.28);
      border: none;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .card-verse::before {
      content: "✝";
      position: absolute;
      right: 16px; top: 50%;
      transform: translateY(-50%);
      font-size: 90px;
      opacity: 0.07;
      color: white;
      pointer-events: none;
    }
    .card-verse .verse-label {
      font-size: 11px; font-weight: 700;
      color: rgba(255,255,255,0.55);
      letter-spacing: 1.5px;
      text-transform: uppercase;
      margin-bottom: 10px;
    }
    .card-verse .verse-quote {
      font-size: 32px;
      color: rgba(200,169,81,0.55);
      line-height: 0.8;
      font-family: Georgia, serif;
      margin-bottom: 6px;
    }
    .card-verse .verse-text {
      font-size: clamp(14px, 1.1vw, 18px); font-weight: 500;
      color: white; line-height: 1.8;
      flex: 1;
      word-break: keep-all;
    }
    .card-verse .verse-ref {
      font-size: 12px; font-weight: 700;
      color: #e8c97a;
      border-top: 1px solid rgba(255,255,255,0.15);
      padding-top: 12px;
      margin-top: 14px;
    }

    .footer {
      text-align: center;
      padding: 12px;
      font-size: 12px; color: #aaa;
      margin-top: 4px;
    }

    @media (max-width: 1100px) {
      .bento { grid-template-columns: 1fr 1fr; }
      .card-calendar { grid-column: 1 / 3; grid-row: auto; }
      .bento-bottom { grid-column: 1 / 3; grid-template-columns: 1fr 1fr; }
      .card-chart { grid-column: 1 / 3; }
      .card-verse { grid-column: 1 / 3; }
      .bento-mid-col { flex-direction: row; }
    }

    /* ── 태블릿 ── */
    @media (max-width: 768px) {
      .header { padding: 0 14px; height: 56px; }
      .header-emblem { width: 34px; height: 34px; }
      .header-emblem img { width: 34px; height: 34px; }
      .header-left { gap: 10px; }
      .header-sub { font-size: 9px; }
      .header-name { font-size: 16px; }
      .header-badge { font-size: 10px; padding: 3px 10px; }
      .admin-btn { font-size: 11px; padding: 6px 12px; }
    }

    /* ── 모바일 ── */
    @media (max-width: 640px) {
      /* 헤더 */
      .header {
        padding: 0 12px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 8px;
        padding-bottom: 8px;
      }
      .header-left { gap: 8px; flex: 1; min-width: 0; }
      .header-emblem { width: 32px; height: 32px; flex-shrink: 0; }
      .header-emblem img { width: 32px; height: 32px; }
      .header-title { min-width: 0; }
      .header-sub { font-size: 9px; }
      .header-name { font-size: 15px; white-space: nowrap; }
      .header-badge {
        font-size: 9px;
        padding: 3px 8px;
        white-space: nowrap;
        flex-shrink: 0;
      }
      .header-right { flex-shrink: 0; }
      .admin-btn { font-size: 11px; padding: 5px 10px; }

      /* 메인 & 그리드 */
      .main { padding: 12px 10px 40px; }
      .bento { grid-template-columns: 1fr; gap: 10px; }
      .card-calendar { grid-column: auto; grid-row: auto; }
      .bento-bottom { grid-column: auto; grid-template-columns: 1fr; gap: 10px; }
      .card-verse { grid-column: auto; }

      /* 카드 패딩 조정 */
      .bento-mid-col { flex-direction: column; }
      .card-vehicle,
      .card-facility,
      .card-vehicle-apply { padding: 18px 16px; min-height: 140px; }
      .apply-desc { display: none; }
      .card-main-title { font-size: 18px; }
      .card-deadline,
      .card-notice,
      .card-chart { padding: 18px 16px; }
      .card-calendar { padding: 18px 14px; }
      .card-verse { padding: 22px 20px; }
      .card-verse .verse-text { font-size: 14px; }

      /* 캘린더 → 모바일 타임라인 뷰로 교체 */
      .cal-header, .today-panel, .cal-legend, #calGrid, #timelinePanel { display: none !important; }
      .mtv-wrap { display: block !important; }
      .card-calendar { padding: 18px 12px; overflow: hidden; }
      .mtv-wrap, .mtv-cards-area { width: 100%; box-sizing: border-box; }

      /* 오늘 패널 */
      .today-panel-body { max-height: none; overflow-y: visible; }
      .today-item { padding: 6px 8px; min-width: 100px; }
      .today-item-name { font-size: 13px; }

      /* 통계 차트 */
      .chart-canvas-wrap { width: 120px; height: 120px; }
    }

    /* ── 초소형 모바일 (360px 이하) ── */
    @media (max-width: 380px) {
      .header-badge { display: none; }
      .header-name { font-size: 14px; }
      .card-main-title { font-size: 16px; }
    }

    /* ── 모바일 카드 스택 + 미니 스트립 ── */
    .mtv-wrap { display: none; }
    .mtv-nav {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 12px;
    }
    .mtv-nav-btn {
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 8px; padding: 7px 16px;
      font-size: 14px; cursor: pointer; color: var(--text);
    }
    .mtv-nav-btn:active { background: var(--border); }
    .mtv-nav-center { display: flex; align-items: center; gap: 8px; }
    .mtv-date-lbl { font-size: 15px; font-weight: 800; color: var(--text); }
    .mtv-today-btn {
      font-size: 11px; color: var(--primary);
      background: none; border: 1px solid var(--primary);
      border-radius: 6px; padding: 3px 8px; cursor: pointer;
    }
    /* 카드 영역 — CSS 네이티브 스크롤 스냅 */
    .mtv-cards-area { min-height: 140px; }
    .mtv-card-scroll {
      display: flex;
      width: 100%;
      overflow-x: hidden;
      scrollbar-width: none;
      gap: 0;
    }
    .mtv-card-scroll::-webkit-scrollbar { display: none; }
    .mtv-card-slot {
      flex: 0 0 100%;
      min-width: 0;
      scroll-snap-align: start;
      padding: 0 2px;
      box-sizing: border-box;
    }
    .mtv-card {
      background: #fff; border-radius: 14px;
      border: 1.5px solid var(--border);
      box-shadow: 0 4px 16px rgba(0,0,0,0.09);
      overflow: hidden;
    }
    .mtv-card.vehicle  { border-top: 3px solid var(--primary); }
    .mtv-card.facility { border-top: 3px solid var(--accent); }
    .mtv-card-top {
      display: flex; align-items: flex-start;
      gap: 10px; padding: 13px 13px 10px 13px;
    }
    .mtv-card-icon { font-size: 22px; line-height: 1; margin-top: 1px; }
    .mtv-card-info { flex: 1; min-width: 0; }
    .mtv-card-resource {
      font-size: 15px; font-weight: 800; color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mtv-card-time {
      font-size: 13px; font-weight: 700; margin: 3px 0 2px;
    }
    .mtv-card.vehicle  .mtv-card-time { color: var(--primary); }
    .mtv-card.facility .mtv-card-time { color: var(--accent); }
    .mtv-card-person { font-size: 12px; color: var(--text-light); }
    .mtv-card-badge {
      font-size: 10px; font-weight: 700;
      padding: 3px 8px; border-radius: 6px; white-space: nowrap; align-self: flex-start;
    }
    .mtv-card-badge.confirmed { background: #dbeafe; color: #1e40af; }
    .mtv-card-badge.pending   { background: #fff3cd; color: #856404; }
    .mtv-card-badge.cancelled { background: #f8d7da; color: #721c24; }
    /* 미니 스트립 */
    .mtv-strip {
      border-top: 1px solid var(--border);
      padding: 8px 13px 10px 13px;
      background: #fafbfd;
      overflow: hidden;
    }
    .mtv-strip-bar {
      position: relative; height: 8px;
      background: #e5e7eb; border-radius: 4px;
      margin-bottom: 5px; overflow: visible;
    }
    .mtv-strip-seg {
      position: absolute; height: 100%; border-radius: 3px;
    }
    .mtv-strip-seg.other    { background: #6b7280; opacity: 0.55; }
    .mtv-strip-seg.current.vehicle  { background: var(--primary); box-shadow: 0 0 5px rgba(59,130,246,0.5); }
    .mtv-strip-seg.current.facility { background: var(--accent);  box-shadow: 0 0 5px rgba(245,158,11,0.5); }
    .mtv-strip-conflict {
      position: absolute; top: -4px; width: 3px; height: 16px;
      background: #ef4444; border-radius: 2px; margin-left: -1.5px;
    }
    .mtv-strip-labels { position: relative; height: 13px; }
    .mtv-strip-lbl {
      position: absolute; font-size: 9px; color: #9ca3af;
      transform: translateX(-50%); white-space: nowrap;
    }
    /* 빈 상태 */
    .mtv-empty-card {
      text-align: center; padding: 28px 0;
      color: var(--text-light); font-size: 13px;
    }
    .mtv-empty-card div:first-child { font-size: 30px; margin-bottom: 6px; }
    /* 도트 페이지 인디케이터 */
    .mtv-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
    #mtvNavClip { overflow: hidden; }
    .mtv-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: #d1d5db; cursor: pointer; transition: all 0.2s;
    }
    .mtv-dot.active { background: var(--primary); width: 18px; border-radius: 3px; }
@keyframes easterPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.quiz-opt {
  background: #243040;
  border: 1px solid #3a4a5a;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s;
  word-break: keep-all;
  line-height: 1.5;
}
.quiz-opt:hover { background: #2d3f52; border-color: #c8a951; }
.quiz-opt.correct { background: #1a4a2a; border-color: #4aaa6a; color: #7aee9a; }
.quiz-opt.wrong   { background: #4a1a1a; border-color: #aa4a4a; color: #ee7a7a; }

@keyframes starFly { from{transform:scale(0) rotate(0deg);opacity:1} to{transform:scale(1.5) rotate(360deg) translateY(-60px);opacity:0} }

    /* ══════════════════════════════════════════════
       스와이프 컨테이너 & 페이지 인디케이터
       ══════════════════════════════════════════════ */
    .swipe-container {
      display: flex;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      flex: 1;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .swipe-container::-webkit-scrollbar { display: none; }
    .swipe-page {
      flex: 0 0 100%;
      min-width: 100%;
      scroll-snap-align: start;
      overflow-y: auto;
    }
    #page1 {
      display: flex;
      flex-direction: column;
    }
    .swipe-dots {
      position: fixed;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      z-index: 200;
      background: rgba(255,255,255,0.85);
      backdrop-filter: blur(6px);
      padding: 6px 14px;
      border-radius: 20px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    }
    .swipe-dot {
      width: 10px; height: 10px;
      border-radius: 50%;
      background: #ccc;
      cursor: pointer;
      transition: all 0.25s;
    }
    .swipe-dot.active {
      background: var(--primary);
      width: 28px;
      border-radius: 5px;
    }

    /* ══════════════════════════════════════════════
       페이지 2: 캘린더 뷰 — Light SaaS Dashboard
       ══════════════════════════════════════════════ */
    #page2 {
      position: relative;
      background: #f0f3f9;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    /* ── 페이지2 전용 헤더 ── */
    .cv-header {
      display: flex;
      align-items: center;
      height: 52px;
      padding: 0 20px;
      background: #ffffff;
      border-bottom: 1px solid #e4e7ef;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
      flex-shrink: 0;
      z-index: 10;
      gap: 16px;
    }
    .cv-header-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .cv-header-emblem {
      width: 34px; height: 34px;
      border-radius: 50%;
      border: 1.5px solid #e4e7ef;
      overflow: hidden;
      flex-shrink: 0;
    }
    .cv-header-emblem img { width: 100%; height: 100%; object-fit: cover; }
    .cv-header-info { display: flex; flex-direction: column; }
    .cv-header-sub {
      font-size: 13px;
      font-weight: 700;
      color: #1e293b;
      white-space: nowrap;
    }
    .cv-header-badge {
      font-size: 10px;
      font-weight: 700;
      background: #1e3a8a;
      color: #ffffff;
      padding: 3px 10px;
      border-radius: 4px;
      white-space: nowrap;
    }
    .cv-header-nav {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: auto;
    }
    .cv-header-nav-item {
      padding: 6px 16px;
      font-size: 13px;
      font-weight: 600;
      color: #64748b;
      cursor: pointer;
      border-radius: 6px;
      transition: all 0.15s;
      text-decoration: none;
    }
    .cv-header-nav-item:hover {
      color: #1e293b;
      background: #f1f5f9;
    }
    .cv-header-nav-item.active {
      color: #1e40af;
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      font-weight: 700;
    }
    .cv-header-right { margin-left: auto; }
    .cv-header-admin {
      font-size: 12px;
      font-weight: 600;
      color: #475569;
      text-decoration: none;
      padding: 6px 14px;
      border: 1px solid #e2e8f0;
      border-radius: 20px;
      background: #f8fafc;
      transition: all 0.15s;
    }
    .cv-header-admin:hover {
      color: #1e293b;
      border-color: #cbd5e1;
      background: #f1f5f9;
    }

    /* ── 레이아웃 ── */
    .cv-layout {
      display: flex;
      flex: 1;
      min-height: 0;
      position: relative;
      z-index: 1;
    }

    /* ── 사이드바 ── */
    .cv-sidebar {
      width: 200px;
      flex-shrink: 0;
      background: #ffffff;
      border-right: 1px solid #e4e7ef;
      padding: 18px 12px;
      overflow-y: auto;
    }
    /* ── 트리 메뉴 ── */
    .cv-tree-title {
      font-size: 10px;
      font-weight: 800;
      color: #94a3b8;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      margin-bottom: 10px;
      padding: 0 4px;
    }
    .cv-tree { display: flex; flex-direction: column; gap: 2px; }
    .cv-tree-group { margin-bottom: 6px; border-radius: 8px; overflow: hidden; }
    .cv-tree-group.vehicle-group > .cv-tree-node-hd {
      background: #fdf7e8;
      border-color: #c9a84c;
      border-left: 3px solid #8b7a35;
    }
    .cv-tree-group.vehicle-group > .cv-tree-node-hd:hover { background: #faefd0; }
    .cv-tree-group.place-group > .cv-tree-node-hd {
      background: #edf7f1;
      border-color: #4caf82;
      border-left: 3px solid #1d6b52;
    }
    .cv-tree-group.place-group > .cv-tree-node-hd:hover { background: #d8f0e4; }
    .cv-tree-node-hd {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 6px 6px;
      border-radius: 7px;
      cursor: pointer;
      user-select: none;
      transition: background 0.15s;
      background: #f8fafc;
      border: 1px solid #e4e7ef;
    }
    .cv-tree-node-hd:hover { background: #f1f5f9; border-color: #cbd5e1; }
    .cv-tree-arrow {
      font-size: 9px;
      color: #64748b;
      transition: transform 0.2s;
      flex-shrink: 0;
      width: 12px;
      text-align: center;
    }
    .cv-tree-arrow.collapsed { transform: rotate(-90deg); }
    .cv-tree-all {
      width: 14px; height: 14px;
      cursor: pointer;
      flex-shrink: 0;
      accent-color: #1e3a8a;
    }
    .cv-tree-node-lbl {
      font-size: 12px;
      font-weight: 700;
      color: #1e293b;
      cursor: pointer;
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .cv-tree-children {
      margin-left: 10px;
      overflow: hidden;
      max-height: 2000px;
      transition: max-height 0.25s ease, opacity 0.2s;
      opacity: 1;
    }
    .cv-tree-children.collapsed {
      max-height: 0;
      opacity: 0;
    }
    .cv-tree-item {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 4px 4px 4px 2px;
      cursor: pointer;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 500;
      color: #334155;
      transition: background 0.12s;
    }
    .cv-tree-item:hover { background: #f1f5f9; color: #1e293b; }
    .cv-tree-connector {
      font-size: 11px;
      color: #cbd5e1;
      flex-shrink: 0;
      font-family: monospace;
      line-height: 1;
      width: 10px;
    }
    .cv-tree-item input[type="checkbox"] {
      width: 13px; height: 13px;
      cursor: pointer;
      flex-shrink: 0;
    }
    .cv-tree-item-name {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    /* 기존 호환 */
    .cv-all-check {
      width: 15px; height: 15px;
      cursor: pointer;
      flex-shrink: 0;
      accent-color: #1e3a8a;
    }

    /* 토글 스위치 */
    .cv-toggle {
      position: relative;
      width: 34px; height: 18px;
      flex-shrink: 0;
    }
    .cv-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
    .cv-toggle-slider {
      position: absolute;
      inset: 0;
      background: #cbd5e1;
      border-radius: 9px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .cv-toggle-slider::before {
      content: '';
      position: absolute;
      width: 14px; height: 14px;
      left: 2px; bottom: 2px;
      background: #ffffff;
      border-radius: 50%;
      transition: all 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    /* 장소 토글: 틸 그린 */
    #cvPlaceFilters .cv-toggle input:checked + .cv-toggle-slider { background: #1d6b52; }
    /* 차량 토글: 골든 올리브 */
    #cvVehicleFilters .cv-toggle input:checked + .cv-toggle-slider { background: #8b7a35; }
    .cv-toggle input:checked + .cv-toggle-slider::before { transform: translateX(16px); }

    /* ── 메인 영역 ── */
    .cv-main {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 14px 16px;
      gap: 12px;
      scrollbar-width: thin;
      scrollbar-color: #cbd5e1 transparent;
      position: relative;
    }
    .cv-main::-webkit-scrollbar { width: 4px; }
    .cv-main::-webkit-scrollbar-track { background: transparent; }
    .cv-main::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

    /* ── 캘린더 섹션 ── */
    .cv-calendar-section {
      flex: 0 0 auto;
      min-height: 420px;
      display: flex;
      flex-direction: column;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 14px 16px 10px;
      box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.03);
      position: relative;
      overflow: hidden;
    }
    .cv-cal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      flex-wrap: wrap;
      gap: 8px;
    }
    .cv-cal-nav {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .cv-cal-title {
      font-size: 18px;
      font-weight: 800;
      color: #1e293b;
      min-width: 140px;
      text-align: center;
    }
    .cv-btn {
      padding: 5px 14px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      color: #475569;
      cursor: pointer;
      transition: all 0.15s;
    }
    .cv-btn:hover {
      background: #f1f5f9;
      color: #1e293b;
      border-color: #cbd5e1;
    }
    .cv-nav-btn {
      width: 30px; height: 30px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      border-radius: 6px;
      font-size: 11px;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: #64748b;
      transition: all 0.15s;
    }
    .cv-nav-btn:hover {
      background: #f1f5f9;
      color: #1e293b;
      border-color: #cbd5e1;
    }
    .cv-view-tabs {
      display: flex;
      gap: 0;
      background: #f1f5f9;
      padding: 3px;
      border-radius: 8px;
    }
    .cv-view-tab {
      padding: 5px 14px;
      border: none;
      background: transparent;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      font-family: inherit;
      color: #64748b;
      cursor: pointer;
      transition: all 0.15s;
    }
    .cv-view-tab.active {
      background: #ffffff;
      color: #1e40af;
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    .cv-view-tab:hover:not(.active) { color: #334155; }

    /* 캘린더 그리드 */
    .cv-cal-grid {
      flex: 1;
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      grid-template-rows: auto;
      gap: 0;
      background: #e2e8f0;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      overflow: hidden;
      min-height: 0;
    }
    .cv-day-hd {
      background: #f8fafc;
      text-align: center;
      font-size: 11px;
      font-weight: 700;
      color: #64748b;
      letter-spacing: 0.5px;
      padding: 8px 0;
      border-bottom: 1px solid #e2e8f0;
    }
    .cv-day-hd.sun { color: #ef4444; }
    .cv-day-hd.sat { color: #3b82f6; }
    .cv-cell {
      background: #ffffff;
      padding: 5px 6px;
      min-height: 90px;
      cursor: pointer;
      transition: background 0.12s;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      border-bottom: 1px solid #e2e8f0;
      border-right: 1px solid #e2e8f0;
      gap: 1px;
    }
    .cv-cell:nth-child(7n) { border-right: none; }
    .cv-cell:hover { background: #f8faff; }
    .cv-cell.other { background: #f8fafc; opacity: 0.65; }
    .cv-cell.today { background: #eff6ff; }
    .cv-cell.selected {
      background: #eff6ff;
      box-shadow: inset 0 0 0 2px #3b82f6;
    }
    .cv-cell-date {
      font-size: 13px;
      font-weight: 700;
      color: #334155;
      margin-bottom: 2px;
      line-height: 1;
    }
    .cv-cell.today .cv-cell-date {
      background: #1e40af;
      color: #ffffff;
      width: 22px; height: 22px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 11px;
    }
    .cv-cell.sun .cv-cell-date { color: #ef4444; }
    .cv-cell.sat .cv-cell-date { color: #3b82f6; }
    .cv-cell.today.sun .cv-cell-date,
    .cv-cell.today.sat .cv-cell-date { color: #ffffff; }
    .cv-cell-events {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .cv-evt {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.7;
      color: #ffffff;
    }
    .cv-evt.facility {
      background: #1d6b52;
    }
    .cv-evt.vehicle {
      background: #8b7a35;
    }
    .cv-evt.confirmed {
      background: #1e3a6e;
    }
    .cv-cell-more {
      font-size: 9px;
      color: #94a3b8;
      font-weight: 600;
      margin-top: 1px;
    }

    /* ── 타임라인 섹션 ── */
    .cv-timeline-section {
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      padding: 14px 16px 16px;
      min-height: 160px;
      overflow-y: auto;
      box-shadow: 0 1px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.03);
    }
    .cv-tl-title {
      font-size: 15px;
      font-weight: 800;
      color: #1e293b;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .cv-tl-title::before {
      content: '';
      width: 3px; height: 16px;
      background: #3b82f6;
      border-radius: 2px;
      flex-shrink: 0;
    }
    /* ── 타임라인 컨테이너: CSS Grid로 모든 행 첫 열 공유 ── */
    .cv-tl-container {
      display: grid;
      grid-template-columns: max-content 1fr;
      align-items: center;
      row-gap: 4px;
    }

    /* 각 행을 display:contents로 → 자식들이 부모 그리드에 직접 참여 */
    .cv-tl-row { display: contents; }

    /* 시간축 행 — resource 셀은 빈 공간으로 자리 차지 */
    .cv-tl-axis {
      position: relative;
      height: 22px;
      border-bottom: 1px solid #e2e8f0;
      margin-bottom: 2px;
    }
    .cv-tl-axis-label {
      /* 빈 셀, max-content 컬럼에 의해 자동 늘어남 */
    }
    .cv-tl-hour {
      position: absolute;
      font-size: 11px;
      font-weight: 600;
      color: #94a3b8;
      transform: translateX(-50%);
      white-space: nowrap;
    }
    .cv-tl-now {
      position: absolute;
      top: 0; bottom: 0;
      width: 2px;
      background: #ef4444;
      z-index: 5;
      pointer-events: none;
    }
    .cv-tl-now::before {
      content: '';
      position: absolute;
      top: -3px; left: -4px;
      width: 10px; height: 10px;
      background: #ef4444;
      border-radius: 50%;
    }
    .cv-tl-now::after {
      content: '현재';
      position: absolute;
      top: -16px; left: 50%;
      transform: translateX(-50%);
      font-size: 10px; font-weight: 700;
      color: #ef4444; white-space: nowrap;
      pointer-events: none; line-height: 1;
    }

    /* 자원명 셀 — 너비는 그리드 max-content 컬럼이 결정 */
    .cv-tl-resource {
      font-size: 13px;
      font-weight: 600;
      color: #334155;
      padding: 5px 14px 5px 0;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 4px;
      border-bottom: 1px solid #f1f5f9;
    }
    /* 트랙 셀 — 항상 1fr(나머지 전체)를 차지하여 끝점이 동일 */
    .cv-tl-track {
      position: relative;
      height: 34px;
      background: #f8fafc;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid #f1f5f9;
      border-bottom-color: #f1f5f9;
    }
    .cv-tl-gridline {
      position: absolute;
      top: 0; bottom: 0;
      width: 1px;
      background: #e2e8f0;
      pointer-events: none;
    }
    .cv-tl-block {
      position: absolute;
      top: 3px;
      height: calc(100% - 6px);
      border-radius: 5px;
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 0 8px;
      font-size: 13px;
      font-weight: 600;
      overflow: hidden;
      white-space: nowrap;
      cursor: default;
      min-width: 8px;
      transition: all 0.15s;
    }
    .cv-tl-block:hover { filter: brightness(0.95); }
    .cv-tl-block-icon { font-size: 13px; flex-shrink: 0; }
    .cv-tl-empty {
      text-align: center;
      color: #94a3b8;
      padding: 24px 0;
      font-size: 14px;
    }
    .cv-tl-legend {
      display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap;
      padding: 8px 4px 0;
      border-top: 1px solid #f1f5f9;
    }
    .cv-tl-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #64748b; }
    .cv-tl-legend-box { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

    /* 타임라인 블록 색상 — 이미지 매칭 솔리드 팔레트 */
    .cv-tl-block { color: #ffffff; }
    .cv-tl-block.c0 { background: #1e3a6e; } /* 네이비 블루 */
    .cv-tl-block.c1 { background: #8b7a35; } /* 골든 올리브 */
    .cv-tl-block.c2 { background: #1d6b52; } /* 틸 그린 */
    .cv-tl-block.c3 { background: #5b3d8a; } /* 딥 퍼플 */
    .cv-tl-block.c4 { background: #7a3050; } /* 딥 로즈 */
    .cv-tl-block.c5 { background: #1a5f6b; } /* 다크 시안 */
    .cv-tl-block.c6 { background: #7a5820; } /* 다크 앰버 */
    .cv-tl-block.c7 { background: #2d3d7a; } /* 인디고 */

    /* ── FAB ── */
    .cv-fab {
      position: absolute;
      bottom: 20px;
      right: 20px;
      background: #1e3a8a;
      border: none;
      color: #ffffff;
      padding: 12px 22px;
      border-radius: 24px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(30,58,138,0.35), 0 2px 8px rgba(0,0,0,0.1);
      transition: all 0.2s;
      z-index: 50;
      user-select: none;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .cv-fab-plus { font-size: 18px; font-weight: 300; line-height: 1; }
    .cv-fab:hover {
      transform: translateY(-2px);
      background: #1e40af;
      box-shadow: 0 8px 24px rgba(30,58,138,0.45), 0 4px 12px rgba(0,0,0,0.1);
    }
    .cv-fab-menu {
      display: none;
      position: absolute;
      bottom: calc(100% + 10px);
      right: 0;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
      overflow: hidden;
      min-width: 190px;
    }
    .cv-fab-menu.show { display: block; }
    .cv-fab-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 13px 16px;
      font-size: 13px;
      font-weight: 600;
      color: #334155;
      text-decoration: none;
      transition: all 0.12s;
    }
    .cv-fab-item:hover { background: #f8fafc; color: #1e293b; }
    .cv-fab-item + .cv-fab-item { border-top: 1px solid #f1f5f9; }

    /* ── 우측 상세 패널 ── */
    .cv-detail-panel {
      width: 230px;
      flex-shrink: 0;
      background: #ffffff;
      border-left: 1px solid #e2e8f0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: translateX(100%);
      transition: transform 0.22s ease;
      position: absolute;
      right: 0; top: 0; bottom: 0;
      z-index: 20;
      box-shadow: -4px 0 20px rgba(0,0,0,0.07);
    }
    .cv-detail-panel.open { transform: translateX(0); }
    .cv-detail-hd {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 12px 14px 10px;
      border-bottom: 1px solid #f1f5f9;
      flex-shrink: 0;
    }
    .cv-detail-hd-title {
      font-size: 14px;
      font-weight: 700;
      color: #1e293b;
      line-height: 1.5;
      display: flex; align-items: center; gap: 6px;
    }
    .cv-detail-close {
      width: 22px; height: 22px;
      border: none;
      background: #f1f5f9;
      border-radius: 50%;
      font-size: 12px;
      cursor: pointer;
      color: #64748b;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      transition: all 0.12s;
      margin-left: 6px;
    }
    .cv-detail-close:hover { background: #e2e8f0; color: #1e293b; }
    .cv-detail-body {
      flex: 1;
      overflow-y: auto;
      padding: 10px 12px;
      scrollbar-width: thin;
      scrollbar-color: #e2e8f0 transparent;
    }
    .cv-detail-resource { margin-bottom: 14px; }
    .cv-detail-res-name {
      font-size: 12px;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .cv-detail-res-dot {
      width: 10px; height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .cv-detail-evt {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      padding: 9px 0 9px 14px;
      border-left: 3px solid #e2e8f0;
      margin-bottom: 8px;
    }
    .cv-detail-evt.facility {
      border-left-color: #1d6b52;
      background: rgba(29,107,82,0.07);
      border-radius: 0 8px 8px 0;
    }
    .cv-detail-evt.vehicle {
      border-left-color: #8b7a35;
      background: rgba(139,122,53,0.07);
      border-radius: 0 8px 8px 0;
    }
    .cv-detail-section-hd {
      font-size: 11px; font-weight: 800; letter-spacing: 0.6px;
      padding: 10px 2px 5px;
      margin-bottom: 6px;
      border-bottom: 2px solid currentColor;
      display: flex; align-items: center; gap: 5px;
    }
    .cv-detail-section-hd:first-child { padding-top: 2px; }
    .cv-detail-section-hd.facility { color: #1d6b52; }
    .cv-detail-section-hd.vehicle  { color: #8b7a35; }
    .cv-detail-res-info { flex: 1; min-width: 0; }
    .cv-detail-res-name {
      font-size: 14px;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .cv-detail-res-time {
      font-size: 12px;
      font-weight: 600;
      color: #64748b;
      margin-bottom: 2px;
    }
    .cv-detail-res-org {
      font-size: 12px;
      color: #94a3b8;
    }
    .cv-detail-res-applicant {
      font-size: 12px;
      color: #64748b;
      margin-top: 2px;
    }
    .cv-detail-evt-time {
      font-size: 12px;
      font-weight: 600;
      color: #94a3b8;
      margin-bottom: 1px;
    }
    .cv-detail-evt-name {
      font-size: 14px;
      font-weight: 700;
      color: #334155;
    }
    .cv-detail-evt-sub {
      font-size: 12px;
      color: #64748b;
    }
    .cv-detail-empty {
      text-align: center;
      color: #94a3b8;
      font-size: 12px;
      padding: 20px 0;
      line-height: 1.6;
    }

    /* ── 모바일 사이드바 토글 ── */
    .cv-sidebar-toggle {
      display: none;
      position: fixed;
      top: 72px;
      left: 8px;
      z-index: 60;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 20px;
      padding: 6px 14px;
      font-size: 12px;
      font-weight: 700;
      font-family: inherit;
      color: #475569;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    /* ── 캘린더뷰 반응형 ── */
    @media (max-width: 900px) {
      .cv-sidebar { width: 160px; padding: 14px 8px; }
      .cv-cal-title { font-size: 16px; min-width: 130px; }
      .cv-view-tabs { display: none; }
      .cv-header-nav { display: none; }
      .cv-detail-panel { width: 200px; }
    }

    @media (max-width: 640px) {
      #page2 { display: none !important; }
      .swipe-dots { display: none !important; }
      .swipe-container { scroll-snap-type: none; overflow-x: hidden; }

      .cv-header { display: none; }
      .cv-sidebar {
        position: fixed;
        top: 56px; left: 0; bottom: 0;
        width: 200px; z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.1);
      }
      .cv-sidebar.open { transform: translateX(0); }
      .cv-sidebar-toggle { display: block; }
      .cv-calendar-section { padding: 10px 8px 6px; }
      .cv-timeline-section { padding: 10px 8px 12px; }
      .cv-cell { min-height: 50px; padding: 2px 3px; }
      .cv-cell-date { font-size: 11px; }
      .cv-evt { font-size: 9px; padding: 1px 3px; }
      .cv-cal-title { font-size: 14px; min-width: 130px; }
      .cv-tl-resource { font-size: 11px; }
      .cv-tl-axis { position: relative; }
      .cv-tl-hour { font-size: 9px; }
      .cv-fab { bottom: 48px; right: 16px; padding: 10px 18px; font-size: 13px; }
      .cv-view-tabs { display: none; }
    }

    /* ── 페이지2 활성 시 흰색 헤더 숨김 ── */
    body.page2-active .header {
      display: none;
    }

    /* ── 전광판 스캔라인 + 디지털 시계 ── */
    .card-vehicle::after,
    .card-vehicle-apply::after,
    .card-facility::after {
      content: '';
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 255, 80, 0.038) 3px,
        rgba(0, 255, 80, 0.038) 4px
      );
      pointer-events: none;
      z-index: 10;
      border-radius: inherit;
    }
    .vboard-clock {
      display: inline-flex;
      align-items: center;
      gap: 1px;
      font-family: 'Courier New', 'Lucida Console', monospace;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 2px;
      color: #39ff7a;
      text-shadow: 0 0 6px rgba(57,255,122,0.85), 0 0 14px rgba(57,255,122,0.4);
      background: rgba(0,0,0,0.32);
      padding: 2px 8px 2px 7px;
      border-radius: 5px;
      border: 1px solid rgba(57,255,122,0.28);
      margin-top: 5px;
      user-select: none;
    }
    .vboard-cursor {
      color: #39ff7a;
      font-weight: 900;
      animation: vboard-blink 1s step-end infinite;
      text-shadow: 0 0 6px rgba(57,255,122,0.85);
    }
    @keyframes vboard-blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0; }
    }
    @keyframes footerBlink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0; }
    }
