@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');
  .hive-site-bottom-popup,
.hive-site-bottom-popup * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

  :root {
    /* 스탠다드 팔레트 - Tech Navy 톤 (Linear / Stripe / Vercel 영감) */
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-soft: #f6f7f9;
    --border: #e3e6ec;
    --border-soft: #eef0f4;
    --text: #0a1929;
    --text-muted: #4a5568;
    --text-subtle: #94a3b8;

    /* AI 포인트 컬러 - Tech Navy + Accent Blue */
    --ai-primary: #09244b;        /* 딥 클래식 네이비 (대표님 제안) */
    --ai-secondary: #051633;      /* 더 깊은 네이비 */
    --ai-accent: #2563eb;         /* 액센트 블루 */
    --ai-bright: #3b82f6;         /* 밝은 인터랙션용 */
    --ai-glow: rgba(37, 99, 235, 0.12);
    --ai-glow-strong: rgba(37, 99, 235, 0.2);

    /* 그림자 - 정밀하고 깊게 */
    --shadow-sm: 0 1px 2px rgba(10, 25, 41, 0.04);
    --shadow-md: 0 4px 16px rgba(10, 25, 41, 0.06), 0 1px 3px rgba(10, 25, 41, 0.04);
    --shadow-lg: 0 16px 48px rgba(10, 25, 41, 0.14), 0 4px 12px rgba(10, 25, 41, 0.06);
    --shadow-glow: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 8px 24px rgba(37, 99, 235, 0.15);

    /* 라이트 액센트 영역 (CTA 카드, 상태 배너 등) */
    --ai-tint-light: #eaf2fb;     /* 가장 옅은 네이비-블루 틴트 */
    --ai-tint-soft: #c7d8ec;      /* 옅은 네이비 (border용) */
    --ai-tint-bg: #f1f6fc;        /* 백그라운드용 */
  }

  /* 실제 사이트 전체 html/body는 건드리지 않는다. */
.hive-site-bottom-popup {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  font-family: 'Pretendard Variable', Pretendard, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

  /* 실제 사이트용 루트 래퍼
     닫힘 상태에서는 어떤 레이어도 본문 클릭을 막지 않도록 기본값은 전부 통과 처리한다.
     실제 클릭이 필요한 상태에서만 아래 개별 클래스가 pointer-events를 다시 켠다. */
.hive-site-bottom-popup .backdrop,
.hive-site-bottom-popup .popup,
.hive-site-bottom-popup .reopen-btn,
.hive-site-bottom-popup .hint {
  pointer-events: none;
}

  /* ============================================
     딤 (풀화면 시)
     ============================================ */
  .backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 20, 0);
    backdrop-filter: blur(0px);
    pointer-events: none;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
    z-index: 20;
  }
  .backdrop.active {
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(2px);
    pointer-events: auto;
  }

  /* ============================================
     팝업 - 세련된 카드형
     ============================================ */
  .popup {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    width: min(340px, calc(100vw - 28px));
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 30;
    overflow: hidden;
    transform: translate(-50%, 120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.35s ease,
                visibility 0s linear 0.5s,
                left 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                right 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                bottom 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                top 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                border-radius 0.4s cubic-bezier(0.32, 0.72, 0, 1);

    display: grid;
    grid-template-rows: auto auto auto auto auto;  /* 헤더 / 상태 / 메시지 / 채팅 / 입력 */
  }
  .popup.shown {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.35s ease,
                visibility 0s linear 0s,
                left 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                right 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                bottom 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                top 0.4s cubic-bezier(0.32, 0.72, 0, 1),
                border-radius 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .popup.expanded {
    grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr) auto;
    top: auto;
    height: min(72dvh, 720px);
  }
  .popup.fullscreen {
    grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr) auto;
    top: max(14px, env(safe-area-inset-top));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: min(720px, calc(100vw - 28px));
    height: auto;
    border-radius: 14px;
  }



  @supports not (height: 100dvh) {
    .popup { max-height: calc(100vh - 28px); }
    .popup.expanded { height: min(72vh, 720px); }
  }

  @media (max-width: 599px) {
    .popup {
      width: calc(100vw - 20px);
      bottom: max(10px, env(safe-area-inset-bottom));
      max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }
    .popup.expanded {
      top: max(10px, env(safe-area-inset-top));
      bottom: max(10px, env(safe-area-inset-bottom));
      height: auto;
    }
    .popup.fullscreen {
      top: max(10px, env(safe-area-inset-top));
      bottom: max(10px, env(safe-area-inset-bottom));
      width: calc(100vw - 20px);
    }
    .message-section {
      max-height: calc(100dvh - 170px);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
  }

  /* AI 그라디언트 보더 효과 (팝업 상단 미세한 라인) */
  .popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
      transparent 0%,
      var(--ai-primary) 30%,
      var(--ai-secondary) 70%,
      transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
  }
  .popup.shown::before { opacity: 0.5; }

  /* ============================================
     메시지 영역
     ============================================ */
  .message-section {
    padding: 22px 18px 18px;
    background: var(--surface);
    position: relative;
    transition: opacity 0.3s, max-height 0.4s ease, padding 0.4s ease;
  }

  /* ============================================
     헤더 바 - 드래그 핸들 + 컨트롤
     팝업 상단에 배경 깔린 명확한 영역
     ============================================ */
  .popup-header {
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 18px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    z-index: 40;
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
  }
  .popup-header:active { cursor: grabbing; }

  /* 드래그 핸들 - 가운데 작은 막대 */
  .popup-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #e0e0e6;
    border-radius: 2px;
    transition: background 0.2s;
  }
  .popup-header:hover::before {
    background: #c8c8ce;
  }

  /* 풀화면 모드에서는 헤더 padding 조금 늘림 */
  .popup.fullscreen .popup-header {
    padding: 10px 18px 12px;
  }

  /* 우상단 컨트롤 - 헤더 안에 배치 */
  .controls {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 6px;  /* 핸들 공간 확보 */
  }
  .ctrl-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 0px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
  }
  .ctrl-btn:hover {
    background: var(--text);
    color: var(--surface);
    border-color: var(--text);
  }
  .ctrl-btn:active { transform: scale(0.92); }
  .ctrl-btn svg { width: 14px; height: 14px; }

  .icon-expand { display: block; }
  .icon-contract { display: none; }
  .popup.fullscreen .icon-expand { display: none; }
  .popup.fullscreen .icon-contract { display: block; }

  /* 새로고침 버튼 - 메시지 모드 외 모든 모드/패널에서 노출 */
  #refreshBtn { display: none; }
  .popup.expanded #refreshBtn,
  .popup.fullscreen #refreshBtn,
  .popup.history-open #refreshBtn,
  .popup.notify-open #refreshBtn,
  .popup.inquiry-open #refreshBtn { display: flex; }

  .message-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-right: 80px;
  }

  .sender-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }

  .sender-avatar svg {
    width: 18px;
    height: 18px;
  }

  .sender-info { line-height: 1.3; }
  .sender-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .sender-role { font-size: 11px; color: var(--text-subtle); margin-top: 2px; }

  .message-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.025em;
  }

  .message-body {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 16px;
  }
  .message-body p { margin-bottom: 8px; }
  .message-body p:last-child { margin-bottom: 0; }
  .message-body strong {
    color: var(--text);
    font-weight: 600;
  }

  /* 메시지 내 CTA - 카드 스타일 */
  .message-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .message-cta:hover {
    border-color: var(--ai-primary);
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  .message-cta:active { transform: scale(0.99); }
  .cta-content { flex: 1; }
  .cta-label {
    font-size: 10px;
    color: var(--ai-primary);
    font-weight: 600;
    margin-bottom: 3px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .cta-text { font-size: 13px; font-weight: 600; color: var(--text); }
  .cta-arrow { font-size: 16px; color: var(--text-muted); }

  /* ============================================
     액션 버튼 섹션 - 운영자가 자유 구성
     카톡, 인스타, 페이지 이동, 외부 링크 등
     ============================================ */
  .actions-section {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
    width: 100%;
  }
  .action-btn:hover {
    border-color: var(--text);
    background: var(--surface-soft);
  }
  .action-btn:active { transform: scale(0.99); }

  .action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
  }

  /* 채널별 색상 - 브랜드 톤 */
  .action-icon.kakao { background: #fee500; color: #3a1d1d; }
  .action-icon.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
  .action-icon.youtube { background: #ff0000; }
  .action-icon.naver { background: #03c75a; }
  .action-icon.link { background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent)); }
  .action-icon.coupon { background: linear-gradient(135deg, #f43f5e, #e11d48); }
  .action-icon.book { background: linear-gradient(135deg, #0ea5e9, #0284c7); }

  .action-icon svg { width: 16px; height: 16px; }

  .action-content {
    flex: 1;
    min-width: 0;
  }
  .action-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
  }
  .action-desc {
    font-size: 11px;
    color: var(--text-muted);
  }
  .action-arrow {
    color: var(--text-subtle);
    flex-shrink: 0;
    font-size: 16px;
  }

  /* 액션 섹션 라벨 */
  .actions-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-subtle);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
    margin-top: 4px;
  }

  /* 풀화면 모드에서 메시지 영역 스크롤 가능 */
  .popup.expanded .message-section,
  .popup.fullscreen .message-section {
    max-height: 35%;
    overflow-y: auto;
  }

  /* ============================================
     채팅 영역
     ============================================ */
  .chat-area {
    display: none;
    overflow: hidden;
    background: var(--surface);
    border-top: 1px solid var(--border-soft);
  }
  .popup.expanded .chat-area,
  .popup.fullscreen .chat-area {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 900px) {
  #hive-site-bottom-popup .popup.fullscreen .chat-messages {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.chat-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.7;
  animation: bubbleIn 0.45s cubic-bezier(0.32, 0.72, 0, 1) backwards;
  letter-spacing: -0.01em;
}
  @keyframes bubbleIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

.chat-bubble.ai {
  max-width: 100%;
  width: 100%;
  padding: 12px 0;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  align-self: stretch;
}
.chat-bubble.admin {
  max-width: 100%;
  width: 100%;
  padding: 12px 0;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  align-self: stretch;
}
.chat-bubble.bargain {
  max-width: 100%;
  width: 100%;
  padding: 12px 0;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  align-self: stretch;
}
.chat-bubble.user {
  background: #edf0f5;
  color: var(--text);
  border: 0;
  border-top-right-radius: 4px;
  align-self: flex-end;
}
.chat-bubble.ai strong,
.chat-bubble.admin strong,
.chat-bubble.bargain strong {
  color: var(--text);
  font-weight: 600;
}

  /* ============================================
     스켈레톤 로딩 (실험용)
     메시지 흡수 직후 잠시 표시 → 새 콘텐츠 등장
     ============================================ */
  .skeleton-bubble {
    max-width: 88%;
    padding: 14px;
    border-radius: 14px;
    border-top-left-radius: 4px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    align-self: flex-start;
    animation: skeletonIn 0.3s ease backwards;
  }
  @keyframes skeletonIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .skeleton-line {
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg,
      #ececef 0%,
      #f5f5f7 50%,
      #ececef 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    margin-bottom: 7px;
  }
  .skeleton-line:last-child { margin-bottom: 0; }
  .skeleton-line.w-full { width: 100%; }
  .skeleton-line.w-90 { width: 90%; }
  .skeleton-line.w-75 { width: 75%; }
  .skeleton-line.w-60 { width: 60%; }
  .skeleton-line.w-40 { width: 40%; }

  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* AI 글로우 효과 - 스켈레톤 옆에 다이아몬드가 깜빡 */
  .skeleton-thinking {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 8px;
    color: var(--ai-primary);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .skeleton-thinking-icon {
    width: 14px;
    height: 14px;
    color: var(--ai-primary);
    animation: aiGlow 1.5s ease-in-out infinite;
  }

  @keyframes aiGlow {
    0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
  }

  /* 빠른 응답 칩 */
  .quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
  }
  .quick-reply {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
  }
  .quick-reply:hover {
    border-color: var(--ai-primary);
    color: var(--ai-primary);
  }
  .quick-reply:active { transform: scale(0.96); }

  .chat-cta {
    margin-top: 4px;
    padding: 14px;
    background: linear-gradient(135deg, var(--ai-tint-light) 0%, var(--ai-tint-bg) 100%);
    border: 1px solid var(--ai-tint-soft);
    border-radius: 12px;
    cursor: pointer;
    align-self: flex-start;
    max-width: 92%;
    transition: all 0.15s;
  }
  .chat-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
  .chat-cta-label { font-size: 10px; color: var(--ai-primary); font-weight: 600; margin-bottom: 4px; letter-spacing: 0.05em; text-transform: uppercase; }
  .chat-cta-text { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
  .chat-cta-action { font-size: 12px; color: var(--ai-primary); font-weight: 500; }

  /* 흥정 성공 쿠폰 카드 - 실제 종이 쿠폰 같은 질감 */
  .bargain-coupon {
    margin-top: 6px;
    align-self: flex-start;
    max-width: 92%;
    width: 280px;
    position: relative;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1.5px dashed #d97706;
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    animation: couponDrop 0.6s cubic-bezier(0.32, 0.72, 0, 1) backwards;
  }
  @keyframes couponDrop {
    0% { opacity: 0; transform: translateY(-8px) scale(0.95); }
    60% { transform: translateY(2px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  .bargain-coupon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.25);
  }
  .bargain-coupon::before,
  .bargain-coupon::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--surface);
    border: 1.5px dashed #d97706;
    border-radius: 50%;
    transform: translateY(-50%);
  }
  .bargain-coupon::before { left: -8px; }
  .bargain-coupon::after { right: -8px; }

  .coupon-label {
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .coupon-label svg { width: 12px; height: 12px; }

  .coupon-amount {
    font-size: 28px;
    font-weight: 800;
    color: #92400e;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    font-feature-settings: 'tnum';
  }
  .coupon-amount-unit {
    font-size: 16px;
    font-weight: 700;
    color: #b45309;
    margin-left: 2px;
  }

  .coupon-condition {
    font-size: 11.5px;
    color: #78350f;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .coupon-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed rgba(180, 83, 9, 0.3);
    font-size: 10.5px;
    color: #92400e;
  }
  .coupon-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.05em;
  }
  .coupon-expire { font-weight: 500; }

  /* 타이핑 인디케이터 */
  .typing {
    display: flex;
    gap: 4px;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    border-top-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
  }
  .typing span {
    width: 6px;
    height: 6px;
    background: var(--text-subtle);
    border-radius: 50%;
    animation: typing 1.4s infinite;
  }
  .typing span:nth-child(2) { animation-delay: 0.15s; }
  .typing span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes typing {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
  }

  /* ============================================
     하단 바 - 미니멀, AI 강조
     ============================================ */
.bottom-bar {
  background: linear-gradient(
    130deg,
    rgba(0, 180, 120, 0.07) 0%,
    rgba(0, 180, 120, 0.06) 40%,
    rgba(59, 130, 246, 0.06) 70%,
    rgba(59, 130, 246, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);

  border: 0;
  box-shadow: none;
  border-radius: 9999px;

  width: calc(100% - 44px);
  margin: 0 auto 12px;

  padding: 6px 14px;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;

  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

  /* AI 트리거 버튼 - 그라디언트 보더 + 글로우 */
.ai-chat-trigger,
.admin-chat-trigger,
.inquiry-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 35px;
  height: 35px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.16s ease;
  position: relative;
  flex-shrink: 0;
}

.ai-chat-trigger:hover,
.admin-chat-trigger:hover,
.inquiry-trigger:hover {
  transform: translateY(-2px);
}




  /* 관리자 부재 시 (회색 톤) */


  .ai-chat-trigger:active,
  .admin-chat-trigger:active { transform: scale(0.96); }




  /* 문의 트리거 - 차분한 슬레이트 톤 (Ask AI/관리자와 색 충돌 없음) */

  .inquiry-trigger:active { transform: scale(0.96); }


  .inquiry-text {
    font-size: 12.5px;
    font-weight: 600;
    background: linear-gradient(135deg, #475569, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  .admin-chat-trigger.offline .admin-icon {color: rgba(30, 30, 80, 0.82);}

  /* 라이브 인디케이터 (관리자 온라인 시) */
  .admin-icon-wrap {
    position: relative;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  .live-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    border: none;
    animation: livePulse 1.8s ease-in-out infinite;
  }
  @keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
  }
  .admin-chat-trigger.offline .live-dot {
    background: #d1d5db;
    animation: none;
  }

  @keyframes aiShimmer {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
  }

.ai-chat-text,
.admin-chat-text,
.inquiry-text {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* PC/모바일 공통: 하단 바 버튼 텍스트 제거 */
.ai-chat-text,
.admin-chat-text,
.inquiry-text {
  display: none;
}

  .ai-chat-text {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .admin-chat-text {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .admin-chat-trigger.offline .admin-chat-text {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* 펼침 모드: 입력창으로 전환 */
  .popup.expanded .ai-chat-trigger,
  .popup.fullscreen .ai-chat-trigger,
  .popup.expanded .admin-chat-trigger,
  .popup.fullscreen .admin-chat-trigger,
  .popup.expanded .inquiry-trigger,
  .popup.fullscreen .inquiry-trigger,
  .popup.expanded .history-trigger,
  .popup.fullscreen .history-trigger,
  .popup.expanded .notify-trigger,
  .popup.fullscreen .notify-trigger,
  .popup.expanded .bargain-trigger,
  .popup.fullscreen .bargain-trigger { display: none; }

  /* 히스토리 트리거 버튼 - 작고 중성적인 톤 */
.history-trigger,
.notify-trigger,
.bargain-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.16s ease;
  color: rgba(30, 30, 80, 0.82);
  flex-shrink: 0;
  position: relative;
}

  .history-trigger:active,
  .notify-trigger:active,
  .bargain-trigger:active { transform: scale(0.92); }

/* 하단 버튼 그룹 아이콘 크기 통합 */
.ai-diamond-icon,
.admin-icon,
.inquiry-icon,
.history-trigger svg,
.notify-trigger svg,
.bargain-trigger svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #111111;
  stroke: currentColor;
}

.ai-diamond-icon {
  animation: aiShimmer 3s ease-in-out infinite;
}

.admin-icon-wrap {
  width: 24px;
  height: 24px;
}

.live-dot {
  bottom: -1px;
  right: -1px;
}

  /* 알림 트리거 - 활성화(구독 완료) 시 보라 톤 */
  .notify-trigger.subscribed {
    background: linear-gradient(135deg, var(--ai-tint-light), var(--ai-tint-bg));
    border-color: var(--ai-accent);
    color: var(--ai-primary);
  }
  .notify-trigger.subscribed:hover {
    border-color: var(--ai-primary);
  }

  /* 흥정 트리거 - 영업의 시그니처 톤 (앰버/골드)
     "특별한 액션"임을 시각적으로 차별화
     심리: 따뜻함, 기회, 가치 협상의 분위기 */

  /* 협상 가능 신호 - 작은 펄스 닷 */
  .bargain-trigger::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f59e0b;
    border: none;
    animation: livePulse 2s ease-in-out infinite;
  }

  /* 미확인 카운트 뱃지 */
  .history-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    line-height: 1;
  }
  .history-badge.visible { display: flex; }

  /* ============================================
     히스토리 패널 (헤더 아래 본문 영역에 오버레이)
     ============================================ */
  .history-panel {
    position: absolute;
    top: 44px;  /* 헤더 높이 */
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 35;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.25s ease;
  }
  .history-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* 검색 박스 영역 */
  .history-search {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
    flex-shrink: 0;
  }

  .search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0 12px;
    transition: all 0.15s;
  }
.search-input-wrap:focus-within {
  border-color: #d7dce5;
  background: var(--surface);
  box-shadow: none;
}

  .search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-subtle);
    flex-shrink: 0;
  }

  .search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    padding: 10px 0 10px 10px;
    outline: none;
    color: var(--text);
  }
  .search-input::placeholder { color: var(--text-subtle); }

  .search-clear {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-subtle);
    border: none;
    color: var(--surface);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    flex-shrink: 0;
  }
  .search-clear.visible { display: flex; }
  .search-clear:hover { background: var(--text-muted); }

  /* 필터 탭 */
.history-filters {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.history-filters::-webkit-scrollbar {
  display: none;
}
  .filter-chip {
	flex: 0 0 auto;
    white-space: nowrap;  
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
  }
  .filter-chip:hover { color: var(--text); }
  .filter-chip.active {
    background: var(--text);
    color: var(--surface);
    border-color: var(--text);
  }

  /* 히스토리 내부 초기화 버튼 (검색/필터만 리셋) */
  .history-reset {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    color: var(--text-subtle);
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
  }
  .history-reset.visible {
    opacity: 1;
    pointer-events: auto;
  }
  .history-reset:hover {
    color: var(--text);
    background: var(--surface-soft);
  }
  .history-reset:active { transform: scale(0.95); }
  .history-reset svg {
    width: 11px;
    height: 11px;
  }

  /* 히스토리 리스트 */
  .history-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
  }

  .history-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }
  .history-item:hover { background: var(--surface-soft); }
  .history-item:active { background: var(--border-soft); }
  .history-item:last-child { border-bottom: none; }

  /* 좌측 타입 인디케이터 */
  .history-type {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
  }
  .history-type.ai {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
  }
  .history-type.admin {
    background: linear-gradient(135deg, #10b981, #059669);
  }
  .history-type svg { width: 14px; height: 14px; }

  .history-content {
    flex: 1;
    min-width: 0;
  }

  .history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
  }

  .history-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
  }

  .history-date {
    font-size: 11px;
    color: var(--text-subtle);
    flex-shrink: 0;
    font-weight: 500;
  }

  .history-preview {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* 미확인 표시 */
  .history-item.unread {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05), transparent 50%);
  }
  .history-item.unread .history-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ai-primary);
    margin-right: 6px;
    vertical-align: middle;
  }

  /* 빈 상태 */
  .history-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    display: none;
  }
  .history-empty.visible { display: block; }
  .history-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--text-subtle);
    opacity: 0.5;
  }
  .history-empty-text {
    font-size: 13px;
    line-height: 1.5;
  }
  .history-empty-text strong {
    color: var(--text);
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
  }

  /* 검색 매치 하이라이트 */
  mark.search-highlight {
    background: rgba(37, 99, 235, 0.18);
    color: var(--ai-accent);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
  }

  /* ============================================
     알림 패널 (히스토리와 동일 위치, 다른 콘텐츠)
     ============================================ */
  .notify-panel {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 35;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.25s ease;
    overflow: hidden;
  }

  /* 문의 패널 - notify 패널과 동일한 베이스 + 자체 스타일 */
  .inquiry-panel {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 35;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.25s ease;
    overflow: hidden;
  }
  .inquiry-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* 문의 인트로 아이콘 - 슬레이트 톤으로 차별화 */
  .inquiry-intro-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #475569, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 12px;
  }
  .inquiry-intro-icon svg { width: 20px; height: 20px; }

  /* 문의 제출 버튼 - 슬레이트 그라디언트 */
  .inquiry-submit {
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    background: linear-gradient(135deg, #475569, #64748b);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
  }
  .inquiry-submit:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(71, 85, 105, 0.2);
    transform: translateY(-1px);
  }
  .inquiry-submit:active:not(:disabled) { transform: scale(0.99); }
  .inquiry-submit:disabled {
    background: var(--border);
    color: var(--text-subtle);
    cursor: not-allowed;
  }

  /* 문의 폼 입력 필드 포커스 색상 - 슬레이트 톤 */
.inquiry-panel .field-input-wrap:focus-within {
  border-color: #d7dce5;
  box-shadow: none;
}
  .notify-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* 패널 헤더 인트로 */
  .notify-intro {
    padding: 22px 22px 16px;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
  }
  .notify-intro-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 12px;
  }
  .notify-intro-icon svg { width: 20px; height: 20px; }
  .notify-intro-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.025em;
  }
  .notify-intro-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
  }

  /* 탭 */
  .notify-tabs {
    display: flex;
    gap: 0;
    padding: 0 22px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
    flex-shrink: 0;
  }
  .notify-tab {
    flex: 1;
    padding: 14px 0;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
    position: relative;
    letter-spacing: -0.01em;
  }
  .notify-tab:hover { color: var(--text); }
  .notify-tab.active { color: var(--ai-primary); }
  .notify-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ai-primary), var(--ai-secondary));
    border-radius: 2px;
  }

  /* 탭 콘텐츠 */
  .notify-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 22px 24px;
  }

  .notify-pane { display: none; }
  .notify-pane.active { display: block; }

  /* 폼 필드 */
  .field-group {
    margin-bottom: 16px;
  }
  .field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
  }
  .field-label .required {
    color: #ef4444;
    margin-left: 2px;
  }

  .field-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: all 0.15s;
    overflow: hidden;
  }
.field-input-wrap:focus-within {
  border-color: #d7dce5;
  box-shadow: none;
}
  .field-input-wrap.error {
    border-color: #ef4444;
  }
  .field-input-wrap.success {
    border-color: #10b981;
  }

  .field-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    padding: 11px 14px;
    outline: none;
    color: var(--text);
  }
  .field-input::placeholder { color: var(--text-subtle); }

  /* 자동 감지 인디케이터 */
  .field-detected {
    padding: 0 12px 0 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .field-detected.email { color: var(--ai-accent); }
  .field-detected.phone { color: #10b981; }
  .field-detected svg { width: 12px; height: 12px; }

  /* 감지 안내 텍스트 (입력창 아래) */
  .field-helper {
    font-size: 11px;
    color: var(--text-subtle);
    margin-top: 6px;
    line-height: 1.5;
  }
  .field-helper.error { color: #ef4444; }

  /* 약관 동의 박스 */
  .consent-box {
    margin-top: 18px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
  }
  .consent-text {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 10px;
  }
  .consent-text strong {
    color: var(--text);
    font-weight: 600;
  }
  .consent-toggle-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--ai-primary);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
  }
  .consent-detail {
    display: none;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--surface);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    line-height: 1.6;
    border: 1px solid var(--border-soft);
  }
  .consent-detail.open { display: block; }
  .consent-detail strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 600;
  }

  .consent-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
  }
  .consent-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    margin-top: 1px;
    color: transparent;
  }
  .consent-check.checked .consent-checkbox {
    background: var(--ai-primary);
    border-color: var(--ai-primary);
    color: #fff;
  }
  .consent-checkbox svg {
    width: 12px;
    height: 12px;
  }
  .consent-label {
    font-size: 12px;
    color: var(--text);
    line-height: 1.5;
    flex: 1;
  }

  /* 제출 버튼 */
  .notify-submit {
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
  }
  .notify-submit:hover:not(:disabled) {
    box-shadow: 0 4px 16px var(--ai-glow);
    transform: translateY(-1px);
  }
  .notify-submit:active:not(:disabled) { transform: scale(0.99); }
  .notify-submit:disabled {
    background: var(--border);
    color: var(--text-subtle);
    cursor: not-allowed;
  }

  /* ============================================
     푸시 알림 페인 (탭 2)
     ============================================ */
  .push-status-card {
    padding: 18px;
    background: linear-gradient(135deg, var(--ai-tint-light), var(--ai-tint-bg));
    border: 1px solid var(--ai-tint-soft);
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
  }
  .push-status-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .push-status-icon svg { width: 22px; height: 22px; }
  .push-status-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
  }
  .push-status-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
  }

  /* 푸시 혜택 리스트 */
  .push-benefits {
    margin-bottom: 16px;
  }
  .push-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
  }
  .push-benefit-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--ai-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
  }
  .push-benefit-icon svg { width: 11px; height: 11px; }
  .push-benefit-text strong {
    color: var(--text);
    font-weight: 600;
  }

  /* 푸시 권한 상태 */
  .push-state-info {
    font-size: 11.5px;
    color: var(--text-subtle);
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    background: var(--surface-soft);
    border-radius: 6px;
  }
  .push-state-info.granted { color: #10b981; background: #ecfdf5; }
  .push-state-info.denied { color: #ef4444; background: #fef2f2; }

  /* 성공 화면 */
  .notify-success {
    display: none;
    padding: 30px 22px;
    text-align: center;
  }
  .notify-success.visible { display: block; }
  .success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes successPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
  }
  .success-icon svg { width: 28px; height: 28px; }
  .success-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
  }
  .success-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
  }
  .success-detail {
    display: inline-block;
    padding: 6px 14px;
    background: var(--surface-soft);
    border-radius: 999px;
    font-size: 11.5px;
    color: var(--text);
    font-weight: 600;
  }

  /* ============================================
     채팅 상태 배너 (헤더 아래)
     - AI: "AI 응답 중" / 관리자: "대화 가능" 또는 "9시부터 가능"
     ============================================ */
.chat-status {
  display: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border-bottom: 0;
  background: var(--surface-soft);
  color: var(--text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
  .popup.expanded .chat-status,
  .popup.fullscreen .chat-status { display: block; }

  .status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
  }
.chat-status.ai .status-dot,
.chat-status.admin-online .status-dot,
.chat-status.admin-offline .status-dot,
.chat-status.bargain .status-dot {
  background: var(--text);
  animation: none;
}

.popup.expanded .bottom-bar,
.popup.fullscreen .bottom-bar {
  background: linear-gradient(
    130deg,
    rgba(0, 180, 120, 0.07) 0%,
    rgba(0, 180, 120, 0.06) 40%,
    rgba(59, 130, 246, 0.06) 70%,
    rgba(59, 130, 246, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 0;
  box-shadow: none;
  border-radius: 9999px;
  width: calc(100% - 44px);
  margin: 0 auto 12px;
  padding: 0px 14px;
}

.chat-input-area {
  flex: 1;
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--surface-soft);
  border-radius: 22px;
  padding: 6px 6px 6px 16px;
  border: 0;
  box-shadow: none;
  transition: all 0.15s;
}

.chat-input-area:focus-within {
  border-color: transparent;
  background: var(--surface-soft);
  box-shadow: none;
}
  .popup.expanded .chat-input-area,
  .popup.fullscreen .chat-input-area { display: flex; }

  .chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    padding: 8px 0;
    color: var(--text);
    letter-spacing: -0.01em;
  }
  .chat-input::placeholder { color: var(--text-subtle); }

  .send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #111827;
    border: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
  }
  .send-btn:active { transform: scale(0.92); }
  .send-btn:hover { background: #000; box-shadow: none; }
  .send-btn svg { width: 14px; height: 14px; }

  /* 재현 버튼 */
  .reopen-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--ai-glow), var(--shadow-md);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
  }
  .reopen-btn.visible { display: flex; pointer-events: auto; }
  .reopen-btn svg { width: 22px; height: 22px; }

  .stage-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--surface);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    z-index: 1;
    white-space: nowrap;
    text-transform: uppercase;
  }

  .hint {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 20, 0.92);
    color: #fff;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 12px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 320px;
    text-align: center;
    box-shadow: var(--shadow-md);
  }
  .hint.show { opacity: 1; pointer-events: none; }

.chat-status.ai,
.chat-status.admin-online,
.chat-status.admin-offline,
.chat-status.bargain {
  background: var(--surface-soft);
  color: var(--text);
}


/* ============================================
   v4 패널 오픈 보정
   - v3에서 닫힘 상태 클릭 통과를 위해 visibility:hidden을 넣으면서
     패널 open 상태의 visibility 복구가 빠져 문의/기록/구독 패널이 안 보이던 문제 수정
   - 패널 오픈 시 팝업 높이를 확보하여 PC/모바일 모두 내부 스크롤로 처리
   ============================================ */
.popup.history-open,
.popup.notify-open,
.popup.inquiry-open {
  height: min(72dvh, 720px);
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  grid-template-rows: auto minmax(0, 1fr);
}

.history-panel.open,
.notify-panel.open,
.inquiry-panel.open {
  visibility: visible;
  pointer-events: auto;
}

.popup.history-open .message-section,
.popup.notify-open .message-section,
.popup.inquiry-open .message-section,
.popup.history-open .chat-status,
.popup.notify-open .chat-status,
.popup.inquiry-open .chat-status,
.popup.history-open .chat-area,
.popup.notify-open .chat-area,
.popup.inquiry-open .chat-area {
  display: none !important;
}

.popup.history-open .bottom-bar,
.popup.notify-open .bottom-bar,
.popup.inquiry-open .bottom-bar {
  display: none !important;
}

@media (max-width: 599px) {
  .popup.history-open:not(.fullscreen),
  .popup.notify-open:not(.fullscreen),
  .popup.inquiry-open:not(.fullscreen) {
    top: max(10px, env(safe-area-inset-top));
    bottom: max(10px, env(safe-area-inset-bottom));
    height: auto;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

/* ============================================
   v5 패널 레이아웃 안정화
   - 패널 모드에서는 채팅/메시지 grid 계산과 완전히 분리
   - 작은 화면에서도 팝업 높이를 명시적으로 확보
   - 패널 내부 submit/적용 버튼은 하단에 고정감 있게 배치
   ============================================ */
.popup.history-open,
.popup.notify-open,
.popup.inquiry-open {
  grid-template-rows: auto minmax(0, 1fr) !important;
  height: min(76dvh, 720px) !important;
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
}

.popup.fullscreen.history-open,
.popup.fullscreen.notify-open,
.popup.fullscreen.inquiry-open {
  top: 0 !important;
  bottom: 0 !important;
  height: 100dvh !important;
  max-height: none !important;
  border-radius: 0 !important;
  transform: none !important;
}

.history-panel,
.notify-panel,
.inquiry-panel {
  top: 44px !important;
  bottom: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.history-panel.open,
.notify-panel.open,
.inquiry-panel.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.notify-panel.open,
.inquiry-panel.open {
  flex-direction: column !important;
}

.notify-panel.open .notify-intro,
.inquiry-panel.open .notify-intro,
.notify-panel.open .notify-tabs {
  flex: 0 0 auto !important;
}

.notify-panel.open .notify-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
}

.inquiry-panel.open {
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.inquiry-panel.open .notify-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
}

.notify-panel.open .notify-pane.active {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.inquiry-panel.open .notify-pane.active {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.notify-panel.open .notify-success.visible,
.inquiry-panel.open .notify-success.visible {
  flex: 1 1 auto !important;
}

.notify-submit,
.inquiry-submit {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 3 !important;
  margin-top: auto !important;
  box-shadow: 0 -10px 18px rgba(255, 255, 255, 0.92) !important;
}

.push-state-info {
  flex: 0 0 auto !important;
}

@media (max-width: 599px) {
  .popup.history-open,
  .popup.notify-open,
  .popup.inquiry-open {
    top: max(10px, env(safe-area-inset-top)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 20px) !important;
    height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }

  @supports not (height: 100dvh) {
    .popup.history-open,
    .popup.notify-open,
    .popup.inquiry-open {
      height: calc(100vh - 20px) !important;
      max-height: calc(100vh - 20px) !important;
    }
  }

  .notify-panel.open .notify-intro,
  .inquiry-panel.open .notify-intro {
    padding: 18px 18px 13px !important;
  }

  .notify-panel.open .notify-content,
  .inquiry-panel.open .notify-content {
    padding: 16px 18px 20px !important;
  }
}


/* ============================================
   v6 채팅 입력부 하단 고정 안정화
   - AI채팅 / 관리자채팅 / 흥정하기 공통
   - 채팅 모드에서는 팝업을 명시적 5행 그리드로 고정
   - 메시지 영역은 0행 처리, 채팅 로그는 남은 공간 전체 사용
   - 입력 바(bottom-bar)는 항상 마지막 행/하단에 고정
   ============================================ */
.popup.chat-open.expanded,
.popup.chat-open.fullscreen {
  display: grid !important;
  grid-template-rows: auto auto 0 minmax(0, 1fr) auto !important;
  overflow: hidden !important;
}

.popup.chat-open.expanded {
  height: min(72dvh, 720px) !important;
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
}

.popup.chat-open.fullscreen {
  top: max(14px, env(safe-area-inset-top)) !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  height: auto !important;
  max-height: none !important;
}

.popup.chat-open .popup-header {
  grid-row: 1 !important;
}

.popup.chat-open .chat-status {
  grid-row: 2 !important;
  display: block !important;
}

.popup.chat-open .message-section {
  grid-row: 3 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

.popup.chat-open .chat-area {
  grid-row: 4 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

.popup.chat-open .chat-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.popup.chat-open .bottom-bar {
  grid-row: 5 !important;
  align-self: end !important;
  flex: 0 0 auto !important;
  min-height: 58px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom)) !important;
  background: var(--surface) !important;
}

.popup.chat-open .chat-input-area {
  display: flex !important;
  width: 100% !important;
}

@media (max-width: 599px) {
  .popup.chat-open.expanded,
  .popup.chat-open.fullscreen {
    top: max(10px, env(safe-area-inset-top)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 20px) !important;
    height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }

  @supports not (height: 100dvh) {
    .popup.chat-open.expanded,
    .popup.chat-open.fullscreen {
      height: calc(100vh - 20px) !important;
      max-height: calc(100vh - 20px) !important;
    }
  }
}

/* ============================================
   v7 채팅 입력부 튐 현상 고정
   - 원인: JS setMode()가 chat-open을 제거하면서 채팅 전용 grid가 풀림
   - 보강: chat-open 상태에서는 하단 입력바를 항상 최종 행에 고정
   ============================================ */
.popup.chat-open.expanded,
.popup.chat-open.fullscreen {
  grid-template-rows: auto auto 0 minmax(0, 1fr) auto !important;
  min-height: 340px !important;
}

.popup.chat-open .bottom-bar {
  position: relative !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 45 !important;
  margin-top: 0 !important;
}

.popup.chat-open .chat-area {
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

.popup.chat-open .chat-input-area {
  flex: 1 1 auto !important;
}

/* ============================================
   v8 입력부 내부 중복 박스 제거
   - 그누보드/테마 공통 input, textarea 스타일이 내부 input에 다시 적용되는 현상 차단
   - 실제 박스는 바깥 래퍼(.chat-input-area / .field-input-wrap / .search-input-wrap)만 담당
   ============================================ */
#hive-site-bottom-popup input,
#hive-site-bottom-popup textarea,
#hive-site-bottom-popup button {
  font-family: inherit;
  box-sizing: border-box;
}

#hive-site-bottom-popup .chat-input-area > .chat-input,
#hive-site-bottom-popup .field-input-wrap > .field-input,
#hive-site-bottom-popup .search-input-wrap > .search-input,
#hive-site-bottom-popup input.chat-input,
#hive-site-bottom-popup input.field-input,
#hive-site-bottom-popup input.search-input,
#hive-site-bottom-popup textarea.field-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

#hive-site-bottom-popup .chat-input-area > .chat-input,
#hive-site-bottom-popup input.chat-input {
  padding: 8px 0 !important;
  line-height: 1.4 !important;
}

#hive-site-bottom-popup .field-input-wrap > .field-input,
#hive-site-bottom-popup input.field-input {
  padding: 11px 14px !important;
  line-height: 1.4 !important;
}

#hive-site-bottom-popup .search-input-wrap > .search-input,
#hive-site-bottom-popup input.search-input {
  padding: 10px 0 10px 10px !important;
  line-height: 1.4 !important;
}

#hive-site-bottom-popup textarea.field-input {
  display: block !important;
  resize: none !important;
  line-height: 1.55 !important;
  padding: 8px 14px !important;
}

#hive-site-bottom-popup .chat-input-area,
#hive-site-bottom-popup .field-input-wrap,
#hive-site-bottom-popup .search-input-wrap {
  isolation: isolate;
}


/* ============================================
   v9 드래그 닫힘 모션 복원
   - 드래그 중 레이어가 손가락/마우스 이동을 따라 내려가며 축소
   - 드래그 종료 시 fullscreen/chat/panel → compact → closed 2단계 흐름으로 닫힘
   ============================================ */
#hive-site-bottom-popup .popup.dragging {
  transition: none !important;
  will-change: transform, opacity;
}

#hive-site-bottom-popup .popup.closing-stage {
  transition:
    transform 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.18s ease,
    top 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    bottom 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    height 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    width 0.22s cubic-bezier(0.32, 0.72, 0, 1),
    border-radius 0.22s cubic-bezier(0.32, 0.72, 0, 1) !important;
}

#hive-site-bottom-popup .popup.closing-compact {
  top: auto !important;
  bottom: max(18px, env(safe-area-inset-bottom)) !important;
  width: min(340px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  grid-template-rows: auto auto auto auto auto !important;
  transform: translate(-50%, 0) scale(0.985) !important;
  opacity: 0.96 !important;
}

#hive-site-bottom-popup .popup.closing-compact .message-section {
  display: block !important;
  max-height: 220px !important;
  padding: 18px 20px 16px !important;
  overflow: hidden !important;
}

#hive-site-bottom-popup .popup.closing-compact .chat-status,
#hive-site-bottom-popup .popup.closing-compact .chat-area,
#hive-site-bottom-popup .popup.closing-compact .bottom-bar,
#hive-site-bottom-popup .popup.closing-compact .history-panel,
#hive-site-bottom-popup .popup.closing-compact .notify-panel,
#hive-site-bottom-popup .popup.closing-compact .inquiry-panel {
  display: none !important;
}

@media (max-width: 599px) {
  #hive-site-bottom-popup .popup.closing-compact {
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 20px) !important;
  }
}


/* ============================================
   v11 드래그 닫힘 모션 안정화
   - fullscreen/chat/panel 클래스를 먼저 제거하지 않고 현재 화면 그대로 아래로 흘려보낸다.
   - compact/message 상태가 다시 로드되는 듯한 끊김을 제거한다.
   ============================================ */
#hive-site-bottom-popup .popup.drag-close-out {
  transition:
    transform 0.46s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.30s ease,
    border-radius 0.46s cubic-bezier(0.32, 0.72, 0, 1) !important;
  transform: translate(-50%, calc(100dvh + 40px)) scale(0.94) !important;
  opacity: 0 !important;
  border-radius: 18px !important;
  pointer-events: none !important;
  will-change: transform, opacity;
}

@supports not (height: 100dvh) {
  #hive-site-bottom-popup .popup.drag-close-out {
    transform: translate(-50%, calc(100vh + 40px)) scale(0.94) !important;
  }
}

/* ============================================
   v12 PC/모바일 위치 체계 분리
   - PC: 우측 하단 카드/채팅 → 풀화면만 중앙 모달
   - Mobile: 좌우 꽉 찬 바텀시트 → 풀화면은 상단 여백만 남기고 확장
   ============================================ */
@media (min-width: 600px) and (pointer: fine) {
  #hive-site-bottom-popup .popup {
    left: auto !important;
    right: max(24px, env(safe-area-inset-right)) !important;
    bottom: max(24px, env(safe-area-inset-bottom)) !important;
    top: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 48px) !important;
    max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    transform: translateY(120%) !important;
  }

  #hive-site-bottom-popup .popup.shown {
    transform: translateY(0) !important;
  }

  #hive-site-bottom-popup .popup.expanded,
  #hive-site-bottom-popup .popup.chat-open.expanded,
  #hive-site-bottom-popup .popup.history-open,
  #hive-site-bottom-popup .popup.notify-open,
  #hive-site-bottom-popup .popup.inquiry-open {
    left: auto !important;
    right: max(24px, env(safe-area-inset-right)) !important;
    bottom: max(24px, env(safe-area-inset-bottom)) !important;
    top: auto !important;
    width: 340px !important;
    height: min(72dvh, 720px) !important;
    max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    transform: translateY(0) !important;
  }

  #hive-site-bottom-popup .popup.fullscreen,
  #hive-site-bottom-popup .popup.fullscreen.chat-open,
  #hive-site-bottom-popup .popup.fullscreen.history-open,
  #hive-site-bottom-popup .popup.fullscreen.notify-open,
  #hive-site-bottom-popup .popup.fullscreen.inquiry-open {
    left: 50% !important;
    right: auto !important;
    top: max(24px, env(safe-area-inset-top)) !important;
    bottom: max(24px, env(safe-area-inset-bottom)) !important;
    width: min(720px, calc(100vw - 48px)) !important;
    height: auto !important;
    max-height: none !important;
    transform: translateX(-50%) !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 1024px) and (pointer: coarse) { /* mobile portrait/landscape bottom-sheet */
  #hive-site-bottom-popup .popup {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top))) !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translateY(120%) !important;
  }

  #hive-site-bottom-popup .popup.shown {
    transform: translateY(0) !important;
  }

  #hive-site-bottom-popup .popup.expanded,
  #hive-site-bottom-popup .popup.chat-open.expanded,
  #hive-site-bottom-popup .popup.history-open,
  #hive-site-bottom-popup .popup.notify-open,
  #hive-site-bottom-popup .popup.inquiry-open {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100vw !important;
    height: min(74dvh, calc(100dvh - max(10px, env(safe-area-inset-top)))) !important;
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top))) !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translateY(0) !important;
  }

  #hive-site-bottom-popup .popup.fullscreen,
  #hive-site-bottom-popup .popup.fullscreen.chat-open,
  #hive-site-bottom-popup .popup.fullscreen.history-open,
  #hive-site-bottom-popup .popup.fullscreen.notify-open,
  #hive-site-bottom-popup .popup.fullscreen.inquiry-open {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    width: 100vw !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translateY(0) !important;
  }

  #hive-site-bottom-popup .popup-header {
    border-radius: 18px 18px 0 0 !important;
  }
}


/* v15: 풀화면 새로고침 후, 크기는 유지하고 내용은 기본 하단바 상태로 복귀 */
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message {
  grid-template-rows: auto 1fr auto !important;
}

#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .message-section {
  grid-row: 2 !important;
  display: block !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  align-self: stretch !important;
  -webkit-overflow-scrolling: touch !important;
}

#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .chat-status,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .chat-area,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .chat-input-area {
  display: none !important;
}

#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .bottom-bar {
  grid-row: 3 !important;
  display: flex !important;
  flex: 0 0 auto !important;

  width: min(880px, calc(100vw - 48px)) !important;
  max-width: 880px !important;
  margin: 0 auto 18px !important;
  padding: 10px 14px !important;

  background: linear-gradient(
    130deg,
    rgba(0, 180, 120, 0.07) 0%,
    rgba(0, 180, 120, 0.06) 40%,
    rgba(59, 130, 246, 0.06) 70%,
    rgba(59, 130, 246, 0.05) 100%
  ) !important;

  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;

  border: 0 !important;
  border-top: 0 !important;
  border-radius: 9999px !important;
  box-shadow: none !important;

  z-index: 50 !important;
}

#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .ai-chat-trigger,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .admin-chat-trigger,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .inquiry-trigger,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .history-trigger,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .notify-trigger,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message .bargain-trigger {
  display: flex !important;
}



/* PC/모바일 공통: fullscreen은 진짜 전체화면 */
#hive-site-bottom-popup .popup.fullscreen,
#hive-site-bottom-popup .popup.fullscreen.shown,
#hive-site-bottom-popup .popup.fullscreen.reset-fullscreen-message {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;

  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;

  border-radius: 0 !important;
  transform: none !important;

  transition: filter 0.25s ease !important;
}

/* 100dvh 미지원 보정 */
@supports not (height: 100dvh) {
  #hive-site-bottom-popup .popup.fullscreen,
  #hive-site-bottom-popup .popup.fullscreen.shown {
    height: 100vh !important;
  }
}

/* 풀화면에서는 확대/축소 버튼 숨김 */
#hive-site-bottom-popup .popup.fullscreen #fullscreenBtn {
  display: none !important;
}

/* 풀화면에서는 새로고침과 닫기 유지 */
#hive-site-bottom-popup .popup.fullscreen #refreshBtn,
#hive-site-bottom-popup .popup.fullscreen #closeBtn {
  display: flex !important;
}


html.hive-popup-scroll-locked,
body.hive-popup-scroll-locked {
  overflow: hidden !important;
  height: 100% !important;
}


/* 풀화면 닫힘 중에도 1차 팝업 크기로 돌아가지 않게 고정 */
#hive-site-bottom-popup .popup.fullscreen-closing {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;

  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;

  border-radius: 0 !important;
  transform: none !important;
}

/* PC 풀화면: 레이어/라인은 100%, 내부 요소만 폭 제한 */
@media (min-width: 900px) {
  #hive-site-bottom-popup .popup.fullscreen > .message-section,
  #hive-site-bottom-popup .popup.fullscreen > .chat-area,
  #hive-site-bottom-popup .popup.fullscreen > .history-panel,
  #hive-site-bottom-popup .popup.fullscreen > .notify-panel,
  #hive-site-bottom-popup .popup.fullscreen > .inquiry-panel {
    width: 100% !important;
  }

#hive-site-bottom-popup .popup.fullscreen > .message-section > *,
#hive-site-bottom-popup .popup.fullscreen > .chat-area > *,
#hive-site-bottom-popup .popup.fullscreen > .history-panel > * {
  width: min(880px, calc(100vw - 48px)) !important;
  max-width: 880px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#hive-site-bottom-popup .popup.fullscreen > .notify-panel > .notify-intro,
#hive-site-bottom-popup .popup.fullscreen > .inquiry-panel > .notify-intro {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: max(22px, calc((100vw - 880px) / 2)) !important;
  padding-right: max(22px, calc((100vw - 880px) / 2)) !important;
}

#hive-site-bottom-popup .popup.fullscreen > .notify-panel > .notify-tabs,
#hive-site-bottom-popup .popup.fullscreen > .notify-panel > .notify-content,
#hive-site-bottom-popup .popup.fullscreen > .inquiry-panel > .notify-content {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: max(22px, calc((100vw - 880px) / 2)) !important;
  padding-right: max(22px, calc((100vw - 880px) / 2)) !important;
  box-sizing: border-box !important;
}

  #hive-site-bottom-popup .popup.fullscreen .popup-header {
    width: 100% !important;
  }

#hive-site-bottom-popup .popup.fullscreen .controls {
  width: auto !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  justify-content: flex-end;
}

  #hive-site-bottom-popup .popup.fullscreen .bottom-bar {
    width: 100% !important;
    justify-content: center;
  }

  #hive-site-bottom-popup .popup.fullscreen .bottom-bar > * {
    max-width: 880px;
  }
}

#hive-site-bottom-popup .popup.fullscreen::before {
  display: none !important;
}

/* ==================================================
   1. 헤더 아래 삐져나오는 검은 캡슐 제거
   stageBadge 자체를 숨김 처리
   ================================================== */
#hive-site-bottom-popup .stage-badge {
  display: none !important;
}



/* 새로고침 순간 잔상 제거 */
#hive-site-bottom-popup .popup.refresh-resetting,
#hive-site-bottom-popup .popup.refresh-resetting * {
  transition: none !important;
  animation: none !important;
}

#hive-site-bottom-popup .popup.refresh-resetting .history-panel,
#hive-site-bottom-popup .popup.refresh-resetting .notify-panel,
#hive-site-bottom-popup .popup.refresh-resetting .inquiry-panel,
#hive-site-bottom-popup .popup.refresh-resetting .chat-area,
#hive-site-bottom-popup .popup.refresh-resetting .chat-status,
#hive-site-bottom-popup .popup.refresh-resetting .chat-input-area {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


@media (max-width: 599px) {
  .popup .bottom-bar {
    justify-content: flex-start !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}


/* 버튼 클릭 후 열리는 헤더 타이틀 */
#hive-site-bottom-popup .popup-header {
  justify-content: space-between !important;
}

#hive-site-bottom-popup .popup-header-title {
  display: none;
  align-items: center;
  min-width: 0;
  margin-top: 6px;
  padding-left: 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hive-site-bottom-popup .popup.has-header-title .popup-header-title {
  display: flex;
}

/* 타이틀 있는 화면에서는 확장/축소 버튼 숨김: 우측은 새로고침 + 닫기 */

#hive-site-bottom-popup .popup.has-header-title #refreshBtn,
#hive-site-bottom-popup .popup.has-header-title #closeBtn {
  display: flex !important;
}

/* 헤더 정렬 재보정 */

/* 기본패널: 타이틀 없으면 버튼은 항상 우측 */
#hive-site-bottom-popup .popup:not(.has-header-title) .popup-header {
  justify-content: flex-end !important;
}

/* 세부패널: 타이틀 있을 때만 좌측 타이틀 + 우측 버튼 */
#hive-site-bottom-popup .popup.has-header-title .popup-header {
  justify-content: space-between !important;
}

/* 세부패널에서는 버튼 그룹이 자기 크기만 차지 */
#hive-site-bottom-popup .popup.has-header-title .controls {
  width: auto !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
}

/* 타이틀은 팝업 내부 폭 안에서만 */
#hive-site-bottom-popup .popup-header-title {
  flex: 1 1 auto !important;
  max-width: calc(100% - 90px) !important;
}

/* PC 풀화면 세부패널: 헤더 내부요소를 본문 880px 라인에 맞춤 */
@media (min-width: 900px) {
  #hive-site-bottom-popup .popup.fullscreen.has-header-title .popup-header {
    padding-left: max(14px, calc((100vw - 880px) / 2)) !important;
    padding-right: max(14px, calc((100vw - 880px) / 2)) !important;
  }
}

/* 모바일 풀화면 기본패널도 버튼 우측 */
@media (max-width: 599px) {
  #hive-site-bottom-popup .popup.fullscreen:not(.has-header-title) .popup-header {
    justify-content: flex-end !important;
  }
}

/* PC/모바일 공통: 풀화면에서는 새로고침 + 닫기만 */
#hive-site-bottom-popup .popup.fullscreen #fullscreenBtn {
  display: none !important;
}

#hive-site-bottom-popup .popup.fullscreen #refreshBtn,
#hive-site-bottom-popup .popup.fullscreen #closeBtn {
  display: flex !important;
}

/* 단, 필요하면 기본 버튼 순서 그대로: 새로고침 / 확대 / 닫기 */
#hive-site-bottom-popup .popup.has-header-title .controls {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}


/* 풀화면 공통 규칙: 어떤 세부패널이 열려도 풀화면 유지 */
#hive-site-bottom-popup .popup.fullscreen.history-open,
#hive-site-bottom-popup .popup.fullscreen.notify-open,
#hive-site-bottom-popup .popup.fullscreen.inquiry-open,
#hive-site-bottom-popup .popup.fullscreen.chat-open {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  transform: none !important;
}

/* 풀화면에서는 무조건 새로고침 + 닫기만 */
#hive-site-bottom-popup .popup.fullscreen #fullscreenBtn {
  display: none !important;
}

#hive-site-bottom-popup .popup.fullscreen #refreshBtn,
#hive-site-bottom-popup .popup.fullscreen #closeBtn {
  display: flex !important;
}



/* PC 전용: 전체 텍스트/버튼 체감 크기 보정 */
@media (min-width: 600px) {

  /* 기본 메시지 제목 */
  #hive-site-bottom-popup .message-title {
    font-size: 19px !important;
    line-height: 1.45 !important;
  }

  /* 기본 메시지 본문 */
  #hive-site-bottom-popup .message-body {
    font-size: 14.5px !important;
    line-height: 1.75 !important;
  }

  /* 채팅 버블 전체 */
#hive-site-bottom-popup .chat-bubble {
  font-size: 16px !important;
  line-height: 1.75 !important;
}

#hive-site-bottom-popup .chat-bubble.ai,
#hive-site-bottom-popup .chat-bubble.admin,
#hive-site-bottom-popup .chat-bubble.bargain {
  padding: 12px 0 !important;
}

#hive-site-bottom-popup .chat-bubble.user {
  padding: 12px 14px !important;
}

/* 하단 주요 버튼 */
#hive-site-bottom-popup .ai-chat-trigger,
#hive-site-bottom-popup .admin-chat-trigger,
#hive-site-bottom-popup .inquiry-trigger {
  min-height: 35px !important;
  padding: 0 10px !important;
  font-size: 13.5px !important;
}

/* 모바일 메인팝업: 주요 버튼을 아이콘형으로 전환 */
@media (max-width: 599px) {
  #hive-site-bottom-popup .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) .ai-chat-trigger,
  #hive-site-bottom-popup .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) .admin-chat-trigger,
  #hive-site-bottom-popup .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) .inquiry-trigger {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    min-height: 35px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 11px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

  /* 하단 아이콘 버튼 */
  #hive-site-bottom-popup .history-trigger,
  #hive-site-bottom-popup .notify-trigger,
  #hive-site-bottom-popup .bargain-trigger {
    width: 35px !important;
    height: 35px !important;
  }

/* 입력부 */
#hive-site-bottom-popup .chat-input-area {
  min-height: 56px !important;
  border-radius: 28px !important;
  padding: 6px 8px 6px 16px !important;
}

#hive-site-bottom-popup .chat-input {
  height: 44px !important;
  font-size: 14.5px !important;
  line-height: 44px !important;
}

#hive-site-bottom-popup .send-btn {
  width: 36px !important;
  height: 36px !important;
}

  /* 세부패널 헤더 타이틀 */
  #hive-site-bottom-popup .popup-header-title {
    font-size: 15.5px !important;
  }
}


/* PC 풀화면: 내부 스크롤바를 브라우저 우측 끝으로 이동 */
@media (min-width: 900px) {
  #hive-site-bottom-popup .popup.fullscreen {
    overflow: hidden !important;
  }
	
  #hive-site-bottom-popup .popup.fullscreen .popup-header {
    background: transparent !important;
    border-bottom: 0 !important;
  }

  #hive-site-bottom-popup .popup.fullscreen .popup-header::before {
    display: none !important;
  }
	
  /* 기본 메시지 화면 */
  #hive-site-bottom-popup .popup.fullscreen .message-section {
    width: 100vw !important;
    max-width: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  #hive-site-bottom-popup .popup.fullscreen .message-section > * {
    width: min(880px, calc(100vw - 48px)) !important;
    max-width: 880px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

/* 채팅 화면 */
#hive-site-bottom-popup .popup.fullscreen .chat-messages {
  width: 100vw !important;
  max-width: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-left: max(24px, calc((100vw - 880px) / 2)) !important;
  padding-right: max(24px, calc((100vw - 880px) / 2)) !important;
  box-sizing: border-box !important;
}


/* 히스토리/알림/문의 패널 */
#hive-site-bottom-popup .popup.fullscreen .history-search {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: max(16px, calc((100vw - 880px) / 2)) !important;
  padding-right: max(16px, calc((100vw - 880px) / 2)) !important;
  box-sizing: border-box !important;
}

#hive-site-bottom-popup .popup.fullscreen .history-list {
  width: 100vw !important;
  max-width: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#hive-site-bottom-popup .popup.fullscreen .history-list > * {
  width: min(880px, calc(100vw - 48px)) !important;
  max-width: 880px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

	
/* 알림/문의 폼 영역: 탭과 같은 풀폭 + 동일 라인 */
#hive-site-bottom-popup .popup.fullscreen .notify-panel .notify-content,
#hive-site-bottom-popup .popup.fullscreen .inquiry-panel .notify-content {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: max(22px, calc((100vw - 880px) / 2)) !important;
  padding-right: max(22px, calc((100vw - 880px) / 2)) !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* 폼 내부 요소에는 별도 880 폭 강제 금지 */
#hive-site-bottom-popup .popup.fullscreen .notify-content > *,
#hive-site-bottom-popup .popup.fullscreen .inquiry-panel .notify-content > * {
  width: auto !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* 우측 중앙 버튼 */
#hive-site-bottom-popup .popup.fullscreen #refreshBtn {
  position: fixed;
  right: 24px;
  top: 50%;
  width: 42px !important;
  height: 42px !important;
  transform: translateY(-52px);
  z-index: 9999;
}

#hive-site-bottom-popup .popup.fullscreen #closeBtn {
  position: fixed;
  right: 24px;
  top: 50%;
  width: 42px !important;
  height: 42px !important;
  transform: translateY(6px);
  z-index: 9999;
}

#hive-site-bottom-popup .popup.fullscreen #refreshBtn svg,
#hive-site-bottom-popup .popup.fullscreen #closeBtn svg {
  width: 18px !important;
  height: 18px !important;
}
}


/* PC 풀화면: 메시지 타이틀/본문 좌측 정렬 보정 */
@media (min-width: 900px) {
  #hive-site-bottom-popup .popup.fullscreen .message-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #hive-site-bottom-popup .popup.fullscreen .message-meta,
  #hive-site-bottom-popup .popup.fullscreen .message-title,
  #hive-site-bottom-popup .popup.fullscreen .message-body,
  #hive-site-bottom-popup .popup.fullscreen .actions-label,
  #hive-site-bottom-popup .popup.fullscreen .actions-section {
    width: min(880px, calc(100vw - 48px)) !important;
    max-width: 880px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}




/* 모바일 + 메인팝업 상태에서만 */
@media (max-width: 599px) {
  #hive-site-bottom-popup .popup:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) .bottom-bar {
    background: transparent !important;
    border-top: 0 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 599px) {
  #hive-site-bottom-popup .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) {
    overflow: visible !important;
  }

  #hive-site-bottom-popup .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) .bottom-bar {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    pointer-events: none !important;
    z-index: 80 !important;
  }

  #hive-site-bottom-popup .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open) .bottom-bar > * {
    pointer-events: auto !important;
  }
}






/* =========================================================
   하단 버튼/입력바 공통 아이콘 정리
   ========================================================= */

.ai-chat-trigger:hover,
.admin-chat-trigger:hover,
.admin-chat-trigger.offline:hover,
.inquiry-trigger:hover,
.history-trigger:hover,
.notify-trigger:hover,
.bargain-trigger:hover {
  transform: translateY(-2px);
}

/* AI 제외: 캡슐 내부 일반 아이콘 통일 */
.admin-icon,
.inquiry-icon,
.history-trigger svg,
.notify-trigger svg,
.bargain-trigger svg {
  width: 20px;
  height: 20px;
  color: #111111;
  stroke: currentColor;
}

.admin-icon-wrap {
  width: 20px;
  height: 20px;
}

.live-dot {
  bottom: -1px;
  right: -1px;
}



/* =========================================================
   채팅/세부모드 bottom-bar 기본 폭
   - 채팅입력부 보호용
   - 메인 버튼그룹 여백 조정용으로 쓰지 말 것
   ========================================================= */

#hive-site-bottom-popup .popup.expanded .bottom-bar,
#hive-site-bottom-popup .popup.fullscreen .bottom-bar {
  width: calc(100% - 12px) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}


/* =========================================================
   PC/모바일 공통: 메인팝업 하단 캡슐바 시각효과
   ========================================================= */

#hive-site-bottom-popup
.popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open)
.bottom-bar {
  border-radius: 9999px;
  background: linear-gradient(
    130deg,
    rgba(0, 180, 120, 0.07) 0%,
    rgba(0, 180, 120, 0.06) 40%,
    rgba(59, 130, 246, 0.06) 70%,
    rgba(59, 130, 246, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 0;
  box-shadow: none;
}


/* =========================================================
   PC 1차팝업 메인 상태 전용
   - 하단 버튼그룹바 여백만 조정
   - 채팅입력부 영향 차단
   ========================================================= */

@media (min-width: 600px) {
  #hive-site-bottom-popup
  .popup.shown:not(.expanded):not(.fullscreen):not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open)
  .bottom-bar {
    width: calc(100% - 36px) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
}


/* =========================================================
   모바일 메인팝업 전용
   - 캡슐 안에 버튼 수납 + 가로 스크롤
   - 세부패널/채팅/히스토리/알림/문의 영향 차단
   ========================================================= */

@media (max-width: 599px) {
  #hive-site-bottom-popup
  .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open)
  .bottom-bar {
    width: min(calc(100vw - 32px), 360px) !important;
    max-width: calc(100vw - 32px) !important;

    left: 50% !important;
    right: auto !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;

    padding: 4px 12px !important;
    margin: 0 !important;

    border-radius: 9999px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;

    pointer-events: auto !important;
	background: linear-gradient(
      130deg,
      rgba(0, 180, 120, 0.07) 0%,
      rgba(0, 180, 120, 0.06) 40%,
      rgba(59, 130, 246, 0.06) 70%,
      rgba(59, 130, 246, 0.05) 100%
    ) !important;

    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;

    border: 0 !important;
    box-shadow: none !important;  
	  
  }

  #hive-site-bottom-popup
  .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open)
  .bottom-bar::-webkit-scrollbar {
    display: none !important;
  }

  #hive-site-bottom-popup
  .popup.shown:not(.chat-open):not(.history-open):not(.notify-open):not(.inquiry-open)
  .bottom-bar > * {
    flex: 0 0 auto !important;
    position: relative !important;
    transform: none !important;
    margin: 0 !important;
  }

  /* 모바일 채팅/세부모드 입력부 폭 */
  #hive-site-bottom-popup .popup.chat-open .bottom-bar,
  #hive-site-bottom-popup .popup.expanded .bottom-bar,
  #hive-site-bottom-popup .popup.fullscreen .bottom-bar {
    width: calc(100% - 10px) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}


/* 팝업 전체 본문 스크롤바 얇고 연하게 */
#hive-site-bottom-popup .popup .message-section,
#hive-site-bottom-popup .popup .chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.12) transparent;
}

#hive-site-bottom-popup .popup .message-section::-webkit-scrollbar,
#hive-site-bottom-popup .popup .chat-messages::-webkit-scrollbar {
    width: 5px;
}

#hive-site-bottom-popup .popup .message-section::-webkit-scrollbar-track,
#hive-site-bottom-popup .popup .chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#hive-site-bottom-popup .popup .message-section::-webkit-scrollbar-thumb,
#hive-site-bottom-popup .popup .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.10);
    border-radius: 999px;
}

#hive-site-bottom-popup .popup .message-section::-webkit-scrollbar-thumb:hover,
#hive-site-bottom-popup .popup .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.16);
}
