/* 翻译记录 on the workspace system. Colours, type, shape and motion come from the --ws-* tokens
   (workspace-tokens.css); the heading, cards, buttons, segments, fields, menus and empty states are the ws-*
   components (workspace-ui.css), which load just before this file. What is left here is particular to this
   page: the frame, the 300px list card beside the detail card, the list rows, the detail header and its
   menus, the captions (set like the live pages), notes, questions and the review panel.
   It replaces records-v31.css, brand-workspace-v44.css and workspace-refinement-v1.css on /records.
   Every rule hangs off body.app-page.records-page. workspace-ui.css rounds every button and field to
   --r-control with !important, so that variable is set locally instead of fighting it.
   The records-* class names are the hooks records-v31.js and records-review-v36.js already emit. */

/* ---------- Frame ---------- */
/* The legacy palette remap, the 1560px frame and the header's 开始翻译 stepping aside on desktop are shared
   (workspace-ui.css); the one solid-blue button on this page is the heading's 开始翻译. */
body.app-page.records-page .app-main{min-width:0;padding:24px clamp(16px,2.5vw,32px) 24px}
body.app-page.records-page .is-error{color:var(--ws-danger)}
body.app-page.records-page .ws-btn[hidden]{display:none}

/* Icons are masks, so they follow the text colour in both themes. */
body.app-page.records-page .records-i{display:inline-block;flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
body.app-page.records-page .ws-empty .records-i{width:32px;height:32px}
body.app-page.records-page .records-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Heading: 云端 / 此设备 and 开始翻译 on the right ----------
   When the English toolbar does not fit beside the title, the whole toolbar moves under it. */
body.app-page.records-page .records-head{flex-wrap:wrap;row-gap:12px}
body.app-page.records-page .records-head__text{min-width:0}
/* Beside the title the toolbar sits on the right; on phones it moves under the title and starts at the left. */
@media(min-width:768px){body.app-page.records-page .records-head .ws-head__tools{margin-left:auto}}
/* records-embed-v32.js relabels the first span of 开始翻译, so the microphone is drawn on the link itself. */
body.app-page.records-page #recordsReturnToLive::before{content:"";flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:url(/vendor/lucide/mic.svg) center/contain no-repeat;mask:url(/vendor/lucide/mic.svg) center/contain no-repeat}
body.app-page.records-page .records-live-state{margin:-8px 0 14px;font-size:12px;line-height:1.5;color:var(--ws-text-2)}

/* ---------- Two cards: the list (300px) and the detail; each scrolls on its own ---------- */
body.app-page.records-page .records-root{min-width:0}
body.app-page.records-page .records-split{display:grid;grid-template-columns:300px minmax(0,1fr);gap:12px;height:max(500px,calc(100dvh - 230px))}
body.app-page.records-page .records-list-pane,
body.app-page.records-page .records-detail-pane{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0}

/* ---------- List card: search, course menu and sort, then the rows ---------- */
body.app-page.records-page .records-list-tools{display:grid;gap:8px;padding:12px 12px 10px;border-bottom:.5px solid var(--ws-line)}
body.app-page.records-page .records-search{display:block;margin:0}
body.app-page.records-page .records-search .ws-input{width:100%;margin:0}
body.app-page.records-page .records-list-filters{display:flex;gap:8px;min-width:0}
body.app-page.records-page .records-course{position:relative;flex:1 1 0;min-width:0}
body.app-page.records-page .records-course__button{width:100%;margin:0;justify-content:flex-start;font-size:13px;text-align:left;white-space:nowrap}
body.app-page.records-page #recordsCourseName{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.app-page.records-page .records-sort{flex:1 1 0;min-width:0;margin:0}
body.app-page.records-page .records-sort .ws-select{width:100%;margin:0;font-size:13px}
body.app-page.records-page .records-pop{position:absolute;z-index:30;top:calc(100% + 6px)}
body.app-page.records-page .records-course-menu{left:0;min-width:max(100%,220px);max-height:min(360px,60vh);overflow-y:auto}
body.app-page.records-page .records-course-menu>[aria-checked=true]{color:var(--ws-accent-text);font-weight:600}
body.app-page.records-page .records-course-menu>#recordsManageCourses{color:var(--ws-accent-text)}
body.app-page.records-page .records-course-menu>button:disabled{opacity:.45;cursor:not-allowed}

body.app-page.records-page .records-list-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:12px 16px 4px}
body.app-page.records-page .records-list-heading h2{margin:0;font-family:var(--ws-font);font-size:13px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--ws-text-2)}
body.app-page.records-page #recordsCount{font-size:12px;color:var(--ws-text-2);font-variant-numeric:tabular-nums}
body.app-page.records-page .records-list-status{margin:0;padding:0 16px 6px;font-size:12px;line-height:1.5;color:var(--ws-text-2);overflow-wrap:anywhere}
body.app-page.records-page .records-list-status:empty{display:none}
body.app-page.records-page .records-list-status.is-error{color:var(--ws-danger)}
body.app-page.records-page .records-retry{align-self:flex-start;margin:0 16px 8px}
body.app-page.records-page .records-list{display:grid;align-content:start;gap:2px;flex:1 1 auto;min-height:0;padding:4px 8px 8px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
body.app-page.records-page .records-list:empty{display:none}
body.app-page.records-page .records-list-empty{flex:1 1 auto;display:grid;align-content:center}
body.app-page.records-page .records-list-empty .ws-empty{padding:32px 16px}
body.app-page.records-page .records-skeleton{min-height:68px;margin:0 0 2px;border-radius:var(--ws-radius-control)}

/* A row: title, then date · languages and the course, then a short preview. The selected row is accent-soft. */
body.app-page.records-page .records-list .records-row{--r-control:var(--ws-radius-control);display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:2px;width:100%;min-width:0;height:auto;min-height:0;margin:0;padding:9px 10px;border:0;border-radius:var(--ws-radius-control);background:transparent;box-shadow:none;color:var(--ws-text);font-family:var(--ws-font);font-weight:400;text-align:left;cursor:pointer;transition:background-color var(--ws-dur-fast) var(--ws-ease)}
body.app-page.records-page .records-list .records-row:hover:not(:disabled){background:var(--ws-surface-2);transform:none}
body.app-page.records-page .records-list .records-row[aria-pressed=true]{background:var(--ws-accent-soft)}
body.app-page.records-page .records-list .records-row:disabled{opacity:.6;cursor:not-allowed}
body.app-page.records-page .records-list .records-row:focus-visible{outline:none;box-shadow:var(--ws-focus)}
body.app-page.records-page .records-row-title{display:block;overflow:hidden;font-size:14px;font-weight:600;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
body.app-page.records-page .records-row .records-row-meta,
body.app-page.records-page .records-course-label{font-size:12px;line-height:1.4;color:var(--ws-text-2)}
body.app-page.records-page .records-row-preview{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:2px;font-size:12px;line-height:1.5;color:var(--ws-text-2);overflow-wrap:anywhere}
body.app-page.records-page .records-match-kind{font-size:11px;color:var(--ws-accent-text)}
body.app-page.records-page .records-search-mark{padding:0 1px;border-radius:3px;background:var(--ws-accent-soft);color:inherit}

/* ---------- Detail card ---------- */
body.app-page.records-page .records-back{display:none}
body.app-page.records-page .records-back__icon{transform:rotate(180deg)}
body.app-page.records-page .records-detail{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;outline:none;overflow-wrap:anywhere}
body.app-page.records-page .records-detail>.ws-empty{flex:1 1 auto}
body.app-page.records-page .records-detail>.records-state{display:grid;justify-items:center;align-content:center;gap:12px;flex:1 1 auto;padding:48px 24px;text-align:center;color:var(--ws-text-2);font-size:13px}
body.app-page.records-page .records-detail>.records-state p{margin:0}
body.app-page.records-page .records-detail-skeleton{padding:18px}

/* Header: title and language · length · storage on the left; 在工作台打开, export and ··· on the right. The tools
   stay on one line and move under the title as a whole when they do not fit. */
body.app-page.records-page .records-detail-header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:10px 16px;padding:16px 16px 10px 18px}
body.app-page.records-page .records-detail-titles{flex:1 1 240px;min-width:0}
body.app-page.records-page .records-detail-titles h2{margin:0;font-family:var(--ws-font);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:-.01em;color:var(--ws-text);outline:none}
body.app-page.records-page .records-detail-titles .records-row-meta{margin:4px 0 0;font-size:13px;line-height:1.45;color:var(--ws-text-2)}
body.app-page.records-page .records-detail-tools{display:flex;flex-wrap:nowrap;align-items:center;gap:4px;flex:none;margin-left:auto}
body.app-page.records-page .records-menu{position:relative}
body.app-page.records-page .records-menu>summary{list-style:none}
body.app-page.records-page .records-menu>summary::-webkit-details-marker{display:none}
body.app-page.records-page .records-menu>summary::marker{content:""}
/* product-v10.css draws a chevron after every summary; these are icon buttons. */
body.app-page.records-page .records-menu>summary::after{content:none}
body.app-page.records-page .records-menu[open]>summary{background:var(--ws-accent-soft);color:var(--ws-accent-text)}
body.app-page.records-page .records-menu__toggle::before{content:"";flex:none;width:18px;height:18px;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
body.app-page.records-page .records-icon-export{--i:url(/vendor/lucide/download.svg)}
body.app-page.records-page .records-icon-more{--i:url(/vendor/lucide/ellipsis.svg)}
body.app-page.records-page .records-menu>.ws-menu{right:0;min-width:180px}
body.app-page.records-page .records-menu .records-menu-item:disabled{opacity:.45;cursor:not-allowed}
body.app-page.records-page .records-action-status{margin:0;padding:0 18px 8px;font-size:12px;line-height:1.5;color:var(--ws-text-2)}
body.app-page.records-page .records-action-status:empty{display:none}
body.app-page.records-page .records-action-status.is-error{color:var(--ws-danger)}
body.app-page.records-page .records-rename-form{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;padding:0 18px 12px}
body.app-page.records-page .records-rename-form label{flex-basis:100%;font-size:12px;color:var(--ws-text-2)}
body.app-page.records-page .records-rename-form .ws-input{flex:1 1 200px;min-width:0;margin:0}

/* 课程 (courses-v14.js): a small select under the header. */
body.app-page.records-page .records-detail .course-record{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0;padding:0 18px 10px;border:0}
body.app-page.records-page .records-detail .course-record label{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;color:var(--ws-text-2)}
body.app-page.records-page .records-detail .course-record select{--r-control:var(--ws-radius-control);height:30px;min-height:30px;min-width:140px;max-width:240px;margin:0;padding:0 28px 0 10px;border:.5px solid var(--ws-line-strong);border-radius:var(--ws-radius-control);background-color:var(--ws-surface);box-shadow:none;color:var(--ws-text);font-family:var(--ws-font);font-size:13px}
body.app-page.records-page .records-detail .course-record select:focus-visible{outline:none;box-shadow:var(--ws-focus)}
body.app-page.records-page .records-detail .courses-status{font-size:12px;color:var(--ws-text-2)}
body.app-page.records-page .records-detail .courses-status[data-result=error]{color:var(--ws-danger)}

/* Find in this record. */
body.app-page.records-page .records-find{display:flex;align-items:center;gap:2px;min-width:0;margin:0;padding:0 14px 10px 18px}
body.app-page.records-page .records-find .ws-input{flex:1 1 auto;width:100%;min-width:0;height:32px;min-height:32px;margin:0 6px 0 0;font-size:13px}
body.app-page.records-page .records-find-count{flex:none;min-width:3.2em;font-size:12px;color:var(--ws-text-2);font-variant-numeric:tabular-nums;text-align:center}
body.app-page.records-page .records-find .ws-btn{height:32px;min-height:32px}

/* Tabs: a ws-seg (字幕 / 笔记 or 纪要 / 重点 / 问答). As tabs they mark the current one with aria-selected, drawn like
   the pressed segment; the rule comes after workspace-ui.css's hover rule at the same specificity. */
body.app-page.records-page .records-detail-tabs{flex:none;align-self:flex-start;max-width:calc(100% - 36px);margin:0 18px;overflow-x:auto;scrollbar-width:none}
body.app-page.records-page .records-detail-tabs::-webkit-scrollbar{display:none}
body.app-page.records-page .ws-seg button[aria-selected=true]{background:var(--ws-seg-thumb);box-shadow:0 1px 2px rgba(0,0,0,.12);font-weight:600}
body.app-page.records-page .records-tab-count{font-size:11px;font-weight:500;color:var(--ws-text-2);font-variant-numeric:tabular-nums}
body.app-page.records-page .records-detail-panel{flex:1 1 auto;min-height:0;margin-top:12px;padding:16px 18px 24px;border-top:.5px solid var(--ws-line);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;outline:none}
body.app-page.records-page .records-detail-panel:focus-visible{box-shadow:inset 0 0 0 2px var(--ws-accent-text)}
body.app-page.records-page .records-detail-panel>.records-state{margin:0;padding:32px 12px;font-size:13px;line-height:1.5;text-align:center;color:var(--ws-text-2)}

/* ---------- Captions: set like the live pages (original 13px secondary above, translation 21px/500 below) ---------- */
body.app-page.records-page .records-segment{max-width:920px;margin:0;padding:6px 10px;border-radius:var(--ws-radius-control)}
body.app-page.records-page .records-segment+.records-segment{margin-top:14px}
body.app-page.records-page .records-segment-meta{margin:0 0 4px;font-size:12px;line-height:1.4;color:var(--ws-text-2);font-variant-numeric:tabular-nums}
body.app-page.records-page .records-bilingual{display:grid;gap:4px;min-width:0}
body.app-page.records-page .records-caption-original p{margin:0;font-size:13px;line-height:1.55;color:var(--ws-text-2);white-space:pre-wrap;overflow-wrap:anywhere}
body.app-page.records-page .records-caption-translation p{margin:0;font-size:calc(21px * var(--read-scale,1));font-weight:500;line-height:1.5;color:var(--ws-text);white-space:pre-wrap;overflow-wrap:anywhere}
body.app-page.records-page .is-record-target{border-radius:6px;outline:2px solid var(--ws-accent-text);outline-offset:2px;scroll-margin:14px}

/* 笔记 / 纪要 and their citations. */
body.app-page.records-page .records-detail-panel>.records-segment-meta{max-width:920px}
body.app-page.records-page .records-note{max-width:920px;margin:6px 0 10px;font-size:15px;line-height:1.75;color:var(--ws-text);white-space:pre-wrap;overflow-wrap:anywhere}
body.app-page.records-page .records-citation{--r-control:6px;display:inline-flex;align-items:center;height:auto;min-height:0;margin:0 2px;padding:1px 6px;border:.5px solid var(--ws-line-strong);border-radius:6px;background:var(--ws-surface);box-shadow:none;color:var(--ws-accent-text);font-family:var(--ws-font);font-size:12px;font-weight:500;line-height:1.5;vertical-align:baseline;cursor:pointer}
body.app-page.records-page .records-citation:hover{background:var(--ws-accent-soft);transform:none}
body.app-page.records-page .records-citation:focus-visible{outline:none;box-shadow:var(--ws-focus)}

/* 问答. */
body.app-page.records-page .records-message{max-width:920px;margin:0 0 10px;padding:12px 14px;border:.5px solid var(--ws-line);border-radius:var(--ws-radius-card);background:var(--ws-surface-2)}
body.app-page.records-page .records-message-user{border-color:transparent;background:var(--ws-accent-soft)}
body.app-page.records-page .records-message h4{margin:0 0 4px;font-family:var(--ws-font);font-size:12px;font-weight:600;line-height:1.4;color:var(--ws-text-2)}
body.app-page.records-page .records-message p{margin:0;font-size:14px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
body.app-page.records-page .records-answer-scope{display:block;margin-top:8px;font-size:12px;line-height:1.5;color:var(--ws-text-2)}

/* The review panel (records-review-v36.js): ask about the record, or generate 纪要. */
body.app-page.records-page .records-review{max-width:920px;margin:0 0 14px;padding:14px;border:.5px solid var(--ws-line);border-radius:var(--ws-radius-card);background:var(--ws-surface-2)}
body.app-page.records-page .records-message+.records-review{margin-top:14px}
body.app-page.records-page .records-review p:empty{display:none}
body.app-page.records-page .records-review-form label{display:block;margin:0 0 6px;font-size:13px;font-weight:500;color:var(--ws-text)}
body.app-page.records-page .records-review .ws-textarea{min-height:84px;margin:0}
body.app-page.records-page .records-review-form-footer,
body.app-page.records-page .records-review-note-actions,
body.app-page.records-page .records-review-actions,
body.app-page.records-page .records-review-login{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
body.app-page.records-page .records-review-form-footer{margin-top:8px}
body.app-page.records-page .records-review-actions,
body.app-page.records-page .records-review-login{margin-top:10px}
body.app-page.records-page .records-review-login p{margin:0;font-size:13px;color:var(--ws-text-2)}
body.app-page.records-page .records-review-count{margin-left:auto;font-size:12px;color:var(--ws-text-2);font-variant-numeric:tabular-nums}
body.app-page.records-page .records-review-hint{font-size:12px;line-height:1.5;color:var(--ws-text-2)}
body.app-page.records-page .records-review-status{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--ws-text-2);white-space:pre-wrap}
body.app-page.records-page .records-review-status.is-error{color:var(--ws-danger)}
body.app-page.records-page .records-review-stream{margin-top:12px;padding-top:12px;border-top:.5px solid var(--ws-line)}
body.app-page.records-page .records-review-stream h4{margin:0 0 6px;font-family:var(--ws-font);font-size:12px;font-weight:500;color:var(--ws-text-2)}
body.app-page.records-page .records-review-question{margin:0 0 8px;padding:8px 10px;border-radius:var(--ws-radius-control);background:var(--ws-accent-soft);font-size:13px}
body.app-page.records-page .records-review-output{font-size:14px;line-height:1.7;color:var(--ws-text);white-space:pre-wrap;overflow-wrap:anywhere}
body.app-page.records-page .records-review-draft{margin:10px 0 0}
body.app-page.records-page .records-review-draft>summary{padding:4px 0;font-size:12px;color:var(--ws-text-2);cursor:pointer}

/* ---------- Under the cards ---------- */
body.app-page.records-page .records-storage-note{display:flex;align-items:center;gap:6px;margin:10px 2px 0;font-size:12px;line-height:1.5;color:var(--ws-text-2)}
body.app-page.records-page .records-storage-note .records-i{width:14px;height:14px}
body.app-page.records-page .records-noscript{margin:16px 0;font-size:13px;color:var(--ws-text-2)}

/* ---------- Embedded in a workspace (records-embed-v32.js): only the page body ---------- */
html.records-embedded body.app-page.records-page :is(.site-header,.app-sidebar,.workspace-nav-backdrop,.skip){display:none}
html.records-embedded body.app-page.records-page .app-frame{display:block;min-height:0;margin:0}
html.records-embedded body.app-page.records-page .app-main{padding:20px}
html.records-embedded body.app-page.records-page .records-split{height:max(460px,calc(100dvh - 150px))}

/* ---------- Phones: the list first; an opened record replaces it, with 返回 above ---------- */
@media(max-width:767px){
 body.app-page.records-page .app-main{padding:16px 16px calc(24px + env(safe-area-inset-bottom))}
 body.app-page.records-page .records-split{display:block;height:auto}
 body.app-page.records-page .records-list-pane{min-height:360px}
 body.app-page.records-page .records-list{overflow:visible}
 body.app-page.records-page .records-detail-pane{display:none;min-height:420px}
 body.app-page.records-page .records-root[data-detail-open=true] .records-list-pane{display:none}
 body.app-page.records-page .records-root[data-detail-open=true] .records-detail-pane{display:flex}
 body.app-page.records-page .records-root[data-detail-open=true] .records-back{display:inline-flex;align-self:flex-start;margin:8px 0 0 6px}
 body.app-page.records-page .records-back[hidden]{display:none}
 body.app-page.records-page .records-detail-header{padding:10px 12px 8px 14px}
 body.app-page.records-page .records-detail-titles{flex-basis:100%}
 /* The tools start at the left edge here, so both menus hang from the tools' left edge and stay on screen. */
 body.app-page.records-page .records-detail-tools{position:relative;margin-left:0}
 body.app-page.records-page .records-menu{position:static}
 body.app-page.records-page .records-menu>.ws-menu{right:auto;left:0}
 body.app-page.records-page :is(.records-action-status,.records-rename-form,.records-detail .course-record){padding-inline:14px}
 body.app-page.records-page .records-find{padding:0 10px 10px 14px}
 body.app-page.records-page .records-detail-tabs{max-width:calc(100% - 28px);margin:0 14px}
 body.app-page.records-page .records-detail-panel{overflow:visible;padding:14px 14px 20px}
 body.app-page.records-page .records-segment{padding-inline:4px}
 /* Touch targets the shared layer does not cover: the course picker and the find bar. */
 body.app-page.records-page .records-detail .course-record select{height:44px;min-height:44px}
 body.app-page.records-page .records-find .ws-input{height:44px;min-height:44px}
 body.app-page.records-page .records-find .ws-btn{height:44px;min-height:44px}
}

/* ---------- Reduced motion: everything switches instantly ----------
   Each selector repeats a rule above that moves, at the same specificity and later. */
@media(prefers-reduced-motion:reduce){
 body.app-page.records-page .records-list .records-row{transition:none;animation:none}
}
