/* ============================================================
   语音转文字/文字转语音 工具专属样式
   导航、页脚、按钮基础样式由 ../../style.css 提供
   ============================================================ */

/* ===== 页面头部 ===== */
.tool-header {
    padding: 140px 0 48px;
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 100%);
}
.tool-header .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: wrap;
}
.tool-header .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.tool-header .breadcrumb a:hover { text-decoration: underline; }
.tool-header h1 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    color: var(--text);
    margin-bottom: 14px;
}
.tool-header > .container > p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
    max-width: 760px;
}
.tool-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.tbadge {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 100px;
}
.tbadge-blue   { background: #e8f1ff; color: #1a6eff; }
.tbadge-green  { background: #f0fdf4; color: #16a34a; }
.tbadge-orange { background: #fff3ed; color: #ff6b35; }
.tbadge-purple { background: #f5f3ff; color: #7c3aed; }

/* ===== 主体 ===== */
.tool-main { padding: 40px 0 80px; background: var(--bg-warm); }

/* ===== Tab 切换 ===== */
.tab-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    background: white;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    width: fit-content;
    max-width: 100%;
}
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.tab-btn .tab-en {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    background: var(--bg-warm);
    padding: 2px 8px;
    border-radius: 100px;
}
.tab-btn:hover { color: var(--primary); background: var(--primary-light); }
.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(26, 110, 255, 0.3);
}
.tab-btn.active .tab-en { background: rgba(255,255,255,0.2); color: white; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 通用面板卡片 ===== */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.panel-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
}
.panel-card-title .dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}
.panel-card-title .dot-green  { background: var(--success); }
.panel-card-title .dot-orange { background: #ff6b35; }

/* ===== STT 布局 ===== */
.stt-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
}

/* 引擎状态 */
.engine-status {
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
}
.es-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}
.es-label { color: var(--text-light); }
.es-value { font-weight: 600; color: var(--text); }
.es-value.ok   { color: var(--success); }
.es-value.warn { color: #f59e0b; }
.es-value.bad  { color: var(--danger); }

/* 录音按钮区 */
.record-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 16px;
}
.record-btn {
    position: relative;
    width: 88px; height: 88px;
    border: none;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(26, 110, 255, 0.35);
    transition: var(--transition);
}
.record-btn:hover { transform: scale(1.05); }
.record-btn-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(26, 110, 255, 0.35);
    opacity: 0;
}
.record-btn.recording {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 8px 28px rgba(220, 38, 38, 0.4);
}
.record-btn.recording .record-btn-ring {
    opacity: 1;
    animation: ringPulse 1.4s ease-out infinite;
}
@keyframes ringPulse {
    0%   { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1.5); opacity: 0; }
}
.record-state {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
.record-btn.recording ~ .record-state { color: var(--danger); }
.record-timer {
    margin-top: 6px;
    font-size: 24px;
    font-weight: 900;
    font-family: monospace;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* 音浪 */
.wave-box {
    position: relative;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 20px;
}
.wave-box canvas { display: block; width: 100%; }
.wave-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-light);
    pointer-events: none;
}

/* 设置项 */
.setting-group { margin-bottom: 16px; }
.setting-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.setting-label em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-light); }
.setting-select, .setting-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: white;
    transition: var(--transition);
}
.setting-select:focus, .setting-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 110, 255, 0.12);
}
.setting-input { margin-bottom: 8px; }
.setting-tip {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.7;
    margin-top: 6px;
}
.setting-row { padding: 6px 0; }

/* 开关 */
.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    user-select: none;
}
.switch-label input { display: none; }
.switch-slider {
    width: 40px; height: 22px;
    background: var(--border);
    border-radius: 100px;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}
.switch-slider::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: var(--transition);
}
.switch-label input:checked + .switch-slider { background: var(--primary); }
.switch-label input:checked + .switch-slider::after { left: 21px; }
.switch-text { line-height: 1.4; }
.switch-text em { display: block; font-style: normal; font-size: 11px; color: var(--text-light); }

/* 云端转写 */
.cloud-box {
    margin-top: 8px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: hidden;
}
.cloud-box summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: var(--transition);
}
.cloud-box summary::-webkit-details-marker { display: none; }
.cloud-box summary:hover { color: var(--primary); background: var(--primary-light); }
.cloud-inner { padding: 0 16px 16px; }
.cloud-tip { font-size: 12px; color: var(--text-light); line-height: 1.8; margin-bottom: 12px; }
.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    margin-bottom: 12px;
}
.file-drop:hover, .file-drop.dragover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.cloud-progress { margin-top: 12px; }
.cp-bar {
    height: 6px;
    background: var(--bg-warm);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 6px;
}
.cp-fill {
    height: 100%;
    width: 0;
    background: var(--primary-gradient);
    border-radius: 100px;
    transition: width 0.3s ease;
}
.cloud-progress span { font-size: 12px; color: var(--text-light); }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-block { width: 100%; }
.btn-cloud {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(26, 110, 255, 0.3);
}
.btn-cloud:hover:not(:disabled) { transform: translateY(-2px); }
.btn-cloud:disabled { opacity: 0.45; cursor: not-allowed; }

/* ===== 结果区 ===== */
.result-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.result-toolbar .panel-card-title { margin-bottom: 0; flex-wrap: wrap; }
.result-stats {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-left: 6px;
}
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.tbtn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.tbtn-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

.result-box {
    position: relative;
    min-height: 420px;
    max-height: 560px;
    overflow-y: auto;
    background: var(--bg-warm);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
}
.result-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}
.result-empty.hidden { display: none; }
.result-content {
    font-size: 15px;
    line-height: 2;
    color: var(--text);
    outline: none;
    min-height: 100px;
    white-space: pre-wrap;
    word-break: break-word;
}
.result-content:empty::before {
    content: attr(data-placeholder);
    color: var(--text-light);
}
.result-content .seg { display: inline; }
.result-content .seg.interim { color: var(--text-light); }
.result-content .interim-block {
    color: var(--text-light);
}
.result-content .kw {
    background: var(--danger-light);
    color: var(--danger);
    font-weight: 700;
    border-radius: 4px;
    padding: 0 3px;
}
.result-content .seg-time {
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
    margin-right: 6px;
    user-select: none;
}
.result-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
    line-height: 1.7;
}

/* ===== TTS 布局 ===== */
.tts-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 20px;
    align-items: start;
}
.tts-left { display: flex; flex-direction: column; gap: 20px; }

.tts-textarea {
    width: 100%;
    min-height: 200px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    background: white;
    resize: vertical;
    transition: var(--transition);
}
.tts-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 110, 255, 0.12);
}
.tts-text-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}
.tts-text-meta span { flex: 1; }

.voice-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 10px;
    border-radius: 100px;
}

/* 滑杆 */
.slider-group { display: flex; flex-direction: column; gap: 18px; margin: 8px 0 14px; }
.slider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.slider-name { font-size: 13px; font-weight: 600; color: var(--text); }
.slider-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    font-family: monospace;
    background: var(--primary-light);
    padding: 2px 10px;
    border-radius: 6px;
}
.slider-row input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-warm);
    border-radius: 100px;
    outline: none;
    cursor: pointer;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: white;
    border: 5px solid var(--primary);
    box-shadow: 0 2px 8px rgba(26, 110, 255, 0.35);
    cursor: grab;
    transition: transform 0.15s;
}
.slider-row input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider-row input[type="range"]::-moz-range-thumb {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: white;
    border: 5px solid var(--primary);
    box-shadow: 0 2px 8px rgba(26, 110, 255, 0.35);
    cursor: grab;
}
.slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* TTS 右栏 */
.tts-progress-zone { margin-bottom: 18px; }
.tts-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}
.tts-progress-bar {
    height: 8px;
    background: var(--bg-warm);
    border-radius: 100px;
    overflow: hidden;
}
.tts-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff6b35, #ff4757);
    border-radius: 100px;
    transition: width 0.4s ease;
}

.tts-play-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 12px 0 22px;
}
.play-btn {
    width: 76px; height: 76px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #ff4757 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(255, 107, 53, 0.35);
    transition: var(--transition);
}
.play-btn:hover { transform: scale(1.06); }
.stop-btn {
    width: 48px; height: 48px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.stop-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

.tts-queue {
    max-height: 260px;
    overflow-y: auto;
    background: var(--bg-warm);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tts-queue-empty {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    padding: 28px 0;
}
.queue-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.queue-item:hover { border-color: rgba(26, 110, 255, 0.3); }
.queue-item .qi-num {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 6px;
    background: var(--bg-warm);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
}
.queue-item.done { opacity: 0.5; }
.queue-item.done .qi-num { background: #f0fdf4; color: var(--success); }
.queue-item.speaking {
    border-color: #ff6b35;
    background: #fff3ed;
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}
.queue-item.speaking .qi-num { background: linear-gradient(135deg, #ff6b35, #ff4757); color: white; }

.tts-tips h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.tts-tips ul { list-style: none; }
.tts-tips li {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.8;
    padding-left: 16px;
    position: relative;
}
.tts-tips li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 5px; height: 5px;
    background: #ff6b35;
    border-radius: 50%;
}

/* ===== 隐私说明条 ===== */
.privacy-banner {
    margin-top: 32px;
    background: linear-gradient(135deg, #e8f1ff 0%, #f0f5ff 100%);
    border: 1.5px solid rgba(26, 110, 255, 0.15);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.privacy-icon {
    width: 42px; height: 42px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.privacy-icon svg { width: 22px; height: 22px; color: white; }
.privacy-banner h4 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.privacy-banner p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin: 0; }

/* ===== 场景卡片 ===== */
.scene-cards {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.scene-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.scene-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(26, 110, 255, 0.2);
}
.sc-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.scene-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.scene-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin: 0; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text);
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 100px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
    max-width: calc(100vw - 40px);
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   响应式 · 与官网断点保持一致
   ============================================================ */
@media (max-width: 1024px) {
    /* 页脚：与官网首页内联样式一致 —— 1024px 两列 */
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stt-grid { grid-template-columns: 1fr; }
    .tts-grid { grid-template-columns: 1fr; }
    .tts-right { order: -1; }
    .scene-cards { grid-template-columns: 1fr; }
    .result-box { min-height: 320px; max-height: 480px; }
}

@media (max-width: 768px) {
    /* 顶部导航：照抄官网汉堡菜单规则（.navbar 等样式由 style.css 提供） */
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        gap: 4px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }

    /* 页脚：与官网首页内联样式一致 —— 768px 单列 */
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    .tool-header { padding: 112px 0 32px; }
    .tool-header > .container > p { font-size: 14px; }
    .tool-main { padding: 24px 0 56px; }

    .tab-bar {
        width: 100%;
        padding: 6px;
        gap: 6px;
    }
    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 11px 8px;
        font-size: 13px;
    }
    .tab-btn .tab-en { display: none; }

    .panel-card { padding: 18px 16px; }
    .record-btn { width: 76px; height: 76px; }
    .record-timer { font-size: 20px; }

    .result-toolbar { flex-direction: column; }
    .result-actions { width: 100%; }
    .result-actions .tbtn { flex: 1; justify-content: center; }
    .result-box { min-height: 260px; max-height: 420px; padding: 14px; }
    .result-content { font-size: 14px; line-height: 1.9; }

    .tts-play-zone { padding: 4px 0 16px; }
    .play-btn { width: 66px; height: 66px; }
    .tts-queue { max-height: 200px; }

    .privacy-banner { flex-direction: column; padding: 18px; }
    .toast { bottom: 20px; font-size: 13px; padding: 10px 18px; }
}

@media (max-width: 480px) {
    .tab-btn { font-size: 12px; }
    .tab-btn svg { width: 15px; height: 15px; }
    .record-btn { width: 68px; height: 68px; }
    .tool-badges .tbadge { font-size: 11px; padding: 4px 10px; }
    .tbtn { font-size: 11px; padding: 6px 10px; }
}

/* ===== 音色搜索与列表 ===== */
.voice-filter-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 8px;
    margin-bottom: 10px;
}
.voice-filter-row .setting-input { margin-bottom: 0; }
.voice-filter-row .setting-select { padding: 10px 10px; font-size: 13px; }
.voice-list {
    max-height: 230px;
    overflow-y: auto;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-warm);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.voice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.voice-item:hover { border-color: rgba(26, 110, 255, 0.35); }
.voice-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(26, 110, 255, 0.12);
}
.vi-info { flex: 1; min-width: 0; }
.vi-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vi-info span {
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
}
.vi-test {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.vi-test:hover { background: var(--primary-light); border-color: var(--primary); transform: scale(1.08); }
.voice-empty {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    padding: 20px 0;
}

/* ===== 云端 TTS 结果 ===== */
.cloud-audio-box {
    margin-top: 14px;
    padding: 14px;
    background: var(--bg-warm);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
}
.cloud-audio-box audio {
    width: 100%;
    display: block;
    border-radius: 8px;
}
.cloud-tip code {
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== 新增元素移动端适配 ===== */
@media (max-width: 480px) {
    .voice-filter-row { grid-template-columns: 1fr; }
    .voice-list { max-height: 190px; }
}
