
/* ===== CHAT BUG FIX: Force hide inactive tabs + msg notice styles ===== */

/* Ensure inactive tabs are completely hidden */
.chat-tab-content { 
    display: none !important;
    flex-direction: column; 
    flex: 1; 
    overflow: hidden;
    min-height: 0;
}
.chat-tab-content.active { 
    display: flex !important; 
}

/* Fix chatbot window overflow on mobile */
.chatbot-window {
    overflow: hidden !important;
}

/* Message notice (ℹ️ box) styles */
.chat-msg-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 200, 0, 0.07);
    border-left: 3px solid rgba(201, 168, 76, 0.5);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 12px 12px 0;
    border-radius: 0 8px 8px 0;
}
.chat-msg-notice-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.chat-msg-notice p {
    margin: 0;
    font-size: 0.76rem;
}

/* Message list styles */
.chat-msg-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}
.chat-msg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.chat-msg-item:hover {
    background: rgba(201, 168, 76, 0.06);
}
.chat-msg-item-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201, 168, 76,0.2), rgba(201, 168, 76,0.05));
    border: 1px solid rgba(201, 168, 76,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.chat-msg-item-info {
    flex: 1;
    min-width: 0;
}
.chat-msg-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-msg-item-preview {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-msg-item-time {
    font-size: 0.7rem;
    color: rgba(201, 168, 76,0.6);
    flex-shrink: 0;
}

/* Discord announce banner */
.chat-discord-announce {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(88,101,242,0.15), rgba(88,101,242,0.05));
    border: 1px solid rgba(88,101,242,0.3);
    border-radius: 12px;
}
.chat-discord-announce-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.chat-discord-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 14px;
    background: #5865F2;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.chat-discord-btn:hover { background: #4752c4; }

/* Bottom nav */
.chat-bottom-nav {
    display: flex;
    border-top: 1px solid rgba(201, 168, 76,0.15);
    background: rgba(10,10,10,0.95);
    flex-shrink: 0;
}
.chat-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 4px 8px;
    cursor: pointer;
    color: rgba(255,255,255,0.4);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: none;
    border: none;
    position: relative;
    transition: color 0.2s;
}
.chat-nav-item:hover { color: rgba(201, 168, 76,0.7); }
.chat-nav-item.active { color: #DAA520; }
.chat-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #DAA520;
    border-radius: 0 0 2px 2px;
}
.chat-nav-badge {
    position: absolute;
    top: 6px;
    right: 50%;
    margin-right: -18px;
    background: #EF4444;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}
.chat-tab-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76,0.3) transparent;
}

/* ===== AI CHATBOT PREMIUM POLISH ===== */
.chatbot-window,
.chatbot-window *,
.chatbot-window *::before,
.chatbot-window *::after {
    box-sizing: border-box;
}

.chatbot-window {
    right: 18px !important;
    bottom: 92px !important;
    width: min(420px, calc(100vw - 32px)) !important;
    height: min(720px, calc(100vh - 112px)) !important;
    max-height: min(720px, calc(100vh - 112px)) !important;
    color: #f8f0d8 !important;
    background:
        radial-gradient(circle at 18% 0%, rgba(218, 165, 32, .18), transparent 34%),
        linear-gradient(180deg, rgba(19, 17, 11, .985), rgba(5, 5, 4, .99)) !important;
    border: 1px solid rgba(218, 165, 32, .42) !important;
    border-radius: 20px !important;
    box-shadow:
        0 26px 90px rgba(0, 0, 0, .72),
        0 0 0 1px rgba(255, 255, 255, .035) inset,
        0 0 42px rgba(218, 165, 32, .10) !important;
    font-family: "Noto Sans JP", Inter, system-ui, sans-serif !important;
    letter-spacing: 0 !important;
    overflow: hidden !important;
}

.chatbot-window :where(h1, h2, h3, h4, p, div, span, button, a, input) {
    letter-spacing: 0 !important;
    text-transform: none !important;
    writing-mode: horizontal-tb !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

.chatbot-window :where(p, div, span, a, button, input) {
    font-family: "Noto Sans JP", Inter, system-ui, sans-serif !important;
}

.chatbot-window.show {
    display: flex !important;
    flex-direction: column !important;
}

.chatbot-header {
    min-height: 74px !important;
    padding: 14px 16px !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    background:
        linear-gradient(135deg, rgba(218, 165, 32, .16), rgba(255, 255, 255, .025)) !important;
    border-bottom: 1px solid rgba(218, 165, 32, .22) !important;
}

.chatbot-avatar {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #111 !important;
    background: linear-gradient(135deg, #ffe77a, #c8941b) !important;
    border: 1px solid rgba(255, 255, 255, .26) !important;
    border-radius: 50% !important;
    box-shadow: 0 10px 30px rgba(218, 165, 32, .22) !important;
    font-size: 1.2rem !important;
}

.chatbot-header-info {
    min-width: 0 !important;
    flex: 1 !important;
}

.chatbot-header-info h4 {
    margin: 0 0 4px !important;
    color: #ffd91a !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
}

.chatbot-header-info span {
    display: block !important;
    color: rgba(255, 248, 224, .62) !important;
    font-size: .72rem !important;
    line-height: 1.3 !important;
}

.chat-close-btn {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 248, 224, .72) !important;
    background: rgba(0, 0, 0, .32) !important;
    border: 1px solid rgba(218, 165, 32, .28) !important;
    border-radius: 10px !important;
    font-size: .95rem !important;
    line-height: 1 !important;
}

.chat-tab-content {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
}

.chat-tab-body,
.chatbot-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px !important;
    font-size: 13.5px !important;
    line-height: 1.75 !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(218, 165, 32, .45) transparent !important;
}

.chat-tab-body::-webkit-scrollbar,
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-tab-body::-webkit-scrollbar-thumb,
.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(218, 165, 32, .42);
    border-radius: 999px;
}

.chatbot-input {
    display: grid !important;
    grid-template-columns: 1fr 44px !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    padding: 12px !important;
    background: rgba(0, 0, 0, .54) !important;
    border-top: 1px solid rgba(218, 165, 32, .18) !important;
}

.chatbot-input input {
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 13px !important;
    color: #fff6d8 !important;
    background: rgba(255, 255, 255, .055) !important;
    border: 1px solid rgba(218, 165, 32, .22) !important;
    border-radius: 12px !important;
    font-size: 16px !important;
}

.chatbot-input button {
    width: 44px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #090806 !important;
    background: linear-gradient(135deg, #ffe56d, #c89316) !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
}

.chat-msg-notice {
    margin: 0 0 12px !important;
    padding: 12px 13px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(218, 165, 32, .18) !important;
    border-left: 3px solid rgba(218, 165, 32, .62) !important;
    background: rgba(218, 165, 32, .075) !important;
}

.chat-msg-notice p {
    color: rgba(255, 248, 224, .74) !important;
    font-size: 12.5px !important;
    line-height: 1.65 !important;
}

.chat-msg-list {
    gap: 8px !important;
    padding: 0 !important;
}

.chat-msg-item {
    gap: 12px !important;
    padding: 12px !important;
    border: 1px solid rgba(218, 165, 32, .12) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .035) !important;
}

.chat-msg-item-avatar {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    font-size: 1.05rem !important;
}

.chat-msg-item-name {
    color: #fff6d8 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

.chat-msg-item-preview,
.chat-msg-item-time {
    color: rgba(255, 248, 224, .55) !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.chat-discord-announce {
    display: grid !important;
    grid-template-columns: 42px 1fr !important;
    align-items: start !important;
    gap: 8px 12px !important;
    margin: 12px 0 0 !important;
    padding: 14px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(120, 134, 255, .34) !important;
    background:
        radial-gradient(circle at 88% 12%, rgba(120, 134, 255, .22), transparent 34%),
        rgba(26, 27, 48, .78) !important;
}

.chat-discord-announce-icon {
    grid-row: 1 / span 3 !important;
    width: 42px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, .3) !important;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
    box-shadow: 0 4px 14px rgba(34, 158, 217, .45) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
}

.chat-msg-item-avatar.tg-avatar {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
    border: 1px solid rgba(255, 255, 255, .25) !important;
    box-shadow: 0 3px 10px rgba(34, 158, 217, .35) !important;
}

.chat-discord-announce h4 {
    margin: 0 !important;
    color: #fff7dc !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

.chat-discord-announce p {
    margin: 0 !important;
    color: rgba(255, 248, 224, .75) !important;
    font-size: 12.5px !important;
    line-height: 1.75 !important;
}

.chat-discord-btn {
    grid-column: 2 !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px 0 0 !important;
    padding: 9px 14px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #5865f2, #4651d6) !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.chat-help-search {
    position: relative !important;
    margin: 0 0 12px !important;
}

.chat-help-search input {
    width: 100% !important;
    height: 42px !important;
    padding: 0 42px 0 14px !important;
    color: #fff7dc !important;
    background: rgba(255, 255, 255, .055) !important;
    border: 1px solid rgba(218, 165, 32, .24) !important;
    border-radius: 12px !important;
    font-size: 16px !important;
}

.chat-help-search-icon {
    position: absolute !important;
    right: 13px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #d6a520 !important;
    font-size: .95rem !important;
}

.chat-help-count {
    margin: 0 0 8px !important;
    color: rgba(255, 248, 224, .56) !important;
    font-size: 12px !important;
}

.chat-help-list {
    display: grid !important;
    gap: 8px !important;
}

.chat-help-item {
    display: grid !important;
    grid-template-columns: 1fr 18px !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 12px !important;
    border: 1px solid rgba(218, 165, 32, .13) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .035) !important;
}

.chat-help-item-name {
    color: #fff7dc !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
}

.chat-help-item-count,
.chat-help-arrow {
    color: rgba(255, 248, 224, .55) !important;
    font-size: 12px !important;
}

.chat-news-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 0 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(218, 165, 32, .16) !important;
}

.chat-news-header strong {
    color: #fff7dc !important;
    font-size: 14px !important;
}

.chat-news-sub {
    color: rgba(255, 248, 224, .54) !important;
    font-size: 12px !important;
}

.chat-news-logo {
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(218, 165, 32, .14) !important;
}

.chat-news-card {
    margin: 0 0 10px !important;
    padding: 13px !important;
    border: 1px solid rgba(218, 165, 32, .14) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .035) !important;
}

.chat-news-badge {
    margin: 0 0 6px !important;
    color: #f2c94c !important;
    font-size: 11px !important;
    font-weight: 900 !important;
}

.chat-news-title {
    color: #fff7dc !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.45 !important;
    margin-bottom: 5px !important;
}

.chat-news-desc {
    color: rgba(255, 248, 224, .74) !important;
    font-size: 12.5px !important;
    line-height: 1.75 !important;
}

.chat-news-done {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    margin: 10px 0 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
    background: rgba(34, 197, 94, .08) !important;
}

.chat-news-done p {
    margin: 0 !important;
    color: rgba(255, 248, 224, .76) !important;
    font-size: 12.5px !important;
}

.chat-task-intro {
    padding: 0 0 12px !important;
}

.chat-task-intro h3 {
    margin: 0 0 8px !important;
    color: #fff7dc !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 950 !important;
}

.chat-task-intro p {
    margin: 0 !important;
    color: rgba(255, 248, 224, .72) !important;
    font-size: 12.8px !important;
    line-height: 1.75 !important;
}

.chat-task-progress {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    color: rgba(255, 248, 224, .66) !important;
    font-size: 12px !important;
    margin-bottom: 8px !important;
}

.chat-task-bar {
    height: 6px !important;
    margin: 0 0 12px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, .08) !important;
    border-radius: 999px !important;
}

.chat-task-bar-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #ffd91a, #b78113) !important;
    border-radius: inherit !important;
}

.chat-task-list {
    display: grid !important;
    gap: 8px !important;
}

.chat-task-step {
    overflow: hidden !important;
    border: 1px solid rgba(218, 165, 32, .15) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .035) !important;
}

.chat-task-step-header {
    display: grid !important;
    grid-template-columns: 28px 1fr 18px !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px !important;
    cursor: pointer !important;
}

.chat-task-step-num {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #090806 !important;
    background: linear-gradient(135deg, #ffe56d, #c89316) !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 950 !important;
}

.chat-task-step-title {
    min-width: 0 !important;
    color: #fff7dc !important;
    font-size: 13.5px !important;
    font-weight: 900 !important;
    line-height: 1.45 !important;
}

.chat-task-step-toggle {
    color: #d6a520 !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.chat-task-step-body {
    display: none !important;
    padding: 0 12px 12px 50px !important;
}

.chat-task-step.open .chat-task-step-body {
    display: block !important;
}

.chat-task-step-body p {
    margin: 0 0 10px !important;
    color: rgba(255, 248, 224, .73) !important;
    font-size: 12.8px !important;
    line-height: 1.75 !important;
}

.chat-task-btn,
.chat-task-done-btn {
    width: auto !important;
    max-width: 100% !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px 6px 0 0 !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal !important;
}

.chat-task-btn {
    color: #090806 !important;
    background: linear-gradient(135deg, #ffe56d, #c89316) !important;
    border: 0 !important;
}

.chat-task-done-btn {
    color: #f5d26b !important;
    background: rgba(218, 165, 32, .09) !important;
    border: 1px solid rgba(218, 165, 32, .28) !important;
}

.chat-bottom-nav {
    min-height: 62px !important;
    flex-shrink: 0 !important;
    background: rgba(5, 5, 4, .98) !important;
    border-top: 1px solid rgba(218, 165, 32, .18) !important;
}

.chat-nav-item {
    min-width: 0 !important;
    padding: 9px 3px 7px !important;
    gap: 4px !important;
    color: rgba(255, 248, 224, .44) !important;
    font-size: 10.5px !important;
}

.chat-nav-item svg {
    width: 19px !important;
    height: 19px !important;
    fill: currentColor !important;
}

.chat-nav-item span {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.chat-nav-item.active {
    color: #ffd91a !important;
}

.chat-nav-badge {
    top: 5px !important;
    margin-right: -18px !important;
}

.chatbot-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 768px) {
    .chatbot-toggle {
        display: inline-flex !important;
        right: 14px !important;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
        width: 52px !important;
        height: 52px !important;
    }

    .chatbot-window {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(130px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        height: min(680px, calc(100dvh - 150px)) !important;
        max-height: min(680px, calc(100dvh - 150px)) !important;
        border-radius: 18px !important;
    }

    .chatbot-window:not(.show) {
        display: none !important;
    }

    .chat-discord-announce {
        grid-template-columns: 36px 1fr !important;
    }

    .chat-discord-announce-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .chat-task-step-body {
        padding-left: 12px !important;
    }
}

@media (max-width: 420px) {
    .chatbot-window {
        left: 8px !important;
        right: 8px !important;
    }

    .chat-tab-body,
    .chatbot-messages {
        padding: 12px !important;
    }

    .chatbot-header {
        padding-inline: 12px !important;
    }
}

/* ===== AI CHATBOT DESKTOP SQUARE TUNING ===== */
@media (min-width: 769px) {
    .chatbot-window {
        right: 24px !important;
        bottom: 96px !important;
        width: min(580px, calc(100vw - 48px)) !important;
        height: min(580px, calc(100vh - 112px)) !important;
        max-height: min(580px, calc(100vh - 112px)) !important;
        border-radius: 24px !important;
    }

    .chatbot-header {
        min-height: 78px !important;
        padding: 16px 18px !important;
    }

    .chatbot-avatar {
        width: 48px !important;
        height: 48px !important;
        flex: 0 0 48px !important;
        font-size: 1.25rem !important;
    }

    .chatbot-header-info h4 {
        font-size: 1.08rem !important;
        line-height: 1.25 !important;
    }

    .chatbot-header-info span {
        font-size: .8rem !important;
    }

    .chat-tab-body,
    .chatbot-messages {
        padding: 18px !important;
        font-size: 15px !important;
        line-height: 1.85 !important;
    }

    .chatbot-window :where(.chat-message, .bot-message, .user-message, .message-content, .message-text, .chat-msg, .chatbot-message, .chat-bubble, .chatbot-messages p) {
        font-size: 14.5px !important;
        line-height: 1.8 !important;
    }

    .chatbot-suggestions {
        gap: 10px !important;
        padding: 0 18px 16px !important;
    }

    .chatbot-window :where(.suggestion-chip, .chatbot-suggestions button) {
        min-height: 38px !important;
        padding: 9px 13px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    .chatbot-input {
        grid-template-columns: 1fr 52px !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    .chatbot-input input {
        height: 48px !important;
        padding-inline: 16px !important;
        font-size: 16px !important;
    }

    .chatbot-input button {
        width: 52px !important;
        height: 48px !important;
        font-size: 1.08rem !important;
    }

    .chat-bottom-nav {
        min-height: 66px !important;
    }

    .chat-nav-item {
        font-size: 11.5px !important;
        padding-block: 10px 8px !important;
    }

    .chat-nav-item svg {
        width: 21px !important;
        height: 21px !important;
    }

    .chat-discord-announce p,
    .chat-task-intro p,
    .chat-task-step-body p,
    .chat-news-desc,
    .chat-help-item-desc,
    .chat-msg-item-desc {
        font-size: 14px !important;
        line-height: 1.75 !important;
    }

    .chat-task-step-title,
    .chat-news-title,
    .chat-discord-announce h4,
    .chat-help-item-name,
    .chat-msg-item-name {
        font-size: 15px !important;
        line-height: 1.45 !important;
    }

    .chat-task-intro h3 {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }

    .chat-task-btn,
    .chat-task-done-btn,
    .chat-discord-btn {
        min-height: 38px !important;
        padding: 9px 14px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 768px) {
    .chat-tab-body,
    .chatbot-messages {
        font-size: 14px !important;
        line-height: 1.78 !important;
    }

    .chatbot-window :where(.chat-message, .bot-message, .user-message, .message-content, .message-text, .chat-msg, .chatbot-message, .chat-bubble, .chatbot-messages p) {
        font-size: 13.5px !important;
        line-height: 1.75 !important;
    }

    .chatbot-window :where(.suggestion-chip, .chatbot-suggestions button) {
        font-size: 12.5px !important;
        line-height: 1.35 !important;
    }
}

/* Keep the back-to-top button away from the AI chat launcher. */
.nc-back-top {
    right: 24px !important;
    bottom: 96px !important;
}

@media (min-width: 769px) {
    .chatbot-toggle {
        right: 24px !important;
        bottom: 24px !important;
    }
}

@media (max-width: 768px) {
    .nc-back-top {
        right: 16px !important;
        bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ==========================================================================
   UPCOMERS STYLE LAUNCHER BUTTON & PROMPT (GOLD ACCENT)
   ========================================================================== */

/* ── Launcher Button (Clean White Circle + Vivid Gold Chat Bubble) ── */
.chatbot-toggle {
    background: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(245, 158, 11, 0.3) !important;
    cursor: pointer !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    width: 60px !important;
    height: 60px !important;
    right: 24px !important;
    bottom: 24px !important;
}

/* Suppress legacy pseudo-elements (e.g. yellow "?" from layout-fixes.css) */
.chatbot-toggle::before,
.chatbot-toggle::after {
    content: none !important;
    display: none !important;
}

.chatbot-toggle:hover {
    transform: scale(1.08) translateY(-2px) !important;
    box-shadow: 0 12px 36px rgba(245, 158, 11, 0.45), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.chatbot-toggle .chat-icon-upcomers {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    transition: transform 0.25s ease !important;
}

.chatbot-toggle:hover .chat-icon-upcomers {
    transform: scale(1.05);
}

.chatbot-toggle .close-icon-upcomers {
    display: none !important;
    width: 24px !important;
    height: 24px !important;
}

.chatbot-toggle.active .chat-icon-upcomers {
    display: none !important;
}

.chatbot-toggle.active .close-icon-upcomers {
    display: block !important;
}

/* ── Upcomers Launcher Prompt Bubble (Desktop) ── */
.upcomers-launcher-prompt {
    position: fixed;
    right: 96px;
    bottom: 32px;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 14px 10px 16px;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(245, 158, 11, 0.25);
    border: 1px solid rgba(245, 158, 11, 0.18);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99998;
    cursor: pointer;
    animation: upcomersPromptSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.upcomers-launcher-prompt:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(245, 158, 11, 0.35);
}

.upcomers-launcher-prompt .prompt-close {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s;
}

.upcomers-launcher-prompt .prompt-close:hover {
    color: #1e293b;
}

@keyframes upcomersPromptSlide {
    from { opacity: 0; transform: translateX(12px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 768px) {
    .upcomers-launcher-prompt {
        display: none !important;
    }

    .chatbot-toggle {
        right: 16px !important;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
        width: 54px !important;
        height: 54px !important;
    }
}
