/* ASC Chat UI - LINE-style */
:root {
    --primary: #06C755;
    --primary-dark: #05a648;
    --bg: #7494C0;
    --chat-bg: #7494C0;
    --user-bubble: #06C755;
    --system-bubble: #FFFFFF;
    --header-bg: #06C755;
    --text-dark: #111;
    --text-light: #fff;
    --text-gray: #888;
    --border: #ddd;
    --danger: #FF3B30;
    --warning: #FF9500;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f0f0;
    height: 100vh;
    height: 100dvh;  /* iOS Safari 動的ビューポート対応 */
    overflow: hidden;
}

/* App container - mobile simulation on PC */
.app {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--chat-bg);
}

/* Login screen */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(135deg, #06C755 0%, #04a045 100%);
    padding: 2rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    position: relative;
    overflow: hidden;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.login-title {
    color: white;
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.login-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    text-align: center;
}
.login-subtitle .en {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.8rem;
    opacity: 0.85;
}

/* 中央：顧客企業ロゴ（大きめ・目立つ） */
.login-customer-logo {
    margin: 1rem 0 1.5rem;
    text-align: center;
    min-height: 2px;  /* 画像が読み込まれない時の高さ調整 */
}
.login-customer-logo img {
    max-width: 200px;
    max-height: 70px;
    width: auto;
    height: auto;
    background: rgba(255,255,255,0.95);
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* 下段：製作者ロゴ（Powered by Claude × HTP） - 画面下端に固定 */
.login-brands {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
    pointer-events: none;  /* 透過（クリック邪魔しない） */
}
.login-brands > * { pointer-events: auto; }

.brand-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.brand-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    width: fit-content;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.brand-logo {
    height: 26px;
    width: auto;
    object-fit: contain;
    display: block;
}
.brand-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}
.brand-sep {
    color: #ccc;
    font-size: 1rem;
    font-weight: 300;
    margin: 0 2px;
}

.login-form {
    width: 100%;
    max-width: 320px;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.95);
    outline: none;
}

.login-input::placeholder {
    color: #999;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: white;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
}

.login-btn:active {
    background: #f0f0f0;
}

.login-error {
    color: #FFD700;
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
    min-height: 1.2em;
}

/* Header */
.chat-header {
    background: var(--header-bg);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;   /* iOS Safari でも常時表示 */
    top: 0;
    z-index: 50;
    min-height: 52px;
}

.chat-header-back {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.chat-header-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header-title .header-sodan {
    font-weight: 700;
    letter-spacing: 0.04em;
}
.chat-header-title .header-powered {
    display: inline-flex;
    align-items: center;
    background: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.header-claude-logo {
    height: 16px;
    width: auto;
    object-fit: contain;
    display: block;
}
.header-claude-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: #06C755;
}

.chat-header-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.chat-header-quick {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.chat-header-quick:active {
    background: rgba(255,255,255,0.4);
}


.chat-header-lang {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 18px;
    cursor: pointer;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.chat-header-lang:active {
    background: rgba(255,255,255,0.3);
}
.chat-header-escalate {
    background: #FFFFFF;
    border: 2px solid #FFFFFF;
    color: #DC2626;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.chat-header-escalate:active {
    background: #FEE2E2;
    color: #991B1B;
}

/* エスカレーション確認モーダル */
.escalate-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.escalate-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.escalate-modal-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.escalate-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.escalate-modal-title .ja {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
}

.escalate-modal-body {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 16px 0;
}

.escalate-modal-body .ja {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-top: 4px;
}

.escalate-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.escalate-modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.escalate-modal-btn.cancel {
    background: #F3F4F6;
    color: #6B7280;
}

.escalate-modal-btn.confirm {
    background: #DC2626;
    color: white;
}

.escalate-modal-btn.confirm:active {
    background: #991B1B;
}

/* HELP DESK ジャンルボタン */
.helpdesk-genre-btn {
    padding: 14px 16px;
    border: 2px solid #DC2626;
    background: white;
    color: #111;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
    transition: all 0.15s;
}

.helpdesk-genre-btn:active {
    background: #FEE2E2;
    transform: scale(0.98);
}

.helpdesk-genre-btn .hd-en {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 400;
}

/* 言語選択ボタン */
.lang-btn {
    padding: 14px 10px;
    border: 2px solid rgba(255,255,255,0.5);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.lang-btn:active {
    transform: scale(0.95);
    background: #F0FDF4;
}

.lang-btn .flag {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 4px;
}

.lang-btn .native {
    font-size: 0.85rem;
    color: #111;
    font-weight: 700;
}

.lang-btn .ja {
    font-size: 0.7rem;
    color: #666;
    font-weight: 400;
    margin-top: 2px;
    display: block;
}

/* Header dropdown menu */
.chat-header {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 100;
    overflow: hidden;
}

.menu-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.menu-dropdown a:last-child { border-bottom: none; }
.menu-dropdown a:active { background: #f5f5f5; }

/* Session list */
.session-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: white;
    min-height: 0;
}

/* Session list screen layout */
#sessionListScreen {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: white;
}

.session-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    gap: 12px;
}

.session-item:active {
    background: #f5f5f5;
}

.session-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.session-info {
    flex: 1;
    min-width: 0;
}

.session-info-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.session-category {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.session-date {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.session-preview {
    font-size: 0.85rem;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.urgency-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    margin-left: 6px;
}

.urgency-1, .urgency-2 { background: #8E8E93; }
.urgency-3 { background: var(--warning); }
.urgency-4 { background: #FF6B00; }
.urgency-5 { background: var(--danger); }

/* New chat button */
.new-chat-btn {
    position: fixed;
    bottom: 24px;
    right: calc(50% - 210px);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

@media (max-width: 480px) {
    .new-chat-btn {
        right: 24px;
    }
}

/* Chat screen layout */
#chatScreen {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Chat messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;   /* iOS 慣性スクロール */
    overscroll-behavior: contain;        /* 画面引っ張り防止 */
    scroll-behavior: smooth;              /* スムーズスクロール */
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    /* GPU アクセラレーション */
    transform: translateZ(0);
    will-change: scroll-position;
    -webkit-transform: translate3d(0,0,0);
}

.message {
    display: flex;
    max-width: 85%;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-user {
    align-self: flex-end;
}

.message-system {
    align-self: flex-start;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
    /* 2026-04-23 AI応答の改行（\n）をそのまま反映し、
       「1. ... 2. ...」の箇条書きが1行に潰れないようにする */
    white-space: pre-wrap;
}

.message-user .message-bubble {
    background: var(--user-bubble);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-system .message-bubble {
    background: var(--system-bubble);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Admin reply (human staff) */
.message-admin .message-bubble {
    background: #FFF3E0;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    border-left: 3px solid #FF9500;
}

.message-admin {
    align-self: flex-start;
}

.admin-label {
    font-size: 0.7rem;
    color: #FF9500;
    font-weight: 600;
    margin-bottom: 2px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-top: 4px;
    text-align: right;
}

.message-system .message-time {
    text-align: left;
}

/* System greeting */
.system-greeting {
    background: rgba(255,255,255,0.85);
    text-align: center;
    padding: 18px 20px;
    border-radius: 14px;
    color: #444;
    margin: 12px auto;
    max-width: 92%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.system-greeting .greeting-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}
.system-greeting .greeting-sub {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 14px;
}
.system-greeting .greeting-hint {
    font-size: 0.82rem;
    color: #B91C1C;
    background: #FEE2E2;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
}

/* Chat input */
.chat-input-area {
    background: #f7f7f7;
    padding: 8px 12px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.chat-upload-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #999;
    color: #999;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.chat-upload-btn:active {
    background: #f0f0f0;
    border-color: #666;
    color: #666;
}

.chat-input {
    flex: 1;
    border: none;
    background: white;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    outline: none;
    line-height: 1.4;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.chat-send-btn:disabled {
    background: #ccc;
    cursor: default;
}

.chat-send-btn:not(:disabled):active {
    background: var(--primary-dark);
}

/* Loading / Thinking indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    align-self: flex-start;
    max-width: 120px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #06C755;
    border-radius: 50%;
    animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Bilingual (Japanese subtitle) */
.ja {
    display: block;
    font-size: 0.8em;
    opacity: 0.75;
    margin-top: 2px;
}

.message-bubble .ja {
    font-size: 0.82em;
    opacity: 0.7;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.message-system .message-bubble .ja {
    border-top-color: rgba(0,0,0,0.08);
}

/* Utility */
.hidden { display: none !important; }

/* Safe area for mobile */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .chat-input-area {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* =========================================================================
   2026-04-22 はい/いいえ強制回収機能 UI（軍師1指示 要件B）
   通常AI発言バブルと明確に区別するため、黄色枠＋警告アイコン付きで表示
   ========================================================================= */
.message-support-confirm {
    display: flex;
    justify-content: flex-start;
    margin: 16px 0;
}

.support-confirm-bubble {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 85%;
    padding: 16px 18px;
    background: #FFF9E6;            /* 薄い黄色背景（注意喚起） */
    border: 2px solid #F59E0B;      /* 濃い黄色枠 */
    border-left: 6px solid #F59E0B; /* 左アクセント太め */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    position: relative;
}

.support-confirm-icon {
    font-size: 1.5rem;
    line-height: 1;
    position: absolute;
    top: -12px;
    left: -12px;
    background: #F59E0B;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.support-confirm-body {
    padding-top: 4px;
}

.support-confirm-text {
    color: #78350F;
    font-weight: 600;
    line-height: 1.5;
    font-size: 1rem;
}

.support-confirm-ja {
    display: block;
    margin-top: 6px;
    color: #92400E;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.85;
}

.support-confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.support-confirm-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, opacity 0.2s;
    user-select: none;
}

.support-confirm-btn-yes {
    background: #06C755; /* 既存Supportボタン風の緑基調（要件B） */
    color: #fff;
    box-shadow: 0 2px 6px rgba(6, 199, 85, 0.3);
}

.support-confirm-btn-yes:hover:not(:disabled) {
    background: #05a648;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(6, 199, 85, 0.4);
}

.support-confirm-btn-no {
    background: #fff;
    color: #78350F;
    border: 2px solid #F59E0B;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.support-confirm-btn-no:hover:not(:disabled) {
    background: #FEF3C7;
    transform: translateY(-1px);
}

.support-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.support-confirm-btn.selected {
    opacity: 0.7;
    outline: 3px solid #065F46;
    outline-offset: 2px;
}

/* 入力欄ロック中のスタイル（要件4: フリーテキスト入力ブロック） */
.input-locked-support-confirm {
    background: #F3F4F6 !important;
    color: #9CA3AF !important;
    cursor: not-allowed;
}

/* ===== サポートブラインドマスク ===== */

/* メッセージ領域のラッパー（ブラインドの基準コンテナ） */
.chat-messages-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;   /* ブラインドが領域外に出たときにクリップ */
    display: flex;
    flex-direction: column;
}

/* ブラインド本体: 初期はメッセージ領域の上方に格納 */
.support-blind {
    position: absolute;
    inset: 0;
    background: rgba(254, 243, 199, 0.42);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(245, 158, 11, 0.05) 0px,
        rgba(245, 158, 11, 0.05) 1px,
        transparent 1px,
        transparent 24px
    );
    transform: translateY(-100%);
    transition: transform 0.7s ease-out;
    pointer-events: none;
    z-index: 10;
}

/* サポート中: ブラインドを降下 */
.support-active .support-blind {
    transform: translateY(0);
    pointer-events: auto;
}

/* ブラインド上端のバナー帯 */
.support-blind-banner {
    background: rgba(245, 158, 11, 0.95);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 16px;
    text-align: center;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* サポート終了ボタン（ヘッダー内、サポート中のみ表示） */
.chat-header-end-support {
    display: none;
    background: #DC2626;
    border: 2px solid #DC2626;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 18px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.chat-header-end-support:active {
    background: #991B1B;
    border-color: #991B1B;
}

/* サポート中: Support ボタンを非表示、終了ボタンを表示 */
.support-active .chat-header-escalate {
    display: none;
}

.support-active .chat-header-end-support {
    display: block;
}

/* 「返事待ち」インジケーター（L2 で管理者返信待ち） */
.waiting-indicator {
    color: #9ca3af;
    font-size: 0.78rem;
    font-style: italic;
    align-self: flex-start;
    margin-left: 14px;
    padding: 2px 6px;
    animation: wait-pulse 2s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes wait-pulse {
    0%, 100% { opacity: 0.35; transform: translateY(0); }
    50%      { opacity: 0.85; transform: translateY(-2px); }
}

