:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --panel: #fffefa;
  --ink: #272824;
  --muted: #686961;
  --line: #deded4;
  --red: #b93d2c;
  --red-hover: #9f3021;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
  font-family: var(--sans);
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
button, a, input { -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin: 0; }
button { color: inherit; }
[hidden] { display: none !important; }
.symbols, .visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 5; background: white; color: var(--red); padding: 12px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.site-head { background: var(--panel); border-bottom: 1px solid var(--line); }
.head-inner, .page { width: min(calc(100% - 80px), 1180px); margin-inline: auto; }
.head-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; font: 700 29px/1 var(--sans); letter-spacing: -1.8px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 35px; height: 35px; background: var(--red); border-radius: 10px; display: flex; justify-content: center; align-items: center; gap: 2px; margin-right: 11px; }
.brand-mark i { width: 2px; height: 6px; border-radius: 1px; background: #fff9ef; }
.brand-mark i:nth-child(2) { height: 14px; }.brand-mark i:nth-child(3) { height: 22px; }.brand-mark i:nth-child(4) { height: 11px; }
.brand-period { color: var(--red); }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; color: var(--ink); background: transparent; border: 1px solid #d5d7cc; border-radius: 7px; padding: 9px 13px; min-height: 38px; font: 600 13px/1.3 var(--sans); transition: background-color .15s, border-color .15s; }
.button:hover:not(:disabled), .icon-button:hover { background: #f0f0e8; border-color: #b8bbaf; }
.button:disabled { color: #787a71; background: #f6f6f0; border-color: #e3e4da; }
.page { padding-block: 24px 44px; }
.tape { position: relative; isolation: isolate; flex: 0 1 28%; height: 36px; border-block: 1px solid #dadbd0; opacity: .94; }
.tape-grid { position: absolute; inset: 0; background-image: linear-gradient(to bottom, transparent 49.5%, #c4c6b8 50%, transparent 50.5%), repeating-linear-gradient(to right,#dadbd0 0 1px, transparent 1px 26px); mask-image: linear-gradient(to right, #0002, #0008 15%, #0008 90%, transparent); }
.tape canvas { width: 100%; height: 100%; display: block; position: absolute; }
.tape-origin, .tape-end { position: absolute; height: 5px; width: 1px; background: #929783; bottom: -1px; left: 0; }
.tape-end { left: auto; right: 0; }
.head-inner { gap: 16px; }
.account-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
#accountName { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-panel { width: min(100%, 430px); margin: clamp(20px, 7vh, 72px) auto; }
.auth-panel h2 { font-size: 26px; letter-spacing: -.045em; }
.auth-panel p { margin-top: 10px; color: var(--muted); line-height: 1.5; }
.auth-panel .button { margin-top: 20px; }
.vk-login { color: white; border-color: #0064e0; background: #0064e0; text-decoration: none; }
.vk-login:hover:not(:disabled) { color: white; border-color: #0058c6; background: #0058c6; }
.checking-session :is(#workspace, #result, #accountInfo, #skipToUpload, dialog, .toast) { visibility: hidden; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 19px; align-items: stretch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; min-width: 0; }
.panel-heading { display: flex; align-items: center; gap: 10px; }
.panel-heading h2 { letter-spacing: -.044em; font: 650 21px/1.25 var(--sans); }
.section-glyph { display: inline-flex; align-items: center; justify-content: center; color: var(--red); }
.section-glyph .icon { width: 21px; height: 21px; }
.upload-panel { display: flex; flex-direction: column; }
.upload-panel form { margin: 19px 0 0; }
.dropzone { background: #f8f6ee; border: 1px dashed #c7c4b4; border-radius: 9px; text-align: center; padding: 20px 12px; display: flex; align-items: center; flex-direction: column; transition: border-color .15s, background .15s; }
.dropzone.dragging { background: #fbe8df; border-color: var(--red); }
.drop-icon, .paper-icon { display: inline-flex; justify-content: center; align-items: center; flex: none; height: 38px; width: 38px; border: 1px solid #dcd8c9; border-radius: 11px; color: #555649; background: var(--panel); }
.drop-icon .icon { width: 20px; height: 20px; }
.dropzone strong { font-family: var(--sans); letter-spacing: -.025em; font-size: 16px; font-weight: 650; margin: 10px 0 4px; overflow-wrap: anywhere; max-width: 100%; }
.dropzone p, .jobs-empty p, .result-empty p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.drop-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 13px; }
.red-button { color: #fff; background: var(--red); border-color: var(--red); padding: 9px 16px; }
.red-button:hover:not(:disabled) { color: #fff; background: var(--red-hover); border-color: var(--red-hover); }
.text-button { font-size: 13px; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; padding: 7px 3px; }
.jobs-panel { display: flex; flex-direction: column; }
.count { border-radius: 20px; padding: 2px 7px; background: #eeeee6; color: #5c6155; font: 600 12px/1.4 var(--sans); }
.jobs-empty { flex: 1; min-height: 170px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.jobs-empty strong, .result-empty strong { font-weight: 600; font-size: 15px; letter-spacing: -.025em; }
.jobs-empty p, .result-empty p { margin-top: 4px; }
.empty-lines { display: block; position: relative; width: 48px; height: 37px; margin: 0 0 13px; transform: rotate(-5deg); }
.empty-lines i { display: block; height: 12px; border: 1px solid #c8cbbd; border-radius: 4px; margin: -1px 0 0; background: linear-gradient(to right, #cbcec0 35%, transparent 35%) 7px center/17px 2px no-repeat, #f6f6ed; }
.empty-lines i:nth-child(2) { transform: translateX(3px); }.empty-lines i:nth-child(3) { transform: translateX(1px); }
.job-list { padding: 0; list-style: none; max-height: 225px; overflow: auto; overscroll-behavior: contain; margin: 12px -5px 0; scrollbar-width: thin; }
.job-list:empty { display: none; }
.job-list li { display: flex; align-items: center; gap: 2px; border: 1px solid transparent; border-radius: 8px; margin-bottom: 2px; padding-right: 4px; }
.job-list li:hover { background: #f6f5ee; }.job-list li:has(.job-row[aria-current="true"]) { background: #f7f0e8; border-color: #e4d6c9; }
.job-row { background: transparent; min-width: 0; flex: 1; display: flex; gap: 10px; text-align: left; align-items: center; border: 0; border-radius: 7px; padding: 9px; }
.rename-recording { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.rename-recording:hover, .rename-recording:focus-visible { background: #eee9de; color: var(--red); }
.job-list button:focus-visible { outline-offset: -3px; }
.job-row>.icon:first-child { color: #686b5f; width: 20px; height: 20px; }.job-row[aria-current="true"]>.icon:first-child { color: var(--red); }
.row-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }.row-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { color: var(--muted); font-size: 12px; }.row-arrow { flex: none; height: 14px; width: 14px; color: #77796d; }
.result-panel { margin-top: 19px; padding-bottom: 0; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.current-name { color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; min-width: 0; max-width: 100%; font-size: 13px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 19px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.tabs { display: inline-flex; gap: 2px; background: #eeeee6; padding: 3px; border-radius: 8px; }
.tab { border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 13px; line-height: 1.4; color: var(--muted); padding: 6px 11px; font-weight: 550; }
.tab[aria-selected="true"] { background: var(--panel); color: var(--ink); border-color: #dadcd0; box-shadow: 0 1px 2px #191c1510; }
.structure-button { min-height: 35px; padding: 7px 11px; }
.transcript { min-height: 124px; }
.result-empty { display: flex; gap: 12px; align-items: center; justify-content: flex-start; min-height: 124px; padding: 18px 0; }
.paper-icon { background: #f6f6ee; width: 36px; height: 40px; border: 0; border-radius: 8px; }
.paper-icon .icon { width: 19px; height: 19px; color: #6b6e61; }
.result-text { padding: 22px 0 24px; font: 16px/1.72 var(--sans); max-width: 82ch; overflow-wrap: anywhere; white-space: pre-wrap; }
.result-text.formatted { white-space: normal; }
.formatted p, .formatted ul, .formatted ol { margin: 0 0 .75em; }
.formatted h3, .formatted h4, .formatted h5 { margin: .9em 0 .38em; letter-spacing: -.025em; line-height: 1.3; }
.formatted>:first-child { margin-top: 0; }.formatted>:last-child { margin-bottom: 0; }
.formatted ul, .formatted ol { padding-left: 1.5em; }.formatted li { margin: .2em 0; }
.result-footer { display: flex; gap: 8px; border-top: 1px solid var(--line); padding: 14px 0; }
.error { margin: 10px 0 0; font-size: 13px; color: #9b281f; overflow-wrap: anywhere; }
.jobs-panel .error { margin-top: auto; }
dialog { background: var(--panel); border: 1px solid #d6d5c9; color: var(--ink); border-radius: 14px; padding: 25px; box-shadow: 0 18px 60px #20241d33; width: min(440px, calc(100% - 32px)); }
dialog::backdrop { background: #27291f59; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dialog-heading h2 { font-size: 23px; letter-spacing: -.045em; }
.icon-button { padding: 7px; min-height: 33px; }
#settingsInfo { margin: 14px 0; color: var(--muted); font-size: 14px; line-height: 1.54; }
.key-status { font-size: 13px; margin: 0 0 16px; color: #4d5c47; }
dialog label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
dialog input, dialog textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #bdbfb3; border-radius: 6px; padding: 10px 11px; }
#renameForm label { margin-top: 18px; }
#recordingName { display: block; resize: vertical; min-height: 52px; max-height: 50vh; }
#renameForm .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-actions { margin-top: 17px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; padding: 11px 18px; max-width: calc(100% - 32px); background: #30332a; color: #fff; border-radius: 8px; font-size: 14px; text-align: center; box-shadow: 0 4px 18px #27291f22; }
@media(min-width: 1500px) { .panel { padding-inline: 27px; } }
@media(max-width: 760px) {
  .head-inner, .page { width: min(calc(100% - 36px), 580px); }
  .head-inner { min-height: 60px; }.brand { font-size: 26px; }.brand-mark { width: 31px; height: 31px; }
  .page { padding-top: 16px; }
  .workspace { grid-template-columns: minmax(0,1fr); gap: 13px; }.panel { padding: 18px; border-radius: 12px; }
  .upload-panel form { margin-top: 14px; }.dropzone { padding: 17px 10px; }.jobs-empty { min-height: auto; text-align: left; align-items: flex-start; padding: 13px 0 0 31px; }.empty-lines { display: none; }
  .jobs-empty strong { display: none; }.jobs-empty p { margin: 0; }.result-panel { margin-top: 13px; padding-bottom: 0; }
  .result-bar { flex-wrap: wrap; gap: 9px; margin-top: 14px; }.result-footer { flex-wrap: wrap; }.page { padding-bottom: 24px; }
}
@media(max-width: 430px) {
  .head-inner, .page { width: calc(100% - 28px); }
  .tape { display: none; }.panel-heading h2 { font-size: 19px; }.panel { padding-inline: 15px; }
  .result-bar { align-items: flex-start; }.tab { padding-inline: 8px; }.structure-button { gap: 5px; font-size: 12px; }.structure-button .icon { width: 15px; }
}
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
