@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
    background-color: #060a14;
    background-image: url('assets/wallpaper.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh; height: 100dvh;
    overflow: hidden; color: #f1f5f9;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    position: relative;
}
body::after {
    content: '';
    position: fixed; inset: 0;
    background: linear-gradient(180deg, rgba(6,10,20,0.04) 0%, rgba(6,10,20,0.06) 55%, rgba(6,10,20,0.22) 100%);
    pointer-events: none; z-index: 1;
}
input, textarea { user-select: text; -webkit-user-select: text; }
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
img.chat-img { pointer-events: auto; }
button { position: relative; overflow: hidden; }
button:focus, button:focus-visible, a:focus, a:focus-visible, [tabindex]:focus-visible { outline: none; }

#sakura-canvas { position: fixed; inset: 0; z-index: 50; pointer-events: none; }

.ripple {
    position: absolute; border-radius: 50%; pointer-events: none;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: rippleAnim 0.55s ease-out forwards;
}
@keyframes rippleAnim { to { transform: scale(1); opacity: 0; } }

.main-wrapper { display: flex; height: 100vh; height: 100dvh; width: 100vw; position: relative; z-index: 3; }

.senka-section { width: 38%; position: relative; display: flex; justify-content: center; align-items: flex-end; }
#senka-model { height: 88vh; max-width: 100%; object-fit: contain; border-radius: 24px; filter: drop-shadow(0 10px 30px rgba(56, 189, 248, 0.35)); transition: 0.3s; -webkit-user-drag: none; pointer-events: none; animation: bob 4.5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.senka-glow { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, 0.28), rgba(139, 92, 246, 0.18), transparent 70%); filter: blur(30px); pointer-events: none; }
.senka-fallback { display: none; height: 85vh; align-items: center; justify-content: center; font-size: 8rem; color: #7dd3fc; text-shadow: 0 0 30px rgba(56, 189, 248, 0.5); }
.senka-name-plate { position: absolute; right: 5%; bottom: 3.5%; background: rgba(8, 12, 26, 0.4); backdrop-filter: blur(8px); border: 1px solid rgba(96, 165, 250, 0.4); padding: 8px 18px; border-radius: 30px; color: #bae6fd; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.3px; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }

.chat-section { width: 62%; padding: 14px 20px; display: flex; flex-direction: column; justify-content: center; }
.glass-panel {
    background: rgba(8, 12, 26, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 22px; height: 100%;
    display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.chat-header { padding: 8px 16px; border-bottom: 1px solid rgba(96, 165, 250, 0.15); display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.header-left { display: flex; align-items: center; gap: 12px; }
.avatar-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.avatar-wrap .avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: none; box-shadow: 0 0 12px rgba(56, 189, 248, 0.35); position: relative; z-index: 1; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.avatar-wrap .avatar-border { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); z-index: 2; pointer-events: none; }
.title-wrap h2 {
    font-size: 1rem; font-weight: 700; line-height: 1.1; letter-spacing: 0.3px;
    color: #4A9EFF;
}
.status { font-size: 0.7rem; color: #bae6fd; display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.header-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.icon-btn {
    background: rgba(8, 12, 26, 0.35); border: 1px solid rgba(96, 165, 250, 0.3);
    color: #bae6fd; padding: 6px 11px; border-radius: 20px; cursor: pointer;
    font-size: 0.78rem; transition: all 0.25s ease; display: flex; align-items: center; gap: 6px;
    font-family: inherit; backdrop-filter: blur(4px);
}
.icon-btn:hover { background: rgba(56, 189, 248, 0.25); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3); }
.icon-btn:active { transform: scale(0.94); }
.gear-btn:hover { transform: rotate(90deg); }
.session-btn { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-history { flex: 1; padding: 18px 20px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.chat-history::-webkit-scrollbar { width: 6px; }
.chat-history::-webkit-scrollbar-track { background: transparent; }
.chat-history::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #38bdf8, #8b5cf6); border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); }
.chat-history::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #0ea5e9, #7c3aed); }
.chat-history { scrollbar-width: thin; scrollbar-color: #38bdf8 transparent; }

.load-more { margin: 8px auto; display: flex; padding: 8px 18px; border-radius: 999px; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.35); color: #7dd3fc; font-size: 0.8rem; cursor: pointer; }
.load-more:active { transform: scale(0.97); }

.message { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; min-width: 0; animation: msgIn 0.28s ease-out; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.msg-user { align-self: flex-end; margin-left: auto; background: linear-gradient(135deg, rgba(14, 165, 233, 0.5), rgba(139, 92, 246, 0.5)); border: none; border-bottom-right-radius: 6px; box-shadow: 0 3px 16px rgba(14, 165, 233, 0.2), inset 0 0 0 1px rgba(255,255,255,0.06); }
.msg-senka { align-self: flex-start; background: linear-gradient(160deg, rgba(14, 19, 38, 0.5), rgba(8, 12, 28, 0.42)); border: none; border-bottom-left-radius: 6px; box-shadow: 0 3px 16px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(148, 163, 255, 0.07); }
.em { color: #c084fc; font-weight: 700; }
.q { color: #E8D1FF; font-weight: 400; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.num { color: #c084fc; font-weight: 700; }
.punct { color: #c084fc; font-weight: 400; }
.jp { color: #c084fc; font-weight: 700; }
.who-senka { font-weight: 700; color: #4A9EFF; }
.who-user { color: #A5A6F6; font-weight: 700; }
.msg-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.msg-action {
    background: rgba(8,12,26,0.4); border: 1px solid rgba(96,165,250,0.3); color: #bae6fd;
    padding: 5px 11px; border-radius: 14px; cursor: pointer; font-size: 0.72rem; transition: all 0.2s ease; font-family: inherit;
}
.msg-action:hover { background: rgba(56, 189, 248, 0.3); color: #fff; }
.msg-action:active { transform: scale(0.93); }
.msg-tag { font-size: 0.66rem; color: #a5b4fc; margin-bottom: 5px; letter-spacing: 0.3px; }

.tind i { display: inline-block; width: 5px; height: 5px; margin-left: 3px; border-radius: 50%; background: #c084fc; animation: blink 1.2s infinite; }
.tind i:nth-child(2) { animation-delay: 0.2s; }
.tind i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.file-card {
    display: flex; align-items: center; gap: 12px; margin-top: 10px;
    background: rgba(8, 12, 28, 0.55); border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 14px; padding: 10px 14px; max-width: 320px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.fc-icon { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #38bdf8, #8b5cf6); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; flex-shrink: 0; }
.fc-info { min-width: 0; flex: 1; }
.fc-name { color: #fff; font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { color: #a5b4fc; font-size: 0.66rem; margin-top: 2px; }
.fc-dl {
    background: linear-gradient(135deg, #38bdf8, #8b5cf6); border: none; color: #fff;
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 0.9rem;
    transition: all 0.25s ease; flex-shrink: 0;
}
.fc-dl:hover { transform: scale(1.08); box-shadow: 0 0 14px rgba(56, 189, 248, 0.6); }
.fc-dl:active { transform: scale(0.94); }

.chat-video { max-width: 100%; width: 280px; border-radius: 14px; margin-top: 8px; display: block; background: #000; }

.preview-container { display: none; padding: 10px 20px; background: rgba(6, 10, 20, 0.4); border-top: 1px solid rgba(96, 165, 250, 0.14); justify-content: space-between; align-items: center; font-size: 0.85rem; color: #7dd3fc; }
.remove-btn { cursor: pointer; color: #f87171; }

.input-area { padding: 12px 16px 12px; display: flex; gap: 8px; align-items: center; border-top: 1px solid rgba(96, 165, 250, 0.15); position: relative; }
.plus-wrap { position: relative; flex-shrink: 0; }
.tool-btn {
    background: rgba(8,12,26,0.45); border: 1px solid rgba(96,165,250,0.3); color: #7dd3fc;
    width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.02rem;
    display: flex; align-items: center; justify-content: center; transition: all 0.25s ease;
}
.tool-btn:hover { background: rgba(56, 189, 248, 0.3); color: #fff; box-shadow: 0 0 14px rgba(56, 189, 248, 0.5); }
.tool-btn:active { transform: scale(0.92); }
.tool-btn.open { transform: rotate(45deg); background: rgba(56, 189, 248, 0.35); color: #fff; }

.call-btn.active {
    background: linear-gradient(135deg, #f87171, #ef4444) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.5);
    animation: callPulse 1.6s ease-in-out infinite;
}
@keyframes callPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}
.call-screen {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center;
    background: rgba(3, 6, 14, 0.9);
    animation: callScreenIn 0.35s ease;
    overflow: hidden;
}
@keyframes callScreenIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
.call-bg {
    position: absolute; inset: 0;
    background: center / cover no-repeat rgba(10, 14, 30, 1);
    opacity: 0.85;
}
.call-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(3, 6, 14, 0.45), rgba(3, 6, 14, 0.55));
}
.call-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    padding: 24px;
    width: 100%; max-width: 480px;
}
.call-avatar-wrap { position: relative; margin-bottom: 18px; }
.call-avatar-border {
    position: absolute; inset: -18px; z-index: 3;
    width: calc(100% + 36px); height: calc(100% + 36px);
    pointer-events: none; object-fit: fill;
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.35));
}
.call-avatar {
    width: 220px; height: 220px; max-width: 60vw; max-height: 60vw;
    border-radius: 50%; object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.35), 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: callAvatarIn 0.4s ease;
}
@keyframes callAvatarIn { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
.call-avatar-wrap::before {
    content: ''; position: absolute; inset: -14px; border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.45);
    opacity: 0;
}
.call-screen.ringing .call-avatar-wrap::before { opacity: 1; animation: callRing 1.2s ease-out infinite; }
@keyframes callRing {
    0% { transform: scale(0.92); opacity: 0.9; }
    100% { transform: scale(1.18); opacity: 0; }
}
.call-name {
    color: #fff; font-size: 1.6rem; font-weight: 700;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
    margin-bottom: 6px;
}
.call-state {
    color: rgba(255, 255, 255, 0.85); font-size: 0.95rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.call-state.ringing::after {
    content: ''; display: inline-block; width: 1.1em; text-align: left;
    animation: callDots 1.4s infinite steps(4);
}
@keyframes callDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.call-minimize {
    position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 3;
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(24, 30, 58, 0.55); border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.15s ease;
}
.call-minimize:hover { background: rgba(56, 189, 248, 0.35); }
.call-minimize:active { transform: translateX(-50%) scale(0.92); }
.call-timer {
    color: rgba(255, 255, 255, 0.9); font-size: 1.05rem;
    font-variant-numeric: tabular-nums; letter-spacing: 1px; margin-top: 4px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.call-pill {
    position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 999;
    display: flex; align-items: center; gap: 10px;
    background: rgba(10, 14, 30, 0.92); backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 999px;
    padding: 8px 14px 8px 8px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), 0 0 18px rgba(56, 189, 248, 0.2);
    cursor: grab; max-width: 92vw;
    animation: cusSelIn 0.2s ease;
    touch-action: none; user-select: none; -webkit-user-select: none;
}
.call-pill.dragging { cursor: grabbing; scale: 1.05; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.35); }
.call-pill:hover { border-color: rgba(56, 189, 248, 0.7); }
.call-pill img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(56, 189, 248, 0.5); flex-shrink: 0; }
.call-pill-info { display: flex; flex-direction: column; line-height: 1.25; }
.call-pill-name { color: #fff; font-size: 0.85rem; font-weight: 600; }
.call-pill-timer { color: #7dd3fc; font-size: 0.72rem; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.call-pill-live { color: #4ade80; font-size: 0.85rem; }
.call-pill-end {
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
    flex-shrink: 0;
}
.call-controls {
    display: flex; align-items: center; gap: 28px;
    margin-top: 56px;
}
.call-ctl {
    width: 62px; height: 62px; border-radius: 50%;
    border: none; cursor: pointer;
    background: rgba(24, 30, 58, 0.6); backdrop-filter: blur(8px);
    color: #fff; font-size: 1.35rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.call-ctl:active { transform: scale(0.9); }
.call-ctl:hover { box-shadow: 0 6px 26px rgba(0, 0, 0, 0.55); }
.call-ctl.on {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.55), rgba(139, 92, 246, 0.55));
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.6);
}
.call-ctl-end {
    width: 72px; height: 72px; font-size: 1.5rem;
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.65), 0 6px 22px rgba(0, 0, 0, 0.45);
}
.call-ctl-end:hover { box-shadow: 0 0 30px rgba(239, 68, 68, 0.8), 0 6px 26px rgba(0, 0, 0, 0.55); }
@media (max-width: 520px) {
    .call-avatar { width: 170px; height: 170px; }
    .call-controls { gap: 22px; margin-top: 44px; }
    .call-ctl { width: 56px; height: 56px; font-size: 1.2rem; }
    .call-ctl-end { width: 66px; height: 66px; }
}
.plus-menu {
    position: absolute; bottom: 52px; left: 0; z-index: 60;
    background: rgba(10, 14, 30, 0.95); backdrop-filter: blur(14px);
    border: 1px solid rgba(96, 165, 250, 0.35); border-radius: 16px;
    padding: 8px; min-width: 170px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    display: none; flex-direction: column; gap: 2px;
    animation: menuIn 0.2s ease;
}
.plus-menu.show { display: flex; }
@keyframes menuIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pm-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: none; border: none; color: #e2e8f0; text-align: left;
    padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 0.85rem;
    font-family: inherit; transition: all 0.2s ease;
}
.pm-item:hover { background: rgba(56, 189, 248, 0.18); color: #fff; }
.pm-item i { color: #7dd3fc; width: 18px; text-align: center; }
.pm-item.mic-live { background: rgba(239, 68, 68, 0.25); color: #fecaca; }
.pm-item.mic-live i { color: #f87171; animation: micPulse 1.1s infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); border-radius: 50%; } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
#message-input { flex: 1; min-width: 0; background: rgba(6, 10, 20, 0.5); border: 1px solid rgba(96, 165, 250, 0.32); color: #fff; padding: 12px 18px; border-radius: 25px; outline: none; transition: all 0.3s ease; }
#message-input:focus { border-color: #38bdf8; box-shadow: 0 0 12px rgba(56, 189, 248, 0.3); }
#message-input::placeholder { color: #8b7f9e; }
#send-btn { background: linear-gradient(135deg, #38bdf8, #8b5cf6); border: none; color: #fff; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; }
#send-btn:hover { transform: scale(1.06); box-shadow: 0 0 16px rgba(56, 189, 248, 0.6); }
#send-btn:active { transform: scale(0.92); }

.modal-overlay { position: fixed; inset: 0; background: rgba(3, 6, 14, 0.35); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: rgba(10, 14, 30, 0.82); backdrop-filter: blur(20px); border: 1px solid rgba(96, 165, 250, 0.3); border-radius: 18px; padding: 24px; width: 380px; max-width: 94vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 16px 50px rgba(0,0,0,0.55); animation: modalIn 0.24s ease; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.4); border-radius: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.wide-modal { width: 440px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { color: #7dd3fc; font-size: 1rem; letter-spacing: 0.3px; }
.modal-close { color: #f87171; cursor: pointer; transition: 0.2s; }
.modal-close:hover { transform: rotate(90deg); }
.modal-label { display: block; color: #a5b4fc; font-size: 0.78rem; margin: 16px 0 8px; font-weight: 600; }
.modal-hint { color: #8b7f9e; font-size: 0.7rem; margin-top: 8px; }
.modal-input { width: 100%; background: rgba(6, 10, 20, 0.7); border: 1px solid rgba(96, 165, 250, 0.32); color: #fff; padding: 10px 14px; border-radius: 10px; outline: none; font-size: 0.9rem; transition: border-color 0.25s; }
.modal-input:focus { border-color: #38bdf8; }
textarea.modal-input { resize: none; font-family: inherit; }
.modal-btn { width: 100%; margin-top: 16px; background: linear-gradient(135deg, #38bdf8, #8b5cf6); border: none; color: #fff; padding: 12px; border-radius: 12px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s ease; font-family: inherit; font-weight: 600; }
.modal-btn:hover { box-shadow: 0 0 18px rgba(56, 189, 248, 0.55); transform: translateY(-1px); }
.modal-btn:active { transform: scale(0.97); }
.btn-secondary { background: rgba(255,255,255,0.08); border: 1px solid rgba(96,165,250,0.3); }
.btn-secondary:hover { background: rgba(56, 189, 248, 0.2); box-shadow: none; }

.modal-actions {
    position: sticky; bottom: -24px;
    margin: 18px -24px -24px; padding: 14px 24px 24px;
    background: rgba(10, 14, 30, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0 0 18px 18px;
}
.modal-actions .modal-btn { margin-top: 0; }

.cdm-overlay { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cdm-card { width: 340px; animation: cdmIn 0.18s ease; }
@keyframes cdmIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.cdm-title { color: #fff; font-size: 1rem; letter-spacing: 0.3px; display: flex; align-items: center; gap: 8px; }
.cdm-title i { color: #f87171; }
.cdm-desc { color: #a5b4fc; font-size: 0.82rem; line-height: 1.55; margin-top: 6px; }
.cdm-actions { display: flex; gap: 10px; margin-top: 20px; }
.cdm-btn { flex: 1; padding: 11px 14px; border-radius: 12px; cursor: pointer; font-size: 0.88rem; font-weight: 600; font-family: inherit; transition: all 0.2s ease; border: none; }
.cdm-cancel { background: rgba(255,255,255,0.08); border: 1px solid rgba(96,165,250,0.35); color: #e2e8f0; }
.cdm-cancel:hover { background: rgba(56, 189, 248, 0.18); color: #fff; }
.cdm-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.cdm-danger:hover { box-shadow: 0 0 16px rgba(239, 68, 68, 0.55); transform: translateY(-1px); }
.cdm-danger:active { transform: scale(0.97); }

.switch { position: relative; display: inline-block; width: 48px; height: 26px; margin-top: 4px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: rgba(6,10,20,0.7); border: 1px solid rgba(96,165,250,0.4); border-radius: 26px; transition: 0.3s; }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #7dd3fc; transition: 0.3s; }
.switch input:checked + .slider { background: linear-gradient(135deg, #38bdf8, #8b5cf6); border-color: transparent; }
.switch input:checked + .slider::before { transform: translateX(22px); background: #fff; }

.settings-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(96, 165, 250, 0.14); }
.settings-block .modal-label { margin-top: 0; }

.speak-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.speak-row .switch { margin-top: 0; flex-shrink: 0; }
.speak-label { color: #e0f2fe; font-size: 14px; }

.model-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-right: 4px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.model-picker::-webkit-scrollbar { width: 4px; }
.model-picker::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.4); border-radius: 6px; }
.model-opt {
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(96,165,250,0.2);
    border-radius: 12px; padding: 13px 16px; cursor: pointer; transition: all 0.2s ease; text-align: left;
    font-family: inherit; flex-shrink: 0;
}
.model-opt:hover { background: rgba(56, 189, 248, 0.14); }
.model-opt.selected { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; box-shadow: 0 0 12px rgba(56, 189, 248, 0.25); }
.mo-line { display: flex; align-items: center; gap: 8px; width: 100%; }
.mo-label { color: #fff; font-size: 0.83rem; font-weight: 600; flex: 1; min-width: 0; line-height: 1.35; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.mo-chip { font-size: 0.6rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; letter-spacing: 0.4px; flex-shrink: 0; align-self: flex-start; }
.chip-groq { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.45); }
.chip-or { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.45); }
.chip-gemini { background: rgba(66, 133, 244, 0.2); color: #8ab4f8; border: 1px solid rgba(66, 133, 244, 0.5); }
.mo-prov { color: #8b7f9e; font-size: 0.66rem; }

.persona-row { display: flex; gap: 10px; }
.persona-row .modal-input { flex: 1; }
.persona-gender { width: 130px; flex-shrink: 0; }
.story-persona-block { border: 1px solid rgba(96, 165, 250, 0.25); background: rgba(6, 10, 20, 0.35); border-radius: 12px; padding: 12px 14px 6px; margin-bottom: 14px; }

.admin-current-code { font-size: 1rem; font-weight: 700; color: #7dd3fc; background: rgba(56, 189, 248, 0.08); border: 1px dashed rgba(56, 189, 248, 0.4); border-radius: 10px; padding: 10px 14px; letter-spacing: 1px; }
.admin-code-row { display: flex; gap: 10px; }
.admin-code-row .modal-input { flex: 1; }

.avatar-wrap.admin-holding, #senka-model.admin-holding { animation: adminHoldPulse 1.2s ease-in-out infinite; }
@keyframes adminHoldPulse {
    0%, 100% { filter: none; transform: scale(1); }
    50% { filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9)); transform: scale(1.06); }
}
.avatar-wrap.admin-holding .avatar { cursor: progress; }
#senka-model { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }

.search-results { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-top: 10px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.4); border-radius: 6px; }
.sr-empty { color: #8b7f9e; font-size: 0.75rem; text-align: center; padding: 14px 0; }
.sr-item {
    display: flex; flex-direction: column; gap: 2px; text-align: left;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(96,165,250,0.2);
    border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: 0.2s; font-family: inherit;
}
.sr-item:hover { background: rgba(56, 189, 248, 0.15); }
.sr-who { font-size: 0.65rem; color: #7dd3fc; font-weight: 600; }
.sr-text { font-size: 0.78rem; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-text b { color: #c084fc; }
.flash { animation: flashBg 1.4s ease; }
@keyframes flashBg { 0%,45% { box-shadow: 0 0 0 2px #38bdf8, 0 0 20px rgba(56,189,248,0.7); background: rgba(56, 189, 248, 0.25); } 100% { box-shadow: none; background: inherit; } }

.session-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 8px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.session-list::-webkit-scrollbar { width: 4px; }
.session-list::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.4); border-radius: 6px; }
.session-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(96,165,250,0.2);
    border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: all 0.2s ease;
}
.session-item:hover { background: rgba(56, 189, 248, 0.14); }
.session-item.active { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; }
.session-item .si-left { min-width: 0; flex: 1; }
.session-item .si-name { color: #fff; font-size: 0.85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-item .si-meta { color: #8b7f9e; font-size: 0.65rem; margin-top: 2px; }
.session-item .si-actions { display: flex; gap: 4px; flex-shrink: 0; }
.session-item .si-act { color: #7dd3fc; cursor: pointer; padding: 4px 7px; font-size: 0.8rem; border: none; background: none; font-family: inherit; }
.session-item .si-act:hover { color: #fff; }
.session-item .si-del { color: #f87171; }
.session-item .si-del:hover { color: #fff; }
.si-input { font-size: 0.85rem; padding: 4px 8px; width: 100%; }

.chat-img { max-width: 100%; max-height: 320px; border-radius: 14px; margin-top: 8px; display: block; }
.retry-btn { color: #7dd3fc; cursor: pointer; text-decoration: underline; }

@media (max-width: 768px) {
    .main-wrapper { flex-direction: column; }
    .senka-section { display: none; }
    .chat-section { width: 100%; height: 100dvh; height: 100dvh; padding: 6px; }
    .glass-panel { height: 100%; }
    .message { max-width: 92%; }
    .input-area { padding: 10px 10px 10px; }
    .chat-header { padding: 8px 12px; }
    .header-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
    .avatar-wrap { width: 56px; height: 56px; }
    .session-btn span { display: none; }
    .session-btn { padding: 6px 10px; }
    .chat-history { padding: 14px 12px; }
}

.chat-audio { max-width: 100%; margin-top: 8px; display: block; border-radius: 12px; }

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 10, 30, 0.92);
    backdrop-filter: blur(8px);
    padding: 20px;
}
.login-card {
    width: min(380px, 100%);
    background: linear-gradient(160deg, rgba(30, 20, 45, 0.97), rgba(20, 12, 32, 0.97));
    border: 1px solid rgba(186, 85, 211, 0.35);
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d946ef, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 0 30px rgba(217, 70, 239, 0.5);
}
.login-card h2 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.login-desc { color: #b9a8d0; font-size: 0.82rem; margin: 0 0 20px; line-height: 1.5; }
.login-btn {
    width: 100%;
    padding: 13px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #4f8ef7, #3b6fe0);
    color: #fff;
    transition: transform 0.15s;
}
.login-btn:hover { transform: translateY(-2px); }
.login-btn.btn-guest {
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
}
.login-hint { color: #7d6b96; font-size: 0.72rem; margin: 12px 0 0; }
.btn-danger {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
    width: 100%;
}

.mic-modal { text-align: center; animation: micPop 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.18); }
@keyframes micPop {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.mic-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 0 26px rgba(139, 92, 246, 0.5);
}
.mic-modal-title { color: #fff; margin: 0 0 8px; font-size: 1.15rem; }
.mic-modal-desc { color: #b9a8d0; font-size: 0.82rem; margin: 0 0 6px; line-height: 1.55; }
.mic-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.mic-modal-actions .modal-btn { margin-top: 0; }

.toast {
    position: fixed;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(15, 12, 30, 0.94);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #e9d5ff;
    padding: 11px 18px;
    border-radius: 14px;
    font-size: 0.78rem;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 1300;
    max-width: 86vw;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.st-pos { color: #4ADE80; font-weight: 700; }
.st-neg { color: #F87171; font-weight: 700; }
.st-plus { color: #4ADE80; font-weight: 700; }
.src-chip { white-space: nowrap; }
.src-ico { width: 14px; height: 14px; vertical-align: -2px; margin: 0 4px 0 6px; border-radius: 3px; }
.sumber-shimmer {
    font-weight: bold;
    background: linear-gradient(90deg, #2DD4BF 0%, #38BDF8 50%, #2DD4BF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: shimmerMove 3s linear infinite;
}
@keyframes shimmerMove {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.chat-sticker { max-width: 150px; border-radius: 14px; display: block; margin: 2px 0; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 6px 0 4px; max-height: 46vh; overflow-y: auto; }
.sticker-item { width: 100%; border-radius: 12px; cursor: pointer; transition: transform 0.15s ease; background: rgba(255,255,255,0.04); pointer-events: auto; }
.sticker-item:hover { transform: scale(1.08); }
.chat-sticker { pointer-events: auto; }
em { font-style: italic; color: #FFC8D2; font-weight: 400; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }


.mode-badge { font-size: 0.68rem; color: #E0F2FE; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); background: rgba(224,242,254,0.1); border: 1px solid rgba(224,242,254,0.38); padding: 3px 10px; border-radius: 999px; margin-right: 6px; white-space: nowrap; align-self: center; }
.modal-btn { font-family: inherit; background: linear-gradient(135deg, rgba(219,39,119,0.85), rgba(147,51,234,0.85)); color: #fff; border: none; padding: 9px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 0.85rem; transition: transform 0.15s ease, filter 0.15s ease; }
.modal-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.modal-btn.ghost { background: rgba(255,255,255,0.08); color: #e2e8f0; }
.story-freeform { display: flex; gap: 10px; flex-wrap: wrap; }
.story-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
.story-card { display: flex; gap: 12px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,128,171,0.25); border-radius: 14px; padding: 12px; }
.story-card img.story-avatar { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.story-info { flex: 1; min-width: 0; }
.story-info h4 { margin: 0 0 4px; font-size: 0.9rem; color: #E0F2FE; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); word-wrap: break-word; }
.story-genre { font-size: 0.72rem; color: #60a5fa; }
.story-tags { font-size: 0.68rem; color: #94a3b8; margin: 4px 0 8px; word-wrap: break-word; }
.story-cast { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.story-cast-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 0.6rem; color: #cbd5e1; text-align: center; max-width: 56px; }
.story-cast-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.msg-actions { display: flex; gap: 6px; margin-top: 6px; }
.msg-action { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: #b7c3d6; border-radius: 8px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.72rem; transition: background 0.15s ease; }
.msg-action:hover { background: rgba(255,128,171,0.2); color: #ffb3c7; }
.edit-box { width: 100%; }
.edit-textarea { width: 100%; min-height: 96px; background: rgba(3,6,14,0.6); color: #e2e8f0; border: 1px solid rgba(255,128,171,0.4); border-radius: 10px; padding: 8px; font-family: inherit; font-size: 0.85rem; resize: vertical; outline: none; }
.edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.agegate-modal { border-color: rgba(255,128,171,0.5); }

select.modal-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(10, 14, 30, 0.72);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 36px 10px 14px;
    border-radius: 10px;
    outline: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23FFC8D2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 6px;
}
select.modal-select:hover { border-color: rgba(255, 255, 255, 0.32); background-color: rgba(20, 28, 52, 0.85); }
select.modal-select:focus { border-color: #FFC8D2; box-shadow: 0 0 0 3px rgba(255, 200, 210, 0.12); }
select.modal-select option { background: rgba(10, 14, 30, 0.98); color: #e2e8f0; }
.story-action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.modal-btn.small { padding: 7px 12px; font-size: 0.75rem; }
#continue-btn { border-color: rgba(255, 200, 210, 0.42); color: #FFC8D2; }
#continue-btn:hover { background: rgba(255, 200, 210, 0.18); color: #fff; box-shadow: 0 0 14px rgba(255, 200, 210, 0.45); }

/* ===== Custom dropdown (pengganti select native di mobile) ===== */
select[data-custom-select] { display: none !important; }
.cus-sel { position: relative; width: 100%; }
.persona-row .cus-sel { flex: 1 1 130px; min-width: 130px; }
.cus-sel-trigger {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(10, 14, 30, 0.72);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    outline: none;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
}
.cus-sel-trigger:hover { border-color: rgba(255, 255, 255, 0.32); background-color: rgba(20, 28, 52, 0.85); }
.cus-sel-trigger:active { transform: scale(0.99); }
.cus-sel[data-open] .cus-sel-trigger { border-color: #FFC8D2; box-shadow: 0 0 0 3px rgba(255, 200, 210, 0.12); }
.cus-sel-caret { color: #FFC8D2; font-size: 0.75rem; flex-shrink: 0; transition: transform 0.2s ease; }
.cus-sel[data-open] .cus-sel-caret { transform: rotate(180deg); }
.cus-sel-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(8, 12, 26, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), 0 0 18px rgba(139, 92, 246, 0.18);
    padding: 6px;
    max-height: 220px;
    overflow-y: auto;
    animation: cusSelIn 0.16s ease;
    -webkit-overflow-scrolling: touch;
}
@keyframes cusSelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cus-sel-opt {
    display: block;
    width: 100%;
    min-height: 42px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.cus-sel-opt:hover { background: rgba(139, 92, 246, 0.18); color: #fff; }
.cus-sel-opt.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(139, 92, 246, 0.35));
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.5);
}

/* ===== Terjemahan pesan (on-demand) ===== */
.msg-tl-wrap { margin-top: 6px; display: flex; flex-direction: column; align-items: flex-start; }
.msg-tl {
    background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc; border-radius: 999px; padding: 4px 10px; font-size: 0.72rem;
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.msg-tl:hover { background: rgba(56, 189, 248, 0.25); color: #fff; }
.msg-tl.on { background: rgba(56, 189, 248, 0.35); border-color: #38bdf8; color: #fff; }
.msg-tl-result {
    margin-top: 6px; background: rgba(3, 6, 14, 0.55);
    border: 1px solid rgba(96, 165, 250, 0.25); border-left: 3px solid #38bdf8;
    border-radius: 8px; padding: 8px 10px; font-size: 0.82rem; color: #cbd5e1;
    white-space: pre-wrap; max-width: 100%;
    animation: cusSelIn 0.18s ease;
}
.msg-tl-label { font-size: 0.68rem; color: #38bdf8; margin-bottom: 3px; font-weight: 600; }
.msg-tl-loading { display: inline-flex; align-items: center; gap: 7px; color: #7dd3fc; font-size: 0.78rem; }
.msg-tl-err { color: #fca5a5; font-size: 0.78rem; }
