:root {
    --app-height: 100dvh;
    --input-panel-height: 112px;
    --content-horizontal-padding: clamp(14px, 4vw, 20px);
    --message-max-width: 540px;
    --history-sheet-width: min(92vw, 430px);
    --top-chrome-transition: 0.3s var(--ease-emphasized);
    --motion-fast: 0.12s;
    --motion-normal: 0.24s;
    --motion-slow: 0.44s;
    --hero-height: clamp(214px, 28dvh, 268px);
    --ease-standard: cubic-bezier(0.2, 0, 0, 1);
    --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-press: cubic-bezier(0.2, 0, 0.2, 1);
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    height: var(--app-height, 100dvh);
    width: 100%;
    overflow: hidden;
    position: fixed;
    inset: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body.desktop-layout {
    --content-horizontal-padding: clamp(18px, 3.2vw, 28px);
    --message-max-width: 720px;
}

button,
input,
textarea {
    font: inherit;
}

button {
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

input,
textarea {
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
}

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(90, 98, 112, 0.95) 0%, rgba(90, 98, 112, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: max(env(safe-area-inset-top), 14px) 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    transform: translateZ(0);
    will-change: padding, transform;
    transition:
        padding var(--top-chrome-transition),
        transform var(--top-chrome-transition),
        box-shadow var(--motion-normal) var(--ease-standard),
        background var(--motion-normal) var(--ease-standard);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    will-change: transform, opacity;
    transition:
        transform var(--top-chrome-transition),
        opacity var(--motion-normal) var(--ease-standard);
}

.logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.25));
    flex-shrink: 0;
}

.header-action-label {
    line-height: 1;
}

.history-toggle,
.new-chat-toggle {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 999px;
    padding: 7px 12px;
    min-height: 34px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transform: translateY(0) scale(1);
    will-change: transform;
    transition:
        background var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press),
        padding var(--top-chrome-transition),
        border-color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        opacity var(--motion-normal) var(--ease-standard);
}

.new-chat-toggle {
    background: rgba(255, 255, 255, 0.2);
}

.history-toggle:active,
.new-chat-toggle:active {
    transform: translateY(1px) scale(0.965);
    background: rgba(255, 255, 255, 0.26);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}

.history-toggle svg,
.new-chat-toggle svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Основной контейнер */
.main-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: calc(52px + max(env(safe-area-inset-top), 12px));
    height: 100%;
    background: #5a6270;
}

.desktop-layout .main-container {
    padding-top: calc(46px + max(env(safe-area-inset-top), 10px));
}

/* Градиентная зона */
.hero-section {
    background: linear-gradient(180deg, #5a6270 0%, #6b7280 40%, #9ca3af 100%);
    height: var(--hero-height);
    padding: 0 24px 24px;
    text-align: center;
    flex-shrink: 0;
    overflow: hidden;
    transform-origin: top center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    will-change: height, opacity, transform;
    transition:
        height var(--top-chrome-transition),
        padding var(--top-chrome-transition),
        opacity 0.26s var(--ease-standard),
        transform var(--top-chrome-transition);
}

.desktop-layout .hero-section {
    --hero-height: clamp(164px, 22dvh, 214px);
    padding-left: 28px;
    padding-right: 28px;
    padding-bottom: 18px;
}

.hero-title {
    font-size: clamp(28px, 7vw, 34px);
    font-weight: 700;
    color: white;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.desktop-layout .hero-title {
    font-size: clamp(26px, 3.8vw, 34px);
    margin-bottom: 12px;
}

.hero-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    max-width: 300px;
    margin: 0 auto;
}

.desktop-layout .hero-description {
    max-width: 460px;
}

/* Белая карточка */
.content-wrapper {
    flex: 1;
    min-height: 0;
    background: white;
    border-radius: 32px 32px 0 0;
    margin-top: -24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
    transform: translateY(0);
    will-change: margin-top, border-radius, transform;
    transition:
        margin-top var(--top-chrome-transition),
        border-radius var(--top-chrome-transition),
        transform var(--top-chrome-transition),
        box-shadow var(--motion-normal) var(--ease-standard);
}

.desktop-layout .content-wrapper {
    margin-top: -18px;
    border-radius: 28px 28px 0 0;
}

.chat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-height: 0;
    padding: 0 var(--content-horizontal-padding);
    border-bottom: 0 solid transparent;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 8;
    overflow: hidden;
    backface-visibility: hidden;
    opacity: 0;
    transform: translate3d(0, -6px, 0);
    will-change: max-height, transform, opacity;
    transition:
        max-height var(--top-chrome-transition),
        padding var(--top-chrome-transition),
        border-color var(--motion-normal) var(--ease-standard),
        gap var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        opacity var(--motion-normal) var(--ease-standard),
        transform var(--top-chrome-transition);
}

.chat-toolbar.active {
    max-height: 64px;
    padding: 10px var(--content-horizontal-padding) 8px;
    border-bottom-width: 1px;
    border-bottom-color: #f1f5f9;
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.chat-toolbar-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-kicker,
.chat-title-row,
.chat-title {
    display: none;
}

.chat-sync-pill {
    border-radius: 999px;
    border: 0 solid transparent;
    background: #f8fbff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 0;
    letter-spacing: 0.02em;
    opacity: 0;
    max-width: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        max-width var(--motion-normal) var(--ease-standard),
        padding var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard);
    pointer-events: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-sync-pill.visible {
    opacity: 1;
    max-width: min(100%, 320px);
    padding: 6px 10px;
    border-width: 1px;
    border-color: #dbeafe;
    transform: translateY(0);
}

.chat-toolbar-action {
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 999px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition:
        background var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press);
}

.chat-toolbar-action:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: inset 0 2px 7px rgba(15, 23, 42, 0.08);
}

.chat-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chat-toolbar-toggle {
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition:
        background var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press),
        color var(--motion-normal) var(--ease-standard);
}

.chat-toolbar-toggle:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: inset 0 2px 7px rgba(15, 23, 42, 0.08);
}

.chat-toolbar-toggle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.chat-toolbar-toggle[hidden] {
    display: none;
}

.chat-toolbar-toggle-label-collapsed {
    display: none;
}

.content-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 28px var(--content-horizontal-padding) 24px;
    scroll-behavior: smooth;
}

.content-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-bottom-button {
    position: absolute;
    right: max(16px, var(--content-horizontal-padding));
    bottom: 18px;
    z-index: 12;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(219, 228, 240, 0.92);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #19549b;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(10px) scale(0.94);
    transition:
        opacity var(--motion-normal) var(--ease-standard),
        transform var(--motion-normal) var(--ease-emphasized),
        background var(--motion-fast) var(--ease-standard),
        border-color var(--motion-fast) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard);
}

.scroll-bottom-button[hidden] {
    display: none;
}

.scroll-bottom-button.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scroll-bottom-button:active {
    transform: translateY(1px) scale(0.94);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.scroll-bottom-button svg {
    width: 18px;
    height: 18px;
}

.history-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
    visibility: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(max(env(safe-area-inset-top), 14px) + 10px) 14px calc(14px + env(safe-area-inset-bottom));
    transition: visibility 0.15s;
}

.history-overlay.open {
    visibility: visible;
    pointer-events: auto;
}

.history-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    will-change: background, backdrop-filter;
    transition:
        background var(--motion-normal) var(--ease-standard),
        backdrop-filter var(--motion-normal) var(--ease-standard),
        -webkit-backdrop-filter var(--motion-normal) var(--ease-standard);
}

.history-overlay.open .history-backdrop {
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.history-sheet {
    position: relative;
    z-index: 1;
    width: min(100%, var(--history-sheet-width));
    max-height: min(78vh, 640px);
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    transform: translateY(10px) scale(0.98);
    transform-origin: top center;
    opacity: 0;
    will-change: transform, opacity;
    transition:
        transform var(--motion-normal) var(--ease-emphasized),
        opacity var(--motion-normal) var(--ease-standard);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-overlay.open .history-sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.history-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-sheet-title {
    font-size: 18px;
    font-weight: 650;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.history-sheet-close {
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition:
        background var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press),
        color var(--motion-normal) var(--ease-standard);
}

.history-sheet-caption {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.history-sheet-primary {
    margin-top: 14px;
    border: 1px solid #c7ddff;
    border-radius: 14px;
    background: #f8fbff;
    color: #1d4ed8;
    padding: 12px 14px;
    min-height: 46px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition:
        background var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press),
        color var(--motion-normal) var(--ease-standard);
}

.history-list {
    margin-top: 14px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.history-item {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.history-item-main {
    flex: 1;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 12px 11px;
    text-align: left;
    cursor: pointer;
    transition:
        transform var(--motion-fast) var(--ease-press),
        border-color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        background var(--motion-normal) var(--ease-standard);
    will-change: transform;
}

.history-item-main.active {
    border-color: #cbd5e1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    background: #f8fafc;
}

.history-item-main:active {
    transform: translateY(1px) scale(0.985);
}

.history-item-title {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.history-item-preview {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.history-item-meta {
    margin-top: 7px;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.history-item-delete {
    width: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition:
        background var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard),
        color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press);
}

.history-empty {
    border: 1px dashed #dbe4f0;
    border-radius: 14px;
    padding: 16px 15px;
    background: #f8fafc;
    color: #64748b;
}

.history-empty-title {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.history-empty-text {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.history-skeleton {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 13px 12px;
    background: #ffffff;
}

.history-skeleton-line {
    display: block;
    height: 10px;
    width: 82%;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
    background-size: 220% 100%;
    animation: skeletonPulse 1.25s var(--ease-standard) infinite;
}

.history-skeleton-line.title {
    width: 54%;
    height: 12px;
}

.history-skeleton-line.short {
    width: 34%;
}

.history-skeleton-line + .history-skeleton-line {
    margin-top: 9px;
}

/* Табы */
.tabs {
    background: #f1f5f9;
    border-radius: 100px;
    padding: 4px;
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    text-align: center;
    color: #64748b;
    transition:
        background var(--motion-normal) var(--ease-standard),
        color var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard);
    cursor: pointer;
    white-space: nowrap;
}

.tab.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

@keyframes skeletonPulse {
    0% {
        background-position: 120% 0;
    }

    100% {
        background-position: -120% 0;
    }
}

/* Карточка сообщения */
.message-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    width: min(100%, var(--message-max-width));
    max-width: 100%;
    min-width: 0;
    margin-right: auto;
    transition:
        transform var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        border-color var(--motion-normal) var(--ease-standard);
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
}

.message-card * {
    -webkit-user-select: text;
    user-select: text;
}

.message-title .bot-icon,
.copy-response-button,
.copy-response-button *,
.product-card-action,
.product-card-action *,
.scroll-bottom-button,
.scroll-bottom-button * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.message-card:last-child {
    margin-bottom: 0;
}

.message-card:not(.user-message) {
    border-top-left-radius: 16px;
}

.message-card.user-message {
    margin-left: auto;
    margin-right: 0;
    width: fit-content;
    min-width: 72px;
    max-width: 88%;
    background: linear-gradient(135deg, rgba(125, 135, 150, 0.9) 0%, rgba(107, 114, 128, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px 20px 4px 20px;
    padding: 12px 18px;
    box-shadow: 0 4px 16px rgba(107, 114, 128, 0.15);
}

.desktop-layout .message-card.user-message {
    max-width: min(84%, 760px);
}

/* Bot avatar is now inline in message-title */
.bot-avatar {
    display: none;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-title .bot-icon {
    width: 19px;
    height: 19px;
    display: inline-block;
    vertical-align: middle;
    flex: 0 0 19px;
    background: linear-gradient(135deg, #0f8297 0%, #156894 58%, #184f86 100%);
    -webkit-mask: url("logo-short-white.png") center / contain no-repeat;
    mask: url("logo-short-white.png") center / contain no-repeat;
    filter: drop-shadow(0 1px 2px rgba(15, 76, 124, 0.14));
    transform: translateZ(0);
}

.message-title .bot-icon.is-typing {
    background: linear-gradient(135deg, #0f8297 0%, #156894 58%, #184f86 100%);
}

.message-card.user-message .message-title {
    justify-content: flex-end;
    align-self: flex-end;
    width: fit-content;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.message-card.user-message .message-text {
    color: #ffffff;
    font-size: clamp(16px, 2.2vw, 17px);
    font-weight: 400;
    line-height: 1.46;
    letter-spacing: -0.015em;
    white-space: pre-wrap;
}

.message-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.copy-response-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition:
        background var(--motion-fast) ease,
        border-color var(--motion-fast) ease,
        color var(--motion-fast) ease,
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press);
}

.copy-response-button:hover {
    background: #f1f5f9;
    color: #475569;
}

.copy-response-button:active {
    transform: translateY(1px) scale(0.965);
    box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.08);
}

.rich-summary {
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
    margin-top: 4px;
}

.rich-section {
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.rich-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.rich-section-content {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.rich-list {
    margin: 8px 0 0 16px;
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
}

.rich-list li {
    margin-top: 6px;
}

.rich-table-container {
    position: relative;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
    max-width: 100%;
}

.rich-table-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 28px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(248, 250, 252, 0), #f8fafc 82%);
}

.rich-table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.rich-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.rich-table th,
.rich-table td {
    text-align: left;
    border-bottom: 1px solid #dbe4f0;
    border-right: 1px solid #e2e8f0;
    padding: 10px 12px;
    font-size: 12px;
    color: #334155;
    vertical-align: top;
    min-width: 140px;
    max-width: min(70vw, 320px);
}

.rich-table th {
    background: #eff6ff;
    color: #0f172a;
    font-weight: 700;
}

.rich-table th:last-child,
.rich-table td:last-child {
    border-right: none;
}

.rich-table tbody tr:last-child td {
    border-bottom: none;
}

.rich-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.product-recommendations {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.product-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.product-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product-card-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.product-card-badge {
    flex-shrink: 0;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-meta {
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.product-card-list {
    margin: 10px 0 0 16px;
    color: #334155;
    font-size: 13px;
    line-height: 1.48;
}

.product-card-list li + li {
    margin-top: 5px;
}

.product-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    border: 1px solid #c7ddff;
    border-radius: 999px;
    background: #f8fbff;
    color: #19549b;
    font-size: 12px;
    font-weight: 750;
    padding: 9px 12px;
    text-decoration: none;
    transition:
        background var(--motion-fast) var(--ease-standard),
        border-color var(--motion-fast) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press);
}

.product-card-action:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: inset 0 2px 7px rgba(15, 23, 42, 0.08);
}

/* Markdown Text Styling */
.markdown-content {
    display: block;
    max-width: 100%;
}

.message-text,
.rich-summary,
.rich-section-content,
.rich-meta,
.rich-list li,
.markdown-content,
.markdown-content :is(p, li, blockquote, td, th, code, a, h1, h2, h3, h4, h5, h6) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.markdown-content p {
    margin-bottom: 8px;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
    margin: 14px 0 8px;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child {
    margin-top: 0;
}

.markdown-content strong {
    font-weight: 700;
    color: #0f172a;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 8px;
}

.markdown-content ol {
    list-style-type: decimal;
    padding-left: 20px;
    margin-bottom: 8px;
}

.markdown-content li {
    margin-bottom: 4px;
}

.markdown-content li>p,
.rich-list li>p {
    margin: 0;
}

.markdown-content a {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.markdown-content pre {
    margin: 12px 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.markdown-content code {
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    font-size: 0.92em;
}

.markdown-content :not(pre)>code {
    background: #e2e8f0;
    color: #0f172a;
    padding: 0.16em 0.42em;
    border-radius: 6px;
}

.markdown-content pre code {
    display: block;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    color: inherit;
}

.markdown-content blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    border-left: 4px solid #93c5fd;
    background: #eff6ff;
    border-radius: 0 14px 14px 0;
    color: #1e3a8a;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0;
}

.markdown-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 12px 0;
}

.markdown-content table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.markdown-content table th,
.markdown-content table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dbe4f0;
    border-right: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
    background: white;
    min-width: 140px;
    max-width: min(70vw, 320px);
}

.markdown-content table th {
    background: #eff6ff;
    color: #0f172a;
}

.markdown-content table th:last-child,
.markdown-content table td:last-child {
    border-right: none;
}

.markdown-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Нижняя панель ввода */
.input-panel {
    flex-shrink: 0;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    padding: 12px 16px;
    z-index: 90;
    transform: translateZ(0);
    backface-visibility: hidden;
    padding-bottom: 12px;
}

.input-wrapper {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    transition:
        transform var(--motion-normal) var(--ease-standard),
        opacity var(--motion-normal) var(--ease-standard);
}

.desktop-layout .input-wrapper {
    max-width: 720px;
}

.bot-watermark {
    max-height: 28px;
    overflow: hidden;
    text-align: center;
    padding-top: 12px;
    padding-bottom: 2px;
    opacity: 1;
    transform: translateY(0);
    transition:
        max-height var(--motion-normal) var(--ease-standard),
        padding var(--motion-normal) var(--ease-standard),
        opacity var(--motion-fast) var(--ease-standard),
        transform var(--motion-normal) var(--ease-standard);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.bot-watermark span {
    font-size: 11px;
    font-weight: 750;
    color: #cbd5e1;
    letter-spacing: 0.08em;
}

.hide-bot-watermark .bot-watermark {
    display: none;
}

.input-focused .bot-watermark,
.input-panel:focus-within .bot-watermark {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(4px);
}

.input-field {
    flex: 1;
    min-width: 0;
    background: #f1f5f9;
    border: none;
    border-radius: 20px;
    padding: 14px 20px;
    min-height: 52px;
    max-height: 132px;
    font-size: 16px;
    color: #1e293b;
    outline: none;
    font-family: 'Inter', sans-serif;
    line-height: 1.45;
    transition:
        background var(--motion-normal) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard);
    resize: none;
    overflow-y: hidden;
}

.input-field:focus {
    background: #e2e8f0;
}

.input-field::placeholder {
    color: #94a3b8;
}

.send-button {
    width: 48px;
    height: 48px;
    background: #19549B;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition:
        background var(--motion-fast) var(--ease-standard),
        border-color var(--motion-fast) var(--ease-standard),
        color var(--motion-fast) var(--ease-standard),
        box-shadow var(--motion-normal) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press);
    box-shadow: 0 8px 18px rgba(25, 84, 155, 0.28);
    flex-shrink: 0;
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.send-button:active {
    transform: translateY(2px) scale(0.9);
    box-shadow: 0 4px 10px rgba(25, 84, 155, 0.18);
}

.send-button svg {
    width: 18px;
    height: 18px;
}

.voice-button {
    width: 46px;
    height: 46px;
    border: 1px solid #dbe4f0;
    border-radius: 50%;
    background: #f8fafc;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background var(--motion-fast) var(--ease-standard),
        border-color var(--motion-fast) var(--ease-standard),
        color var(--motion-fast) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press),
        box-shadow var(--motion-normal) var(--ease-standard);
    flex-shrink: 0;
}

.voice-button:active {
    transform: translateY(2px) scale(0.91);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.08);
}

.voice-button:disabled,
.attach-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.voice-button svg {
    width: 20px;
    height: 20px;
}

.voice-icon-stop {
    display: none;
}

.voice-button.recording {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.16);
}

.voice-button.recording .voice-icon-mic {
    display: none;
}

.voice-button.recording .voice-icon-stop {
    display: block;
}

.voice-button.transcribing {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #19549b;
}

.voice-status {
    max-width: 600px;
    margin: 0 auto 10px;
    display: none;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.voice-status.active {
    display: flex;
    animation: filePreviewIn var(--motion-normal) var(--ease-emphasized);
}

.voice-status.recording {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.voice-status.transcribing {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #19549b;
}

.voice-status.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.voice-status.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.voice-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.voice-status.recording .voice-status-dot {
    animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.72;
    }

    50% {
        transform: scale(1.45);
        opacity: 1;
    }
}

.compact-layout .hero-section {
    --hero-height: 154px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 14px;
}

.compact-layout .hero-title {
    font-size: clamp(21px, 6vw, 27px);
    margin-bottom: 10px;
}

.compact-layout .hero-description {
    font-size: 13px;
}

.compact-layout .content-wrapper {
    margin-top: -16px;
    border-radius: 24px 24px 0 0;
}

.compact-layout .content-scroll {
    padding-top: 20px;
}

.compact-layout .chat-toolbar.active {
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 10px;
}

.compact-layout .chat-title {
    font-size: 15px;
}

.compact-layout .chat-toolbar-action,
.compact-layout .chat-toolbar-toggle {
    padding: 10px 12px;
}

.chat-focused .header {
    padding-top: max(env(safe-area-inset-top), 10px);
    padding-bottom: 10px;
    transform: translateY(-1px);
}

.chat-focused .history-toggle,
.chat-focused .new-chat-toggle {
    padding: 8px 12px;
}

.chat-focused .hero-section {
    height: 0;
    opacity: 0;
    transform: translateY(-12px) scale(0.985);
    padding-bottom: 0;
    pointer-events: none;
}

.chat-focused .content-wrapper {
    margin-top: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(0);
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.05);
}

.chat-focused .content-scroll {
    padding-top: 18px;
}

.chat-focused .chat-toolbar {
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.chat-focused .chat-kicker,
.chat-focused .chat-sync-pill {
    display: none;
}

.chat-focused .chat-title-row {
    gap: 8px;
    display: none;
}

.chat-focused .chat-toolbar-toggle-label-collapsed {
    display: inline;
}

.chat-focused .chat-toolbar-toggle-label-expanded {
    display: none;
}

.viewport-adjusting .header,
.viewport-adjusting .hero-section,
.viewport-adjusting .content-wrapper,
.viewport-adjusting .chat-toolbar,
.viewport-adjusting .history-toggle,
.viewport-adjusting .new-chat-toggle {
    transition: none !important;
}

@media (hover: hover) {
    .history-toggle:hover,
    .new-chat-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.22);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.18),
            0 10px 24px rgba(15, 23, 42, 0.12);
    }

    .history-sheet-close:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        color: #0f172a;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        transform: translateY(-1px);
    }

    .history-sheet-primary:hover {
        background: #eef6ff;
        border-color: #b7d2ff;
        box-shadow: 0 10px 22px rgba(29, 78, 216, 0.1);
        transform: translateY(-1px);
    }

    .history-item-main:hover {
        border-color: #cbd5e1;
        background: #f8fafc;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
        transform: translateY(-1px);
    }

    .history-item-delete:hover {
        background: #fff5f5;
        border-color: #fecaca;
        color: #dc2626;
        box-shadow: 0 10px 20px rgba(220, 38, 38, 0.08);
        transform: translateY(-1px);
    }
}

.history-sheet-close:active,
.history-sheet-primary:active,
.history-item-delete:active {
    transform: translateY(1px) scale(0.97);
}

.input-field:focus-visible,
.send-button:focus-visible,
.voice-button:focus-visible,
.history-toggle:focus-visible,
.new-chat-toggle:focus-visible,
.chat-toolbar-action:focus-visible,
.chat-toolbar-toggle:focus-visible,
.history-sheet-close:focus-visible,
.history-sheet-primary:focus-visible,
.history-item-main:focus-visible,
.history-item-delete:focus-visible,
.product-card-action:focus-visible,
.scroll-bottom-button:focus-visible {
    outline: none;
}

.input-field:focus-visible {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.send-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 8px 18px rgba(37, 99, 235, 0.28);
}

.voice-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.history-toggle:focus-visible,
.new-chat-toggle:focus-visible,
.chat-toolbar-action:focus-visible,
.chat-toolbar-toggle:focus-visible,
.history-sheet-close:focus-visible,
.history-sheet-primary:focus-visible,
.history-item-main:focus-visible,
.history-item-delete:focus-visible,
.product-card-action:focus-visible,
.scroll-bottom-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Вложения */
.attach-button {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(0) scale(1);
    transition:
        color var(--motion-fast) var(--ease-standard),
        background var(--motion-fast) var(--ease-standard),
        transform var(--motion-fast) var(--ease-press);
    flex-shrink: 0;
}

.attach-button:hover:not(:disabled) {
    color: #3b82f6;
    background: #f1f5f9;
}

.attach-button:active:not(:disabled) {
    transform: translateY(1px) scale(0.9);
}

.attach-button svg {
    width: 22px;
    height: 22px;
}

.file-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #334155;
    width: max-content;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.file-preview.active {
    display: flex;
    animation: filePreviewIn var(--motion-normal) var(--ease-emphasized);
}

@keyframes filePreviewIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

.file-preview-content {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.file-preview-icon {
    color: #3b82f6;
    flex-shrink: 0;
}

.file-preview-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.file-preview-remove {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 8px;
    flex-shrink: 0;
    margin-left: 8px;
    transition:
        background var(--motion-fast) ease,
        border-color var(--motion-fast) ease,
        color var(--motion-fast) ease,
        transform var(--motion-fast) ease;
}

.file-preview-remove:hover {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fecdd3;
}

@keyframes headerLogoBreathe {
    0%,
    100% {
        opacity: 0.9;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.22));
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 3px 10px rgba(255, 255, 255, 0.14));
        transform: translateY(-1px) scale(1.015);
    }
}

@keyframes botLogoBreathe {
    0%,
    100% {
        opacity: 0.9;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.035);
    }
}

/* Адаптивность */
@media (max-width: 560px) {
    .chat-sync-pill {
        display: none;
    }
}

@media (max-width: 420px) {
    .header {
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo {
        height: 24px;
    }

    .history-toggle,
    .new-chat-toggle {
        padding: 8px;
        min-width: 36px;
        justify-content: center;
    }

    .header-action-label {
        display: none;
    }

}

@media (max-width: 360px) {
    .hero-title {
        font-size: 26px;
    }

    .hero-description {
        font-size: 14px;
    }

    .tab {
        font-size: 13px;
        padding: 10px 12px;
    }

    .message-card {
        padding: 16px;
        gap: 12px;
    }

    .message-card.user-message {
        padding: 16px 16px 18px;
        border-radius: 18px;
    }

    .chat-toolbar {
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 8px;
    }

    .chat-toolbar-actions {
        width: auto;
    }

    .history-sheet {
        width: 100%;
        max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        margin-top: 0;
    }

    .input-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .input-field {
        padding-left: 16px;
        padding-right: 16px;
    }

    .bot-avatar {
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 768px) {
    .main-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Анимации появления */
.fade-in {
    animation: fadeSlideUp var(--motion-slow) var(--ease-emphasized);
}

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

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

.fade-in-delay {
    animation: fadeSlideUp var(--motion-slow) var(--ease-emphasized) 0.15s both;
}

@media (prefers-reduced-motion: reduce) {

    .fade-in,
    .fade-in-delay,
    .file-preview.active,
    .voice-status.active,
    .voice-status.recording .voice-status-dot,
    .history-skeleton-line,
    .logo,
    .message-title .bot-icon {
        animation: none;
    }

    .content-scroll {
        scroll-behavior: auto;
    }

    .message-card,
    .send-button,
    .attach-button,
    .input-field,
    .input-wrapper,
    .header,
    .header-actions,
    .hero-section,
    .content-wrapper,
    .history-overlay,
    .history-sheet,
    .history-toggle,
    .new-chat-toggle,
    .voice-button,
    .chat-toolbar-action,
    .chat-toolbar-toggle,
    .history-sheet-close,
    .history-sheet-primary,
    .history-item-main,
    .history-item-delete,
    .scroll-bottom-button {
        transition: none;
    }
}

.status-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(25, 84, 155, 0.2);
    border-top: 2px solid #19549b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.user-attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
    word-break: break-all;
}
