/* Live STT (웹) — Summet base.html 사이드바·메인 셸 토큰과 정렬 */
/* Uses :root vars: --bg-color, --surface-color, --text-color, --text-muted, --border-color,
   --primary-color, --primary-hover, --sidebar-active-bg, --sidebar-active-bar, --sidebar-hover, --input-bg */

.main-content:has(.live-stt-page) {
    padding: 0 !important;
    background: var(--bg-color) !important;
    overflow: hidden;
    flex: 1 1 0;
    min-height: 0;
    align-self: stretch;
}

body.drawer-collapsed .main-content:has(.live-stt-page) {
    padding: 0 !important;
}

.content-root:has(.live-stt-page) {
    max-width: none !important;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 22px;
    box-sizing: border-box;
}

body.drawer-collapsed .content-root:has(.live-stt-page) {
    padding-left: var(--drawer-collapsed-pad-x);
    padding-right: var(--drawer-collapsed-pad-x);
}

/* 실시간 STT 타이틀 줄 — 아래 워크스페이스와 톤 맞춘 미니멀 바 */
.main-content:has(.live-stt-page) .main-toolbar {
    margin: 0;
    padding: 16px 20px 14px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
}

[data-theme='dark'] .main-content:has(.live-stt-page) .main-toolbar {
    background: var(--surface-color);
    box-shadow: none;
}

body.drawer-collapsed .main-content:has(.live-stt-page) .main-toolbar {
    padding-left: var(--drawer-collapsed-pad-x);
    padding-right: var(--drawer-collapsed-pad-x);
}

.live-stt-page {
    --stt-record: #dc2626;
    --stt-record-hover: #b91c1c;
    --stt-radius-sm: 10px;
    --stt-radius-md: 14px;
    --stt-radius-lg: 18px;
    --stt-radius-xl: 22px;
    --stt-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --stt-shadow-md: 0 18px 48px rgba(15, 23, 42, 0.07);
    --stt-surface-muted: color-mix(in srgb, var(--input-bg) 55%, var(--surface-color));

    position: relative;
    background: var(--bg-color);

    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

[data-theme='dark'] .live-stt-page {
    --stt-surface-muted: color-mix(in srgb, var(--input-bg) 40%, var(--surface-color));
    background: var(--bg-color);
}

.stt-root {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    background: transparent;
    color: var(--text-color);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.stt-root * {
    box-sizing: border-box;
}

.stt-app-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    gap: 0;
}

/* 메인 툴바: 언어 스위처 왼쪽 — 캡슐형 4버튼 (base.html page_toolbar_cluster_leading) */
.main-toolbar .stt-main-toolbar-tools {
    display: flex;
    align-items: center;
    margin-right: 6px;
}

.main-toolbar .stt-topbar-actions--toolbar {
    gap: 0;
    padding: 2px 3px;
    border-radius: 999px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.main-toolbar .stt-topbar-actions--toolbar .stt-icon-btn {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
}

.main-toolbar .stt-topbar-actions--toolbar .stt-icon-btn:hover {
    color: var(--text-color);
    background: color-mix(in srgb, var(--surface-color) 88%, var(--primary-color));
}

.stt-workspace-frame {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.stt-workspace-split {
    display: flex;
    flex-direction: row;
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    align-items: stretch;
    gap: 20px;
}

.stt-auth-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 10px;
    border-radius: var(--stt-radius-md);
    background: color-mix(in srgb, var(--primary-color) 9%, var(--surface-color));
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid color-mix(in srgb, var(--primary-color) 22%, var(--border-color));
}

.stt-auth-strip[hidden] {
    display: none !important;
}

.stt-auth-link {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--stt-radius-sm);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.stt-auth-link:hover {
    text-decoration: none;
    background: var(--sidebar-active-bg);
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
}

.stt-topbar-actions {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
}

.stt-icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease;
}

.stt-icon-btn:hover {
    background: var(--sidebar-hover);
    color: var(--text-color);
}

.stt-icon-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.stt-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stt-app-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.stt-workspace-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0 0 4px 0;
}

#stt-screen-app {
    --stt-drawer-w: 380px;
    --stt-drawer-min: 200px;
    --stt-drawer-max: 1200px;
}

.stt-workspace-side {
    position: relative;
    flex: 0 0 var(--stt-drawer-w);
    width: var(--stt-drawer-w);
    min-width: var(--stt-drawer-min);
    max-width: min(var(--stt-drawer-max), 92vw);
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: var(--stt-radius-xl);
    background: var(--surface-color);
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 0;
    box-shadow: var(--stt-shadow-md);
    overflow: hidden;
    transition:
        width 0.3s cubic-bezier(0.32, 0.72, 0, 1),
        flex-basis 0.3s cubic-bezier(0.32, 0.72, 0, 1),
        min-width 0.3s cubic-bezier(0.32, 0.72, 0, 1),
        max-width 0.3s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.2s ease;
}

.stt-workspace-side.stt-workspace-side--hidden {
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    opacity: 0;
    border-left-width: 0;
    pointer-events: none;
    overflow: hidden;
}

.stt-side-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    margin-left: -4px;
    z-index: 6;
    cursor: col-resize;
    touch-action: none;
    background: transparent;
}

.stt-side-resize-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 14px;
    bottom: 14px;
    width: 3px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: var(--border-color);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.stt-workspace-side:not(.stt-workspace-side--hidden) .stt-side-resize-handle:hover::after,
.stt-side-resize-handle.stt-side-resize-handle--drag::after {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.stt-side-tabs {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    gap: 6px;
    padding: 12px 12px 10px;
    background: var(--stt-surface-muted);
    border-bottom: 1px solid var(--border-color);
}

.stt-side-tab {
    flex: 1;
    margin: 0;
    padding: 8px 6px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.stt-side-tab:hover {
    color: var(--text-color);
    background: color-mix(in srgb, var(--surface-color) 65%, transparent);
}

.stt-side-tab--active {
    background: var(--surface-color);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--border-color);
}

.stt-side-drawer-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface-color);
}

.stt-side-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.stt-side-pane[hidden] {
    display: none !important;
}

.stt-main-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--surface-color);
    border-radius: var(--stt-radius-xl);
    border: 1px solid var(--border-color);
    box-shadow:
        0 1px 0 color-mix(in srgb, #fff 70%, transparent) inset,
        var(--stt-shadow-md);
    overflow: hidden;
}

[data-theme='dark'] .stt-main-col {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.stt-scroll-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    padding: 12px 16px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.stt-scroll-wrap::-webkit-scrollbar {
    width: 6px;
}

.stt-scroll-wrap::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.stt-seg {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
}

.stt-seg:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stt-seg-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.stt-sp-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    border: 1px solid var(--border-color);
}

.stt-sp-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.stt-sp-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.stt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stt-chip {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: var(--stt-radius-md);
    border: 1px solid color-mix(in srgb, var(--border-color) 92%, var(--primary-color));
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-color);
    font-family: inherit;
    background: var(--surface-color);
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.stt-chip:hover {
    border-color: color-mix(in srgb, var(--primary-color) 32%, var(--border-color));
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.stt-chip-sp {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.stt-chip-txt {
    word-break: break-word;
}

.stt-chip--idle {
    background: var(--input-bg);
}

.stt-chip--sel {
    background: var(--sidebar-active-bg);
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
    box-shadow: inset 3px 0 0 var(--sidebar-active-bar);
}

.stt-chip--hi {
    background: color-mix(in srgb, #eab308 16%, var(--surface-color));
    border-color: color-mix(in srgb, #eab308 45%, var(--border-color));
}

[data-theme='dark'] .stt-chip--hi {
    background: color-mix(in srgb, #eab308 12%, var(--surface-color));
}

.stt-partial-block {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: var(--stt-radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

.stt-partial-block.stt-chip--sel {
    background: var(--sidebar-active-bg);
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
    box-shadow: inset 3px 0 0 var(--sidebar-active-bar);
}

.stt-partial-block.stt-chip--hi {
    background: color-mix(in srgb, #eab308 14%, var(--surface-color));
    border-color: color-mix(in srgb, #eab308 40%, var(--border-color));
}

.stt-partial-text {
    margin: 8px 0 0 2px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    font-style: italic;
}

.stt-bottom-bar {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--surface-color) 85%, var(--input-bg));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.stt-bottom-bar[data-on='1'] {
    display: flex;
}

.stt-bottom-bar span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-muted);
    margin-right: auto;
}

.stt-tonal {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.stt-tonal:hover {
    background: var(--sidebar-hover);
    border-color: var(--border-color);
}

.stt-mic-row {
    flex-shrink: 0;
    padding: 6px 20px 12px;
    display: flex;
    justify-content: center;
}

.stt-mic-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.stt-mic-btn:active {
    transform: scale(0.96);
}

.stt-mic-btn--idle {
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.stt-mic-btn--idle:hover {
    box-shadow: 0 8px 28px color-mix(in srgb, var(--primary-color) 42%, transparent);
    filter: brightness(1.03);
}

.stt-mic-btn--rec {
    background: linear-gradient(145deg, var(--stt-record) 0%, var(--stt-record-hover) 100%);
    box-shadow: 0 6px 22px rgba(220, 38, 38, 0.35);
    animation: stt-mic-rec 1.5s ease-in-out infinite;
}

@keyframes stt-mic-rec {
    0%,
    100% {
        box-shadow: 0 6px 22px rgba(220, 38, 38, 0.32);
    }
    50% {
        box-shadow: 0 8px 28px rgba(220, 38, 38, 0.48);
    }
}

.stt-mic-hint {
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0;
    margin: 0;
}

.stt-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 24px;
    height: 240px;
    background: var(--surface-color);
    border-radius: var(--stt-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--stt-shadow-md);
    z-index: 30;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.stt-panel[data-open='1'] {
    display: flex;
}

.stt-panel--chat {
    height: 320px;
    bottom: 24px;
    background: var(--surface-color);
}

.stt-panel--chat[data-chat-open='1'] {
    bottom: 24px;
}

.stt-panel.stt-panel--embed {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    z-index: auto;
    display: flex;
    flex: 1;
    min-height: 0;
}

.stt-panel--embed[data-open='1'] {
    display: flex;
}

.stt-panel--embed.stt-panel--chat {
    height: 100%;
    background: var(--surface-color);
}

/* STT 사이드 패널: 웹 AI 챗봇(summet-chat) 레이아웃 */
.stt-summet-chat-embed .summet-chat-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.stt-summet-chat-embed .summet-chat-shell {
    flex: 1;
    min-height: 0;
}

.stt-summet-chat-embed .summet-chat-toolbar-row {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--border-color);
}

.stt-summet-chat-embed .summet-chat-history {
    padding: 8px 10px 16px;
}

.stt-summet-chat-embed .summet-chat-composer-wrap--stt-embed {
    padding: 8px 10px 10px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
}

.stt-panel--embed.stt-panel--doc {
    flex-direction: column;
    background: var(--surface-color);
}

/* URL 탭: 채팅과 동일하게 사이드 패널 안에만 채움 (기본 .stt-panel은 fixed bottom) */
.stt-panel--embed.stt-panel--url {
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: var(--surface-color);
}

.stt-doc-stack {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stt-doc-transcript-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--input-bg);
}

.stt-doc-transcript-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    opacity: 0.92;
}

.stt-doc-body-compact {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 6px 12px 10px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-color);
}

.stt-chat-model-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.stt-chat-model-select {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    cursor: pointer;
}

.stt-chat-attach-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 8px;
    background: var(--input-bg);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.stt-chat-attach-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--stt-radius-sm);
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.stt-chat-attach-btn:hover {
    background: var(--sidebar-active-bg);
    border-color: color-mix(in srgb, var(--primary-color) 30%, var(--border-color));
    color: var(--primary-color);
}

.stt-chat-attach-chip {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: var(--stt-radius-sm);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stt-chat-attach-clear {
    font-size: 11px;
    border: none;
    background: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
}

.stt-panel--embed .stt-panel-head {
    padding: 11px 14px;
    min-height: 46px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.stt-panel--embed .stt-panel-head h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.stt-panel-head-icon {
    display: flex;
    width: 34px;
    height: 34px;
    border-radius: var(--stt-radius-sm);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--sidebar-active-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.stt-panel--embed .stt-panel-head .stt-icon-btn {
    display: none;
}

.stt-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--surface-color);
}

.stt-panel-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    flex: 1;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-panel-body {
    flex: 1;
    overflow: auto;
    padding: 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-color);
}

.stt-chat-log {
    flex: 1;
    overflow: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stt-chat-bubble {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: var(--stt-radius-md);
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.stt-chat-bubble--user {
    align-self: flex-end;
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
    border-radius: var(--stt-radius-md) var(--stt-radius-md) 4px var(--stt-radius-md);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--primary-color) 28%, transparent);
}

.stt-chat-bubble--bot {
    align-self: flex-start;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: var(--stt-radius-md) var(--stt-radius-md) var(--stt-radius-md) 4px;
}

.stt-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 8px 12px 10px;
    background: var(--surface-color);
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
}

.stt-chat-input-row input {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--input-bg);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stt-chat-input-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.stt-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 32%, transparent);
    transition: transform 0.12s ease, filter 0.12s ease;
}

.stt-chat-send:hover {
    transform: scale(1.04);
    filter: brightness(1.05);
}

.stt-gpt-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--stt-shadow-md);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-gpt-banner[data-on='1'] {
    display: flex;
}

.stt-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: stt-spin 0.72s linear infinite;
}

@keyframes stt-spin {
    to {
        transform: rotate(360deg);
    }
}

.stt-gpt-card {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 96px;
    max-height: 45vh;
    overflow: auto;
    background: var(--surface-color);
    border-radius: var(--stt-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--stt-shadow-md);
    z-index: 35;
    padding: 18px;
    display: none;
}

.stt-gpt-card[data-on='1'] {
    display: block;
}

.stt-gpt-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-gpt-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.stt-gpt-card__body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
}

.stt-gpt-card__sources {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.stt-chat-empty-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 22px 16px;
    line-height: 1.55;
    font-weight: 500;
    border-radius: var(--stt-radius-md);
    background: var(--input-bg);
    border: 1px dashed var(--border-color);
    margin: 4px;
}

.stt-loading-screen,
.stt-error-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    text-align: center;
    background: var(--bg-color);
}

.stt-loading-screen .stt-spinner--lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

#stt-screen-loading:not([hidden]),
#stt-screen-error:not([hidden]) {
    flex: 1 1 0;
    min-height: 0;
}

#stt-screen-loading[hidden],
#stt-screen-error[hidden] {
    display: none !important;
}

#stt-screen-app[hidden] {
    display: none !important;
}

#stt-screen-app:not([hidden]) {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

#stt-screen-app:not([hidden]) > .stt-app-shell {
    flex: 1 1 0;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
}

.stt-error-screen p {
    color: var(--text-color);
    max-width: 340px;
    font-size: 15px;
    line-height: 1.55;
}

.stt-loading-screen .stt-loading-text {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.stt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

[data-theme='dark'] .stt-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.stt-modal-overlay[data-open='1'] {
    display: flex;
}

.stt-modal {
    background: var(--surface-color);
    border-radius: var(--stt-radius-lg);
    padding: 22px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow: auto;
    border: 1px solid var(--border-color);
    box-shadow: var(--stt-shadow-md);
}

.stt-modal h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.stt-modal input[type='text'] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--stt-radius-md);
    font-size: 15px;
    margin-bottom: 12px;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stt-modal input[type='text']:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.stt-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 18px;
    flex-wrap: wrap;
}

.stt-btn-primary {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.stt-btn-primary:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    filter: none;
}

.stt-tonal--block {
    width: 100%;
    padding: 12px 14px !important;
    justify-content: center;
}

.stt-tonal--success {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.25);
}

.stt-tonal--success:hover {
    background: #047857 !important;
    border-color: #047857 !important;
    filter: none;
}

.stt-browser-shell {
    position: fixed;
    z-index: 50;
    display: none;
    flex-direction: column;
    background: var(--surface-color);
    border-radius: var(--stt-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--stt-shadow-md);
    overflow: hidden;
    min-width: 280px;
    min-height: 300px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
}

.stt-browser-shell[data-open='1'] {
    display: flex;
    flex-direction: column;
}

.stt-browser-shell.stt-browser-shell--embedded {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    z-index: auto;
    flex: 1;
}

.stt-browser-shell--embedded .stt-browser-resize {
    display: none;
}

.stt-browser-shell--embedded #stt-browser-close {
    display: none;
}

.stt-browser-shell--embedded .stt-browser-titlebar {
    cursor: default;
}

.stt-browser-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.stt-browser-titlebar:active {
    cursor: grabbing;
}

.stt-browser-titlebar input,
.stt-browser-titlebar button {
    cursor: pointer;
}

.stt-browser-title {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.stt-browser-title-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.stt-browser-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--stt-radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease;
}

.stt-browser-icon-btn:hover {
    background: var(--sidebar-hover);
    color: var(--text-color);
}

.stt-browser-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 6px 8px 0;
    background: var(--input-bg);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    flex-shrink: 0;
}

.stt-browser-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
    padding: 8px 10px;
    border-radius: var(--stt-radius-sm) var(--stt-radius-sm) 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stt-browser-tab[data-active='1'] {
    background: var(--surface-color);
    color: var(--text-color);
    border-color: var(--border-color);
    margin-bottom: -1px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--surface-color);
}

.stt-browser-tab-x {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.stt-browser-tab-x:hover {
    background: var(--sidebar-hover);
    color: var(--text-color);
}

.stt-browser-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
    flex-shrink: 0;
}

.stt-browser-toolbar input[type='text'] {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: var(--stt-radius-sm);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-color);
}

.stt-browser-body {
    position: relative;
    flex: 1;
    min-height: 0;
    background: var(--input-bg);
}

.stt-browser-frame {
    position: absolute;
    inset: 0;
    border: none;
    width: 100%;
    height: 100%;
    background: var(--surface-color);
}

.stt-browser-fallback {
    position: absolute;
    inset: 0;
    padding: 20px;
    overflow: auto;
    background: var(--input-bg);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-color);
}

.stt-browser-fallback h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-browser-fallback p {
    margin: 0 0 12px;
    color: var(--text-muted);
}

.stt-browser-fallback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.stt-browser-docked-hint {
    position: absolute;
    inset: 0;
    padding: 20px;
    overflow: auto;
    background: color-mix(in srgb, var(--primary-color) 6%, var(--surface-color));
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-color);
    z-index: 1;
}

.stt-browser-docked-hint h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-browser-docked-hint .stt-browser-docked-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.stt-browser-sidepanel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 88%);
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.06);
    display: none;
    flex-direction: column;
    z-index: 2;
}

[data-theme='dark'] .stt-browser-sidepanel {
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}

.stt-browser-sidepanel[data-open='1'] {
    display: flex;
}

.stt-browser-sidepanel-head {
    padding: 10px 12px;
    font-weight: 600;
    font-size: 12px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
}

.stt-browser-sidepanel-body {
    flex: 1;
    overflow: auto;
    padding: 8px;
    font-size: 13px;
}

.stt-browser-list-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--stt-radius-sm);
    background: var(--surface-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-color);
    transition: border-color 0.12s ease, background 0.12s ease;
}

.stt-browser-list-btn:hover {
    border-color: color-mix(in srgb, var(--primary-color) 28%, var(--border-color));
    background: var(--sidebar-hover);
}

.stt-browser-list-btn small {
    display: block;
    color: var(--text-muted);
    margin-top: 4px;
    word-break: break-all;
}

.stt-browser-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 3;
    background: linear-gradient(
        135deg,
        transparent 50%,
        var(--border-color) 50%,
        var(--border-color) 55%,
        transparent 55%,
        transparent 65%,
        var(--primary-color) 65%,
        var(--primary-color) 70%,
        transparent 70%
    );
    opacity: 0.85;
}

@media (max-width: 960px) {
    .stt-app-shell {
        flex-direction: column;
    }

    .stt-workspace-split {
        flex-direction: column;
        gap: 12px;
    }

    .content-root:has(.live-stt-page) {
        padding: 8px 14px 18px;
    }

    .main-content:has(.live-stt-page) .main-toolbar {
        padding-left: 14px;
        padding-right: 14px;
        border-radius: 0 0 12px 12px;
    }

    body.drawer-collapsed .content-root:has(.live-stt-page) {
        padding-left: var(--drawer-collapsed-pad-x);
        padding-right: 14px;
    }

    body.drawer-collapsed .main-content:has(.live-stt-page) .main-toolbar {
        padding-left: var(--drawer-collapsed-pad-x);
        padding-right: 14px;
    }

    .stt-workspace-frame {
        max-width: none;
    }

    .stt-app-main {
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
    }

    .stt-workspace-side {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: none !important;
        border: 1px solid var(--border-color);
        border-radius: var(--stt-radius-md);
        box-shadow: var(--stt-shadow-md);
        order: 2;
        min-height: min(62vh, 520px);
    }

    [data-theme='dark'] .stt-workspace-side {
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
    }

    .stt-workspace-side.stt-workspace-side--hidden {
        flex: 0 0 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        min-width: 0 !important;
        border-top-width: 0;
        overflow: hidden !important;
    }

    .stt-side-resize-handle {
        display: none;
    }

    .stt-side-drawer-body {
        min-height: 240px;
    }

    .stt-workspace-main {
        padding: 10px 12px 14px;
    }
}

/* URL 탭 — 정돈된 카드형 */
#stt-panel-url {
    padding: 0 14px 14px;
    box-sizing: border-box;
}

.stt-panel--url {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 0;
    min-height: 0;
    flex: 1 1 0;
}

.stt-panel--url .stt-panel-head {
    margin: 0 -14px 0;
    padding-left: 14px;
    padding-right: 14px;
}

.stt-url-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted, #64748b);
    padding: 10px 12px;
    border-radius: var(--stt-radius-md);
    background: var(--stt-surface-muted);
    border: 1px solid color-mix(in srgb, var(--border-color) 85%, transparent);
}

.stt-url-field {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--stt-radius-md);
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface-color);
    color: var(--text-color, #0f172a);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stt-url-field:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.stt-url-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stt-url-actions .stt-tonal {
    flex: 1 1 120px;
    justify-content: center;
    min-height: 40px;
}

.stt-url-result {
    flex: 1 1 auto;
    min-height: 120px;
    max-height: min(48vh, 420px);
    overflow: auto;
    padding: 14px 16px;
    border-radius: var(--stt-radius-md);
    border: 1px solid var(--border-color);
    background: var(--stt-surface-muted);
    font-size: 13px;
    line-height: 1.55;
}

[data-theme='dark'] .stt-url-result {
    background: color-mix(in srgb, var(--surface-color) 92%, var(--input-bg));
}

.stt-url-pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12.5px;
}

.stt-url-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.stt-url-summary {
    margin: 0 0 10px;
    color: var(--text-color);
}

.stt-url-bullets {
    margin: 0 0 10px;
    padding-left: 18px;
}

.stt-url-metrics-h {
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 700;
}

.stt-url-metrics {
    margin: 0;
    padding-left: 18px;
}

.stt-url-caveat {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

.stt-url-error {
    margin: 0;
    color: #b91c1c;
    font-size: 13px;
}

.stt-url-loading {
    margin: 0;
    color: var(--text-muted);
}

/* color-mix() fallback for very old browsers: values degrade gracefully */

/* ——— STT workspace (below page title) ——— */
.stt-session-header {
    flex-shrink: 0;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--stt-surface-muted);
}

.stt-session-header--minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px 12px;
}

.stt-session-header__meta-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.stt-session-header__meta-block .stt-transcript-section__label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--text-color);
}

.stt-session-header__meta-block .stt-transcript-section__meta {
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.stt-session-header--minimal .stt-live-pill {
    flex-shrink: 0;
}

.stt-session-header__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.stt-session-header__lead {
    min-width: 0;
}

.stt-session-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-muted);
}

.stt-session-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.2;
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.stt-session-header__status {
    flex-shrink: 0;
}

.stt-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.stt-live-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 35%, transparent);
    animation: stt-live-pulse 2s ease-in-out infinite;
}

@keyframes stt-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .stt-live-pill__dot {
        animation: none;
    }
}

.stt-session-desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 58ch;
}

.stt-transcript-section {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--stt-surface-muted);
}

.stt-transcript-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--surface-color) 70%, var(--input-bg));
    border-bottom: 1px solid var(--border-color);
}

.stt-transcript-section__label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-transcript-section__meta {
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.stt-mic-dock {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 10px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--surface-color) 0%, var(--stt-surface-muted) 100%);
}

.stt-insight-stack {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 14px 12px;
    background: var(--stt-surface-muted);
    border-bottom: 1px solid var(--border-color);
    max-height: min(48vh, 380px);
    overflow: auto;
}

.stt-insight-card {
    border-radius: var(--stt-radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.stt-insight-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.stt-insight-card__head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.stt-insight-copy {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.stt-insight-copy:hover {
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color));
    color: var(--primary-color);
    background: var(--sidebar-active-bg);
}

.stt-insight-card__body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-color);
}

.stt-insight-keypoints {
    margin: 0;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-color);
}

.stt-insight-keypoints li {
    margin-bottom: 6px;
}

.stt-insight-keypoints li:last-child {
    margin-bottom: 0;
}

/* 화자별 발언 요약 — 녹음(마이크) 도크 아래 별도 박스 */
.stt-stance-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: min(36vh, 320px);
    min-height: 120px;
    margin: 10px 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--stt-radius-md);
    background: var(--surface-color);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

[data-theme='dark'] .stt-stance-section {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.stt-stance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--stt-surface-muted) 55%, var(--surface-color));
    border-radius: var(--stt-radius-md) var(--stt-radius-md) 0 0;
}

.stt-stance-head-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stt-stance-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-color);
}

.stt-stance-model {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.stt-stance-refresh {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
}

.stt-stance-body-wrap {
    flex: 1 1 0;
    min-height: 0;
    position: relative;
    padding: 10px 14px 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stt-stance-placeholder {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.stt-stance-loading {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.stt-stance-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-color);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.stt-stance-body::-webkit-scrollbar {
    width: 6px;
}

.stt-stance-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* .stt-chip-sp — round avatars (see .stt-sp-badge above) */

@media (max-width: 768px) {
    .main-content:has(.live-stt-page) .main-toolbar {
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
    }
    .main-content:has(.live-stt-page) .main-toolbar .app-page-title {
        font-size: 1rem;
        white-space: nowrap;
    }
    .main-content:has(.live-stt-page) .main-toolbar__cluster {
        flex-wrap: nowrap;
        gap: 4px;
    }
    .main-content:has(.live-stt-page) .main-toolbar__cluster .lang-dd {
        min-width: 0;
        display: none;
    }
    .main-toolbar .stt-topbar-actions--toolbar .stt-icon-btn {
        width: 30px;
        height: 30px;
    }
    .main-toolbar .stt-topbar-actions--toolbar .stt-icon-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .content-root:has(.live-stt-page) { padding: 4px 6px 12px; }
    body.drawer-collapsed .content-root:has(.live-stt-page) { padding-left: 6px; padding-right: 6px; }
    .stt-workspace-main { padding: 6px 8px 10px; }
    .stt-workspace-side { min-height: min(50vh, 360px); }
    .stt-side-drawer-body { min-height: 180px; }
    .stt-main-toolbar-tools { gap: 2px; flex-wrap: nowrap; margin-right: 2px; }
    .main-toolbar .stt-topbar-actions--toolbar { padding: 1px 2px; }
    .main-toolbar .stt-topbar-actions--toolbar .stt-icon-btn { width: 28px; height: 28px; }
    .main-toolbar .stt-topbar-actions--toolbar .stt-icon-btn svg { width: 15px; height: 15px; }
    .stt-icon-btn { width: 32px; height: 32px; border-radius: 8px; }
    .stt-icon-btn svg { width: 16px; height: 16px; }
    .stt-mic-dock { padding: 8px; }
    .stt-mic-btn { width: 48px; height: 48px; }
    .stt-segment { padding: 8px 10px; border-radius: 10px; }
    .stt-segment-text { font-size: 13px; }
    .stt-session-header { padding: 10px 12px; }
    .stt-side-tabs { padding: 6px 8px; gap: 2px; }
    .stt-side-tab { padding: 6px 10px; font-size: 12px; }
    .stt-panel-head { font-size: 12px; padding: 8px 10px; }
}
