:root {
  --ink: #17221f;
  --muted: #68736f;
  --paper: #f5f4ef;
  --card: #fffef9;
  --line: #deddd5;
  --green: #d94d2f;
  --green-soft: #fff0ea;
  --blue: #416c8d;
  --blue-soft: #e7eef4;
  --amber: #a65d22;
  --amber-soft: #fff0dc;
  --shadow: 0 18px 45px rgba(31, 48, 43, 0.08);
}

* { box-sizing: border-box; }

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(226, 108, 72, 0.13), transparent 26rem),
    var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.topbar {
  min-height: 78px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid rgba(217, 77, 47, 0.14);
  background: rgba(245, 244, 239, 0.88);
  backdrop-filter: blur(12px);
}

.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: 38px; height: 38px; border-radius: 11px; object-fit: cover; }
.brand strong { display: block; font-size: 19px; line-height: 1.1; }
.topbar-primary { display: flex; align-items: center; gap: 26px; margin-right: auto; }
.topbar-primary a { padding: 10px 0; color: #645e5a; font-size: 14px; font-weight: 750; text-decoration: none; }
.topbar-primary a:hover { color: #d94d2f; }
.topbar-primary a[aria-current="page"] { color: #25211f; box-shadow: inset 0 -2px var(--green); }
.account-menu { display: flex; align-items: center; gap: 12px; font-size: 14px; }

/* Пополнение — единственное залитое пятно в шапке. Прежде здесь спорили
   за внимание три оранжевых оттенка и три разные формы подряд. */
.credits-button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  color: #fff; background: var(--green);
  font-weight: 750; text-decoration: none; white-space: nowrap;
}
.credits-button:hover { background: #bd3f25; }
.credits-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.account-dropdown { position: relative; }
.account-dropdown > summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 3px; border-radius: 999px;
  list-style: none; cursor: pointer;
}
.account-dropdown > summary::-webkit-details-marker { display: none; }
.account-dropdown > summary:hover { background: rgba(217, 77, 47, .07); }
.account-initials {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: #ece9e0; color: #25211f;
  font-size: 12px; font-weight: 800;
}
.account-chevron {
  width: 16px; height: 16px; color: var(--muted);
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.account-dropdown[open] > summary .account-chevron { transform: rotate(180deg); }
.account-dropdown-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
  width: 232px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: 0 16px 40px rgba(31, 48, 43, .12);
}
.account-dropdown-head { margin-bottom: 5px; padding: 9px 12px 11px; border-bottom: 1px solid var(--line); }
.account-dropdown-head strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.account-dropdown-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.account-dropdown-panel a, .account-dropdown-panel button {
  display: block; width: 100%; padding: 9px 12px;
  border: 0; border-radius: 9px;
  color: var(--ink); background: none;
  font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.3;
  text-align: left; text-decoration: none; cursor: pointer;
}
.account-dropdown-panel a:hover, .account-dropdown-panel button:hover { background: var(--paper); }
.account-dropdown-panel form { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--line); }
.mobile-account-menu, .mobile-folder-menu { display: none; }

.page { flex: 1 0 auto; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 90px; }
.recorder { display: grid; grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr); gap: 54px; align-items: center; margin-bottom: 82px; padding: 38px; color: white; background: #183b32; border-radius: 30px; box-shadow: 0 24px 60px rgba(24, 59, 50, .24); }
.recorder .eyebrow { color: #a8d6c7; }
.recorder h1 { font-size: clamp(38px, 5vw, 60px); }
.recorder .lead { color: #c4d9d2; }
.recorder-panel { padding: 24px; color: var(--ink); background: var(--card); border-radius: 22px; box-shadow: 0 16px 38px rgba(7, 27, 21, .2); }
.recorder-state { display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: center; }
.recorder-state strong, .recorder-state span { display: block; }
.recorder-state strong { font-size: 17px; }
.recorder-state span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.recorder-state time { color: var(--green); font: 500 34px/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.record-dot { width: 12px; height: 12px; margin: 0 !important; border-radius: 50%; background: #a8b2ae; box-shadow: 0 0 0 6px rgba(104, 115, 111, .12); }
.is-recording .record-dot { background: #d14343; box-shadow: 0 0 0 7px rgba(209, 67, 67, .14); animation: record-pulse 1.3s ease-in-out infinite; }
.is-recording.is-paused .record-dot { background: #d69a38; box-shadow: 0 0 0 7px rgba(214, 154, 56, .14); animation: none; }
@keyframes record-pulse { 50% { transform: scale(.72); opacity: .7; } }
.recorder-input-meter { --recorder-input-level: 0%; display: grid; grid-template-columns: auto minmax(120px, 1fr); gap: 12px; align-items: center; margin-top: 18px; color: var(--muted); font-size: 12px; }
.recorder-input-meter[hidden] { display: none; }
.recorder-input-dots { position: relative; display: block; height: 34px; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .56); }
.recorder-input-dot-layer { position: absolute; inset: 0 8px; display: flex; align-items: center; justify-content: space-between; color: #d8cbc3; }
.recorder-input-dot-layer i { display: block; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.recorder-input-dot-layer i:nth-child(2), .recorder-input-dot-layer i:nth-child(9), .recorder-input-dot-layer i:nth-child(17) { width: 8px; height: 8px; }
.recorder-input-dot-layer i:nth-child(3), .recorder-input-dot-layer i:nth-child(11) { width: 12px; height: 12px; }
.recorder-input-dot-layer i:nth-child(5), .recorder-input-dot-layer i:nth-child(13) { width: 16px; height: 16px; }
.recorder-input-dot-layer i:nth-child(6), .recorder-input-dot-layer i:nth-child(14), .recorder-input-dot-layer i:nth-child(19) { width: 10px; height: 10px; }
.recorder-input-dot-layer i:nth-child(8), .recorder-input-dot-layer i:nth-child(16) { width: 14px; height: 14px; }
.recorder-input-dot-layer i:nth-child(10) { width: 20px; height: 20px; }
.recorder-input-dot-layer i:nth-child(18) { width: 18px; height: 18px; }
.recorder-input-dots-active { color: var(--home-coral); clip-path: inset(0 calc(100% - var(--recorder-input-level)) 0 0); transition: clip-path .08s linear; }
.recorder-v2.is-silent .recorder-input-dots { box-shadow: inset 0 0 0 1px rgba(209, 67, 67, .35); }
.recorder-v2.is-silent .recorder-input-dots-active { color: #c84d42; }
.recorder-capture-controls { display: none; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.recorder-v2.is-recording .recorder-capture-controls { display: flex; }
.recorder-capture-controls button { flex: 1 1 150px; }
.recorder-actions, .preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.recorder button { min-height: 46px; padding: 11px 16px; border: 0; border-radius: 12px; font: 800 14px/1.2 inherit; cursor: pointer; }
.recorder button:disabled { cursor: not-allowed; opacity: .48; }
.record-button, .primary-button { color: white; background: var(--green); }
.record-button { flex: 1 1 210px; }
.record-button span { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: #ff8585; }
.secondary-button { color: var(--green); background: var(--green-soft); }
.danger-button { color: #9a3232; background: #fbe8e6; }
.recording-preview { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.recording-preview audio { display: block; }
.recording-player-v2 { --recording-wave-progress: 0%; display: grid; grid-template-columns: 42px auto minmax(96px, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid #efd9cf; border-radius: 14px; background: linear-gradient(135deg, #fff9f6, #fff0ea); }
.recording-player-button { display: grid; width: 38px; min-height: 38px !important; height: 38px; place-items: center; padding: 0 !important; border-radius: 50% !important; color: #fff; background: var(--green); }
.recording-player-button svg { width: 20px; height: 20px; fill: currentColor; }
.recording-player-time { color: #8d5545; font: 700 12px/1.1 inherit; font-variant-numeric: tabular-nums; }
.recording-player-wave { position: relative; min-width: 0; height: 32px; padding: 0 !important; overflow: hidden; background: transparent; }
.recording-player-wave svg { display: block; width: 100%; height: 100%; }
.recording-wave-base { fill: #ddb5a8; opacity: .42; }
.recording-wave-progress { fill: #d94d2f; clip-path: inset(0 calc(100% - var(--recording-wave-progress)) 0 0); transition: clip-path .12s linear; }
.recording-player-wave:hover .recording-wave-base { opacity: .56; }
.recorder-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.local-queue { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.local-queue-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.local-queue-heading strong { color: var(--ink); font-size: 13px; }
.local-queue-heading > div span { display: inline-block; margin-left: 5px; }
.local-queue-heading button { padding: 4px 8px; border: 0; border-radius: 7px; color: var(--muted); background: #edf0ee; font: 700 11px/1.2 inherit; cursor: pointer; }
.local-queue-heading button:hover { color: var(--green); }
.local-queue-items { display: grid; gap: 8px; margin-top: 10px; }
.local-queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--green-soft); }
.local-queue-item strong, .local-queue-item span { display: block; }
.local-queue-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.local-queue-item span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.local-queue-state { color: var(--green); font-size: 11px; font-weight: 800; white-space: nowrap; }
.local-queue-item.is-failed { background: var(--amber-soft); }
.local-queue-item.is-failed .local-queue-state { color: var(--amber); }
.local-queue-item.is-blocked { background: var(--amber-soft); }
.local-queue-item.is-blocked .local-queue-state { color: var(--amber); }
.local-queue-hint { white-space: normal; }
.local-queue-hint a { font-weight: 800; text-decoration: underline; }
.upload-progress { margin-top: 18px; }
.upload-progress > div { height: 9px; overflow: hidden; background: var(--green-soft); border-radius: 999px; }
.upload-progress span { display: block; width: 0; height: 100%; background: var(--green); border-radius: inherit; transition: width .2s ease; }
.upload-progress p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.processing-start-form { display: grid; gap: 12px; max-width: 560px; margin-top: 20px; }
.processing-start-form label { display: grid; gap: 7px; font-weight: 700; }
.processing-start-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; }
.processing-start-form small, .processing-state { color: var(--muted); }
.hero, .detail-header { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 42px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; max-width: 800px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 500; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; line-height: 1.15; font-weight: 500; }
.lead { max-width: 650px; margin: 18px 0 0; color: var(--muted); font-size: 18px; }
.hero-number { min-width: 150px; text-align: right; }
.hero-number strong { display: block; color: var(--green); font: 500 72px/1 Georgia, serif; }
.hero-number span { color: var(--muted); }

.recording-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; }
.recording-card { display: flex; flex-direction: column; min-height: 360px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.recording-card:hover { transform: translateY(-3px); border-color: rgba(30, 102, 82, .45); }
.card-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.status { padding: 5px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 800; }
.card-title-editor { margin-top: 26px; }
.card-title-button { width: 100%; padding: 0; border: 0; color: var(--ink); background: transparent; font: 500 31px/1.15 Georgia, "Times New Roman", serif; text-align: left; cursor: text; }
.card-title-button:hover, .card-title-button:focus-visible { color: var(--green); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 5px; }
.card-title-editor form { display: grid; gap: 7px; }
.card-title-editor form[hidden] { display: none; }
.card-title-editor label { color: var(--muted); font-size: 12px; font-weight: 800; }
.card-title-editor form div { display: flex; flex-wrap: wrap; gap: 7px; }
.card-title-editor input { flex: 1 1 210px; min-width: 0; padding: 10px 12px; border: 1px solid var(--green); border-radius: 10px; color: var(--ink); background: white; font: 700 15px/1.2 inherit; }
.card-title-editor form button { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--green); background: white; font: 800 12px/1 inherit; cursor: pointer; }
.card-title-editor form button[type="submit"] { border-color: var(--green); color: white; background: var(--green); }
.filename { margin: 8px 0 0; color: var(--muted); word-break: break-word; }
.card-stats, .summary-stats { display: grid; margin: 30px 0 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-stats { grid-template-columns: repeat(4, 1fr); }
dl div { min-width: 0; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 4px 0 0; font-size: 18px; font-weight: 750; }
.notice { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--amber); font-weight: 700; }
.notice span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--amber-soft); }
.card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 22px; }
.open-link { display: inline-block; color: var(--green); font-weight: 800; text-decoration: none; }
.open-link b { margin-left: 5px; }
.card-trash-action { flex: 0 0 auto; }
.card-trash-action button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #e4c8c4; border-radius: 11px; color: #8c352e; background: #fff7f5; cursor: pointer; }
.card-trash-action button:hover, .card-trash-action button:focus-visible { border-color: #b65a50; background: #ffe9e5; }
.card-trash-action svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.empty-state { padding: 70px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 22px; }

.back-link { display: inline-block; margin-bottom: 30px; color: var(--green); font-weight: 800; text-decoration: none; }
.detail-header { align-items: center; }
.detail-header h1 { font-size: clamp(38px, 5vw, 60px); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.download-menu { margin-top: 18px; }
.retention-date, .purge-date { margin: 8px 0 0; color: var(--amber); font-size: 12px; font-weight: 700; }
.trash-action { margin-top: 10px; }
.trash-action button { padding: 8px 12px; border: 1px solid #e4c8c4; border-radius: 10px; color: #8c352e; background: #fff7f5; font: 700 12px/1.2 inherit; cursor: pointer; }
.trash-list { display: grid; gap: 12px; }
.trash-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.trash-card h2 { margin: 0; font-size: 20px; }
.trash-card button { min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; color: white; background: var(--green); font: 800 13px/1.2 inherit; cursor: pointer; }
.download-link { display: inline-flex; align-items: center; min-height: 42px; padding: 10px 16px; border-radius: 12px; color: white; background: var(--green); text-decoration: none; font-size: 14px; font-weight: 800; }
.download-link:hover { background: #174f40; }
.export-options { position: relative; }
.export-options summary { display: inline-flex; align-items: center; min-height: 42px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--green); background: var(--card); font-size: 14px; font-weight: 800; cursor: pointer; list-style: none; }
.export-options summary::-webkit-details-marker { display: none; }
.export-options[open] summary { border-color: var(--green); }
.export-options form { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; display: grid; gap: 10px; width: min(360px, calc(100vw - 48px)); padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.export-options label { display: grid; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 800; }
.export-options select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font: inherit; }
.export-toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
[data-transcript-export-options] { display: grid; gap: 10px; }
[data-transcript-export-options][hidden] { display: none; }
.export-options small { color: var(--muted); line-height: 1.4; }
.export-options button { min-height: 42px; border: 0; border-radius: 10px; color: white; background: var(--green); font: 800 13px/1.2 inherit; cursor: pointer; }
.summary-stats { flex: 0 0 360px; grid-template-columns: repeat(3, 1fr); padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.summary-stats div { padding: 0 14px; border-right: 1px solid var(--line); }
.summary-stats div:last-child { border: 0; }
.summary-stats dd { font-size: 28px; font-family: Georgia, serif; }
.summary-stats .warning-stat dd { color: var(--amber); }

.player-panel { position: sticky; top: 14px; z-index: 10; display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 24px; padding: 18px 22px; color: white; background: #183b32; border-radius: 20px; box-shadow: 0 20px 50px rgba(24, 59, 50, .25); }
.player-copy strong, .player-copy span { display: block; }
.player-copy span { margin-top: 3px; color: #b9d1ca; font-size: 13px; }
audio { width: 100%; height: 42px; }

.transcript-section { margin-top: 64px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 24px; }
.transcript-views { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.transcript-views a { padding: 7px 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 800; }
.transcript-views a.is-active { color: white; background: var(--green); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.speaker-two { background: var(--blue); }
.uncertain-dot { background: var(--amber); }
.transcript { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.segment { padding: 22px 26px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--green); transition: box-shadow .2s ease; }
.segment:last-child { border-bottom: 0; }
.segment-speaker-two { border-left-color: var(--blue); background: var(--blue-soft); }
.segment-uncertain { border-left-color: var(--amber); background: var(--amber-soft); }
.segment.is-active-segment { position: relative; z-index: 1; box-shadow: inset 0 0 0 3px rgba(30, 102, 82, .58), 0 8px 24px rgba(30, 102, 82, .12); }
.segment.is-active-segment .timestamp { color: white; background: var(--green); }
.timestamp { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 5px 9px; border: 0; border-radius: 8px; color: var(--green); background: var(--green-soft); font: 800 13px/1.4 inherit; cursor: pointer; }
.timestamp-play-icon { width: 11px; height: 11px; fill: currentColor; }
.segment-uncertain .timestamp { color: var(--amber); background: #fff8ed; }
.record-detail-v2 .segment-edit-form .timestamp {
  height: auto;
  min-height: 0;
  padding: 5px 9px;
  border-radius: 8px;
}
.segment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 24px; }
.segment-meta strong { font-size: 14px; }
.uncertain-label { color: var(--amber); font-size: 12px; font-weight: 800; }
.segment-delete-button { display: grid; flex: 0 0 auto; width: 28px; height: 28px; margin-left: auto; padding: 0; border: 0; border-radius: 999px; place-items: center; color: var(--muted); background: transparent; cursor: pointer; }
.segment-delete-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.segment-delete-button:hover, .segment-delete-button:focus-visible { color: var(--amber); background: var(--amber-soft); }
.record-detail-v2 .segment-edit-form .segment-delete-button {
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}
.record-detail-v2 .segment-edit-form .segment-delete-button:hover,
.record-detail-v2 .segment-edit-form .segment-delete-button:focus-visible {
  color: var(--amber);
  background: var(--amber-soft);
}
.corrected-label { color: var(--green); font-size: 12px; font-weight: 800; }
.segment-body p { margin: 8px 0 0; font-size: 18px; }
.editor-note { margin-bottom: 18px; padding: 16px 18px; border: 1px solid #cfe2db; border-radius: 14px; color: var(--green); background: var(--green-soft); }
.editor-note strong { display: block; margin-bottom: 4px; }
.correction-success { margin: 0 0 18px; padding: 13px 16px; border-radius: 12px; color: #15513f; background: #dff3eb; font-weight: 800; }
.speaker-names-panel { margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.speaker-names-panel > div:first-child strong, .speaker-names-panel > div:first-child span { display: block; }
.speaker-names-panel > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.speaker-name-forms { display: grid; gap: 10px; margin-top: 14px; }
.speaker-name-forms form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.speaker-name-forms label { display: grid; gap: 5px; font-size: 12px; font-weight: 800; }
.speaker-name-forms input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font: inherit; }
.speaker-name-forms input:focus { outline: 3px solid rgba(30, 102, 82, .14); border-color: var(--green); }
.speaker-name-forms button { min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; color: white; background: var(--green); font: 800 13px/1.2 inherit; cursor: pointer; }
.batch-correction-toolbar { position: sticky; top: 14px; z-index: 12; display: none; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); opacity: 0; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease; }
.batch-correction-toolbar.is-visible { display: flex; opacity: 1; transform: translateY(0); }
.batch-correction-toolbar span { color: var(--muted); font-size: 14px; }
.batch-correction-toolbar button { min-height: 42px; padding: 10px 16px; border: 0; border-radius: 10px; color: white; background: var(--green); font: 800 13px/1.2 inherit; cursor: pointer; }
.batch-correction-toolbar button:disabled { cursor: default; opacity: .45; }
.batch-correction-toolbar.is-error { border-color: #e4c8c4; background: #fff7f5; }
.document-record-detail { padding-bottom: 56px; }
.document-record-detail > .back-link { margin-top: 30px; }
.normalized-dialogue-preview { display: grid; gap: 14px; margin: 0 0 22px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .72); }
.normalized-dialogue-preview article { padding: 0; }
.normalized-dialogue-preview p { margin: 4px 0 0; line-height: 1.62; white-space: pre-line; }
.normalized-speaker-name { padding: 0; border: 0; color: var(--green); background: transparent; font: 800 14px/1.3 inherit; cursor: pointer; }
.normalized-speaker-name:hover, .normalized-speaker-name:focus-visible { text-decoration: underline; outline: none; }
.segment-edit-form { display: grid; gap: 14px; margin-top: 10px; }
.segment-edit-form[hidden] { display: none; }
.segment-edit-form label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 800; }
.segment-edit-form label span { color: var(--muted); font-weight: 500; }
.segment-edit-form textarea, .segment-edit-form select, .segment-edit-form input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; font: inherit; }
.segment-edit-form textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.segment-edit-form textarea:focus, .segment-edit-form select:focus, .segment-edit-form input:focus { outline: 3px solid rgba(30, 102, 82, .14); border-color: var(--green); }
.speaker-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.segment-edit-form button { justify-self: start; min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; color: white; background: var(--green); font: 800 13px/1.2 inherit; cursor: pointer; }
.segment-edit-form button:hover { background: #174f40; }

.llm-actions { display: grid; justify-items: start; gap: 8px; margin-top: 16px; }
.llm-actions form { margin: 0; }
.llm-actions button, .primary-action-link { display: inline-flex; align-items: center; min-height: 44px; padding: 11px 16px; border: 0; border-radius: 11px; color: white; background: var(--green); font: 800 14px/1.2 inherit; text-decoration: none; cursor: pointer; }
.llm-actions small { max-width: 620px; color: var(--muted); }
.result-chain { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.result-chain-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.result-chain-heading span { color: var(--muted); font-size: 13px; }
.result-chain-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.result-chain-steps li { min-width: 0; }
.result-step { display: flex; align-items: center; gap: 11px; min-height: 68px; padding: 11px 13px; border: 2px solid transparent; border-radius: 13px; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.result-step:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(31, 45, 39, .10); }
.result-step-number { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.72); font-weight: 900; }
.result-step strong, .result-step small { display: block; }
.result-step strong { font-size: 14px; line-height: 1.2; }
.result-step small { margin-top: 4px; color: inherit; opacity: .78; font-size: 12px; }
.result-step-ready { color: #175943; background: #dff3e9; }
.result-step-working { color: #70510c; background: #fff0c8; }
.result-step-locked { color: #727b77; background: #edf0ee; cursor: default; }
.result-step-failed { color: #8c352e; background: #f8deda; }
.result-step.is-current { border-color: currentColor; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.document-header { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 28px; }
.document-header h1 { margin-top: 8px; }
.document-status { padding: 9px 12px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 800; }
.document-status-failed { color: var(--amber); background: var(--amber-soft); }
.document-wait-panel, .document-error-panel, .document-editor-panel { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.document-wait-panel p, .document-error-panel p { margin: 7px 0 0; color: var(--muted); }
.document-error-panel { border-color: #efd6bd; background: var(--amber-soft); }
.document-save-error-panel { margin: 0 0 18px; padding: 16px 18px; border: 1px solid #efd6bd; border-radius: 14px; background: var(--amber-soft); }
.document-save-error-panel strong { display: block; margin-bottom: 4px; color: #7a4a1a; }
.document-save-error-panel p { margin: 0; color: var(--muted); }
.document-save-error-panel a { display: inline-block; margin-top: 8px; color: var(--green); font-weight: 800; }
.document-text-label { display: grid; gap: 9px; font-size: 14px; font-weight: 800; }
.document-textarea { width: 100%; min-height: 60vh; padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; font: 17px/1.65 inherit; resize: vertical; }
.document-textarea:focus { outline: 3px solid rgba(30, 102, 82, .14); border-color: var(--green); }
.document-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.document-editor-actions button { min-height: 44px; padding: 11px 17px; border: 0; border-radius: 11px; color: white; background: var(--green); font: 800 14px/1.2 inherit; cursor: pointer; }
.document-editor-actions button:disabled { color: var(--muted); background: #e5e9e7; cursor: not-allowed; }
.document-editor-actions span { color: var(--amber); font-size: 13px; font-weight: 800; }

.text-document-normalized {
  background:
    radial-gradient(circle at 90% 5%, rgba(170, 195, 129, .19), transparent 27rem),
    radial-gradient(circle at 5% 18%, rgba(238, 111, 72, .08), transparent 28rem),
    #fffaf5;
}
.text-document-normalized > .page {
  width: min(1120px, calc(100% - 56px));
  padding-top: 34px;
}
.text-document-normalized .back-link { color: #cc5132; }
.text-document-normalized .result-chain,
.text-document-normalized .document-editor-panel {
  border-color: #ecdcd1;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(93, 58, 41, .05);
}
.text-document-normalized .document-header {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #ecdcd1;
  border-radius: 20px;
  background: rgba(255, 253, 250, .88);
  box-shadow: 0 12px 34px rgba(93, 58, 41, .06);
}
.text-document-normalized .document-header::after {
  content: "Aa";
  position: absolute;
  right: clamp(22px, 5vw, 56px);
  bottom: -46px;
  color: rgba(109, 145, 77, .12);
  font: 800 clamp(120px, 18vw, 220px)/1 Georgia, serif;
  pointer-events: none;
}
.text-document-normalized .document-header > div { position: relative; z-index: 1; }
.text-document-normalized .document-header .eyebrow { color: #608848; }
.normalization-document-lead {
  max-width: 610px;
  margin: 18px 0 0;
  color: #70625a;
  font-size: 16px;
  line-height: 1.6;
}
.text-document-normalized .document-status {
  position: relative;
  z-index: 1;
  color: #527b3e;
  background: #e8f0df;
}
.text-document-normalized .editor-note {
  color: #566946;
  border-color: #d7e3c9;
  background: #f1f6eb;
}
.text-document-normalized .document-textarea {
  border-color: #e5d8ce;
  background: #fffefd;
  box-shadow: inset 0 1px 2px rgba(93, 58, 41, .03);
}
.text-document-normalized .document-textarea:focus {
  outline-color: rgba(109, 145, 77, .18);
  border-color: #8eae69;
}
.text-document-normalized .document-editor-actions button { background: #d95a3b; }
.text-document-normalized .document-editor-actions button:hover { background: #c3482c; }

.login-shell { min-height: calc(100vh - 230px); display: grid; place-items: center; }
.login-card { width: min(100%, 590px); padding: 52px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 12px auto 0; font-size: clamp(38px, 6vw, 58px); }
.login-card .lead { margin: 20px auto 0; }
.login-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 26px; border-radius: 20px; color: white; background: var(--green); font-size: 32px; font-weight: 800; box-shadow: 0 12px 28px rgba(30, 102, 82, .22); }
.login-providers { display: grid; gap: 12px; margin-top: 32px; }
.yandex-login, .vk-login, .telegram-login, .max-login { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 14px 20px; border-radius: 14px; text-decoration: none; font-weight: 800; box-sizing: border-box; }
.yandex-login { color: #171717; background: #ffdd2d; }
.yandex-login span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: white; background: #fc3f1d; font-weight: 800; }
.vk-login { color: #fff; background: #07f; }
.telegram-login { color: #fff; background: linear-gradient(135deg, #2aabee, #229ed9); }
.max-login { color: #fff; background: linear-gradient(135deg, #7658ff, #5b35df); }
.vk-login span, .telegram-login span, .max-login span { display: grid; place-items: center; min-width: 32px; height: 28px; font-size: 14px; font-weight: 900; }
.telegram-login span, .max-login span { width: 28px; min-width: 28px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; }
.messenger-login-confirm form { margin-top: 26px; }
.messenger-login-confirm button { width: 100%; padding: 14px 20px; border: 0; border-radius: 14px; color: #fff; background: #7658ff; font: inherit; font-weight: 800; cursor: pointer; }
.messenger-login-confirm button:hover { background: #6243e8; }
.auth-error, .auth-note { margin: 24px 0 0; padding: 12px 14px; border-radius: 12px; color: var(--amber); background: var(--amber-soft); font-weight: 700; }
.login-footnote { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

.landing-hero { max-width: 640px; margin: 4px auto 0; text-align: center; }
.landing-hero .eyebrow { text-align: center; }
.landing-hero h1 { margin: 10px 0 0; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; }
.landing-hero .lead { margin: 16px auto 0; }
.landing-hero-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 14px 28px; border-radius: 999px; color: #fff; background: var(--green); font-weight: 800; text-decoration: none; box-shadow: 0 16px 32px rgba(217, 77, 47, .24); }
.landing-hero-cta:hover { background: #c23f24; }

.landing-hero-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

/* Три возможности одной строкой. Ни рамок, ни фона: сетки обведённых
   карточек читались как таблица и делали страницу угловатой. */
.landing-essentials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; max-width: 620px; margin: 56px auto 0; text-align: center; }
.landing-essentials strong { display: block; margin-top: 8px; font-size: 15px; }
.landing-essentials small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.landing-essential-icon { display: inline-grid; place-items: center; color: var(--green); }
.landing-essential-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.landing-privacy-note { max-width: 560px; margin: 48px auto 0; padding: 14px 18px; text-align: center; color: var(--muted); font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.landing-privacy-note a { color: var(--blue); font-weight: 700; }

.landing .login-card { margin: 48px auto 0; }

/* Обучающие видео: партиал tutorial_video.html, страница /guide,
   блок на лендинге и подсказка новичку на главной. */
.tutorial-video { margin: 0; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.tutorial-video-player { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #17221f; }
.tutorial-video-caption { margin-top: 16px; }
.tutorial-video-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; }
.tutorial-video-heading strong { font-size: 17px; }
.tutorial-video-duration { flex: none; padding: 4px 12px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 800; }
.tutorial-video-summary { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tutorial-video-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.tutorial-video-topics li { padding: 5px 12px; border-radius: 999px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); font-size: 12px; }

.guide-page { max-width: 900px; margin: 0 auto; }
.guide-intro { text-align: center; }
.guide-intro h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); }
.guide-intro .lead { max-width: 620px; margin: 14px auto 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.guide-videos { display: grid; gap: 24px; margin-top: 40px; }
.guide-footer-note { margin-top: 32px; padding: 16px 20px; text-align: center; color: var(--muted); font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.guide-footer-note p { margin: 0; }
.guide-footer-note a { color: var(--blue); font-weight: 700; }


.guide-hint { position: relative; display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 16px; }
.guide-hint-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--green); background: var(--green-soft); }
.guide-hint-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.guide-hint-copy { flex: 1 1 auto; min-width: 0; }
.guide-hint-copy strong { display: block; font-size: 15px; }
.guide-hint-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.guide-hint-cta { flex: none; padding: 10px 18px; border-radius: 999px; color: white; background: var(--green); font-weight: 700; font-size: 14px; }
.guide-hint-dismiss { flex: none; width: 30px; height: 30px; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.guide-hint-dismiss:hover { color: var(--ink); background: var(--paper); }

.feedback-shell { display: grid; grid-template-columns: minmax(0, .8fr) minmax(440px, 1.2fr); gap: 54px; align-items: start; }
.feedback-copy { padding-top: 18px; }
.feedback-copy h1 { font-size: clamp(40px, 5vw, 62px); }
.privacy-note { margin-top: 30px; padding: 18px 20px; border-left: 4px solid var(--amber); border-radius: 12px; color: #78471e; background: var(--amber-soft); }
.privacy-note strong, .privacy-note p { display: block; }
.privacy-note p { margin: 6px 0 0; }
.feedback-card { padding: 30px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.feedback-form { display: grid; gap: 10px; }
.feedback-form label { margin-top: 10px; font-size: 14px; font-weight: 800; }
.feedback-form label span, .feedback-form small { color: var(--muted); font-size: 12px; font-weight: 500; }
.feedback-form select, .feedback-form textarea, .feedback-form input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font: inherit; }
.feedback-form textarea { min-height: 190px; resize: vertical; }
.feedback-form select:focus, .feedback-form textarea:focus, .feedback-form input:focus { outline: 3px solid rgba(30, 102, 82, .14); border-color: var(--green); }
.feedback-form button { min-height: 48px; margin-top: 16px; padding: 12px 18px; border: 0; border-radius: 12px; color: white; background: var(--green); font: 800 14px/1.2 inherit; cursor: pointer; }
.feedback-form button:hover { background: #174f40; }
.feedback-limit { margin: 2px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.feedback-success, .feedback-error, .feedback-unavailable { margin-bottom: 20px; padding: 16px 18px; border-radius: 12px; }
.feedback-success { color: var(--green); background: var(--green-soft); }
.feedback-error { color: var(--amber); background: var(--amber-soft); }
.feedback-unavailable { color: var(--muted); background: var(--blue-soft); }
.feedback-success p, .feedback-error p, .feedback-unavailable p { margin: 5px 0 0; }
.feedback-success a, .feedback-error a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
/* Предупреждение о суточном лимите: жёлтое, когда лимит уже исчерпан, и
   спокойное синее, пока до него есть запас. */
.quota-notice { margin: 0 0 20px; padding: 16px 18px; border-radius: 12px; color: var(--amber); background: var(--amber-soft); }
.quota-notice.is-info { color: var(--muted); background: var(--blue-soft); }
.quota-notice a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.quota-hint { display: block; margin-top: 6px; font-size: 14px; }
/* Список дел. Одно поле ввода вместо формы с календарём: дата говорится
   словами и разбирается теми же правилами, что и речь. */
/* Полоса намеренно узкая: строка дела должна читаться одним взглядом, а
   кнопки оставаться рядом с текстом, а не уезжать к краю экрана. */
.todo-page { width: min(100%, 640px); margin: 0 auto; display: grid; gap: 18px; }
.todo-head h1 { font-size: clamp(30px, 4vw, 44px); }
.todo-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.todo-add { display: flex; flex-wrap: wrap; gap: 10px; }
.todo-add input { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.todo-add input:focus { outline: 3px solid rgba(30, 102, 82, .14); border-color: var(--green); }
/* .primary-button задаёт только цвет: форму ему придаёт правило рекордера,
   которого здесь нет. Поэтому скругление и отступы указаны явно. */
.todo-add .primary-button { min-height: 48px; padding: 12px 22px; border: 0; border-radius: 12px; font: 800 14px/1.2 inherit; cursor: pointer; }
.todo-add .primary-button:hover { background: #174f40; }
.todo-hint { margin: -10px 0 0; color: var(--muted); font-size: 12px; }
/* Запись голосом. Одна кнопка в покое, одна в записи -- выбирать нечего,
   и это главное: заметку диктуют на ходу. */
.todo-record { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: -6px; }
.todo-record-button, .todo-record-stop { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 800 14px/1.2 inherit; cursor: pointer; }
.todo-record-button:hover { border-color: var(--green); color: var(--green); }
.todo-record-dot { width: 10px; height: 10px; border-radius: 50%; background: #cf5c49; }
.todo-record-stop { border-color: #cf5c49; color: white; background: #cf5c49; }
.todo-record.is-recording .todo-record-dot { animation: todo-pulse 1.2s ease-in-out infinite; }
@keyframes todo-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .todo-record.is-recording .todo-record-dot { animation: none; } }
.todo-record-time { font-variant-numeric: tabular-nums; font-weight: 800; }
.todo-record-status { flex: 1 1 100%; color: var(--muted); font-size: 12px; }
.todo-record-status.is-error { color: var(--amber); }
.todo-transcribing { color: var(--blue); font-size: 12px; }
.todo-failed { color: var(--amber); font-size: 12px; font-weight: 700; }
.todo-audio { width: 100%; max-width: 320px; height: 32px; margin-top: 4px; }
.todo-group h2 { display: flex; align-items: baseline; gap: 9px; font-size: 15px; }
.todo-group h2 span { color: var(--muted); font-size: 12px; font-weight: 700; }
.todo-group-overdue h2 { color: var(--amber); }
.todo-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.todo-row { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
/* Гибкий ряд с переносом, а не сетка с фиксированными колонками: на узком
   экране кнопки уезжают на вторую строку, но ничто не вылезает за край. */
.todo-main { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.todo-main > form { display: contents; }
.todo-check { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; padding: 0; border: 2px solid #cfd6d2; border-radius: 50%; background: transparent; color: var(--green); font: 700 13px/1 inherit; cursor: pointer; }
.todo-check:hover { border-color: var(--green); background: var(--green-soft); }
.todo-check.is-checked { border-color: var(--green); background: var(--green-soft); }
.todo-body { flex: 1 1 150px; display: grid; gap: 3px; min-width: 0; }
.todo-body strong { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.todo-due { color: var(--muted); font-size: 12px; }
.todo-group-overdue .todo-due { color: var(--amber); font-weight: 800; }
.todo-notes { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.todo-source { color: var(--muted); font-size: 11px; }
.todo-actions { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 2px; }
.todo-actions button, .todo-edit-link { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 700 15px/1 inherit; text-decoration: none; cursor: pointer; }
.todo-actions button:hover, .todo-edit-link:hover { background: #eef1ef; color: var(--ink); }
.todo-star.is-on { color: #e0a325; }
.todo-delete:hover { color: var(--amber); }
/* Важное подсвечено фоном, а не только звёздочкой: цвет виден боковым
   зрением при беглом просмотре списка, значок -- нет. */
.todo-row.is-starred { border-color: #ecd9a8; background: #fffaef; }
.todo-row.is-done .todo-body strong { color: var(--muted); text-decoration: line-through; }
/* Категории -- фильтр над разделами по срокам, а не вкладки вместо них:
   «что у меня сегодня» должно оставаться видным целиком. Свои имена с
   префиксом todo-cat, потому что файл стилей один на весь сервис. */
.todo-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font-size: 13px; text-decoration: none; }
.todo-cat-chip:hover { border-color: var(--green); color: var(--ink); }
.todo-cat-chip span:last-child { color: var(--muted); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.todo-cat-chip.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.todo-cat-chip.is-active span:last-child { color: var(--paper); opacity: .7; }
.todo-cat-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; }
.todo-cat-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.todo-add select { min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.todo-cats-panel { margin-top: -6px; }
.todo-cats-panel summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.todo-cat-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.todo-cat-add input { flex: 1 1 180px; min-width: 0; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; }
.todo-cat-add .primary-button { min-height: 40px; padding: 9px 16px; border: 0; border-radius: 10px; font: 800 13px/1.2 inherit; cursor: pointer; }
.todo-cat-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.todo-cat-list li { display: flex; align-items: center; gap: 6px; }
.todo-cat-rename { flex: 1 1 auto; display: flex; align-items: center; gap: 7px; min-width: 0; }
.todo-cat-rename input { flex: 1 1 120px; min-width: 0; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 13px; }
.todo-cat-rename button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--muted); font: 700 12px/1.2 inherit; cursor: pointer; }
.todo-cat-rename button:hover { border-color: var(--green); color: var(--green); }
.todo-cat-delete { min-width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 700 16px/1 inherit; cursor: pointer; }
.todo-cat-delete:hover { background: #eef1ef; color: var(--amber); }
/* Правка -- отдельная страница, а не всплывающая панель: на телефоне
   всплывающее над списком неизбежно упирается в край экрана. */
.todo-edit-page { width: min(100%, 520px); margin: 0 auto; display: grid; gap: 16px; }
.todo-edit-form { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.todo-edit-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.todo-edit-form input, .todo-edit-form textarea, .todo-edit-form select { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.todo-edit-form input:focus, .todo-edit-form textarea:focus, .todo-edit-form select:focus { outline: 3px solid rgba(30, 102, 82, .14); border-color: var(--green); }
.todo-edit-when { display: flex; flex-wrap: wrap; gap: 12px; }
.todo-edit-when label { flex: 1 1 130px; min-width: 0; }
.todo-edit-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.todo-edit-form .primary-button { min-height: 44px; padding: 11px 20px; border: 0; border-radius: 11px; font: 800 14px/1.2 inherit; cursor: pointer; }
.todo-done-panel summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.todo-empty { padding: 24px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
/* Замки платного доступа. Тон спокойный, а не тревожный: это предложение,
   а не ошибка, и в блоке ровно одно действие. */
.access-note { margin: 0; color: var(--muted); font-size: 13px; }
.access-note a { color: var(--green); font-weight: 800; }
.access-locked, .export-locked, .transcript-locked { display: grid; gap: 9px; justify-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--blue-soft); }
.access-locked strong, .export-locked strong, .transcript-locked strong { font-size: 15px; }
.access-locked p, .export-locked p, .transcript-locked p { margin: 0; color: var(--muted); font-size: 13px; }
.transcript-locked { margin-top: 18px; }
.transcript-locked small { color: var(--muted); font-size: 12px; }
.export-locked { min-width: 260px; }
/* Панель заметок в Google Tasks. Пока видна только владельцу. */
.inbox-shell { max-width: 920px; margin: 0 auto; }
.inbox-shell h1 { font-size: clamp(36px, 5vw, 58px); }
.inbox-list { display: grid; gap: 18px; margin-top: 30px; }
.inbox-item { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }

.monitoring-page { display: grid; gap: 24px; }
.admin-users-page { display: grid; gap: 24px; }
.admin-secondary-link, .admin-back-link { color: var(--green); font-weight: 800; text-decoration: none; }
.admin-secondary-link:hover, .admin-back-link:hover { text-decoration: underline; }
.admin-summary-cards { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; }
.admin-summary-cards article, .admin-users-panel { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.admin-summary-cards span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-summary-cards strong { display: block; margin-top: 7px; font-size: 27px; }
.admin-user-search { display: grid; gap: 8px; max-width: 540px; }
.admin-user-search label, .admin-list-caption { color: var(--muted); font-size: 13px; }
.admin-user-search div { display: flex; gap: 10px; }
.admin-user-search input { min-width: 0; flex: 1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.admin-user-search button { padding: 10px 17px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font: 800 14px/1 inherit; cursor: pointer; }
.admin-list-caption { margin: 20px 0 10px; }
.admin-table-wrap { overflow-x: auto; }
.admin-users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-users-table th, .admin-users-table td { padding: 13px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-users-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.admin-users-table td > a { color: var(--green); font-weight: 800; text-decoration: none; }
.admin-users-table td > a:hover { text-decoration: underline; }
.admin-users-table small, .admin-users-table em { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-style: normal; }
.user-status { text-transform: uppercase; font-weight: 800; }.user-status.status-blocked { color: #b8473e; }
.admin-empty { color: var(--muted); text-align: center; padding: 25px !important; }
.admin-pagination { display: flex; justify-content: space-between; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.admin-pagination a { color: var(--green); font-weight: 800; text-decoration: none; }
.admin-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-detail-wide { grid-column: 1 / -1; }
.admin-event-list { display: grid; gap: 10px; margin-top: 18px; }
.admin-quota-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.admin-quota-heading h2 { margin: 4px 0 6px; }.admin-quota-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-quota-state { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--muted); background: #edf0ee; font-size: 12px; font-weight: 800; }
.admin-quota-state.is-active { color: #286447; background: #e0f1e7; }
.admin-quota-notice { padding: 11px 13px; border-radius: 11px; color: #286447; background: #e0f1e7; font-weight: 800; }
.admin-quota-current { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.admin-quota-current > div { padding: 13px; border-radius: 12px; background: var(--green-soft); }
.admin-quota-current span, .admin-quota-current strong, .admin-quota-current small { display: block; }
.admin-quota-current span, .admin-quota-current small { color: var(--muted); font-size: 11px; }.admin-quota-current strong { margin: 5px 0; font-size: 17px; }
.admin-quota-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.admin-quota-form label, .admin-quota-remove label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-quota-form input, .admin-quota-form textarea, .admin-quota-remove input { width: 100%; box-sizing: border-box; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.admin-quota-reason { grid-column: 1 / -1; }.admin-quota-reason textarea { resize: vertical; }
.admin-quota-check { grid-column: 1 / -1; display: flex !important; grid-template-columns: auto 1fr; align-items: center; justify-content: start; }
.admin-quota-check input { width: auto; }
.admin-quota-actions { grid-column: 1 / -1; }.admin-quota-actions button, .admin-quota-remove button { padding: 10px 15px; border: 0; border-radius: 9px; color: #fff; background: var(--green); font: 800 13px/1.2 inherit; cursor: pointer; }
.admin-quota-remove { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-quota-remove button { background: #b8322a; }.admin-quota-audit { margin-top: 18px; }.admin-quota-audit summary { color: var(--green); font-weight: 800; cursor: pointer; }
.account-page { display: grid; gap: 24px; }
.account-heading, .account-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.account-heading h1 { margin: 3px 0 8px; }
.account-primary-link { color: #fff; background: #d94d2f; padding: 11px 15px; border-radius: 11px; font-weight: 800; text-decoration: none; }
.account-primary-link:hover { background: #bd3f25; }
.account-summary-cards { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.account-summary-cards article, .account-panel { padding: 22px; border: 1px solid #eadfd5; border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: 0 10px 28px rgba(81,55,39,.06); }
.account-summary-cards span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.account-summary-cards strong { display: block; margin-top: 7px; font-size: 28px; }
.account-balance-card { align-self: start; padding-block: 18px !important; color: #fff; border-color: #e86344 !important; background: linear-gradient(135deg, #ef7051, #d94d2f) !important; }
.account-balance-card span { color: rgba(255,255,255,.82); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-panel-wide { grid-column: 1 / -1; }
.account-panel h2 { margin: 4px 0 0; font-size: 21px; }
.account-table-wrap { overflow-x: auto; margin-top: 18px; }
.account-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.account-table th, .account-table td { padding: 12px 10px; border-bottom: 1px solid #eee3da; text-align: left; vertical-align: middle; }
.account-table th { color: #746d68; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.account-table td:last-child { text-align: right; }
.account-table a { color: #c9472a; font-weight: 800; text-decoration: none; }
.account-event-list { display: grid; gap: 10px; margin-top: 18px; }
.account-event-list > div { display: grid; gap: 3px; padding: 11px 0; border-bottom: 1px solid #eee3da; }
.account-event-list > div:last-child { border-bottom: 0; }
.account-event-list strong { font-size: 15px; }
.account-event-list span, .account-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.account-profile { display: grid; gap: 11px; margin: 18px 0 0; }
.account-profile div { display: grid; gap: 3px; }
.account-profile dt { color: var(--muted); font-size: 11px; font-weight: 800; }
.account-profile dd { margin: 0; overflow-wrap: anywhere; }
.account-note { margin: 18px 0 0; }
.account-admin-notifications form { display: grid; gap: 10px; margin-top: 18px; }
.account-admin-notifications label { color: #5c493d; font-size: 13px; font-weight: 800; }
.account-admin-notifications select { width: 100%; padding: 12px 13px; border: 1px solid #dfcfc2; border-radius: 12px; color: #332820; background: #fff; font: inherit; }
.account-admin-notifications button { justify-self: start; padding: 11px 15px; border: 0; border-radius: 11px; color: #fff; background: #7658ff; font: inherit; font-weight: 800; cursor: pointer; }
.account-admin-notifications button:hover { background: #6243e8; }
.account-secondary-link { display: inline-block; margin-top: 14px; color: #7658ff; font-size: 13px; font-weight: 800; text-decoration: none; }
.account-secondary-link:hover { text-decoration: underline; }
.account-empty { color: var(--muted); text-align: center; }
.admin-event-list div { padding: 12px; border-radius: 12px; background: var(--green-soft); }
.admin-event-list strong, .admin-event-list span { display: block; }.admin-event-list span { margin-top: 4px; color: var(--muted); font-size: 12px; }

/* Unified support center */
.support-center {
  --support-coral: #d94d2f;
  --support-coral-dark: #b93d24;
  --support-navy: #182723;
  --support-line: #eadfd7;
  display: grid;
  gap: 26px;
  max-width: 1120px;
  margin: 0 auto;
}
.support-back-link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  color: #9a4b38;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.support-back-link:hover { color: var(--support-coral-dark); transform: translateX(-2px); }
.support-center-hero, .support-thread-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  padding: 8px 0 10px;
}
.support-center-hero > div:first-child, .support-thread-hero > div { min-width: 0; }
.support-center h1 {
  max-width: 900px;
  font-size: clamp(42px, 5.2vw, 64px);
  line-height: .98;
}
.support-center .lead { max-width: 720px; font-size: 17px; line-height: 1.55; }
.support-hero-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 11px; }
.support-count {
  padding: 9px 12px;
  border: 1px solid #ead8ce;
  border-radius: 999px;
  color: #7b6d66;
  background: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.support-primary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 17px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #e05b3b, #c84328);
  box-shadow: 0 10px 24px rgba(198, 66, 40, .19);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.support-primary-action:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(198, 66, 40, .25); }
.support-list-panel, .support-conversation, .support-reply-card, .support-preferences {
  overflow: hidden;
  border: 1px solid var(--support-line);
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 16px 40px rgba(76, 50, 37, .07);
}
.support-table-wrap { overflow-x: auto; }
.support-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.support-table th {
  padding: 17px 16px;
  border-bottom: 1px solid var(--support-line);
  color: #85756d;
  background: #fffaf7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.support-table td { padding: 17px 16px; border-bottom: 1px solid #f0e8e2; vertical-align: middle; }
.support-table tbody tr:last-child td { border-bottom: 0; }
.support-table tbody tr { transition: background .16s ease; }
.support-table tbody tr:hover { background: #fffaf7; }
.support-user-name { color: #332b27; font-size: 13px; }
.support-subject-link { color: var(--support-navy); font-weight: 850; text-decoration: none; }
.support-subject-link:hover { color: var(--support-coral); }
.support-preview-cell { max-width: 340px; color: #665e59; line-height: 1.4; }
.support-open-cell { text-align: right; }
.support-open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--support-coral);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.support-open-link:hover span { transform: translateX(3px); }
.support-open-link span { transition: transform .16s ease; }
.support-channel, .support-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.support-channel::before, .support-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; opacity: .72; }
.support-channel-web { color: #236c59; background: #e8f4ef; }
.support-channel-telegram { color: #277aab; background: #e8f4fb; }
.support-channel-max { color: #6651bb; background: #f0edff; }
.support-status-open { color: #b6492e; background: #fff0ea; }
.support-status-in_progress { color: #936016; background: #fff3d9; }
.support-status-waiting_user { color: #42678a; background: #eaf2fa; }
.support-status-resolved { color: #28725c; background: #e7f4ee; }
.support-status-closed { color: #6d6966; background: #efedeb; }
.support-empty { max-width: 520px; margin: 0 auto; padding: 64px 28px; text-align: center; }
.support-empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 18px;
  color: var(--support-coral);
  background: #fff0ea;
  font-size: 25px;
}
.support-empty h2 { font-size: 30px; }
.support-empty p { margin: 11px auto 22px; color: var(--muted); }
.support-preferences { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.support-preferences-copy { padding: 30px; background: radial-gradient(circle at 95% 0, rgba(225, 91, 59, .13), transparent 18rem); }
.support-preferences-copy h2 { font-size: 32px; }
.support-preferences-copy > p:last-of-type { max-width: 600px; margin: 12px 0 0; color: var(--muted); }
.support-channel-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.support-channel-cards > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 9px; align-items: center; padding: 12px; border: 1px solid #ece4de; border-radius: 14px; color: #79716d; background: rgba(255,255,255,.7); }
.support-channel-cards > div > span { display: grid; width: 34px; height: 34px; grid-row: 1 / 3; place-items: center; border-radius: 10px; color: #8b817c; background: #eeeae7; font-weight: 900; }
.support-channel-cards strong, .support-channel-cards small { display: block; min-width: 0; }
.support-channel-cards strong { overflow: hidden; color: #4d4642; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.support-channel-cards small { color: #9a918c; font-size: 10px; }
.support-channel-cards .is-connected { border-color: #cfe5dc; background: #f4faf7; }
.support-channel-cards .is-connected > span { color: #fff; background: #2f8068; }
.support-channel-cards .is-connected small { color: #2f8068; font-weight: 800; }
.support-channel-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.support-channel-actions form { margin: 0; }
.support-channel-connect, .support-channel-secondary {
  min-height: 40px; padding: 9px 14px; border: 0; border-radius: 11px;
  font: inherit; font-size: 12px; font-weight: 850; cursor: pointer;
}
.support-channel-connect { color: #fff; background: #2aabee; box-shadow: 0 8px 18px rgba(42,171,238,.2); }
.support-channel-connect:hover { background: #168dca; }
.support-channel-connect-max { background: #7357ff; box-shadow: 0 8px 18px rgba(115,87,255,.2); }
.support-channel-connect-max:hover { background: #5d43dc; }
.support-channel-secondary { color: #6e625c; background: #f3eeea; }
.support-channel-secondary:hover { background: #eae2dc; }
.support-channel-unavailable { margin: 0; color: var(--muted); font-size: 11px; }
.support-link-ready {
  margin-top: 14px; padding: 16px; border: 1px solid #b9dff3; border-radius: 14px;
  background: linear-gradient(135deg, #f2faff, #fff);
}
.support-link-ready strong { color: #176f9d; font-size: 13px; }
.support-link-ready p { margin: 5px 0 10px; color: #61727b; font-size: 11px; line-height: 1.5; }
.support-link-ready a { color: #087fbd; font-size: 12px; font-weight: 850; text-decoration: none; }
.support-link-ready-max { border-color: #d4cdfd; background: linear-gradient(135deg, #f7f5ff, #fff); }
.support-link-ready-max strong, .support-link-ready-max a { color: #6047d3; }
.support-preferences-form { display: grid; align-content: center; gap: 8px; padding: 30px; border-left: 1px solid var(--support-line); background: #fffdfb; }
.support-preferences-form label, .support-reply-form > label, .support-reply-footer > label { color: #544b46; font-size: 12px; font-weight: 850; }
.support-preferences-form select, .support-reply-form select, .support-reply-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #ddcfc7;
  border-radius: 12px;
  color: var(--support-navy);
  background: #fff;
  font: 500 14px/1.4 inherit;
  outline: none;
}
.support-preferences-form select, .support-reply-form select { min-height: 44px; padding: 10px 38px 10px 12px; }
.support-preferences-form select:focus, .support-reply-form select:focus, .support-reply-form textarea:focus { border-color: #df785f; box-shadow: 0 0 0 3px rgba(217,77,47,.1); }
.support-preferences-form p { margin: 6px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.support-preferences-form button, .support-reply-form button {
  min-height: 44px;
  padding: 11px 17px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--support-coral);
  font: 850 14px/1.2 inherit;
  cursor: pointer;
}
.support-preferences-form button:hover, .support-reply-form button:hover { background: var(--support-coral-dark); }
.support-thread-page { max-width: 920px; }
.support-thread-hero { align-items: flex-start; }
.support-thread-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.support-thread-page h1 { font-size: clamp(40px, 5vw, 60px); }
.support-thread-person { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.support-thread-person strong { color: #403934; }
.support-conversation { padding: 28px; }
.support-conversation-heading, .support-reply-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.support-conversation-heading h2, .support-reply-heading h2 { font-size: 30px; }
.support-conversation-heading > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.support-message-list { display: grid; gap: 20px; margin-top: 26px; }
.support-message { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; }
.support-message-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #fff; background: #355f53; font-size: 12px; font-weight: 900; }
.support-message-admin .support-message-avatar { background: var(--support-coral); }
.support-message-system .support-message-avatar { color: #496575; background: #e8f1f6; }
.support-message-content { min-width: 0; padding: 16px 18px; border: 1px solid #e9e0da; border-radius: 5px 18px 18px 18px; background: #fffdfb; }
.support-message-admin .support-message-content { border-color: #efd6cc; background: #fff5f0; }
.support-message-content header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 16px; }
.support-message-content header strong { font-size: 13px; }
.support-message-content header span { color: #938984; font-size: 10px; }
.support-message-content p { margin: 12px 0 0; color: #342e2a; font-size: 15px; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message-content small { display: block; margin-top: 12px; color: #9c928d; font-size: 10px; }
.support-reply-card { padding: 28px; }
.support-reply-heading > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--support-coral); background: #fff0ea; font-size: 21px; }
.support-reply-form { display: grid; gap: 8px; margin-top: 24px; }
.support-reply-form textarea { min-height: 170px; resize: vertical; padding: 15px; }
.support-reply-footer { display: grid; grid-template-columns: auto minmax(190px, 280px) 1fr auto; gap: 10px; align-items: center; margin-top: 8px; }
.support-reply-footer > p { margin: 0; color: var(--muted); font-size: 12px; }
.support-reply-footer > button { grid-column: -2 / -1; justify-self: end; min-width: 170px; }
.support-reply-footer > p + button { grid-column: -2 / -1; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 760px) {
  .support-center-body > .page { width: min(100% - 28px, 1120px); padding: 28px 0 56px; }
  .support-center { gap: 20px; }
  .support-back-link { font-size: 13px; }
  .support-center-hero, .support-thread-hero { display: grid; gap: 20px; padding-top: 2px; }
  .support-center h1, .support-thread-page h1 { font-size: clamp(38px, 12vw, 48px); line-height: 1.01; overflow-wrap: anywhere; }
  .support-center .lead { margin-top: 13px; font-size: 14px; }
  .support-hero-actions { width: 100%; justify-content: space-between; }
  .support-primary-action { min-height: 42px; padding-inline: 14px; }
  .support-list-panel, .support-conversation, .support-reply-card, .support-preferences { border-radius: 19px; }
  .support-table-wrap { overflow: visible; }
  .support-table, .support-table tbody, .support-table tr, .support-table td { display: block; width: 100%; }
  .support-table thead { display: none; }
  .support-table tbody { display: grid; gap: 12px; padding: 12px; }
  .support-table tbody tr { padding: 16px; border: 1px solid #eee3dc; border-radius: 16px; background: #fffdfb; }
  .support-table tbody tr:hover { background: #fffdfb; }
  .support-table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; border: 0; text-align: right; }
  .support-table td::before { flex: 0 0 auto; color: #998d86; content: attr(data-label); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
  .support-table .support-preview-cell { display: block; max-width: none; margin-top: 5px; padding-top: 12px; border-top: 1px solid #eee5df; text-align: left; }
  .support-table .support-preview-cell::before { display: block; margin-bottom: 6px; }
  .support-table .support-open-cell { display: block; margin-top: 7px; padding-top: 12px; border-top: 1px solid #eee5df; text-align: left; }
  .support-table .support-open-cell::before { display: none; }
  .support-open-link { justify-content: space-between; font-size: 14px; }
  .support-empty { padding: 44px 20px; }
  .support-empty h2 { font-size: 27px; }
  .support-preferences { grid-template-columns: 1fr; }
  .support-preferences-copy, .support-preferences-form { padding: 22px 18px; }
  .support-preferences-form { border-top: 1px solid var(--support-line); border-left: 0; }
  .support-channel-cards { grid-template-columns: 1fr; }
  .support-channel-cards > div { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .support-channel-cards > div > span { grid-row: auto; }
  .support-channel-cards small { justify-self: end; }
  .support-conversation, .support-reply-card { padding: 20px 16px; }
  .support-conversation-heading h2, .support-reply-heading h2 { font-size: 27px; }
  .support-message { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
  .support-message-avatar { width: 34px; height: 34px; border-radius: 11px; font-size: 10px; }
  .support-message-content { padding: 14px; border-radius: 4px 15px 15px 15px; }
  .support-message-content header { display: grid; }
  .support-message-content p { font-size: 14px; }
  .support-reply-form textarea { min-height: 150px; }
  .support-reply-footer { grid-template-columns: 1fr; }
  .support-reply-footer > label, .support-reply-footer > select, .support-reply-footer > p, .support-reply-footer > button { grid-column: 1; width: 100%; }
  .support-reply-footer > button { justify-self: stretch; margin-top: 4px; }
}
.monitoring-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.monitoring-heading h1 { font-size: clamp(40px, 5vw, 62px); }
.monitoring-freshness { min-width: 190px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.monitoring-freshness span, .monitoring-freshness strong { display: block; }
.monitoring-freshness span { color: var(--muted); font-size: 12px; }
.monitoring-freshness strong { margin-top: 5px; font-size: 14px; }
.metric-cards { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 12px; }
.metric-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.metric-card > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.metric-card strong { display: block; margin-top: 8px; font-size: 27px; }
.metric-card small { color: var(--muted); }
.metric-bar { overflow: hidden; height: 6px; margin-top: 12px; border-radius: 999px; background: #e8ece8; }
.metric-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s; }
.monitoring-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.monitor-panel { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.monitor-panel-wide { grid-column: 1 / -1; }
.monitor-panel-title { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.chart-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.legend-cpu::before { background: #1e6652; }.legend-memory::before { background: #d18a24; }.legend-gpu::before { background: #6d5cae; }
.legend-vram::before { background: #3185a8; }
[data-resource-chart] { display: block; width: 100%; margin-top: 20px; }
.monitoring-summary { display: grid; gap: 12px; margin: 20px 0 0; }
.monitoring-summary div { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.monitoring-summary dd { font-size: 15px; }
.usage-cards, .capacity-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.usage-cards div, .capacity-facts div { padding: 16px; border-radius: 14px; background: var(--green-soft); }
.usage-cards span, .capacity-facts span { display: block; color: var(--muted); font-size: 12px; }
.usage-cards strong, .capacity-facts strong { display: block; margin-top: 5px; font-size: 24px; }
.capacity-panel > p:not(.eyebrow) { color: var(--muted); }
.service-check-note { color: var(--muted); font-size: 12px; }
.service-status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.service-status-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.service-status-card strong, .service-status-card span { display: block; }
.service-status-card span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.service-status-card::before { content: ""; float: right; width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; background: #a7afaa; }
.service-status-card.status-healthy::before { background: #2e8b67; }
.service-status-card.status-degraded::before { background: #d18a24; }
.service-status-card.status-down::before { background: #b8473e; }
.incident-list { display: grid; gap: 10px; margin-top: 20px; }
.incident-item { padding: 15px 17px; border-left: 4px solid #d18a24; border-radius: 10px; background: #fff9ed; }
.incident-item.severity-critical { border-left-color: #b8473e; background: #fff2f0; }
.incident-item.is-resolved { opacity: .7; border-left-color: #7e8983; background: #f4f6f4; }
.incident-item strong, .incident-item span { display: block; }
.incident-item p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.inbox-item header { display: flex; justify-content: space-between; gap: 16px; color: var(--green); }
.inbox-item time { color: var(--muted); font-size: 13px; }
.inbox-message { margin: 18px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-item dl { display: grid; gap: 7px; margin: 0; color: var(--muted); font-size: 13px; }
.inbox-item dl div { display: flex; gap: 8px; }
.inbox-item dt { min-width: 100px; font-weight: 800; }
.inbox-item dd { margin: 0; overflow-wrap: anywhere; }
.site-footer { width: min(100% - 40px, 1180px); margin: 40px auto 0; padding: 24px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 10px; }
.site-footer a { color: var(--green); }
.operator-details { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: baseline; }
.operator-details strong { color: var(--ink); }
.taskforge-news-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee3da; }
.taskforge-news-footer > span { display: grid; gap: 3px; }
.taskforge-news-footer > span strong { color: var(--ink); font-size: 14px; }
.taskforge-news-footer > span small { color: var(--muted); font-size: 12px; }
.taskforge-news-footer nav { margin: 0; gap: 8px; }
.taskforge-news-footer nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #eadbd0; border-radius: 999px; background: rgba(255,255,255,.7); text-decoration: none; }
.taskforge-news-footer nav a:hover { border-color: #e5ad9f; background: #fff8f5; }
.taskforge-news-footer nav i { width: 7px; height: 7px; border-radius: 50%; background: #29a9ea; box-shadow: 0 0 0 3px rgba(41,169,234,.12); }
.taskforge-news-footer nav a:nth-child(2) i { background: #6c63d9; box-shadow: 0 0 0 3px rgba(108,99,217,.12); }

/* Unified warm header and footer for the whole site. */
.topbar {
  border-bottom-color: #ecdcd1;
  background: rgba(255, 250, 245, .9);
}
.topbar .account-dropdown-panel {
  border-color: #eadfd5; background: #fffdfb;
}
.service-home-theme {
  --paper: #fffaf5;
  --card: #fffdfb;
  --line: #eadfd5;
  background: #fffaf5;
}
.service-home-theme > .page {
  width: min(1280px, calc(100% - 56px));
  padding-top: 42px;
  background: transparent;
}
.service-home-theme .support-card,
.service-home-theme .support-info article,
.service-home-theme .feedback-card,
.service-home-theme .inbox-item,
.service-home-theme .monitoring-freshness,
.service-home-theme .monitor-panel,
.service-home-theme .legal-document,
.service-home-theme .legal-accept-card {
  border-color: #eadfd5;
  background: rgba(255, 253, 251, .92);
  box-shadow: 0 12px 32px rgba(93, 58, 41, .06);
}
.service-home-theme .support-principles div,
.service-home-theme .legal-check,
.service-home-theme .usage-cards div,
.service-home-theme .capacity-facts div {
  border-color: #efddd3;
  background: #fff0eb;
}
.service-home-theme .feedback-form select:focus,
.service-home-theme .feedback-form textarea:focus,
.service-home-theme .feedback-form input:focus {
  outline-color: rgba(217, 77, 47, .16);
}
.site-footer { border-top-color: #ecdcd1; }
.site-footer a { color: #d94d2f; font-weight: 700; }
.site-footer a:hover { color: #bd3e24; }
.support-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); gap: 40px; align-items: stretch; }
.support-copy h1 { font-size: clamp(42px, 6vw, 68px); }
.support-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.support-principles div { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 254, 249, .72); }
.support-principles strong, .support-principles span { display: block; }
.support-principles span { margin-top: 6px; color: var(--muted); font-size: 13px; }
.support-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.support-credit-rate { display: grid; gap: 4px; margin: 20px 0 0; padding: 14px 15px; border: 1px solid #efcfc2; border-radius: 12px; color: #c44729; background: #fff4ef; }
.support-credit-rate strong { font-size: 17px; }
.support-credit-rate span { color: var(--muted); font-size: 13px; }
.support-custom { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.support-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.support-actions form { margin: 0; }
.support-payment-button { width: 100%; min-height: 48px; padding: 12px 10px; border: 0; border-radius: 12px; color: white; background: var(--green); box-shadow: 0 10px 24px rgba(217, 77, 47, .18); font: 800 14px/1.2 inherit; white-space: nowrap; cursor: pointer; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.support-payment-button:hover { background: #bd3e24; box-shadow: 0 13px 28px rgba(217, 77, 47, .24); transform: translateY(-1px); }
.support-payment-button:focus-visible { outline: 3px solid rgba(217, 77, 47, .24); outline-offset: 3px; }
.support-disabled { width: 100%; min-height: 48px; margin-top: 22px; border: 0; border-radius: 12px; color: #6d7773; background: #e4e8e6; font: 800 14px/1.2 inherit; cursor: not-allowed; }
.support-register-link { display: inline-flex; align-items: center; justify-content: center; margin-top: 22px; text-align: center; text-decoration: none; box-sizing: border-box; }
.support-status { margin: auto 0 0; padding-top: 12px; color: var(--muted); text-align: center; font-size: 12px; }
.support-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.support-info article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.support-info h2 { font-size: 23px; }
.support-info p { margin: 12px 0 0; color: var(--muted); }
.support-info a, .support-legal-note a { color: var(--green); font-weight: 750; }
.support-legal-note { margin-top: 22px; padding: 20px 24px; border-left: 4px solid var(--green); border-radius: 14px; background: var(--green-soft); }
.support-legal-note p { margin: 0; }
.support-legal-note p + p { margin-top: 8px; }
.legal-document { max-width: 840px; margin: 0 auto; padding: 34px 42px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 16px 45px rgba(34, 65, 55, .07); }
.legal-document h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; }
.legal-document h2 { margin: 34px 0 12px; font-size: 22px; }
.legal-document p, .legal-document li { line-height: 1.65; }
.legal-document ul, .legal-document ol { padding-left: 24px; }
.legal-accept-shell { min-height: calc(100vh - 260px); display: grid; place-items: center; }
.legal-accept-card { width: min(100%, 700px); padding: 36px 40px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 18px 55px rgba(34, 65, 55, .1); }
.legal-accept-card form:first-of-type { display: grid; gap: 12px; margin-top: 26px; }
.legal-check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--green-soft); line-height: 1.45; }
.legal-check input { width: 19px; height: 19px; margin-top: 1px; accent-color: var(--green); }
.legal-check a { color: var(--green); font-weight: 800; }
.legal-accept-button { margin-top: 8px; }
.legal-decline-note { margin: 18px 0 10px; color: var(--muted); font-size: 13px; }
.availability-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 11px 24px;
  color: #fff;
  background: #9b5a15;
  box-shadow: 0 6px 20px rgba(39, 35, 26, .18);
  text-align: center;
}
.availability-banner[hidden] { display: none; }
.availability-banner[data-state="offline"] { background: #7d3535; }
.availability-banner div { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 12px; }
.availability-banner strong { font-size: 14px; }
.availability-banner span { font-size: 13px; }
.availability-return {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  color: #513109;
  background: #fff0c9;
  font-weight: 850;
}

.batch-processing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 28px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.batch-processing form {
  display: grid;
  gap: 12px;
}

.batch-processing label {
  display: grid;
  gap: 6px;
}

.batch-quota-note,
.batch-processing [data-batch-summary] {
  margin: 0;
}

.batch-report {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--card);
}

.batch-recording-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.recordings-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.folder-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.folder-sidebar h2 {
  margin-top: 0;
}

.folder-sidebar form,
.folder-actions {
  display: grid;
  gap: 8px;
}

.folder-sidebar form div {
  display: flex;
  gap: 6px;
}

.folder-sidebar input,
.folder-sidebar select {
  min-width: 0;
  width: 100%;
}

.folder-list {
  display: grid;
  gap: 5px;
}

.folder-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  text-decoration: none;
}

.folder-list a[aria-current="page"] {
  background: var(--green-soft);
  color: var(--green);
}

.folder-trash-link {
  color: var(--muted);
}

.card-folder-action {
  display: grid;
  gap: 3px;
}

.card-folder-action label {
  font-size: 12px;
  color: var(--muted);
}

.record-detail-v2 {
  --record-orange: #e95f3d;
  --record-orange-soft: #fff1eb;
  --record-lavender: #f0edf9;
  --record-sage: #eaf3df;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.record-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.record-back-link {
  color: var(--record-orange);
  font-weight: 750;
  text-decoration: none;
}

.record-title-line,
.record-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.record-title-line h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -.035em;
}

.record-title-editor { min-width: 0; }
.record-title-edit-button {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 0;
  border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer;
}
.record-title-edit-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-title-edit-button svg {
  flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: var(--record-orange);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.record-title-edit-button:hover svg, .record-title-edit-button:focus-visible svg { stroke-width: 2.3; }
.record-title-edit-button:focus-visible { border-radius: 7px; outline: 3px solid rgba(220,81,51,.2); outline-offset: 4px; }
.record-title-edit-form { margin: 0; }
.record-title-edit-form[hidden] { display: none; }
.record-title-edit-form label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.record-title-edit-form > div { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 8px; }
.record-title-edit-form input[name="title"] {
  min-width: 0; padding: 10px 12px; border: 1px solid #df816a; border-radius: 10px;
  background: white; color: var(--ink); font: 700 16px/1.2 inherit;
}
.record-title-edit-form button {
  padding: 9px 12px; border: 1px solid #e4d3ca; border-radius: 9px;
  color: #665d59; background: white; font: 800 12px/1.2 inherit; cursor: pointer;
}
.record-title-edit-form button[type="submit"] { color: white; border-color: var(--record-orange); background: var(--record-orange); }

.record-title-line p {
  margin: 8px 0 0;
  color: var(--muted);
}

.record-folder-chip {
  padding: 5px 10px;
  border-radius: 8px;
  color: #a64929;
  background: var(--record-orange-soft);
}

.retention-note { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 2px; }
.retention-note:hover, .retention-note:focus-visible { color: var(--green); }

.record-stage-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid #eadbd2;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(74, 48, 31, .06);
}

.record-stage-tabs > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid #eee1d9;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.record-stage-tabs > a:last-child { border-right: 0; }
.record-stage-tabs > a.is-active {
  color: var(--record-orange);
  background: #fffaf7;
  box-shadow: inset 0 -3px var(--record-orange);
}

.record-stage-tabs strong,
.record-stage-tabs small {
  display: block;
}

.record-stage-tabs small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.record-player-v2 {
  position: sticky;
  top: 12px;
  z-index: 11;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #eadbd2;
  border-radius: 18px;
  background: rgba(255, 254, 249, .97);
  box-shadow: 0 12px 32px rgba(74, 48, 31, .09);
}

.record-player-v2 audio { width: 100%; }
.record-player-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--record-orange);
  cursor: pointer;
}

/* Warm record workspace matching the selected home-page concept. */
.record-detail-body {
  background:
    radial-gradient(circle at 88% 5%, rgba(174, 157, 220, .12), transparent 26rem),
    radial-gradient(circle at 5% 18%, rgba(238, 111, 72, .09), transparent 28rem),
    #fffaf5;
}
.record-detail-body > .page {
  width: min(1280px, calc(100% - 56px));
  padding: 34px 0 72px;
}
.record-detail-body > .site-footer { flex-shrink: 0; }
.record-detail-v2 { gap: 18px; }
.record-detail-top {
  padding: 22px 26px;
  border: 1px solid #ecdcd1;
  border-radius: 20px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 12px 34px rgba(93,58,41,.06);
}
.record-title-line h1 { font-size: clamp(28px, 3vw, 42px); }
.record-back-link { width: max-content; color: #dc5133; }
.record-folder-chip { color: #bf4b2f; background: #fff0e8; }
.record-header-actions { justify-content: flex-end; }
.record-header-actions .download-menu summary,
.record-header-actions .trash-action button {
  min-height: 40px;
  border-radius: 10px;
}
.trash-action-label { display: none; }
.record-header-actions .download-menu { margin-top: 0; }
.record-header-actions .trash-action { margin-top: 0; }
.record-header-actions .trash-action button {
  display: grid;
  width: 42px;
  padding: 0;
  place-items: center;
  border-color: #edc9bd;
  color: #c64b32;
  background: #fff7f3;
}
.record-header-actions .trash-action button:hover,
.record-header-actions .trash-action button:focus-visible {
  color: white;
  border-color: #d95739;
  background: #df5739;
}
.record-header-actions .trash-action svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.record-stage-tabs {
  border-color: #ecdcd1;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 26px rgba(93,58,41,.05);
}
.record-stage-tabs > a { min-height: 76px; padding: 13px 15px; }
.record-stage-tabs > a.is-active {
  color: #dd5133;
  background: #fff5ef;
  box-shadow: inset 0 -3px #e85d3b;
}
.record-player-v2 {
  --detail-wave-progress: 0%;
  grid-template-columns: 42px 44px minmax(0, 1fr) 44px 52px 36px;
  gap: 12px;
  padding: 9px 16px;
  border-color: #ead8cc;
  border-radius: 14px;
  background: rgba(255,253,250,.96);
  box-shadow: 0 8px 22px rgba(93,58,41,.08);
}
.record-player-v2 audio { display: none; }
.record-player-speed {
  display: grid;
  place-items: center;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #ead7cb;
  border-radius: 999px;
  color: #84766e;
  background: white;
  font: 800 12px/1 inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.record-player-speed:hover,
.record-player-speed:focus-visible { color: #e35536; border-color: #e35536; outline: none; }
.record-player-speed.is-boosted { color: #e35536; border-color: #e35536; background: #fff0e9; }
.record-player-download {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ead7cb;
  border-radius: 50%;
  color: #84766e;
  background: white;
  text-decoration: none;
}
.record-player-download:hover,
.record-player-download:focus-visible { color: #e35536; border-color: #e35536; background: #fff0e9; outline: none; }
.record-player-download svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.record-player-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #ead7cb;
  color: #e35536;
  background: white;
  box-shadow: 0 3px 8px rgba(93,58,41,.08);
}
.record-player-button:hover,
.record-player-button.is-playing { color: white; background: #e85d3b; }
.record-player-button svg { width: 18px; height: 18px; fill: currentColor; }
.record-player-button.is-playing svg { display: none; }
.record-player-button.is-playing::before {
  content: ""; width: 11px; height: 13px;
  background: linear-gradient(to right, currentColor 0 3px, transparent 3px 8px, currentColor 8px 11px);
}
.record-player-button.is-loading::after {
  content: ""; position: absolute; inset: -5px;
  border: 2px solid rgba(232,93,59,.18);
  border-top-color: #e85d3b;
  border-radius: 50%;
  animation: task-play-loading .72s linear infinite;
}
.record-player-time {
  color: #84766e;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.record-player-wave {
  position: relative;
  display: grid;
  height: 32px;
  align-items: center;
  overflow: hidden;
  border-radius: 7px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.record-player-wave:hover,
.record-player-wave:focus-visible { background: #fff4ed; outline: none; }
.record-player-wave svg { grid-area: 1 / 1; width: 100%; height: 28px; fill: none; stroke-width: .75; }
.record-player-wave svg,
.task-wave svg { pointer-events: none; }
.record-wave-base { color: #ddcfc6; stroke: currentColor; }
.record-wave-played {
  color: #e85d3b;
  stroke: currentColor;
  clip-path: inset(0 calc(100% - var(--detail-wave-progress)) 0 0);
}
.record-wave-placeholder {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #ddcfc6;
}
.record-wave-position {
  position: absolute;
  z-index: 2;
  top: 2px;
  bottom: 2px;
  left: var(--detail-wave-progress);
  width: 2px;
  border-radius: 2px;
  background: #d9482b;
  box-shadow: 0 0 0 2px rgba(255,255,255,.72);
  transform: translateX(-1px);
  pointer-events: none;
}
.stage-empty-panel,
.transcript-main-v2,
.speaker-inspector-v2 {
  border-color: #ecdcd1;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 28px rgba(93,58,41,.05);
}
.transcript-toolbar-v2 { border-bottom-color: #eee0d7; background: #fffaf7; }
.transcript-v2 .segment { border-bottom-color: #f1e5de; }
.transcript-v2 .segment:hover { background: #fffaf6; }
.record-detail-v2 .export-options summary {
  color: #d94d2f;
  border-color: #ead8cc;
  background: #fffdfb;
}
.record-detail-v2 .export-options[open] summary { border-color: #e76849; }
.record-detail-v2 .export-options form {
  border-color: #ead8cc;
  background: #fffdfb;
}
/* Панель открывается от правого края. Обе её площадки — правый угол
   шапки записи, и привязка к левому краю выносила 360 пикселей за
   границу экрана. */
.record-header-actions .export-options form { right: 0; left: auto; }
.record-detail-v2 .export-options button,
.record-detail-v2 .primary-button,
.record-detail-v2 .primary-action-link,
.record-detail-v2 .llm-actions button,
.record-detail-v2 .speaker-name-forms button,
.record-detail-v2 .batch-correction-toolbar button,
.record-detail-v2 .segment-edit-form button,
.record-detail-v2 .document-editor-actions button {
  background: #e55a3a;
}
.record-detail-v2 .export-options button:hover,
.record-detail-v2 .primary-button:hover,
.record-detail-v2 .primary-action-link:hover,
.record-detail-v2 .llm-actions button:hover,
.record-detail-v2 .speaker-name-forms button:hover,
.record-detail-v2 .batch-correction-toolbar button:hover,
.record-detail-v2 .segment-edit-form button:hover,
.record-detail-v2 .document-editor-actions button:hover {
  background: #cb472b;
}
.record-detail-v2 .transcript-views {
  border-color: #ead8cc;
  background: #fffdfb;
}
.record-detail-v2 .transcript-views a.is-active {
  color: white;
  background: #e55a3a;
}
.record-detail-v2 .segment { border-left-color: #e76849; }
.record-detail-v2 .timestamp {
  color: #c84a2f;
  background: #fff0e9;
}
.record-detail-v2 .segment.is-active-segment .timestamp {
  color: white;
  background: #e55a3a;
}
.record-detail-v2 .segment.is-active-segment {
  box-shadow: inset 0 0 0 3px rgba(229,90,58,.56), 0 8px 24px rgba(191,73,43,.13);
}
.record-detail-v2 .dot { background: #e55a3a; }
.record-detail-v2 .editor-note,
.record-detail-v2 .correction-success {
  color: #9b442a;
  border-color: #efd2c7;
  background: #fff1eb;
}
.record-detail-v2 input:focus,
.record-detail-v2 textarea:focus,
.record-detail-v2 select:focus {
  outline-color: rgba(229, 90, 58, .16);
  border-color: #e76849;
}
@media (max-width: 760px) {
  .record-detail-body > .page { width: min(100% - 28px, 1280px); padding-top: 20px; }
  .record-detail-top { padding: 18px; }
  .record-title-line { align-items: flex-start; flex-direction: column; }
  .record-title-editor { width: 100%; }
  .record-title-edit-form > div { grid-template-columns: 1fr 1fr; }
  .record-title-edit-form input[name="title"] { grid-column: 1 / -1; }
  .record-header-actions { width: 100%; justify-content: flex-start; }
  .record-player-v2 { grid-template-columns: 38px minmax(0, 1fr) 46px 34px; }
  .record-player-v2 .record-player-time { display: none; }
  .record-player-wave { min-width: 0; }
  .record-player-speed { height: 28px; padding: 0 4px; font-size: 11px; }
  .record-player-download { width: 34px; height: 34px; }
}

.stage-empty-panel {
  padding: 36px;
  border: 1px solid #eadbd2;
  border-radius: 20px;
  background: var(--card);
  text-align: center;
}
.stage-empty-panel { max-width: 860px; margin: 0 auto; padding: clamp(30px, 5vw, 52px); border-color: #ecd6ca; background: radial-gradient(circle at 88% 8%, rgba(226, 108, 72, .16), transparent 17rem), rgba(255, 252, 250, .94); box-shadow: 0 16px 38px rgba(102, 55, 38, .08); }
.stage-empty-panel h2 { margin: 0; color: #40332e; font-size: clamp(26px, 3vw, 36px); }
.stage-empty-panel > p { max-width: 590px; margin: 12px auto 0; color: #75645d; font-size: 16px; }
.stage-empty-panel .processing-start-form, .stage-confirm-panel form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; max-width: 680px; margin: 28px auto 0; padding: 18px; border: 1px solid #f0ded4; border-radius: 16px; background: rgba(255,255,255,.78); text-align: left; }
.stage-empty-panel .processing-start-form label { display: grid; gap: 7px; color: #705a50; font-size: 13px; font-weight: 800; }
.stage-empty-panel .processing-start-form select { min-height: 44px; border: 1px solid #e6d3c8; border-radius: 10px; color: #493b35; background: #fffdfa; font: inherit; }
.stage-empty-panel .processing-start-form .primary-button, .stage-confirm-panel .primary-button { min-height: 44px; border-radius: 10px; }
.stage-empty-panel .processing-start-form .primary-button { grid-column: 1 / -1; }
.stage-confirm-panel form { display: inline-flex; margin-top: 24px; padding: 0; border: 0; background: transparent; }
.stage-progress-panel .stage-empty-icon { color: #d94d2f; background: #fff0ea; }
.stage-progress-jobs { display: grid; gap: 8px; max-width: 420px; margin: 24px auto 0; padding: 0; list-style: none; text-align: left; }
.stage-progress-jobs li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .78); font-size: 14px; }
.stage-progress-jobs li span:first-child { color: var(--ink); font-weight: 700; }
.stage-progress-jobs li span:last-child { color: var(--muted); }
.stage-progress-jobs li[data-job-status="processing"] span:last-child { color: var(--green); font-weight: 800; }
.stage-progress-jobs li[data-job-status="failed"] span:last-child { color: var(--amber); font-weight: 800; }
.stage-progress-jobs li[data-job-status="succeeded"] span:last-child { color: var(--green); }
.processing-estimate-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #efcfc3; border-radius: 14px; background: #fff7f2; color: var(--ink); }
.processing-estimate-card > span { color: var(--muted); font-size: 13px; }
.processing-estimate-card strong { color: #b83e27; font-size: 20px; }
.processing-estimate-card small { color: var(--muted); line-height: 1.4; }
.processing-estimate-card-static { margin: 16px auto; max-width: 420px; text-align: left; }
.stage-empty-panel .processing-estimate-card {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  text-align: left;
}
.stage-confirm-panel .processing-estimate-card-static { margin: 20px 0 0; }
.processing-countdown { display: grid; justify-items: center; gap: 9px; margin: 22px auto 4px; color: var(--muted); }
.processing-countdown-ring { --processing-progress: 100%; display: grid; place-items: center; width: 104px; height: 104px; padding: 10px; border-radius: 50%; background: conic-gradient(#d94d2f 0 var(--processing-progress), #f4d8ce var(--processing-progress) 100%); box-shadow: 0 8px 24px rgba(151, 63, 42, .14); animation: processing-ring-pulse 1.8s ease-in-out infinite; }
.processing-countdown-ring::before { content: ""; grid-area: 1 / 1; width: 82px; height: 82px; border-radius: 50%; background: #fffaf7; }
.processing-countdown-ring span { grid-area: 1 / 1; position: relative; color: var(--ink); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.document-wait-panel .processing-countdown { margin-bottom: 0; }
@keyframes processing-ring-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@media (prefers-reduced-motion: reduce) { .processing-countdown-ring { animation: none; } }

.stage-empty-panel .processing-start-form {
  max-width: 760px;
  margin: 24px auto 0;
}

.stage-empty-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: var(--record-orange);
  background: var(--record-orange-soft);
  font-size: 24px;
  font-weight: 850;
}

.stage-normalization-panel .stage-empty-icon { color: #6d6843; background: #f1f0da; font-weight: 900; }
.normalization-unavailable { color: #9c542d; font-weight: 800; }

.literary-intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 28px 38px; padding: clamp(28px, 5vw, 54px); border: 1px solid #ead8cf; border-radius: 22px; background: radial-gradient(circle at 90% 7%, rgba(192, 143, 121, .2), transparent 14rem), rgba(255, 252, 249, .92); box-shadow: 0 14px 34px rgba(93, 58, 41, .07); }
.literary-kicker { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: #865443; background: #f6e7df; font-size: 12px; font-weight: 850; }
.literary-intro h2 { margin: 16px 0 12px; color: #41332f; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; }
.literary-intro-copy > p, .literary-intro-action p { margin: 0; color: #70625a; font-size: 16px; line-height: 1.62; }
.literary-principles { display: grid; align-content: center; gap: 10px; }
.literary-principles > div { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 14px; border: 1px solid rgba(224, 207, 197, .92); border-radius: 13px; background: rgba(255, 255, 255, .72); }
.literary-principles span { display: grid; grid-row: span 2; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #8d5e4c; background: #f8e9e2; font-size: 15px; font-weight: 850; }
.literary-principles strong { color: #51423c; font-size: 14px; }
.literary-principles small { margin-top: 3px; color: #84766e; font-size: 12px; }
.literary-intro-action { display: flex; grid-column: 1 / -1; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 22px; border-top: 1px solid rgba(234, 216, 207, .95); }
.literary-intro-action p { flex: 1 1 360px; }
.literary-intro-action .primary-action-link span { margin-left: 7px; font-size: 18px; }
.literary-coming-soon { display: grid; justify-items: center; gap: 12px; padding: clamp(52px, 10vw, 104px) 24px; border: 1px solid #ead8cf; border-radius: 22px; background: radial-gradient(circle at 50% 0, rgba(192, 143, 121, .16), transparent 18rem), rgba(255, 252, 249, .92); box-shadow: 0 14px 34px rgba(93, 58, 41, .07); text-align: center; }
.literary-coming-soon > span { padding: 6px 10px; border-radius: 999px; color: #865443; background: #f6e7df; font-size: 12px; font-weight: 850; }
.literary-coming-soon h2 { margin: 0; color: #41332f; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; }
.literary-coming-soon p { margin: 0; color: #70625a; font-size: 16px; line-height: 1.62; }

.text-document-literary { background: radial-gradient(circle at 88% 6%, rgba(189, 142, 120, .16), transparent 27rem), #fffaf7; }
.text-document-literary > .page { width: min(1120px, calc(100% - 56px)); padding-top: 34px; }
.text-document-literary .document-header { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 42px); border: 1px solid #eadbd4; border-radius: 20px; background: rgba(255, 252, 250, .9); box-shadow: 0 12px 34px rgba(93, 58, 41, .06); }
.text-document-literary .document-header::after { content: "¶"; position: absolute; right: 7%; bottom: -78px; color: rgba(151, 98, 81, .1); font: 800 clamp(150px, 23vw, 270px)/1 Georgia, serif; pointer-events: none; }
.text-document-literary .document-header > div, .text-document-literary .document-status { position: relative; z-index: 1; }
.text-document-literary .document-header .eyebrow, .text-document-literary .document-status { color: #8b5949; }
.literary-document-lead { max-width: 620px; margin: 18px 0 0; color: #70625a; font-size: 16px; line-height: 1.6; }
.text-document-literary .document-status { background: #f6e8e1; }
.text-document-literary .editor-note { color: #794d40; border-color: #efd8ce; background: #fff3ed; }
.text-document-literary .document-textarea:focus { outline-color: rgba(167, 104, 82, .18); border-color: #bf7962; }
.text-document-literary .document-editor-actions button { background: #a9604b; }

.transcript-workspace-v2 {
  min-width: 0;
}

.transcript-workspace-v2.is-editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  align-items: start;
}
.transcript-workspace-v2.is-history-view {
  grid-template-columns: minmax(0, 1fr);
}

.transcript-main-v2,
.speaker-inspector-v2 {
  min-width: 0;
  border: 1px solid #eadbd2;
  border-radius: 20px;
  background: var(--card);
}

.record-detail-v2 [data-speaker-color="0"] { --speaker-color: #d84d2f; --speaker-soft: #fff0e9; }
.record-detail-v2 [data-speaker-color="1"] { --speaker-color: #6656a3; --speaker-soft: #efecfb; }
.record-detail-v2 [data-speaker-color="2"] { --speaker-color: #b56522; --speaker-soft: #fff0dc; }
.record-detail-v2 [data-speaker-color="3"] { --speaker-color: #39758f; --speaker-soft: #e8f4f8; }
.record-detail-v2 [data-speaker-color="4"] { --speaker-color: #a94872; --speaker-soft: #faeaf1; }
.record-detail-v2 [data-speaker-color="5"] { --speaker-color: #765b46; --speaker-soft: #eee7e1; }
.record-detail-v2 [data-speaker-color="unassigned"] { --speaker-color: #716b68; --speaker-soft: #efedeb; }
.record-detail-v2 .segment[data-speaker-color] {
  border-left-color: var(--speaker-color);
  background: var(--speaker-soft);
}
.record-detail-v2 .segment[data-speaker-color] .timestamp,
.record-detail-v2 .segment[data-speaker-color] [data-segment-speaker-name] {
  color: var(--speaker-color);
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}
.record-detail-v2 .segment[data-speaker-color] .timestamp {
  background: var(--speaker-soft);
}
.record-detail-v2 .segment.is-active-segment .timestamp {
  color: white;
  background: var(--speaker-color, #e55a3a);
}

.transcript-toolbar-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #eee1d9;
}

.transcript-main-v2 {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.transcript-main-v2 .transcript-toolbar-v2 {
  margin-bottom: 10px;
  border: 1px solid #ecdcd1;
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 22px rgba(93, 58, 41, .05);
}

.transcript-toolbar-v2 strong,
.transcript-toolbar-v2 span {
  display: block;
}

.transcript-toolbar-v2 > div:first-child > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.transcript-toolbar-v2 .batch-correction-toolbar {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.transcript-toolbar-v2 .batch-correction-toolbar button {
  background: var(--record-orange);
}

.transcript-v2 {
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.transcript-v2 .segment {
  margin-bottom: 10px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--speaker-color, #d8c9c2) 24%, white);
  border-left: 5px solid var(--speaker-color, #e76849);
  border-radius: 16px;
  background: var(--speaker-soft, #fffaf7);
  box-shadow: 0 7px 17px rgba(93, 58, 41, .045);
}

.transcript-v2 .segment:last-child { margin-bottom: 0; }

.transcript-v2 .segment:hover {
  background: var(--speaker-soft, #fffaf7);
  box-shadow: 0 10px 24px rgba(93, 58, 41, .08);
}

.transcript-v2 .segment.is-active {
  border-radius: 14px;
  background: var(--record-orange-soft);
}

.transcript-v2 .segment.is-removed {
  padding: 10px 16px;
  border-left-color: #cdc0b8;
  background: #f4efeb;
  box-shadow: none;
}

.segment-removed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8a7d76;
  font-size: 13px;
  font-style: italic;
}
.segment-removed-bar[hidden] { display: none; }

.segment-restore-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid #d8cabf;
  border-radius: 999px;
  color: #6d5f57;
  background: white;
  font: 800 12px/1.2 inherit;
  font-style: normal;
  cursor: pointer;
}
.segment-restore-button:hover, .segment-restore-button:focus-visible {
  border-color: var(--record-orange, #e76849);
  color: var(--record-orange, #c8462b);
  outline: none;
}

.transcript-v2 .segment-meta strong {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  color: #6d5595;
  background: transparent;
}

.transcript-v2 .segment-edit-form textarea {
  min-height: 44px;
  padding: 12px 14px;
  border-color: #eadbd2;
  border-radius: 12px;
  background: #fffdfa;
  font-size: 16px;
  overflow: hidden;
  resize: none;
}

.segment-speaker-switcher {
  flex-wrap: wrap;
  gap: 10px;
}

.segment-speaker-options {
  display: flex;
  flex: 1 1 240px;
  flex-wrap: wrap;
  gap: 6px;
}

.record-detail-v2 .segment-edit-form .segment-speaker-option {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #e3d5cd;
  border-radius: 999px;
  color: #765b50;
  background: #fffaf7;
  font: 700 12px/1.2 inherit;
  cursor: pointer;
}

.record-detail-v2 .segment-edit-form .segment-speaker-option[data-speaker-color] {
  border-color: color-mix(in srgb, var(--speaker-color) 42%, white);
  color: var(--speaker-color);
  background: color-mix(in srgb, var(--speaker-soft) 84%, white);
}

.record-detail-v2 .segment-edit-form .segment-speaker-option:hover,
.record-detail-v2 .segment-edit-form .segment-speaker-option:focus-visible {
  border-color: #d8785f;
  color: #aa4e37;
  background: #fff0e9;
  outline: none;
}

.record-detail-v2 .segment-edit-form .segment-speaker-option[data-speaker-color]:hover,
.record-detail-v2 .segment-edit-form .segment-speaker-option[data-speaker-color]:focus-visible {
  border-color: var(--speaker-color);
  color: var(--speaker-color);
  background: var(--speaker-soft);
}

.record-detail-v2 .segment-edit-form .segment-speaker-value {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.speaker-inspector-v2 {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.speaker-inspector-v2 .batch-correction-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  gap: 8px;
  margin: -4px -4px 0;
  padding: 12px;
  border-color: #ecd8cd;
  border-radius: 14px;
  background: rgba(255, 250, 247, .97);
  box-shadow: 0 8px 20px rgba(93, 58, 41, .08);
}
.speaker-inspector-v2 .batch-correction-toolbar.is-visible {
  display: grid;
}

.speaker-inspector-v2 .batch-correction-toolbar span {
  color: #7d6d65;
  font-size: 12px;
  line-height: 1.35;
}

.speaker-inspector-v2 .batch-correction-toolbar button {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
}

.speaker-inspector-v2 h2,
.speaker-inspector-v2 p {
  margin: 0;
}

.speaker-inspector-v2 p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.speaker-inspector-v2 .speaker-name-forms {
  margin: 0;
}

.speaker-inspector-v2 .speaker-name-forms form {
  display: block;
}
.speaker-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
  align-items: center;
}
.speaker-control-row label { min-width: 0; }

.speaker-inspector-v2 .speaker-name-forms input,
.add-speaker-form input,
.speaker-swap-panel select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #ded3cd;
  border-radius: 10px;
  background: white;
}
.speaker-inspector-v2 .speaker-name-forms form[data-speaker-color] input {
  color: var(--speaker-color);
  border-color: color-mix(in srgb, var(--speaker-color) 42%, white);
  background: var(--speaker-soft);
  font-weight: 800;
}
.speaker-inspector-v2 .speaker-name-forms form[data-speaker-color] input:focus {
  border-color: var(--speaker-color);
  outline: 3px solid color-mix(in srgb, var(--speaker-color) 16%, transparent);
}
.record-detail-v2 .speaker-inspector-v2 .speaker-delete-button {
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--speaker-color);
  background: transparent;
  cursor: pointer;
  opacity: .72;
}
.record-detail-v2 .speaker-inspector-v2 .speaker-delete-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.record-detail-v2 .speaker-inspector-v2 .speaker-delete-button:hover {
  color: var(--speaker-color);
  background: transparent;
  opacity: 1;
  transform: scale(1.08);
}
.unassigned-speaker-card {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid #d8d3d0;
  border-radius: 10px;
  color: var(--speaker-color);
  background: var(--speaker-soft);
}
.unassigned-speaker-card span { font-size: 13px; font-weight: 750; }
.unassigned-speaker-card small { color: #817a76; font-size: 10px; }

.add-speaker-form,
.speaker-swap-panel {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #eee1d9;
}
.add-speaker-hint { color: var(--muted); font-size: 11px; }

.add-speaker-form button,
.speaker-swap-panel button {
  padding: 10px 12px;
  border: 1px solid #e79a82;
  border-radius: 10px;
  color: #a94124;
  background: var(--record-orange-soft);
  font-weight: 800;
  cursor: pointer;
}

/* Home page — approved warm list concept */
.home-v2-body {
  --home-coral: #ef5d3d;
  --home-coral-soft: #fff0eb;
  --home-lilac: #7568b3;
  --home-lilac-soft: #f1effa;
  --home-sage: #628c52;
  --home-sage-soft: #edf5e8;
  --home-sidebar-width: 200px;
  --home-content-gutter: clamp(28px, 3vw, 48px);
  --home-shell-edge: max(
    var(--home-content-gutter),
    calc((100% - var(--home-sidebar-width) - 1280px) / 2 + var(--home-content-gutter))
  );
  background: #fffaf5;
}
.home-v2-body > .topbar {
  padding-left: calc(var(--home-sidebar-width) + var(--home-shell-edge));
  padding-right: var(--home-shell-edge);
}
.home-v2-body > .page { width: 100%; margin: 0; padding: 0; }
.home-v2-body > .site-footer {
  width: auto;
  margin-right: var(--home-shell-edge);
  margin-left: calc(var(--home-sidebar-width) + var(--home-shell-edge));
}
.home-v2 { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: calc(100vh - 78px); }
.home-sidebar {
  position: sticky; top: 0; align-self: start; height: calc(100vh - 78px); overflow-y: auto;
  padding: 20px 12px; border-right: 1px solid #eadfd5; background: rgba(255, 252, 248, .95);
}
.home-folder-list { display: grid; gap: 4px; }
.home-folder-list a {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px;
  min-height: 42px; padding: 7px 10px; border: 1px solid transparent; border-radius: 11px;
  color: #504f50; text-decoration: none;
}
.home-folder-list a[aria-current="page"] { border-color: #f4b6a6; color: #d84427; background: var(--home-coral-soft); }
.home-folder-list b { min-width: 26px; padding: 2px 6px; border-radius: 999px; font-size: 12px; text-align: center; }
.home-folder-list a[aria-current="page"] b { background: white; }
.home-nav-icon { display: grid; place-items: center; width: 24px; height: 24px; line-height: 1; }
.home-nav-icon svg {
  width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.home-sidebar-divider { margin: 20px 7px 14px; border-top: 1px dashed #e5d4c7; }
.new-folder-panel { margin-top: 12px; }
.new-folder-panel summary, .folder-manage-panel summary, .home-trash-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; color: #d94a2c; cursor: pointer; list-style: none;
}
.new-folder-panel summary span { font-size: 26px; }
.new-folder-panel form, .folder-manage-panel form { display: grid; gap: 8px; margin: 8px 4px 14px; }
.new-folder-panel form div { display: grid; gap: 7px; }
.new-folder-panel input, .folder-manage-panel input {
  min-width: 0; padding: 9px 10px; border: 1px solid #e3d7cd; border-radius: 9px; background: white;
}
.new-folder-panel button, .folder-manage-panel button {
  min-height: 36px; border: 0; border-radius: 9px; color: white; background: var(--home-coral); font-weight: 750;
}
.new-folder-panel label, .folder-manage-panel label { color: var(--muted); font-size: 12px; }
.home-trash-link { margin-top: 10px; color: #555; text-decoration: none; }
.home-content {
  width: min(100%, 1280px); min-width: 0; margin: 0 auto;
  padding: clamp(28px, 3vw, 44px) clamp(28px, 3vw, 48px) 70px;
}
.home-hero { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(560px, 1.15fr); gap: 40px; align-items: stretch; }
.home-hero-copy { display: flex; height: 230px; min-height: 230px; align-self: start; flex-direction: column; justify-content: center; }
.home-hero-copy h1 { font-family: inherit; font-size: clamp(36px, 3.2vw, 46px); line-height: 1.04; font-weight: 750; }
.home-hero-copy p { max-width: 610px; margin: 14px 0 0; color: #686466; font-size: 17px; line-height: 1.45; }
.recorder-v2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: auto; align-self: start; margin: 0; padding: 0;
  color: inherit; background: transparent; border-radius: 0; box-shadow: none;
}
.recorder-v2 .home-action-card {
  display: grid; place-items: center; align-content: center; min-height: 230px; height: 230px; padding: 25px 20px;
  border: 1px solid #e8d8cd !important; border-radius: 18px !important; text-align: center;
  box-shadow: 0 16px 36px rgba(81, 55, 39, .08); transition: transform .18s, box-shadow .18s;
}
.home-action-card:hover { transform: translateY(-3px); box-shadow: 0 20px 42px rgba(81, 55, 39, .13); }
.record-action-card { color: white; background: linear-gradient(135deg, #f2795b, #ef5d3d) !important; }
.upload-action-card { color: #272532; background: linear-gradient(135deg, #fbfaff, #eeeaf8) !important; }
.home-action-icon {
  display: grid; place-items: center; width: 86px; height: 86px; margin-bottom: 17px;
  border-radius: 50%; color: var(--home-coral); background: rgba(255,255,255,.94);
}
.home-action-icon svg {
  width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.55;
  stroke-linecap: round; stroke-linejoin: round;
}
.upload-action-card .home-action-icon { color: #222a49; }
.home-action-card strong { font-size: 20px; }
.home-action-card small { margin-top: 7px; font-size: 14px; font-weight: 500; }
.recorder-session-panel {
  grid-column: 1 / -1; display: none; padding: 18px; border: 1px solid #eadfd5; border-radius: 16px; background: white;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.recorder-v2.is-recording .recorder-session-panel,
.recorder-v2:has(.recording-preview:not([hidden])) .recorder-session-panel,
.recorder-v2:has(.local-queue:not([hidden])) .recorder-session-panel { display: block; }
.recorder-v2.is-recording .recorder-session-panel {
  border-color: rgba(217, 74, 44, .38); background: #fff0ec; box-shadow: 0 10px 28px rgba(217, 74, 44, .12);
}
.recorder-v2.is-recording .recorder-capture-controls .secondary-button {
  color: #fff; background: #ac3b2b; box-shadow: 0 6px 15px rgba(135, 43, 31, .2);
}
.recorder-v2.is-recording .recorder-capture-controls .secondary-button:hover { background: #923124; }
.recorder-v2.is-recording .recorder-state time { color: #a53827; }
.recorder-v2.is-recording.is-paused .recorder-session-panel {
  border-color: rgba(196, 137, 39, .4); background: #fff7df; box-shadow: 0 10px 28px rgba(196, 137, 39, .12);
}
.recorder-v2.is-recording.is-paused .recorder-capture-controls .secondary-button {
  color: #fff; background: #a56809; box-shadow: 0 6px 15px rgba(137, 86, 8, .2);
}
.recorder-v2.is-recording.is-paused .recorder-capture-controls .secondary-button:hover { background: #895606; }
.recorder-v2.is-recording.is-paused .recorder-state time { color: #8d5908; }
.recorder-v2.is-recording.is-paused .recorder-input-dots-active { color: #a56809; }
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .recorder-session-panel {
  border-color: rgba(67, 127, 97, .34); background: #edf7f1; box-shadow: 0 10px 28px rgba(67, 127, 97, .1);
}
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .preview-actions .primary-button,
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .preview-actions .secondary-button {
  color: #fff; background: #347253; box-shadow: 0 6px 15px rgba(45, 99, 72, .18);
}
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .preview-actions .primary-button:hover,
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .preview-actions .secondary-button:hover { background: #285c42; }
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .preview-actions .danger-button {
  color: #fff; background: #b8322a; box-shadow: 0 6px 15px rgba(143, 35, 29, .2);
}
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .preview-actions .danger-button:hover { background: #96261f; }
.recorder-v2:not(.is-recording):has(.recording-preview:not([hidden])) .recorder-state time { color: #2f694c; }
.processing-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; box-sizing: border-box; margin: 22px 0 0; padding: 18px 14px;
  border: 1px solid #eadfd5; border-radius: 17px; background: rgba(255,255,255,.72); box-shadow: 0 8px 24px rgba(81,55,39,.04);
}
.processing-steps > div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; align-items: start; padding: 0 10px; border-right: 1px solid #eadfd5; }
.processing-steps > div:last-child { border: 0; }
.step-symbol { display: grid; place-items: center; width: 54px; height: 42px; color: var(--home-coral); font-size: 34px; line-height: 1; }
.step-symbol svg {
  width: 48px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.step-symbol .icon-speakers-reference { stroke-width: 1.9; }
.step-symbol .icon-feather-reference { stroke-width: 1.65; }
.step-symbol.step-letters { font-family: Georgia, serif; font-size: 31px; }
.processing-steps > div:nth-child(2) .step-symbol { color: var(--home-lilac); }
.processing-steps > div:nth-child(3) .step-symbol { color: var(--home-sage); }
.processing-steps p { margin: 2px 0 0; }
.processing-steps strong, .processing-steps small { display: block; }
.processing-steps small { margin-top: 6px; color: var(--muted); line-height: 1.35; }
.tasks-section { margin-top: 30px; }
.tasks-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 12px 10px; }
.tasks-heading h2 { font-family: inherit; font-size: 29px; font-weight: 750; }
.tasks-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.batch-processing-v2 {
  display: flex; align-items: center; min-height: 56px; margin-bottom: 10px; padding: 5px 14px;
  border-radius: 14px; background: rgba(255,255,255,.82);
}
.batch-processing-v2 form { display: grid; grid-template-columns: minmax(160px,1fr) 220px 280px 165px; align-items: center; gap: 12px; width: 100%; }
.batch-processing-v2 label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.batch-processing-v2 label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.batch-processing-v2 select { min-width: 0; padding: 8px 11px; border: 1px solid #e5d8ce; border-radius: 9px; background: white; }
.batch-processing-v2 .primary-button { min-height: 39px; border: 0; border-radius: 10px; background: var(--home-coral); font-weight: 800; }
.batch-processing-v2 .batch-quota-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.batch-processing-v2 [data-batch-summary] { margin: 0; font-size: 14px; font-weight: 700; }
.task-list { overflow: hidden; border: 1px solid #eadfd5; border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 0 10px 30px rgba(81,55,39,.06); }
.task-row {
  display: grid; grid-template-columns: 46px 190px 56px minmax(180px,1fr) 150px 145px 62px 42px;
  align-items: center; gap: 12px; min-height: 74px; padding: 10px 16px; border-bottom: 1px solid #eee3da;
  cursor: pointer;
}
.task-row:hover { background: rgba(255, 252, 249, .9); }
/* Внутри строки курсор возвращается к обычному: переименование и выбор
   папки — свои действия, а не открытие записи. */
.task-row .task-name, .task-row .task-folder { cursor: auto; }
.task-row:last-child { border: 0; }
.task-play {
  position: relative; display: grid; place-items: center; width: 39px; height: 39px; padding: 0; border: 1px solid #e5d8cd;
  border-radius: 50%; color: var(--home-coral); background: white; cursor: pointer;
  box-shadow: 0 3px 9px rgba(81,55,39,.07);
}
.task-play:hover, .task-play.is-playing { color: white; border-color: var(--home-coral); background: var(--home-coral); }
.task-play svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-linejoin: round; }
.task-play.is-playing svg { display: none; }
.task-play.is-playing::before { content: "Ⅱ"; font-size: 15px; font-weight: 900; }
.task-play.is-loading::after {
  content: ""; position: absolute; inset: -6px; border: 2px solid rgba(229,90,58,.18);
  border-top-color: var(--home-coral); border-radius: 50%; pointer-events: none;
  animation: task-play-loading .72s linear infinite;
}
@keyframes task-play-loading { to { transform: rotate(360deg); } }
.task-wave { position: relative; display: grid; place-items: center; overflow: hidden; color: var(--home-coral); white-space: nowrap; }
.task-wave svg { width: 120px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; }
.task-wave.has-waveform { --wave-progress: 0%; width: 180px; cursor: pointer; border-radius: 6px; touch-action: manipulation; user-select: none; }
.task-wave.has-waveform svg { grid-area: 1 / 1; width: 180px; stroke-width: 1.5; }
.task-wave.has-waveform:hover, .task-wave.has-waveform:focus-visible { background: #fff5ef; outline: none; }
.task-wave.has-waveform:focus-visible { box-shadow: 0 0 0 2px rgba(229,90,58,.22); }
.task-wave-base { color: #dbcfc6; }
.task-wave-played { color: var(--home-coral); clip-path: inset(0 calc(100% - var(--wave-progress)) 0 0); }
.task-row audio[data-list-audio] { display: none; }
.task-row:nth-child(3n) .task-wave { color: var(--home-lilac); }
.task-name { min-width: 0; }
.task-name .card-title-button { overflow: hidden; font-family: inherit; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.task-name small { display: block; color: var(--muted); }
.task-name { position: relative; }
.task-name [data-card-title-form] {
  position: absolute; z-index: 25; top: -18px; left: -12px; width: min(430px, 70vw);
  padding: 12px; border: 1px solid #e8d8cc; border-radius: 13px; background: #fffdfb;
  box-shadow: 0 14px 34px rgba(81,55,39,.16);
}
.task-name [data-card-title-form][hidden] { display: none; }
.task-name [data-card-title-form] label { color: #756d68; font-size: 11px; font-weight: 750; }
.task-name [data-card-title-form] > div { display: grid; grid-template-columns: minmax(160px,1fr) auto auto; gap: 7px; margin-top: 6px; }
.task-name [data-card-title-form] input {
  min-width: 0; padding: 9px 11px; border: 1px solid #ef9a85; border-radius: 9px; outline: none; background: white;
}
.task-name [data-card-title-form] button {
  padding: 8px 11px; border: 1px solid #ead9ce; border-radius: 9px; color: #665d59; background: white;
  font-size: 12px; font-weight: 800; cursor: pointer;
}
.task-name [data-card-title-form] button[type="submit"] { color: white; border-color: var(--home-coral); background: var(--home-coral); }
.task-folder select { width: 100%; padding: 7px 9px; border: 1px solid #eed8c6; border-radius: 8px; background: #fff5ec; }
.task-duration { font-variant-numeric: tabular-nums; }
.task-row .status {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 30px; padding: 5px 10px;
  border: 1px solid transparent; white-space: nowrap; font-size: 12px; font-weight: 750;
}
.task-row .status svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.task-row .status-ready, .task-row .status-review_required { color: #4e7d40; border-color: #d7e8ce; background: var(--home-sage-soft); }
.task-row .status-uploaded { color: #bd7419; border-color: #f1ddb9; background: #fff6df; }
.task-row .status-queued { color: #675aa2; border-color: #dfd9ef; background: var(--home-lilac-soft); }
.task-row .status-processing { color: #6d5ca8; border-color: #d9d2ed; background: #eeeafa; }
.task-row .status-failed { color: #b74336; border-color: #f0d0ca; background: #fff0ed; }
.status-spinner { animation: status-spin 1.2s linear infinite; }
@keyframes status-spin { to { transform: rotate(360deg); } }
.task-open { color: var(--home-coral); font-size: 13px; font-weight: 800; text-decoration: none; }
.task-row > .card-trash-action { margin-left: 10px; }
.task-row .card-trash-action button {
  width: 34px; height: 34px; border: 1px solid #efd6d0; border-radius: 9px;
  color: #bf4d3c; background: #fff8f6;
}
.task-row .card-trash-action button:hover { color: white; border-color: #cf5c49; background: #cf5c49; }
.task-row .card-trash-action svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.recordings-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 0 4px;
  color: #746d69; font-size: 13px;
}
.tasks-section.is-loading { opacity: .62; pointer-events: none; transition: opacity .15s ease; }
.page-size-form { display: flex; align-items: center; gap: 9px; }
.page-size-form label { display: flex; align-items: center; gap: 8px; }
.page-size-form select {
  padding: 7px 28px 7px 9px; border: 1px solid #e4d6cc; border-radius: 9px; color: #4e4946; background: white;
}
.page-links { display: flex; align-items: center; gap: 5px; }
.page-links a, .page-links span {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; text-decoration: none;
}
.page-links a { border: 1px solid #e5d8ce; background: rgba(255,255,255,.78); }
.page-links a:hover { color: #d94d2f; border-color: #efaa98; }
.page-links a[aria-current="page"] { color: white; border-color: var(--home-coral); background: var(--home-coral); font-weight: 800; }

/* Trash page — warm orange continuation of the main interface */
.trash-v2-body {
  --green: #e55a3a;
  --green-soft: #fff0ea;
  --amber: #bc5b27;
  --amber-soft: #fff2df;
  background: radial-gradient(circle at 10% 0, rgba(239, 93, 61, .09), transparent 28rem), #fffaf5;
}
.trash-v2-body .topbar { border-bottom-color: #ecdcd1; background: rgba(255,250,245,.9); }
.trash-v2-body .brand-logo { box-shadow: 0 8px 20px rgba(229,90,58,.18); }
.trash-v2 { width: min(100%, 1040px); margin: 0 auto; }
.trash-v2 .back-link { color: #d94d2f; }
.trash-v2 .eyebrow, .trash-v2 .hero-number strong { color: #e55a3a; }
.trash-v2 .hero { padding: 28px 32px; border: 1px solid #ecdcd1; border-radius: 22px; background: rgba(255,255,255,.72); box-shadow: 0 14px 38px rgba(93,58,41,.07); }
.trash-v2 .hero h1 { font-family: inherit; font-weight: 750; }
.trash-v2 .trash-list { margin-top: 14px; }
.trash-v2 .trash-card { border-color: #ecdcd1; border-radius: 15px; background: rgba(255,255,255,.82); box-shadow: 0 8px 24px rgba(93,58,41,.05); }
.trash-v2 .trash-card h2 { font-family: inherit; font-weight: 750; }
.trash-v2 .purge-date { color: #b86532; }
.trash-v2 .trash-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.trash-v2 .trash-card-actions .purge-date { margin: 0; text-align: right; white-space: nowrap; }
.trash-v2 .trash-card button { background: #e55a3a; box-shadow: 0 6px 14px rgba(229,90,58,.17); }
.trash-v2 .trash-card button:hover { background: #cd482b; }
.trash-v2 .empty-state { border-color: #e9cfc2; background: rgba(255,255,255,.72); }
@media (max-width: 720px) {
  .trash-v2 .trash-card { align-items: flex-start; flex-direction: column; }
  .trash-v2 .trash-card-actions { width: 100%; align-items: flex-start; flex-direction: column; gap: 10px; }
  .trash-v2 .trash-card-actions .purge-date { text-align: left; white-space: normal; }
}

@media (max-width: 760px) {
  .batch-processing { grid-template-columns: 1fr; }
  .recordings-workspace { grid-template-columns: 1fr; }
  .folder-sidebar { position: static; }
  .record-title-line, .record-header-actions, .transcript-toolbar-v2 { align-items: stretch; flex-direction: column; }
  .record-stage-tabs { grid-template-columns: 1fr 1fr; }
  .record-stage-tabs > a { border-bottom: 1px solid #eee1d9; }
  .transcript-workspace-v2.is-editing,
  .transcript-workspace-v2.is-history-view { grid-template-columns: 1fr; }
  .speaker-inspector-v2 { position: static; }
  .topbar { padding: 12px 18px; }
  /* Прежде здесь прятался любой span внутри .account-menu — так убиралось
     имя пользователя. Имя переехало в меню, а слепое правило скрыло бы
     подпись на кнопке пополнения, поэтому теперь сокращается только она. */
  .credits-button { padding: 9px 13px; }
  .page { width: min(100% - 28px, 1180px); padding-top: 40px; }
  .recorder { display: block; margin-bottom: 56px; padding: 24px 18px; border-radius: 22px; }
  .recorder-panel { margin-top: 28px; padding: 18px; }
  .recorder-state { grid-template-columns: 14px 1fr; }
  .recorder-state time { grid-column: 2; margin-top: 8px; font-size: 30px; }
  .recorder-actions, .preview-actions { display: grid; grid-template-columns: 1fr; }
  .recorder-input-meter { grid-template-columns: 1fr; }
  .hero, .detail-header { display: block; }
  .hero-number { margin-top: 24px; text-align: left; }
  .summary-stats { margin-top: 26px; }
  .player-panel { grid-template-columns: 1fr; gap: 10px; }
  .player-copy span { display: none; }
  .section-heading { display: block; }
  .transcript-views { justify-content: flex-start; margin-top: 16px; }
  .legend { margin-top: 16px; }
  .segment { grid-template-columns: 64px 1fr; gap: 12px; padding: 18px 14px; }
  .segment-body p { font-size: 16px; }
  .speaker-edit-grid { grid-template-columns: 1fr; }
  .speaker-name-forms form { grid-template-columns: 1fr; }
  .export-toggle-grid { grid-template-columns: 1fr; }
  .card-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .login-card { padding: 34px 22px; }
  .feedback-shell { display: block; }
  .document-header { display: block; }
  .document-status { display: inline-block; margin-top: 16px; }
  .document-editor-panel { padding: 18px 14px; }
  .document-textarea { min-height: 55vh; padding: 14px; font-size: 16px; }
  .result-chain-heading { display: block; }
  .result-chain-heading span { display: block; margin-top: 4px; }
  .result-chain-steps { grid-template-columns: 1fr; }
  .feedback-card { margin-top: 30px; padding: 22px 18px; }
  .monitoring-heading { align-items: start; flex-direction: column; }
  .metric-cards { grid-template-columns: repeat(2, 1fr); }
  .monitoring-grid { grid-template-columns: 1fr; }
  .monitor-panel-wide { grid-column: auto; }
  .usage-cards, .capacity-facts { grid-template-columns: repeat(2, 1fr); }
  .service-status-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { min-height: 72px; padding: 12px 18px; }
  .topbar .brand { min-width: 0; }
  .topbar-primary { display: none; }
  .account-menu { display: none; }
  .mobile-account-menu { position: relative; display: block; margin-left: auto; }
  .mobile-account-menu summary { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 11px; border: 1px solid #ead8cc; border-radius: 11px; color: #d94d2f; background: #fffdfb; font-size: 13px; font-weight: 800; cursor: pointer; list-style: none; }
  .mobile-account-menu summary::-webkit-details-marker { display: none; }
  .mobile-account-menu summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
  .mobile-account-menu nav { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; display: grid; width: min(250px, calc(100vw - 36px)); padding: 8px; border: 1px solid #ead8cc; border-radius: 14px; background: #fffdfb; box-shadow: 0 16px 34px rgba(81,55,39,.16); }
  .mobile-account-menu nav a, .mobile-account-menu nav button { padding: 11px 12px; border: 0; border-radius: 9px; color: #514a46; background: transparent; font: 750 14px/1.2 inherit; text-align: left; text-decoration: none; }
  .mobile-account-menu nav a:hover, .mobile-account-menu nav button:hover { color: #c9472a; background: #fff2ec; }
  .mobile-account-menu nav form { margin: 0; }
  .support-hero { grid-template-columns: 1fr; }
  .support-card { order: -1; }
  .support-principles, .support-info, .support-actions { grid-template-columns: 1fr; }
  .support-card { padding: 24px 18px; }
  .account-heading, .account-panel-heading { align-items: flex-start; flex-direction: column; }
  .account-heading .lead { overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
  .account-summary-cards article { padding: 17px; }
  .account-summary-cards, .account-grid { grid-template-columns: 1fr; }
  .account-panel-wide { grid-column: auto; }
  .account-table { min-width: 660px; }
  .admin-summary-cards, .admin-detail-grid, .admin-quota-current, .admin-quota-form { grid-template-columns: 1fr; }
  .admin-detail-wide, .admin-quota-reason, .admin-quota-check, .admin-quota-actions { grid-column: auto; }
  .admin-quota-heading { align-items: flex-start; flex-direction: column; }
  .admin-quota-remove { grid-template-columns: 1fr; }
  .operator-details { display: grid; gap: 4px; }
  .taskforge-news-footer { align-items: flex-start; flex-direction: column; gap: 13px; }
  .taskforge-news-footer nav { width: 100%; }
  .legal-document, .legal-accept-card { padding: 26px 18px; border-radius: 18px; }
  .site-footer { width: min(100% - 28px, 1180px); }
  .availability-banner { align-items: stretch; flex-direction: column; gap: 7px; padding: 10px 14px; }
  .availability-banner div { display: grid; gap: 3px; }
  .availability-return { align-self: center; }
  .home-v2-body > .topbar { padding-right: 16px; padding-left: 16px; }
  .home-v2-body > .site-footer { width: auto; margin-right: 16px; margin-left: 16px; }
  .home-v2 { grid-template-columns: 1fr; }
  .home-sidebar { position: static; width: auto; height: auto; padding: 14px 18px; border-right: 0; border-bottom: 1px solid #eadfd5; }
  .home-folder-list, .new-folder-panel, .home-sidebar-divider, .folder-manage-panel, .home-trash-link { display: none; }
  .mobile-folder-menu { display: block; margin-top: 12px; }
  .mobile-folder-menu summary { display: flex; align-items: center; gap: 9px; min-height: 42px; color: #d94a2c; font-weight: 800; cursor: pointer; list-style: none; }
  .mobile-folder-menu summary::-webkit-details-marker { display: none; }
  .mobile-folder-menu[open] summary { margin-bottom: 8px; }
  .mobile-folder-menu nav { display: grid; gap: 4px; }
  .mobile-folder-menu nav a, .mobile-folder-menu > a { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 7px 10px; border-radius: 9px; color: #544f4d; text-decoration: none; }
  .mobile-folder-menu nav a[aria-current="page"] { color: #d84427; background: #fff0eb; }
  .mobile-folder-menu b { padding: 2px 6px; border-radius: 999px; background: #f3e8df; font-size: 11px; }
  .mobile-folder-menu form { display: grid; gap: 6px; margin: 12px 0; padding-top: 12px; border-top: 1px solid #eadfd5; }
  .mobile-folder-menu label { color: var(--muted); font-size: 12px; font-weight: 700; }
  .mobile-folder-menu form div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .mobile-folder-menu input { min-width: 0; padding: 9px 10px; border: 1px solid #e3d7cd; border-radius: 9px; background: white; }
  .mobile-folder-menu button { padding: 9px 12px; border: 0; border-radius: 9px; color: white; background: var(--home-coral); font-weight: 800; }
  .home-content { padding: 24px 16px 45px; }
  .home-hero { grid-template-columns: 1fr; gap: 24px; }
  .home-hero-copy { height: auto; min-height: auto; }
  .home-hero-copy h1 { font-size: 40px; }
  .recorder-v2 { display: grid; grid-template-columns: 1fr; }
  .recorder-v2 .home-action-card { height: auto; min-height: 170px; }
  .recorder-session-panel { grid-column: 1; }
  .processing-steps { grid-template-columns: 1fr; }
  .processing-steps > div { border-right: 0; border-bottom: 1px solid #eadfd5; padding: 14px 4px; }
  .tasks-heading { align-items: start; flex-direction: column; }
  .batch-processing-v2 form { grid-template-columns: 1fr; }
  .task-list { overflow: visible; }
  .task-row { grid-template-columns: 42px minmax(0, 1fr) 58px 34px; min-width: 0; gap: 7px; padding: 9px 12px; }
  .task-wave, .task-duration, .task-folder, .task-row .status { display: none; }
  .task-open { display: inline-block; color: #c9472a; font-size: 12px; white-space: nowrap; }
  .task-row > .card-trash-action { margin-left: 0; }
  .task-row .card-trash-action button { width: 32px; height: 32px; }
  .recordings-pagination { align-items: flex-start; flex-direction: column; }
  .record-header-actions .trash-action button { display: inline-flex; width: auto; gap: 7px; padding: 0 12px; align-items: center; }
  .record-header-actions .trash-action-label { display: inline; }

  /* Mobile speaker editor: keep the controls in reach without widening the page. */
  .record-detail-v2,
  .record-detail-v2 .transcript-workspace-v2,
  .record-detail-v2 .transcript-main-v2,
  .record-detail-v2 .transcript-v2,
  .record-detail-v2 .speaker-inspector-v2 {
    min-width: 0;
    max-width: 100%;
  }
  .record-detail-v2 > * {
    min-width: 0;
    max-width: 100%;
  }
  .record-detail-v2 .record-title-line,
  .record-detail-v2 .record-title-editor,
  .record-detail-v2 .record-title-line h1,
  .record-detail-v2 .record-title-edit-button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .record-detail-v2 .record-title-edit-button span { min-width: 0; }
  .record-detail-v2 .record-header-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .record-detail-v2 .record-header-actions .download-menu,
  .record-detail-v2 .record-header-actions .trash-action { margin: 0; }
  .record-detail-v2 .record-header-actions .trash-action { margin-left: auto; }
  /* На мобильном кнопки идут через space-between и «Скачать» оказывается
     слева (корзина прижата вправо margin-left:auto) — привязка к правому
     краю, верная для десктопа, здесь толкает панель ещё дальше за левый
     край экрана. Возвращаем привязку к левому краю кнопки. */
  .record-detail-v2 .record-header-actions .export-options form {
    left: 0;
    right: auto;
  }
  .record-detail-v2 .record-player-v2 {
    position: sticky;
    top: 8px;
    z-index: 30;
  }
  .record-detail-v2 .transcript-workspace-v2.is-editing {
    overflow-x: clip;
    padding-bottom: 86px;
  }
  .record-detail-v2 .transcript-workspace-v2.is-editing .speaker-inspector-v2 {
    order: -1;
    position: static;
  }
  .record-detail-v2 .speaker-inspector-v2 .batch-correction-toolbar {
    position: fixed;
    top: 74px;
    right: 14px;
    bottom: auto;
    left: auto;
    z-index: 40;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .record-detail-v2 .speaker-inspector-v2 .batch-correction-toolbar.is-visible { display: block; }
  .record-detail-v2 .speaker-inspector-v2 .batch-correction-toolbar span { display: none; }
  .record-detail-v2 .speaker-inspector-v2 .batch-correction-toolbar button {
    width: auto;
    min-height: 44px;
    padding: 11px 16px;
    box-shadow: 0 8px 20px rgba(93, 58, 41, .2);
  }
}

@media (max-width: 760px) {
  .landing-hero-cta { width: 100%; justify-content: center; }
  .landing-essentials { grid-template-columns: 1fr; gap: 22px; margin-top: 40px; }
}

@media (max-width: 760px) {
  .tutorial-video { padding: 12px; border-radius: 16px; }
  .tutorial-video-heading { flex-direction: column; align-items: flex-start; gap: 6px; }
  .guide-videos { gap: 18px; margin-top: 28px; }
  .guide-hint { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .guide-hint-icon { width: 38px; height: 38px; }
  /* Крестик уезжает в угол карточки, поэтому текст поджимаем справа,
     иначе первая строка уходит под него. */
  .guide-hint-copy { flex-basis: calc(100% - 88px); padding-right: 30px; }
  .guide-hint-cta { flex-basis: 100%; text-align: center; }
  .guide-hint-dismiss { position: absolute; top: 8px; right: 8px; }
}
