/* Общая тема приложения и публичной страницы. Геометрия Telegram safe-area остаётся в style.css. */
:root {
  --bg: #f5f7fb;
  --card: #fff;
  --text: #24344c;
  --muted: #748399;
  --accent: #45658e;
  --accent-2: #7593bb;
  --blue-soft: #edf3fb;
  --blue-border: #d9e4f2;
  --line: #e5ebf4;
  --radius: 18px;
  --shadow: 0 4px 14px rgba(30,50,80,.045);
}
.app-page #root { min-width: 0; width: 100%; }
.app-page .app { padding: 16px 7px 20px; }
.app-page .header { gap: 12px; margin: 4px 2px 18px; }
.app-page .header > div:last-child { min-width: 0; }
.app-page .logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px; background: var(--blue-soft); color: var(--accent); border: 1px solid var(--blue-border); font-size: 16px; }
.app-page .title { font-size: 19px; line-height: 1.35; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.app-page .subtitle { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.app-page .card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 8px; box-shadow: var(--shadow); backdrop-filter: none; }
.app-page .field-label, .app-page .setting-row.language-field label, .app-page .section-label {
  font-size: 11px; line-height: 1.5; letter-spacing: .055em; text-transform: uppercase; font-weight: 600; color: #66778e;
}
.app-page .setting-row.language-field { margin-top: 20px; margin-bottom: 20px; }
.app-page textarea, .app-page input[type="text"], .app-page input[type="search"], .app-page .setting-row select {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background-color: #f8fafc !important; color: var(--text) !important; caret-color: var(--accent) !important;
  font-family: inherit; font-size: 16px; line-height: 1.5; box-shadow: none; min-width: 0;
}
.app-page .setting-row select { padding-right: 38px; min-height: 48px; margin-top: 9px; }
.app-page textarea:focus, .app-page input[type="text"]:focus, .app-page input[type="search"]:focus, .app-page select:focus {
  border-color: #7eace6; box-shadow: 0 0 0 3px rgba(40,120,212,.1); -webkit-text-fill-color: var(--text) !important;
}
.app-page textarea::placeholder, .app-page input::placeholder { color: #8795a8; opacity: 1; }
.app-page #ttsText { margin-top: 0; padding-bottom: 52px !important; min-height: 210px; }
.app-page #clearTextBtn { width: auto !important; min-height: 34px; bottom: 10px !important; right: 10px !important; padding: 7px 10px !important; background: var(--blue-soft) !important; border: 1px solid var(--blue-border) !important; border-radius: 8px; color: var(--accent) !important; font-size: 12px; }
.app-page .char-counter { margin-top: 6px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.app-page #recordBtn, .app-page #fileBtn, .app-page #uploadVoiceBtn,
.app-page .btn, .app-page .plan-button, .app-page .plan-btn {
  min-height: 46px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent;
  background: #e8eff9; color: var(--accent); border-color: var(--blue-border); font-size: 14px; font-weight: 600; box-shadow: none; transform: none;
}
.app-page button:disabled { opacity: .5; cursor: not-allowed; }
.app-page button:focus-visible, .app-page summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-page .btn.ghost { background: var(--blue-soft); color: var(--accent); border-color: var(--blue-border); }
.app-page .settings-block { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; box-shadow: none; backdrop-filter: none; }
.app-page .slider-row { margin-top: 12px; gap: 4px; }
.app-page .slider-row:first-child { margin-top: 0; }
.app-page .slider-label { color: #526176; font-size: 13px; align-items: center; gap: 6px; }
.app-page .info-circle-btn { color: #8297b3; background: transparent; }
.app-page .slider-line { gap: 12px; min-height: 32px; }
.app-page .slider-line input[type="range"] { min-width: 0; height: 28px; }
.app-page .val { flex: 0 0 44px; padding: 6px 2px; border-radius: 8px; background: #fff; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.app-page .cs-control { min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; box-shadow: none; }
.app-page .cs-placeholder { color: var(--text); font-size: 14px; }
.app-page .cs-placeholder.empty { color: #8795a8; }
.app-page .cs-caret { color: var(--accent); }
.app-page .cs-dropdown { border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(30,50,80,.12); background: #fff; }
.app-page .cs-filter-btn { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: #63758c; background: #f8fafc; }
.app-page .cs-filter-btn.active { background: var(--blue-soft); color: var(--accent); border-color: var(--blue-border); }
.app-page .cs-optgroup-label { color: #748399; font-size: 11px; letter-spacing: .04em; }
.app-page .clone-tabs { padding: 4px; margin-bottom: 18px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f5f7fb; }
.app-page .clone-tab { min-height: 42px; padding: 11px 8px; font-size: 13px; border-radius: 9px; color: var(--muted); border: 0; }
.app-page .clone-tab.active { color: var(--accent); background: #fff; box-shadow: 0 2px 6px rgba(30,50,80,.06); }
.app-page .upload-section { display: flex; flex-direction: column; gap: 12px; }
.app-page .upload-section .btn { margin-top: 0; }
.app-page .user-voices-section > .title { margin: 0 0 14px !important; font-size: 16px; }
.app-page #userVoicesList .voice-card { padding: 14px !important; gap: 12px !important; border-radius: 16px !important; background: #fff !important; border: 1px solid var(--line); box-shadow: none; align-items: stretch; }
.app-page #userVoicesList .voice-name { min-width: 0; white-space: normal !important; overflow-wrap: anywhere; font-size: 15px !important; font-weight: 600 !important; }
.app-page #userVoicesList .voice-card > div:first-child { gap: 10px; }
.app-page #userVoicesList .voice-card > div:first-child > div:last-child { flex-shrink: 0; }
.app-page #userVoicesList .rename-btn, .app-page #userVoicesList .delete-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.app-page #userVoicesList .rename-btn { color: var(--accent); background: var(--blue-soft); }
.app-page #userVoicesList .delete-btn { color: #b96a65; background: #fff3f2; }
.app-page #userVoicesList button .material-symbols-outlined { font-size: 19px; }
.app-page .voice-language-row { padding: 0; }
.app-page .voice-language-badge:not(.is-unknown) { color: var(--accent); border-color: var(--blue-border); background: var(--blue-soft); }
.app-page .transcript-editor { width: 100%; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; color: #63758c; }
.app-page .transcript-editor summary { color: var(--accent); font-weight: 500; padding: 5px 0; }
.app-page .transcript-editor p { line-height: 1.6; }
.app-page .transcript-editor .btn { margin-top: 12px; }
.app-page .transcript-editor [role="status"] { margin-top: 8px; line-height: 1.5; }
.app-page .variant-panel { border-color: var(--blue-border); background: #f8faff; border-radius: 14px; padding: 16px; }
.app-page .variant-counter, .app-page .variant-random { color: var(--accent); background: var(--blue-soft); }
.app-page .profile-card { gap: 0; overflow: hidden; }
.app-page .profile-user-block { padding: 20px 16px; gap: 14px; border-color: var(--line); }
.app-page .profile-user-block img { width: 60px; height: 60px; border: 2px solid var(--blue-border); background: var(--blue-soft); }
.app-page .profile-user-text { min-width: 0; overflow-wrap: anywhere; }
.app-page .profile-name { font-size: 19px; color: var(--text); }
.app-page .profile-username { font-size: 13px; color: var(--muted); }
.app-page .profile-section { padding: 18px 16px; border-color: var(--line); }
.app-page .tariff-section { background: #f8fafc; }
.app-page .section-label { margin-bottom: 12px; }
.app-page .tariff-header .section-label { margin-bottom: 0; }
.app-page #profilePlan { padding: 5px 9px; border-radius: 8px; color: var(--accent); background: var(--blue-soft); }
.app-page .resources-block { gap: 10px; }
.app-page .resource-item { padding: 14px 10px; border-color: var(--line); border-radius: 12px; }
.app-page .resource-label { color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.app-page .resource-value { color: var(--accent); font-size: 22px; }
.app-page .expires-block { border: 1px solid #f2e6c4; background: #fffaf0; border-radius: 10px; font-weight: 400; font-size: 12px; }
.app-page .expires-block:empty, .app-page .inline-msg-container:empty { display: none; }
.app-page .info-item { gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.app-page .item-label, .app-page .item-value { font-size: 13px; }
.app-page .plan-card { border: 1px solid var(--line); border-radius: 14px; box-shadow: none; padding: 16px; background: #f8fafc; }
.app-page .plan-header, .app-page .plan-features { width: 100%; }
.app-page .plan-price, .app-page .feature-value { color: var(--text); }
.app-page .carousel-dot.active { background: var(--accent); }
.app-page .bottom-nav { box-shadow: 0 -4px 16px rgba(30,50,80,.04); }
.app-page .bottom-nav .nav-btn.active { color: var(--accent); background: var(--blue-soft); }
.app-page #infoModal .modal-content, .app-popup { max-width: 420px; width: calc(100% - 32px); min-width: 0 !important; padding: 22px !important; border: 1px solid var(--line); border-radius: 18px !important; color: var(--text); box-shadow: 0 16px 48px rgba(30,50,80,.15); }
.app-popup-overlay { background: rgba(24,42,67,.35) !important; padding: 16px; }
.app-popup { overflow-wrap: anywhere; }
.app-popup button { min-height: 42px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--blue-soft); color: var(--accent); font-size: 14px; }
.app-page #infoModal p { color: #63758c; line-height: 1.65; }
.app-page .audio-pagination button { min-height: 44px; border-radius: 12px !important; background: var(--blue-soft) !important; color: var(--accent) !important; border: 1px solid var(--blue-border) !important; box-shadow: none; }
/* Общие акценты плееров, истории и share. */
.audio-widget:not(.voice-preview-player) .play-btn { background: var(--blue-soft) !important; color: var(--accent); }
.audio-widget:not(.voice-preview-player) .play-btn svg, .voice-preview-player .play-btn svg { fill: var(--accent); }
.audio-progress::-webkit-slider-thumb { background: var(--accent); }
.audio-progress::-moz-range-thumb { background: var(--accent); }
.audio-share .share-btn, .generated-copy { color: var(--accent); }
.app-page .generated-card .generated-text { background: transparent !important; color: #526176 !important; font-size: 13px; padding: 0; border: 0; border-radius: 0; }
.share-page .bot-link { background: var(--blue-soft); border-color: var(--blue-border); color: var(--accent); }
@media (hover:hover) {
  .app-page #recordBtn:hover:not(:disabled), .app-page #fileBtn:hover:not(:disabled), .app-page #uploadVoiceBtn:hover:not(:disabled),
  .app-page .btn:hover:not(:disabled), .app-page .plan-button:hover:not(:disabled) { background: #dce7f5; box-shadow: none; transform: none; }
  .app-page .cs-control:hover { border-color: #b8cff0; }
}
@media (max-width:360px) {
  .app-page .app { padding-left: 7px; padding-right: 7px; }
  .app-page .card { padding: 12px 8px; }
  .app-page .header { gap: 10px; }
  .app-page .title { font-size: 17px; }
  .app-page .profile-section { padding: 16px 12px; }
}
@media (prefers-reduced-motion:reduce) { .app-page *, .share-page * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Мягкая шапка того же оттенка, что основные кнопки. */
html.tg-fullscreen body.app-page::before { background: #e8eff9; }
.tg-fullscreen .app-page .fullscreen-app-title { color: var(--accent); }
.app-page .header .title, .share-page .title { color: var(--accent); }

/* Карточки задач в общей истории аудио. */
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: #748399; font-size: 11px; }
.task-status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 8px; font-size: 11px; font-weight: 600; background: #edf3fb; color: #45658e; }
.task-status-processing::before { content: ''; width: 9px; height: 9px; border: 2px solid #c4d5ed; border-top-color: #45658e; border-radius: 50%; animation: task-spin 1s linear infinite; }
.task-status-done { background: #edf7f0; color: #437455; }
.task-status-error { background: #fff1ef; color: #a35c54; }
.task-status-unknown { background: #f2f4f7; color: #63758c; }
.task-hint, .task-empty, .task-refresh-error { font-size: 13px; line-height: 1.6; color: #63758c; }
.task-refresh-error { padding: 12px; border-radius: 12px; background: #fff8ed; margin-bottom: 12px; }
.task-id { font-size: 11px; color: #748399; overflow-wrap: anywhere; user-select: text; }
.task-pagination { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; }
.task-pagination button { flex: 1; padding: 10px; }
.task-pagination span { color: #748399; font-size: 12px; }
@keyframes task-spin { to { transform: rotate(360deg); } }

/* Текст для чтения и подтверждение расшифровки записи. */
.app-page #record.clone-content { padding: 0; width: 100%; box-sizing: border-box; background: transparent; box-shadow: none; backdrop-filter: none; }
.app-page .reading-card { width: 100%; box-sizing: border-box; align-self: stretch; margin: 0 0 16px; padding: 12px; background: #f5f8fd; border: 1px solid #d9e4f2; border-radius: 18px; min-width: 0; }
.app-page .reading-card[hidden] { display: none; }
.app-page .reading-heading { color: #45658e; font-weight: 650; font-size: 15px; }
.app-page #readingLanguage { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; }
.app-page .reading-card p { margin: 12px 0; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-page .reading-card small { display: block; color: #748399; font-size: 13px; line-height: 1.5; }
.app-page .reading-card label { display: block; margin: 14px 0 8px; font-size: 13px; color: #45658e; }
.app-page #recordingTranscript { width: 100%; box-sizing: border-box; resize: vertical; padding: 12px; border: 1px solid #d9e4f2; border-radius: 12px; background: white; color: #24344c; font: inherit; font-size: 15px; line-height: 1.55; margin-bottom: 10px; }
.app-page .reading-actions { display: flex; margin-top: 14px; gap: 10px; }

.app-page #audioHistorySearch { box-sizing: border-box; width: 100%; margin-bottom: 12px; }
.app-page #audioHistoryNotice { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.app-page .queue-position { color: var(--accent); font-size: 12px; }
.app-page .ledger-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-page .ledger-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.app-page .ledger-row small, .app-page .ledger-task, .app-page .ledger-detail { grid-column: 1 / -1; }
.app-page .ledger-positive { color: #267650; }
.app-page .ledger-task { background: none; border: none; color: var(--accent); text-align: left; font-size: 11px; padding: 0; overflow-wrap: anywhere; }
.app-page .bottom-nav .nav-card.with-admin { grid-template-columns: repeat(5,minmax(0,1fr)); }
.app-page .bottom-nav .nav-card.with-admin .nav-label { font-size: 9px; }
.app-page .admin-row { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.app-page .admin-row pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; background: #fff1ef; border-radius: 10px; font-size: 12px; }
.app-page #adminMessage { color: #a33; margin-bottom: 10px; }
.app-page #ledgerMore[hidden] { display: none; }

.app-page .favorite-btn { width: 36px; height: 36px; border: 1px solid var(--blue-border); background: var(--blue-soft); color: var(--accent); border-radius: 10px; font-size: 24px; line-height: 1; padding: 0; cursor: pointer; }
.app-page .favorite-btn.is-favorite { color: #a66d10; background: #fff6df; border-color: #eed6a0; }
.app-page .admin-tasks-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-page .task-timings { padding: 10px; border-radius: 10px; background: var(--blue-soft); line-height: 1.6; }

/* Действия аудио всегда в одну строку: избранное слева, удаление справа. */
.app-page .generated-card .generated-actions { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px; width: auto; flex: 0 0 auto; }
.app-page .generated-actions > .favorite-btn, .app-page .generated-actions > .delete-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; margin: 0; }
.app-page #adminJobs .admin-job { gap: 6px; padding: 10px 0; white-space: normal; }
.app-page .admin-job-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-page .admin-job-header strong { font-size: 13px; }
.app-page .admin-job-header .task-status { padding: 3px 6px; font-size: 10px; flex-shrink: 0; }
.app-page .admin-job-date { font-size: 11px; color: var(--muted); }
.app-page .admin-job-timings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.app-page .admin-job-metric { display: flex; flex-direction: column; gap: 3px; background: var(--blue-soft); border-radius: 8px; padding: 7px 8px; min-width: 0; }
.app-page .admin-job-metric span { font-size: 10px; color: var(--muted); }
.app-page .admin-job-metric strong { font-size: 12px; color: var(--accent); }
.app-page .admin-job-details summary { font-size: 11px; color: var(--accent); cursor: pointer; padding: 4px 0; }
.app-page .admin-job-details small { display: block; white-space: pre-wrap; margin-top: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.app-page #adminJobs .admin-job .btn { min-height: 34px; padding: 7px 10px; font-size: 12px; }

.app-page .history-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--blue-soft); }
.app-page .history-tab { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.app-page .history-tab.active { background: #fff; border-color: var(--blue-border); color: var(--accent); font-weight: 600; box-shadow: 0 2px 5px rgba(30,50,80,.04); }
.app-page .history-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Компактные кнопки отправки с прежними иконками сервисов. */
.app-page .audio-share-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.app-page .audio-share .share-btn { flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; gap: 0; border-radius: 10px; }
.app-page .audio-share .share-btn i { font-size: 19px; }
.app-page .audio-share { padding-top: 10px; }
.app-page .audio-share .audio-section-label { margin-bottom: 8px; }

/* Более широкие карточки только на экране истории аудио. */
.app-page #screen-my-audio > .card { padding-left: 8px; padding-right: 8px; }
.app-page #screen-my-audio .generated-card { padding-left: 12px; padding-right: 12px; }
.app-page #screen-my-audio .generated-text-block { padding-left: 10px; padding-right: 10px; }

/* Компактные подробности и две равные кнопки действий. */
.app-page #adminJobs .admin-job-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:4px; }
.app-page #adminJobs .admin-job-actions .btn { width:100%; min-width:0; margin:0; white-space:normal; line-height:1.35; min-height:42px; padding:8px 6px; }
.app-page #adminJobs .admin-job-actions .btn:disabled { opacity:.45; cursor:not-allowed; }
.app-page .admin-job-identity { margin:8px 0; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--blue-soft); display:grid; gap:8px; }
.app-page .admin-job-field { display:grid; grid-template-columns:85px minmax(0,1fr); align-items:baseline; gap:8px; }
.app-page .admin-job-field dt { font-size:11px; color:var(--muted); }
.app-page .admin-job-field dd { margin:0; min-width:0; font-family:ui-monospace,Consolas,monospace; font-size:11px; line-height:1.5; color:var(--accent); overflow-wrap:anywhere; user-select:text; }
.app-page .admin-job-extra { margin-bottom:6px; }
.app-page .admin-job-extra .admin-job-metric span { min-height:2.6em; line-height:1.3; }

.app-page .audio-variant-tabs { display:flex; gap:5px; padding:4px; border-radius:12px; background:var(--blue-soft); margin:8px 0; }
.app-page .audio-variant-tab { flex:1; min-width:0; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--muted); padding:9px 5px; font:inherit; font-size:11px; cursor:pointer; }
.app-page .audio-variant-tab.active { background:var(--surface,#fff); color:var(--accent); border-color:var(--line); box-shadow:0 2px 5px #00000008; }

.app-page .mic-monitor { background:var(--blue-soft); border:1px solid var(--line); border-radius:12px; padding:12px; margin:12px 0; }
.app-page .mic-monitor[hidden] { display:none; }
.app-page .mic-monitor-heading { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--muted); }
.app-page #micTimer { font-variant-numeric:tabular-nums; font-size:20px; font-weight:600; color:var(--accent); }
.app-page .mic-level { height:8px; overflow:hidden; border-radius:8px; background:#d6dfe9; margin:10px 0; }
.app-page #micLevelBar { display:block; height:100%; width:0%; background:var(--accent); border-radius:inherit; transition:width .1s linear; }
.app-page .mic-overload #micLevelBar { background:#bd4545; }
.app-page #micHint { margin:0; min-height:32px; line-height:1.4; font-size:11px; color:var(--muted); }

/* Compact explanations and voice preparation steps. */
.field-help {display:block; margin:7px 0 0; font-size:12px; line-height:1.5; color:#6c7f96; font-weight:400; text-transform:none; letter-spacing:normal;}
.stress-help {margin:8px 0 16px;}
.stress-help span {white-space:nowrap; color:#496583;}

.voice-card-action {width:100%; margin:6px 0;}
.voice-ready-note {font-size:12px; font-weight:600; color:#476e68; padding:6px 9px; background:#edf4f1; border-radius:8px;}
.voice-card.is-new-voice {scroll-margin-top:16px;}

.text-reaction-tools {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:6px;}
.app-page .text-reaction-tools .char-counter {margin:0; flex-shrink:0;}
.reaction-open {display:inline-flex; align-items:center; gap:5px; border:1px solid #d5e0ed; border-radius:10px; padding:5px 10px; min-height:32px; background:#edf3fa; color:#456385; font:inherit; font-size:12px; cursor:pointer;}
.reactions-dialog {box-sizing:border-box; width:min(100% - 16px, 460px); max-height:calc(100dvh - 110px); margin:auto; padding:18px 16px max(18px,env(safe-area-inset-bottom)); border:1px solid #d7e1ef; border-radius:24px; background:#f8fafd; color:#3d536d; box-shadow:0 12px 45px #20364f30; overflow:auto;}
.reactions-dialog::backdrop {background:#1e304b66;}
.reactions-heading {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px;}
.reactions-heading h2 {font-size:18px; margin:0;}
.reactions-heading button {width:40px; height:40px; border:0; border-radius:12px; background:#eaf0f7; color:#456385; font-size:25px; cursor:pointer;}
.reaction-choices {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px;}
.reaction-choices button {min-height:48px; padding:10px 8px; border:1px solid #d9e3ef; border-radius:13px; background:#edf3fa; color:#456385; font:inherit; font-size:14px; cursor:pointer;}
.reaction-choices button:active {background:#dce8f6;}
.reaction-choices button:focus-visible,.reaction-open:focus-visible {outline:2px solid #6489b6; outline-offset:2px;}
.reactions-dialog .field-help {margin-top:14px;}
.reaction-error {color:#a13e42; font-size:13px; line-height:1.5;}

.app-page .bottom-nav {transform:translateY(var(--navigation-keyboard-offset, 0px));}

/* Matching free-variant labels and compact inline help controls. */
.app-page .variant-panel .variant-setting-label {display:inline-flex; align-items:center; gap:6px; margin:0; font-size:13px; font-weight:500; line-height:20px; color:#64748b; text-transform:none; letter-spacing:normal;}
.app-page .variant-panel .variant-setting-label .info-circle-btn {display:inline-flex; align-items:center; justify-content:center; flex:0 0 24px; width:24px; min-width:24px; height:24px; min-height:24px; padding:0; margin:0; border:0; vertical-align:middle;}
.app-page .variant-panel .variant-setting-label .info-circle-btn i {font-size:13px;}
/* Only the copy button overlays the lower-right corner, not an entire footer. */
.app-page #screen-my-audio .generated-text-block {position:relative;}
.app-page #screen-my-audio .generated-text {height:156px; padding-bottom:38px;}
.app-page #screen-my-audio .generated-copy {position:absolute; bottom:9px; right:10px; width:auto; min-width:0; min-height:32px; margin:0; padding:6px 9px; font-size:12px; line-height:20px; z-index:1;}

.app-page select[hidden], #manualTranscriptPanel[hidden] {display:none !important;}
.language-trigger {width:100%;text-align:left;padding:13px 14px;border:1px solid #d9e2ef;border-radius:13px;background:#f7f9fc;color:#364a63;font:inherit;font-size:16px;cursor:pointer;}
.language-trigger:disabled {opacity:.55;cursor:default;}
.language-dialog {box-sizing:border-box;width:min(94vw,460px);max-height:78dvh;margin:auto;padding:18px;border:1px solid #d9e2ef;border-radius:22px;background:#f8fafd;color:#405b78;}
.language-dialog::backdrop {background:#1e304b66;}
.language-dialog-heading {display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.language-dialog-heading h2 {font-size:18px;margin:0;}
.language-dialog-heading button {border:0;border-radius:10px;background:#eaf0f7;color:#456385;width:40px;height:40px;font-size:25px;}
.language-dialog input {box-sizing:border-box;width:100%;padding:12px;border:1px solid #d2dfed;border-radius:12px;font-size:16px;}
.language-results {max-height:calc(78dvh - 150px);overflow:auto;margin-top:10px;overscroll-behavior:contain;}
.language-option {display:grid;grid-template-columns:1fr auto;gap:3px 12px;width:100%;padding:12px 10px;border:0;border-radius:10px;background:transparent;color:#405b78;text-align:left;font:inherit;font-size:14px;cursor:pointer;}
.language-option[aria-pressed="true"] {background:#e7eff9;}
.language-asr-note {grid-column:1/-1;color:#8a6a3e;font-size:11px;}
#manualTranscriptPanel p,#manualTranscriptPanel small {font-size:13px;line-height:1.5;}
#manualTranscriptPanel textarea {box-sizing:border-box;width:100%;font-size:16px;}

/* Interface language: no change to the synthesis/recording fields. */
.interface-language-section select { width:100%; margin-top:10px; min-height:44px; }
.interface-language-section label { display:block; }
html[dir="rtl"] .app-page { text-align:right; }
html[dir="rtl"] .audio-widget, html[dir="rtl"] .slider-line { direction:ltr; }
.nav-label { overflow-wrap:anywhere; }

/* Voice picker: native modal, matching the language picker. */
.app-page dialog.voice-picker-dialog {
    position: fixed; inset: 0; margin: auto; box-sizing: border-box;
    width: min(94vw, 460px); height: min(680px, 78dvh); max-height: 78dvh;
    padding: 18px; border: 1px solid #d9e2ef; border-radius: 22px;
    background: #f8fafd; color: #405b78; overflow: hidden;
    box-shadow: 0 16px 48px rgba(30,50,80,.18);
}
.app-page dialog.voice-picker-dialog[open] { display: flex; flex-direction: column; }
.voice-picker-dialog::backdrop { background: #1e304b66; }
.voice-picker-dialog .language-dialog-heading { flex: 0 0 auto; }
.voice-picker-dialog h2:focus { outline: none; }
.voice-picker-dialog .cs-search { flex: 0 0 auto; font-size: 16px; }
.voice-picker-dialog .cs-filters { flex: 0 0 auto; }
.voice-picker-dialog .cs-options {
    flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto;
    overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
    margin: 0; padding-bottom: 12px;
}
.cs-control:focus-visible { outline: 2px solid #7898bc; outline-offset: 3px; }
@media (max-height: 480px) {
    .app-page dialog.voice-picker-dialog { height: 92dvh; max-height: 92dvh; padding: 12px; }
    .voice-picker-dialog .cs-search, .voice-picker-dialog .cs-filters { margin-bottom: 6px; }
}

/* Keep field help beside its label, matching generation controls. */
.app-page .field-label-with-info { display: flex; align-items: center; gap: 6px; }
.app-page .field-label-with-info > label { margin: 0; min-width: 0; }
.app-page .field-label-with-info .info-circle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 24px; width: 24px; min-width: 24px; height: 24px; min-height: 24px;
    padding: 0; margin: 0; border: 0;
}
.app-page .field-label-with-info .info-circle-btn i { font-size: 13px; }
.app-page .stress-help { margin: 7px 0 8px; }

.app-page .history-heading { margin-bottom: 12px; }
.app-page .history-heading > .section-label { margin: 0; }




.help-dialog h2:focus { outline: none; }
.help-dialog #modalText { margin: 0; color: #63758c; font-size: 14px; line-height: 1.65; white-space: pre-line; }

/* Identical heading and close control for language, voice and help dialogs. */
.language-dialog-heading { gap: 12px; }
.language-dialog-heading h2 { line-height: 1.35; min-width: 0; }
.app-page .language-dialog-heading > button {
    box-sizing: border-box; appearance: none; -webkit-appearance: none;
    display: grid; place-items: center; flex: 0 0 40px;
    width: 40px; min-width: 40px; max-width: 40px;
    height: 40px; min-height: 40px; padding: 0; margin: 0;
    border: 0; border-radius: 10px; background: #eaf0f7; color: #456385;
    font-family: inherit; font-size: 25px; font-weight: 400; line-height: 1;
    box-shadow: none; cursor: pointer;
}

/* Recording actions share one row; the hidden start/stop button takes no space. */
.app-page .record-section { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
.app-page .record-section > .btn {
    flex: 1 1 0; width: 0; min-width: 0; margin: 0;
    padding: 12px 8px; font-size: 14px; line-height: 1.35;
    white-space: normal; overflow-wrap: anywhere;
}

/* Recording flow: style each stage once, never its translated label. */
.app-page .clone-steps {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px; margin: 4px 0 16px;
}
.app-page .clone-step {
    display: flex; align-items: center; justify-content: center;
    min-width: 0; min-height: 42px; padding: 9px 6px; box-sizing: border-box;
    border: 1px solid #e6ecf4; border-radius: 11px;
    background: #f7f9fc; color: #7b899c;
    text-align: center; font-size: 12px; line-height: 1.4; font-weight: 500;
}
.app-page .clone-step-label { min-width: 0; overflow-wrap: anywhere; }
.app-page .clone-step.is-current {
    color: #42658e; background: #eaf1fa; border-color: #c7d8ec;
    box-shadow: inset 0 -2px 0 #8faed0; font-weight: 650;
}
.app-page .clone-step.is-complete { color: #4b7169; background: #eff6f3; border-color: #d9e8e1; }
.app-page .clone-tabs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px;
    padding: 5px; margin-bottom: 20px; background: #f1f5fa;
    border: 1px solid #e1e9f3; border-radius: 14px; box-shadow: none;
}
.app-page .clone-tab {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 10px 12px;
    font-family: inherit; font-size: 14px; line-height: 1.35; font-weight: 600;
    color: #73849c; background: transparent; border: 1px solid transparent;
    border-radius: 10px; box-shadow: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.app-page .clone-tab span { min-width: 0; overflow-wrap: anywhere; }
.app-page .clone-tab svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-page .clone-tab.active { color: #42658e; background: #fff; border-color: #dce6f2; box-shadow: 0 2px 5px rgba(42,68,102,.06); }
.app-page .clone-tab:focus-visible { outline: 2px solid #83a5ce; outline-offset: -2px; }
@media (max-width: 380px) {
    .app-page .clone-steps { gap: 4px; }
    .app-page .clone-step { padding: 8px 3px; font-size: 11px; }
    .app-page .clone-tab { gap: 6px; padding: 10px 6px; font-size: 13px; }
}

/* One primary action per recording stage; existing stage pills are unchanged. */
.app-page #screen-clone .clone-action-secondary {
    background: transparent; color: #6c8099; border: 1px solid #dce5f0;
    box-shadow: none; font-weight: 500;
}
.app-page #screen-clone .clone-action-secondary:hover { background: #f2f6fb; }
.app-page #screen-clone .clone-action-secondary:focus-visible { outline: 2px solid #83a5ce; outline-offset: 2px; }
.app-page #screen-clone .upload-section[hidden],
.app-page #screen-clone .reading-actions[hidden],
.app-page #screen-clone button[hidden],
.app-page #screen-clone input[hidden] { display: none !important; }

/* Compact generation controls; native details preserves slider values. */
.app-page .advanced-settings { margin-top: 16px; border-top: 1px solid var(--line); }
.app-page .advanced-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 4px; color: var(--text, #456589); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.app-page .advanced-settings > summary::-webkit-details-marker { display: none; }
.app-page .advanced-settings > summary > i { font-size: 12px; transition: transform .15s ease; flex-shrink: 0; }
.app-page .advanced-settings[open] > summary > i { transform: rotate(180deg); }
.app-page .advanced-settings-content { padding-top: 14px; }
.app-page .settings-reset-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.app-page .settings-reset { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-height: 36px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: #607b9c; box-shadow: none; font: inherit; font-size: 12px; cursor: pointer; }
.app-page .settings-reset:hover { background: #edf3fa; }
.app-page .settings-reset:focus-visible, .app-page .advanced-settings > summary:focus-visible { outline: 2px solid #83a5ce; outline-offset: 3px; }

/* Unified generation card in both disclosure states. */
.app-page .generation-settings {
    padding: 0; overflow: visible; border-radius: 18px;
    background: #f7faff; border-color: #dce6f2;
    box-shadow: 0 3px 12px rgba(65, 93, 131, .04);
}
.app-page .generation-settings > .slider-row { padding: 16px 14px 14px; }
.app-page .generation-settings .slider-label { color: #4d6789; font-weight: 600; }
.app-page .generation-settings .val {
    flex-basis: 54px; padding: 7px 4px; border: 1px solid #dce6f2;
    border-radius: 10px; color: #46678e; background: #fff; font-weight: 600;
}
.app-page .generation-settings .advanced-settings { margin: 0; border-top: 1px solid #e0e8f2; }
.app-page .generation-settings .advanced-settings > summary {
    min-height: 52px; box-sizing: border-box; padding: 12px 14px;
    font-size: 13px; color: #526e92; background: #edf3fb;
}
.app-page .generation-settings .advanced-settings > summary:hover { background: #e7eff9; }
.app-page .generation-settings .advanced-settings-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-page .generation-settings .advanced-settings-title > i { font-size: 14px; color: #7c97b9; flex-shrink: 0; }
.app-page .generation-settings .advanced-settings > summary > i {
    display: grid; place-items: center; width: 26px; height: 26px;
    border-radius: 8px; background: #fff; color: #6b87aa; font-size: 10px;
}
.app-page .generation-settings .advanced-settings-content { padding: 0 14px; background: #fff; }
.app-page .generation-settings .advanced-settings-content > .slider-row { margin: 0; padding: 15px 0; }
.app-page .generation-settings .advanced-settings-content > .slider-row + .slider-row { border-top: 1px solid #edf1f7; }
.app-page .generation-settings .settings-reset-row { margin: 0; padding: 8px 10px; border-top: 1px solid #e0e8f2; }
.app-page .generation-settings .settings-reset { border: 0; background: transparent; font-size: 12px; color: #7288a4; }
.app-page .generation-settings .settings-reset:hover { background: #e8eff8; color: #456589; }
@media (prefers-reduced-motion: reduce) {
    .app-page .generation-settings .advanced-settings > summary > i { transition: none; }
}

.app-page .task-retry-badge { display: inline-flex; align-items: center; gap: 5px; width: auto; min-height: 30px; padding: 4px 8px; border: 1px solid #d8e4f2; border-radius: 8px; background: #edf3fb; color: #58769c; font: inherit; font-size: 11px; cursor: pointer; box-shadow: none; }
.app-page .task-retry-badge:hover { background: #e2ecf8; }
.app-page .task-retry-badge:focus-visible { outline: 2px solid #83a5ce; outline-offset: 2px; }

.app-page .feedback-dialog { width: min(94vw, 540px); max-height: 82dvh; overflow-y: auto; padding: 18px; }
.app-page #feedbackForm { display: grid; gap: 10px; }
.app-page .feedback-dialog textarea, .app-page .feedback-ticket textarea { width: 100%; box-sizing: border-box; min-height: 100px; padding: 12px; border: 1px solid #dce5f0; border-radius: 12px; font: inherit; resize: vertical; }
.app-page .feedback-ticket { border: 1px solid #dce5f0; border-radius: 12px; padding: 12px; margin-top: 10px; overflow-wrap: anywhere; }
.app-page .feedback-ticket summary { cursor: pointer; color: #4b6b91; }
.app-page .feedback-ticket p { white-space: pre-wrap; }
.app-page .feedback-reply { border-inline-start: 3px solid #b6cbe5; padding-inline-start: 10px; margin-top: 12px; }
.app-page .feedback-ticket form { display: grid; gap: 8px; margin-top: 12px; }
.app-page .feedback-ticket select { width: 100%; margin-top: 10px; }
.app-page .feedback-report { margin-top: 10px; font-size: 12px; }

.app-page .feedback-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.app-page .feedback-choices button { min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #dce5f0; border-radius: 12px; color: #617793; background: #f6f8fc; font: inherit; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; box-shadow: none; }
.app-page .feedback-choices button[aria-pressed="true"] { background: #e5effb; border-color: #9ebce0; color: #3e608a; box-shadow: inset 0 0 0 1px #c4d7ee; font-weight: 600; }
.app-page .feedback-choices button:focus-visible { outline: 2px solid #83a5ce; outline-offset: 2px; }
.app-page .feedback-choices button:disabled { opacity: .6; cursor: wait; }
.app-page .feedback-choices.compact { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 12px; }
.app-page .feedback-choices.compact button { padding: 8px 5px; font-size: 12px; }
.app-page #feedbackTopic[hidden], .app-page .feedback-ticket select[hidden], .app-page .admin-show-more[hidden] { display:none !important; }
.app-page .admin-show-more { margin-top: 12px; }

/* Compact support conversation cards. */
.app-page .feedback-ticket { padding: 0; border-radius: 16px; background: #fff; border-color: #dde7f3; overflow: hidden; box-shadow: 0 3px 12px #3f608908; }
.app-page .feedback-summary { display: grid; gap: 7px; padding: 14px; list-style: none; }
.app-page .feedback-summary::-webkit-details-marker { display: none; }
.app-page .feedback-summary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.app-page .feedback-summary-heading strong { font-size: 13px; line-height: 1.5; min-width: 0; }
.app-page .feedback-status { flex-shrink: 0; padding: 4px 8px; border-radius: 7px; background: #edf2f9; color: #66809f; font-size: 10px; }
.app-page .feedback-status[data-status="new"] { background: #e5efff; color: #5278ae; }
.app-page .feedback-status[data-status="working"] { background: #fff3dc; color: #94702f; }
.app-page .feedback-status[data-status="closed"] { background: #e8f4ee; color: #508570; }
.app-page .feedback-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #6d7d91; font-size: 13px; line-height: 1.5; }
.app-page .feedback-summary small { color: #92a0b1; font-size: 10px; font-variant-numeric: tabular-nums; }
.app-page .feedback-ticket[open] > summary { background: #f5f8fd; border-bottom: 1px solid #e5ecf5; }
.app-page .feedback-ticket[open] .feedback-preview { display: none; }
.app-page .feedback-thread { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.app-page .feedback-bubble { max-width: 92%; box-sizing: border-box; padding: 11px 13px; font-size: 13px; line-height: 1.6; }
.app-page .feedback-original { align-self: flex-start; background: #f0f4f9; border-radius: 3px 14px 14px; color: #52677f; }
.app-page .feedback-answer { align-self: flex-end; background: #e7f0fc; border-radius: 14px 3px 14px 14px; color: #45658b; }
.app-page .feedback-bubble p { margin: 0 0 6px; }
.app-page .feedback-bubble time { display: block; font-size: 10px; opacity: .65; text-align: end; font-variant-numeric: tabular-nums; }
.app-page .feedback-bubble small { display: block; font-size: 10px; opacity: .75; margin-top: 5px; }
.app-page .feedback-task-link { margin: 12px 14px 0; font-size: 10px; color: #7b8ca2; }
.app-page .feedback-ticket > .feedback-choices, .app-page .feedback-ticket > form { margin: 0 14px 14px; }
.app-page .feedback-ticket form { padding-top: 12px; border-top: 1px solid #e6edf5; }
.app-page .feedback-ticket form textarea { min-height: 80px; background: #f8fafd; font-size: 13px; }
.app-page .feedback-ticket form button { justify-self: end; width: auto; padding-inline: 20px; }
.app-page .feedback-summary:focus-visible { outline: 2px solid #83a5ce; outline-offset: -3px; }

.app-page .admin-event-card { margin-top: 10px; border: 1px solid #dce6f2; border-radius: 15px; background: #fff; overflow: hidden; box-shadow: 0 2px 10px #45658906; }
.app-page .admin-event-heading { display: flex; align-items: center; gap: 10px; padding: 13px; }
.app-page .admin-event-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 11px; color: #6689b5; background: #edf3fb; font-size: 22px; }
.app-page .admin-event-icon.stars { color: #b39140; background: #fbf5e8; font-size: 20px; }
.app-page .admin-event-title { display: grid; gap: 5px; min-width: 0; }
.app-page .admin-event-title strong { font-size: 13px; color: #4e6b8f; line-height: 1.4; }
.app-page .admin-event-title time { font-size: 10px; color: #8999ad; font-variant-numeric: tabular-nums; }
.app-page .admin-event-details { margin: 0; padding: 11px 13px; border-top: 1px solid #edf1f7; background: #f8fafd; color: #74859a; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-page .admin-payment-summary { display: flex; align-items: center; gap: 9px; padding: 13px; list-style: none; cursor: pointer; }
.app-page .admin-payment-summary::-webkit-details-marker { display: none; }
.app-page .admin-payment-summary .admin-event-title { flex: 1; }
.app-page .admin-payment-status { max-width: 36%; border-radius: 7px; padding: 5px 7px; font-size: 10px; text-align: center; line-height: 1.4; }
.app-page .admin-payment-status.paid { background: #eaf5ef; color: #5c8975; }
.app-page .admin-payment-status.review { background: #fff2df; color: #a07c3d; }
.app-page .admin-payment-arrow { color: #8ca1bb; flex-shrink: 0; }
.app-page .admin-payment-card[open] .admin-payment-arrow { transform: rotate(180deg); }
.app-page .admin-payment-body { padding: 0 13px 11px; border-top: 1px solid #edf1f7; background: #f8fafd; font-size: 11px; line-height: 1.6; color: #70839b; overflow-wrap: anywhere; }
.app-page .admin-payment-body p { white-space: pre-wrap; }
.app-page .admin-payment-reason { color: #9e7742; }
.app-page .admin-payment-summary:focus-visible { outline: 2px solid #83a5ce; outline-offset: -3px; }

.app-page .payment-search { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #dce6f2; border-radius: 12px; background: #f7fafd; color: #4f6785; font: inherit; font-size: 13px; }
.app-page .payment-field { margin-top: 12px; }
.app-page .payment-field > label { display: block; margin-bottom: 5px; font-size: 11px; color: #8192a8; }
.app-page .payment-field-line { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #dce6f2; border-radius: 10px; background: #fff; }
.app-page .payment-field-line input { min-width: 0; flex: 1; width: 0; padding: 8px; border: 0; background: transparent; font-family: ui-monospace, monospace; font-size: 12px; color: #526d8f; }
.app-page .payment-copy { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 0; border-radius: 8px; color: #6b89af; background: #edf3fa; cursor: pointer; box-shadow: none; }
.app-page .payment-copy:focus-visible, .app-page .payment-field-line input:focus-visible { outline: 2px solid #83a5ce; outline-offset: 1px; }

/* Equal-height payment field and copy control, overriding generic input spacing. */
.app-page .payment-field-line { display: grid; grid-template-columns: minmax(0,1fr) 36px; align-items: center; gap: 4px; }
.app-page .payment-field-line > input { box-sizing: border-box; width: 100%; height: 36px; min-height: 36px; margin: 0; padding: 0 8px; line-height: normal; align-self: center; box-shadow: none; }
.app-page .payment-field-line > .payment-copy { box-sizing: border-box; margin: 0; height: 36px; min-height: 36px; line-height: 1; align-self: center; }
.app-page .payment-copy > i { display: block; line-height: 1; }
.app-page .ledger-row { display: block; padding: 0; margin-top: 10px; border: 1px solid #dce6f2; border-radius: 15px; background: #fff; overflow: hidden; }
.app-page .ledger-card-heading { display: flex; align-items: center; gap: 10px; padding: 13px; }
.app-page .ledger-card-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: #edf3fb; color: #7191b7; font-size: 21px; }
.app-page .ledger-card-caption { display: grid; gap: 5px; min-width: 0; flex: 1; }
.app-page .ledger-card-caption strong { font-size: 13px; line-height: 1.4; color: #4f6b8e; }
.app-page .ledger-card-caption small { font-size: 10px; color: #8e9db0; font-variant-numeric: tabular-nums; }
.app-page .ledger-amount { max-width: 42%; border-radius: 8px; padding: 6px 8px; background: #eef2f8; color: #5e7391; font-size: 11px; font-weight: 600; text-align: end; }
.app-page .ledger-amount.ledger-positive { background: #eaf5ef; color: #4d866c; }
.app-page .ledger-row .ledger-task { display: flex; align-items: center; justify-content: space-between; gap: 10px; box-sizing: border-box; width: 100%; margin: 0; padding: 11px 13px; border: 0; border-top: 1px solid #e7edf5; border-radius: 0; background: #f8fafd; text-align: start; color: #7a8fa9; box-shadow: none; }
.app-page .ledger-task > span { min-width: 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.6; }
.app-page .ledger-task > i { font-size: 10px; flex-shrink: 0; }
.app-page .ledger-task[aria-expanded="true"] > i { transform: rotate(180deg); }
.app-page .ledger-row .ledger-detail { margin: 0; padding: 13px; border-top: 1px solid #e7edf5; color: #637892; line-height: 1.6; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-page .ledger-task:focus-visible { outline: 2px solid #83a5ce; outline-offset: -3px; }

.app-page .ledger-card-icon > i, .app-page .admin-event-icon > i { font-size: 15px; line-height: 1; }
.app-page #adminJobs .admin-job { display: flex; flex-direction: column; gap: 0; margin-top: 12px; padding: 0; border: 1px solid #dce6f2; border-radius: 17px; background: #fff; overflow: hidden; box-shadow: 0 3px 12px #42608708; }
.app-page #adminJobs .admin-job-header { padding: 14px 14px 5px; gap: 10px; }
.app-page #adminJobs .admin-job-header strong { color: #47678d; font-size: 14px; line-height: 1.4; }
.app-page #adminJobs .admin-job-header .task-status { padding: 5px 8px; border-radius: 8px; font-size: 10px; white-space: normal; text-align: end; max-width: 48%; }
.app-page .admin-job-subline { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px 12px; }
.app-page .admin-job-short-id { color: #95a4b6; font: 10px ui-monospace, monospace; }
.app-page #adminJobs .admin-job-date { color: #8e9eb2; font-size: 10px; font-variant-numeric: tabular-nums; }
.app-page #adminJobs .admin-job > .admin-job-timings { margin: 0 12px 12px; gap: 6px; }
.app-page #adminJobs .admin-job-metric { border: 1px solid #e8eef6; background: #f7f9fd; padding: 10px 7px; border-radius: 10px; gap: 6px; }
.app-page #adminJobs .admin-job-metric span { font-size: 10px; line-height: 1.4; }
.app-page #adminJobs .admin-job-metric strong { font-size: 13px; font-variant-numeric: tabular-nums; color: #55749a; }
.app-page #adminJobs .admin-job-details { border-top: 1px solid #e7edf5; background: #f9fbfe; }
.app-page #adminJobs .admin-job-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; list-style: none; color: #7089a8; font-size: 11px; }
.app-page #adminJobs .admin-job-details > summary::-webkit-details-marker { display: none; }
.app-page #adminJobs .admin-job-details > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex-shrink: 0; margin-inline-end: 3px; }
.app-page #adminJobs .admin-job-details[open] > summary::after { transform: rotate(225deg); }
.app-page #adminJobs .admin-job-identity { margin: 0 12px 12px; background: #fff; padding: 11px; gap: 12px; }
.app-page #adminJobs .admin-job-field { grid-template-columns: 1fr; gap: 3px; }
.app-page #adminJobs .admin-job-field dt { font-size: 10px; }
.app-page #adminJobs .admin-job-field dd { font-size: 11px; color: #5f7899; }
.app-page #adminJobs .admin-job-extra { margin: 0 12px 12px; }
.app-page #adminJobs .admin-job-details pre { margin: 0 12px 12px; padding: 11px; border-radius: 10px; border: 1px solid #eddfe2; background: #fcf5f6; color: #a26b75; font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-page #adminJobs .admin-job-actions { margin: 0; padding: 12px; border-top: 1px solid #e7edf5; }
.app-page #adminJobs .admin-job-actions .btn { border-radius: 10px; font-size: 11px; }
.app-page #adminJobs .admin-job .ledger-note { display: block; margin: 0; padding: 0 13px 12px; font-size: 10px; color: #8d9baf; }
.app-page #adminJobs .admin-job-details summary:focus-visible { outline: 2px solid #83a5ce; outline-offset: -3px; }

.app-page .tts-draft-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid #d5e3f4; border-radius: 12px; background: #edf4fd; color: #54759d; font-size: 12px; }
.app-page .tts-draft-banner > div { display:flex; gap:8px; }
.app-page .tts-draft-banner button { width:auto; padding:8px 10px; border:1px solid #cbdcf0; border-radius:9px; background:#fff; color:#57769c; font:inherit; cursor:pointer; }
.app-page .tts-draft-banner button:first-child { background:#dbe9fa; }
.app-page .nav-btn { position:relative; }
.app-page .profile-unread-dot { position:absolute; top:6px; inset-inline-end:20%; width:8px; height:8px; border-radius:50%; background:#de7481; border:2px solid white; }
.app-page .feedback-unread-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; padding:2px 5px; margin-inline-start:8px; border-radius:12px; background:#d97785; color:white; font-size:11px; }
.app-page .feedback-summary-heading { flex-wrap:wrap; }
.app-page .feedback-new-reply { padding:3px 6px; border-radius:6px; font-size:10px; color:#a56273; background:#faeaf0; }
.app-page .tts-draft-banner[hidden], .app-page .profile-unread-dot[hidden], .app-page .feedback-unread-count[hidden], .app-page .feedback-new-reply[hidden] { display:none !important; }

/* Original and cached synthesis: compact labelled playback controls. */
.cs-options li.voice-with-sample { display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center; }
.voice-with-sample .voice-option-preview,.voice-sample-preview { display:flex;flex-direction:column;align-items:center;gap:5px;max-width:90px;min-width:0; }
.voice-with-sample small {font-size:10px;line-height:1.3;text-align:center;color:var(--text-muted,#72839b);overflow-wrap:anywhere;}
.voice-sample-preview button.sample-create {font-size:10px;padding:7px;border-radius:10px;line-height:1.25;white-space:normal;background:#edf3fa;color:#486889;border:1px solid #d4e0ee;}
.text-check-open {display:block;margin:6px 0 16px;padding:6px 10px!important;width:auto!important;font-size:12px!important;border-radius:10px!important;border:1px solid #d4e0ee!important;background:#edf3fa!important;color:#486889!important;}
.text-check-dialog .text-check-results {overflow:auto;max-height:55dvh;display:grid;gap:8px;}
.text-check-item {display:flex!important;flex-direction:column;gap:6px;text-align:start!important;width:100%;padding:12px!important;background:#f3f6fb!important;color:#486889!important;border:1px solid #dce5f0!important;border-radius:12px!important;}
.text-check-item mark {background:#fff0cf;color:#594f35;border-radius:4px;padding:2px 5px;overflow-wrap:anywhere;max-width:100%;}
.text-check-item span {font-size:12px;line-height:1.5;}
.text-check-dialog>.field-help {margin:8px 0 14px;}
@media(max-width:380px){.cs-options li.voice-with-sample{gap:6px;}.voice-sample-preview,.voice-with-sample .voice-option-preview{max-width:70px;}}

.sample-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
.sample-section-heading h3{margin:0;font-size:16px;color:#486889;}
.sample-section-heading .sample-refresh{width:36px;height:36px;padding:0;border-radius:11px;background:#edf3fa;color:#486889;border:1px solid #d4e0ee;font-size:22px;}
.admin-samples label{display:block;margin:12px 0 7px;font-size:12px;color:#718298;}
.admin-samples textarea{width:100%;box-sizing:border-box;resize:vertical;margin:0;}
.admin-sample-list{display:grid;gap:8px;}
.admin-sample-card{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #dfe7f0;border-radius:14px;background:#f6f8fc;padding:10px;}
.admin-sample-name{display:flex;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere;}
.admin-sample-name strong{font-size:13px;color:#486889;}
.admin-sample-name small{font-size:11px;color:#78889c;}
.admin-sample-controls{display:flex;align-items:center;gap:6px;flex-shrink:0;max-width:58%;}
.admin-sample-controls .sample-create{width:auto;padding:8px 10px;font-size:11px;line-height:1.4;border-radius:10px;background:#e8f0fa;border:1px solid #d4e0ee;color:#486889;white-space:normal;}
.admin-sample-controls button:disabled{opacity:.5;cursor:default;}
.admin-samples .sample-notice{font-size:12px;color:#9d4851;}

/* About ten compact voice rows, with independent scrolling for the remaining voices. */
.admin-sample-list{max-height:1040px;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-inline-end:4px;}
.admin-sample-card{min-height:96px;box-sizing:border-box;}
.sample-visibility{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;width:auto!important;padding:4px 7px!important;font-size:10px!important;border-radius:9px!important;border:1px solid #d3dfec!important;background:#edf3fa!important;color:#486889!important;}
.sample-visibility::before{content:'';width:22px;height:12px;flex-shrink:0;border-radius:12px;background:radial-gradient(circle at 6px 6px,#fff 4px,transparent 4.5px),#aab7c7;}
.sample-visibility[aria-checked=true]::before{background:radial-gradient(circle at 16px 6px,#fff 4px,transparent 4.5px),#5c81a8;}
.sample-visibility:disabled{opacity:.5;}

.admin-sample-list{max-height:616px;overscroll-behavior-y:auto;}
.admin-user-list{display:grid;gap:8px;max-height:784px;overflow-y:auto;overscroll-behavior-y:auto;scrollbar-gutter:stable;padding-inline-end:4px;}
.admin-user-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-height:124px;padding:10px;border:1px solid #dfe7f0;border-radius:14px;background:#f6f8fc;box-sizing:border-box;}
.admin-user-name{display:flex;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere;}
.admin-user-name strong{font-size:13px;color:#486889;}.admin-user-name small,.admin-user-dates small{font-size:10px;color:#7b8ba0;}
.admin-user-plan{font-size:11px;color:#486889;}.admin-user-dates{display:flex;flex-wrap:wrap;gap:8px;}.admin-user-dates span{display:flex;flex-direction:column;gap:3px;}.admin-user-dates time{font-size:11px;}
.user-plan-change{align-self:end;width:auto!important;font-size:11px!important;padding:7px!important;border:1px solid #d4e0ee!important;background:#e8f0fa!important;color:#486889!important;border-radius:10px!important;}
.admin-plan-options{max-height:45dvh;overflow:auto;display:grid;gap:6px;}.admin-plan-options button{display:flex;flex-direction:column;gap:5px;align-items:flex-start;}.admin-plan-options small{font-size:11px;color:#78889c;}.admin-plan-options [aria-pressed=true]{background:#e8f0fa;border-color:#84a4c6;}

.text-reaction-tools{justify-content:flex-start;gap:6px;}.text-reaction-tools .text-check-open{margin:0;min-height:32px;padding:5px 8px!important;font-size:11px!important;min-width:0;line-height:1.2;}
.text-reaction-tools .reaction-open{font-size:11px;padding:5px 8px;flex-shrink:0;}.text-reaction-tools .char-counter{margin-inline-start:auto!important;font-size:11px;}
.check-edit-controls{display:flex;gap:6px;width:100%;}.check-edit-controls input{min-width:0;flex:1;margin:0;padding:8px;font-size:13px;}.check-edit-controls button,.check-undo{width:auto;padding:7px 10px;border:1px solid #d4e0ee;border-radius:10px;background:#e8f0fa;color:#486889;font-size:12px;}
.check-edit-controls button:disabled{opacity:.45;}.check-fragment{align-self:flex-start;text-align:start;width:auto!important;background:#fff0cf!important;color:#594f35!important;border:0!important;border-radius:6px!important;padding:4px 7px!important;overflow-wrap:anywhere;max-width:100%;}.check-undo{margin-top:10px;}
/* Admin navigation: retain section DOM and drafts while showing one panel. */
#screen-admin .admin-panel[hidden]{display:none!important;}
.admin-section-bar{margin:0 0 12px;}
.admin-menu-open{display:flex;align-items:center;gap:12px;width:100%;padding:13px 15px;border:1px solid #d6e2ef;border-radius:16px;background:#eaf1fa;color:#486889;text-align:start;font:inherit;font-weight:600;cursor:pointer;}
.admin-menu-open span{flex:1;min-width:0;}.admin-menu-open svg{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.admin-menu-drawer{position:fixed;inset:0 auto 0 0;margin:0;width:min(86vw,340px);height:100dvh;max-width:none;max-height:100dvh;box-sizing:border-box;padding:24px 16px;padding-top:max(24px,env(safe-area-inset-top),var(--tg-content-safe-area-inset-top,0px));padding-bottom:max(24px,env(safe-area-inset-bottom));border:0;border-right:1px solid #dce5ef;border-radius:0 24px 24px 0;background:#f6f8fc;color:#486889;box-shadow:10px 0 40px #29436022;overflow-y:auto;overscroll-behavior:contain;}
.admin-menu-drawer::backdrop{background:rgba(34,52,76,.35);}
.admin-menu-drawer .language-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:22px;}.admin-menu-drawer h2{font-size:17px;margin:0;}
.admin-menu-close{flex-shrink:0;width:34px;height:34px;padding:0;border:1px solid #d7e2ef;border-radius:11px;background:#eaf1fa;color:#486889;font-size:24px;line-height:1;cursor:pointer;}
.admin-menu-drawer nav{display:grid;gap:8px;}.admin-menu-item{width:100%;padding:14px 12px;border:1px solid transparent;border-radius:13px;background:transparent;color:#61758e;text-align:start;font:inherit;font-size:14px;cursor:pointer;}.admin-menu-item[aria-current=page]{background:#e3edf9;border-color:#c5d7ec;color:#3e638d;font-weight:600;}.admin-menu-item:hover{background:#eaf1fa;}.admin-menu-item:focus-visible,.admin-menu-open:focus-visible,.admin-menu-close:focus-visible{outline:2px solid #789dc7;outline-offset:2px;}
/* Page-sized lists use the main page scroll, never nested scroll areas. */
#screen-admin .admin-sample-list,#screen-admin .admin-user-list{max-height:none;overflow:visible;padding-inline-end:0;scrollbar-gutter:auto;}
#screen-admin .admin-paged-row[hidden]{display:none!important;}
.admin-page-more{margin-top:12px;}.admin-user-controls{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;}.admin-user-controls button[hidden]{display:none!important;}
.user-archive-toggle{margin:8px 0 12px;padding:7px 12px;border:1px solid #d6e2ef;border-radius:10px;background:#f4f7fb;color:#607891;font:inherit;font-size:12px;}.user-archive-toggle[aria-pressed=true]{background:#e3edf9;border-color:#a9bfd8;color:#3e638d;}
.admin-access-dialog .access-target{font-weight:600;overflow-wrap:anywhere;}.admin-access-dialog .access-explanation{font-size:13px;line-height:1.6;color:#6f8096;}.admin-access-dialog .access-error{font-size:13px;color:#a54e59;}
.admin-user-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 12px;}.admin-user-filters select{width:100%;min-width:0;padding:9px 6px;border:1px solid #d6e2ef;border-radius:10px;background:#f4f7fb;color:#486889;font-size:12px;}.admin-user-note{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0;color:#6d7f94;}.access-note{width:100%;box-sizing:border-box;padding:10px;border:1px solid #d6e2ef;border-radius:12px;font:inherit;font-size:14px;}.access-note[hidden]{display:none;}
.admin-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;}.admin-stat{display:flex;flex-direction:column;gap:7px;padding:12px;border:1px solid #dce6f1;border-radius:13px;background:#f1f6fc;}.admin-stat small{font-size:11px;color:#7a8da4;}.admin-stat strong{font-size:19px;color:#486889;}.admin-day-summary h3 small{font-size:12px;font-weight:400;}.admin-resource-card{display:flex;flex-direction:column;gap:7px;padding:13px;margin-bottom:8px;background:#f6f8fc;border:1px solid #dce6f1;border-radius:14px;font-size:12px;overflow-wrap:anywhere;}.admin-resource-card time{color:#8391a4;font-size:11px;}#adminActions .admin-event-card{display:flex;flex-direction:column;gap:7px;overflow-wrap:anywhere;}#adminActions .admin-event-card time{font-size:11px;color:#8391a4;}
/* Compact section headings and full-width user search. */
.app-page #screen-admin > .card{padding-top:10px;}
.app-page #screen-admin > .card > h3,.app-page #screen-admin .admin-tasks-heading h3{margin-top:0;margin-bottom:10px;}
.app-page #screen-admin .admin-user-search{display:block;width:100%;max-width:100%;box-sizing:border-box;margin:0;}
.app-page #screen-admin .admin-day-summary h3{margin-top:4px;}
#adminActions .audit-card{gap:12px;padding:13px;border:1px solid #dce6f1;border-radius:15px;background:#f8fafd;margin-bottom:10px;}
.audit-heading{display:flex;align-items:center;gap:10px;}.audit-icon{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:12px;background:#e8f0fa;color:#55779e;font-size:14px;}.audit-title{display:flex;flex-direction:column;gap:5px;min-width:0;}.audit-title strong{font-size:14px;line-height:1.35;color:#486889;}
.audit-identities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.audit-identity{min-width:0;}.audit-identity>small,.audit-plan>small{display:block;font-size:10px;color:#8090a4;margin-bottom:5px;}
.audit-copy-line{display:flex;align-items:center;gap:3px;min-width:0;border:1px solid #dce5ef;background:#fff;border-radius:10px;padding:3px;}
.app-page #adminActions .audit-copy-line input{min-width:0;width:0;flex:1;padding:5px;border:0;border-radius:6px;background:transparent!important;box-shadow:none;font-size:11px;line-height:1.5;}
.audit-copy{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:#edf3fa;color:#6582a3;cursor:pointer;}
.audit-plan{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#edf3fa;border-radius:10px;padding:9px 11px;}.audit-plan>small{margin:0;}.audit-plan strong{color:#486889;font-size:12px;}
.audit-note{border-top:1px solid #e1e8f0;padding-top:9px;}.audit-note summary{font-size:11px;color:#75879d;cursor:pointer;}.audit-note p{font-size:12px;line-height:1.6;margin:7px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;color:#536b86;}
.voice-source-tabs{display:flex;flex-shrink:0;gap:4px;padding:4px;background:#eaf1fa;border:1px solid #dde7f2;border-radius:13px;margin-bottom:10px;}
.voice-source-tabs button{flex:1;min-width:0;padding:10px 7px;border:1px solid transparent;border-radius:10px;background:transparent;color:#788ba3;font:inherit;font-size:13px;line-height:1.3;cursor:pointer;}
.voice-source-tabs button[aria-selected=true]{background:#fff;border-color:#dce6f0;color:#486889;font-weight:600;box-shadow:0 2px 5px #29436008;}
.voice-source-tabs button:focus-visible{outline:2px solid #7eace6;outline-offset:1px;}
.voice-picker-dialog .cs-filters[hidden]{display:none!important;}
.voice-selected{flex:0 0 auto;margin:0 0 10px;padding:9px;border:1px solid #cbdaec;border-radius:14px;background:#edf4fc;}
.voice-selected[hidden]{display:none!important;}.voice-selected-label{font-size:11px;font-weight:600;color:#6985a4;margin:0 0 6px;}
.voice-picker-dialog .voice-selected-list{flex:none;max-height:none;overflow:visible;padding:0;margin:0;list-style:none;}.voice-selected-list li{margin:0;}
.welcome-card{margin-bottom:14px;}.welcome-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#486889;}.welcome-heading strong{font-size:15px;}.welcome-heading button{width:30px;height:30px;border:0;border-radius:9px;background:#edf3fa;color:#6b85a3;font-size:23px;flex-shrink:0;}.welcome-card ol{padding-inline-start:23px;font-size:13px;line-height:1.9;color:#6f8197;}.welcome-own{padding:8px 12px;background:#eaf1fa;color:#486889;border:1px solid #d5e2ef;border-radius:11px;font:inherit;font-size:13px;}
.admin-day-picker{box-sizing:border-box;max-width:100%;padding:9px 12px;border:1px solid #d6e2ef;border-radius:11px;background:#f5f8fc;color:#486889;font:inherit;font-size:13px;margin:4px 0 10px;}

/* Microphone comparison: same segmented control as the application. */
.mic-engine-switch{display:flex;gap:4px;padding:4px;margin:12px 0;border:1px solid #dde7f2;border-radius:13px;background:#eaf1fa;}
.mic-engine-switch button{flex:1;min-width:0;border:1px solid transparent;border-radius:10px;padding:11px 6px;background:transparent;color:#788ba3;font:inherit;font-size:13px;cursor:pointer;}
.mic-engine-switch button[aria-pressed=true]{background:#fff;border-color:#dce6f0;color:#486889;font-weight:600;box-shadow:0 2px 5px #29436008;}
.mic-engine-switch button:disabled{opacity:.5;cursor:default;}
.mic-engine-switch button:focus-visible{outline:2px solid #789dc7;outline-offset:2px;}

/* Give the voice list priority over picker controls. */
.app-page dialog.voice-picker-dialog{padding:12px;}
.voice-picker-dialog .language-dialog-heading{margin-bottom:10px;}
.voice-picker-dialog .language-dialog-heading h2{margin:0;}
.voice-picker-dialog .voice-selected{padding:0;border:0;background:transparent;margin-bottom:8px;}
.voice-picker-dialog .voice-selected-label{margin:0 2px 4px;}
.voice-picker-dialog .voice-source-tabs{margin-bottom:8px;}
.voice-picker-dialog .voice-source-tabs button{padding:8px 6px;}
.voice-search-row{display:flex;flex:0 0 auto;align-items:center;gap:7px;margin-bottom:8px;min-width:0;}
.voice-picker-dialog .voice-search-row>.cs-search{flex:1 1 auto;min-width:0;width:0;margin:0;padding:10px;}
.voice-filters-toggle{display:flex;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;min-height:42px;padding:8px;border:1px solid #d6e2ef;border-radius:12px;background:#edf3fa;color:#486889;font:inherit;font-size:12px;cursor:pointer;}
.voice-filters-toggle[hidden]{display:none;}
.voice-filters-toggle small{padding:2px 5px;border-radius:7px;background:#486889;color:white;}
.voice-filters-toggle.has-filters,.voice-filters-toggle[aria-expanded=true]{border-color:#9fb7d2;background:#e3edf9;}
.voice-filters-toggle:focus-visible{outline:2px solid #789dc7;outline-offset:2px;}
.voice-picker-dialog .cs-filters{margin:0 0 8px;max-height:25dvh;overflow-y:auto;}
.voice-picker-dialog .cs-options li{padding:9px 10px;min-height:0;margin-bottom:7px;gap:7px;}
.voice-picker-dialog .voice-option-name{margin:0;line-height:1.25;}
.voice-picker-dialog .voice-option-badges{margin-top:5px;gap:4px;}
.voice-picker-dialog .voice-option-preview,.voice-picker-dialog .voice-sample-preview{gap:3px;}
.voice-picker-dialog .voice-selected-list li{margin-bottom:0;}
@media(max-width:380px){.voice-filters-toggle{font-size:11px;padding:7px;gap:4px;}}

/* Compact picker with space reserved for the iOS/Android visual viewport. */
.app-page dialog.voice-picker-dialog{inset:auto;left:50%;top:calc(var(--voice-viewport-top,0px) + var(--voice-viewport-height,100dvh)/2);transform:translate(-50%,-50%);margin:0;height:min(680px,calc(var(--voice-viewport-height,100dvh) - 24px));max-height:calc(var(--voice-viewport-height,100dvh) - 24px);}
.voice-picker-dialog .voice-selected-label{font-size:10px;margin-bottom:3px;}
.voice-picker-dialog .voice-selected-list li{padding:6px 8px;border-radius:12px;}
.voice-picker-dialog .voice-selected .voice-option-badges{margin-top:3px;}
.voice-picker-dialog .voice-selected .voice-option-preview,.voice-picker-dialog .voice-selected .voice-sample-preview{gap:1px;}
.voice-picker-dialog .voice-selected{margin-bottom:6px;}
.voice-picker-dialog.voice-searching .voice-selected{display:none;}
.voice-picker-dialog.voice-searching .language-dialog-heading{margin-bottom:5px;}
.voice-picker-dialog .cs-options .voice-option-preview .play-btn,.voice-picker-dialog .cs-options .voice-sample-preview .play-btn{min-width:36px;min-height:36px;}
.admin-menu-drawer{inset:12px auto 12px 10px;width:min(82vw,310px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);border:1px solid #dce5ef;border-radius:22px;padding:18px 12px;box-shadow:0 16px 48px #29436033;}
.admin-menu-drawer .language-dialog-heading{padding:0 5px;margin-bottom:14px;}
.admin-menu-drawer nav{gap:5px;}
.admin-menu-item{padding:12px;border-radius:12px;line-height:1.35;}
.admin-menu-item[aria-current=page]{box-shadow:inset 3px 0 #7393b9;}
.worker-card-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;}
.worker-card-heading strong{font-size:13px;overflow-wrap:anywhere;min-width:0;}
.worker-online{color:#508973;}.worker-offline{color:#9aa6b5;}
.admin-resource-card{background:linear-gradient(145deg,#f8fafd,#edf3fa);padding:14px;gap:10px;}
.worker-models{display:flex;flex-wrap:wrap;gap:6px;}.worker-models>span{padding:5px 8px;background:#fff;border:1px solid #dce5ef;border-radius:9px;font-size:11px;}
.worker-memory{display:flex;justify-content:space-between;gap:8px;font-size:11px;}
.admin-resource-card progress{width:100%;height:6px;border:0;border-radius:6px;overflow:hidden;accent-color:#7c9ec4;}
.admin-resource-card progress::-webkit-progress-bar{background:#dee7f2;}.admin-resource-card progress::-webkit-progress-value{background:#7c9ec4;}
.admin-clear-errors{margin:10px 0;padding:9px 12px;font-size:12px;width:auto;}
.worker-error{padding:10px;border:1px solid #eadde0;border-radius:12px;margin:8px 0;font-size:12px;overflow-wrap:anywhere;}
.worker-error p{white-space:pre-wrap;}
.app-page .audio-share-grid{gap:5px;align-items:center;}
.app-page .audio-share .share-btn{width:36px;height:36px;min-height:36px;flex:0 0 36px;border-radius:11px;background:#edf3fa;border:1px solid #d8e3ef;box-shadow:none;color:#557697;}
.app-page .audio-share .share-btn i{font-size:17px;}
.app-page .audio-share .share-btn:active{background:#dfeaf6;transform:scale(.97);}
.app-popup{box-sizing:border-box;width:100%;max-width:440px;min-width:0!important;max-height:calc(100dvh - 32px);overflow-y:auto;}
.app-popup-overlay{box-sizing:border-box;}
.task-pagination>.btn{width:100%;}

.admin-voice-editor{width:min(94vw,480px);max-height:85dvh;overflow-y:auto;}
.admin-voice-editor form{display:grid;gap:8px;}.admin-voice-editor label{font-size:12px;color:#718298;margin-top:5px;}
.admin-voice-editor input,.admin-voice-editor textarea,.admin-voice-editor select{width:100%;box-sizing:border-box;min-width:0;padding:10px;border:1px solid #d7e1ed;border-radius:11px;background:#f8fafd;color:#486889;font:inherit;font-size:16px;}
.admin-voice-editor .language-trigger{width:100%;}
.editor-upload[hidden]{display:none;}.editor-upload input[type=file]{font-size:12px;}
.editor-upload input::file-selector-button{border:1px solid #d7e1ed;border-radius:8px;padding:8px;background:#eaf1fa;color:#486889;}
.editor-card-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;}.editor-card-actions .btn{flex:1;padding:8px;font-size:11px;line-height:1.4;min-height:36px;}
.editor-add{margin-bottom:14px;padding:9px 12px;font-size:13px;}.editor-status{color:#9d4851;font-size:12px;}

/* Keep dialogs below Telegram controls, including with the keyboard open. */
.app-page dialog.voice-picker-dialog{--picker-safe-top:max(env(safe-area-inset-top,0px),var(--app-safe-top,0px));--picker-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--app-safe-bottom,0px));top:calc(var(--voice-viewport-top,0px) + var(--picker-safe-top) + (var(--voice-viewport-height,100dvh) - var(--picker-safe-top) - var(--picker-safe-bottom))/2);height:min(680px,calc(var(--voice-viewport-height,100dvh) - var(--picker-safe-top) - var(--picker-safe-bottom) - 16px));max-height:calc(var(--voice-viewport-height,100dvh) - var(--picker-safe-top) - var(--picker-safe-bottom) - 16px);box-sizing:border-box;}
.admin-menu-drawer{top:calc(max(env(safe-area-inset-top,0px),var(--app-safe-top,0px)) + 8px);bottom:auto;height:auto;max-height:calc(100dvh - max(env(safe-area-inset-top,0px),var(--app-safe-top,0px)) - max(env(safe-area-inset-bottom,0px),var(--app-safe-bottom,0px)) - 16px);padding:14px 10px;}
.admin-menu-drawer .language-dialog-heading h2{font-size:18px;line-height:1.3;}
.admin-menu-item{display:flex;align-items:center;gap:11px;text-align:start;font-size:14px;min-height:44px;}
.admin-menu-item i{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:9px;background:#eaf0f8;color:#6886a8;font-size:13px;}
.admin-menu-item:focus:not(:focus-visible){outline:none;}
.admin-menu-item:focus-visible{outline:2px solid #9bb7d6;outline-offset:-2px;}

/* Shared voice management: each action group gets its own row. */
.app-page .admin-sample-card{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:12px;padding:13px;min-height:0;background:#f8fafd;border:1px solid #dce5ef;border-radius:16px;box-shadow:0 2px 8px #29436004;}
.app-page .admin-sample-name{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px;}
.app-page .admin-sample-name>strong{grid-column:1;grid-row:1;font-size:14px;line-height:1.4;}
.app-page .admin-sample-name>small{grid-column:1;grid-row:2;font-size:12px;line-height:1.4;}
.app-page .admin-sample-name>.sample-visibility{grid-column:2;grid-row:1 / 3;align-self:center;max-width:145px;min-height:36px;padding:7px 9px!important;font-size:11px!important;line-height:1.3;text-align:start;}
.app-page .admin-sample-controls{display:flex;align-items:center;flex-wrap:wrap;gap:9px;max-width:none;min-width:0;width:100%;}
.app-page .admin-sample-controls>div{min-width:0;flex:1 1 120px;}
.app-page .admin-sample-controls>div:empty{display:none;}
.app-page .admin-sample-controls>.sample-create{flex:1 1 145px;min-height:40px;padding:9px 12px;font-size:12px;border-radius:11px;margin:0;}
.app-page .admin-sample-card>.editor-card-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:0;padding-top:10px;border-top:1px solid #e1e8f0;}
.app-page .admin-sample-card .editor-card-actions>.btn{width:100%;min-width:0;min-height:40px;margin:0;padding:9px 8px;font-size:12px;line-height:1.4;border:1px solid #dce5ef;border-radius:11px;box-shadow:none;background:#edf3fa;color:#557697;white-space:normal;overflow-wrap:anywhere;}
.app-page .admin-sample-card .editor-card-actions>.btn:last-child{background:#f8f2f3;border-color:#eadddf;color:#99636a;}
.app-page .admin-sample-card button:focus-visible{outline:2px solid #8daed2;outline-offset:2px;}
@media(max-width:350px){.app-page .admin-sample-name>.sample-visibility{max-width:110px;}.app-page .admin-sample-card{padding:10px;}}

/* A compact two-row toolbar, with the voice identity kept readable. */
.app-page .admin-sample-card{gap:8px;padding:10px 11px;border-radius:14px;}
.app-page .admin-sample-name{gap:2px 8px;}
.app-page .admin-sample-name>.sample-visibility{padding:5px 7px!important;min-height:32px;}
.app-page .admin-sample-controls{gap:7px;}
.app-page .admin-sample-controls>.sample-create{min-height:36px;padding:7px 10px;}
.app-page .admin-sample-card>.editor-card-actions{padding-top:7px;gap:7px;}
.app-page .admin-sample-card .editor-card-actions>.btn{min-height:34px;padding:6px 8px;background:transparent;border-color:#e0e8f1;border-radius:9px;}
.app-page .admin-sample-card .editor-card-actions>.btn:last-child{background:transparent;border-color:#e7dfe2;color:#936970;}
.app-page .admin-sample-list{gap:7px;}

/* Compact voice actions, with accessible labels retained on every icon. */
.app-page .admin-sample-card{grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:11px;}
.app-page .admin-sample-name{grid-column:1/-1;}
.app-page .admin-sample-name>.sample-visibility{width:40px!important;min-height:40px;padding:0!important;justify-content:center;font-size:15px!important;border-radius:11px!important;}
.app-page .admin-sample-name>.sample-visibility::before{display:none;}
.app-page .sample-visibility[aria-checked=false]{color:#99a5b4!important;background:#f1f4f8!important;}
.app-page .admin-sample-controls{grid-column:1;flex-wrap:nowrap;justify-content:flex-start;}
.app-page .admin-sample-controls>div{flex:0 1 auto;}
.app-page .admin-sample-controls>.sample-create{flex:0 0 40px;width:40px;min-height:40px;padding:0;font-size:15px;}
.app-page .admin-sample-card>.editor-card-actions{grid-column:2;display:flex;align-items:center;padding:0;border:0;gap:7px;}
.app-page .admin-sample-card .editor-card-actions>.btn{flex:0 0 40px;width:40px;min-height:40px;padding:0;font-size:14px;border-radius:11px;background:#edf3fa;}
.app-page dialog.admin-voice-editor{box-sizing:border-box;inset:auto;left:50%;transform:translateX(-50%);margin:0;top:calc(var(--editor-top,0px) + max(var(--app-safe-top,0px),env(safe-area-inset-top,0px)) + 8px);max-height:calc(var(--editor-height,100dvh) - max(var(--app-safe-top,0px),env(safe-area-inset-top,0px)) - max(var(--app-safe-bottom,0px),env(safe-area-inset-bottom,0px)) - 16px);padding:14px;}
.admin-voice-editor .language-dialog-heading{gap:12px;margin-bottom:12px;align-items:flex-start;}
.admin-voice-editor .language-dialog-heading h2{font-size:18px;line-height:1.3;margin:3px 0;}
.admin-voice-editor .editor-close{flex-shrink:0;width:38px;height:38px;}
.admin-voice-editor form{gap:6px;}
.admin-voice-editor form label{margin-top:6px;}
.admin-voice-editor .editor-status:empty{display:none;}
.admin-voice-editor form>button[type=submit]{margin-top:8px;}

/* Original prompt and synthesized sample have separate, labelled controls. */
.app-page .sample-audio-groups{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding-top:8px;border-top:1px solid #e1e8f0;}
.sample-audio-groups>div{min-width:0;display:flex;flex-direction:column;gap:6px;}
.sample-audio-groups>div>small{font-size:11px;font-weight:500;color:#8191a5;}
.sample-synthesis-group{padding-inline-start:10px;border-inline-start:1px solid #e1e8f0;}
.sample-group-actions,.app-page .sample-audio-groups .admin-sample-controls{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-width:0;}
.app-page .sample-audio-groups .btn,.app-page .sample-heading-actions>.btn{display:grid;place-items:center;flex:0 0 40px;width:40px;min-height:40px;margin:0;padding:0;font-size:14px;border-radius:11px;border:1px solid #dce5ef;background:#edf3fa;color:#557697;box-shadow:none;}
.app-page .admin-sample-name>.sample-heading-actions{grid-column:2;grid-row:1/3;display:flex;gap:6px;align-items:center;}
.app-page .sample-heading-actions>.btn{color:#936970;background:transparent;border-color:transparent;}
.app-page .sample-heading-actions .sample-visibility{width:36px!important;min-height:36px;justify-content:center;font-size:14px!important;}
.app-page .sample-heading-actions .sample-visibility::before{display:none;}

/* Position instantly; only the opening scale animates from the menu icon. */
.admin-menu-drawer{transition:none!important;animation:none!important;}
/* Error cleanup is a deliberate selection, not a blanket delete. */
.app-page .admin-clear-errors{display:inline-flex;align-items:center;gap:8px;width:auto;min-height:40px;padding:9px 13px;border:1px solid #e1dce4;border-radius:12px;background:#f5f0f3;color:#8b6470;box-shadow:none;font-size:12px;}
.error-selection-dialog{box-sizing:border-box;width:min(94vw,500px);max-height:calc(100dvh - max(var(--app-safe-top,0px),env(safe-area-inset-top,0px)) - 24px);overflow-y:auto;}
.error-selection-dialog[open]{display:flex;flex-direction:column;gap:10px;}
.errors-select-all,.error-select-row{display:flex;align-items:flex-start;gap:10px;cursor:pointer;font-size:13px;}
.error-selection-dialog input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;flex:0 0 20px;width:20px!important;height:20px!important;min-height:20px;padding:0!important;margin:2px 0!important;accent-color:#6889ae;cursor:pointer;}
.error-select-row{padding:11px;border:1px solid #dce5ef;border-radius:12px;background:#f6f8fc;margin-bottom:7px;}
.error-select-row>span{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere;}.error-select-row strong{font-size:12px;color:#557697;}.error-select-row small{font-size:11px;color:#8190a2;}.error-select-message{white-space:pre-wrap;font-size:12px;max-height:110px;overflow-y:auto;}
.errors-notice:empty{display:none;}.errors-confirm{padding:12px;background:#edf3fa;border-radius:12px;font-size:13px;}.errors-confirm[hidden]{display:none;}.errors-confirm button{width:auto;margin-inline-end:6px;}.errors-delete{margin:0!important;}.errors-delete:disabled{opacity:.45;cursor:default;}
/* Worker: resources, daily report, then errors. */
.worker-stat-heading,.worker-errors-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 10px;}
.worker-stat-heading h3,.worker-errors-heading h3{margin:0!important;font-size:15px;}
.app-page .worker-stat-heading .admin-day-picker{width:auto;max-width:145px;margin:0;min-width:0;padding:7px 8px;font-size:12px;}
.app-page .admin-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
.app-page .admin-stat{min-width:0;padding:11px 9px;border-radius:13px;background:linear-gradient(145deg,#f7faff,#edf3fa);gap:8px;}
.app-page .admin-stat small{font-size:11px;line-height:1.35;min-height:30px;}
.app-page .admin-stat strong{font-size:18px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.worker-memory-graph{display:block;width:100%;height:55px;border-radius:9px;background:repeating-linear-gradient(to top,#e2eaf4 0,#e2eaf4 1px,transparent 1px,transparent 18px);}
.worker-memory-graph polyline{fill:none;stroke:#7397bd;stroke-width:2;stroke-linejoin:round;vector-effect:non-scaling-stroke;}
.worker-errors-heading .admin-clear-errors{margin:0;font-size:11px;padding:7px 10px;}
.worker-error-card{padding:11px 12px;margin-bottom:8px;border:1px solid #e7dfe4;border-radius:14px;background:#fbf8fa;overflow-wrap:anywhere;}
.worker-error-heading{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:7px;}.worker-error-type{font-size:11px;color:#956d7a;background:#f1e9ee;border-radius:7px;padding:3px 7px;}.worker-error-heading time{font-size:11px;color:#8491a3;}.worker-error-details summary{font-size:12px;color:#5e7490;cursor:pointer;}.worker-error-details p{font-size:12px;white-space:pre-wrap;line-height:1.5;}
.error-selection-dialog .errors-check{display:inline-grid!important;place-items:center;flex:0 0 24px;width:24px!important;height:24px!important;min-height:24px;padding:0!important;margin:0!important;border:1px solid #a7bbd2;border-radius:7px;background:white;color:white;cursor:pointer;}
.errors-check[aria-checked=true],.errors-check[aria-checked=mixed]{background:#6489b2!important;border-color:#6489b2!important;}.errors-check[aria-checked=true]::after{content:'✓';font-size:17px;font-weight:700;}.errors-check[aria-checked=mixed]::after{content:'−';font-size:18px;}.errors-check:focus-visible{outline:2px solid #6d97c6;outline-offset:3px;}
.app-page .audio-share-grid{display:flex;width:fit-content;max-width:100%;box-sizing:border-box;gap:3px;padding:4px;border:1px solid #dce6f1;border-radius:24px;background:#f4f7fb;}
.app-page .audio-share .share-btn{flex:0 0 34px;width:34px;height:34px;min-height:34px;border:0;background:transparent;border-radius:50%;color:#607fa3;box-shadow:none;}
.app-page .audio-share .share-btn i{font-size:17px;}.app-page .audio-share .share-btn:hover,.app-page .audio-share .share-btn:focus-visible{background:#e3edf8;color:#3f658e;}

.worker-card-heading strong{overflow-wrap:anywhere}

/* Audio duration totals share the report card styling. */
.admin-audio-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:7px;}
.app-page .admin-audio-total{display:flex;flex-direction:column;justify-content:space-between;border:1px solid #dce6f1;}
.app-page .admin-audio-total small{display:block;min-height:0;}
.app-page .admin-audio-total strong{display:block;margin-top:2px;}

.runtime-settings{margin-top:16px}.runtime-group{border:1px solid #dce6f1;background:#f7faff;border-radius:14px;margin:8px 0;padding:12px}.runtime-group>summary{cursor:pointer;font-weight:600;color:#506e90;list-style-position:inside}.runtime-field{display:grid;gap:7px;margin-top:14px;min-width:0}.runtime-field>label{font-size:13px;color:#627c97}.runtime-field input:not([type=checkbox]):not([type=radio]),.runtime-field textarea{box-sizing:border-box;width:100%;min-width:0}.runtime-language-list{max-height:240px;overflow:auto;overscroll-behavior:contain;display:grid;gap:5px}.runtime-choice{display:flex!important;align-items:center;gap:10px;padding:8px;border-radius:9px;background:#edf3fa;font-size:13px}.runtime-choice[hidden]{display:none!important}.runtime-field input[type=checkbox],.runtime-field input[type=radio]{appearance:auto!important;-webkit-appearance:auto!important;width:19px!important;height:19px!important;min-height:19px;margin:0!important;padding:0!important;flex:0 0 19px;accent-color:#6489b2}.runtime-choice:has(input:disabled){opacity:.5}.runtime-settings-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.runtime-settings-actions .btn{width:auto;flex:1 1 140px;font-size:12px;margin:0}.runtime-audit{padding:10px;border-bottom:1px solid #dce6f1;font-size:12px;overflow-wrap:anywhere}.runtime-audit p{margin:6px 0;white-space:pre-wrap}

/* Settings: shared blue-grey cards and touch-friendly controls. */
.app-page .runtime-settings{margin-top:18px;color:#4f6d8e;}
.app-page .runtime-intro{padding:12px 14px;border:1px solid #e0e9f3;border-radius:14px;background:#f1f6fc;font-size:12px;line-height:1.6;margin:0 0 14px;}
.app-page .runtime-group{padding:0;margin:9px 0;border:1px solid #dce6f1;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 3px 12px rgba(58,83,116,.035);}
.app-page .runtime-group>summary{display:flex;align-items:center;gap:11px;min-height:58px;box-sizing:border-box;padding:12px 14px;list-style:none;font-size:14px;font-weight:600;background:#f7faff;cursor:pointer;}
.runtime-group>summary::-webkit-details-marker,.runtime-history>summary::-webkit-details-marker{display:none;}
.app-page .runtime-group>summary>i{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:10px;background:#eaf1fa;color:#7392b4;font-size:14px;}
.app-page .runtime-group>summary>span{flex:1;min-width:0;}
.runtime-group>summary::after,.runtime-history>summary::after{content:'';width:7px;height:7px;flex:0 0 7px;border-right:2px solid #8da3bd;border-bottom:2px solid #8da3bd;transform:rotate(45deg);margin-right:4px;}
.runtime-group[open]>summary::after,.runtime-history[open]>summary::after{transform:rotate(225deg);}
.app-page .runtime-group[open]>summary{border-bottom:1px solid #e5edf6;}
.app-page .runtime-field{margin:0;padding:13px 14px;gap:8px;}
.app-page .runtime-field+.runtime-field{border-top:1px solid #edf2f8;}
.app-page .runtime-field>label{font-size:12px;line-height:1.5;font-weight:500;color:#667e99;}
.app-page .runtime-field input:not([type=checkbox]):not([type=radio]),.app-page .runtime-field textarea{border:1px solid #dce5f0;border-radius:12px;background:#f7f9fd;color:#466582;box-shadow:none;padding:11px 12px;font-family:inherit;font-size:16px;line-height:1.45;margin:0;}
.app-page .runtime-field textarea{resize:vertical;min-height:110px;}
.app-page .runtime-field input:focus-visible,.app-page .runtime-field textarea:focus-visible,.runtime-group>summary:focus-visible{outline:2px solid #8caccd;outline-offset:2px;}
.app-page .runtime-language-list{gap:6px;max-height:270px;padding:2px;scrollbar-width:thin;scrollbar-color:#c6d5e6 transparent;}
.app-page .runtime-choice{box-sizing:border-box;min-height:44px;padding:10px 11px;border:1px solid #e4ebf4;background:#fafbfd;border-radius:11px;color:#657d98;font-size:13px;cursor:pointer;}
.app-page .runtime-choice:has(input:checked){background:#edf4fc;border-color:#b5cce4;color:#476b91;}
.app-page .runtime-field .runtime-choice input{appearance:none!important;-webkit-appearance:none!important;display:grid;place-items:center;border:1.5px solid #b3c5d9;border-radius:6px;background:#fff;box-shadow:none;cursor:pointer;}
.app-page .runtime-field .runtime-choice input:checked{background:#7698bd;border-color:#7698bd;}
.runtime-choice input[type=checkbox]:checked::after{content:'';width:8px;height:4px;border-left:2px solid white;border-bottom:2px solid white;transform:rotate(-45deg) translateY(-1px);}
.app-page .runtime-field .runtime-choice input[type=radio]{border-radius:50%;}
.runtime-choice input[type=radio]:checked::after{content:'';width:7px;height:7px;border-radius:50%;background:#fff;}
.app-page .runtime-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:64px;}
.app-page .runtime-toggle-row>label{flex:1;cursor:pointer;margin:0;color:#536e8c;font-size:13px;}
.app-page .runtime-field input.runtime-switch{appearance:none!important;-webkit-appearance:none!important;position:relative;width:42px!important;height:25px!important;min-height:25px;flex:0 0 42px;border:1px solid #cbd7e5;border-radius:20px;background:#dce5ef;box-shadow:none;cursor:pointer;}
.runtime-switch::after{content:'';position:absolute;left:3px;top:3px;width:17px;height:17px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #526d8c30;transition:transform .15s;}
.app-page .runtime-field input.runtime-switch:checked{background:#7799bd;border-color:#7799bd;}
.runtime-switch:checked::after{transform:translateX(17px);}
.app-page .runtime-settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0 0;margin-top:4px;}
.app-page .runtime-settings-actions .btn{min-height:43px;border-radius:12px;font-size:12px;line-height:1.35;}
.app-page .runtime-settings-actions .runtime-save{grid-column:1/-1;background:#e6effa;border:1px solid #c9dbef;color:#486b91;font-size:14px;font-weight:600;}
.app-page .runtime-settings-actions .runtime-secondary{background:#f7f9fc;border:1px solid #e1e8f1;color:#7b8ea5;font-weight:400;}
.runtime-settings>[role=status]:empty{display:none;}
.app-page .runtime-history{margin-top:14px;border-top:1px solid #e3ebf4;padding-top:12px;}
.runtime-history>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;font-size:12px;color:#7188a2;cursor:pointer;padding:8px 0;}
.app-page .runtime-audit{border:1px solid #e4ebf4;border-radius:12px;background:#f8fafd;margin-top:8px;padding:12px;line-height:1.5;color:#7c8ea4;}
.runtime-audit>strong{color:#5c7899;font-size:11px;font-weight:600;}
@media(prefers-reduced-motion:reduce){.runtime-switch::after{transition:none;}}

/* Generation settings: separate related controls without changing their values. */
.runtime-generation-block{margin:12px;border:1px solid #dfe7f2;border-radius:14px;background:#fff;overflow:hidden}
.runtime-generation-block h4{margin:0;padding:14px 14px 5px;color:var(--text-primary,#456483);font-size:15px;line-height:1.4;font-weight:650}
.runtime-generation-help{margin:0;padding:0 14px 12px;color:#748397;font-size:13px;line-height:1.5}
.runtime-generation-block .runtime-field{border-top:1px solid #edf1f7}
@media(max-width:480px){.runtime-generation-block{margin:10px 8px}.runtime-generation-block .runtime-field{padding:12px}}

.audio-cleanup{margin:14px 0;padding:14px;border:1px solid #dbe5f1;border-radius:16px;background:#f5f8fc}
.audio-cleanup[hidden]{display:none!important}
.audio-cleanup h4{margin:0 0 8px;color:#466482;font-size:15px}
.audio-cleanup-options{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.audio-cleanup-options label{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid #dbe5f1;border-radius:12px;background:white;cursor:pointer;font-size:14px}
.audio-cleanup-options input{width:18px!important;height:18px!important;min-height:0!important;margin:0;appearance:auto;accent-color:#6389b1}
.audio-cleanup-actions{display:flex;flex-wrap:wrap;gap:8px}
.audio-cleanup-actions .btn{flex:1;min-height:44px;font-size:14px}
.audio-cleanup-actions .btn[aria-pressed=true]{background:#d9e7f6;border-color:#789bc1}
.audio-cleanup-actions [hidden]{display:none!important}

.audio-cleanup-actions .btn[aria-pressed=true]{box-shadow:inset 0 0 0 2px #789bc1;font-weight:650}

.audio-editor{margin:14px 0;padding:14px;border:1px solid #dbe5f1;border-radius:16px;background:#f5f8fc}
.audio-editor[hidden]{display:none!important}.audio-editor h4{margin:0 0 8px;font-size:15px;color:#466482}
.audio-wave{display:block;width:100%;height:100px;border-radius:10px;touch-action:none;margin:12px 0;cursor:ew-resize}
.audio-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.audio-editor-fields label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#627e9c}
.audio-editor-fields input[type=number]{width:100%;min-width:0;box-sizing:border-box;font-size:16px;padding:10px;background:white;border:1px solid #dbe5f1;border-radius:10px}
.audio-editor-fields input[type=range]{width:100%;accent-color:#6389b1;margin:10px 0;min-height:24px;padding:0}
.audio-editor .audio-cleanup-actions{margin-top:12px}

/* Compact device editor: waveform and playback form one surface. */
.audio-editor,.audio-cleanup{padding:12px;margin:10px 0;border:1px solid #dce6f1;border-radius:14px;background:#f7f9fc;box-shadow:none}
.audio-editor h4,.audio-cleanup h4{font-size:15px;font-weight:650;line-height:1.4;margin:0 0 4px;color:#426384}
.audio-editor .field-help,.audio-cleanup .field-help{font-size:12px;line-height:1.4;margin:4px 0 8px;color:#78899c}
.audio-wave{height:76px;border:1px solid #dbe5f0;border-bottom:0;border-radius:10px 10px 0 0;box-sizing:border-box;margin:10px 0 0}
.audio-editor #previewPlayerContainer{margin:0 0 10px;width:100%}
.audio-editor #previewPlayerContainer .audio-widget{max-width:none!important;box-sizing:border-box;margin:0!important;border:1px solid #dce6f1!important;border-top:0!important;background:#edf3fa!important;box-shadow:none!important;border-radius:0 0 10px 10px!important;padding:6px 10px!important;min-height:48px}
.audio-editor-fields{gap:10px}
.audio-editor-fields>div{min-width:0;padding:0;border:0;background:none}
.audio-editor-fields label{display:flex;flex-direction:row;align-items:center;gap:6px;font-size:12px;font-weight:500;line-height:1.25;color:#627e9c}
.audio-editor-fields label span{flex:1;min-width:0}
.audio-editor-fields input[type=number]{flex:0 1 82px;width:82px;min-width:0;min-height:42px;padding:7px 8px;border-radius:9px;font-size:16px;font-variant-numeric:tabular-nums;color:#365878}
/* Wave handles and exact numeric fields replace duplicate range tracks. */
.audio-editor-fields input[type=range]{display:none}
.audio-editor .audio-cleanup-actions,.audio-cleanup .audio-cleanup-actions{gap:6px;margin-top:8px}
.audio-editor .audio-cleanup-actions .btn,.audio-cleanup .audio-cleanup-actions .btn{min-height:44px;padding:8px 10px;border:1px solid #d2dfed;border-radius:10px;font-size:13px;line-height:1.3;box-shadow:none;background:#e5eef8;color:#426384;font-weight:600}
.audio-editor .audio-cleanup-actions .btn+ .btn{background:transparent;font-weight:500}
.audio-cleanup-options{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.audio-cleanup-options label{flex:1 1 85px;min-width:0;box-sizing:border-box;flex-direction:row;justify-content:center;gap:6px;padding:8px;min-height:44px;text-align:start;font-size:13px;line-height:1.3;color:#647b92;border-radius:10px;transition:background .15s,border-color .15s}
.audio-cleanup-options input{flex-shrink:0}
.audio-cleanup-options label:has(input:checked){background:#e2edf9;border-color:#89a7c7;color:#365b81}
.audio-cleanup-options label:focus-within{outline:2px solid #86a8cc;outline-offset:2px}
.audio-cleanup .audio-cleanup-actions .btn:first-child{flex-basis:100%}
.audio-cleanup .audio-cleanup-actions .btn[aria-pressed=true]{background:#dce9f7;border-color:#89a7c7;box-shadow:none}
.audio-cleanup [role=status]:empty{display:none}
.audio-cleanup [role=status]:not(:empty){padding:8px 10px;margin:8px 0 0;border-radius:8px;background:#eaf1f9}
.audio-editor button:disabled,.audio-cleanup button:disabled{opacity:.55;cursor:default}
@media(max-width:380px){.audio-editor,.audio-cleanup{padding:10px}.audio-editor-fields{gap:8px}.audio-editor-fields input[type=number]{width:70px;flex-basis:70px}.audio-cleanup-options label{padding:7px 5px}}

/* One editor surface, with contextual help and a separate A/B result switch. */
.audio-tools{margin:12px 0;border:1px solid #dce6f1;border-radius:16px;background:#f7f9fc;overflow:visible}
.audio-tools:not(:has(>section:not([hidden]))){display:none}
.audio-tools>.audio-editor,.audio-tools>.audio-cleanup{margin:0;border:0;border-radius:0;background:transparent;padding:12px;box-shadow:none}
.audio-tools>.audio-editor:not([hidden])+.audio-cleanup:not([hidden]){border-top:1px solid #dce6f1}
.audio-tool-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:30px;margin-bottom:6px}
.audio-tool-heading h4{margin:0;flex:1}
.audio-tool-help{position:relative;flex:0 0 auto}
.audio-tool-help summary{display:flex;align-items:center;justify-content:center;list-style:none;width:30px;height:30px;border-radius:50%;color:#6685a5;cursor:pointer;font-size:13px;font-weight:650;background:#e9f0f8;user-select:none}
.audio-tool-help summary::-webkit-details-marker{display:none}
.audio-tool-help summary:focus-visible{outline:2px solid #7c9fc4;outline-offset:2px}
.audio-tool-help[open] summary{background:#dbe8f6;color:#365b81}
.audio-tool-help .field-help{position:absolute;z-index:5;right:0;top:34px;width:min(260px,70vw);box-sizing:border-box;padding:12px;margin:0;background:#fff;border:1px solid #d9e4f0;border-radius:12px;box-shadow:0 8px 24px #36587820;font-size:13px;line-height:1.5}
.audio-tools .audio-wave{margin-top:4px}
.audio-trim-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 10px;margin-top:8px}
.audio-trim-footer>.field-help{flex:1 1 110px;margin:0;font-size:12px}
.audio-trim-footer>.audio-cleanup-actions{flex:0 1 auto;margin:0;max-width:100%}
.audio-trim-footer .btn{flex:0 1 auto!important}
.audio-tools .audio-cleanup-options{margin:8px 0 10px}
.audio-tools .audio-cleanup-actions .btn:first-child{flex-basis:auto}
.audio-result-switch{display:flex;gap:3px;padding:3px;margin-top:10px;background:#e7eef7;border:1px solid #dae5f1;border-radius:11px}
.audio-result-switch:not(:has(button:not([hidden]))){display:none}
.audio-result-switch button{flex:1;min-width:0;min-height:44px;margin:0;padding:7px 9px;font-size:13px;line-height:1.3;border:1px solid transparent;border-radius:8px;background:transparent;color:#627d99;box-shadow:none}
.audio-result-switch button[aria-pressed=true]{background:#fff;border-color:#dce6f1;color:#365b81;font-weight:600;box-shadow:0 1px 3px #3658780a}
.audio-result-switch button[hidden]{display:none!important}
@media(max-width:380px){.audio-tools>.audio-editor,.audio-tools>.audio-cleanup{padding:10px}.audio-trim-footer>.field-help{flex-basis:100%}.audio-trim-footer>.audio-cleanup-actions{width:100%}.audio-trim-footer .btn{flex:1!important}}

/* File selection is the editor header; processing is a secondary action. */
.audio-tools:has(>.file-section){display:block}
.audio-tools>.file-section{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;margin:0;min-width:0}
.audio-tools>.file-section.has-source{border-bottom:1px solid #dce6f1}
.audio-source-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#486987;font-size:13px;line-height:1.5}
.audio-source-name[hidden]{display:none}
.audio-tools #fileBtn{flex:1;width:auto;min-height:44px;padding:8px 12px;margin:0;border:1px solid #d2dfed;border-radius:10px;font-size:13px;line-height:1.3;box-shadow:none}
.audio-tools .has-source #fileBtn{flex:0 1 auto;max-width:55%;background:transparent;color:#547696}
.audio-tools>.audio-cleanup>.audio-cleanup-actions{justify-content:flex-end;margin-top:8px}
.audio-tools>.audio-cleanup>.audio-cleanup-actions>.btn{flex:0 1 auto;min-width:130px;max-width:100%;background:#e5eef8}
.audio-trim-footer>.audio-cleanup-actions{justify-content:flex-end}
.audio-tools+.preview-section:empty{display:none}
@media(max-width:380px){.audio-tools>.file-section{padding:10px;gap:8px}.audio-tools>.audio-cleanup>.audio-cleanup-actions>.btn{min-width:120px}}

/* Source controls must remain available before an audio file exists. */
.app-page #file.clone-content{padding:0;background:transparent;box-shadow:none;backdrop-filter:none}
.app-page #file>.file-section{display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:0;min-width:0}
.app-page #file>.file-section #fileBtn{flex:1;width:auto;min-width:44px;min-height:44px;margin:0;padding:10px 12px;border-radius:10px;font-size:14px}
.app-page #file>.file-section.has-source #fileBtn{flex:0 1 auto;max-width:55%}
.app-page #record.active>.record-section{display:flex;width:100%;box-sizing:border-box}
.app-page #record.active>.record-section>.btn{width:auto;min-width:44px;min-height:44px;flex:1 1 0}

/* Recorder actions: one primary control and a smaller reset alongside it. */
.app-page #record.active>.record-section{gap:8px;margin:12px 0;align-items:stretch}
.app-page #record.active>.record-section>#recordBtn,.app-page #record.active>.record-section>#stopRecordBtn{flex:1 1 auto;min-height:46px;border-radius:11px;padding:10px 14px}
.app-page #record.active>.record-section>#resetRecordBtn{flex:0 1 auto;width:auto;max-width:42%;min-height:46px;padding:10px 12px;border-radius:11px;background:transparent;box-shadow:none}
.app-page #screen-clone .upload-section{padding-top:12px;margin-top:12px;border-top:1px solid #e0e8f2;gap:8px}
.app-page #screen-clone .upload-section #uploadVoiceBtn{min-height:46px;border-radius:11px;box-shadow:none}

/* Trim actions remain on the same row, including small screens. */
.audio-trim-footer{display:block}
.audio-trim-footer>.field-help{margin:6px 0}
.audio-trim-footer>.audio-cleanup-actions{display:flex;flex-wrap:nowrap;width:100%;gap:8px;margin-top:8px}
.audio-trim-footer>.audio-cleanup-actions>.btn{flex:1 1 0!important;min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere;padding:8px;font-size:13px}
.audio-editor>.audio-result-switch{margin:4px 0 8px}

/* Equal step columns: numbers and labels have their own aligned rows. */
.app-page .clone-steps{align-items:stretch;gap:6px}
.app-page .clone-step{display:grid;grid-template-rows:24px 2.6em;align-content:center;justify-items:center;gap:5px;padding:8px 3px;font-size:12px;line-height:1.3;box-sizing:border-box}
.app-page .clone-step::before{content:attr(data-step);display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e9eff7;color:#6b829d;font-weight:600}
.app-page .clone-step.is-current::before{background:#d1e1f3;color:#42658e}
.app-page .clone-step.is-complete::before{background:#dcece5;color:#4b7169}
.app-page .clone-step-label{display:flex;align-items:center;justify-content:center;text-align:center;min-width:0;width:100%;height:2.6em;overflow-wrap:anywhere}
#maintenanceNotice:empty,#maintenanceNotice[hidden]{display:none!important}

/* Space between selection waveform and playback controls. */
.audio-tools .audio-wave{margin-bottom:10px;border:1px solid #dbe5f0;border-radius:10px}
.audio-editor #previewPlayerContainer .audio-widget{border-top:1px solid #dce6f1!important;border-radius:10px!important}

/* Unified cloning workspace, scoped to this screen only. */
.app-page #screen-clone .clone-tabs{margin:12px 0 16px;padding:4px;background:#edf2f9;border:0;border-radius:14px;gap:4px}
.app-page #screen-clone .clone-tab{min-height:46px;border-radius:11px;font-size:14px;padding:10px 8px}
.app-page #screen-clone .language-field{margin:0 0 16px}
.app-page #screen-clone #record>.reading-card{padding:16px;margin:0 0 12px;border:1px solid #e0e8f2;border-radius:16px;background:linear-gradient(135deg,#f4f8fd,#fafbfd);box-shadow:none}
.app-page #screen-clone .reading-heading{font-size:14px;font-weight:600;line-height:1.5;color:#486a8c}
.app-page #screen-clone #readingLanguage{font-size:12px;font-weight:400;color:#8292a4}
.app-page #screen-clone #readingText{font-size:17px;line-height:1.7;margin:12px 0;color:#334e68}
.app-page #screen-clone .reading-card>small{display:block;font-size:12px;line-height:1.5;color:#7e8fa2}
.app-page #screen-clone .mic-monitor{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px 16px;padding:12px 14px;margin:10px 0;border:1px solid #e1e9f3;background:#f6f9fd;border-radius:12px}
.app-page #screen-clone .mic-monitor[hidden]{display:none}
.app-page #screen-clone .mic-monitor-heading{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:11px}
.app-page #screen-clone #micTimer{font-size:23px;line-height:1.3;font-variant-numeric:tabular-nums}
.app-page #screen-clone .mic-level{height:7px;margin:0;background:#dfe8f3}
.app-page #screen-clone #micHint{grid-column:1/-1;min-height:0;font-size:12px;line-height:1.4;color:#7a8c9f}
.app-page #screen-clone .record-section{margin:10px 0 14px}
.app-page #screen-clone .record-section .btn{box-shadow:none;font-weight:600}
.app-page #file>.file-section{padding:12px;border:1px dashed #b8cce1;border-radius:14px;background:#f6f9fd;box-sizing:border-box;gap:12px}
.app-page #file>.file-section:not(.has-source){justify-content:center;min-height:78px}
.app-page #file>.file-section:not(.has-source) #fileBtn{flex:0 1 230px;background:#e4eef9;border:1px solid #ccdaeb;color:#466b91;box-shadow:none}
.app-page #file>.file-section.has-source{border-style:solid;border-color:#dce6f1;background:#f8fafd}
.audio-source-name{display:flex;flex-direction:column;gap:4px}
.audio-source-name strong{display:block;overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:600;white-space:nowrap}
.audio-source-name small{font-size:12px;font-variant-numeric:tabular-nums;color:#8294a8}
.audio-source-name[hidden]{display:none}
.app-page #file>.file-section.has-source #fileBtn{padding:8px 12px;min-height:42px;background:#edf3fa;border:1px solid #d8e4f1;color:#557799;box-shadow:none;font-size:13px}
.app-page #screen-clone .audio-tools{margin:12px 0;background:#f8fafd;border:1px solid #dce6f1;border-radius:16px}
.app-page #screen-clone .audio-tool-heading h4{font-size:14px}
.app-page #screen-clone .audio-editor-fields input{background:#fff}
.audio-effects-disclosure>summary{display:flex;align-items:center;justify-content:space-between;min-height:40px;gap:12px;cursor:pointer;list-style:none}
.audio-effects-disclosure>summary::-webkit-details-marker{display:none}
.audio-effects-disclosure>summary::after{content:'';width:7px;height:7px;border-right:1.5px solid #7390ad;border-bottom:1.5px solid #7390ad;transform:rotate(45deg);margin-right:5px;flex-shrink:0}
.audio-effects-disclosure[open]>summary::after{transform:rotate(225deg)}
.audio-effects-disclosure>summary h4{margin:0;font-size:14px}
.audio-effects-disclosure>summary:focus-visible{outline:2px solid #8caed0;outline-offset:3px;border-radius:6px}
.audio-effects-disclosure>.audio-cleanup-actions{justify-content:flex-end}
.audio-effects-disclosure>.audio-cleanup-actions>.btn{flex:0 1 auto;min-width:130px}
.app-page #screen-clone #recordingReview,.app-page #screen-clone #manualTranscriptPanel{margin:16px 0 10px;padding:14px;border:1px solid #dce6f1;border-radius:14px;background:#f7fafd;box-shadow:none}
.app-page #screen-clone #recordingReview>p,.app-page #screen-clone #manualTranscriptPanel>p{font-size:13px;line-height:1.5;color:#74889e;margin:8px 0 12px}
.app-page #screen-clone #recordingReview label,.app-page #screen-clone #manualTranscriptPanel label{display:block;font-size:12px;font-weight:600;margin:8px 0;color:#647e99}
.app-page #screen-clone #recordingTranscript,.app-page #screen-clone #manualTranscript{box-sizing:border-box;width:100%;background:#fff;border:1px solid #d9e4f0;border-radius:11px;padding:12px;font-size:16px;line-height:1.6;min-height:150px;box-shadow:none;margin:0 0 8px}
.app-page #screen-clone .upload-section{gap:10px;padding-top:14px;margin:14px 0 4px;border-top:1px solid #e2eaf3}
.app-page #screen-clone #cloneVoiceName{box-sizing:border-box;width:100%;min-height:46px;border:1px solid #d8e4f1;border-radius:11px;background:#f9fbfd;padding:10px 12px;font-size:16px;margin:0;box-shadow:none}
.app-page #screen-clone #uploadVoiceBtn{min-height:48px;background:#dce9f7;border:1px solid #c6d9ec;color:#3e638b;font-weight:650;box-shadow:none}

/* Lightweight waveform editor: a single surface, inline times, quiet tools. */
.app-page #screen-clone .audio-tools{background:transparent;border:0;border-radius:0;margin:14px 0}
.app-page #screen-clone .audio-tools>.audio-editor{padding:0 0 12px}
.app-page #screen-clone .audio-tools>.audio-cleanup{padding:6px 0;border-top:1px solid #e5ebf3}
.app-page #screen-clone .audio-tool-heading h4{font-size:13px;font-weight:500;color:#6c829a}
.app-page #screen-clone .audio-tool-help summary{background:transparent}
.app-page #screen-clone .audio-wave{border:0;border-radius:10px;margin-bottom:10px;height:76px}
.app-page #screen-clone .audio-editor #previewPlayerContainer .audio-widget{border:0!important;background:transparent!important;padding:2px 0!important;box-shadow:none!important}
.app-page #screen-clone .audio-editor-fields{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px 0;border-bottom:1px solid #edf1f6}
.app-page #screen-clone .audio-editor-fields>div{flex:1;min-width:0;padding:0;background:transparent;border:0}
.app-page #screen-clone .audio-editor-fields label{display:flex;align-items:center;gap:5px;font-size:12px;color:#7b8da1;font-weight:400}
.app-page #screen-clone .audio-editor-fields input[type=number]{flex:0 1 74px;width:74px;min-width:0;min-height:40px;padding:5px 3px;border:0!important;border-radius:6px;background:transparent!important;box-shadow:none;font-size:16px;color:#416587;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}
.app-page #screen-clone .audio-editor-fields input::-webkit-inner-spin-button,.app-page #screen-clone .audio-editor-fields input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.app-page #screen-clone .audio-editor-fields input:focus{background:#edf3fa!important;outline:2px solid #a7bfd9;outline-offset:0}
.app-page #screen-clone .audio-trim-footer>.field-help{font-size:11px;color:#8b9bae;margin:7px 0}
.app-page #screen-clone .audio-trim-footer>.audio-cleanup-actions{gap:6px;align-items:center;margin:4px 0 0}
.app-page #screen-clone .audio-trim-footer>.audio-cleanup-actions>.btn{flex:1 1 auto!important;padding:8px 9px;min-height:42px;border:0;background:#edf3fa;font-size:12px;font-weight:500;border-radius:9px;box-shadow:none}
.app-page #screen-clone .audio-trim-footer>.audio-cleanup-actions>.audio-restore-icon{display:flex;align-items:center;justify-content:center;flex:0 0 42px!important;width:42px;padding:0;background:transparent}
.app-page #screen-clone .audio-trim-footer>.audio-cleanup-actions>.audio-restore-icon[hidden]{display:none!important}
.app-page #screen-clone .audio-effects-disclosure>summary{min-height:44px}
.app-page #screen-clone .audio-effects-disclosure>summary h4{font-size:13px;font-weight:500}

.search-clear-wrap{position:relative;min-width:0;width:100%;flex:1 1 0;box-sizing:border-box}
.search-clear-wrap>input{width:100%;box-sizing:border-box;padding-inline-end:42px!important}
.search-clear-wrap>input::-webkit-search-cancel-button{-webkit-appearance:none}
.search-clear-button{position:absolute;inset-inline-end:3px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:38px!important;height:38px;min-height:0!important;padding:0!important;margin:0!important;border:0!important;border-radius:9px;background:transparent!important;color:#718ba5;box-shadow:none!important;cursor:pointer}
.search-clear-button[hidden]{display:none!important}.search-clear-button:focus-visible{outline:2px solid #8caed0}
.sample-search-row{display:flex;align-items:center;gap:8px;margin:12px 0}.sample-search-row>input{flex:1;min-width:0}
.sample-search-row .voice-filters-toggle{width:auto;flex:0 0 auto;min-height:44px;margin:0;padding:8px 12px}
.sample-search-row small{border-radius:20px;padding:2px 6px;background:#dce9f7}
.sample-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px;padding:10px;background:#f1f6fc;border:1px solid #dce6f1;border-radius:12px}
.sample-filters[hidden]{display:none!important}.sample-filters label{min-width:0;font-size:12px;color:#6b829c}.sample-filters select{box-sizing:border-box;width:100%;min-width:0;margin:5px 0 0;padding:8px;font-size:14px}
.admin-sample-card[hidden]{display:none!important}
.sample-bulk-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.sample-bulk-actions .btn{flex:1 1 160px;min-width:0;margin:0;min-height:44px;padding:9px 12px;font-size:13px;line-height:1.4;border:1px solid #d4e1ef;border-radius:11px;background:#e9f1fa;color:#476b90;box-shadow:none}
.sample-bulk-report{font-size:13px;line-height:1.5;color:#607c98;margin:8px 0}.sample-bulk-report:empty{display:none}.sample-bulk-report details{margin-top:6px}.sample-bulk-report p{margin:5px 0}
.transcript-copy-wrap{position:relative;min-width:0}.admin-voice-editor .transcript-copy-wrap textarea{box-sizing:border-box;width:100%;padding-bottom:46px!important;margin:0}
.transcript-copy-button{position:absolute;right:8px;bottom:8px;width:34px;min-height:34px;padding:5px;margin:0;border:1px solid #dbe5f1;border-radius:8px;background:#edf3fa;color:#5b7d9f;box-shadow:none}
@media(max-width:380px){.sample-filters{grid-template-columns:1fr}.sample-bulk-actions .btn{flex-basis:100%}}

/* Compact selectable effect cards; scoped to uploaded-file processing. */
.app-page #screen-clone .audio-cleanup .audio-cleanup-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.app-page #screen-clone .audio-cleanup .audio-effect-option{position:relative;display:flex;align-items:center;gap:10px;min-width:0;min-height:52px;margin:0;padding:10px 12px;border:1px solid #dfe7f0;border-radius:12px;background:#f9fbfe;color:#516c88;font-size:13px;line-height:1.35;cursor:pointer;transition:background .15s,border-color .15s}
.app-page #screen-clone .audio-cleanup .audio-effect-option span{min-width:0;overflow-wrap:anywhere}
.app-page #screen-clone .audio-cleanup .audio-effect-option:has(input:checked){background:#e7f0fa;border-color:#86a6c7;color:#365a7d}
.app-page #screen-clone .audio-cleanup .audio-effect-option:has(input:focus-visible){outline:2px solid #648bb4;outline-offset:2px}
.app-page #screen-clone .audio-cleanup .audio-effect-option:has(input:disabled){opacity:.55;cursor:default}
.app-page #screen-clone .audio-cleanup .audio-effect-option[hidden]{display:none!important}
.app-page #screen-clone .audio-cleanup .audio-effect-option input{appearance:none!important;flex:0 0 19px;width:19px!important;height:19px!important;border:1.5px solid #b9cadd;border-radius:6px;background:#fff;padding:0!important;margin:0!important;box-shadow:none}
.app-page #screen-clone .audio-cleanup .audio-effect-option input:checked{background:#6387ac;border-color:#6387ac;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.app-page #screen-clone .audio-effects-disclosure>.audio-cleanup-actions>.btn{width:100%;min-height:44px;border-radius:11px}
.app-page #screen-clone .audio-cleanup .audio-match-level{display:flex;align-items:center;gap:8px;padding:10px 0;margin:0}
.app-page #screen-clone .audio-cleanup .audio-match-level[hidden]{display:none!important}
.app-page #screen-clone .audio-match-level input{width:18px!important;height:18px!important;min-height:0!important;flex:0 0 18px;margin:0!important;accent-color:#6387ac}
.app-page #screen-clone .audio-cleanup .audio-quality-report:not(:empty){white-space:pre-line;padding:10px 12px;border-radius:10px;background:#edf3f9;line-height:1.6}
@media(max-width:360px){.app-page #screen-clone .audio-cleanup .audio-cleanup-options{grid-template-columns:1fr}}

/* Uniform processing tiles and the free-variant text editor. */
.app-page #screen-clone .audio-cleanup .audio-cleanup-options{grid-auto-rows:1fr;align-items:stretch}
.app-page #screen-clone .audio-cleanup .audio-effect-option{box-sizing:border-box;width:100%;height:100%;min-height:58px;align-self:stretch;justify-content:flex-start}
.app-page .variant-text-box{display:grid;gap:8px;padding:12px;border:1px solid #dce6f0;border-radius:12px;background:#f7faff;margin:12px 0 16px}
.app-page .variant-text-box>label{margin:0;font-size:13px;font-weight:600;color:#466482}
.app-page .variant-text-box>p{margin:0;font-size:12px;line-height:1.5;color:#71859b}
.app-page .variant-text-box>textarea{box-sizing:border-box;width:100%;min-height:130px;margin:0;padding:12px;border:1px solid #d6e2ee;border-radius:10px;background:#fff;resize:vertical;font:inherit;line-height:1.55}
.app-page .variant-text-box>.variant-text-error{color:#a54848}
.app-page .variant-text-error[hidden]{display:none!important}

/* The clear button wraps the search input: flex belongs to the wrapper. */
.voice-picker-dialog .voice-search-row>.search-clear-wrap{flex:1 1 0;min-width:0;width:auto}
.voice-picker-dialog .voice-search-row>.search-clear-wrap>.cs-search{display:block;width:100%;min-width:0;box-sizing:border-box;margin:0;padding:10px;padding-inline-end:42px}
.voice-picker-dialog .voice-search-row>.voice-filters-toggle{flex:0 0 auto}
