﻿.assistant-shell {
    --assistant-safe-top: calc(16px + env(safe-area-inset-top, 0));
    --assistant-safe-right: calc(22px + env(safe-area-inset-right, 0));
    --assistant-safe-bottom: calc(22px + env(safe-area-inset-bottom, 0));
    --assistant-safe-left: calc(16px + env(safe-area-inset-left, 0));
    position: fixed;
    top: var(--assistant-safe-top);
    right: var(--assistant-safe-right);
    bottom: var(--assistant-safe-bottom);
    left: var(--assistant-safe-left);
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 12px;
    pointer-events: none;
}

.assistant-shell>* {
    pointer-events: auto;
}

.assistant-launcher {
    position: relative;
    width: 78px;
    height: 78px;
    border: none;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fafdff 0%, #e8f1ff 36%, #b9d3ff 70%, #7aa7ff 100%);
    box-shadow: 0 24px 48px rgba(49, 94, 185, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transform: perspective(800px) rotateX(var(--assistant-tilt-y, 0deg)) rotateY(var(--assistant-tilt-x, 0deg));
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.assistant-launcher:hover {
    box-shadow: 0 30px 64px rgba(49, 94, 185, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.92);
}

.assistant-launcher:focus-visible {
    outline: 2px solid rgba(65, 132, 255, 0.78);
    outline-offset: 4px;
}

.assistant-launcher::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2) 38%, rgba(21, 47, 102, 0.08) 60%, rgba(18, 40, 86, 0.32) 100%);
    opacity: 0.95;
}

.assistant-launcher.open .assistant-launcher-ring {
    opacity: 1;
    transform: scale(1.04);
}

.assistant-launcher-ring {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 18px rgba(75, 131, 255, 0.22);
    opacity: 0.84;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.assistant-robot {
    position: relative;
    width: 44px;
    height: 44px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.assistant-robot-head {
    position: relative;
    width: 36px;
    height: 28px;
    border-radius: 12px;
    background: linear-gradient(180deg, #18356d 0%, #0d1f44 100%);
    box-shadow: inset 0 0 0 1px rgba(162, 206, 255, 0.25), 0 10px 16px rgba(8, 18, 39, 0.24);
}

.assistant-robot-head::before,
.assistant-robot-head::after {
    content: '';
    position: absolute;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dff3ff;
    box-shadow: 0 0 10px rgba(143, 220, 255, 0.8);
}

.assistant-robot-head::before {
    left: 9px;
}

.assistant-robot-head::after {
    right: 9px;
}

.assistant-robot-neck {
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 6px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #6bb4ff, #264a96);
    box-shadow: 0 4px 8px rgba(9, 18, 42, 0.2);
}

.assistant-launcher-label {
    position: absolute;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 999px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--text2);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(192, 208, 230, 0.9);
    white-space: nowrap;
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.assistant-launcher:hover .assistant-launcher-label,
.assistant-launcher:focus-visible .assistant-launcher-label {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

.assistant-unread {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f6dff, #5ab3ff);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 9px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(31, 109, 255, 0.35);
    display: none;
    z-index: 2;
}

.assistant-unread.visible {
    display: block;
}

.assistant-panel {
    width: min(440px, 100%);
    height: min(700px, calc(100vh - var(--assistant-safe-top) - var(--assistant-safe-bottom)));
    height: min(700px, calc(100dvh - var(--assistant-safe-top) - var(--assistant-safe-bottom)));
    max-height: min(700px, calc(100vh - var(--assistant-safe-top) - var(--assistant-safe-bottom)));
    max-height: min(700px, calc(100dvh - var(--assistant-safe-top) - var(--assistant-safe-bottom)));
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(207, 218, 233, 0.92);
    box-shadow: 0 36px 70px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    backdrop-filter: blur(16px);
}

.assistant-shell.maximized .assistant-panel {
    width: min(820px, 100%);
    height: calc(100vh - var(--assistant-safe-top) - var(--assistant-safe-bottom));
    height: calc(100dvh - var(--assistant-safe-top) - var(--assistant-safe-bottom));
    max-height: calc(100vh - var(--assistant-safe-top) - var(--assistant-safe-bottom));
    max-height: calc(100dvh - var(--assistant-safe-top) - var(--assistant-safe-bottom));
}

.assistant-shell.open .assistant-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.assistant-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(219, 228, 241, 0.92);
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.assistant-mini-bot {
    width: 38px;
    height: 38px;
    border-radius: 0;
    background: transparent;
    border: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
    box-shadow: none;
    --robot-rx: var(--assistant-robot-rx, 0deg);
    --robot-ry: var(--assistant-robot-ry, 0deg);
    --robot-px: var(--assistant-robot-px, 0px);
    --robot-py: var(--assistant-robot-py, 0px);
}

.assistant-mini-bot .assistant-robot-badge {
    width: 42px;
    height: 42px;
    transform: translate(-1px, -3px) scale(0.44);
    transform-origin: center;
    filter: drop-shadow(0 6px 12px rgba(102, 42, 201, 0.34));
    animation: assistantRobotFloat 2.8s ease-in-out infinite;
    will-change: transform;
}

.assistant-heading {
    min-width: 0;
}

.assistant-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.assistant-sub {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--text3);
    text-transform: uppercase;
    line-height: 1.35;
}

.assistant-sub,
.assistant-meta,
.assistant-note {
    display: none;
}

.assistant-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.assistant-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    border: 1px solid rgba(207, 218, 233, 0.92);
    background: #fff;
    color: var(--text2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.assistant-icon-btn:hover {
    border-color: rgba(66, 118, 255, 0.45);
    color: #1f5fff;
    transform: translateY(-1px);
}

.assistant-icon-btn.active {
    border-color: rgba(66, 118, 255, 0.45);
    color: #1f5fff;
    background: rgba(244, 248, 255, 1);
}

.assistant-history-panel {
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(219, 228, 241, 0.92);
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.assistant-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.assistant-history-title {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text3);
}

.assistant-history-new {
    border: 1px solid rgba(206, 218, 241, 0.94);
    background: #fff;
    color: var(--text2);
    border-radius: 999px;
    padding: 7px 11px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.assistant-history-new:hover {
    border-color: rgba(66, 118, 255, 0.4);
    color: #1f5fff;
    background: rgba(244, 248, 255, 1);
}

.assistant-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.assistant-history-item {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(216, 226, 241, 0.92);
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.assistant-history-item:hover {
    border-color: rgba(66, 118, 255, 0.34);
    background: rgba(246, 249, 255, 1);
    transform: translateY(-1px);
}

.assistant-history-item.active {
    border-color: rgba(66, 118, 255, 0.44);
    background: rgba(239, 245, 255, 1);
}

.assistant-history-copy {
    min-width: 0;
}

.assistant-history-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}

.assistant-history-meta {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--text3);
    text-transform: uppercase;
}

.assistant-history-delete {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    border: 1px solid rgba(216, 226, 241, 0.92);
    background: #fff;
    color: var(--text3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.assistant-history-delete:hover {
    border-color: rgba(239, 68, 68, 0.28);
    color: #dc2626;
    background: #fff5f5;
}

.assistant-history-empty {
    padding: 14px 12px;
    border: 1px dashed rgba(206, 218, 241, 0.94);
    border-radius: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.7;
    color: var(--text3);
    background: rgba(252, 253, 255, 0.96);
}

.assistant-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px 0;
}

.assistant-chip {
    border: 1px solid rgba(216, 226, 241, 0.92);
    background: rgba(249, 251, 255, 0.96);
    color: var(--text2);
    border-radius: 999px;
    padding: 7px 11px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.assistant-chip:hover {
    border-color: rgba(66, 118, 255, 0.34);
    color: #1f5fff;
    background: rgba(242, 247, 255, 1);
}

.assistant-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(189, 202, 224, 0.9) transparent;
}

.assistant-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.assistant-message.user {
    justify-content: flex-end;
}

.assistant-bubble {
    max-width: 84%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.04);
}

.assistant-message-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    margin-bottom: 8px;
    border-radius: 14px;
    border: 1px solid rgba(210, 221, 239, 0.96);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text2);
}

.assistant-message-attachment-kind {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(31, 109, 255, 0.1);
    color: #1f5fff;
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.assistant-message-attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.4;
}

.assistant-message.assistant .assistant-bubble {
    background: rgba(248, 251, 255, 0.95);
    border: 1px solid rgba(216, 226, 241, 0.92);
    color: var(--text);
}

.assistant-rich-text+.assistant-rich-text {
    margin-top: 10px;
}

.assistant-rich-text {
    color: inherit;
}

.assistant-think-block {
    margin-bottom: 12px;
    padding: 11px 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(211, 219, 232, 0.96);
    background: linear-gradient(180deg, rgba(249, 250, 252, 0.98), rgba(242, 245, 249, 0.96));
}

.assistant-think-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.assistant-think-body {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text2);
    white-space: pre-wrap;
}

.assistant-code-block {
    margin-top: 12px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(204, 216, 236, 0.96);
    background: linear-gradient(180deg, rgba(245, 248, 255, 0.98), rgba(235, 241, 252, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.assistant-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(204, 216, 236, 0.92);
    background: rgba(255, 255, 255, 0.7);
}

.assistant-code-lang {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text3);
}

.assistant-code-copy {
    border: 1px solid rgba(190, 206, 232, 0.96);
    background: rgba(255, 255, 255, 0.92);
    color: #285dd8;
    border-radius: 999px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.assistant-code-copy:hover {
    transform: translateY(-1px);
    border-color: rgba(74, 120, 220, 0.55);
    background: rgba(242, 247, 255, 0.98);
    color: #1f5fff;
}

.assistant-code-block pre {
    margin: 0;
    padding: 13px 14px 15px;
    overflow-x: auto;
    background: rgba(10, 19, 37, 0.96);
    color: #dbe8ff;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}

.assistant-code-block code {
    font-family: inherit;
    color: inherit;
}

.assistant-thinking-bubble {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 220px;
}

.assistant-thinking-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: transparent;
    background-image: linear-gradient(90deg, rgba(148, 163, 184, 0.42) 0%, rgba(107, 114, 128, 0.95) 28%, rgba(17, 24, 39, 0.98) 50%, rgba(107, 114, 128, 0.95) 72%, rgba(148, 163, 184, 0.42) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShimmerMono 1.8s linear infinite;
}

.assistant-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.assistant-thinking-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #73a8ff 0%, #2f73ff 100%);
    opacity: 0.28;
    animation: assistantThinkingPulse 1.1s ease-in-out infinite;
}

.assistant-thinking-dots span:nth-child(2) {
    animation-delay: 0.16s;
}

.assistant-thinking-dots span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes textShimmerColor {
    from {
        background-position: 200% center;
    }

    to {
        background-position: 0% center;
    }
}

@keyframes textShimmerMono {
    from {
        background-position: 220% center;
    }

    to {
        background-position: 0% center;
    }
}

@keyframes assistantThinkingPulse {

    0%,
    80%,
    100% {
        opacity: 0.28;
        transform: translateY(0) scale(0.92);
    }

    40% {
        opacity: 1;
        transform: translateY(-2px) scale(1);
    }
}

.assistant-message.user .assistant-bubble {
    background: linear-gradient(135deg, #1f6dff 0%, #5bb4ff 100%);
    color: #fff;
    border-top-right-radius: 8px;
}

.assistant-message.user .assistant-message-attachment {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.95);
}

.assistant-message.user .assistant-message-attachment-kind {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.assistant-avatar-dot {
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: transparent;
    border: none;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    overflow: visible;
    box-shadow: none;
    --robot-rx: var(--assistant-robot-rx, 0deg);
    --robot-ry: var(--assistant-robot-ry, 0deg);
    --robot-px: var(--assistant-robot-px, 0px);
    --robot-py: var(--assistant-robot-py, 0px);
}

.assistant-avatar-dot .assistant-robot-badge {
    width: 42px;
    height: 42px;
    transform: translate(-7px, -7px) scale(0.29);
    transform-origin: center;
    filter: drop-shadow(0 4px 8px rgba(102, 42, 201, 0.28));
    animation: assistantRobotFloat 2.6s ease-in-out infinite;
    will-change: transform;
}

.assistant-mini-bot .robot-shadow,
.assistant-avatar-dot .robot-shadow {
    opacity: 0.42;
}

@keyframes assistantRobotFloat {

    0%,
    100% {
        transform: translate(var(--assistant-bot-tx, 0), var(--assistant-bot-ty, 0)) scale(var(--assistant-bot-scale, 1));
    }

    50% {
        transform: translate(var(--assistant-bot-tx, 0), calc(var(--assistant-bot-ty, 0) - 2px)) scale(var(--assistant-bot-scale, 1));
    }
}

.assistant-mini-bot .assistant-robot-badge {
    --assistant-bot-tx: -1px;
    --assistant-bot-ty: -3px;
    --assistant-bot-scale: 0.44;
}

.assistant-avatar-dot .assistant-robot-badge {
    --assistant-bot-tx: -7px;
    --assistant-bot-ty: -7px;
    --assistant-bot-scale: 0.29;
}

.assistant-empty {
    padding: 14px 14px 2px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    line-height: 1.8;
    color: var(--text3);
}

.assistant-footer {
    padding: 8px 14px 12px;
    border-top: 1px solid rgba(219, 228, 241, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.96));
}

.assistant-input-wrap {
    border: 1px solid rgba(209, 220, 238, 0.92);
    border-radius: 20px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
    padding: 8px 10px 6px;
}

.assistant-input-wrap.drag-over {
    border-color: rgba(31, 109, 255, 0.72);
    background: rgba(241, 247, 255, 0.98);
    box-shadow: 0 0 0 4px rgba(31, 109, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.assistant-input {
    width: 100%;
    min-height: 52px;
    max-height: 120px;
    border: none;
    outline: none;
    resize: vertical;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

.assistant-input::placeholder {
    color: #8b97ab;
}

.assistant-attachment-preview {
    margin: 8px 0 6px;
}

.assistant-attachment-pill {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 14px;
    border: 1px solid rgba(210, 221, 239, 0.96);
    background: rgba(247, 250, 255, 0.96);
    overflow: hidden;
}

.assistant-attachment-kind {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(31, 109, 255, 0.1);
    color: #1f5fff;
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.assistant-attachment-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text2);
    font-size: 11px;
    line-height: 1.4;
}

.assistant-attachment-close {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text2);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.assistant-attachment-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    transform: translateY(-1px);
}

.assistant-footer-row {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.assistant-meta {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--text3);
    text-transform: uppercase;
    min-width: 92px;
}

.assistant-model-select {
    min-width: 128px;
    max-width: 210px;
    flex: 1;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: none;
    border-radius: 14px;
    min-height: 38px;
}

.assistant-attach-btn {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(164, 183, 216, 0.9);
    background: rgba(245, 248, 253, 0.96);
    color: #3f5b84;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.assistant-attach-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(82, 121, 181, 0.9);
    box-shadow: 0 12px 22px rgba(73, 102, 151, 0.14);
}

.assistant-attach-btn.drag-over:not(:disabled) {
    transform: translateY(-1px) scale(1.01);
    border-color: rgba(31, 109, 255, 0.85);
    background: rgba(235, 243, 255, 0.98);
    color: #1f5fff;
    box-shadow: 0 14px 28px rgba(31, 109, 255, 0.16);
}

.assistant-attach-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    box-shadow: none;
}

.assistant-attach-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
}

.assistant-mic-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    border: 1px solid rgba(164, 183, 216, 0.9);
    background: rgba(245, 248, 253, 0.96);
    color: #3f5b84;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.assistant-mic-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(82, 121, 181, 0.9);
    box-shadow: 0 12px 22px rgba(73, 102, 151, 0.14);
}

.assistant-mic-btn.listening {
    background: linear-gradient(135deg, rgba(31, 109, 255, 0.16), rgba(90, 179, 255, 0.24));
    border-color: rgba(31, 109, 255, 0.5);
    color: #1f5de0;
    box-shadow: 0 14px 24px rgba(31, 109, 255, 0.16);
}

.assistant-mic-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    box-shadow: none;
}

.assistant-note {
    margin-top: 10px;
    line-height: 1.6;
}

.assistant-shell.maximized .assistant-note {
    display: none;
}

.assistant-send {
    min-width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #1f6dff, #5ab3ff);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(31, 109, 255, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    position: relative;
}

.assistant-send:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 28px rgba(31, 109, 255, 0.3);
}

.assistant-send.loading svg {
    opacity: 0;
}

.assistant-send.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: assistantSendSpin 0.8s linear infinite;
}

.assistant-send:disabled {
    opacity: 0.54;
    cursor: not-allowed;
    box-shadow: none;
}

@keyframes assistantSendSpin {
    to {
        transform: rotate(360deg);
    }
}

.assistant-note {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1.7;
    color: var(--text3);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid;
    white-space: nowrap;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.toast.info {
    background: var(--surface2);
    border-color: var(--border2);
    color: var(--text2);
}

.toast.success {
    background: rgba(56, 217, 169, 0.12);
    border-color: rgba(56, 217, 169, 0.4);
    color: var(--accent3);
}

.toast.error {
    background: rgba(255, 77, 109, 0.12);
    border-color: rgba(255, 77, 109, 0.4);
    color: var(--accent2);
}

.toast.warning {
    background: rgba(240, 165, 0, 0.12);
    border-color: rgba(240, 165, 0, 0.4);
    color: var(--accent);
}

.toast.out {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
}

.undo-indicator {
    margin-top: 12px;
    padding: 10px 16px;
    border: 1px solid rgba(56, 217, 169, 0.3);
    border-radius: var(--radius);
    background: rgba(56, 217, 169, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--accent3);
    animation: fadeUp 0.3s ease both;
}

#transcriptPanelCard > .undo-indicator {
    margin: 12px 20px 0;
}

.undo-indicator kbd {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 3px;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--accent3);
}

.not-supported {
    text-align: center;
    padding: 80px 24px;
    font-family: var(--font-mono);
}

.not-supported .ns-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.not-supported h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent2);
}

.not-supported p {
    font-size: 12px;
    color: var(--text3);
    line-height: 1.8;
    letter-spacing: 0.05em;
}

.not-supported a {
    color: var(--accent);
    text-decoration: none;
}

.quality-badge {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(240, 165, 0, 0.12);
    border: 1px solid rgba(240, 165, 0, 0.3);
    color: var(--accent);
    margin-left: 8px;
}

.detected-lang-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid rgba(56, 217, 169, 0.3);
    color: var(--accent3);
    background: rgba(56, 217, 169, 0.08);
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-meta {
        display: none;
    }

    .rec-panel {
        padding: 20px;
    }

    .mic-row {
        flex-wrap: wrap;
    }

    .timer-display {
        margin-left: 0;
        font-size: 22px;
    }

    .action-bar {
        justify-content: flex-start;
    }

    .shortcuts-bar {
        display: none;
    }

    .tp-stats {
        gap: 10px;
    }

    .controls {
        gap: 8px;
    }

    .api-row {
        flex-direction: column;
        align-items: stretch;
    }

    .api-label {
        min-width: auto;
    }
}


/* ==== Enhanced Studio Additions ==== */
