/* style.css — docs/product/design-system.md token 落地(TD7)+ 三断点响应式(TD8)+ a11y 基线(TD9)。
   视觉参照:.gstack/wireframe-v2.html(变体 B);冲突时以计划 1.1-1.18 为准。
   OPERATE 模式硬约束(1.10):单 accent、状态色仅 4+2 语义、动效仅功能反馈、
   列表行 ≥64px、正文 ≥14px、对比度 ≥4.5:1、浏览器原生表面全主题化。 */

/* 主题 token 两套(D 模块 UAT):light 为默认与无 JS 降级,deep 由 data-theme="dark" 启用。
   theme-core.js PALETTES 与下列 token 逐项镜像(tests/frontend/theme.test.mjs 校验),
   运行时只改写 --accent/--accent-ink/--accent-hover/--accent-soft/--accent-text/--fs-scale。 */
:root, :root[data-theme="light"] {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #5c5c57;
  --ink-3: #6f6f69;
  --line: #e4e4df;
  --accent: #2f6f4e;
  --accent-ink: #ffffff;
  --accent-hover: #276043;
  --accent-text: #2f6f4e;
  --accent-soft: #e7f0eb;
  --ok: #2e7d32;      --ok-bg: #e8f3ea;
  --warn: #7a5d10;    --warn-bg: #f6efdc;
  --err: #a33a2a;     --err-bg: #f7e8e4;
  --run: #31597f;     --run-bg: #e7eef5;
  --idle: #686862;    --idle-bg: #eeeeea;
  --reply: #5f4b8b;   --reply-bg: #ede9f5;
  --link-visited: #7a5c2e;
  --toast-bg: #1a1a1a;   --toast-ink: #ffffff;
  --disabled-ink: #66665f; --disabled-bg: #f0f0ea;
  --pill-ink: #44443f;   --pill-bg: #eeeeea;
  --focus-ring: #2f6f4e;
  --scroll-thumb: #8a8a82;
  --paper-bg: #ffffff;   --paper-ink: #1a1a1a; --paper-mark-bg: #e7f0eb;
  --backdrop: rgba(26, 26, 26, .45);
  --veil: rgba(247, 247, 245, .88);
  /* typography / spacing / radius / shadows(docs/product/design-system.md) */
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --fs-scale: 1; /* 字号偏好 0.85–1.50,步进 0.05;全部 font-size 经此 token 缩放 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 10px; --sp-4: 12px; --sp-5: 16px; --sp-6: 20px; --sp-7: 24px;
  --r-control: 6px; --r-container: 8px; --r-pill: 99px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-soft: 0 3px 16px rgba(0, 0, 0, .024);
  --shadow-pop: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-modal: 0 4px 24px rgba(0, 0, 0, .16);
  --shadow-dialog: 0 24px 60px rgba(0, 0, 0, .15);
  --shadow-drawer: -2px 0 12px rgba(0, 0, 0, .10);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #141713;
  --surface: #1b1f1a;
  --ink: #f1f4ee;
  --ink-2: #c2c8bc;
  --ink-3: #a9b1a4;
  --line: #3a4238;
  --accent: #5cbf8a;
  --accent-ink: #0b1a11;
  --accent-hover: #7ad3a3;
  --accent-text: #86d6ab;
  --accent-soft: #1e3328;
  --ok: #66d49a;      --ok-bg: #16301f;
  --warn: #ecc369;    --warn-bg: #332912;
  --err: #ff9a86;     --err-bg: #3d1e18;
  --run: #93c2ee;     --run-bg: #16283a;
  --idle: #b6bcb1;    --idle-bg: #242822;
  --reply: #c9b2f5;   --reply-bg: #2b2339;
  --link-visited: #e0be8c;
  --toast-bg: #e9ede4;   --toast-ink: #14170f;
  --disabled-ink: #a2aaa0; --disabled-bg: #242822;
  --pill-ink: #c7cec2;   --pill-bg: #242822;
  --focus-ring: #5cbf8a;
  --scroll-thumb: #6f7a6c;
  --paper-bg: #ffffff;   --paper-ink: #1a1a1a; --paper-mark-bg: #e7f0eb;
  --backdrop: rgba(0, 0, 0, .62);
  --veil: rgba(20, 23, 19, .88);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-soft: 0 3px 16px rgba(0, 0, 0, .35);
  --shadow-pop: 0 2px 8px rgba(0, 0, 0, .50);
  --shadow-modal: 0 4px 24px rgba(0, 0, 0, .60);
  --shadow-dialog: 0 24px 60px rgba(0, 0, 0, .65);
  --shadow-drawer: -2px 0 12px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 32px; background: linear-gradient(110deg, var(--accent-soft), var(--surface)); border-bottom: 1px solid var(--line); }
.workspace-heading h1 { font-size: calc(26px * var(--fs-scale)); letter-spacing: .02em; margin: 4px 0 8px; }
.workspace-heading p { color: var(--ink-2); }
.workspace-heading .eyebrow { color: var(--accent-text); font-size: calc(11px * var(--fs-scale)); letter-spacing: .16em; font-weight: 700; }
.workspace-tag { font-size: calc(13px * var(--fs-scale)); color: var(--accent-text); border: 1px solid var(--line); border-radius: 24px; padding: 10px 16px; background: var(--surface); }
.toolbar-section { min-width: 0; padding: 6px 0; }
.toolbar-search { flex: 1 1 700px; }
.toolbar-secondary { flex: 1 1 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toolbar-growth { flex: 1 1 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 0; }
.toolbar-growth .toolbar-label { margin: 0; }
.toolbar-growth .toolbar-fields { gap: 10px; }
.toolbar-growth .btn, .toolbar-system .btn { min-height: 40px; padding-inline: 16px; white-space: nowrap; }
.toolbar-label { font-size: calc(15px * var(--fs-scale)); font-weight: 700; margin-bottom: 10px; }
.toolbar-label small { font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); font-weight: 400; margin-left: 10px; }
.toolbar-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar-search { flex-basis: 100%; }
.toolbar-search > .toolbar-fields { display: grid; grid-template-columns: minmax(180px, 1.25fr) repeat(2, minmax(165px, 1fr)) minmax(110px, .65fr) minmax(140px, .8fr); gap: 14px; align-items: start; }
.search-field { min-width: 0; display: grid; gap: 6px; }
.search-field > label { font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--ink); }
.search-field > label span { font-size: calc(11px * var(--fs-scale)); font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.search-field > small { font-size: calc(11px * var(--fs-scale)); line-height: 1.5; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar .search-field select, .toolbar .catalog-trigger, .toolbar .search-keyword-control { width: 100%; max-width: none; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: calc(14px * var(--fs-scale)); }
.toolbar .search-field select { padding: 0 10px; }
.catalog-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; cursor: pointer; text-align: left; }
.catalog-trigger > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-trigger b { color: var(--ink-2); font-weight: 400; }
.catalog-trigger:hover, .catalog-trigger[aria-expanded="true"], .catalog-trigger.has-selection { border-color: var(--accent); }
.catalog-trigger.has-selection { color: var(--accent-text); background: var(--accent-soft); }
.search-keyword-control { display: flex; align-items: center; overflow: hidden; }
.toolbar .search-keyword-control input { border: 0; min-width: 0; width: 100%; height: 100%; padding: 0 10px; background: transparent; }
.search-keyword-control:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.search-keyword-control input::-webkit-search-cancel-button { display: none; }
.search-keyword-control button { flex: 0 0 30px; padding: 0; height: 30px; font-size: calc(20px * var(--fs-scale)); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.search-keyword-control button:disabled { opacity: .4; cursor: default; }
.search-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 2px; }
.search-actions .btn { min-height: 40px; }
.search-actions .primary { padding-left: 24px; padding-right: 24px; }
.search-status { grid-column: 1 / -1; margin: -4px 0 0; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); line-height: 1.6; }
.search-status.search-error { color: var(--err); }
.catalog-panel { position: fixed; z-index: 1100; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); font-size: calc(14px * var(--fs-scale)); }
.catalog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.catalog-head strong { font-size: calc(16px * var(--fs-scale)); }
.catalog-head p { margin: 4px 0 0; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); }
.catalog-search { display: flex; align-items: center; gap: 12px; margin: 0 18px 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; }
.catalog-search span { color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); white-space: nowrap; }
.catalog-search input { width: 100%; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--ink); font: inherit; }
.catalog-search:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.catalog-search input:focus-visible { outline: none; box-shadow: none; }
.catalog-body { display: grid; grid-template-columns: 175px minmax(0, 1fr); min-height: 80px; height: 370px; border-top: 1px solid var(--line); overflow: hidden; }
.catalog-body.is-searching { grid-template-columns: minmax(0, 1fr); }
.catalog-groups, .catalog-options { min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.catalog-groups { background: var(--bg); border-right: 1px solid var(--line); padding: 6px; }
.catalog-groups button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 11px 10px; min-height: 42px; background: transparent; color: var(--ink-2); border: 0; border-radius: 6px; text-align: left; font: inherit; cursor: pointer; }
.catalog-groups button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.catalog-options { padding: 12px 16px; }
.catalog-category-title { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.catalog-category-title .catalog-option { font-weight: 600; }
.catalog-section { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.catalog-section:last-child { border-bottom: 0; }
.catalog-section-title .catalog-option { color: var(--ink-2); text-align: left; }
.catalog-leaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 4px; align-content: start; }
.catalog-option { min-width: 0; min-height: 36px; padding: 7px 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: calc(13px * var(--fs-scale)); line-height: 1.5; overflow-wrap: anywhere; text-align: left; }
.catalog-option:hover, .catalog-groups button:hover { background: var(--accent-soft); color: var(--accent-text); }
.catalog-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.catalog-results { display: grid; gap: 4px; }
.catalog-result-count { margin: 0 0 8px; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); }
.catalog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg); }
.catalog-footer span { min-width: 0; overflow-wrap: anywhere; font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); }
.catalog-footer .btn { flex-shrink: 0; }
.search-preview-summary { border: 1px solid var(--line); background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.search-preview-summary p { font-size: calc(13px * var(--fs-scale)); line-height: 1.7; margin: 6px 0 0; overflow-wrap: anywhere; }
@media (max-width: 1050px) {
  .toolbar-search > .toolbar-fields { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .search-keyword, .search-classification { grid-column: span 2; }
  .search-city, .search-salary { grid-column: span 3; }
}
@media (max-width: 600px) {
  .toolbar-search > .toolbar-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .search-keyword { grid-column: 1 / -1; }
  .search-classification, .search-city, .search-salary { grid-column: span 1; }
  .toolbar-search .toolbar-label small { display: block; margin: 4px 0 0; }
  .search-actions .btn { flex: 1 1 auto; }
  .catalog-head { padding: 12px; }
  .catalog-search { margin: 0 12px 10px; }
  .catalog-body { grid-template-columns: 112px minmax(0, 1fr); }
  .catalog-groups button { font-size: calc(12px * var(--fs-scale)); padding: 9px 6px; }
  .catalog-options { padding: 8px; }
  .catalog-section { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .catalog-leaves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-footer { padding: 10px 12px; }
}
.toolbar-system { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.toolbar #metrics { flex-basis: 100%; margin: 0; padding-top: 4px; }
.toolbar #metrics > span { background: var(--surface); border-radius: 8px; }
.score-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.score-point { position: relative; padding-left: 2.5em; line-height: 1.75; overflow-wrap: anywhere; }
.score-number { position: absolute; left: 0; top: 0; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.score-risk .score-number { color: var(--warn); }
.score-point::marker { content: ''; }
.modal.profile-modal.wide { max-width: 1440px; width: 96vw; padding: 28px; background: var(--bg); }
.modal.profile-modal > h4 { font-size: calc(22px * var(--fs-scale)); }
.profile-intro { font-size: calc(18px * var(--fs-scale)); font-weight: 700; margin: 20px 0; }
.profile-intro span { display: block; color: var(--ink-2); font-size: calc(14px * var(--fs-scale)); font-weight: 400; margin-top: 6px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.profile-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.profile-card h3 { font-size: calc(18px * var(--fs-scale)); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-modal .field > label { font-size: calc(14px * var(--fs-scale)); color: var(--ink); }
.profile-modal #wiz-resume { min-height: 440px; line-height: 1.8; }
.profile-modal .profile-card textarea:not(#wiz-resume) { min-height: 100px; line-height: 1.7; }
.profile-upload { display: block; padding: 16px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--accent-soft); font-weight: 600; }
.profile-upload input { display: block; margin-top: 10px; max-width: 100%; }
.profile-modal .actions { position: sticky; bottom: -28px; background: var(--bg); padding: 16px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .toolbar-secondary { gap: 16px; }
  .toolbar-growth { flex-basis: 100%; gap: 12px; }
  .toolbar-growth .toolbar-label { flex-basis: 100%; }
  .workspace-heading { padding: 20px 16px; }
  .workspace-heading h1 { font-size: calc(22px * var(--fs-scale)); }
  .workspace-tag { display: none; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .modal.profile-modal.wide { padding: 16px; width: 100%; }
  .profile-card { padding: 14px; }
}

/* WF3 dedicated, persistent conversation panel; same design tokens. */
.coach-panel { position: fixed; inset: 0; z-index: 90; background: var(--surface); display: flex; flex-direction: column; }
.coach-panel[hidden] { display: none; }
/* The fixed coach panel owns page scrolling. Hide the background document's
   scrollbar while it is open, and restore it automatically on close. */
html:has(.coach-panel:not([hidden])), body:has(.coach-panel:not([hidden])) { overflow: hidden; }
.coach-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.coach-head h2 { font-size: calc(20px * var(--fs-scale)); }
.coach-viewport { flex: 1; overflow: auto; min-height: 0; }
.coach-body { padding: 16px; min-height: 0; }
.coach-head label { margin-left: auto; margin-right: 16px; }
.coach-head select { font: inherit; padding: 4px; }
.coach-head { flex-wrap: wrap; gap: 8px; }
.coach-head input { width: 72px; font: inherit; padding: 4px; }
.coach-body .resume-comparison > summary, .coach-versions > summary { cursor: pointer; font-size: calc(18px * var(--fs-scale)); font-weight: 700; color: var(--accent-text); padding: 12px 0; }
.coach-body .coach-diff h4 { font-size: calc(17px * var(--fs-scale)); font-weight: 700; margin: 12px 0; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.coach-version { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.coach-diff > section { min-width: 0; }
.coach-quotation { border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--bg); }
.coach-quotation blockquote { max-height: 120px; overflow: auto; white-space: pre-wrap; }
.coach-quote-meta, .coach-quote-limit { display: block; margin: 2px 0 6px; }
.btn.coach-quote-offer { position: fixed; z-index: 8; display: inline-flex; min-height: 44px; padding: 10px 16px; background: var(--surface); border-color: var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.coach-time { margin-left: 8px; font-size: calc(12px * var(--fs-scale)); font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.coach-quote-link { cursor: pointer; }
.coach-quote-link:hover, .coach-quote-link:focus-visible { border-left-color: var(--accent-hover); background: var(--bg); }
.coach-message.quote-target { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-control); }
.coach-body label { display: block; margin: 8px 0; }
.coach-body textarea, .coach-body input:not([type=checkbox]) { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--r-control); padding: 8px; font: inherit; background: var(--bg); color: var(--ink); }
.coach-body textarea { min-height: 90px; resize: vertical; }
.coach-body pre, .coach-body p, .coach-body small { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.coach-body pre { padding: 12px; background: var(--bg); max-height: 380px; overflow-y: auto; }
.coach-body small { color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); display: block; }
.coach-body h3 { font-size: calc(15px * var(--fs-scale)); margin: 12px 0 8px; }
.coach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 16px; align-items: stretch; }
.coach-controls, .coach-results nav, .coach-stages { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.coach-meta, .coach-stages { color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); }
.coach-history { position: relative; height: clamp(440px, 60vh, 820px); overflow-y: auto; padding: 8px 12px; scrollbar-gutter: stable; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.coach-message { padding: 12px; margin: 8px 0; background: var(--bg); border-radius: var(--r-container); }
.coach-message.user { background: var(--accent-soft); }
.coach-prose { line-height: 1.8; overflow-wrap: anywhere; }
.coach-prose p { margin: 0 0 8px; white-space: pre-wrap; }
.coach-prose h4 { margin: 18px 0 8px; font-size: calc(16px * var(--fs-scale)); }
.coach-prose h3, .coach-prose h5, .coach-prose h6 { margin: 18px 0 8px; }
.coach-prose ul, .coach-prose ol { padding-left: 24px; margin: 8px 0 14px; }
.coach-prose li { margin: 5px 0; }
.coach-prose pre { white-space: pre; overflow-x: auto; }
.coach-prose code { font-family: Consolas, monospace; background: var(--bg); border-radius: 4px; padding: 2px 4px; }
.coach-prose blockquote { border-left: 3px solid var(--accent); margin: 12px 0; padding-left: 12px; color: var(--ink-2); }
.coach-table { max-width: 100%; overflow-x: auto; }
.coach-table table { border-collapse: collapse; width: 100%; min-width: 480px; table-layout: fixed; margin: 12px 0; }
.coach-table th, .coach-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; line-height: 1.7; overflow-wrap: anywhere; }
.coach-table th { background: var(--bg); }
.coach-source { color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); }
.coach-notice { padding: 10px; color: var(--ok); background: var(--ok-bg); border-radius: 6px; }
.coach-bullet { padding-left: 14px; }
.coach-chat, .coach-results { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--surface); box-shadow: var(--shadow-soft); }
.coach-material-results { align-self: stretch; display: flex; flex-direction: column; }
.coach-material-results > :not(.coach-material-content) { flex-shrink: 0; }
.coach-material-results > .btn { align-self: flex-start; }
.coach-history { overscroll-behavior-y: contain; }
.coach-viewport { background: var(--bg); }
.coach-body { max-width: 1920px; margin: 0 auto; }
.coach-tabs { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.coach-tabs .btn { flex: 1; padding: 12px 16px; font-weight: 700; }
.coach-chat > h3, .coach-results > h3 { font-size: calc(18px * var(--fs-scale)); margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.coach-chat > h3, .coach-results > h3 { min-height: 60px; }
.coach-chat > label { margin-top: 16px; font-weight: 600; }
.coach-chat > .coach-facts { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.coach-facts > summary { cursor: pointer; font-weight: 700; }
.coach-controls { position: sticky; top: -16px; z-index: 2; background: var(--surface); padding: 8px 0; }
.coach-controls .btn { white-space: normal; max-width: 100%; }
.coach-interview-question { margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-control); }
.coach-interview-question summary { cursor: pointer; display: inline-block; }
.coach-message.user { margin-left: 30px; }
.coach-message.assistant { margin-right: 14px; }
.toolbar select { max-width: 140px; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.coach-question { padding: 12px; background: var(--warn-bg); color: var(--warn); }
/* Suggested questions (click to ask), ChatGPT-style starters and follow-ups. */
.coach-empty-hint { margin: 8px 4px 0; color: var(--ink-2); }
.coach-history .coach-prompts.is-starter { margin: 24px 4px 8px; }
.coach-prompts { margin-top: 12px; }
.coach-prompts-title { margin: 0 0 6px; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); }
.coach-prompt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.coach-prompt { max-width: 100%; white-space: normal; text-align: left; line-height: 1.5; padding: 6px 12px; color: var(--ink); }
.coach-prompt:hover:not(:disabled), .coach-prompt:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.coach-prompt:disabled { cursor: not-allowed; color: var(--disabled-ink); background: var(--disabled-bg); border-style: dashed; }
.coach-prompts.is-starter .coach-prompt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.coach-prompts.is-starter .coach-prompt { border-radius: var(--r-container); padding: 10px 14px; min-height: 44px; font-size: calc(13px * var(--fs-scale)); background: var(--bg); }
.coach-fact { display: flex !important; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.coach-proposal, .coach-skill, .coach-artifact { border: 1px solid var(--line); border-radius: var(--r-container); padding: 12px; margin: 12px 0; }
/* Target drafts: visibly separate from the actual resume. */
.coach-resume-results > h3 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.coach-results .resume-view-picker { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.coach-body .resume-view-picker .btn { margin: 0; min-height: 36px; font-size: calc(13px * var(--fs-scale)); }
.coach-target { border: 1px dashed var(--line); border-radius: var(--r-container); padding: 12px; margin: 12px 0; background: var(--bg); overflow-wrap: anywhere; }
.coach-target h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.coach-target-items { padding-left: 20px; }
.coach-target-items > li { margin: 8px 0; }
.coach-target-items > li[data-status="passed"] .resume-status,
.coach-target-items > li[data-status="promoted"] .resume-status { color: var(--accent-text); background: var(--accent-soft); }
.coach-target-items label { display: inline-flex; gap: 6px; align-items: flex-start; }
.coach-target-promote textarea { width: 100%; min-height: 72px; box-sizing: border-box; }
.coach-target .resume-action-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.coach-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.coach-diff del { background: var(--err-bg); padding: 8px; text-decoration: line-through; text-decoration-thickness: 2px; white-space: pre-wrap; }
.coach-diff del::before { content: "− "; font-weight: 700; }
.coach-diff ins::before { content: "+ "; font-weight: 700; }
.coach-diff ins { background: var(--ok-bg); padding: 8px; text-decoration: underline; text-decoration-thickness: 2px; white-space: pre-wrap; }
.coach-body .btn { margin: 4px 4px 4px 0; }

/* Session preparation: readable materials and one clear action area. */
.coach-viewport:has(.coach-setup) { background: var(--bg); }
.coach-setup { max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; }
.coach-setup-intro { margin-bottom: 24px; }
.coach-setup-kicker { color: var(--accent-text); font-size: calc(12px * var(--fs-scale)); font-weight: 600; letter-spacing: .08em; }
.coach-setup-intro h1 { margin: 10px 0; font-size: calc(28px * var(--fs-scale)); line-height: 1.4; letter-spacing: .02em; }
.coach-body .coach-setup-intro > p { margin: 0; color: var(--ink-2); font-size: calc(14px * var(--fs-scale)); line-height: 1.8; }
.coach-setup-context { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.coach-setup-badge { flex: 0 0 auto; padding: 6px 10px; border-radius: var(--r-control); background: var(--accent-soft); color: var(--accent-text); font-size: calc(12px * var(--fs-scale)); font-weight: 600; }
.coach-setup-context > div { min-width: 0; }
.coach-setup-context strong { display: block; font-size: calc(14px * var(--fs-scale)); line-height: 1.6; overflow-wrap: anywhere; }
.coach-body .coach-setup-context small { display: block; margin-top: 3px; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); line-height: 1.6; }
.coach-setup-materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.coach-setup-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.coach-setup-materials > .coach-setup-card { display: flex; flex-direction: column; }
.coach-body .coach-setup-materials textarea { margin-top: auto; }
.coach-setup-card-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.coach-setup-number { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: calc(12px * var(--fs-scale)); font-weight: 700; font-variant-numeric: tabular-nums; }
.coach-setup-card h2 { margin: 2px 0 0; font-size: calc(16px * var(--fs-scale)); line-height: 1.6; }
.coach-body .coach-setup-card label { margin: 0; }
.coach-setup-optional { margin-left: 6px; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); font-weight: 400; }
.coach-body .coach-setup-card-heading p { margin: 6px 0 0; color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); line-height: 1.7; }
.coach-body .coach-setup-card textarea { box-sizing: border-box; height: 340px; min-height: 220px; padding: 16px; border-radius: 8px; font-size: calc(14px * var(--fs-scale)); line-height: 1.85; scrollbar-gutter: stable; }
.coach-body .coach-setup-card input { box-sizing: border-box; min-height: 48px; padding: 12px 16px; border-radius: 8px; font-size: calc(14px * var(--fs-scale)); line-height: 1.6; }
.coach-setup-card :is(textarea, input):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-color: var(--accent); }
.coach-setup-goal { margin-top: 20px; }
.coach-setup-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.coach-body .coach-setup-actions p { margin: 0; color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); line-height: 1.7; }
.coach-setup-actions > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.coach-body .coach-setup-actions .btn { margin: 0; min-height: 44px; padding: 10px 20px; }
.coach-setup-actions .primary span { margin-left: 16px; }
@media (max-width: 900px) {
  .coach-setup { padding: 16px 4px 24px; }
  .coach-setup-materials { grid-template-columns: minmax(0, 1fr); }
  .coach-body .coach-setup-card textarea { height: 280px; }
}
@media (max-width: 540px) {
  .coach-setup-intro h1 { font-size: calc(23px * var(--fs-scale)); }
  .coach-setup-card { padding: 18px 16px; }
  .coach-setup-context { padding: 14px; align-items: flex-start; }
  .coach-setup-actions { align-items: stretch; }
  .coach-setup-actions > div, .coach-setup-actions .btn { width: 100%; }
}
@media (max-width: 760px) {
  .coach-panel:has(.coach-setup) .coach-head { grid-template-columns: minmax(0, 1fr) auto auto; }
  .coach-panel:has(.coach-setup) .coach-head h2 { grid-column: 1 / 3; }
  .coach-panel:has(.coach-setup) .coach-head [data-coach="close"] { grid-column: 3; }
  .coach-panel:has(.coach-setup) .coach-head [data-coach="theme"] { grid-column: 3; grid-row: 2; }
}

/* All three modes share the grid, chat sizing and card styles above.
   The material card stretches to the chat's height; its document fills the
   remaining space and scrolls without squeezing the conversation. */
.coach-material-results > .coach-source,
.coach-interview-source { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: calc(13px * var(--fs-scale)); line-height: 1.7; overflow-wrap: anywhere; }
.coach-interview-source p { margin: 6px 0 0; }
.coach-interview-source details { margin-top: 8px; }
.coach-interview-source summary { cursor: pointer; color: var(--accent-text); }
.coach-material-content { flex: 1 1 auto; height: 0; min-height: 420px; margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; font-size: calc(15px * var(--fs-scale)); line-height: 1.8; }
.coach-material-content > :first-child { margin-top: 0; }
.coach-material-content > :last-child { margin-bottom: 0; }
.coach-material-content .coach-artifact,
.coach-material-content .coach-skill { background: var(--surface); }
.coach-material-content .coach-artifact > summary { cursor: pointer; font-weight: 600; }
.coach-material-content .coach-artifact[open] > summary { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.coach-material-content .coach-prose h2 { margin: 24px 0 12px; font-size: calc(18px * var(--fs-scale)); }
.coach-material-content .coach-prose > :first-child { margin-top: 0; }
/* Visible right-hand tracks also work with classic and overlay scrollbars. */
.coach-viewport, .coach-history, .coach-material-content, .resume-document { scrollbar-width: auto; scrollbar-color: var(--scroll-thumb) var(--bg); }
:is(.coach-viewport, .coach-history, .coach-material-content, .resume-document)::-webkit-scrollbar { width: 12px; height: 12px; }
:is(.coach-viewport, .coach-history, .coach-material-content, .resume-document)::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid var(--line); }

/* Resume reading surface: version controls, paper typography and clear actions. */
.coach-resume-results { align-self: start; }
.coach-resume-results > h3 { min-height: 60px; }
.coach-body .resume-comparison > summary { padding: 0 0 16px; line-height: 1.6; }
.coach-results .resume-version-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.coach-body .resume-version-picker .btn { margin: 0; min-height: 36px; padding: 7px 12px; font-size: calc(13px * var(--fs-scale)); font-variant-numeric: tabular-nums; }
.resume-selected { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.resume-preview-heading { padding: 0 2px 14px; }
.coach-body .resume-selected h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; font-size: calc(16px * var(--fs-scale)); font-weight: 700; line-height: 1.6; }
.resume-status { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); font-weight: 500; line-height: 1.5; }
.resume-status.is-final { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-soft); }
.coach-body .coach-source { font-size: calc(13px * var(--fs-scale)); line-height: 1.7; }
.coach-body .resume-diff-note { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: calc(12px * var(--fs-scale)); }
.resume-diff-key { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.coach-body .resume-selected .resume-document { margin: 0; min-height: 420px; max-height: clamp(460px, 65vh, 840px); padding: 30px 32px 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-bg); color: var(--paper-ink); box-shadow: var(--shadow); overflow: auto; scrollbar-gutter: stable; white-space: normal; font: calc(15px * var(--fs-scale))/1.9 var(--font-body); letter-spacing: .015em; text-align: left; tab-size: 4; }
.resume-document .resume-line { display: block; min-height: 1.9em; white-space: pre-wrap; overflow-wrap: anywhere; }
.resume-document .resume-blank { min-height: 0; height: 8px; }
.resume-document .resume-name { margin: 0 0 8px; color: var(--paper-ink); font-size: calc(25px * var(--fs-scale)); font-weight: 700; line-height: 1.5; letter-spacing: .06em; }
.resume-document .resume-meta { color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); line-height: 1.8; }
.resume-document .resume-heading { min-height: 0; margin: 16px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--accent-text); font-size: calc(16px * var(--fs-scale)); font-weight: 700; line-height: 1.7; letter-spacing: .04em; }
.resume-document .resume-heading:first-child { margin-top: 0; }
.resume-document .resume-entry { margin-top: 12px; padding-bottom: 4px; font-weight: 600; }
.resume-document .resume-item { padding-left: 1.5em; text-indent: -1.5em; margin-bottom: 4px; }
.resume-document .resume-change { border-radius: 2px; background: var(--paper-mark-bg); color: var(--paper-ink); font-weight: 750; }
.coach-resume-results .coach-versions { margin: 14px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; }
.coach-resume-results .coach-versions > summary { padding: 10px 0; font-size: calc(13px * var(--fs-scale)); color: var(--ink-2); font-weight: 600; }
.resume-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.resume-action-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.resume-action-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.resume-action-heading h4 { font-size: calc(14px * var(--fs-scale)); font-weight: 700; }
.resume-action-heading > span { font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.resume-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.resume-history { display: grid; gap: 10px; padding: 14px; margin: 14px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.resume-history .resume-action-buttons { margin-top: 0; }
.coach-body .resume-action-buttons .btn { margin: 0; max-width: 100%; white-space: normal; }
.coach-resume-results .coach-artifact > summary { cursor: pointer; font-weight: 600; line-height: 1.7; }
.coach-resume-results .coach-artifact > p { margin: 10px 0; font-size: calc(13px * var(--fs-scale)); color: var(--ink-2); }
@media (min-width: 761px) and (max-width: 1150px) {
  .resume-actions { grid-template-columns: minmax(0, 1fr); }
  .coach-body .resume-selected .resume-document { padding: 24px 22px 32px; }
}
@media (max-width: 760px) { .coach-panel { inset: 0; border-radius: 0; } .coach-grid { grid-template-columns: minmax(0, 1fr); } .coach-diff { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .coach-chat, .coach-results { padding: 12px; } .coach-body { padding: 10px; } .coach-history { height: 55vh; min-height: 320px; } .coach-tabs .btn { flex-basis: 100%; } }
@media (max-width: 760px) {
  .coach-material-content { min-height: 360px; padding: 12px; }
  .coach-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 14px; }
  .coach-head h2 { font-size: calc(18px * var(--fs-scale)); }
  .coach-head [data-coach="close"] { grid-column: 2; grid-row: 1; }
  .coach-head label { display: flex; align-items: center; gap: 4px; grid-column: 1; grid-row: 2; margin: 0; font-size: calc(12px * var(--fs-scale)); }
  .coach-head input { width: 56px; }
  .coach-head [data-coach="zoom-reset"] { grid-column: 2; grid-row: 2; }
  .coach-controls { position: static; }
  .resume-selected { padding: 10px; border-radius: 10px; }
  .resume-preview-heading { padding: 2px 2px 12px; }
  .coach-body .resume-selected .resume-document { min-height: 360px; max-height: 70vh; padding: 22px 16px 30px; font-size: calc(14px * var(--fs-scale)); }
  .resume-document .resume-name { font-size: calc(23px * var(--fs-scale)); }
  .resume-document .resume-heading { font-size: calc(15px * var(--fs-scale)); }
  .resume-actions { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .resume-action-group { padding: 12px; }
  .coach-body .resume-version-picker .btn { min-height: 40px; padding-inline: 10px; }
}

* { box-sizing: border-box; margin: 0; }

html, body { max-width: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: calc(14px * var(--fs-scale))/1.55 var(--font-body);
  min-height: 100vh;
  overflow-x: hidden; /* TD8:任何断点无横向滚动(兜底,布局本身用 minmax(0,·) 防溢出) */
}

/* ---- 浏览器原生表面主题化(docs/product/design-system.md 必须项 / 1.10 #6) ---- */
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
input, textarea { caret-color: var(--accent-text); }
/* 占位符与原生控件跟随主题(D01.16/D01.22/D03.02):默认 UA 灰在深色/浅色下都接近阈值。 */
::placeholder { color: var(--ink-3); opacity: 1; }
input, select, textarea { accent-color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: var(--r-pill); border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--accent-text); padding: 10px 16px;
  border-radius: 0 0 var(--r-control) 0; text-decoration: underline;
}
.skip-link:focus { left: 0; }

[hidden] { display: none !important; }

/* ---- 全局错误条 / 引导条 ---- */
.errorbar {
  display: flex; align-items: center; gap: var(--sp-4);
  background: var(--err-bg); border-bottom: 1px solid var(--err);
  color: var(--ink); padding: var(--sp-3) var(--sp-5); font-size: calc(13px * var(--fs-scale));
}
.errorbar #error-bar-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.banner {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  background: var(--warn-bg); border: 1px solid var(--warn); color: var(--ink);
  border-radius: var(--r-control); padding: var(--sp-2) 14px;
  font-size: calc(13px * var(--fs-scale)); margin: var(--sp-3) var(--sp-5) 0;
}

/* ---- 工具栏(banner landmark) ---- */
.toolbar {
  display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.toolbar input[type="text"] {
  border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 7px 10px; font: inherit; min-width: 140px; width: 180px;
  max-width: 100%; background: var(--bg); color: var(--ink);
}
.metrics { margin-left: auto; display: flex; gap: var(--sp-2); flex-wrap: wrap; font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); }
.metrics span {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 12px; white-space: nowrap;
}
.metrics b { color: var(--ink); }

/* ---- 预检绿灯面板(#19/§2.19):环境健康七灯(D-PF6),复用 .badge/.b-* 状态色,零新色 ---- */
.preflight {
  display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center;
  padding: 6px var(--sp-5); border-bottom: 1px solid var(--line);
  background: var(--surface); font-size: calc(12px * var(--fs-scale));
}
.preflight .badge { cursor: pointer; } /* 点击非绿灯 → 拦截模态(D-PF6"点击进去完成");绿灯 → toast 详情 */

/* ---- D-PF6 预检拦截模态:非绿灯逐项列出,修复出口可点(登录红灯内嵌扫码按钮) ---- */
.pf-block-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.pf-block-list li {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-control); padding: 8px 10px;
}
.pf-block-list .pf-block-detail { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pf-block-list .pf-block-detail .btn { align-self: flex-start; margin-top: 4px; }

/* ---- 按钮(4 种,docs/product/design-system.md 词汇表) ---- */
.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--r-control); padding: 7px 14px; font: inherit;
  cursor: pointer; min-height: 34px; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { color: var(--ink-2); background: transparent; }
.btn.sm { padding: 3px 10px; min-height: 26px; font-size: calc(12px * var(--fs-scale)); }
.btn:disabled { opacity: 1; cursor: not-allowed; color: var(--disabled-ink); background: var(--disabled-bg); border-color: var(--line); border-style: dashed; }
.linkbtn {
  color: var(--accent-text); background: none; border: none; font: inherit;
  cursor: pointer; padding: 2px; text-decoration: underline; text-underline-offset: 3px;
  min-height: 24px;
}
.linkbtn:visited { color: var(--link-visited); }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:visited { color: var(--link-visited); } /* docs/product/design-system.md:visited 必须可区分 */
.drawer-close { display: none; } /* 仅 <900px 抽屉态显示(见下方媒体查询) */

/* ---- 筛选 chips ---- */
.filter-row {
  display: flex; gap: var(--sp-2); padding: var(--sp-2) var(--sp-5);
  flex-wrap: wrap; align-items: center;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
#job-feedback {
  margin: 0; padding: 12px 20px 14px; background: var(--surface);
  border-bottom: 1px solid var(--line); font-size: calc(12px * var(--fs-scale)); line-height: 1.7;
}
.job-feedback-main { display: block; color: var(--ink-2); }
.job-feedback-main strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.job-feedback-dot { margin: 0 8px; color: var(--ink-3); }
.job-feedback-note { display: block; margin-top: 3px; color: var(--ink-3); font-size: calc(11px * var(--fs-scale)); }
.job-filters { padding: 14px 20px 10px; gap: 6px; border-bottom: 0; }
.job-filters .chip { padding: 5px 12px; }
.job-batch-actions { padding: 8px 20px 12px; gap: 8px; }
.job-batch-actions > label { display: inline-flex; align-items: center; gap: 8px; font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); margin-right: auto; }
.job-batch-actions input, .list .item input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: var(--r-pill); padding: 4px 14px; font: inherit; font-size: calc(12px * var(--fs-scale));
  cursor: pointer; min-height: 28px;
}
.chip[aria-pressed="true"] {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-text); font-weight: 600;
}

/* ---- 双栏布局 + 三断点(TD8,1.12) ---- */
.split { display: grid; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); align-items: stretch; }
.split > .list-pane, .split > .detail-pane { min-width: 0; }
.detail-pane { background: var(--bg); }

/* Desktop: each pane owns its own scrollbar. Scrolling the 岗位列表 no longer
   drags the 招呼语/详情 pane with it; the page itself only scrolls the header.
   The height offset is measured from the sticky toolbar in app.js
   (--toolbar-h) so the panes pin exactly below it at any wrap/zoom. */
@media (min-width: 900px) {
  .split { align-items: start; }
  .split > .list-pane,
  .split > .detail-pane {
    height: calc(100vh - var(--toolbar-h, 0px));
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
}
.analyze-job { margin-top: var(--sp-2); }

@media (min-width: 900px) and (max-width: 1279px) {
  /* 两栏收窄:左固定 380px,详情最小 520px;工具栏指标保留,输入框可缩 */
  .split { grid-template-columns: 380px minmax(0, 1fr); }
  .toolbar input[type="text"] { width: 130px; min-width: 100px; }
  .detail { min-width: 0; }
}

@media (max-width: 899px) {
  /* <900px:列表全宽;详情 = 右侧滑入抽屉(≥90vw,ESC/关闭/焦点圈闭)。
     同一 DOM 元素仅 CSS 变形 → 编辑草稿天然不丢(1.12)。 */
  .split { grid-template-columns: minmax(0, 1fr); }
  .detail-pane {
    position: fixed; top: 0; right: 0; bottom: 0; width: 92vw; max-width: 92vw;
    z-index: 50; background: var(--surface); border-left: 2px solid var(--accent);
    box-shadow: var(--shadow-drawer);
    transform: translateX(105%); transition: transform .18s ease; /* 功能性动效(1.10 #2) */
    overflow-y: auto; overflow-x: hidden;
  }
  .detail-pane.open { transform: none; }
  .drawer-close {
    display: inline-flex; position: sticky; top: var(--sp-2);
    margin: var(--sp-2) 0 0 var(--sp-4); z-index: 51;
  }
  /* 1.13:触控目标 ≥44px(抽屉内) */
  .btn, .chip, .linkbtn, .toast-x, .tone-input, .modal-x { min-height: 44px; min-width: 44px; }
  .theme-swatch { width: 44px; height: 44px; }
  .preflight .badge { min-height: 44px; }
  /* D04.17 触屏标准统一 ≥44×44;紧凑按钮只在桌面端保持 36px。 */
  .btn.sm { min-height: 44px; }
  .list .item { padding: var(--sp-4) var(--sp-5); }
  .metrics { margin-left: 0; width: 100%; }
}

.list-pane { background: var(--surface); border-right: 1px solid var(--line); min-height: 60vh; }

/* ---- 岗位列表(listbox/option 语义,TD9) ---- */
.list { list-style: none; padding: 12px; margin: 0; display: grid; gap: 10px; background: var(--bg); }
.list .item {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) 48px; column-gap: 12px; row-gap: 8px;
  padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  cursor: pointer; min-height: 112px;
}
.list .item:hover { border-color: var(--ink-3); }
.list .item.sel {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent); /* 选中 = 底色 + 左侧指示条(功能性) */
}
.list .item .top { display: contents; }
.list .item .top > input { grid-column: 1; grid-row: 1; margin-top: 4px; }
.list .item .jobtitle {
  grid-column: 2; grid-row: 1; min-width: 0; font-size: calc(15px * var(--fs-scale)); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.job-score { grid-column: 3; grid-row: 1 / 3; align-self: start; display: grid; justify-items: center; gap: 4px; }
.job-score .score { min-width: 44px; height: 32px; padding: 0 5px; font-size: calc(16px * var(--fs-scale)); border-radius: 8px; }
.job-score-label { color: var(--ink-3); font-size: calc(10px * var(--fs-scale)); line-height: 1.3; }
.list .item .meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; line-height: 1.6; }
.job-company { color: var(--ink-2); }
.job-salary { color: var(--accent-text); font-weight: 600; }
.job-city { color: var(--ink-3); }
.list .item .badge { padding: 1px 8px; font-size: calc(11px * var(--fs-scale)); }
.list .item .hello { grid-column: 2 / -1; margin-top: 2px; line-height: 1.75; font-size: calc(12px * var(--fs-scale)); color: var(--ink-3); }
.list .item .rowfail { grid-column: 2 / -1; }
.list .item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 540px) {
  .list { padding: 10px; gap: 8px; }
  .list .item { padding: 14px; column-gap: 10px; grid-template-columns: 16px minmax(0, 1fr) 44px; }
  .job-filters, .job-batch-actions { padding-left: 14px; padding-right: 14px; }
  #job-feedback { padding-left: 14px; padding-right: 14px; }
  .job-batch-actions > label { flex-basis: 100%; min-height: 32px; }
}
.jobtitle { font-weight: 600; overflow-wrap: anywhere; }
.meta { color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); overflow-wrap: anywhere; }
.hello {
  color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); margin-top: var(--sp-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rowfail { color: var(--err); font-size: calc(12px * var(--fs-scale)); margin-top: var(--sp-1); overflow-wrap: anywhere; }

/* ---- 徽章(8 态)+ 匹配分(3 档) ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill); padding: 2px 10px;
  font-size: calc(12px * var(--fs-scale)); font-weight: 600; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.b-idle  { color: var(--idle);  background: var(--idle-bg); }
.b-run   { color: var(--run);   background: var(--run-bg); }
.b-ok    { color: var(--ok);    background: var(--ok-bg); }
.b-err   { color: var(--err);   background: var(--err-bg); }
.b-reply { color: var(--reply); background: var(--reply-bg); }
.b-warn  { color: var(--warn);  background: var(--warn-bg); }

.score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 24px; border-radius: var(--r-control);
  font-weight: 700; font-size: calc(13px * var(--fs-scale)); padding: 0 6px; flex: none;
}
.s-hi  { color: var(--ok);    background: var(--ok-bg); }
.s-mid { color: var(--warn);  background: var(--warn-bg); }
.s-lo  { color: var(--idle); background: var(--idle-bg); }

/* spinner:仅功能状态反馈,1s linear infinite(docs/product/design-system.md motion) */
.spin {
  width: 10px; height: 10px; flex: none;
  border: 2px solid var(--run-bg); border-top-color: var(--run);
  border-radius: 50%; display: inline-block; animation: sp 1s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 3s; }
  .detail-pane { transition: none; }
}

/* ---- 骨架行(1.4 流式到达占位) ---- */
.skel { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); }
.skel .bar {
  height: 12px; border-radius: 4px; margin: 6px 0;
  background: linear-gradient(90deg, var(--idle-bg) 25%, var(--line) 50%, var(--idle-bg) 75%);
  background-size: 200% 100%; animation: sh 1.4s infinite;
}
@keyframes sh { to { background-position: -200% 0; } }

/* ---- 详情栏 ---- */
.detail { padding: var(--sp-6) var(--sp-7); max-width: 900px; }
.detail h3 { font-size: calc(17px * var(--fs-scale)); margin-bottom: 2px; display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.detail .kv { color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); margin-bottom: 14px; overflow-wrap: anywhere; }
.detail section { margin-bottom: var(--sp-5); }
.detail > section { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 18px; }
.detail > section[aria-labelledby="lbl-why"] { padding: 0; border: 0; }
.detail > section > .label { font-size: calc(15px * var(--fs-scale)); font-weight: 700; color: var(--ink); margin-bottom: 12px; letter-spacing: 0; }
.detail .hint { font-size: calc(12px * var(--fs-scale)); line-height: 1.7; color: var(--ink-2); margin: 8px 0; }
.label {
  font-size: calc(11px * var(--fs-scale)); letter-spacing: .06em; color: var(--ink-3);
  text-transform: uppercase; margin-bottom: 6px;
}
.detail-placeholder { color: var(--ink-2); padding: 48px var(--sp-7); text-align: center; }

textarea.helloedit {
  width: 100%; min-height: 96px; border: 1px solid var(--line);
  border-radius: var(--r-control); padding: 10px 12px;
  font: inherit; font-size: calc(13px * var(--fs-scale)); background: var(--bg); color: var(--ink);
  resize: vertical;
}
textarea.helloedit.dirty { border-color: var(--warn); }

/* 数字来源标注(1.3/TD2):hover/focus 卡;无来源 = 黄色警示 */
.numsrc {
  border-bottom: 1px dashed var(--warn); cursor: help;
  position: relative; color: var(--ink); font-size: calc(12px * var(--fs-scale));
  display: inline-block; padding: 0 2px;
}
.numsrc.warned { border-bottom-color: var(--err); background: var(--warn-bg); }
.numsrc .popover {
  display: none; position: absolute; left: 0; top: 1.6em; z-index: 30;
  width: 260px; max-width: 80vw; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-control);
  padding: var(--sp-2) var(--sp-3); font-size: calc(12px * var(--fs-scale)); color: var(--ink-2);
  box-shadow: var(--shadow-pop); white-space: normal;
}
.numsrc:hover .popover, .numsrc:focus .popover, .numsrc:focus-within .popover { display: block; }

.gaps { list-style: none; font-size: calc(13px * var(--fs-scale)); }
.gaps li { padding: 3px 0; color: var(--ink-2); overflow-wrap: anywhere; }
.gaps li::before { content: "– "; color: var(--ink-3); }

details.scorewhy { border: 1px solid var(--line); border-radius: var(--r-control); padding: var(--sp-2) var(--sp-4); font-size: calc(13px * var(--fs-scale)); }
details.scorewhy summary { cursor: pointer; color: var(--ink-2); min-height: 24px; }
.scorewhy .score-value { display: inline-block; margin-left: 12px; color: var(--accent-text); font-size: calc(18px * var(--fs-scale)); }
.score-reason { font-size: calc(14px * var(--fs-scale)); line-height: 1.9; padding: 12px 4px; }
.score-reason h3, .score-reason h4, .score-reason h5, .score-reason h6 { font-size: calc(16px * var(--fs-scale)); color: var(--accent-text); margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.score-reason strong { color: var(--ink); font-weight: 700; }
.score-reason p { margin: 0 0 12px; }
.scorewhy { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.scorewhy > summary { padding: 16px; cursor: pointer; font-weight: 700; background: var(--accent-soft); }
.score-reason { display: grid; gap: 12px; padding: 16px; }
.score-reason .score-points { margin: 0; padding: 0; }
.score-reason .score-points + .score-points { margin-top: 10px; }
.score-reason .score-point { margin: 0; }
.score-reason > .score-section { padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--bg); min-width: 0; }
.score-section > :first-child { margin-top: 0; }
.score-section > :last-child { margin-bottom: 0; }
.score-section.score-risk { border-left-color: var(--warn); }

.actionbar {
  display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
}
.actionbar .right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.docrow { display: flex; gap: 14px; align-items: center; font-size: calc(13px * var(--fs-scale)); flex-wrap: wrap; }
.doclist { list-style: none; }
.doclist li { padding: 4px 0; font-size: calc(13px * var(--fs-scale)); overflow-wrap: anywhere; }

/* 问卷占位卡(1.9/TD5) */
.survey {
  border: 1px solid var(--reply); border-radius: var(--r-control);
  background: var(--reply-bg); padding: var(--sp-4) 14px; font-size: calc(13px * var(--fs-scale)); color: var(--ink);
}
.survey .q { margin: var(--sp-2) 0; color: var(--ink-2); }

/* ---- 模态(扫码重登 / 粘贴 JD / 向导;焦点圈闭 + ESC + 焦点归还) ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--backdrop);
  z-index: 60; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh var(--sp-5) var(--sp-5); overflow-y: auto;
}
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-container); box-shadow: var(--shadow-modal);
  padding: var(--sp-7) var(--sp-7); width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto; position: relative;
}
.modal.wide { max-width: 620px; }
.modal h4 { font-size: calc(15px * var(--fs-scale)); margin-bottom: var(--sp-4); padding-right: 32px; }
.modal .modal-x {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  background: none; border: none; font-size: calc(20px * var(--fs-scale)); line-height: 1;
  color: var(--ink-2); cursor: pointer; padding: var(--sp-2); min-width: 36px; min-height: 36px;
}
.modal textarea, .modal input[type="text"] {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 10px 12px; font: inherit; background: var(--bg); color: var(--ink);
}
.modal textarea { min-height: 140px; resize: vertical; }
.modal .field { margin-bottom: var(--sp-4); }
.modal .field > label { display: block; font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); margin-bottom: var(--sp-1); font-weight: 600; }
.modal .actions { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin-top: var(--sp-5); }
.modal .hint { font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); margin-top: var(--sp-2); }
.login-guide { font-size: calc(13px * var(--fs-scale)); line-height: 1.8; }
.login-guide ol { padding-left: 22px; margin: 8px 0; }
.login-guide li + li { margin-top: 6px; }
.login-result { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); line-height: 1.8; font-size: calc(13px * var(--fs-scale)); overflow-wrap: anywhere; white-space: pre-line; }
.login-result.error { color: var(--err); border-color: var(--err); background: var(--err-bg); }
.login-result.loading { color: var(--run); background: var(--run-bg); }
.modal .warnline { font-size: calc(12px * var(--fs-scale)); color: var(--warn); margin-top: var(--sp-2); }
.modal .errline { font-size: calc(12px * var(--fs-scale)); color: var(--err); margin-top: var(--sp-2); overflow-wrap: anywhere; }

/* 向导三步指示器 */
.steps { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.steps .st {
  flex: 1; text-align: center; font-size: calc(12px * var(--fs-scale)); color: var(--ink-3);
  border-bottom: 3px solid var(--line); padding-bottom: 6px;
}
.steps .st.on { color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.steps .st.done { color: var(--ok); border-color: var(--ok); }

.projcard { border: 1px solid var(--line); border-radius: var(--r-control); padding: 10px 12px; margin-bottom: var(--sp-2); font-size: calc(13px * var(--fs-scale)); }
.projcard .phead { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.projcard .pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-2); }
.projcard .pgrid .full { grid-column: 1 / -1; }
.projcard input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 6px 8px; font: inherit; font-size: calc(13px * var(--fs-scale)); background: var(--bg); color: var(--ink);
}
.projcard .flabel { font-size: calc(11px * var(--fs-scale)); color: var(--ink-3); margin-bottom: 2px; display: block; }

/* QR 模态(1.17) */
.qr-box { text-align: center; }
.qr-frame {
  width: 220px; max-width: 100%; aspect-ratio: 1; margin: 14px auto;
  background: var(--idle-bg); border: 1px solid var(--line); border-radius: var(--r-control);
  display: flex; align-items: center; justify-content: center; color: var(--ink-2);
  font-size: calc(13px * var(--fs-scale)); position: relative; overflow: hidden;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-frame .stale-veil {
  position: absolute; inset: 0; background: var(--veil);
  display: flex; align-items: center; justify-content: center;
  font-size: calc(12px * var(--fs-scale)); color: var(--warn); padding: var(--sp-4); text-align: center;
}

/* ---- toast(右上角,5s 自动消失,可手动关闭) ---- */
.toasts {
  position: fixed; top: var(--sp-5); right: var(--sp-5); z-index: 90;
  display: flex; flex-direction: column; gap: var(--sp-2); max-width: min(360px, 90vw);
}
.toast {
  background: var(--toast-bg); color: var(--toast-ink); border-radius: var(--r-control);
  padding: 10px 12px 10px 16px; font-size: calc(13px * var(--fs-scale)); display: flex;
  align-items: center; gap: var(--sp-3); box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.toast.t-err { background: var(--err); }
.toast.t-ok { background: var(--ok); }
.toast .toast-x {
  background: none; border: none; color: inherit; font-size: calc(16px * var(--fs-scale));
  cursor: pointer; padding: 0 var(--sp-1); margin-left: auto; min-width: 28px; min-height: 28px; flex: none;
}

/* ---- 空态卡(1.7 warm 文案 + 单一主行动 + 额度上下文) ---- */
.empty {
  border: 1px dashed var(--line); border-radius: var(--r-container);
  padding: 40px var(--sp-7); text-align: center; background: var(--surface);
  margin: var(--sp-5);
}
.empty .big { font-size: calc(15px * var(--fs-scale)); font-weight: 600; margin-bottom: 6px; }
.empty p { color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); margin-bottom: var(--sp-5); overflow-wrap: anywhere; }

/* ---- wave-3 gap-closure:粘贴 JD 表单(§2.2 manual)/ 重生成(§2.16)/ 确认模态(§3 规则 1) ---- */
.modal .okline {
  font-size: calc(12px * var(--fs-scale)); color: var(--ok); background: var(--ok-bg);
  border: 1px solid var(--ok); border-radius: var(--r-control);
  padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3);
}
.modal .formgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--sp-3); }
.modal input.invalid, .modal textarea.invalid { border-color: var(--err); }
.confirm-msg { font-size: calc(13px * var(--fs-scale)); overflow-wrap: anywhere; }

/* 粘贴 JD 条目卡(批次累积 1-20 条,复用 .projcard 骨架;#3 补丁) */
.pjd-card textarea { min-height: 90px; } /* 每条目 JD 框比向导摘要框矮,多条并存控高度 */
.pjd-card .phead .errtag { color: var(--err); font-size: calc(12px * var(--fs-scale)); font-weight: 400; }

/* 详情③区 tone 输入(重生成语气要求,≤100 字;禁用态跟随按钮状态机) */
.tone-input {
  border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 6px 10px; font: inherit; font-size: calc(12px * var(--fs-scale));
  background: var(--bg); color: var(--ink);
  flex: 1; min-width: 0; max-width: 340px; min-height: 34px;
}
.tone-input:disabled { opacity: 1; cursor: not-allowed; color: var(--disabled-ink); background: var(--disabled-bg); border-color: var(--line); border-style: dashed; }

/* Interview bank planning dialog (count, daily practice plan, focus). */
dialog.coach-plan-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-dialog);
}
dialog.coach-plan-dialog::backdrop { background: var(--backdrop); }
dialog.coach-plan-dialog h3 { margin: 0 0 8px; font-size: calc(20px * var(--fs-scale)); }
dialog.coach-plan-dialog label { display: block; margin: 14px 0; font-size: calc(14px * var(--fs-scale)); font-weight: 600; }
dialog.coach-plan-dialog input,
dialog.coach-plan-dialog select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
dialog.coach-plan-dialog label small {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: calc(12px * var(--fs-scale));
  font-weight: 400;
}
dialog.coach-plan-dialog .coach-plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---- 长内容(DEF-T11 / D04.08):长中文/英文/URL 任意断行,容器不撑破页面 ---- */
body { overflow-wrap: anywhere; }
.split > *, .list .item, .list .item .top, .detail, .detail > section,
.coach-chat, .coach-results, .coach-message, .coach-prose, .resume-document,
.modal, .theme-panel, .toolbar-fields, .toolbar-section { min-width: 0; }
h1, h2, h3, h4, h5, h6, p, li, td, th,
.jobtitle, .meta, .hello, .badge, .kv, .errline { overflow-wrap: anywhere; }
img, svg, video, canvas { max-width: 100%; }

/* ---- 触屏点击目标(DEF-T10 / D04.17):窄屏输入/下拉/文本域 ≥44×44 ---- */
@media (max-width: 899px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .toolbar input[type="text"], .toolbar select, .modal input[type="text"],
  .modal textarea, .coach-head input, .coach-head select, .projcard input,
  textarea.helloedit, .coach-body textarea, .coach-body input:not([type="checkbox"]),
  .theme-color-row input[type="text"] { min-height: 44px; }
}

/* ---- 浏览器自动填充跟随主题(D04.15) ---- */
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--ink);
}

/* ---- 外观与主题设置面板 ---- */
.theme-panel-backdrop {
  position: fixed; inset: 0; z-index: 130; background: var(--backdrop);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh var(--sp-5) var(--sp-5); overflow-y: auto;
}
.theme-panel {
  width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  padding: var(--sp-7); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-container);
  box-shadow: var(--shadow-modal);
}
.theme-panel :is(input, select, textarea, button, output, .theme-preview, .theme-contrast, .theme-note) { min-width: 0; }
.theme-preview .coach-diff { grid-template-columns: minmax(0, 1fr); }
.theme-preview .btn { max-width: 100%; white-space: normal; }
.theme-panel h3 { font-size: calc(17px * var(--fs-scale)); margin: 0 0 6px; }
.theme-panel .theme-lead { color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); margin-bottom: var(--sp-5); line-height: 1.7; }
.theme-fieldset {
  margin: 0 0 var(--sp-4); padding: 10px 14px 14px; min-width: 0; max-width: 100%;
  border: 1px solid var(--line); border-radius: 10px;
}
.theme-fieldset legend { padding: 0 6px; font-weight: 700; font-size: calc(13px * var(--fs-scale)); }
.theme-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.theme-mode {
  display: flex; align-items: center; gap: var(--sp-2); min-height: 44px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); cursor: pointer;
}
.theme-mode input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.theme-mode span { font-size: calc(13px * var(--fs-scale)); }
.theme-mode:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.theme-mode output { margin-left: auto; font-size: calc(12px * var(--fs-scale)); color: var(--ink-2); }
.theme-hint { margin-top: var(--sp-2); color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); line-height: 1.7; }
.theme-swatches { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.theme-swatch {
  width: 38px; height: 38px; padding: 0;
  /* 深色主题下预设色可能贴近日面底色;边框统一用 ink-3,保证控件边界 ≥3:1(D03.15/D03.21)。 */
  border: 2px solid var(--ink-3);
  border-radius: 50%; cursor: pointer;
}
/* 选中态用内环 + 深色边框,焦点态用外 outline:两者可同时出现且可区分。 */
.theme-swatch[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.theme-swatch:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.theme-color-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }
.theme-color-row label { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); }
.theme-color-row input[type="color"] {
  width: 44px; height: 44px; padding: 2px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
}
.theme-color-row input[type="text"] {
  width: 130px; max-width: 100%; min-height: 44px; padding: 8px 10px; font: inherit;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-control);
}
.theme-font-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.theme-font-row input[type="range"] { flex: 1 1 140px; min-width: 80px; max-width: 100%; min-height: 44px; accent-color: var(--accent); }
.theme-font-row output { min-width: 0; flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.theme-preview { margin-top: var(--sp-3); padding: 12px; background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; }
.theme-preview p { margin: 0 0 var(--sp-2); font-size: calc(14px * var(--fs-scale)); }
.theme-preview .btn { margin-right: 6px; }
.theme-contrast { list-style: none; padding: 0; margin: var(--sp-2) 0 0; display: grid; gap: 3px; color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); }
.theme-contrast b { color: var(--ink); font-variant-numeric: tabular-nums; }
.theme-contrast .bad { color: var(--err); font-weight: 700; }
.theme-msg { margin-top: var(--sp-2); font-size: calc(12px * var(--fs-scale)); line-height: 1.7; }
.theme-msg.err { color: var(--err); }
.theme-msg.ok { color: var(--ok); }
.theme-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-5); }
.theme-actions .grow { flex: 1 1 auto; }
.theme-confirm {
  margin-top: var(--sp-3); padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--warn); background: var(--warn-bg); color: var(--warn);
  font-size: calc(12px * var(--fs-scale)); line-height: 1.7;
}
.theme-confirm .btn { margin-top: var(--sp-2); }
.theme-note { margin-top: var(--sp-3); color: var(--ink-2); font-size: calc(12px * var(--fs-scale)); line-height: 1.7; }
@media (max-width: 560px) {
  .theme-modes { grid-template-columns: minmax(0, 1fr); }
  .theme-panel { padding: var(--sp-5); }
  .theme-color-row { flex-direction: column; align-items: stretch; }
  .theme-color-row label { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .theme-color-row input[type="color"] { width: 100%; max-width: 44px; }
  .theme-color-row input[type="text"] { width: 100%; min-width: 0; }
}

/* ---- 减少动效(D04.14 / D05.14):取消过渡与闪变,保留状态可读 ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .spin { animation: none; border-top-color: var(--run); }
}


/* ============================================================
   Future AI live theme (scoped to html.future-ai)
   Light: cool gray + warm white + mint, cyan-green gradients.
   Dark: deep navy + deep ink green, mint / cyan / electric blue.
   This block only changes presentation; no business selectors are removed.
   ============================================================ */

:root.future-ai {
  --bg: #f3f7f6;
  --surface: #ffffff;
  --ink: #0c1f1a;
  --ink-2: #3f5a52;
  --ink-3: #5f7269;
  --line: #dbe8e3;
  --focus-ring: #0f766e;
  --scroll-thumb: #5f7f73;
  --backdrop: rgba(12, 31, 26, 0.48);
  --veil: rgba(243, 247, 246, 0.90);
  --teal: #14b8a6;
  --teal-soft: #ccfbf1;
  --teal-text: #0f766e;
  --electric: #38bdf8;
  --mint: #99f6e4;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.72);
  --grid-line: rgba(47, 111, 78, 0.07);
  --shadow-glow: 0 0 0 1px rgba(20, 184, 166, 0.10), 0 18px 48px rgba(20, 184, 166, 0.14);
  --font-display: "SF Pro Display", "Avenir Next", "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --future-hero-bg: radial-gradient(760px 420px at 8% 0%, rgba(255, 255, 255, 0.62), transparent 62%), radial-gradient(620px 360px at 92% 8%, rgba(45, 212, 191, 0.36), transparent 66%), radial-gradient(520px 300px at 70% 100%, rgba(56, 189, 248, 0.12), transparent 70%), linear-gradient(135deg, #e3f5f0 0%, #f7fbfa 48%, #def1ec 100%);
  --future-hero-ink: #0c1f1a;
  --future-hero-muted: #4a6b60;
  --future-hero-card: rgba(255, 255, 255, 0.58);
  --future-hero-line: rgba(20, 184, 166, 0.18);
  --future-hero-accent: linear-gradient(90deg, #1f4d36 0%, #0f766e 55%, #14b8a6 100%);
  --future-orb-shadow: 0 0 42px rgba(20, 184, 166, 0.45), 0 0 112px rgba(20, 184, 166, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root.future-ai:not([data-theme="light"]) {
    --bg: #060b10;
    --surface: #0c1620;
    --ink: #e6f7f2;
    --ink-2: #a8c4bc;
    --ink-3: #7b9a92;
    --line: #1e3340;
    --focus-ring: #5eead4;
    --scroll-thumb: #7fa99a;
    --backdrop: rgba(0, 0, 0, 0.65);
    --veil: rgba(6, 11, 16, 0.90);
    --teal: #5eead4;
    --teal-soft: #0d2d2a;
    --teal-text: #99f6e4;
    --electric: #38bdf8;
    --mint: #99f6e4;
    --glass: rgba(12, 22, 32, 0.62);
    --glass-strong: rgba(12, 22, 32, 0.78);
    --glass-line: rgba(94, 234, 212, 0.14);
    --grid-line: rgba(94, 234, 212, 0.06);
    --shadow-glow: 0 0 0 1px rgba(94, 234, 212, 0.10), 0 18px 48px rgba(20, 184, 166, 0.12);
    --future-hero-bg: radial-gradient(760px 420px at 8% 0%, rgba(94, 234, 212, 0.10), transparent 62%), radial-gradient(620px 360px at 92% 8%, rgba(34, 211, 238, 0.12), transparent 66%), radial-gradient(520px 300px at 70% 100%, rgba(56, 189, 248, 0.10), transparent 70%), linear-gradient(135deg, #050b10 0%, #0a1f1b 50%, #0d2e2a 100%);
    --future-hero-ink: #f0fdf9;
    --future-hero-muted: #a8d8cc;
    --future-hero-card: rgba(255, 255, 255, 0.06);
    --future-hero-line: rgba(94, 234, 212, 0.18);
    --future-hero-accent: linear-gradient(90deg, #99f6e4 0%, #38bdf8 100%);
    --future-orb-shadow: 0 0 42px rgba(94, 234, 212, 0.55), 0 0 112px rgba(94, 234, 212, 0.25);
  }
}

:root.future-ai[data-theme="dark"] {
  --bg: #060b10;
  --surface: #0c1620;
  --ink: #e6f7f2;
  --ink-2: #a8c4bc;
  --ink-3: #7b9a92;
  --line: #1e3340;
  --focus-ring: #5eead4;
  --scroll-thumb: #7fa99a;
  --backdrop: rgba(0, 0, 0, 0.65);
  --veil: rgba(6, 11, 16, 0.90);
  --teal: #5eead4;
  --teal-soft: #0d2d2a;
  --teal-text: #99f6e4;
  --electric: #38bdf8;
  --mint: #99f6e4;
  --glass: rgba(12, 22, 32, 0.62);
  --glass-strong: rgba(12, 22, 32, 0.78);
  --glass-line: rgba(94, 234, 212, 0.14);
  --grid-line: rgba(94, 234, 212, 0.06);
  --shadow-glow: 0 0 0 1px rgba(94, 234, 212, 0.10), 0 18px 48px rgba(20, 184, 166, 0.12);
  --future-hero-bg: radial-gradient(760px 420px at 8% 0%, rgba(94, 234, 212, 0.10), transparent 62%), radial-gradient(620px 360px at 92% 8%, rgba(34, 211, 238, 0.12), transparent 66%), radial-gradient(520px 300px at 70% 100%, rgba(56, 189, 248, 0.10), transparent 70%), linear-gradient(135deg, #050b10 0%, #0a1f1b 50%, #0d2e2a 100%);
  --future-hero-ink: #f0fdf9;
  --future-hero-muted: #a8d8cc;
  --future-hero-card: rgba(255, 255, 255, 0.06);
  --future-hero-line: rgba(94, 234, 212, 0.18);
  --future-hero-accent: linear-gradient(90deg, #99f6e4 0%, #38bdf8 100%);
  --future-orb-shadow: 0 0 42px rgba(94, 234, 212, 0.55), 0 0 112px rgba(94, 234, 212, 0.25);
}

html.future-ai body {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(1000px 540px at 12% -12%, color-mix(in srgb, var(--teal) 7%, transparent), transparent 64%),
    radial-gradient(900px 520px at 92% 6%, color-mix(in srgb, var(--electric) 5%, transparent), transparent 66%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ---------- Future hero ---------- */

html.future-ai .workspace-heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 26px;
  align-items: center;
  min-height: 360px;
  padding: 34px 32px 44px;
  overflow: hidden;
  color: var(--future-hero-ink);
  background: var(--future-hero-bg);
  border-bottom: 1px solid var(--future-hero-line);
}
html.future-ai .workspace-heading::before,
html.future-ai .workspace-heading::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
html.future-ai .workspace-heading::before {
  width: 420px;
  height: 420px;
  right: -120px;
  top: -210px;
  background: radial-gradient(circle, color-mix(in srgb, var(--teal) 18%, transparent), transparent 68%);
}
html.future-ai .workspace-heading::after {
  width: 320px;
  height: 320px;
  left: 34%;
  bottom: -220px;
  background: radial-gradient(circle, var(--future-hero-line), transparent 70%);
}
html.future-ai .future-hero-copy { position: relative; z-index: 2; min-width: 0; }
html.future-ai .workspace-heading .eyebrow {
  color: var(--future-hero-muted);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 700;
  letter-spacing: 0.18em;
}
html.future-ai .workspace-heading h1 {
  margin: 10px 0 10px;
  font-family: var(--font-display);
  font-size: calc(44px * var(--fs-scale));
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 750;
  text-wrap: balance;
}
html.future-ai .workspace-heading h1 em {
  font-style: normal;
  color: var(--teal-text);
  background: var(--future-hero-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.future-ai .future-hero-sub {
  max-width: 48ch;
  margin: 0;
  color: var(--future-hero-muted);
  font-size: calc(14px * var(--fs-scale));
  line-height: 1.75;
}
html.future-ai .future-hero-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 5px 10px;
  border: 1px solid var(--future-hero-line);
  border-radius: 99px;
  background: var(--future-hero-card);
  color: var(--future-hero-muted);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 600;
  backdrop-filter: blur(10px);
}
html.future-ai .future-live-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent), 0 0 10px var(--teal);
  animation: future-breathe 2.8s ease-in-out infinite;
}

/* ---------- AI core stage ---------- */

html.future-ai .future-ai-stage {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 340px;
  isolation: isolate;
}
html.future-ai .future-ai-stage::before {
  content: "";
  position: absolute;
  inset: -12px -4px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at 55% 46%, #000 0%, transparent 72%);
  opacity: 0.9;
}
html.future-ai .future-neural {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  color: var(--teal);
  opacity: 0.20;
  pointer-events: none;
}
html.future-ai .future-orb {
  position: absolute;
  left: 50%;
  top: 47%;
  z-index: 2;
  width: min(306px, 78%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
html.future-ai .future-orb::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--teal) 22%, transparent), transparent 68%);
  filter: blur(18px);
  animation: future-core-breathe 5.4s ease-in-out infinite;
}
html.future-ai .future-core {
  position: absolute;
  inset: 33%;
  z-index: 3;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0%, #d9fff4 14%, var(--teal) 42%, #0f766e 72%, #062e2a 100%);
  box-shadow: var(--future-orb-shadow), inset 0 0 24px rgba(255, 255, 255, 0.55);
  animation: future-core-breathe 4.2s ease-in-out infinite;
}
html.future-ai .future-core::after {
  content: "";
  position: absolute;
  inset: 19%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.35);
}
html.future-ai .future-ring-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: rotateX(64deg) rotateZ(0deg);
  transform-style: preserve-3d;
}
html.future-ai .future-ring-wrap.b { inset: 11%; transform: rotateX(70deg) rotateZ(58deg); }
html.future-ai .future-ring-wrap.c { inset: 18%; transform: rotateX(58deg) rotateZ(-34deg); }
html.future-ai .future-ring {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--teal) 38%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--teal) 14%, transparent);
  animation: future-orbit 26s linear infinite;
}
html.future-ai .future-ring-wrap.b .future-ring {
  inset: 0;
  border-color: color-mix(in srgb, var(--electric) 36%, transparent);
  animation-duration: 36s;
  animation-direction: reverse;
}
html.future-ai .future-ring-wrap.c .future-ring {
  inset: 0;
  border-color: color-mix(in srgb, var(--mint) 32%, transparent);
  animation-duration: 44s;
}
html.future-ai .future-node {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--teal);
  transform: translateX(-50%);
}
html.future-ai .future-ring-wrap.b .future-node { background: var(--electric); }
html.future-ai .future-ring-wrap.c .future-node { background: var(--accent); }
html.future-ai .future-float {
  position: absolute;
  z-index: 4;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(16px) saturate(1.2);
  animation: future-float 7.5s ease-in-out infinite;
}
html.future-ai .future-float-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: calc(9px * var(--fs-scale));
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
}
html.future-ai .future-float strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: calc(13px * var(--fs-scale));
  line-height: 1.35;
  letter-spacing: -0.015em;
}
html.future-ai .future-float small { display: block; margin-top: 2px; font-size: calc(9px * var(--fs-scale)); color: var(--ink-3); }
html.future-ai .future-float.match { top: 3%; right: 1%; width: 178px; }
html.future-ai .future-float.prep { bottom: 9%; left: 0; width: 166px; animation-delay: -2.4s; }
html.future-ai .future-float.interview { right: 6%; bottom: 0; width: 178px; animation-delay: -4.8s; }
html.future-ai .future-scan {
  position: relative;
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}
html.future-ai .future-scan i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--electric));
  animation: future-scan-bar 2.8s ease-in-out infinite;
}
html.future-ai .future-particle {
  position: absolute;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--teal);
  opacity: 0.55;
  animation: future-particle 9s ease-in-out infinite;
}
html.future-ai .future-particle.p1 { left: 12%; top: 22%; animation-delay: -1s; }
html.future-ai .future-particle.p2 { left: 78%; top: 16%; animation-delay: -3.4s; }
html.future-ai .future-particle.p3 { left: 16%; bottom: 20%; animation-delay: -5.2s; }
html.future-ai .future-particle.p4 { right: 8%; bottom: 34%; animation-delay: -7s; }

@keyframes future-core-breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes future-orbit { to { transform: rotate(360deg); } }
@keyframes future-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes future-breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 28%, transparent); opacity: 0.78; }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 0%, transparent); opacity: 1; }
}
@keyframes future-particle {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.28; }
  50% { transform: translate3d(0, -18px, 0); opacity: 0.9; }
}
@keyframes future-scan-bar {
  0% { transform: translateX(-110%); }
  55%, 100% { transform: translateX(240%); }
}

/* ---------- Toolbar, status, buttons ---------- */

html.future-ai .toolbar {
  background: var(--glass);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: 0 8px 24px rgba(12, 31, 26, 0.05);
  backdrop-filter: blur(20px) saturate(1.18);
}
html.future-ai .toolbar .search-field select,
html.future-ai .toolbar .catalog-trigger,
html.future-ai .toolbar .search-keyword-control,
html.future-ai .toolbar input[type="text"] {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-color: var(--glass-line);
  border-radius: 10px;
}
html.future-ai .toolbar .search-field select:focus-within,
html.future-ai .toolbar .catalog-trigger:hover,
html.future-ai .toolbar .catalog-trigger[aria-expanded="true"],
html.future-ai .toolbar .catalog-trigger.has-selection,
html.future-ai .toolbar .search-keyword-control:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}
html.future-ai .metrics span {
  background: var(--glass-strong);
  border-color: var(--glass-line);
  border-radius: 99px;
}
html.future-ai .preflight {
  background: var(--glass-strong);
  border-bottom: 1px solid var(--glass-line);
  backdrop-filter: blur(16px) saturate(1.1);
}
html.future-ai .preflight .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent), 0 0 8px currentColor;
  animation: future-breathe 3.4s ease-in-out infinite;
}
html.future-ai .preflight .badge:nth-child(2n)::before { animation-delay: -0.8s; }
html.future-ai .preflight .badge:nth-child(3n)::before { animation-delay: -1.6s; }

html.future-ai .btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
html.future-ai .btn:active { transform: translateY(1px) scale(0.99); }
html.future-ai .btn.primary {
  background-color: var(--accent);
  background-image: linear-gradient(135deg, transparent 0%, color-mix(in srgb, var(--teal) 28%, transparent) 100%);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 24%, transparent);
}
html.future-ai .btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.28) 46%, transparent 72%);
  transform: translateX(-130%);
  transition: transform 0.65s ease;
  pointer-events: none;
}
html.future-ai .btn.primary:hover::after { transform: translateX(130%); }
html.future-ai .btn.primary:hover:not(:disabled) {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 32%, transparent);
}
html.future-ai .btn.ghost {
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  border-color: var(--glass-line);
}
html.future-ai .btn.ghost:hover:not(:disabled) {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 16%, transparent);
}
html.future-ai .chip {
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  border-color: var(--glass-line);
}
html.future-ai .chip[aria-pressed="true"] {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-text);
}

/* ---------- List, filters, detail ---------- */

html.future-ai .filter-row,
html.future-ai #job-feedback {
  background: transparent;
  border-bottom: 1px solid var(--glass-line);
}
html.future-ai .list-pane {
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  border-right: 1px solid var(--glass-line);
}
html.future-ai .list { background: transparent; }
html.future-ai .list .item {
  border-color: var(--glass-line);
  border-radius: 14px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px) saturate(1.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
html.future-ai .list .item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
  box-shadow: var(--shadow-glow);
}
html.future-ai .list .item.sel {
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal-soft) 72%, transparent), var(--glass-strong) 72%);
  border-color: color-mix(in srgb, var(--teal) 52%, var(--line));
  box-shadow: var(--shadow-glow), inset 3px 0 0 var(--teal);
}
html.future-ai .list .item .jobtitle { letter-spacing: -0.01em; }
html.future-ai .job-score .score {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 12%, transparent), 0 4px 12px rgba(20, 184, 166, 0.12);
}
html.future-ai .job-score .score.s-hi {
  background: var(--teal-soft);
  color: var(--teal-text);
}
html.future-ai .detail-pane {
  background: linear-gradient(180deg, var(--glass-strong), var(--surface) 72%);
  border-left: 1px solid var(--glass-line);
}
html.future-ai .detail { max-width: 900px; }
html.future-ai .detail h3 {
  font-family: var(--font-display);
  font-size: calc(20px * var(--fs-scale));
  letter-spacing: -0.025em;
  align-items: center;
}
html.future-ai .detail h3 .score {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: calc(56px * var(--fs-scale));
  height: calc(56px * var(--fs-scale));
  padding: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-num, var(--font-display));
  font-size: calc(18px * var(--fs-scale));
  font-weight: 700;
  color: var(--teal-text);
  isolation: isolate;
  flex: none;
}
html.future-ai .detail h3 .score::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--teal) 20%, transparent));
}
html.future-ai .detail h3 .score.s-hi::before {
  background: conic-gradient(from -90deg, var(--teal) 0 92%, var(--line) 92% 100%);
}
html.future-ai .detail h3 .score.s-mid::before {
  background: conic-gradient(from -90deg, var(--warn) 0 70%, var(--line) 70% 100%);
}
html.future-ai .detail h3 .score.s-lo::before {
  background: conic-gradient(from -90deg, var(--idle) 0 40%, var(--line) 40% 100%);
}
html.future-ai .detail h3 .score.s-mid { color: var(--warn); }
html.future-ai .detail h3 .score.s-lo { color: var(--idle); }
html.future-ai .detail .kv { line-height: 1.7; }
html.future-ai .detail > section {
  border-color: var(--glass-line);
  border-radius: 14px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(18px) saturate(1.12);
}
html.future-ai .detail > section > .label {
  color: var(--teal-text);
  letter-spacing: 0.08em;
}
html.future-ai textarea.helloedit {
  border-color: var(--glass-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}
html.future-ai textarea.helloedit:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 16%, transparent);
}
html.future-ai .scorewhy {
  border-radius: 14px;
}
html.future-ai .scorewhy summary {
  padding: 12px 14px;
}
html.future-ai .actionbar {
  border-top-color: var(--glass-line);
}
html.future-ai .toast {
  border-color: var(--glass-line);
  box-shadow: var(--shadow-glow);
}
html.future-ai .modal,
html.future-ai .theme-panel,
html.future-ai .subscription-dialog,
html.future-ai .account-dialog {
  border-color: var(--glass-line);
  background: var(--glass-strong);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(20px) saturate(1.12);
}

html.future-ai .future-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
html.future-ai .future-hero-actions .btn {
  min-height: 42px;
  padding-inline: 18px;
}
html.future-ai .future-hero-actions a.btn { text-decoration: none; }

/* ---------- Login / auth screen ---------- */

html.future-ai body.auth-page {
  background:
    radial-gradient(circle at 50% 38%, transparent 0 176px, color-mix(in srgb, var(--teal) 14%, transparent) 177px 178px, transparent 179px),
    radial-gradient(circle at 50% 38%, transparent 0 244px, color-mix(in srgb, var(--electric) 10%, transparent) 245px 246px, transparent 247px),
    radial-gradient(620px 620px at 50% 38%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 62%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
}
html.future-ai body.auth-page #auth-screen { background: transparent; }
html.future-ai .auth-card {
  background: var(--glass-strong);
  border-color: var(--glass-line);
  border-radius: 22px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(22px) saturate(1.18);
}
html.future-ai .auth-card .auth-brand {
  color: var(--teal-text);
  letter-spacing: 0.08em;
  font-size: calc(11px * var(--fs-scale));
}
html.future-ai .auth-card h1,
html.future-ai .auth-card h2 {
  font-family: var(--font-display);
  font-size: calc(28px * var(--fs-scale));
  letter-spacing: -0.03em;
}
html.future-ai .auth-card header p { color: var(--ink-2); }
html.future-ai .auth-card input {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-color: var(--glass-line);
  border-radius: 10px;
}
html.future-ai .auth-card input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 16%, transparent);
}
html.future-ai .auth-submit {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}

/* ---------- Responsive ---------- */

@media (max-width: 1050px) {
  html.future-ai .workspace-heading {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding-bottom: 38px;
  }
  html.future-ai .future-ai-stage { min-height: 320px; }
  html.future-ai .future-float.match { right: 4%; }
  html.future-ai .future-float.interview { right: 2%; }
}

@media (max-width: 899px) {
  html.future-ai .workspace-heading {
    padding: 26px 22px 40px;
    gap: 18px;
  }
  html.future-ai .workspace-heading h1 { font-size: calc(34px * var(--fs-scale)); }
  html.future-ai .future-ai-stage { min-height: 320px; }
  html.future-ai .future-orb { width: min(260px, 72%); }
  html.future-ai .detail-pane {
    background: var(--surface);
    border-left-color: var(--teal);
  }
}

@media (max-width: 600px) {
  html.future-ai .workspace-heading {
    padding: 22px 16px 34px;
  }
  html.future-ai .workspace-heading h1 { font-size: calc(30px * var(--fs-scale)); }
  html.future-ai .future-hero-sub { font-size: calc(13px * var(--fs-scale)); }
  html.future-ai .future-ai-stage { min-height: 300px; }
  html.future-ai .future-orb { width: min(228px, 68%); }
  html.future-ai .future-float { padding: 8px 10px; }
  html.future-ai .future-float.match { top: 0; right: 0; width: 150px; }
  html.future-ai .future-float.prep { display: none; }
  html.future-ai .future-float.interview { right: 0; bottom: 0; width: 152px; }
  html.future-ai .future-float strong { font-size: calc(12px * var(--fs-scale)); }
  html.future-ai .future-neural { opacity: 0.14; }
  html.future-ai .future-particle.p3,
  html.future-ai .future-particle.p4 { display: none; }
  html.future-ai .detail h3 { font-size: calc(18px * var(--fs-scale)); }
  html.future-ai .detail h3 .score {
    width: calc(48px * var(--fs-scale));
    height: calc(48px * var(--fs-scale));
    font-size: calc(16px * var(--fs-scale));
  }
  html.future-ai .toolbar { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html.future-ai .future-core,
  html.future-ai .future-orb::before,
  html.future-ai .future-ring,
  html.future-ai .future-float,
  html.future-ai .future-particle,
  html.future-ai .future-live-dot,
  html.future-ai .preflight .badge::before,
  html.future-ai .future-scan i,
  html.future-ai .btn.primary::after {
    animation: none !important;
    transition: none !important;
  }
}


/* ---- 强制颜色/Windows 高对比度(D03.19 / D06.08):边框与图标保留,自定义色不吞控件 ---- */
@media (forced-colors: active) {
  :root { forced-color-adjust: auto; }
  .btn, .chip, .badge, .resume-status, .coach-artifact, .coach-skill,
  .coach-chat, .coach-results, .theme-panel, .theme-mode, .modal { border: 1px solid ButtonBorder; }
  .btn.primary { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .list .item.sel, .theme-swatch[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .spin { border-color: CanvasText; border-top-color: ButtonText; }
  .theme-swatch { forced-color-adjust: none; }
  .toast { border: 1px solid CanvasText; }
}

/* ---- 打印(DEF-T12 / D01.26 / D06.10):固定浅色纸面,隐藏交互控件,分页不裁切 ---- */
@media print {
  /* 运行时把 --accent 与 --fs-scale 写在根元素 inline style,普通声明会被压过;
     打印固定配色必须 !important 才能覆盖自定义主色/深色主题。 */
  :root, :root[data-theme="light"], :root[data-theme="dark"] {
    --bg: #ffffff !important; --surface: #ffffff !important;
    --ink: #000000 !important; --ink-2: #333333 !important; --ink-3: #444444 !important;
    --line: #999999 !important; --accent: #1f5138 !important; --accent-ink: #ffffff !important;
    --accent-hover: #1f5138 !important; --accent-text: #1f5138 !important; --accent-soft: #f0f0f0 !important;
    --ok: #1b5e20 !important; --ok-bg: #ffffff !important; --warn: #5c4300 !important; --warn-bg: #ffffff !important;
    --err: #8a1f12 !important; --err-bg: #ffffff !important; --run: #1d3f5c !important; --run-bg: #ffffff !important;
    --idle: #444444 !important; --idle-bg: #ffffff !important; --reply: #3f2f63 !important; --reply-bg: #ffffff !important;
    --link-visited: #3f2f63 !important; --toast-bg: #ffffff !important; --toast-ink: #000000 !important;
    --disabled-ink: #555555 !important; --disabled-bg: #ffffff !important;
    --pill-ink: #333333 !important; --pill-bg: #ffffff !important;
    --focus-ring: #000000 !important; --scroll-thumb: #666666 !important;
    --paper-bg: #ffffff !important; --paper-ink: #000000 !important; --paper-mark-bg: #f0f0f0 !important;
    --backdrop: transparent !important; --veil: transparent !important;
    color-scheme: light;
  }
  @page { margin: 14mm; }
  .toolbar, .preflight, .filter-row, .skip-link, .toasts, .theme-panel-backdrop,
  .drawer-close, .coach-head [data-coach], .coach-head label { display: none !important; }
  .split { display: block; }
  .list-pane, .detail-pane {
    position: static !important; width: auto; max-width: none; transform: none;
    box-shadow: none; border: 0;
  }
  /* 打印时解除浮层固定定位与内部滚动/固定高度,否则长对话与简历会被裁掉。 */
  html:has(.coach-panel:not([hidden])), body:has(.coach-panel:not([hidden])) { overflow: visible; }
  .coach-panel { position: static !important; inset: auto !important; height: auto !important; background: #ffffff !important; }
  .coach-viewport, .coach-body, .coach-history,
  .coach-material-content, .coach-interview-source, .coach-body pre,
  .coach-question, .coach-quotation blockquote,
  .coach-facts, .coach-resume-results .resume-document, .resume-selected .resume-document {
    position: static !important; height: auto !important; max-height: none !important;
    overflow: visible !important;
  }
  .detail, .coach-body, .coach-panel { max-width: none; }
  * { box-shadow: none !important; text-shadow: none !important; }
  a { color: #000000; text-decoration: underline; }
  .badge, .resume-status { border: 1px solid #000000; background: #ffffff !important; color: #000000 !important; }
  .detail > section, .coach-artifact, .coach-skill, .coach-message { break-inside: avoid; }
}

/* ---- 触屏目标(D04.17):放在组件基样式之后,避免 44px 规则被后续 28/38px 声明覆盖 ---- */
@media (max-width: 899px) {
  .theme-swatch { width: 44px; height: 44px; }
  .toast .toast-x, .modal .modal-x { min-width: 44px; min-height: 44px; }
}
/* Subscription panel shares the established controls and native focus trap. */
.subscription-dialog { width:min(900px, calc(100vw - 32px)); max-height:85vh; overflow:auto; padding:24px; margin:auto; inset:0; box-sizing:border-box; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); box-shadow:var(--shadow-dialog); }
.subscription-dialog p { margin:10px 0; line-height:1.6; }
.subscription-dialog h3 { margin:12px 0 6px; }
.coach-membership { margin:8px 16px; color:var(--ink-2); }
.subscription-dialog::backdrop { background:rgba(0,0,0,.45); }
.subscription-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.subscription-dialog form { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.subscription-dialog label { display:grid; gap:6px; }
.subscription-dialog input { color:inherit; background:inherit; border:1px solid var(--line); padding:8px; max-width:100%; }
.subscription-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.subscription-cards article { padding:12px; border:1px solid var(--line); border-radius:8px; }
@media(max-width:600px) { .subscription-cards { grid-template-columns:1fr; } .subscription-dialog { padding:16px; } }
/* Identity management dialogs share the existing theme tokens. */
.account-dialog { width:min(720px,calc(100vw - 32px)); max-height:85vh; overflow:auto; border-radius:16px; padding:24px; }
.account-dialog::backdrop { background:rgba(0,0,0,.35); }
.account-dialog header,.account-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.account-dialog form { display:flex; gap:12px; flex-wrap:wrap; align-items:end; margin:16px 0; }
.account-dialog label { display:grid; gap:8px; }
.account-dialog input { padding:10px; max-width:100%; }
.account-dialog li { padding:12px 0; overflow-wrap:anywhere; }
.account-dialog li button { margin:4px; }
.central-workspace .toolbar-search,.central-workspace .toolbar-growth,.central-workspace .metrics,.central-workspace #preflight,.central-workspace #btn-stop-project { display:none; }
.central-workspace .toolbar { position:static; }
.central-history { max-width:1100px; margin:24px auto; padding:16px; display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.central-history section { min-width:0; }
.central-history { box-sizing:border-box; width:100%; }
.central-history li .btn { max-width:100%; white-space:normal; text-align:left; overflow-wrap:anywhere; }
.central-history .workspace-intro,.central-history .workspace-materials,.central-history .workspace-detail { grid-column:1 / -1; }
.workspace-features { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin:16px 0; }
.workspace-features article { border:1px solid var(--line); border-radius:12px; padding:16px; background:var(--surface); }
.workspace-materials form,.workspace-materials label { display:grid; gap:10px; }
.workspace-materials form { gap:16px; }
.workspace-materials textarea { width:100%; box-sizing:border-box; padding:12px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--surface); font:inherit; resize:vertical; }
.workspace-materials [type=submit] { justify-self:start; }
.workspace-detail pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.7; }
.central-history li { padding:12px 0; overflow-wrap:anywhere; }
@media(max-width:700px) { .central-history { grid-template-columns:1fr; } .account-dialog form { align-items:stretch; flex-direction:column; } }
/* Account entry uses the existing product palette and readable native controls. */
body.auth-page { background:var(--bg); }
body.auth-page > :not(#auth-screen):not(script),body.auth-expired > :not(.auth-expired-dialog):not(script) { visibility:hidden; }
body.auth-page #auth-screen { visibility:visible; position:fixed; inset:0; overflow:auto; display:grid; place-items:center; padding:24px 16px; background:var(--bg); z-index:1000; }
.auth-card { width:min(450px,100%); padding:28px; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 32px rgba(0,0,0,.06); }
.auth-card header { text-align:center; margin-bottom:24px; }
.auth-card .auth-brand { color:var(--accent-text); font-weight:700; margin:0 0 12px; }
.auth-card h1,.auth-card h2 { margin:0 0 8px; font-size:1.45rem; }
.auth-card header p { color:var(--ink-2); }
.auth-card form,.auth-card label { display:grid; gap:8px; }
.auth-card form { gap:18px; }
.auth-card input,.account-dialog input,.account-dialog select { width:100%; min-height:44px; box-sizing:border-box; padding:10px 12px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--bg); }
.auth-password,.auth-code { display:flex; align-items:stretch; gap:8px; }
.auth-password input,.auth-code input { min-width:0; flex:1; }
.auth-reveal { background:transparent; color:var(--accent-text); border:1px solid var(--line); border-radius:6px; padding:0 10px; cursor:pointer; min-width:48px; }
.auth-code .btn { flex:none; min-width:100px; }
.auth-submit { width:100%; min-height:44px; }
.auth-card footer { display:flex; justify-content:space-between; margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
.auth-error { min-height:1.4em; color:var(--err); overflow-wrap:anywhere; margin:0; }
.auth-expired-dialog { max-width:calc(100vw - 32px); max-height:90vh; overflow:auto; }
.auth-expired-dialog::backdrop { background:rgba(0,0,0,.25); }
.account-dialog { color:var(--ink); background:var(--surface); border:1px solid var(--line); }
.account-dialog [data-change] form { display:grid; gap:14px; }
.permission-message { max-width:600px; margin:48px auto; padding:24px; }
.permission-message .btn { margin-right:12px; }
.admin-users { max-width:1100px; margin:24px auto; padding:16px; }
.admin-users > header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.admin-users [data-search] { display:flex; align-items:end; gap:12px; margin:24px 0; }
.admin-users [data-search] label { display:grid; gap:8px; }
.admin-users input { min-height:44px; padding:8px; color:var(--ink); background:var(--surface); border:1px solid var(--line); }
.admin-table-wrap { overflow:auto; }
.admin-users table { width:100%; border-collapse:collapse; }
.admin-users th,.admin-users td { padding:12px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }
.admin-users td button { margin-right:8px; }
@media(max-width:600px) { .auth-card { padding:22px 18px; } .admin-users > header { align-items:start; flex-direction:column; } }
 .account-summary { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }

.cloud-workspace #btn-stop-project { display:none; }
.cloud-login > :not(.cloud-browser-screen):not(dialog):not(.account-dialog) { display:none !important; }
.cloud-browser-screen { max-width:1320px; margin:20px auto; padding:16px; }
.cloud-browser-screen .actions { display:flex; flex-wrap:wrap; gap:8px; }
.remote-browser { min-height:200px; background:#ededed; border:1px solid var(--line); overflow:hidden; }
.remote-browser img { display:block; width:100%; height:auto; touch-action:none; }
.remote-browser img[hidden] { display:none; }
.remote-input { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin-top:12px; }
.remote-input label { flex:1; min-width:220px; }
.remote-input input { display:block; width:100%; box-sizing:border-box; }
