:root {
      --wa-bg: #0b141a;
      --wa-header: #111b21;
      --wa-card: #202c33;
      --wa-green: #00a884;
      --wa-green-hover: #02906f;
      --wa-bubble-bot: #202c33;
      --wa-bubble-user: #005c4b;
      --wa-bubble-host: #3b2d11;
      --border-color: #222d34;
      --text-main: #e9edef;
      --text-sub: #8696a0;
      --gold-accent: #ffd279;
      --alert-red: #ef5350;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    body {
      background: var(--wa-bg); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      width: 100vw; height: 100dvh; margin: 0; padding: 0; overflow: hidden; display: flex;
    }
    .admin-layout {
      width: 100vw; max-width: 100vw; height: var(--admin-viewport-height, 100dvh); min-height: 0; background: var(--wa-bg);
      display: flex; flex-direction: column; position: relative; margin: 0; padding: 0; border: none;
      padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; overflow: hidden;
    }
    .admin-layout.ota-view > header,
    .admin-layout.ota-view > .main-body { display: none !important; }
    .admin-layout.cal-view > header,
    .admin-layout.cal-view > .main-body { display: none !important; }
    body.embed-cal-mode .wa-mobile-nav { display: none !important; }
    body.embed-cal-mode .admin-layout { padding-bottom: 0 !important; }
    body.embed-cal-mode #adminCalendarPage.cal-page { bottom: 0 !important; }
    body.embed-cal-mode .samsung-share-btn { display: none !important; }
    body.embed-cal-mode .samsung-block-btn { display: none !important; }
    body.embed-cal-mode .samsung-action-pill.add { display: none !important; }
    #qrModal.ota-page {
      position: fixed; top: 0; left: 0; right: 0; bottom: 60px; z-index: 900; display: none; overflow-y: auto;
      padding: 0; background: var(--wa-bg); align-items: stretch; justify-content: stretch;
    }
    #qrModal.ota-page.open { display: block; }
    #adminCalendarPage.cal-page {
      position: fixed; top: 0; left: 0; right: 0; bottom: 60px; z-index: 900; display: none; overflow-y: auto;
      padding: 0; background: var(--wa-bg); align-items: stretch; justify-content: stretch;
    }
    #adminCalendarPage.cal-page.open { display: block; }
    #qrModal.ota-page > .modal-card,
    #adminCalendarPage.cal-page > .modal-card {
      width: 100%; max-width: none; min-height: 100%; max-height: none; overflow: visible;
      border: 0; border-radius: 0; padding: 20px; margin: 0 auto;
    }
    @media (max-width: 600px) {
      #qrModal.ota-page > .modal-card,
      #adminCalendarPage.cal-page > .modal-card { padding: 14px 12px calc(80px + env(safe-area-inset-bottom)); }
      body.embed-cal-mode #adminCalendarPage.cal-page > .modal-card { padding: 10px 8px 16px !important; }
    }
    /* 상단 헤더 */
    header {
      background: var(--wa-header); padding: 8px 16px; display: flex; justify-content: space-between; align-items: center;
      border-bottom: 1px solid var(--border-color); z-index: 10; gap: 8px; flex-wrap: wrap;
    }
    .avatar-crown, .avatar-host {
      width: 40px; height: 40px; border-radius: 50%; background: #202c33; border: 1.5px solid #00a884;
      display: flex; align-items: center; justify-content: center; font-size: 16px; position: relative; overflow: visible; flex-shrink: 0;
    }
    .avatar-host img {
      width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
    }
    .avatar-host .online-badge {
      position: absolute; bottom: 0; right: 0; width: 11px; height: 11px;
      border-radius: 50%; background: #25d366; border: 2px solid var(--wa-header);
    }
    .header-title h1 { font-size: 15.5px; font-weight: 700; color: #e9edef; display: flex; align-items: center; gap: 6px; letter-spacing: -0.2px; }
    .verified-icon { width: 15px; height: 15px; fill: #25d366; vertical-align: middle; flex-shrink: 0; }
    .header-title p { font-size: 11.5px; color: var(--text-sub); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
    .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #25d366; display: inline-block; animation: pulse 2s infinite; }
    @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.85); } }

    .header-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
    .admin-header-more-wrap { position: relative; display: inline-flex; align-items: center; }
    .admin-header-more-btn { width: 34px; height: 34px; border: 1px solid #374248; border-radius: 50%; background: #202c33; color: #e9edef; font-size: 24px; line-height: 1; cursor: pointer; }
    .admin-header-more-btn:hover { background: #2a3942; color: #5ef2c2; }
    .admin-header-more-menu { top: calc(100% + 6px); right: 0; width: 245px; }
    .admin-header-menu-lang { min-height: 46px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #e9edef; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .mobile-menu-language-row { min-height: 48px; padding: 9px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #e9edef; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,0.08); transition: background 0.12s ease; }
    .mobile-menu-language-row:hover { background: #182229; }
    .mobile-menu-language-row .wa-menu-icon,
    .admin-header-menu-lang .wa-menu-icon { flex: 0 0 20px; width: 20px; height: 20px; color: #8696a0; stroke: currentColor; }
    .mobile-menu-language-row:hover .wa-menu-icon { color: #e9edef; }
    .wa-nav-item .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; }
    .wa-nav-item .nav-icon svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease, filter .18s ease; }
    .wa-nav-item .nav-icon .nav-icon-detail { stroke-width: 2.6; }
    .wa-nav-item.active .nav-icon svg { transform: translateY(-1px); filter: drop-shadow(0 0 5px rgba(37,211,102,.38)); }
    .btn {
      background: #202c33; color: var(--text-main); border: 1px solid #374248; padding: 7px 11px; border-radius: 10px;
      font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
      transition: background 0.15s ease;
    }
    .btn:hover { background: #2a3942; }
    .btn.primary { background: var(--wa-green); border-color: var(--wa-green); color: #fff; font-weight: 600; }
    .btn.primary:hover { background: var(--wa-green-hover); }
    .btn.gold { background: #3b2d11; border-color: var(--gold-accent); color: var(--gold-accent); }
    .btn.gold:hover { background: #4a3a19; }

    /* 메인 컨테이너 (게스트 목록 + 채팅창) */
    .main-body { flex: 1 1 0%; min-height: 0; display: flex; overflow: hidden; position: relative; }

    /* 좌측 게스트 룸 사이드바 (WhatsApp 대화 목록 스타일) */
    .sidebar {
      width: clamp(280px, 24vw, 360px); min-width: 280px; min-height: 0; background: #111b21; border-right: 1px solid var(--border-color);
      display: flex; flex-direction: column; flex-shrink: 0; position: relative;
    }
    .wa-sidebar-header {
      padding: 10px 14px; background: #111b21; display: flex; justify-content: space-between;
      align-items: center; border-bottom: 1px solid #1f2c34; position: relative;
    }
    .wa-dropdown-menu {
      display: none; position: absolute; top: calc(100% - 2px); right: 8px; z-index: 100;
      width: min(300px, calc(100vw - 24px)); max-height: min(72dvh, 540px); overflow-y: auto;
      padding: 6px 0; border: 1px solid #374248; border-radius: 12px; background: #233138;
      box-shadow: 0 8px 28px rgba(0,0,0,.65); animation: adminMenuIn .14s ease-out;
      scrollbar-width: thin;
      scrollbar-color: #374248 transparent;
    }
    .wa-dropdown-menu::-webkit-scrollbar {
      width: 5px;
    }
    .wa-dropdown-menu::-webkit-scrollbar-track {
      background: transparent;
    }
    .wa-dropdown-menu::-webkit-scrollbar-thumb {
      background: #374248;
      border-radius: 4px;
    }
    .wa-dropdown-menu::-webkit-scrollbar-thumb:hover {
      background: #53636c;
    }
    .wa-dropdown-menu.open { display: block; }
    @keyframes adminMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
    .wa-dropdown-item {
      display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 16px;
      border: 0; border-radius: 0; background: transparent; color: #e9edef; text-align: left;
      font: inherit; font-size: 13.5px; line-height: 1.35; text-decoration: none; white-space: normal;
      overflow-wrap: anywhere; cursor: pointer; transition: background 0.12s ease, color 0.12s ease;
    }
    .wa-dropdown-item .wa-menu-icon,
    .wa-dropdown-item > svg:first-child {
      flex: 0 0 20px;
      width: 20px;
      height: 20px;
      color: #8696a0;
      stroke: currentColor;
      transition: color 0.12s ease, stroke 0.12s ease;
    }
    .wa-dropdown-item > span:first-child:not(.wa-menu-text) {
      flex: 0 0 20px;
      text-align: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .wa-dropdown-item:hover, .wa-dropdown-item:focus-visible {
      background: #182229;
      color: #ffffff;
      outline: none;
    }
    .wa-dropdown-item:hover .wa-menu-icon,
    .wa-dropdown-item:hover > svg:first-child {
      color: #e9edef;
    }
    .wa-dropdown-item.green-accent {
      color: #25d366;
    }
    .wa-dropdown-item.green-accent .wa-menu-icon,
    .wa-dropdown-item.green-accent > svg:first-child {
      color: #25d366;
    }
    .wa-dropdown-item.green-accent:hover {
      background: rgba(37, 211, 102, 0.08);
      color: #5ef2c2;
    }
    .wa-dropdown-item.gold-accent {
      color: #ffd279;
    }
    .wa-dropdown-item.gold-accent .wa-menu-icon,
    .wa-dropdown-item.gold-accent > svg:first-child {
      color: #ffd279;
    }
    .wa-dropdown-item.gold-accent:hover {
      background: rgba(255, 210, 121, 0.08);
      color: #ffe099;
    }
    .wa-dropdown-item.danger-accent {
      color: #ef5350;
    }
    .wa-dropdown-item.danger-accent .wa-menu-icon,
    .wa-dropdown-item.danger-accent > svg:first-child {
      color: #ef5350;
    }
    .wa-dropdown-item.danger-accent:hover {
      background: rgba(239, 83, 80, 0.08);
      color: #ff6b6b;
    }
    .wa-dropdown-divider { height: 1px; margin: 5px 0; background: rgba(255,255,255,.08); }
    .wa-header-brand {
      display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700;
      color: #e9edef; letter-spacing: -0.3px;
    }
    .wa-mobile-brand-title {
      display: none; align-items: center; gap: 6px;
    }
    .wa-mobile-brand-name {
      color: #e2e6eb; font-size: 25px; font-weight: 700; letter-spacing: -0.7px; line-height: 1;
    }
    .wa-mobile-version-badge {
      font-size: 11px; background: #103629; color: #25d366; border: 1px solid #00a884;
      padding: 2px 7px; border-radius: 10px; font-weight: 700; letter-spacing: 0; line-height: 1.2;
    }
    .wa-brand-text { color: #e2e6eb; }
    .wa-header-tools { display: flex; align-items: center; gap: 4px; }
    .wa-header-tools .wa-tool-btn[title="🔍 대화 검색"],
    .wa-header-tools .wa-tool-btn[title="🔔 알림음 토글"] { display: none !important; }
    .wa-tool-btn {
      background: none; border: none; color: #8696a0; font-size: 16px; cursor: pointer;
      padding: 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
      transition: background 0.15s ease, color 0.15s ease;
    }
    .wa-tool-btn:hover { background: #202c33; color: #fff; }

    /* WhatsApp 검색창 */
    .wa-search-wrap { padding: 8px 12px; background: #111b21; }
    .wa-search-inner {
      background: #202c33; border-radius: 8px; display: flex; align-items: center;
      padding: 6px 12px; gap: 8px; border: 1px solid transparent; transition: border-color 0.15s ease;
    }
    .wa-search-inner:focus-within { border-color: #00a884; }
    .wa-search-icon { font-size: 13px; color: #8696a0; }
    .wa-search-inner input {
      width: 100%; border: none; background: transparent; color: #fff; font-size: 13px; outline: none;
    }
    .wa-search-inner input::placeholder { color: #8696a0; }
    .wa-clear-search {
      background: none; border: none; color: #8696a0; cursor: pointer; font-size: 12px; padding: 2px 4px;
    }
    .wa-clear-search:hover { color: #fff; }

    /* WhatsApp 필터 칩 바 (모두, 읽지 않음, 즐겨찾기, 그룹 등) */
    .wa-filter-bar {
      display: flex; gap: 6px; padding: 6px 12px 10px; overflow-x: auto; background: #111b21;
      border-bottom: 1px solid #1f2c34; scrollbar-width: none;
    }
    .wa-filter-bar::-webkit-scrollbar { display: none; }
    .wa-filter-pill {
      background: #202c33; color: #8696a0; border: 1px solid #2a3942; border-radius: 16px;
      padding: 5px 12px; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer;
      display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s ease;
    }
    .wa-filter-pill:hover { background: #283740; color: #e9edef; }
    .wa-filter-pill.active {
      background: #103629; color: #25d366; border-color: #25d366; font-weight: 600;
    }

    /* WhatsApp 대화방 목록 */
    .room-list { flex: 1; overflow-y: auto; padding: 0; display: flex; flex-direction: column; }
    .wa-chat-item {
      display: flex; align-items: center; gap: 12px; padding: 12px 14px;
      border-bottom: 1px solid #182229; cursor: pointer; transition: background 0.15s ease;
      position: relative; user-select: none;
    }
    .wa-chat-item:hover { background: #182229; }
    .wa-chat-item.active { background: #202c33; }
    .wa-chat-item.bulk-selected { background: #103629; }
    .wa-chat-item.bulk-selected::before { content: '✓'; width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 50%; background: #00a884; color: #fff; font-weight: 800; }
    .room-selection-toolbar { display:none; align-items:center; gap:8px; min-height:54px; padding:7px 12px; background:#202c33; border-bottom:1px solid #374248; }
    .room-selection-toolbar.visible { display:flex; }
    .room-selection-count { flex:1; color:#e9edef; font-size:13px; font-weight:600; }
    .room-selection-action { width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:50%; background:transparent; color:#e9edef; font-size:20px; cursor:pointer; }
    .room-selection-action:hover { background:#374248; }
    .room-selection-action.danger { color:#ff6b6b; }
    .wa-chat-avatar {
      width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center;
      justify-content: center; font-size: 19px; font-weight: 700; color: #fff; flex-shrink: 0;
      position: relative; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }
    .wa-avatar-online {
      position: absolute; bottom: 1px; right: 1px; width: 11px; height: 11px;
      border-radius: 50%; background: #25d366; border: 2px solid #111b21;
    }
    .wa-chat-body {
      flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 3px;
    }
    .wa-chat-top-row {
      display: flex; justify-content: space-between; align-items: center; gap: 6px;
    }
    .wa-chat-name {
      font-size: 14.5px; font-weight: 600; color: #e9edef; white-space: nowrap;
      overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px;
    }
    .wa-chat-time {
      font-size: 11px; color: #8696a0; white-space: nowrap; flex-shrink: 0;
    }
    .wa-chat-time.unread { color: #25d366; font-weight: 600; }
    .wa-chat-bottom-row {
      display: flex; justify-content: space-between; align-items: center; gap: 6px;
    }
    .wa-chat-snippet {
      font-size: 12.5px; color: #8696a0; white-space: nowrap; overflow: hidden;
      text-overflow: ellipsis; flex: 1; display: flex; align-items: center; gap: 4px;
    }
    .wa-read-check { font-size: 12px; }
    .wa-read-check.blue { color: #53bdeb; }
    .wa-read-check.gray { color: #8696a0; }
    .wa-chat-badges {
      display: flex; align-items: center; gap: 5px; flex-shrink: 0;
    }
    .wa-unread-pill {
      background: #25d366; color: #0b141a; font-size: 10.5px; font-weight: 700;
      border-radius: 10px; min-width: 18px; height: 18px; display: inline-flex;
      align-items: center; justify-content: center; padding: 0 5px;
    }
    .wa-star-btn {
      background: none; border: none; color: #64747d; cursor: pointer; font-size: 13px; padding: 1px 3px;
    }
    .wa-star-btn.starred { color: #f1c40f; }
    .wa-delete-room-btn {
      opacity: 0.75; background: rgba(239, 83, 80, 0.12); border: 1px solid rgba(239, 83, 80, 0.35); color: #ef5350; cursor: pointer;
      font-size: 11px; padding: 4px; border-radius: 6px; transition: all 0.15s ease; margin-left: 2px;
      display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
    }
    .wa-delete-room-btn svg {
      width: 13px; height: 13px; stroke: currentColor; fill: none; display: block;
    }
    .wa-delete-room-btn:hover, .wa-chat-item:hover .wa-delete-room-btn, .wa-chat-item.delete-active .wa-delete-room-btn {
      opacity: 1; background: #ef5350; color: #fff; border-color: #ff6666; transform: scale(1.08);
    }
    .wa-tag-qr-live {
      background: rgba(37, 211, 102, 0.16);
      color: #25d366;
      border: 1px solid rgba(37, 211, 102, 0.35);
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      white-space: nowrap;
    }
    .wa-checkin-snippet-badge {
      background: rgba(245, 158, 11, 0.14);
      color: #f59e0b;
      border: 1px solid rgba(245, 158, 11, 0.32);
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 4px;
      font-weight: 600;
      white-space: nowrap;
    }
    .wa-code-badge {
      background: rgba(99, 102, 241, 0.15);
      color: #818cf8;
      border: 1px solid rgba(99, 102, 241, 0.35);
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 4px;
      font-weight: 600;
      white-space: nowrap;
    }
    .wa-qr-btn-pill {
      background: #202c33;
      border: 1px solid #374248;
      color: #ffd279;
      cursor: pointer;
      font-size: 10.5px;
      padding: 2px 6px;
      border-radius: 6px;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 2px;
      font-weight: 600;
    }
    .wa-qr-btn-pill:hover {
      background: #2a3942;
      border-color: #ffd279;
      color: #fff;
      transform: scale(1.06);
    }
    .msg-delete-btn {
      opacity: 0; background: rgba(239, 83, 80, 0.12); border: 1px solid rgba(239, 83, 80, 0.3);
      color: #ef5350; cursor: pointer; font-size: 11px; padding: 1px 5px; border-radius: 4px;
      margin-left: 6px; transition: all 0.15s ease;
    }
    .msg-box:hover .msg-delete-btn { opacity: 0.85; }
    .msg-delete-btn:hover { opacity: 1; background: #ef5350; color: #fff; border-color: #ff6666; }



    /* 하단 내비게이션 바 (WhatsApp 정통 3개 버튼 화면 하단에 영구 고정: 대화 / 예약관리 / 캘린더) */
    .wa-mobile-nav {
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      right: 0 !important;
      width: 100vw !important;
      height: 60px !important;
      min-height: 60px !important;
      max-height: 60px !important;
      display: flex !important;
      background: #111b21 !important;
      border-top: 1px solid #1f2c34 !important;
      padding: 4px 16px max(4px, env(safe-area-inset-bottom)) !important;
      justify-content: space-around !important;
      align-items: center !important;
      z-index: 9999 !important;
      box-sizing: border-box !important;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
    }
    .wa-nav-item {
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      color: #8696a0; cursor: pointer; font-size: 11px; position: relative; padding: 4px 16px;
      border: 0; background: transparent; font-family: inherit; line-height: inherit;
      border-radius: 12px; transition: all 0.15s ease;
      min-width: 68px; text-align: center;
    }
    .wa-nav-item.active { color: #25d366; font-weight: 700; background: rgba(37, 211, 102, 0.08); }
    .wa-nav-item .nav-icon { font-size: 20px; line-height: 1; }
    .wa-nav-item .nav-label { font-size: 11px; letter-spacing: 0.1px; }

    /* 모바일 반응형 뷰포트 전환 (WhatsApp 모바일 앱 스타일 완벽 지원) */
    .mobile-back-btn { display: none; }
    @media (max-width: 1024px) {
      .admin-layout {
        height: var(--admin-viewport-height, 100dvh);
        max-width: 100vw;
        border: none;
        overflow: hidden;
        padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
        box-sizing: border-box;
      }

      /* 좁은 화면 목록에서는 중복되는 데스크톱 헤더를 숨기고 WhatsApp 앱 헤더만 사용 */
      .admin-layout > header { display: none; }
      .wa-sidebar-header { min-height: 60px; padding: 10px 14px 8px; padding-top: max(10px, env(safe-area-inset-top)); background: #0b141a; border-bottom: 0; display: flex; align-items: center; justify-content: space-between; }
      .wa-header-brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
      .mobile-header-avatar, .header-brand-info { display: none !important; }
      .wa-mobile-brand-title { display: flex !important; align-items: center; gap: 7px; }
      .wa-mobile-brand-name { font-size: 21px; font-weight: 800; color: #25d366; letter-spacing: -0.3px; }
      .wa-mobile-version-badge { font-size: 11px; background: #103629; color: #5ef2c2; border: 1px solid #00a884; padding: 2px 7px; border-radius: 8px; font-weight: 700; }
      .wa-header-tools { gap: 6px; margin-left: auto; display: flex; align-items: center; }
      .wa-header-tools .wa-tool-btn { width: 34px; height: 34px; padding: 4px; color: #cfd8dc; background: #182229; border: 1px solid #283740; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
      .wa-header-tools .wa-tool-btn[title="🔍 대화 검색"] { display: none; }
      .wa-header-tools .wa-tool-btn[title="🔔 알림음 토글"] { display: none; }
      .wa-header-tools .wa-tool-btn[title="🔄 새로고침"] { display: inline-flex !important; font-size: 14px; color: #5ef2c2; }
      .wa-header-tools .wa-tool-btn[title="⋮ 더보기"] { font-size: 20px; }
      .wa-dropdown-menu { right: 8px; width: min(290px, calc(100vw - 24px)); }
      #roomDropdownMenu { right: 4px; }
      .sidebar-version-tag { display: none; }
      .wa-search-wrap { padding: 0 16px 12px; background: #0b141a; }
      .wa-search-inner { min-height: 52px; padding: 8px 20px; border-radius: 28px; background: #202c33; border: 0; }
      .wa-search-inner input { font-size: 16px; }
      .wa-filter-bar { gap: 6px; padding: 6px 16px 10px; }
      .wa-filter-pill { min-height: 32px; padding: 5px 13px; border-radius: 18px; }
      .wa-mobile-nav {
        height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
        min-height: 60px !important;
        max-height: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 4px 10px max(6px, env(safe-area-inset-bottom, 0px)) !important;
        background: #0b141a !important;
        box-sizing: border-box !important;
      }
      .wa-mobile-nav .wa-nav-item { min-width: 58px; min-height: 46px; justify-content: center; }

      /* 모바일 하단 탭바에 이미 존재하는 항목은 헤더에서 숨겨 상단 공간 확보 */
      .header-btn-history,
      .header-btn-ota,
      .header-btn-cctv {
        display: none !important;
      }

      /* 사이드바 & 채팅창 전환 */
      .main-body > .sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 0;
        display: flex;
        flex: 1 1 100%;
        height: 100%;
        border-right: none;
      }
      .main-body > .chat-container {
        display: none;
        width: 100%;
        height: 100%;
        min-height: 0;
      }
      .main-body.show-chat > .sidebar {
        display: none;
      }
      .main-body.show-chat > .chat-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
      }
      .mobile-back-btn {
        display: inline-flex !important;
        background: #202c33;
        border: 1px solid #374248;
        color: #25d366;
        padding: 5px 9px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        flex-shrink: 0;
      }
      .mobile-back-btn:hover {
        background: #2a3942;
        color: #5ef2c2;
      }

      /* 모바일 채팅 상단바: WhatsApp 상대 프로필 + 통화 액션 */
      .chat-subhead {
        min-height: 58px;
        padding: 6px 6px;
        padding-top: max(6px, env(safe-area-inset-top));
        gap: 5px;
        background: #0b141a;
        border-bottom: 1px solid #202c33;
        flex-shrink: 0;
      }
      .chat-subhead > div:first-child { gap: 10px !important; }
      .chat-subhead .wa-chat-back-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #e9edef;
        font-size: 32px;
        line-height: 1;
        flex-shrink: 0;
      }
      .chat-subhead .mobile-back-btn { display: none !important; }
      .chat-subhead .wa-chat-avatar {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
      }
      #currentRoomTitle {
        font-size: 17px !important;
        line-height: 21px;
      }
      #currentRoomStatus {
        font-size: 11px !important;
        color: #d1d7db !important;
      }
      .chat-subhead-actions { gap: 4px !important; }
      .chat-subhead .wa-subhead-tool-btn { width: 36px; height: 36px; font-size: 24px; color: #e9edef; background: transparent; border: none; border-radius: 50%; }
      .chat-subhead .wa-subhead-tool-btn:hover { background: rgba(255,255,255,0.08); }

      /* 모바일 대화 목록 & 하단 탭바 */
      .wa-mobile-nav {
        display: flex;
      }
      .wa-delete-room-btn {
        opacity: 0.85;
      }
      .wa-chat-item { min-width: 0; padding: 12px; gap: 11px; }
      .wa-chat-avatar {
        width: 48px;
        height: 48px;
        font-size: 19px;
      }
      .wa-chat-name, .wa-chat-snippet { min-width: 0; }
      .wa-chat-name { font-size: 14px; }
      .wa-chat-snippet { font-size: 12px; }
      .wa-chat-badges { gap: 3px; }
      .wa-star-btn, .wa-delete-room-btn { min-width: 30px; min-height: 30px; display: inline-flex; align-items: center; justify-content: center; }

      /* 모바일 채팅 피드 & 말풍선 */
      .chat-feed {
        flex: 1 1 0%;
        min-height: 0;
        padding: 12px 10px;
        gap: 9px;
        background-color: #0b141a;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%238696a0' stroke-opacity='.10' stroke-width='1.4'%3E%3Ccircle cx='20' cy='23' r='10'/%3E%3Cpath d='M11 22l18 2M20 13l-2 19M55 11l13 7-8 10-11-4zM69 59c-8-10-20 1-7 12l7 6 7-6c13-11 1-22-7-12zM18 68l12-12 12 12-12 12zM77 31l8 8-8 8-8-8zM44 42c8-4 14 0 14 6s-6 10-14 6z'/%3E%3C/g%3E%3C/svg%3E");
        background-size: 96px 96px;
      }
      .msg-box {
        max-width: 92%;
      }
      .msg-sender-tag { display: none; }
      .msg-content {
        padding: 10px 13px;
        border-radius: 19px !important;
        font-size: 16px;
        line-height: 1.38;
      }
      .msg-box.guest .msg-content, .msg-box.ai .msg-content { background: #202c33; border: 0; border-top-left-radius: 5px !important; }
      .msg-box.host .msg-content { background: #005c4b; border: 0; border-top-right-radius: 5px !important; }
      .msg-time { font-size: 11px; margin: 2px 7px 0; }

      /* 모바일 템플릿 바 (초슬림 유지) */
      .template-bar {
        display: flex !important;
        padding: 2px 6px;
        gap: 3px;
        flex-shrink: 0;
      }
      .tmpl-chip {
        padding: 1px 5px;
        font-size: 9.5px;
        height: 19px;
        line-height: 1.1;
        border-radius: 7px;
      }

      /* 모바일 WhatsApp 입력창: 번역 줄(1행)과 입력 줄(2행) 항상 완벽 노출 */
      .chat-container > footer {
        padding: 6px 8px !important;
        gap: 5px !important;
        background: #202c33 !important;
        border-top: 1px solid #283740 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        z-index: 60 !important;
        box-sizing: border-box !important;
        width: 100% !important;
      }
      .chat-container > footer.wa-host-chat-footer {
        padding: 6px 8px !important;
        gap: 5px !important;
        background: #202c33 !important;
        border-top: 1px solid #283740 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        z-index: 60 !important;
        box-sizing: border-box !important;
        width: 100% !important;
      }
      .host-trans-row {
        display: flex !important;
        order: 1 !important;
        gap: 4px !important;
        width: 100% !important;
        align-items: center !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
      .host-input-row,
      .wa-input-row.host-input-row {
        display: flex !important;
        order: 2 !important;
        gap: 6px !important;
        align-items: flex-end !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 44px !important;
        padding: 0 !important;
        background: transparent !important;
      }
      .host-input-row .wa-input-field-wrap {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: flex-end !important;
        background: #2a3942 !important;
        border-radius: 22px !important;
        padding: 5px 8px 5px 10px !important;
        min-height: 42px !important;
        box-sizing: border-box !important;
        gap: 5px !important;
      }
      .host-input-row #hostInput,
      .host-input-row textarea#hostInput {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        min-height: 24px !important;
        max-height: 112px !important;
        padding: 3px 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: 0 !important;
        color: #e9edef !important;
        font-size: 15px !important;
        font-family: inherit !important;
        resize: none !important;
        outline: none !important;
        box-shadow: none !important;
        line-height: 1.4 !important;
      }
      .host-input-row #hostInput::placeholder,
      .host-input-row textarea#hostInput::placeholder { color: #8696a0 !important; font-size: 14.5px !important; }
      .host-input-row #hostSendBtn,
      .host-input-row .wa-send-btn,
      .chat-container > footer #hostSendBtn {
        width: 42px !important;
        height: 42px !important;
        flex: 0 0 42px !important;
        border-radius: 50% !important;
        background: #00a884 !important;
        border: none !important;
        color: #fff !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
      }
      .host-input-row .translation-toggle-btn { display: none !important; }
      .host-input-row .mobile-send-btn { display: none !important; }
      .chat-version-tag { display: none; }
      .trans-lang-select-wrap {
        height: 30px;
        padding: 0 5px;
        border-radius: 15px;
      }
      .trans-lang-select {
        font-size: 10.5px;
        max-width: 78px;
      }
      .trans-quick-pills {
        gap: 2px;
      }
      .lang-pill-btn, .lang-swap-btn {
        padding: 1px 5px;
        font-size: 9.5px;
        border-radius: 8px;
      }
      .trans-apply-btn {
        height: 30px;
        padding: 0 7px;
        font-size: 10px;
        border-radius: 15px;
      }
      .trans-output-field {
        height: 30px;
        font-size: 11.5px;
        padding: 0 22px 0 8px;
        border-radius: 15px;
      }
      .wa-host-chat-footer .chat-version-tag { display: none !important; }

      /* 좁은 스마트폰 화면에서 대화 가독성과 입력 터치 영역을 우선 확보 */
      @media (max-width: 600px) {
        .wa-sidebar-header { min-height: 62px; padding: max(8px, env(safe-area-inset-top)) 12px 6px; }
        .wa-mobile-brand-name { font-size: 23px; }
        .wa-header-tools { gap: 4px; }
        .wa-header-tools .wa-tool-btn { width: 36px; height: 36px; }
        .wa-search-wrap { padding: 0 12px 8px; }
        .wa-search-inner { min-height: 44px; padding: 6px 14px; }
        .wa-filter-bar { padding: 4px 12px 8px; }
        .wa-filter-pill { min-height: 30px; padding: 4px 11px; font-size: 11px; }
        .wa-chat-item { padding: 10px; gap: 9px; }
        .wa-chat-avatar { width: 46px; height: 46px; }
        .wa-nav-item { padding-left: 6px; padding-right: 6px; }
        .chat-subhead { min-height: 56px; gap: 6px; padding-left: 4px; padding-right: 8px; }
        .chat-subhead > div:first-child { gap: 6px !important; min-width: 0; }
        .chat-subhead .wa-chat-back-btn { width: 30px; font-size: 29px; }
        .chat-subhead .wa-chat-avatar { width: 40px !important; height: 40px !important; flex: 0 0 40px; }
        #currentRoomTitle { font-size: 16px !important; line-height: 20px; }
        #currentRoomStatus { font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .chat-subhead-actions { gap: 2px !important; }
        .chat-subhead .mobile-subhead-btn { width: 36px; height: 40px; }
        .chat-feed { padding: 10px 8px; gap: 7px; }
        .msg-box { max-width: 94%; }
        .msg-content { padding: 9px 11px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
        .chat-container > footer { padding: 5px 6px !important; }
        .host-input-row,
        .wa-input-row.host-input-row { gap: 5px !important; }
        .host-input-row .wa-input-field-wrap { min-height: 40px !important; padding: 4px 6px 4px 9px !important; }
        .host-input-row textarea#hostInput { font-size: 14.5px !important; }
        .host-input-row #hostSendBtn,
        .host-input-row .wa-send-btn { width: 40px !important; height: 40px !important; flex: 0 0 40px !important; }
        .host-trans-row { gap: 3px !important; }
        .host-input-row .translation-toggle-btn, .host-input-row .mobile-send-btn { display: none !important; }
        .host-trans-row .trans-lang-select-wrap { max-width: 112px; padding: 0 5px; }
        .host-trans-row .trans-lang-select { max-width: 82px; font-size: 10px; }
        .host-trans-row .trans-output-field { font-size: 10.5px; padding-left: 7px; }
        .host-trans-apply-btn { width: 78px; height: 32px; flex: 0 0 78px; padding: 0; justify-content: center; border-radius: 17px; font-size: 10px; }
      }

      /* 모바일 모달 팝업 최적화 */
      .modal-overlay {
        padding: 8px;
      }
      .modal-card {
        padding: 16px 12px;
        border-radius: 14px;
        max-height: 94dvh;
      }
      .history-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
      }
      .stat-pill {
        padding: 6px 4px;
      }
      .stat-num {
        font-size: 16px;
      }
      .history-controls-row {
        flex-direction: column;
        gap: 6px;
      }
      .history-controls-row select {
        width: 100% !important;
      }
      .history-action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
      }
      .history-action-bar button {
        width: 100%;
        justify-content: center;
      }
      .history-feed {
        max-height: 52vh;
      }

      /* OTA 모달 모바일 최적화 */
      #otaTabManual div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
      }
      .modal-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        flex-wrap: nowrap;
      }
      .modal-tabs::-webkit-scrollbar { display: none; }
      .modal-tabs .tab-btn {
        padding: 4px 8px;
        font-size: 11px;
        white-space: nowrap;
      }
    }

    @media (max-width: 400px) {
      .chat-subhead .subhead-lbl {
        display: none !important;
      }
      .trans-action-btn span {
        display: none;
      }
      .trans-action-btn::after {
        content: '🌐';
      }
      .send-btn span {
        display: none;
      }
      .send-btn::after {
        content: '➤';
      }
    }



    /* 우측 게스트 실시간 시뮬레이터 패널 (양방향 대화 확장창) */
    .guest-preview-panel {
      width: clamp(340px, 30vw, 440px);
      min-width: 320px;
      max-width: 42vw;
      background: #111b21;
      border-left: 1px solid var(--border-color);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      height: 100%;
      box-shadow: -4px 0 20px rgba(0,0,0,0.4);
      z-index: 30;
    }
    .preview-header {
      background: #182229;
      padding: 8px 12px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
    .preview-title {
      font-size: 12px;
      font-weight: 700;
      color: #ffd279;
      display: flex;
      align-items: center;
      gap: 6px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .preview-live-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #25d366;
      display: inline-block;
      box-shadow: 0 0 6px #25d366;
      animation: cctvPulse 1.2s infinite ease-in-out;
    }
    .preview-tools {
      display: flex;
      gap: 4px;
      align-items: center;
      flex-shrink: 0;
    }
    .preview-frame-wrap {
      flex: 1;
      background: #0b141a;
      position: relative;
      overflow: hidden;
    }
    .preview-frame-wrap iframe {
      width: 100%;
      height: 100%;
      border: none;
      display: block;
    }
    .msg-del-icon-btn {
      background: none;
      border: none;
      color: var(--text-sub);
      opacity: 0.45;
      cursor: pointer;
      padding: 0 4px;
      font-size: 11px;
      float: right;
      transition: opacity 0.2s, transform 0.15s;
    }
    .msg-del-icon-btn:hover {
      opacity: 1;
      transform: scale(1.2);
    }
    .preview-footer-hint {
      background: #182229;
      padding: 6px 10px;
      font-size: 10.5px;
      color: var(--text-sub);
      border-top: 1px solid var(--border-color);
      line-height: 1.4;
      text-align: center;
    }
    @media (max-width: 900px) {
      .guest-preview-panel {
        position: fixed;
        inset: 0;
        width: 100% !important;
        max-width: 100% !important;
        z-index: 1050;
      }
    }

    /* 우측 채팅 영역 */
    .chat-container { flex: 1 1 0%; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--wa-bg); overflow: hidden; }
    .chat-subhead {
      background: #182229; padding: 6px 12px; border-bottom: 1px solid var(--border-color);
      display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 8px;
      position: relative; flex-shrink: 0;
    }
    .wa-subhead-tool-btn {
      width: 36px; height: 36px; border-radius: 50%; background: transparent; border: none;
      color: #aebac1; font-size: 22px; cursor: pointer; display: inline-flex; align-items: center;
      justify-content: center; flex-shrink: 0; transition: background 0.15s ease, color 0.15s ease;
      line-height: 1; padding: 0;
    }
    .wa-subhead-tool-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
    .wa-subhead-tool-btn:active { background: rgba(255,255,255,0.14); }
    .wa-guest-switch-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 30px;
      padding: 0 10px;
      border-radius: 999px;
      background: linear-gradient(135deg, #1f2329 0%, #121417 100%);
      border: 1.2px solid #38404a;
      color: #e2e6eb;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
      transition: all 0.18s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .wa-guest-switch-btn:hover {
      background: linear-gradient(135deg, #2a3038 0%, #191c21 100%);
      border-color: #505c6a;
      color: #f0f3f6;
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    }
    .wa-guest-switch-btn.active {
      background: linear-gradient(135deg, #2d343e 0%, #1c2026 100%);
      border-color: #637182;
      color: #f0f3f6;
      box-shadow: 0 0 14px rgba(0, 0, 0, 0.7);
    }
    .wa-guest-switch-btn .wa-icon-circle {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(226, 230, 235, 0.12);
      border: 1px solid rgba(226, 230, 235, 0.2);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .wa-guest-switch-btn:hover .wa-icon-circle,
    .wa-guest-switch-btn.active .wa-icon-circle {
      background: rgba(226, 230, 235, 0.2);
      border-color: rgba(226, 230, 235, 0.35);
    }
    @media (max-width: 600px) {
      .wa-guest-switch-btn {
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
        gap: 4px;
      }
      .wa-guest-switch-btn .wa-icon-circle {
        width: 18px;
        height: 18px;
      }
    }
    .chat-feed { flex: 1 1 0%; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }

    /* 날짜 구분선 */
    .chat-date-divider {
      display: flex; justify-content: center; align-items: center; margin: 14px 0 6px; position: relative;
    }
    .chat-date-divider::before {
      content: ''; position: absolute; left: 0; right: 0; height: 1px; background: #283740; z-index: 1;
    }
    .chat-date-divider span {
      background: #182229; border: 1px solid #2d424f; border-radius: 12px; padding: 3px 12px; font-size: 11px;
      color: var(--gold-accent); position: relative; z-index: 2; font-weight: 600;
    }

    .msg-box { display: flex; flex-direction: column; max-width: 82%; }
    .msg-box.guest { align-self: flex-start; }
    .msg-box.ai { align-self: flex-start; }
    .msg-box.host { align-self: flex-end; }

    .msg-sender-tag { font-size: 11px; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
    .msg-box.guest .msg-sender-tag { color: #8ad4ff; }
    .msg-box.ai .msg-sender-tag { color: var(--text-sub); }
    .msg-box.host .msg-sender-tag { color: var(--gold-accent); align-self: flex-end; }

    .msg-content {
      padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; word-break: break-word; white-space: pre-wrap;
    }
    .msg-box.guest .msg-content { background: #1c2b33; border-top-left-radius: 2px; border: 1px solid #2d424f; }
    .msg-box.ai .msg-content { background: var(--wa-bubble-bot); border-top-left-radius: 2px; }
    .msg-box.host .msg-content { background: var(--wa-bubble-host); border-top-right-radius: 2px; border: 1px solid var(--gold-accent); color: #fff; }

    .msg-time { font-size: 10px; color: var(--text-sub); margin-top: 3px; }
    .msg-box.host .msg-time { align-self: flex-end; }

    /* 템플릿 빠른 전송 (글씨 딱 맞게 아주 얇은 초슬림 바) */
    .template-bar {
      padding: 2px 6px; background: #111b21; border-top: 1px solid var(--border-color);
      display: flex !important; align-items: center; gap: 3px; overflow-x: auto;
      scrollbar-width: none; -ms-overflow-style: none; flex-shrink: 0;
    }
    .template-bar::-webkit-scrollbar { display: none; }
    .tmpl-chip {
      background: #182229; border: 1px solid #32444f; color: #ffd279; padding: 1px 6px; border-radius: 8px;
      font-size: 10px; line-height: 1.2; height: 20px; display: inline-flex; align-items: center; justify-content: center;
      white-space: nowrap; cursor: pointer; transition: background 0.15s ease; flex-shrink: 0;
    }
    .tmpl-chip:hover { background: #263842; }

      /* 하단 입력창 */
      footer {
      padding: 5px 10px calc(5px + env(safe-area-inset-bottom)); background: var(--wa-header);
      border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
    }
    .input-row { display: flex; gap: 4px; align-items: center; }
    .input-row input {
      flex: 1; border: none; border-radius: 16px; padding: 6px 12px; font-size: 13px; outline: none; background: #2a3942; color: #fff;
    }
    .input-row input::placeholder { color: #8696a0; }
    .send-btn {
      padding: 0 12px; height: 32px; border-radius: 16px; background: var(--gold-accent); color: #231904; font-weight: 700;
      border: none; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 4px; flex-shrink: 0;
      transition: background 0.15s ease;
    }
    .send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
      footer .send-btn.mobile-send-btn { display: none; }
    .mobile-send-btn { display: none; }
    .translation-toggle-btn { display: none; }

    /* 파일 및 동영상 첨부/다운로드 스타일 */
    .attach-btn {
      width: 32px; height: 32px; border-radius: 50%; background: #202c33; border: 1px solid #374248;
      color: #8696a0; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: all 0.15s ease;
    }
    .attach-btn:hover { background: #2a3942; color: #e9edef; border-color: var(--gold-accent); }
    .attach-preview-bar {
      background: #182229; border: 1px solid var(--gold-accent); border-radius: 12px; padding: 6px 12px;
      display: flex; justify-content: space-between; align-items: center; font-size: 12px;
    }
    .attach-preview-content { display: flex; align-items: center; gap: 6px; overflow: hidden; }
    .attach-preview-name { color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; max-width: 220px; }
    .attach-preview-size { color: var(--text-sub); font-size: 11px; }
    .attach-cancel-btn { background: none; border: none; color: #8696a0; cursor: pointer; font-size: 15px; padding: 2px 6px; }
    .attach-cancel-btn:hover { color: #ef5350; }
    .chat-media-wrap {
      margin-top: 6px; border-radius: 10px; overflow: hidden; background: #111b21; border: 1px solid #283740;
      max-width: 100%; display: flex; flex-direction: column;
    }
    .chat-video-player {
      width: 100%; max-height: 260px; background: #000; border-radius: 8px 8px 0 0; outline: none; display: block;
    }
    .chat-img-thumb {
      width: 100%; max-height: 240px; object-fit: cover; border-radius: 8px 8px 0 0; cursor: pointer;
      transition: opacity 0.15s ease; display: block;
    }
    .chat-img-thumb:hover { opacity: 0.9; }
    .chat-media-footer {
      padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; background: #182229;
    }
    .media-title { color: #e9edef; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
    .media-dl-btn {
      background: #202c33; color: var(--gold-accent); border: 1px solid var(--gold-accent); padding: 4px 9px; border-radius: 8px;
      font-size: 10.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
      display: inline-flex; align-items: center; gap: 4px; transition: background 0.15s ease;
    }
    .media-dl-btn:hover { background: #3b2d11; color: #fff; }
    .file-box {
      flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; background: #182229; border-radius: 10px;
    }
    .file-icon-badge {
      width: 36px; height: 36px; border-radius: 8px; background: #202c33; border: 1px solid #374248;
      display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
    }
    .file-info-col { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
    .file-name-text { font-size: 12.5px; font-weight: 600; color: #fff; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
    .file-size-text { font-size: 10.5px; color: var(--text-sub); }

    /* CCTV 실시간 라이브 임베드 플레이어 카드 스타일 (모던 다크그레이 테마) */
    .cctv-media-card {
      border: 1px solid #2a3942 !important;
      background: #111b21 !important;
      width: 100%;
      max-width: 460px;
      border-radius: 10px;
      overflow: hidden;
      margin-top: 4px;
    }
    .cctv-live-badge-bar {
      display: flex; align-items: center; justify-content: space-between;
      padding: 5px 9px; background: #182229; border-bottom: 1px solid #2a3942;
    }
    .cctv-live-info { display: flex; align-items: center; gap: 6px; }
    .cctv-live-dot {
      width: 7px; height: 7px; background: #00a884; border-radius: 50%;
      display: inline-block; box-shadow: 0 0 5px #00a884;
      animation: cctvPulse 1.2s infinite ease-in-out;
    }
    @keyframes cctvPulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.35; transform: scale(0.8); }
    }
    .cctv-live-tag {
      font-weight: 700; color: #00a884; font-size: 10.5px; letter-spacing: 0.5px;
    }
    .cctv-live-title {
      font-size: 11.5px; color: #e9edef; font-weight: 500;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
    }
    .cctv-iframe-box {
      position: relative; width: 100%; padding-top: 56.25%; /* 16:9 비율 */
      background: #000; overflow: hidden;
    }
    .chat-cctv-iframe {
      position: absolute; top: 0; left: 0; width: 100%; height: 100%;
      border: 0; outline: none;
    }
    .cctv-btn-youtube {
      background: #202c33 !important; color: #cfd8dc !important; border: 1px solid #374248 !important;
      border-radius: 6px !important; padding: 4px 8px !important; font-size: 10.5px !important;
      text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
    }
    .cctv-btn-youtube:hover {
      background: #283740 !important; color: #fff !important; border-color: #53bdeb !important;
    }

    /* 알찬 CCTV 채널 그리드 (3열 균등 바둑판 배치) */
    .cctv-channels-box {
      margin-top: 8px;
      padding: 8px 10px;
      background: #111b21;
      border-top: 1px solid #283740;
      border-radius: 0 0 10px 10px;
    }
    .cctv-grid-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 5px;
      margin-top: 6px;
    }
    @media (max-width: 360px) {
      .cctv-grid-container {
        grid-template-columns: repeat(2, 1fr);
      }
    }
    .cctv-grid-btn {
      background: #182229;
      border: 1px solid #283740;
      color: #cfd8dc;
      border-radius: 7px;
      padding: 5px 4px;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      transition: all 0.15s ease;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      user-select: none;
      box-sizing: border-box;
      width: 100%;
    }
    .cctv-grid-btn:hover {
      background: #202c33;
      border-color: #00a884;
      color: #e9edef;
    }
    .cctv-grid-btn.active {
      background: #103629 !important;
      border-color: #00a884 !important;
      color: #5ef2c2 !important;
      font-weight: 700 !important;
      box-shadow: 0 0 8px rgba(0, 168, 132, 0.35);
    }
    .cctv-grid-btn .cctv-btn-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #8696a0;
      flex-shrink: 0;
      transition: all 0.15s ease;
    }
    .cctv-grid-btn.active .cctv-btn-dot {
      background: #25d366;
      box-shadow: 0 0 5px #25d366;
      animation: cctvPulse 1.2s infinite ease-in-out;
    }

    /* 채팅창 내부 전송용 인챗 카드 (택시 길안내, 맛집 BEST 10, 예약 캘린더) - 세로 여백 최적화 */
    .chat-card-wrap {
      background: #111b21;
      border: 1px solid #283740;
      border-radius: 10px;
      padding: 8px 10px;
      margin-top: 4px;
      color: #e9edef;
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
      width: 100%;
      box-sizing: border-box;
    }
    .taxi-card-box {
      border-color: #ffd279;
      background: linear-gradient(145deg, #182229, #111b21);
    }
    .food-card-box {
      border-color: #00a884;
      background: linear-gradient(145deg, #13222a, #111b21);
    }
    .cal-card-box {
      border-color: #53bdeb;
      background: linear-gradient(145deg, #132029, #111b21);
    }
    .chat-card-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 6px;
    }
    .chat-card-pill {
      margin-left: auto;
      font-size: 9.5px;
      background: #ffd279;
      color: #111b21;
      font-weight: 700;
      padding: 2px 5px;
      border-radius: 4px;
      flex-shrink: 0;
    }
    .chat-card-btn-row {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      margin-top: 6px;
    }
    .chat-card-btn {
      background: #202c33;
      border: 1px solid #374248;
      color: #8ad4ff;
      padding: 5px 9px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .chat-card-btn:hover {
      background: #283740;
      border-color: #8ad4ff;
      color: #fff;
    }
    .chat-card-btn.primary {
      background: #103629;
      border-color: #00a884;
      color: #5ef2c2;
    }
    .chat-card-btn.primary:hover {
      background: #144937;
    }
    .chat-food-scroll-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: 420px;
      overflow-y: auto;
      padding-right: 4px;
      margin-top: 4px;
    }
    .chat-food-item {
      background: #182229;
      border: 1px solid #2a3942;
      border-radius: 8px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .chat-food-img {
      width: 100%;
      height: 100px;
      object-fit: cover;
      background: #202c33;
      display: block;
    }
    .chat-food-info {
      padding: 6px 8px;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .chat-food-name {
      font-size: 13.5px;
      font-weight: 700;
      color: #fff;
    }
    .chat-food-tag {
      font-size: 10px;
      color: var(--gold-accent);
      background: #2a2212;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 600;
    }
    .chat-food-reason {
      font-size: 11.5px;
      line-height: 1.45;
      color: #d1d7db;
      background: #111b21;
      padding: 6px 8px;
      border-radius: 6px;
    }
    .chat-food-reason strong {
      color: #5ef2c2;
    }
    .chat-food-links {
      display: flex;
      gap: 6px;
      margin-top: 4px;
    }
    .chat-food-link-btn {
      flex: 1;
      text-align: center;
      text-decoration: none;
      padding: 5px 8px;
      font-size: 11px;
      border-radius: 6px;
      background: #202c33;
      color: #8ad4ff;
      border: 1px solid #374248;
    }
    .chat-food-link-btn:hover {
      background: #2a3942;
      color: #fff;
    }

    /* 실시간 번역 UI 스타일 (여백 없이 컴팩트하고 깔끔하게) */
    .trans-box {
      margin-top: 4px;
      padding: 4px 8px;
      background: #0d161a;
      border: 1px solid #1f3540;
      border-left: 2px solid #00a884;
      border-radius: 6px;
      font-size: 11.5px;
      color: #e9edef;
    }
    .trans-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2px;
      font-size: 10.5px;
    }
    .trans-badge {
      color: #5ef2c2;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }
    .trans-reload-btn {
      background: none;
      border: none;
      color: #8696a0;
      font-size: 9.5px;
      cursor: pointer;
      padding: 1px 3px;
      transition: color 0.15s ease;
    }
    .trans-reload-btn:hover { color: #fff; }
    .trans-body {
      line-height: 1.4;
      color: #d1d7db;
      word-break: break-word;
    }
    .trans-loading {
      color: #8696a0;
      font-style: italic;
      font-size: 10.5px;
    }
    /* 깔끔한 2줄 실시간 번역 전송 바 */
    .host-input-row {
      display: flex;
      gap: 5px;
      align-items: center;
      width: 100%;
    }
    .host-input-row input#hostInput {
      flex: 1;
      border: 1px solid #283740;
      border-radius: 16px;
      padding: 6px 12px;
      font-size: 13px;
      height: 32px;
      outline: none;
      background: #202c33;
      color: #fff;
      transition: all 0.2s ease;
      box-sizing: border-box;
    }
    .host-input-row input#hostInput:focus {
      border-color: #00a884;
      background: #24343d;
      box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.25);
    }
    .host-input-row input#hostInput::placeholder {
      color: #8696a0;
      font-size: 12.5px;
    }
    .host-trans-row {
      display: flex;
      gap: 5px;
      align-items: center;
      width: 100%;
    }
    .trans-lang-select-wrap {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #202c33;
      border: 1px solid #3b4a54;
      border-radius: 16px;
      padding: 0 7px;
      height: 32px;
      flex-shrink: 0;
      transition: border-color 0.2s ease;
      box-sizing: border-box;
    }
    .trans-lang-select-wrap:hover, .trans-lang-select-wrap:focus-within {
      border-color: #ffd279;
    }
    .trans-lang-icon {
      font-size: 12px;
      line-height: 1;
    }
    .trans-lang-select {
      background: transparent;
      color: #ffd279;
      border: none;
      font-size: 11.5px;
      font-weight: 700;
      outline: none;
      cursor: pointer;
      padding: 0;
    }
    .trans-lang-select option {
      background: #111b21;
      color: #fff;
    }
    .trans-output-wrap {
      flex: 1;
      position: relative;
      display: flex;
      align-items: center;
      min-width: 0;
    }
    .host-trans-apply-btn { width: 78px; height: 32px; flex: 0 0 78px; padding: 0; justify-content: center; border-radius: 17px; font-size: 10px; }
    .trans-output-field {
      width: 100%;
      height: 32px;
      border: 1px solid #00a884;
      border-radius: 16px;
      padding: 0 28px 0 10px;
      font-size: 12px;
      outline: none;
      background: #142a22;
      color: #5ef2c2;
      font-weight: 500;
      transition: all 0.2s ease;
      box-sizing: border-box;
    }
    .trans-output-field:focus {
      border-color: #25d366;
      background: #17382d;
      box-shadow: 0 0 10px rgba(37, 211, 102, 0.25);
      color: #fff;
    }
    .trans-output-field::placeholder {
      color: #528974;
      font-size: 11.5px;
      font-weight: normal;
    }
    .trans-status-indicator {
      position: absolute;
      right: 8px;
      font-size: 11.5px;
      pointer-events: none;
      animation: spinIndicator 1.2s infinite linear;
    }
    .trans-apply-btn {
      height: 32px;
      padding: 0 9px;
      font-size: 10.5px;
      font-weight: 600;
      border-radius: 16px;
      background: #005c4b;
      color: #5ef2c2;
      border: 1px solid #00a884;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s ease, transform 0.1s ease;
    }
    .trans-apply-btn:hover {
      background: #008069;
      color: #fff;
    }
    .trans-apply-btn:active {
      transform: scale(0.95);
    }
    @keyframes transPulseGlow {
      0% { box-shadow: 0 0 0 rgba(0, 168, 132, 0); border-color: #2a3942; }
      50% { box-shadow: 0 0 16px rgba(37, 211, 102, 0.7); border-color: #25d366; background: #1a2c35; }
      100% { box-shadow: 0 0 0 rgba(0, 168, 132, 0); border-color: #2a3942; }
    }
    .input-trans-glow {
      animation: transPulseGlow 1.2s ease-out;
    }
    @keyframes spinIndicator {
      0% { transform: rotate(0deg); opacity: 0.6; }
      50% { opacity: 1; }
      100% { transform: rotate(360deg); opacity: 0.6; }
    }
    /* 대상 언어 퀵 칩 및 입력창 적용 버튼 스타일 */
    .trans-quick-pills {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }
    .lang-pill-btn {
      background: #202c33;
      color: #8696a0;
      border: 1px solid #374248;
      border-radius: 14px;
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .lang-pill-btn:hover {
      background: #2a3942;
      color: #ffd279;
      border-color: #ffd279;
    }
    .lang-pill-btn.active {
      background: #3b2d11;
      color: #ffd279;
      border-color: #ffd279;
      box-shadow: 0 0 6px rgba(255, 210, 121, 0.35);
    }
    .lang-swap-btn {
      background: #103629;
      color: #00a884;
      border: 1px solid #00a884;
      border-radius: 14px;
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .lang-swap-btn:hover {
      background: #00a884;
      color: #fff;
    }
    .trans-apply-btn {
      background: #103629;
      color: #25d366;
      border: 1px solid #25d366;
      border-radius: 16px;
      padding: 0 9px;
      height: 38px;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      transition: all 0.15s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .trans-apply-btn:hover {
      background: #25d366;
      color: #111b21;
    }
    .broadcast-banner {
      background: linear-gradient(90deg, #38280f, #221706);
      border: 1.5px solid #ffd279;
      color: #ffd279;
      padding: 8px 14px;
      font-size: 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 0 14px 6px;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }
    .broadcast-active-btn {
      background: #ffd279 !important;
      color: #111b21 !important;
      border-color: #ffd279 !important;
      font-weight: 700 !important;
      box-shadow: 0 0 10px rgba(255, 210, 121, 0.5) !important;
    }

    /* OTA 예약 카드 및 자동 발송 스타일 */
    .reservation-card-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 480px;
      overflow-y: auto;
      padding-right: 4px;
    }
    .res-card {
      background: #111b21;
      border: 1px solid #283740;
      border-radius: 12px;
      padding: 12px 14px;
      display: flex;
      gap: 14px;
      align-items: center;
      transition: all 0.15s ease;
    }
    .res-card:hover { border-color: #00a884; background: #13222a; }
    .res-qr-thumb {
      width: 90px;
      height: 90px;
      border-radius: 8px;
      background: #fff;
      padding: 4px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }
    .res-qr-thumb img {
      width: 100%;
      height: 100%;
      display: block;
    }
    .res-info {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .res-header-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .platform-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .platform-badge.airbnb { background: #ff385c; color: #fff; }
    .platform-badge.booking { background: #003580; color: #fff; }
    .platform-badge.direct { background: #00a884; color: #fff; }
    .res-guest-name {
      font-size: 14px;
      font-weight: 700;
      color: #fff;
    }
    .res-detail-row {
      font-size: 11.5px;
      color: var(--text-sub);
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 2px;
    }
    .res-actions-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 6px;
    }
    .res-actions-row .btn {
      border-radius: 16px;
      font-size: 11.5px;
      padding: 5px 11px;
      transition: transform 0.12s ease, opacity 0.12s ease;
    }
    .res-actions-row .btn:hover {
      transform: translateY(-1px);
    }
    .ota-tabs-nav {
      display: grid !important;
      grid-auto-flow: column;
      grid-template-rows: repeat(2, auto);
      gap: 6px 8px;
      margin-bottom: 12px;
      border-bottom: 1px solid #222d34;
      padding-bottom: 10px;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: thin;
      scrollbar-color: #374248 transparent;
      -webkit-overflow-scrolling: touch;
    }
    .ota-tabs-nav::-webkit-scrollbar {
      height: 4px;
      display: block;
    }
    .ota-tabs-nav::-webkit-scrollbar-track {
      background: transparent;
    }
    .ota-tabs-nav::-webkit-scrollbar-thumb {
      background: #374248;
      border-radius: 4px;
    }
    .ota-tabs-nav .tab-btn {
      padding: 5px 11px;
      font-size: 11.5px;
      border-radius: 14px;
      background: #202c33;
      border: 1px solid #283740;
      color: #cfd8dc;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-height: 28px;
      box-sizing: border-box;
    }
    .ota-tabs-nav .tab-btn:hover {
      background: #2a3942;
      color: #e9edef;
      border-color: #374248;
    }
    .ota-tabs-nav .tab-btn.active,
    .modal-tabs .tab-btn.active {
      background: #00a884 !important;
      color: #ffffff !important;
      border-color: #00a884 !important;
      font-weight: 600 !important;
      box-shadow: 0 2px 8px rgba(0, 168, 132, 0.35);
    }

    /* 토스트 알림 */
    .sound-toast {
      position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
      background: rgba(17, 27, 33, 0.95); color: #5ef2c2; border: 1px solid #00a884;
      padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 500;
      z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,0.6); pointer-events: none;
      transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .sound-toast.hide { opacity: 0; transform: translate(-50%, -8px); }

    /* 모달 공통 스타일 */
    .modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000;
      display: none; align-items: center; justify-content: center; padding: 16px;
    }
    .modal-overlay.open { display: flex; }
    .modal-card {
      background: #182229; border: 1px solid #374248; border-radius: 16px; padding: 22px; width: 100%; max-width: 520px;
      color: var(--text-main); max-height: 90vh; overflow-y: auto;
    }
    .form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; text-align: left; }
    .form-group label { font-size: 11.5px; color: var(--text-sub); }
    .form-control {
      padding: 9px 12px; border-radius: 8px; border: 1px solid #374248; background: #202c33; color: #fff; font-size: 13px; outline: none;
    }
    .qr-preview-box {
      background: #fff; padding: 14px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin: 10px 0;
    }

    /* 대화 히스토리 모달 전용 스타일 */
    .history-stats-grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; margin-bottom: 12px;
    }
    .stat-pill {
      background: #111b21; border: 1px solid #283740; border-radius: 10px; padding: 10px 8px; text-align: center;
      display: flex; flex-direction: column; gap: 2px;
    }
    .stat-pill.alert { border-color: #ef5350; }
    .stat-pill.alert .stat-num { color: #ef5350; }
    .stat-num { font-size: 19px; font-weight: 700; color: var(--gold-accent); }
    .stat-lbl { font-size: 10.5px; color: var(--text-sub); }
    .history-controls-row {
      display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
    }
    .history-action-bar {
      display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
      background: #111b21; padding: 8px 12px; border-radius: 10px; border: 1px solid #283740; margin-bottom: 12px;
    }
    .history-feed {
      max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px;
    }
    .history-item-card {
      background: #111b21; border: 1px solid #283740; border-radius: 10px; padding: 10px 12px;
      display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s ease;
    }
    .history-item-card:hover { border-color: #3f5564; }
    .history-item-header {
      display: flex; justify-content: space-between; align-items: center; font-size: 11.5px;
    }
    .history-item-body {
      font-size: 13px; line-height: 1.5; color: #e9edef; word-break: break-word; white-space: pre-wrap;
      background: #182229; padding: 8px 10px; border-radius: 8px;
    }
    .badge-tag {
      font-size: 10.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
    }
    .badge-tag.guest { background: #1c2b33; color: #8ad4ff; border: 1px solid #2d424f; }
    .badge-tag.ai { background: #202c33; color: #5ef2c2; border: 1px solid #00a884; }
    .badge-tag.host { background: #3b2d11; color: var(--gold-accent); border: 1px solid var(--gold-accent); }
    .badge-tag.alert { background: #3b1818; color: #ef5350; border: 1px solid #ef5350; }

    /* ============================================================
       삼성 캘린더 (Samsung One UI Dark Calendar) 전용 스타일
       ============================================================ */
    #adminCalendarPage.cal-page > .modal-card.samsung-cal-container {
      max-width: 900px;
      margin: 0 auto;
      background: #0b141a;
      padding: 14px 14px calc(86px + env(safe-area-inset-bottom));
    }

    .samsung-cal-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 4px 2px 12px;
      border-bottom: 1px solid #1f2c34;
      flex-wrap: wrap;
    }

    .samsung-cal-title-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .samsung-month-title {
      font-size: 21px;
      font-weight: 800;
      color: #ffffff;
      letter-spacing: -0.4px;
      cursor: pointer;
      min-width: 118px;
      text-align: center;
      user-select: none;
    }

    .samsung-month-arrow {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 1px solid #2a3942;
      background: #182229;
      color: #e9edef;
      font-size: 22px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.15s ease;
      padding: 0 0 2px 0;
    }
    .samsung-month-arrow:hover,
    .samsung-month-arrow:active {
      background: #283740;
      border-color: #00a884;
      color: #ffffff;
    }

    .samsung-cal-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .samsung-today-badge-btn {
      background: #182229;
      border: 1px solid #374248;
      color: #e9edef;
      border-radius: 18px;
      padding: 5px 10px 5px 7px;
      font-size: 12px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .samsung-today-badge-btn:hover {
      border-color: #00a884;
      background: #202c33;
    }
    .samsung-today-num {
      background: #00a884;
      color: #ffffff;
      font-size: 11px;
      font-weight: 800;
      width: 20px;
      height: 20px;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .samsung-action-pill {
      border-radius: 18px;
      padding: 6px 11px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: all 0.15s ease;
    }
    .samsung-action-pill.sync {
      background: #103629;
      color: #25d366;
      border: 1px solid #00a884;
    }
    .samsung-action-pill.sync:hover {
      background: #00a884;
      color: #0b141a;
    }
    .samsung-action-pill.add {
      background: #202c33;
      color: #ffd279;
      border: 1px solid rgba(255, 210, 121, 0.4);
    }
    .samsung-action-pill.add:hover {
      background: #2c3b44;
      border-color: #ffd279;
    }

    /* 범례 바 */
    .samsung-cal-legend {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 8px 12px;
      margin: 10px 0;
      background: #111b21;
      border-radius: 12px;
      border: 1px solid #1f2c34;
      flex-wrap: wrap;
    }
    .s-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 600;
      color: #d1d7db;
    }
    .s-legend-dot {
      width: 11px;
      height: 11px;
      border-radius: 3px;
      display: inline-block;
      flex-shrink: 0;
    }
    .s-legend-dot.booking { background: #1e88e5; }
    .s-legend-dot.airbnb { background: #ffb300; }
    .s-legend-dot.direct { background: #00a884; }
    .s-legend-dot.blocked { background: #e53935; }

    /* 삼성 캘린더 월간 보드 (요일 + 7열 그리드) */
    .samsung-cal-board {
      background: #111b21;
      border-radius: 16px;
      border: 1px solid #222e35;
      overflow: hidden;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
      touch-action: pan-y;
      user-select: none;
      -webkit-user-select: none;
      cursor: grab;
      position: relative;
    }
    .samsung-cal-board.is-dragging {
      cursor: grabbing;
    }

    .cal-weekdays {
      display: grid !important;
      grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
      text-align: center;
      padding: 10px 0 8px;
      background: #162127;
      border-bottom: 1px solid #222e35;
      margin: 0 !important;
      user-select: none;
    }
    .cal-weekday {
      font-size: 12px;
      font-weight: 700;
      color: #9aa5ad;
    }
    .cal-weekday.sun { color: #ff6b6b; }
    .cal-weekday.sat { color: #5c9dff; }

    .cal-grid {
      display: grid !important;
      grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
      gap: 0 !important;
      background: #111b21;
      padding: 0 !important;
      will-change: transform, opacity;
    }

    /* 삼성 캘린더 좌우 슬라이드 & 3D 롤 애니메이션 */
    @keyframes calRollInFromRight {
      0% {
        opacity: 0.15;
        transform: translate3d(65px, 0, 0);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    @keyframes calRollInFromLeft {
      0% {
        opacity: 0.15;
        transform: translate3d(-65px, 0, 0);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    @keyframes calTitleRollLeft {
      0% {
        opacity: 0.2;
        transform: translate3d(24px, 0, 0);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    @keyframes calTitleRollRight {
      0% {
        opacity: 0.2;
        transform: translate3d(-24px, 0, 0);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    .cal-roll-in-left {
      animation: calRollInFromRight 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) forwards !important;
    }

    .cal-roll-in-right {
      animation: calRollInFromLeft 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) forwards !important;
    }

    .cal-title-roll-left {
      animation: calTitleRollLeft 0.22s cubic-bezier(0.2, 0.9, 0.3, 1) forwards !important;
    }

    .cal-title-roll-right {
      animation: calTitleRollRight 0.22s cubic-bezier(0.2, 0.9, 0.3, 1) forwards !important;
    }

    .cal-day-cell {
      min-height: 82px;
      padding: 5px 2px 4px;
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
      position: relative;
      border-bottom: 1px solid #1c2830;
      border-right: 1px solid #18232a;
      background: #111b21;
      transition: background 0.12s ease;
      overflow: hidden;
      user-select: none;
    }
    .cal-day-cell:nth-child(7n) {
      border-right: none;
    }
    .cal-day-cell:hover {
      background: #18252d;
    }
    .cal-day-cell.other-month {
      opacity: 0.3;
      background: #0c1418;
    }

    .cal-day-num {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12.5px;
      font-weight: 700;
      color: #e9edef;
      margin-bottom: 3px;
      flex-shrink: 0;
      line-height: 1;
    }
    .cal-day-cell.sun .cal-day-num { color: #ff6b6b; }
    .cal-day-cell.sat .cal-day-num { color: #5c9dff; }

    /* 오늘 날짜: 삼성 캘린더 시그니처 원형 배지 */
    .cal-day-cell.today .cal-day-num {
      background: #00a884;
      color: #ffffff !important;
      font-weight: 800;
      box-shadow: 0 2px 6px rgba(0, 168, 132, 0.45);
    }

    /* 선택된 날짜: 삼성 캘린더 포커스 링 */
    .cal-day-cell.selected {
      background: rgba(255, 210, 121, 0.08);
      box-shadow: inset 0 0 0 2px #ffd279;
      z-index: 2;
    }

    /* 날짜 셀 내부 일정 막대 (Event Bars) */
    .cal-events-wrap {
      display: flex;
      flex-direction: column;
      gap: 2px;
      width: 100%;
      padding: 0 2px;
      overflow: hidden;
    }
    .cal-event-bar {
      font-size: 10px;
      font-weight: 700;
      line-height: 1.25;
      padding: 2px 4px;
      border-radius: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
      text-align: left;
      letter-spacing: -0.2px;
    }
    .cal-event-booking {
      background: #1565c0;
      color: #ffffff;
      border-left: 2.5px solid #64b5f6;
    }
    .cal-event-airbnb {
      background: #ffb300;
      color: #111b21;
      border-left: 2.5px solid #ffe082;
    }
    .cal-event-direct {
      background: #00897b;
      color: #ffffff;
      border-left: 2.5px solid #80cbc4;
    }
    .cal-event-blocked {
      background: #c62828;
      color: #ffffff;
      border-left: 2.5px solid #ff8a80;
    }

    /* 삼성 캘린더 하단 선택 날짜 상세 시트 (Agenda Sheet) */
    .samsung-agenda-sheet {
      margin-top: 14px;
      background: #111b21;
      border-radius: 16px;
      padding: 14px;
      border: 1px solid #222e35;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    }
    .samsung-agenda-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      padding-bottom: 10px;
      border-bottom: 1px solid #1f2c34;
    }
    .samsung-agenda-date-wrap {
      font-size: 15px;
      font-weight: 800;
      color: #ffffff;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .samsung-agenda-btns {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .samsung-block-btn {
      background: #2a1f0a;
      color: #ffd279;
      border: 1px solid #ffd279;
      font-weight: 700;
      padding: 6px 11px;
      font-size: 11.5px;
      border-radius: 10px;
    }
    .samsung-share-btn {
      padding: 6px 11px;
      font-size: 11.5px;
      border-radius: 10px;
    }
    .samsung-agenda-list {
      margin-top: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .cal-detail-item {
      background: #182229;
      padding: 12px 14px;
      border-radius: 12px;
      font-size: 12.5px;
      line-height: 1.5;
      border-left: 4px solid #00a884;
    }
    .cal-detail-item.airbnb-item { border-left-color: #ffb300; }
    .cal-detail-item.booking-item { border-left-color: #1e88e5; }
    .cal-detail-item.direct-item { border-left-color: #00a884; }
    .cal-detail-item.blocked-item { border-left-color: #e53935; }

    @media (max-width: 600px) {
      #adminCalendarPage.cal-page > .modal-card.samsung-cal-container {
        padding: 10px 8px calc(84px + env(safe-area-inset-bottom));
      }
      .samsung-month-title {
        font-size: 18px;
        min-width: 102px;
      }
      .samsung-month-arrow {
        width: 30px;
        height: 30px;
        font-size: 19px;
      }
      .samsung-cal-legend {
        gap: 10px;
        padding: 7px 10px;
        margin: 8px 0;
      }
      .s-legend-item {
        font-size: 11px;
      }
      .cal-day-cell {
        min-height: 72px;
        padding: 4px 1.5px 3px;
      }
      .cal-day-num {
        width: 22px;
        height: 22px;
        font-size: 11.5px;
      }
      .cal-event-bar {
        font-size: 9.5px;
        padding: 1.5px 3px;
      }
    }

    /* 🔔 관리자 실시간 게스트 알림 & 사운드 안내 배너 */
    .admin-notif-banner {
      background: linear-gradient(135deg, #103629 0%, #0d281e 100%);
      border-bottom: 1px solid #00a884;
      padding: 7px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      z-index: 100;
      flex-shrink: 0;
      animation: slideDownBanner 0.25s ease-out;
    }
    @keyframes slideDownBanner {
      from { transform: translateY(-100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    @media (max-width: 600px) {
      .admin-notif-banner {
        padding: 5px 10px;
        gap: 6px;
      }
      .admin-notif-banner span {
        font-size: 11px !important;
        line-height: 1.35;
      }
      .admin-notif-banner button {
        padding: 4px 8px !important;
        font-size: 11px !important;
      }
    }

    /* 🏢 멀티 숙소 (Multi-Property) 관제 & 카드 스타일 */
    .stay-selector-header-wrap {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #182229;
      border: 1px solid #283740;
      padding: 3px 10px;
      border-radius: 20px;
      transition: border-color 0.2s;
    }
    .stay-selector-header-wrap:hover {
      border-color: #00a884;
    }
    /* 🏢 숙소 관리 탭 그리드 & 컴팩트 카드 (v3.34 UX 개선) */
    .stays-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 12px;
    }
    @media (max-width: 640px) {
      .stays-grid {
        grid-template-columns: 1fr;
        gap: 10px;
      }
    }
    .stay-card {
      background: #111b21;
      border: 1px solid #233138;
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 7px;
      transition: border-color 0.2s, box-shadow 0.2s;
      position: relative;
    }
    .stay-card:hover {
      border-color: #00a884;
      box-shadow: 0 4px 14px rgba(0, 168, 132, 0.12);
    }
    .stay-card.active-filter {
      border-color: #00a884;
      background: #132228;
    }
    .stay-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 6px;
    }
    .stay-badge {
      background: #103629;
      color: #25d366;
      border: 1px solid #00a884;
      padding: 1px 6px;
      border-radius: 4px;
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: -0.2px;
    }
    .stay-name {
      font-size: 13.5px;
      font-weight: 700;
      color: #e9edef;
      margin: 2px 0 1px;
      line-height: 1.3;
    }
    .stay-id-badge {
      font-size: 10px;
      color: #8696a0;
      font-family: monospace;
    }
    .stay-tagline {
      font-size: 11px;
      color: #aebac1;
      font-style: italic;
      line-height: 1.35;
      margin: 1px 0;
    }
    .stay-meta-row {
      font-size: 11px;
      color: #8696a0;
      display: flex;
      align-items: center;
      gap: 6px;
      line-height: 1.3;
    }
    .stay-meta-row strong {
      color: #d1d7db;
    }

    /* 📶 컴팩트 와이파이 QR & 정보 카드 (와이파이 생성 탭과 100% 동기화) */
    .stay-wifi-mini-card {
      background: #182229;
      border: 1px solid #283740;
      border-radius: 8px;
      padding: 7px 9px;
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 2px 0;
    }
    .stay-wifi-qr-wrap {
      flex-shrink: 0;
      width: 58px;
      height: 58px;
      background: #fff;
      border-radius: 6px;
      padding: 3px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      transition: transform 0.15s;
    }
    .stay-wifi-qr-wrap:hover {
      transform: scale(1.05);
    }
    .stay-wifi-qr-img {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: 3px;
    }
    .stay-wifi-info-wrap {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .stay-wifi-row {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      line-height: 1.25;
    }
    .stay-wifi-label {
      color: #8696a0;
      font-size: 10.5px;
      flex-shrink: 0;
      font-weight: 600;
    }
    .stay-wifi-val {
      font-family: monospace;
      font-weight: 700;
      color: #5ef2c2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
    }
    .stay-wifi-val.stay-wifi-pw {
      color: #ffd279;
    }
    .stay-wifi-copy-btn {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      color: #d1d7db;
      padding: 1px 5px;
      border-radius: 3px;
      font-size: 9.5px;
      cursor: pointer;
      flex-shrink: 0;
      line-height: 1.2;
    }
    .stay-wifi-copy-btn:hover {
      background: #00a884;
      color: #fff;
      border-color: #00a884;
    }
    .stay-wifi-hint {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 4px;
      font-size: 9.5px;
      color: #667781;
      margin-top: 1px;
    }
    .stay-wifi-edit-link {
      background: none;
      border: none;
      color: #00a884;
      font-size: 9.5px;
      cursor: pointer;
      padding: 0;
      text-decoration: underline;
    }
    .stay-wifi-edit-link:hover {
      color: #5ef2c2;
    }
    .stay-fac-list {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin: 1px 0;
    }
    .stay-fac-pill {
      background: #182229;
      color: #8696a0;
      padding: 2px 6px;
      border-radius: 4px;
      font-size: 10px;
      border: 1px solid #233138;
      line-height: 1.25;
    }
    .stay-knowledge-box {
      font-size: 10px;
      color: #8696a0;
      background: #0d1418;
      padding: 5px 8px;
      border-radius: 5px;
      border-left: 2px solid #5ef2c2;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .stay-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      margin-top: 3px;
      padding-top: 6px;
      border-top: 1px solid rgba(255,255,255,0.05);
    }
    .room-stay-tag {
      background: #103629;
      color: #25d366;
      border: 1px solid #00a884;
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 4px;
      margin-right: 5px;
      font-weight: 700;
      display: inline-block;
    }
    .stay-edit-checkboxes {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 8px;
      margin-top: 6px;
    }
    .stay-edit-checkbox-item {
      display: flex;
      align-items: center;
      gap: 6px;
      background: #111b21;
      border: 1px solid #283740;
      padding: 8px 10px;
      border-radius: 8px;
      font-size: 12px;
      cursor: pointer;
      user-select: none;
      transition: background 0.15s, border-color 0.15s;
    }
    .stay-edit-checkbox-item:hover {
      background: #1f2c34;
      border-color: #00a884;
    }
    .stay-edit-checkbox-item input {
      accent-color: #00a884;
      width: 15px;
      height: 15px;
    }

    /* 📦 Git 커밋 히스토리 및 어플 버전 배지 인터랙션 스타일 */
    .app-version-badge,
    .wa-mobile-version-badge,
    .sidebar-version-tag {
      cursor: pointer !important;
      transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
      user-select: none;
    }
    .app-version-badge:hover,
    .wa-mobile-version-badge:hover {
      transform: scale(1.08);
      filter: brightness(1.25);
      box-shadow: 0 0 8px rgba(37, 211, 102, 0.4);
    }
    .sidebar-version-tag:hover {
      background: #111b21 !important;
      color: #5ef2c2 !important;
    }

    .git-commit-card {
      background: #111b21;
      border: 1px solid #283740;
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 7px;
      transition: border-color 0.2s, background 0.2s, transform 0.15s;
    }
    .git-commit-card:hover {
      border-color: #00a884;
      background: #142028;
      transform: translateY(-1px);
    }
    .git-commit-card.latest {
      border-color: #00a884;
      background: linear-gradient(135deg, rgba(16, 54, 41, 0.4), #111b21);
      box-shadow: 0 2px 10px rgba(0, 168, 132, 0.15);
    }
    .git-commit-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
    }
    .git-agent-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .git-agent-badge.anti {
      background: rgba(0, 229, 255, 0.12);
      border: 1px solid rgba(0, 229, 255, 0.4);
      color: #5ef2c2;
    }
    .git-agent-badge.clin {
      background: rgba(155, 81, 224, 0.15);
      border: 1px solid rgba(155, 81, 224, 0.4);
      color: #c084fc;
    }
    .git-agent-badge.claude {
      background: rgba(255, 159, 67, 0.15);
      border: 1px solid rgba(255, 159, 67, 0.4);
      color: #ffd279;
    }
    .git-agent-badge.collab {
      background: rgba(0, 168, 132, 0.2);
      border: 1px solid #00a884;
      color: #25d366;
    }
    .git-hash-badge {
      font-family: monospace;
      font-size: 11px;
      background: #1f2c34;
      color: #ffd279;
      border: 1px solid #374248;
      padding: 1px 6px;
      border-radius: 4px;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }
    .git-hash-badge:hover {
      background: #2a3942;
      border-color: #ffd279;
    }
    .git-commit-msg {
      color: #e9edef;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 500;
      word-break: break-word;
    }
    .git-commit-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11px;
      color: #8696a0;
      border-top: 1px dashed rgba(255, 255, 255, 0.08);
      padding-top: 6px;
      flex-wrap: wrap;
      gap: 6px;
    }

    /* App Releases 버전 되돌리기 버튼 & 언어 토글 스타일 */
    .btn-version-rollback {
      margin-left: auto;
      padding: 3px 10px;
      font-size: 10.5px;
      font-weight: 600;
      background: #202c33;
      color: #d1d7db;
      border: 1px solid #3c4a54;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .btn-version-rollback:hover {
      background: #2a3942;
      color: #ffffff;
      border-color: #536471;
    }
    .btn-version-rollback.active {
      background: #283740 !important;
      color: #8696a0 !important;
      border-color: #354955 !important;
      cursor: default !important;
    }
    .btn-version-rollback.restore {
      background: #103629 !important;
      color: #25d366 !important;
      border-color: #00a884 !important;
      font-weight: 700 !important;
    }
    .btn-version-rollback.restore:hover {
      background: #154534 !important;
      color: #5ef2c2 !important;
    }
    .app-version-badge.pinned,
    .wa-mobile-version-badge.pinned {
      background: #2b2208 !important;
      color: #ffd279 !important;
      border-color: #d29922 !important;
    }
    .git-commit-card.active-pinned {
      border: 1px solid #d29922 !important;
      background: rgba(210, 153, 34, 0.08) !important;
    }
    .commit-lang-toggle {
      display: inline-flex;
      background: #182229;
      border: 1px solid #2a3942;
      border-radius: 8px;
      padding: 2px;
      gap: 2px;
    }
    .commit-lang-btn {
      padding: 3px 8px;
      font-size: 11px;
      background: transparent;
      color: #8696a0;
      font-weight: 600;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .commit-lang-btn.active {
      background: #25d366;
      color: #0b141a;
      font-weight: 700;
    }

    /* ============================================================
       수동 예약 등록: 실시간 공실 & 예약 현황 미니 달력 스타일
       ============================================================ */
    .manual-cal-day-cell {
      min-height: 52px;
      border-radius: 6px;
      padding: 5px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      text-align: left;
      border: 1px solid #23343f;
      background: #111b21;
      color: #e9edef;
      font-size: 11px;
      transition: all 0.15s ease;
      user-select: none;
      position: relative;
    }
    .manual-cal-day-cell.other-month {
      opacity: 0.25;
      background: transparent;
      border-color: #1a2329;
    }
    .manual-cal-day-cell.avail {
      cursor: pointer;
    }
    .manual-cal-day-cell.avail:hover {
      background: #182820;
      border-color: #00a884;
      transform: translateY(-1px);
    }
    .manual-cal-day-cell.today {
      box-shadow: inset 0 0 0 1.5px #5ef2c2;
    }
    .manual-cal-day-cell.booked {
      background: #251619 !important;
      border-color: #552429 !important;
      color: #7a8288 !important;
      cursor: not-allowed !important;
      opacity: 0.65;
    }
    .manual-cal-day-cell.booked:hover {
      background: #2f191d !important;
    }
    .manual-cal-day-cell.selected-checkin {
      background: #00a884 !important;
      border-color: #5ef2c2 !important;
      color: #ffffff !important;
      font-weight: 700;
      box-shadow: 0 0 10px rgba(0, 168, 132, 0.55);
    }
    .manual-cal-day-cell.selected-checkout {
      background: #0b84ff !important;
      border-color: #70b4ff !important;
      color: #ffffff !important;
      font-weight: 700;
      box-shadow: 0 0 10px rgba(11, 132, 255, 0.55);
    }
    .manual-cal-day-cell.selected-range {
      background: rgba(0, 168, 132, 0.22) !important;
      border-color: #00a884 !important;
      color: #e9edef !important;
    }
    .m-cell-num {
      font-size: 11.5px;
      font-weight: 700;
    }
    .m-cell-tag {
      font-size: 9.5px;
      padding: 1px 4px;
      border-radius: 3px;
      display: inline-block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      line-height: 1.2;
    }
    .m-cell-tag.avail {
      color: #25d366;
      background: rgba(37, 211, 102, 0.12);
    }
    .m-cell-tag.booked {
      color: #ff6b6b;
      background: rgba(255, 107, 107, 0.2);
      font-weight: 700;
      border: 1px solid rgba(255, 107, 107, 0.3);
    }
    .m-cell-tag.in {
      color: #ffffff;
      background: rgba(0, 0, 0, 0.35);
      font-weight: 700;
    }
    .m-cell-tag.out {
      color: #ffffff;
      background: rgba(0, 0, 0, 0.35);
      font-weight: 700;
    }

    /* 상위 언어 변경 컴팩트 드롭다운 (손님창과 동일한 16개국어 선택기) */
    .header-lang-btn {
      display: inline-flex !important;
      align-items: center;
      gap: 2px;
      height: 25px;
      padding: 0 6px !important;
      border-radius: 12px !important;
      background: #202c33 !important;
      border: 1px solid #374248 !important;
      color: #ffd279 !important;
      font-size: 10.5px !important;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
      width: auto !important;
      box-shadow: 0 1px 3px rgba(0,0,0,0.22);
      vertical-align: middle;
    }
    .header-lang-btn:hover {
      background: #2a3942 !important;
      border-color: #ffd279 !important;
      color: #fff !important;
    }
    .header-lang-dropdown {
      position: absolute;
      top: 32px;
      right: 0px;
      background: #202c33;
      border: 1px solid #374248;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
      width: 195px;
      max-height: 290px;
      overflow-y: auto;
      padding: 4px 0;
      z-index: 2200;
      display: none;
      scrollbar-width: thin;
      scrollbar-color: #374248 transparent;
    }
    .header-lang-dropdown::-webkit-scrollbar {
      width: 5px;
    }
    .header-lang-dropdown::-webkit-scrollbar-thumb {
      background: #374248;
      border-radius: 4px;
    }
    .header-lang-dropdown.open {
      display: block;
    }
    #mobileAdminDropdown .header-lang-dropdown,
    .admin-header-more-menu .header-lang-dropdown {
      position: fixed;
      top: 56px;
      right: 14px;
      z-index: 2500;
      max-height: 360px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
    }
    .header-lang-item {
      display: flex;
      align-items: center;
      gap: 9px;
      width: 100%;
      padding: 8px 12px;
      border: none;
      background: transparent;
      color: #e9edef;
      font-size: 12px;
      text-align: left;
      cursor: pointer;
      transition: background 0.12s ease;
    }
    .header-lang-item:hover {
      background: #182229;
      color: #25d366;
    }
    .header-lang-item.active {
      background: rgba(37, 211, 102, 0.12);
      color: #25d366;
      font-weight: 700;
    }
    .header-lang-item .lang-flag {
      font-size: 15px;
      line-height: 1;
    }
    .header-lang-item .lang-name {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* 🔑 TTLock 대문 도어락 제어 & QR 발급기 모달 */
    #doorlockModal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      z-index: 2000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
    #doorlockModal.show, #doorlockModal.open {
      display: flex !important;
    }
    #doorlockModal .modal-card {
      max-width: 440px;
      background: #182229;
      border: 1px solid #2a3942;
      border-radius: 16px;
      padding: 18px 20px;
      color: #e9edef;
      box-shadow: 0 16px 36px rgba(0,0,0,0.6);
      width: 92%;
    }
    #doorlockModal .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
      padding-bottom: 8px;
      border-bottom: 1px solid #222e35;
    }
    #doorlockModal .modal-header h3 {
      margin: 0;
      font-size: 15.5px;
      font-weight: 700;
      color: #00a884;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    #doorlockModal .close-btn {
      background: transparent;
      border: none;
      color: #8696a0;
      font-size: 16px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
      line-height: 1;
    }
    #doorlockModal .close-btn:hover {
      background: rgba(255,255,255,0.08);
      color: #e9edef;
    }
    #doorlockModal .field {
      margin-bottom: 12px;
      text-align: left;
    }
    #doorlockModal .field label {
      display: block;
      font-size: 12px;
      color: #8696a0;
      margin-bottom: 5px;
      font-weight: 600;
    }
    #doorlockModal .field input,
    #doorlockModal .field select {
      width: 100%;
      box-sizing: border-box;
      background: #111b21;
      border: 1px solid #2a3942;
      color: #e9edef;
      padding: 9px 12px;
      border-radius: 8px;
      font-size: 13.5px;
      outline: none;
      transition: border-color 0.2s;
    }
    #doorlockModal .field input:focus,
    #doorlockModal .field select:focus {
      border-color: #00a884;
    }
    #doorlockModal .btn-row {
      display: flex;
      gap: 8px;
      margin-top: 14px;
    }
    #doorlockModal .btn-green {
      flex: 1;
      background: #00a884;
      color: #111b21;
      font-weight: 700;
      border: none;
      padding: 10px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13.5px;
      transition: background 0.2s, transform 0.1s;
    }
    #doorlockModal .btn-green:hover {
      background: #06cf9c;
    }
    #doorlockModal .btn-green:active {
      transform: scale(0.98);
    }
    #doorlockModal .btn-dark {
      flex: 1;
      background: #202c33;
      border: 1px solid #53bdeb;
      color: #53bdeb;
      font-weight: 700;
      padding: 10px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13.5px;
      transition: background 0.2s, transform 0.1s;
    }
    #doorlockModal .btn-dark:hover {
      background: #2a3942;
    }
    #doorlockModal .btn-dark:active {
      transform: scale(0.98);
    }
/* SORIJAE brand wordmark (signboard-style serif) */
.wa-mobile-brand-name, .admin-whatsapp-plus-badge, .brand-wordmark { font-family: 'Marcellus', 'Cinzel', 'Trajan Pro', Georgia, serif !important; font-weight: 400 !important; letter-spacing: 1.5px !important; color: #f6efdc !important; }

/* 숙소 정보 수정창: 오른쪽 밀림 방지 + 하단 저장 버튼 항상 노출 */
#stayEditModal .modal-card.stay-edit-card {
  box-sizing: border-box; max-width: min(760px, 100%); width: 100%;
  max-height: calc(100dvh - 24px); overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
#stayEditModal .modal-card.stay-edit-card * { box-sizing: border-box; min-width: 0; max-width: 100%; }
#stayEditModal .form-control, #stayEditModal textarea { width: 100%; }
#stayEditModal .stay-edit-footer {
  position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
  background: #182229; border-top: 1px solid #283740; z-index: 5;
}
@media (max-width: 640px) {
  #stayEditModal.modal-overlay { padding: 6px; align-items: flex-start; }
  #stayEditModal .modal-card.stay-edit-card { padding: 14px 12px; max-height: calc(100dvh - 12px); }
  #stayEditModal .modal-card.stay-edit-card > div[style*="grid-template-columns"],
  #stayEditModal .modal-card.stay-edit-card div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  #stayEditModal .stay-edit-footer { bottom: -14px; margin: 0 -12px -14px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  #stayEditModal .stay-edit-footer .btn { flex: 1; }
}
