/* Gist — AI Interpreter
   Portrait-first, split-screen layout */

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

:root {
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --blue-bg: rgba(59, 130, 246, 0.08);
    --green: #22c55e;
    --green-dark: #16a34a;
    --green-bg: rgba(34, 197, 94, 0.08);
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #334155;
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --danger: #ef4444;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

html, body {
    height: 100%;
    height: 100dvh; /* fills actual viewport in standalone/PWA mode */
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

#app {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* Standalone PWA mode — mic buttons flush to bottom edge */
@media (display-mode: standalone) {
    html, body {
        height: 100dvh;
    }
}

.hidden {
    display: none !important;
}

/* ========== MAIN SCREEN ========== */

#main-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-top);
    /* No padding-bottom — mic buttons extend into safe area */
}

/* ========== TOP BAR ========== */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-2);
    flex-shrink: 0;
    min-height: 44px;
}

.top-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.top-btn:active {
    background: var(--surface-2);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========== STATUS BAR ========== */

.status-bar {
    padding: 6px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s, padding 0.2s;
    background: var(--surface);
    color: var(--text-muted);
    border-bottom: 1px solid var(--surface-2);
}

.status-bar.idle {
    /* Subtle persistent state */
}

.status-bar.recording {
    background: var(--danger);
    color: white;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 15px;
    border-bottom-color: var(--danger);
}

.status-bar.recording:active {
    background: #b91c1c;
}

.status-bar.processing {
    background: var(--blue);
    color: white;
    padding: 8px 16px;
    font-size: 15px;
    animation: processingPulse 2s ease-in-out infinite;
    border-bottom-color: var(--blue);
}

@keyframes processingPulse {
    0%, 100% { background: var(--blue); }
    50% { background: var(--blue-dark); }
}

.status-bar.error {
    background: #7f1d1d;
    color: #fca5a5;
    border-bottom-color: #7f1d1d;
}

.status-bar.retryable {
    cursor: pointer;
    padding: 8px 16px;
    font-size: 15px;
}

.status-bar.retryable:active {
    background: #991b1b;
}

/* ========== LANGUAGE PANELS (bottom two thirds) ========== */

.panels {
    flex: 2;
    display: flex;
    min-height: 0;
    border-top: 1px solid var(--surface-2);
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.panel-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 8px;
    background: var(--surface);
    flex-shrink: 0;
    border-bottom: 1px solid var(--surface-2);
}

.panel-flag {
    font-size: 20px;
    line-height: 1;
}

.panel-lang {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-them .panel-lang { color: var(--green); }
.panel-you .panel-lang { color: var(--blue); }

.panel-header-tap {
    cursor: pointer;
    gap: 6px;
    transition: background 0.15s;
}

.panel-header-tap:active {
    background: var(--surface-2);
}

.lang-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* English panel: flag after text */
.panel-you .panel-header {
    gap: 6px;
}

/* Divider */
.divider {
    width: 2px;
    background: var(--surface-2);
    flex-shrink: 0;
}

/* ========== CHAT AREA ========== */

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.empty-hint {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 16px 8px;
}

/* ========== CHAT BUBBLES ========== */

.bubble {
    padding: 8px 10px;
    border-radius: 10px;
    animation: fadeIn 0.2s ease;
    max-width: 100%;
    font-size: 15px;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Target language panel bubbles (left — them) */
.panel-them .bubble.outgoing {
    background: var(--green-dark);
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.panel-them .bubble.incoming {
    background: var(--surface);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

/* English panel bubbles (right — you) */
.panel-you .bubble.outgoing {
    background: var(--blue);
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.panel-you .bubble.incoming {
    background: var(--surface);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

/* Bubble content */
.bubble .original {
    font-size: 15px;
    font-weight: 500;
}

.bubble .translation {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.bubble .literal {
    font-size: 15px;
    font-style: italic;
    color: rgba(255,255,255,0.85);
}

.bubble .literal::before,
.bubble .literal::after {
    content: '"';
    color: rgba(255,255,255,0.5);
}

.bubble .interpreted {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
}

.bubble .cultural-note {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 3px;
    font-style: italic;
}

.bubble .meta {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-top: 3px;
    text-align: right;
}

/* Exchange linking badges */
.exchange-badge {
    display: inline-block;
    float: right;
    margin-left: 6px;
    margin-top: 1px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    min-width: 16px;
    text-align: center;
    padding: 0 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.4);
}

.bubble-highlight {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 1px;
    animation: highlightPulse 1.5s ease-out;
}

@keyframes highlightPulse {
    0% { outline-color: rgba(255, 255, 255, 0.8); }
    100% { outline-color: rgba(255, 255, 255, 0); }
}

/* Context note bubble (legacy) */
.bubble.context-note {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--surface-2);
    align-self: center;
    font-size: 13px;
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    padding: 4px 10px;
}

/* Interpreter framing — context briefing (absorbed silently) */
.bubble.context-briefing {
    background: rgba(59, 130, 246, 0.06);
    border: 1px dashed rgba(59, 130, 246, 0.25);
    opacity: 0.7;
}

.bubble.context-briefing .original {
    color: var(--text-dim);
    font-style: italic;
}

/* Interpreter framing — instruction to interpreter */
.bubble.interpreter-instruction {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    opacity: 0.8;
}

.bubble.interpreter-instruction .original {
    color: var(--text-dim);
}

/* Label for context/instruction bubbles */
.briefing-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--blue);
    opacity: 0.6;
    margin-bottom: 3px;
}

/* TTS speaker button */
.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    float: right;
    margin-top: 4px;
    margin-left: 6px;
    transition: color 0.15s, background 0.15s;
}

.tts-btn:active {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
}

/* ========== MIC BUTTONS ========== */

.mic-btn {
    width: 100%;
    height: calc(56px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
}

.mic-icon-svg {
    flex-shrink: 0;
}

.mic-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mic-you {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.mic-you:active, .mic-you.recording {
    background: var(--blue);
    color: white;
}

.mic-them {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
    border-top: 1px solid rgba(34, 197, 94, 0.2);
}

.mic-them:active, .mic-them.recording {
    background: var(--green);
    color: white;
}

.mic-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.mic-btn.recording .mic-label {
    animation: pulse 1s ease-in-out infinite;
}

/* ========== CONVERSATIONS SIDEBAR ========== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: opacity 0.2s;
}

.side-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-2);
    font-size: 16px;
    font-weight: 700;
    padding-top: calc(12px + var(--safe-top));
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.conversation-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--surface-2);
    cursor: pointer;
    transition: background 0.15s;
}

.conversation-item:active {
    background: var(--surface);
}

.conversation-item.active {
    background: var(--surface);
    border-left: 3px solid var(--blue);
}

.conversation-item .conv-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.conversation-item .conv-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.conversation-item .conv-preview {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== LANGUAGE PICKER ========== */

.lang-picker-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 16px 0 calc(16px + var(--safe-bottom));
    animation: slideUp 0.2s ease;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.lang-picker-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--surface-2);
}

.lang-picker-list {
    display: flex;
    flex-direction: column;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text);
    font-family: inherit;
}

.lang-option:active {
    background: var(--surface);
}

.lang-option.active {
    background: var(--surface);
}

.lang-option-flag {
    font-size: 28px;
    line-height: 1;
    width: 36px;
    text-align: center;
}

.lang-option-name {
    font-size: 16px;
    font-weight: 600;
}

.lang-option-native {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 1px;
}

.lang-option-check {
    margin-left: auto;
    color: var(--green);
    font-size: 18px;
}

/* ========== SIDEBAR FOOTER (Settings link) ========== */

.side-panel-footer {
    border-top: 1px solid var(--surface-2);
    padding: 10px 16px calc(10px + var(--safe-bottom));
    flex-shrink: 0;
}

.settings-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 4px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.settings-link:active {
    background: var(--surface);
}

/* ========== SETTINGS PANEL ========== */

.settings-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.2s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-2);
    font-size: 16px;
    font-weight: 700;
    padding-top: calc(12px + var(--safe-top));
}

.settings-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.settings-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 20px 20px 8px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--surface-2);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    font-family: inherit;
    color: var(--text);
    cursor: default;
    text-align: left;
}

button.settings-item {
    cursor: pointer;
    transition: background 0.15s;
}

button.settings-item:active {
    background: var(--surface);
}

.settings-item-left {
    flex: 1;
    min-width: 0;
}

.settings-item-label {
    font-size: 15px;
    font-weight: 500;
}

.settings-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-item-value {
    font-size: 14px;
    color: var(--text-dim);
    flex-shrink: 0;
    margin-left: 12px;
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 12px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface-2);
    border-radius: 12px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-dim);
    top: 3px;
    left: 3px;
    transition: transform 0.2s, background 0.2s;
}

.toggle input:checked + .toggle-slider {
    background: var(--green);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

/* About section */
.settings-about {
    padding: 24px 20px;
    text-align: center;
}

.settings-about-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-about-tagline {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
    font-style: italic;
}

.settings-about-version {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    font-family: monospace;
}

.settings-about-credit {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== WTP SURVEY ========== */

.wtp-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 24px 24px calc(24px + var(--safe-bottom));
    animation: slideUp 0.3s ease;
    text-align: center;
}

.wtp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wtp-close:active {
    background: var(--surface-2);
}

.wtp-emoji {
    font-size: 36px;
    margin-bottom: 8px;
}

.wtp-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.wtp-question {
    font-size: 15px;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.4;
}

.wtp-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wtp-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.wtp-yes {
    background: var(--green);
    color: white;
}

.wtp-yes:active {
    background: var(--green-dark);
}

.wtp-maybe {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--surface-2);
}

.wtp-maybe:active {
    background: var(--surface-2);
}

.wtp-no {
    background: var(--surface);
    color: var(--text-dim);
    border: 1px solid var(--surface-2);
}

.wtp-no:active {
    background: var(--surface-2);
}

.wtp-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 16px;
}

.wtp-thanks {
    padding: 32px 24px;
    text-align: center;
}

.wtp-thanks-emoji {
    font-size: 36px;
    margin-bottom: 8px;
}

.wtp-thanks-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* ========== AUTH OVERLAY ========== */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: calc(20px + var(--safe-top));
    padding-bottom: calc(20px + var(--safe-bottom));
}

.auth-card {
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.auth-logo {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.auth-tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.auth-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-instruction {
    font-size: 15px;
    color: var(--text-dim);
}

.auth-email-display {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-top: -4px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.auth-input:focus {
    border-color: var(--blue);
}

.auth-input::placeholder {
    color: var(--text-muted);
}

.auth-code-input {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 6px;
    font-family: monospace;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
}

.auth-btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.auth-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-link {
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: 8px;
}

.auth-btn-link:active {
    color: var(--text-dim);
}

.auth-error {
    font-size: 13px;
    color: var(--danger);
    margin-top: -4px;
}

.auth-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ========== ZOOM OVERLAY (tap to enlarge) ========== */

#zoom-overlay {
    background: rgba(0, 0, 0, 0.88);
    -webkit-user-select: none;
    user-select: none;
}

.zoom-sheet {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    padding-top: calc(32px + var(--safe-top));
    padding-bottom: calc(32px + var(--safe-bottom));
}

.zoom-text {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    color: white;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    word-break: break-word;
}

.zoom-tts {
    margin-top: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.zoom-tts:active {
    background: rgba(255, 255, 255, 0.3);
}
