/* 主题令牌与参考页视觉覆盖。布局和业务组件仍由 styles.css 提供。 */
:root {
  --font-cjk: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-latin: "Inter", var(--font-cjk);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* Date-range provenance, missing coverage and rollup detail */
.cockpit-range-slot{display:flex;align-items:center;gap:8px;min-width:0}
.range-data-source{display:inline-flex;align-items:center;gap:6px;max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid var(--line);border-radius:999px;padding:6px 10px;font-size:10px;font-weight:700;color:var(--muted);background:var(--panel)}
.range-data-source:before{content:"";width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:var(--green)}
.range-data-source[data-mode="daily_rollup"]{color:#805d00;background:rgba(247,191,99,.13);border-color:rgba(192,138,30,.28)}
.range-data-source[data-mode="daily_rollup"]:before{background:var(--amber)}
.range-data-source[data-mode="missing"]{color:var(--danger);background:rgba(215,76,76,.08);border-color:rgba(215,76,76,.22)}
.range-data-source[data-mode="missing"]:before{background:var(--danger)}
.appearance-days{display:block;margin-top:4px;color:var(--green);font-size:10px;font-weight:700}
.missing-range strong,.missing-range span,.missing-range small{display:block}
.missing-range strong{color:var(--text);font-size:14px;margin-bottom:8px}
.missing-range span{color:var(--danger);font-weight:700;margin-bottom:6px}
.daily-breakdown{margin:0 0 22px;padding:17px;border:1px solid var(--line);border-radius:13px;background:var(--panel2)}
.daily-breakdown h3{margin:0 0 12px;font-size:14px}
.daily-breakdown-grid{display:grid;gap:7px}
.daily-breakdown-grid>div{display:grid;grid-template-columns:minmax(110px,1.2fr) repeat(4,minmax(70px,1fr));gap:10px;align-items:center;padding:9px 10px;border-radius:9px;background:var(--panel);font-size:11px;color:var(--muted)}
.daily-breakdown-grid b{color:var(--text)}
@media(max-width:1180px){.range-data-source{display:none}}
@media(max-width:720px){.cockpit-range-slot{width:100%}.range-picker{flex:1}.range-picker-toggle{width:100%}.daily-breakdown-grid>div{grid-template-columns:1fr 1fr}.daily-breakdown-grid b{grid-column:1/-1}}

[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F2E7;
  --body-bg: #F6F2E7;
  --sidebar: #F6F2E7;
  --card: #FAF8F2;
  --elevated: #F1F4EE;
  --strip: #FAF8F2;
  --line: #E8ECE4;
  --sep: #EDF0EA;
  --t1: #11130F;
  --t2: #667066;
  --t3: #929B91;
  --t-status: #7A8B92;
  --orange: #FF531A;
  --cyan: #B8EE24;
  --amber: #FF531A;
  --green: #179B32;
  --lime: #B8EE24;
  --lime-soft: rgba(184, 238, 36, .16);
  --danger: #C04452;
  --orange-soft: rgba(232, 94, 47, .10);
  --cyan-soft: rgba(184, 238, 36, .16);
  --amber-soft: rgba(255, 83, 26, .10);
  --green-soft: rgba(23, 155, 50, .10);
  --hover-bg: rgba(17, 19, 15, .035);
  --input-bg: #FBFCFA;
  --hero-grad: linear-gradient(180deg, #FCFAF6, #FBF8F2);
  --card-shadow: 0 8px 24px rgba(17, 19, 15, .07);
  --cover-shadow: 0 8px 20px rgba(17, 19, 15, .20);
  --glow-a: rgba(184, 238, 36, .10);
  --glow-b: rgba(23, 155, 50, .06);
  --overlay: rgba(17, 19, 15, .36);
  --drawer-bg: #FAF8F2;
  --document-bg: #FFFDF7;
  --document-text: #233036;
  --toast-bg: #11130F;
  --toast-text: #FFFFFF;
  /* 旧样式变量别名，保证现有组件不需要改动结构。 */
  --panel: var(--card);
  --panel2: var(--elevated);
  --text: var(--t1);
  --muted: var(--t2);
  --shadow: var(--card-shadow);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0F0B;
  --body-bg: #0D0F0B;
  --sidebar: #10130D;
  --card: #171A14;
  --elevated: #20251A;
  --strip: #141812;
  --line: #2D3524;
  --sep: #293021;
  --t1: #F5F7F1;
  --t2: #A1AB99;
  --t3: #71806A;
  --t-status: #6E8188;
  --orange: #FF6A2F;
  --cyan: #B8EE24;
  --amber: #FF8A4A;
  --green: #78D642;
  --lime: #B8EE24;
  --lime-soft: rgba(184, 238, 36, .14);
  --danger: #FF6E7C;
  --orange-soft: rgba(255, 106, 47, .15);
  --cyan-soft: rgba(184, 238, 36, .14);
  --amber-soft: rgba(255, 138, 74, .14);
  --green-soft: rgba(120, 214, 66, .14);
  --hover-bg: rgba(255, 255, 255, .045);
  --input-bg: #11150E;
  --hero-grad: linear-gradient(180deg, #1C2117, #171A14);
  --card-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --cover-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  --glow-a: rgba(184, 238, 36, .14);
  --glow-b: rgba(23, 155, 50, .12);
  --overlay: rgba(0, 0, 0, .62);
  --drawer-bg: #0B171E;
  --document-bg: #16232D;
  --document-text: #EEF3F2;
  --toast-bg: #EEF2EC;
  --toast-text: #162026;
  --panel: var(--card);
  --panel2: var(--elevated);
  --text: var(--t1);
  --muted: var(--t2);
  --shadow: var(--card-shadow);
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-cjk);
}

html {
  background: var(--bg);
  color: var(--t1);
  transition: background .25s ease, color .25s ease;
}

body {
  background: radial-gradient(circle at 82% -10%, var(--glow-b), transparent 35%), var(--body-bg);
  color: var(--t1);
  transition: background .25s ease, color .25s ease;
}

.ambient-a {
  background: var(--glow-a);
}

.ambient-b {
  background: var(--glow-b);
}

.sidebar {
  background: color-mix(in srgb, var(--sidebar) 94%, transparent);
  border-right-color: var(--line);
  box-shadow: var(--card-shadow);
}

.brand strong,
.topbar h1,
.section-head h2,
.panel-title h3,
.tool-heading h3,
.account-rule h3,
.editor-meta h3,
.setting-card h3,
.drawer h2,
.modal header h2 {
  color: var(--t1);
}

.brand small,
.eyebrow,
.legend,
.service-dot,
.muted,
.panel-title p,
.tool-heading p,
.account-rule p,
.editor-meta p,
.setting-card p,
.setting-card small,
.metric-card span,
.metric-card small,
.video-cell small,
.video-meta small,
.feed-item small,
.library-item small,
.pipeline-step,
.segment > span,
.run-progress-meta,
.run-events-details,
.mapping-form label,
.mapping-row small {
  color: var(--t2);
}

.nav-item {
  color: var(--t2);
}

.nav-item span {
  color: var(--t3);
}

.nav-item:hover {
  background: var(--hover-bg);
  color: var(--t1);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--orange-soft), color-mix(in srgb, var(--orange) 3%, transparent));
  color: var(--t1);
  box-shadow: inset 3px 0 var(--orange);
}

.nav-item.active span {
  color: var(--orange);
}

.service-dot {
  border-bottom-color: var(--line);
}

.topbar {
  border-bottom-color: var(--line);
}

.date-field,
.model-select,
.button.ghost,
.icon-button {
  background: var(--card);
  border-color: var(--line);
  color: var(--t2);
}

.date-field select,
.model-select select {
  color: var(--t1);
}

.date-field option,
.model-select option {
  background: var(--card);
  color: var(--t1);
}

.button {
  color: var(--t1);
}

.button.primary {
  background: linear-gradient(135deg, var(--orange), color-mix(in srgb, var(--orange) 68%, #FFB16D));
  color: #21100A;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--orange) 22%, transparent);
}

.button.confirm {
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 82%, #FFFFFF), color-mix(in srgb, var(--green) 56%, #FFFFFF));
  color: color-mix(in srgb, var(--green) 28%, #07130D);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--green) 17%, transparent);
}

.pulse {
  background: color-mix(in srgb, var(--orange) 35%, #21100A);
  box-shadow: 0 0 0 5px var(--orange-soft);
}

.hero-card,
.metric-card,
.panel {
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--card-shadow);
}

.hero-card {
  background: var(--hero-grad);
}

.hero-card:before {
  border-color: color-mix(in srgb, var(--cyan) 18%, transparent);
}

.chip {
  border-color: var(--line);
  color: var(--t2);
  background: var(--elevated);
}

.chip.hot {
  color: var(--orange);
  border-color: color-mix(in srgb, var(--orange) 28%, var(--line));
  background: var(--orange-soft);
}

.chip.success {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
  background: var(--green-soft);
}

.hero-copy h2,
.hero-copy p,
.hero-hit-stats span,
.hero-hit-stats small {
  color: var(--t1);
}

.hero-copy p,
.hero-hit-stats span,
.hero-hit-stats small {
  color: var(--t2);
}

.hero-kicker,
.hero-hit-stats b,
.accent-cyan strong,
.num.roi {
  color: var(--cyan) !important;
}

.hero-hit-stats strong,
.accent-orange strong,
.money {
  color: var(--amber) !important;
}

.hero-cover {
  background: var(--elevated);
  border-color: color-mix(in srgb, var(--cyan) 28%, var(--line));
  box-shadow: var(--cover-shadow);
}

.metric-card:before {
  opacity: .9;
}

.hero-status-strip,
.strip {
  background: var(--strip);
  border-color: var(--line);
  color: var(--t2);
}

.hero-status-strip b {
  color: var(--t1);
}

.source-dot,
.hero-status-strip i {
  background: var(--cyan);
}

.leaderboard-panel,
.table-wrap {
  background: var(--card);
}

th {
  color: var(--t3);
  border-bottom-color: var(--line);
}

td {
  color: var(--t2);
  border-bottom-color: var(--sep);
}

tbody tr:hover {
  background: var(--hover-bg);
}

.rank-num.top,
.rank.first {
  color: var(--orange);
}

.rank-num,
.rank {
  color: var(--t2);
}

.video-cell strong,
.video-meta .t,
.number-strong,
.num.strong {
  color: var(--t1);
}

.source-tag,
.mapping-source {
  color: var(--cyan);
  border-color: color-mix(in srgb, var(--cyan) 25%, var(--line));
  background: var(--cyan-soft);
}

.status-pill,
.status {
  background: var(--elevated);
  color: var(--t2);
}

.status-pill.ready,
.status.s-green {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.wait,
.status.s-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.s-cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.arrow,
.action {
  color: var(--t3);
}

.empty,
.no-copy {
  color: var(--t3);
}

.pipeline-step:before {
  background: var(--line);
}

.pipeline-step i {
  background: var(--elevated);
  border-color: var(--card);
}

.pipeline-step.done i {
  background: var(--green);
  box-shadow: 0 0 10px color-mix(in srgb, var(--green) 50%, transparent);
}

.pipeline-step.active i {
  background: var(--orange);
  box-shadow: 0 0 10px color-mix(in srgb, var(--orange) 50%, transparent);
}

.rule-icon,
.tool-logo.wx,
.tool-logo.dy,
.rank-badge {
  background: var(--cyan-soft);
  border-color: color-mix(in srgb, var(--cyan) 20%, var(--line));
  color: var(--cyan);
}

.tool-logo.wx {
  background: var(--green-soft);
  color: var(--green);
}

.tool-logo.dy {
  background: var(--orange-soft);
  color: var(--orange);
}

.rank-badge {
  background: var(--orange-soft);
  border-color: color-mix(in srgb, var(--orange) 22%, var(--line));
  color: var(--orange);
}

.input {
  background: var(--input-bg);
  border-color: var(--line);
  color: var(--t1);
}

.input::placeholder {
  color: var(--t3);
}

.input:focus {
  border-color: color-mix(in srgb, var(--lime) 38%, var(--line));
  box-shadow: none;
}

.feed-item,
.library-item,
.queue-item,
.parse-card,
.segment,
.variant,
.ending-item,
.task-line {
  background: var(--elevated);
  border-color: var(--line);
}

.feed-item:hover,
.library-item:hover {
  border-color: color-mix(in srgb, var(--lime) 38%, var(--line));
}
.library-copy-card { display: block; }
.library-copy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.library-copy-head > strong { flex: 1; min-width: 0; }
.library-orders { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--lime) 18%, var(--panel2)); color: var(--amber); font-family: var(--font-cjk); font-size: 12px; letter-spacing: .02em; font-weight: 800; }
.library-orders.legacy { color: var(--muted); background: var(--panel2); }
.library-copy-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; color: var(--muted); font-size: 11px; }
.library-copy-meta b { color: var(--text); }
.library-copy-card p { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.75; }

.parse-result .button.primary {
  color: #21100A;
}

.segment.opening {
  border-left-color: var(--orange);
}

.segment.middle {
  border-left-color: var(--cyan);
}

.segment.ending {
  border-left-color: var(--amber);
}

.variant b {
  color: var(--orange);
}

.ending-item {
  border-left-color: var(--amber);
  color: var(--t2);
}

.drawer,
.modal {
  background: var(--drawer-bg);
  border-color: var(--line);
  box-shadow: 0 30px 100px var(--overlay);
}

.drawer header,
.drawer footer,
.modal header,
.modal footer {
  border-color: var(--line);
}

.drawer-backdrop,
.modal-backdrop {
  background: var(--overlay);
}

/* One shared modal layer, above the toolbar, popovers and floating plan controls. */
.modal-backdrop { z-index: 920; }
#mappingModal { z-index: 970; }
.toast { z-index: 1010; }

.icon-button {
  color: var(--t2);
}

.detail-stat {
  background: var(--elevated);
  border-color: var(--line);
}

.detail-stat span {
  color: var(--t3);
}

.detail-operator-value { display: flex; align-items: center; gap: 5px; min-width: 0; }
.detail-operator-value b { flex: 0 1 auto; min-width: 0; }
.detail-operator-edit { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--orange); cursor: pointer; }
.detail-operator-edit::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url('./assets/ui-icons/user-pen.svg') center / contain no-repeat; mask: url('./assets/ui-icons/user-pen.svg') center / contain no-repeat; }
.detail-operator-edit:hover, .detail-operator-edit:focus-visible { background: var(--orange-soft); outline: 2px solid transparent; }
.detail-operator-edit:focus-visible { outline-color: var(--orange); }

.spinner { display: inline-block; width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid color-mix(in srgb, var(--orange) 24%, transparent); border-top-color: var(--orange); border-radius: 50%; animation: studio-spin .7s linear infinite; }
.generation-spinner { border-color: color-mix(in srgb, var(--orange) 24%, transparent); border-top-color: var(--orange); }
@keyframes studio-spin { to { transform: rotate(360deg); } }

.copy-paper {
  background: var(--document-bg);
  color: var(--document-text);
  box-shadow: var(--card-shadow);
}

.copy-paper h3 {
  color: var(--document-text);
}

.wecom-preview,
.workspace-report-preview {
  background: var(--elevated);
  border-color: var(--line);
  color: var(--t1);
}

.toast {
  background: var(--toast-bg);
  color: var(--toast-text);
}

.run-progress-track {
  background: var(--elevated);
}

.run-progress-popover {
  background: var(--hero-grad);
  border-color: color-mix(in srgb, var(--cyan) 28%, var(--line));
  box-shadow: var(--card-shadow);
}

.run-event {
  background: var(--elevated);
}

.run-progress-meta b {
  color: var(--t1);
}

.mapping-form input[readonly] {
  color: var(--t2);
  background: var(--elevated);
}

.mapping-list,
.mapping-row {
  border-color: var(--line);
}

.button.warning {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: color-mix(in srgb, var(--orange) 34%, var(--line));
}

.pending-videos-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
}

#transcriptionModelModal { z-index: 985; }
#quickVideoSearchModal, #manualCopyModal { z-index: 980; }
#batchTranscribeModal { z-index: 975; }
#quickTranscribeChoiceModal { z-index: 980; }
.batch-transcribe-modal { width:min(760px,calc(100vw - 32px)); max-height:90vh; }
.quick-transcribe-choice-modal { width:min(520px,calc(100vw - 32px)); }
.batch-transcribe-workspace { position:relative; min-height:0; overflow:hidden; }
.batch-transcribe-list { display:grid; gap:12px; min-height:260px; max-height:60vh; padding:16px 22px; overflow-y:auto; transition:filter .2s ease; }
.batch-transcribe-modal.is-running .batch-transcribe-list { filter:blur(5px); pointer-events:none; user-select:none; }
.batch-transcribe-entry { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--card); }
.batch-transcribe-entry-head { display:flex; align-items:flex-start; gap:10px; }
.batch-transcribe-rank { flex:none; border-radius:7px; padding:5px 7px; background:var(--orange-soft); color:var(--orange); font:700 11px/1.2 var(--font-latin); }
.batch-transcribe-entry-copy { min-width:0; flex:1; display:flex; align-items:baseline; flex-wrap:wrap; gap:5px 10px; }
.batch-transcribe-entry-title { min-width:0; flex:1 1 260px; padding-top:3px; color:var(--t1); font-size:14px; font-weight:750; line-height:1.5; overflow-wrap:anywhere; }
.batch-transcribe-entry-author { min-width:0; max-width:100%; padding:3px 7px; border-radius:6px; background:var(--elevated); color:var(--t2); font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.batch-transcribe-entry-state { flex:none; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--t2); font-size:11px; line-height:2; }
.batch-transcribe-ready { margin:0 0 0 60px; color:var(--t3); font-size:12px; }
.batch-transcribe-match { display:grid; gap:9px; margin-left:34px; padding:13px; border:1px solid var(--line); border-radius:11px; background:var(--elevated); }
.batch-transcribe-match-head { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.batch-transcribe-match-head span { color:var(--t2); font-size:12px; font-weight:700; }
.batch-transcribe-match-head small { color:var(--t3); font-size:11px; }
.batch-transcribe-search { display:flex; gap:8px; }
.batch-transcribe-search input { min-width:0; flex:1; background:var(--card); font-size:12px; }
.batch-transcribe-results-label { display:flex; gap:5px; align-items:baseline; padding-top:3px; border-top:1px solid var(--line); color:var(--t3); font-size:11px; }
.batch-transcribe-results-label b { color:var(--t2); font-variant-numeric:tabular-nums; }
.batch-transcribe-candidates { display:grid; gap:5px; }
.batch-transcribe-candidates > small { padding:8px; color:var(--t3); }
.batch-transcribe-candidate { display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border:1px solid transparent; border-radius:8px; background:var(--card); color:var(--t1); text-align:left; cursor:pointer; }
.batch-transcribe-candidate:hover { border-color:color-mix(in srgb,var(--orange) 35%,var(--line)); }
.batch-transcribe-candidate.is-selected { border-color:var(--orange); background:var(--orange-soft); }
.batch-transcribe-candidate-index { flex:none; color:var(--t3); font:700 11px var(--font-mono); }
.batch-transcribe-candidate-copy { display:grid; gap:3px; min-width:0; flex:1; }
.batch-transcribe-candidate-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:550; }
.batch-transcribe-candidate-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--t3); font-size:11px; }
.batch-transcribe-candidate b { flex:none; color:var(--orange); font-size:11px; }
.batch-transcribe-progress { position:absolute; inset:0; z-index:2; display:grid; place-items:center; padding:20px; background:color-mix(in srgb,var(--card) 72%,transparent); backdrop-filter:blur(5px); }
.batch-transcribe-progress[hidden] { display:none; }
.batch-transcribe-progress-card { display:grid; justify-items:center; width:min(420px,100%); padding:28px 26px; border:1px solid var(--line); border-radius:18px; background:var(--card); box-shadow:var(--card-shadow,var(--shadow)); text-align:center; }
.batch-transcribe-progress-spinner { width:28px; height:28px; margin-bottom:16px; border:3px solid var(--line); border-top-color:var(--orange); border-radius:50%; animation:studio-spin .8s linear infinite; }
.batch-transcribe-progress-kicker { color:var(--t2,var(--muted)); font-size:12px; font-weight:700; letter-spacing:.08em; }
.batch-transcribe-progress-card strong { margin-top:8px; color:var(--t1,var(--text)); font:750 42px/1.1 var(--font-latin,var(--font)); font-variant-numeric:tabular-nums; }
.batch-transcribe-progress-card p { max-width:100%; margin:12px 0 20px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--t2,var(--muted)); font-size:12px; }
.batch-transcribe-progress-track { width:100%; height:8px; overflow:hidden; border-radius:999px; background:var(--line); }
.batch-transcribe-progress-track i { display:block; width:0; height:100%; border-radius:inherit; background:var(--orange); transition:width .25s ease; }
.batch-transcribe-progress-card small { margin-top:11px; color:var(--t3,var(--faint)); font-size:11px; }
.batch-transcribe-progress-track.is-indeterminate i { width:35%; animation:studio-progress-wait 1.4s ease-in-out infinite; }
@keyframes studio-progress-wait { from { transform:translateX(-110%); } to { transform:translateX(390%); } }
@media (prefers-reduced-motion:reduce) { .batch-transcribe-progress-spinner,.batch-transcribe-progress-track.is-indeterminate i { animation:none; } .batch-transcribe-progress-track i { transition:none; } }
.batch-transcribe-status { margin:0; padding:0 22px 12px; color:var(--t3); font-size:12px; }
@media (max-width:760px) { .batch-transcribe-entry-head { flex-wrap:wrap; } .batch-transcribe-entry-state { max-width:100%; } .batch-transcribe-match { margin-left:0; } .batch-transcribe-match-head { flex-wrap:wrap; } .batch-transcribe-search { flex-direction:column; } .batch-transcribe-candidate-copy strong { white-space:normal; } }
.detail-actions-menu { position: relative; margin-right: auto; }
.detail-actions-list { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; display: grid; width: max-content; min-width: 178px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: 0 16px 40px rgba(17,19,15,.16); }
.detail-actions-list[hidden] { display: none; }
.detail-actions-list button { padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--t1); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.detail-actions-list button:hover, .detail-actions-list button:focus-visible { background: var(--orange-soft); color: var(--orange); }
.quick-video-search-modal, .manual-copy-modal { width: min(620px, calc(100vw - 32px)); max-height: 90vh; }
.quick-video-search-body, .manual-copy-body { display: grid; gap: 10px; min-height: 0; padding: 18px 22px; overflow-y: auto; }
.quick-video-search-body > label, .manual-copy-body > label { font-size: 13px; font-weight: 700; }
.quick-video-search-controls { display: flex; gap: 8px; }
.quick-video-search-controls .input { flex: 1; min-width: 0; }
.quick-video-search-modal footer .quick-video-manual { margin-right: auto; }
.quick-video-search-results { display: grid; gap: 8px; max-height: 44vh; overflow-y: auto; }
.quick-video-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--t1); text-align: left; cursor: pointer; }
.quick-video-result.is-selected { border-color: var(--orange); background: var(--orange-soft); }
.quick-video-result span { display: grid; gap: 4px; min-width: 0; }
.quick-video-result strong { font-size: 13px; }
.quick-video-result small { color: var(--t3); font-size: 11px; }
.quick-video-result b { color: var(--orange); font-size: 12px; }
.manual-copy-body textarea { width: 100%; min-height: 240px; resize: vertical; line-height: 1.7; }
.manual-copy-body .muted { margin: 0; }
.manual-copy-error { margin: 0; color: var(--danger); font-size: 12px; }
@media (max-width: 760px) { .detail-modal footer .detail-actions-menu { flex: 1 1 calc(50% - 8px); } .detail-actions-menu > .button { width: 100%; } .quick-video-search-controls { flex-direction: column; } }
.transcription-model-modal { width: min(560px, calc(100vw - 32px)); }
.transcription-model-options { display: grid; gap: 10px; padding: 18px 22px; }
.transcription-model-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; border: 1px solid var(--line, #e7e1d8); border-radius: 14px; background: #fff; color: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.transcription-model-option:hover { border-color: #ff9d7f; }
.transcription-model-option.is-selected { border-color: #ff5a36; background: #fff3ef; box-shadow: 0 0 0 3px rgba(255, 90, 54, .1); }
.transcription-model-option span { display: grid; gap: 5px; }
.transcription-model-option strong { font-size: 15px; }
.transcription-model-option small { color: #81786e; font-size: 12px; }
.transcription-model-option em { flex: none; padding: 4px 8px; border-radius: 999px; background: #ff5a36; color: #fff; font-size: 11px; font-style: normal; }

/* Keep the pending-video workflow above every page-level toolbar/popover. */
#pendingVideosModal {
  z-index: 970;
}

.pending-video-list {
  display: grid;
  gap: 10px;
  padding: 18px 22px;
  overflow-y: auto;
}

.pending-video-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--elevated);
}

.pending-video-index {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
}

.pending-video-copy { min-width: 0; }
.pending-video-copy h3 {
  margin: 0 0 6px;
  color: var(--t1);
  font-size: 14px;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pending-video-copy p { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 0; color: var(--t3); font-size: 12px; }
.pending-video-copy p b { color: var(--t2); }
.pending-video-actions { display: flex; align-items: center; gap: 8px; }
.pending-video-search-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--orange) 24%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--orange-soft) 48%, var(--surface));
}
.pending-video-search-status { margin: 0; color: var(--t3); font-size: 12px; }
.pending-video-candidates { display: grid; gap: 8px; }
.pending-video-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--elevated);
}
.pending-video-candidate.is-best { border-color: color-mix(in srgb, var(--green) 48%, var(--line)); }
.pending-video-candidate-copy { display: grid; min-width: 0; gap: 3px; }
.pending-video-candidate-copy strong { color: var(--t1); font-size: 13px; line-height: 1.45; }
.pending-video-candidate-copy small { color: var(--t3); font-size: 11px; }
.pending-video-candidate .best-badge { justify-self: start; }

@media (max-width: 600px) {
  .pending-video-item { grid-template-columns: 34px minmax(0, 1fr); }
  .pending-video-actions { grid-column: 2; justify-self: start; flex-wrap: wrap; }
  .pending-video-copy h3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .pending-video-search-panel { grid-column: 1 / -1; }
  .pending-video-candidate { align-items: flex-start; flex-direction: column; }
  .pending-video-candidate .pending-video-use { width: 100%; }
}

.theme-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--t1);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--cyan) 45%, var(--line));
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--cyan-soft);
  outline-offset: 3px;
}

.num,
.rank,
.rank-num,
.metric-card strong,
.hero-hit-stats b,
.hero-hit-stats strong,
.run-progress-compact-row > strong,
.run-progress-meta b,
.chip-date {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow,
.brand small,
.chip,
.legend,
th,
.status-pill,
.source-tag,
.mapping-source {
  font-family: var(--font-latin);
}

@media (max-width: 760px) {
  .theme-toggle {
    right: 16px;
    bottom: 82px;
  }
}

/* 可读性增强：保持原有布局，只提高界面信息层级。 */
body {
  font-size: 15px;
}

.brand strong {
  font-size: 19px;
}

.brand small {
  font-size: 10px;
}

.nav-item {
  font-size: 15px;
}

.service-dot {
  font-size: 12px;
}

.eyebrow {
  font-size: 11px;
}

.topbar h1 {
  font-size: 30px;
}

.section-head h2 {
  font-size: 25px;
}

.date-field,
.button,
.input,
.model-select {
  font-size: 14px;
}

.button.small {
  font-size: 13px;
}

.hero-copy h2 {
  font-size: 30px;
}

.hero-copy p {
  font-size: 14px;
}

.hero-kicker {
  font-size: 13px !important;
}

.hero-hit-stats b {
  font-size: 40px;
}

.hero-hit-stats span {
  font-size: 11px;
}

.hero-hit-stats strong {
  font-size: 21px;
}

.hero-hit-stats small {
  font-size: 13px;
  font-weight: 500;
}

.metric-card > span {
  font-size: 14px;
}

.metric-card strong {
  font-size: 44px;
  line-height: 1.08;
}

.metric-card small {
  font-size: 13px;
}

.hero-status-strip {
  font-size: 13px;
}

th {
  font-size: 12px;
}

td {
  font-size: 15px;
}

.video-cell strong,
.video-meta .t {
  font-size: 15px;
}

.video-cell small,
.video-meta small,
.operator-line {
  font-size: 13px;
  font-weight: 500;
}

.source-tag,
.mapping-source,
.mapping-edit {
  font-size: 10px;
}

.trend-line {
  font-size: 12px;
}

.num,
.number-strong,
.money {
  font-size: 15px;
}

.status-pill,
.status {
  font-size: 12px;
}

.action {
  font-size: 13px;
}

.panel-title h3,
.tool-heading h3,
.account-rule h3,
.editor-meta h3,
.setting-card h3 {
  font-size: 17px;
}

.panel-title p,
.tool-heading p,
.account-rule p,
.editor-meta p,
.setting-card p {
  font-size: 13px;
}

.pipeline-step,
.segment > span,
.run-progress-meta,
.run-events-details,
.mapping-form label {
  font-size: 12px;
}

.feed-item strong,
.library-item strong,
.queue-item h4 {
  font-size: 14px;
}

.feed-item small,
.library-item small,
.queue-item p,
.muted {
  font-size: 12px;
}

.copy-paper {
  font-size: 17px;
}

.drawer h2,
.modal header h2 {
  font-size: 22px;
}

.drawer-content,
.wecom-preview,
.workspace-report-preview {
  font-size: 15px;
}

.detail-stat span {
  font-size: 10px;
}

.detail-stat b {
  font-size: 15px;
}

.run-progress-head h3 {
  font-size: 17px;
}

/* 关键信息保持单行，过长内容用省略号而不是把整行撑高。 */
.button,
.chip,
.status-pill,
.status,
.date-field,
.model-select,
.hero-status-strip span,
.metric-card small,
.pipeline-step {
  white-space: nowrap;
}

.operator-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.operator-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-line .mapping-source,
.operator-line .mapping-edit {
  flex: 0 0 auto;
}

.drawer header > div {
  min-width: 0;
  flex: 1 1 auto;
}

.drawer header h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer footer {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
}

.drawer footer .button {
  flex: 0 0 auto;
  min-width: max-content;
  padding-inline: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.detail-stat {
  min-width: 0;
}

.detail-stat span,
.detail-stat b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-stat b {
  display: block;
  font-size: 14px;
  letter-spacing: -.02em;
}

@media (max-width: 760px) {
  .topbar h1 {
    font-size: 24px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .hero-copy h2 {
    font-size: 27px;
  }

  .metric-card strong {
    font-size: 38px;
  }

  .video-cell strong,
  .video-meta .t {
    font-size: 14px;
  }
}

/* 转写中心与首页快捷入口布局 */
.dashboard-bottom {
  grid-template-columns: 1fr;
}

.dashboard-bottom .account-rule {
  display: none;
}

.transcribe-panel {
  padding: 24px;
}

.transcribe-panel > .panel-title {
  align-items: flex-start;
}

.transcribe-panel .queue-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transcribe-panel .queue-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.transcribe-panel .queue-item,
.transcribe-panel .queue-info {
  min-width: 0;
}

.transcription-progress {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.transcription-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--green));
  transition: width .25s ease;
}

.transcription-progress-label {
  display: block;
  margin-top: 4px;
  color: var(--t3);
  font-size: 10px;
  text-align: right;
}

.transcribe-panel .queue-item h4 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transcribe-panel .queue-item .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.transcribe-workspace {
  display: grid;
  gap: 16px;
}

.local-transcribe-panel {
  padding: 24px;
}

.local-transcribe-panel > .panel-title {
  align-items: flex-start;
  margin-bottom: 18px;
}

.local-transcribe-grid {
  display: grid;
  grid-template-columns: minmax(260px, .62fr) minmax(420px, 1.38fr);
  gap: 18px;
}

.local-upload-column,
.local-result-column {
  min-width: 0;
}

.local-video-drop {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  border: 1px dashed color-mix(in srgb, var(--green) 42%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--green) 5%, var(--panel2));
  transition: .2s ease;
}

.local-video-drop:hover,
.local-video-drop.is-dragging {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--panel2));
  transform: translateY(-1px);
}

.local-video-drop.has-file {
  border-style: solid;
}

.local-upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #10130c;
  background: var(--lime);
  font-size: 25px;
  line-height: 1;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--lime) 25%, transparent);
}

.local-video-drop strong { color: var(--text); font-size: 15px; }
.local-video-drop small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.local-video-drop em { max-width: 100%; color: var(--green); font-style: normal; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.local-transcribe-progress { margin-top: 12px; }
.local-transcribe-progress > div { height: 7px; overflow: hidden; border-radius: 999px; background: var(--panel2); }
.local-transcribe-progress > div span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--lime),var(--green)); transition: width .2s ease; }
.local-transcribe-progress p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.local-transcribe-progress.is-error p { color: var(--danger); }
.local-queue-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.local-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 0 3px; }
.local-queue-head > div { display: grid; gap: 3px; min-width: 0; }
.local-queue-head strong { color: var(--text); font-size: 13px; }
.local-queue-head small { color: var(--muted); font-size: 10px; }
.local-queue-head .button { flex: 0 0 auto; }
.local-file-queue { display: grid; gap: 7px; max-height: 280px; margin-top: 12px; overflow: auto; }
.local-queue-section { display: grid; gap: 7px; }
.local-queue-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 3px; color: var(--text); }
.local-queue-section-head small { color: var(--muted); font-size: 10px; }
.local-history-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel2) 78%, var(--surface)); }
.local-history-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 43px; padding: 8px 11px; cursor: pointer; list-style: none; user-select: none; }
.local-history-group > summary::-webkit-details-marker { display: none; }
.local-history-group > summary::after { flex: 0 0 auto; width: 7px; height: 7px; margin-left: 2px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; content: ''; }
.local-history-group[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.local-history-group > summary > span { display: grid; gap: 2px; min-width: 0; }
.local-history-group > summary strong { color: var(--text); font-size: 12px; }
.local-history-group > summary small { color: var(--muted); font-size: 10px; }
.local-history-group > summary > b { flex: 0 0 auto; margin-left: auto; color: var(--green); font-size: 11px; }
.local-history-items { display: grid; gap: 7px; padding: 0 7px 7px; }
.local-history-items .local-queue-item { background: var(--surface); }
.local-queue-item { display: flex; align-items: stretch; gap: 6px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); overflow: hidden; }
.local-queue-item.active { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 12%, transparent); }
.local-queue-item.failed { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); }
.local-queue-main { flex: 1; min-width: 0; padding: 10px 12px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.local-queue-main strong, .local-queue-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.local-queue-main strong { font-size: 12px; }
.local-queue-main small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.local-queue-main > span { display: block; height: 3px; margin-top: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.local-queue-main > span i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--lime),var(--green)); }
.local-queue-remove { width: 34px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.local-queue-remove:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.local-history-remove { flex: 0 0 auto; width: 28px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.local-history-remove:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.local-result-column { display: flex; flex-direction: column; }
.local-result-head { order: 2; margin-top: 12px; min-height: 42px; display: flex; align-items: flex-start; justify-content: flex-end; gap: 12px; }
.local-result-head strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 14px; }
.local-result-head small { display: block; max-width: 520px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.local-transcript-result { order: 1; flex: 1; min-height: 250px; margin-top: 0; line-height: 1.9; resize: vertical; }

@media (max-width: 920px) {
  .local-transcribe-grid { grid-template-columns: 1fr; }
  .local-video-drop { min-height: 160px; }
}

@media (max-width: 620px) {
  .local-transcribe-panel > .panel-title,
  .local-result-head { flex-direction: column; }
  .local-result-head .compact-actions { width: 100%; justify-content: flex-start; }
  .local-queue-actions { grid-template-columns: 1fr; }
}

.pipeline-card {
  padding: 22px;
}

.pipeline-workflow {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  height: 100%;
}

.pipeline-compact,
.capture-shortcuts {
  min-width: 0;
}

.capture-shortcuts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.capture-shortcuts-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--t1);
}

.capture-shortcuts-head p {
  margin: 0;
  color: var(--t2);
  font-size: 13px;
  line-height: 1.6;
}

.capture-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.capture-shortcut {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--elevated);
  color: var(--t1);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: .18s ease;
}

.capture-shortcut:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--cyan) 40%, var(--line));
  background: var(--card);
}

.capture-shortcut:focus-visible {
  outline: 3px solid var(--cyan-soft);
  outline-offset: 2px;
}

.shortcut-logo {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.shortcut-logo.wx {
  background: var(--green-soft);
  color: var(--green);
}

.shortcut-logo.dy {
  background: var(--orange-soft);
  color: var(--orange);
}

.shortcut-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.shortcut-copy strong,
.shortcut-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shortcut-copy strong {
  font-size: 14px;
}

.shortcut-copy small {
  color: var(--t2);
  font-size: 11px;
}

.shortcut-arrow {
  margin-left: auto;
  color: var(--t3);
  font-size: 18px;
}

.pipeline-compact .panel-title {
  align-items: flex-start;
  margin-bottom: 14px;
}

.pipeline-compact .panel-title h3 {
  font-size: 16px;
}

.pipeline-compact .pipeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 0;
  padding-left: 2px;
}

.pipeline-compact .pipeline-step {
  min-height: 25px;
  padding: 2px 0 2px 25px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.pipeline-compact .pipeline-step:before {
  top: 0;
  bottom: 0;
  left: 6px;
  right: auto;
  width: 2px;
  height: auto;
}

.pipeline-compact .pipeline-step:first-child:before {
  top: 50%;
}

.pipeline-compact .pipeline-step:last-child:before {
  bottom: 50%;
}

.pipeline-compact .pipeline-step i {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border-width: 3px;
}

@media (max-width: 1200px) {
  .pipeline-workflow {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .transcribe-panel .queue-grid {
    grid-template-columns: 1fr;
  }

  .transcribe-panel .queue-item:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .pipeline-workflow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .capture-shortcut-grid {
    grid-template-columns: 1fr;
  }
}

/* Range-aware dashboard cockpit */
.topbar .date-field { display: none; }
.dashboard-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(430px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.cockpit-left,
.cockpit-right { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cockpit-range-slot { position: relative; z-index: 20; }
.hero-pipeline-card {
  min-width: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--hero-grad);
  box-shadow: var(--card-shadow);
}
.hero-pipeline-card > .hero-card {
  min-height: 250px;
  padding: 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.cockpit-left .hero-copy { min-width: 0; }
.cockpit-left .hero-copy h2,
.cockpit-left #heroTitle {
  font-size: 18px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cockpit-left .hero-visual { flex: 0 0 auto; }
.cockpit-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cockpit-right .metric-card { min-height: 190.52px; padding: 20px; }
.cockpit-right .metric-card > span { padding-left: 45px; }
.cockpit-right .metric-card strong { color: var(--t1) !important; }
.cockpit-right .metric-card::after {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--lime-soft);
  color: var(--t1);
  font-size: 17px;
  font-weight: 800;
}
.cockpit-right .metric-card.accent-orange::after { content: '\25A3'; }
.cockpit-right .metric-card.accent-cyan::after { content: '\00A5'; }
.cockpit-right .capture-shortcuts { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.cockpit-right .capture-shortcuts-head h3 { font-size: 16px; }
.cockpit-right .capture-shortcuts-head p { font-size: 12px; }
.cockpit-right .capture-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-pipeline-card > .hero-status-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 30px;
  margin: 0 24px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  white-space: nowrap;
}
.hero-pipeline-card > .pipeline-compact {
  min-width: 0;
  margin: 0 24px 11px;
  padding-top: 8px;
}
.hero-pipeline-card .pipeline-compact .panel-title {
  align-items: center;
  margin: 0;
}
.hero-pipeline-card .pipeline-compact .panel-title .eyebrow,
.hero-pipeline-card #pipelineDate { display: none; }
.hero-pipeline-card .pipeline-compact .panel-title h3 {
  font-size: 13px;
  line-height: 18px;
  letter-spacing: .01em;
}
.hero-pipeline-card .pipeline-compact .pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}
.hero-pipeline-card .pipeline-compact .pipeline-step {
  min-height: 21px;
  padding: 14px 4px 0;
  display: block;
  font-size: 10px;
  line-height: 12px;
  text-align: center;
}
.hero-pipeline-card .pipeline-compact .pipeline-step:before {
  top: 7px;
  left: 0;
  right: -1px;
  bottom: auto;
  width: auto;
  height: 2px;
}
.hero-pipeline-card .pipeline-compact .pipeline-step:first-child:before { left: 50%; }
.hero-pipeline-card .pipeline-compact .pipeline-step:last-child:before { right: 50%; }
.hero-pipeline-card .pipeline-compact .pipeline-step i {
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-width: 2px;
}
.hero-pipeline-card .pipeline-compact .pipeline-step.done i {
  background: var(--lime);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 16%, transparent);
}
.cockpit-bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 2fr);
  gap: 14px 22px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 14px 18px;
  min-width: 0;
}
.cockpit-bottom .hero-status-strip { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
.cockpit-bottom .pipeline-compact { min-width: 0; }
.cockpit-bottom .pipeline-compact .panel-title { margin: 0 0 7px; }
.cockpit-bottom .pipeline-compact .panel-title h3 { font-size: 14px; }
.cockpit-bottom .pipeline-compact .pipeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; }
.cockpit-bottom .pipeline-compact .pipeline-step { min-height: 32px; padding: 22px 4px 0; display: block; font-size: 11px; text-align: center; }
.cockpit-bottom .pipeline-compact .pipeline-step:before { top: 7px; left: 0; right: -1px; bottom: auto; width: auto; height: 2px; }
.cockpit-bottom .pipeline-compact .pipeline-step:first-child:before { left: 50%; top: 7px; }
.cockpit-bottom .pipeline-compact .pipeline-step:last-child:before { right: 50%; }
.cockpit-bottom .pipeline-compact .pipeline-step i { top: 1px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; }

.range-picker { position: relative; z-index: 30; }
.range-picker-toggle {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--t1); cursor: pointer; font: inherit; text-align: left;
  box-shadow: var(--shadow-sm);
}
.range-picker-toggle:hover { border-color: var(--cyan); }
.range-picker-toggle:focus-visible { outline: 3px solid var(--cyan-soft); outline-offset: 2px; }
.range-picker-caption { color: var(--t2); font-size: 12px; white-space: nowrap; }
.range-picker-toggle strong { flex: 1; min-width: max-content; font-family: var(--mono); font-size: 14px; white-space: nowrap; overflow: visible; text-overflow: clip; }
.range-popover {
  position: absolute; left: 0; top: calc(100% + 8px); width: min(700px, calc(100vw - 30px));
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow-lg); color: var(--t1);
}
.range-popover[hidden] { display: none; }
.range-presets { display: grid; gap: 6px; align-content: start; }
.range-presets button { border: 1px solid transparent; background: var(--elevated); color: var(--t2); border-radius: 8px; padding: 8px 6px; cursor: pointer; font: inherit; font-size: 12px; }
.range-presets button:hover { border-color: var(--cyan); color: var(--t1); }
.range-calendar { min-width: 0; }
.range-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.range-calendar-head button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--elevated); color: var(--t1); cursor: pointer; font-size: 18px; line-height: 1; }
.range-calendar-head strong { font-family: var(--mono); font-size: 12px; }
.range-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.range-month-head { margin-bottom: 7px; font-size: 12px; font-weight: 700; text-align: center; }
.range-weekdays, .range-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.range-weekdays { margin-bottom: 3px; color: var(--t3); font-size: 10px; text-align: center; }
.range-day { min-width: 0; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--t1); cursor: pointer; font: inherit; font-size: 11px; }
.range-day:hover:not(:disabled), .range-day.is-start, .range-day.is-end { background: var(--cyan); color: #fff; }
.range-day.is-in-range { border-radius: 0; background: var(--cyan-soft); color: var(--t1); }
.range-day:disabled { color: var(--t3); cursor: not-allowed; }
.range-day.is-empty { pointer-events: none; }
.range-fields { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-fields label { display: grid; gap: 4px; color: var(--t2); font-size: 11px; }
.range-fields input { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--elevated); color: var(--t1); padding: 7px 8px; font: inherit; font-size: 12px; }
.range-actions { grid-column: 2; display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1000px) {
  .dashboard-cockpit { grid-template-columns: 1fr; }
  .cockpit-right { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .cockpit-right .cockpit-metrics { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .cockpit-right { display: flex; }
  .cockpit-bottom { grid-template-columns: 1fr; }
  .cockpit-bottom .hero-status-strip { flex-wrap: wrap; }
  .cockpit-right .capture-shortcut-grid { grid-template-columns: 1fr 1fr; }
  .range-popover { left: auto; right: 0; grid-template-columns: 1fr; }
  .range-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .range-months { grid-template-columns: 1fr; }
  .range-months > div:last-child { display: none; }
  .range-fields, .range-actions { grid-column: 1; }
}
@media (max-width: 500px) {
  .cockpit-metrics, .cockpit-right .capture-shortcut-grid { grid-template-columns: 1fr; }
  .range-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sidebar radar entry and unified interactive glow */
.radar-entry {
  width: 100%;
  margin-bottom: 9px;
  border: 1px solid color-mix(in srgb, var(--lime) 30%, var(--line));
  background: linear-gradient(100deg, color-mix(in srgb, var(--lime) 12%, var(--card)), var(--card));
  color: var(--t1);
  text-decoration: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--lime) 8%, transparent);
}

.radar-entry .nav-icon {
  color: color-mix(in srgb, var(--lime) 72%, var(--t1));
}

.radar-entry::after {
  content: '\2197';
  margin-left: auto;
  color: var(--t3);
  font-size: 14px;
}

@keyframes control-lime-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--lime) 32%, transparent),
                0 7px 20px color-mix(in srgb, var(--lime) 16%, transparent);
  }
  50% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 45%, transparent),
                0 0 24px color-mix(in srgb, var(--lime) 30%, transparent),
                0 11px 28px color-mix(in srgb, var(--lime) 20%, transparent);
  }
}

:is(button, a.button, a.nav-item, .capture-shortcut):not(.local-queue-main) {
  transform-origin: center;
  will-change: transform, box-shadow, filter;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, filter .22s ease, border-color .22s ease;
}


:is(button, a.button, a.nav-item, .capture-shortcut):not(.local-queue-main):active:not(:disabled) {
  transform: translateY(0) scale(.985);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  :is(button, a.button, a.nav-item, .capture-shortcut):not(.local-queue-main) {
    transition: none;
  }

}

@media (max-width: 1100px) and (min-width: 761px) {
  .radar-entry::after { display: none; }
}

/* Lime dashboard language from the supplied reference */
.button.primary {
  background: linear-gradient(135deg, var(--lime), color-mix(in srgb, var(--lime) 72%, #F5FFB4));
  color: #11130F;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--lime) 24%, transparent);
}

.button.confirm {
  background: linear-gradient(135deg, var(--lime), color-mix(in srgb, var(--lime) 64%, #FFFFFF));
  color: #11130F;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--lime) 22%, transparent);
}

#runBtn.button.primary {
  background: #11130F;
  color: var(--lime);
  border-color: #11130F;
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(17, 19, 15, .18);
}

#runBtn.button.primary:hover { background: #23271E; }

#runBtn .pulse {
  background: var(--lime);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime) 18%, transparent);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--lime-soft, var(--cyan-soft)), color-mix(in srgb, var(--lime) 4%, transparent));
  box-shadow: inset 3px 0 var(--lime);
}

.nav-item.active span { color: var(--lime); }
.source-dot,
.hero-status-strip i { background: var(--lime); }

.brand-mark {
  background: var(--lime);
  color: #11130F;
  border-radius: 50%;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--lime) 28%, transparent);
}

.hero-card,
.metric-card,
.panel { border-radius: 22px; }

.top-actions .cockpit-range-slot {
  flex: 0 1 260px;
  min-width: 210px;
  margin: 0;
}

.top-actions .range-picker,
.top-actions .range-picker-toggle { width: 100%; }

.top-actions .range-popover { left: auto; right: 0; }

.top-actions .range-picker-toggle {
  min-height: 42px;
  border-radius: 11px;
  padding: 7px 15px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--t1) 8%, transparent);
}

.top-actions .range-picker-caption { font-size: 12px; }
.top-actions .range-picker-toggle strong { font-size: 13px; }

.cockpit-left { gap: 0; }
.cockpit-left .hero-card { min-height: 180px; }
.hero-pipeline-card > .hero-card {
  min-height: 165px;
  padding: 14px 18px;
}
.hero-pipeline-card .hero-copy h2 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}
.hero-pipeline-card .hero-copy p {
  font-size: 12px;
  line-height: 1.4;
}
.hero-pipeline-card .hero-kicker {
  margin: 6px 0 0;
  font-size: 12px !important;
}
.hero-pipeline-card > .panel-title {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin: 0 24px;
}
.hero-pipeline-card > .panel-title .eyebrow { display: none; }
.hero-pipeline-card > .panel-title h3 {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}
.hero-pipeline-card > .pipeline-compact {
  margin: 0;
  padding: 8px 24px 9px;
  border-top: 1px solid var(--line);
  background: var(--elevated);
  border-radius: 0 0 22px 22px;
}
.hero-pipeline-card > .pipeline-compact .pipeline { margin: 0; }
.pipeline-attachment {
  border-top: 1px solid var(--line);
  background: var(--elevated);
  border-radius: 0 0 22px 22px;
  padding: 6px 24px 8px;
}
.pipeline-attachment-head {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.pipeline-attachment-head > .hero-status-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 11px;
}
.pipeline-attachment-head > .panel-title {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 24px;
  margin: 0;
}
.pipeline-attachment-head > .panel-title .eyebrow { display: none; }
.pipeline-attachment-head > .panel-title h3 {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
}
.pipeline-attachment > .pipeline-compact {
  min-width: 0;
  margin: 0;
  padding: 3px 0 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

@media (min-width: 1400px) {
  .hero-pipeline-card > .hero-card { min-height: 216.5px; }
  .pipeline-attachment {
    display: grid;
    grid-template-columns: minmax(190px, 1.2fr) minmax(220px, 2fr) minmax(150px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 7px 14px 8px;
  }
  .pipeline-attachment-head { display: contents; }
  .pipeline-attachment-head > .hero-status-strip {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
    min-height: 0;
    padding: 2px 0;
  }
  .pipeline-attachment-head > .panel-title {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    min-height: 0;
    margin: 0;
  }
  .pipeline-attachment > .pipeline-compact {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }
}
.cockpit-left .hero-copy h2,
.cockpit-left #heroTitle { max-width: min(620px, 100%); }

.ranking-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.ranking-title-line h2 { flex: 0 0 auto; }
.ranking-confirmations {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}
.ranking-confirmations span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--t2);
  font-size: 11px;
  white-space: nowrap;
}
.ranking-confirmations span i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
}
.ranking-confirmations span b {
  color: var(--t1);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 761px) {
  .hero-pipeline-card > .hero-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) 110px;
    align-items: center;
    gap: 16px;
  }
  .hero-pipeline-card > .hero-card .hero-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .hero-pipeline-card > .hero-card .hero-visual {
    display: contents !important;
    min-width: 0;
  }
  .hero-pipeline-card > .hero-card .hero-cover {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }
  .hero-pipeline-card > .hero-card .hero-hit-stats {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
  }
}

/* Unified top controls, compact two-line progress and calendar snapshot dots. */
.top-actions > #refreshBtn,
.top-actions > #runBtn,
.top-actions .range-picker-toggle,
.top-actions .run-progress-card {
  min-height: 48px;
  height: 48px;
  border-radius: 11px;
}
.top-actions .cockpit-range-slot {
  flex: 0 0 clamp(270px, 21vw, 320px);
  min-width: 270px;
}
.top-actions .run-progress-card {
  width: 156px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.top-actions .run-progress-card .run-progress-compact-row {
  width: 100%;
  gap: 7px;
}
.top-actions .run-progress-card .run-progress-track {
  width: auto;
  flex: 1;
  height: 6px;
}
.top-actions .run-progress-card .run-status {
  display: block;
  width: 100%;
  max-width: none;
  overflow: hidden;
  color: var(--t2);
  font-size: 10px;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.range-auto-hint {
  grid-column: 2;
  margin: 0;
  color: var(--t3);
  font-size: 11px;
  text-align: right;
}
.range-day {
  height: 34px;
  padding: 3px 0 2px;
  display: grid;
  grid-template-rows: 1fr 5px;
  place-items: center;
  line-height: 1;
}
.range-day > span { align-self: center; }
.range-day > i {
  width: 5px;
  height: 5px;
  display: block;
  border-radius: 50%;
  background: var(--orange);
}
.range-day.has-snapshot > i { background: var(--green); }
.range-day.confirmed-empty > i { background: var(--text-muted); }
.range-day.is-start > i,
.range-day.is-end > i { background: currentColor; }

@media (max-width: 760px) {
  .top-actions .run-progress-card { width: 116px; padding-inline: 8px; }
  .range-auto-hint { grid-column: 1; }
}

.cockpit-bottom {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 8px 18px 9px;
  border-radius: 18px;
}

.cockpit-bottom .hero-status-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 22px;
  white-space: nowrap;
}

.cockpit-bottom .pipeline-compact .panel-title {
  align-items: center;
  margin: 0;
}

.cockpit-bottom .pipeline-compact .panel-title .eyebrow { display: none; }

.cockpit-bottom .pipeline-compact .panel-title h3 {
  font-size: 13px;
  line-height: 18px;
  letter-spacing: .01em;
}

.cockpit-bottom #pipelineDate { display: none; }

.cockpit-bottom .pipeline-compact .pipeline-step {
  min-height: 21px;
  padding-top: 14px;
  font-size: 10px;
  line-height: 12px;
}

.cockpit-bottom .pipeline-compact .pipeline-step i {
  width: 11px;
  height: 11px;
  border-width: 2px;
}

.cockpit-bottom .pipeline-compact .pipeline-step.done i {
  background: var(--lime);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 16%, transparent);
}

.pipeline-detail {
  margin-left: auto;
  height: 28px;
  padding-inline: 11px;
  border-radius: 999px;
}

.cockpit-bottom .pipeline-detail { height: 28px; }

@media (max-width: 900px) {
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .top-actions .cockpit-range-slot { order: 2; flex-basis: 240px; }
  #refreshBtn { order: 1; }
  #runBtn { order: 3; }
  #runProgressCard { order: 4; }
}

@media (min-width: 1400px) {
  .hero-pipeline-card > .pipeline-compact { margin-bottom: 5.5px; }
}

@media (max-width: 760px) {
  .top-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; }
  .top-actions .cockpit-range-slot { grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; }
  #refreshBtn { grid-column: 1; grid-row: 1; }
  #runBtn { grid-column: 2; grid-row: 1; justify-self: end; }
  #runProgressCard { grid-column: 3; grid-row: 1; }
  .cockpit-left .hero-card { min-height: 250px; padding: 20px; }
  .hero-pipeline-card > .hero-status-strip { gap: 12px; overflow-x: auto; }
  .hero-pipeline-card .pipeline-compact .pipeline { min-width: 520px; }
  .hero-pipeline-card .pipeline-compact { overflow-x: auto; }
}

/* Reference dashboard fidelity: inline icons, compact controls and white/lime cards. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { display: block; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; }

.shell { grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  padding: 29px 17px 24px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}
.brand { gap: 12px; padding: 0 10px 34px; min-width: 0; }
.brand > div:last-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
/* 空间不足时只保留 LOGO，隐藏品牌文字，避免溢出侧边栏 */
@supports (container-type: inline-size) {
  .brand { container-type: inline-size; }
  @container (max-width: 118px) {
    .brand > div:last-child { display: none; }
  }
}
.brand-mark {
  width: 45px;
  height: 45px;
  background: transparent;
  color: var(--lime);
  border-radius: 50%;
  box-shadow: none;
}
.brand-mark .icon { width: 45px; height: 45px; stroke-width: 2.2; }
.brand strong { font-size: 19px; letter-spacing: .02em; }
.brand small { color: var(--t2); font-size: 10px; letter-spacing: .18em; }
nav { gap: 8px; }
.nav-item {
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--t2);
  font-size: 15px;
  gap: 13px;
}
.nav-item .nav-icon { width: 25px; height: 25px; display: grid; place-items: center; color: var(--t2); }
.nav-item .nav-icon .icon { width: 21px; height: 21px; stroke-width: 1.85; }
.nav-item:hover { color: var(--t1); background: var(--hover-bg); }
.nav-item.active {
  color: var(--t1);
  background: var(--lime-soft);
  box-shadow: inset 3px 0 var(--lime);
}
.nav-item.active .nav-icon { color: var(--t1); }
.nav-item.active::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--lime);
}
.sidebar-foot { margin-top: auto; }
.service-dot { padding: 16px 10px; color: var(--t2); border-bottom-color: var(--line); font-size: 12px; }
.service-dot i { width: 7px; height: 7px; background: var(--t3); }
.service-dot.online i { background: var(--green); box-shadow: 0 0 10px color-mix(in srgb, var(--green) 55%, transparent); }

main { padding: 0 42px 80px; }
.topbar {
  height: 106px;
  margin-bottom: 27px;
  border-bottom-color: var(--line);
}
.eyebrow { color: var(--t2); font-size: 11px; letter-spacing: .19em; }
.topbar h1 { color: var(--t1); font-size: 30px; }
.top-actions { gap: 12px; }
.button {
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 11px;
  padding: 0 18px;
  border-color: var(--line);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.button-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.button.ghost { color: var(--t1); background: var(--card); border-color: var(--line); box-shadow: 0 5px 18px rgba(17, 19, 15, .06); }
.button.ghost:hover { border-color: color-mix(in srgb, var(--lime) 60%, var(--line)); background: var(--lime-soft); }
.button.primary { color: #11130F; background: var(--lime); border-color: var(--lime); box-shadow: 0 11px 24px color-mix(in srgb, var(--lime) 25%, transparent); }
.button.primary:hover { background: color-mix(in srgb, var(--lime) 88%, #FFFFFF); }
.button.confirm { color: #11130F; background: var(--lime); border-color: var(--lime); box-shadow: 0 11px 24px color-mix(in srgb, var(--lime) 25%, transparent); }
.button.small { min-height: 34px; height: 34px; padding-inline: 14px; font-size: 12px; }
#refreshBtn { min-width: 92px; }
#runBtn.button.primary { min-width: 126px; color: var(--lime); background: #11130F; border-color: #11130F; box-shadow: 0 11px 24px rgba(17, 19, 15, .16); }
#runBtn.button.primary .button-icon { color: var(--lime); }
#runBtn.button.primary:hover { background: #292D24; }
.top-actions .run-status { color: var(--t2); }
.top-actions .cockpit-range-slot { flex: 0 0 clamp(320px, 24vw, 370px); min-width: 320px; }
.top-actions .range-picker-toggle { min-height: 48px; border-radius: 11px; padding: 8px 15px; box-shadow: 0 6px 18px rgba(17, 19, 15, .06); }
.range-picker-icon { width: 19px; height: 19px; flex: 0 0 auto; color: var(--t1); }
.range-picker-caption { font-size: 12px; }
.range-picker-toggle strong { font-family: var(--font-mono); font-size: 13px; }
.range-picker-chevron {
  position: relative;
  width: 22px; height: 22px; flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; box-sizing: border-box;
  font-size: 0; line-height: 0; color: var(--t2);
  transform: rotate(0deg) scale(1); transform-origin: 50% 50%;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), color .18s ease;
}
.range-picker-chevron::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
  transform-origin: 50% 50%;
}
.range-picker-toggle[aria-expanded="true"] .range-picker-chevron {
  color: var(--t1);
  transform: rotate(180deg) scale(.78);
}
@media (prefers-reduced-motion: reduce) {
  .range-picker-chevron { transition: none; }
}

.dashboard-cockpit { grid-template-columns: minmax(0, 1.34fr) minmax(430px, 1fr); gap: 20px; margin-bottom: 16px; }
.hero-pipeline-card { border-radius: 22px; background: var(--card); border-color: var(--line); box-shadow: var(--card-shadow); }
.hero-pipeline-card > .hero-card { padding: 25px 24px; background: var(--card); }
.hero-pipeline-card > .hero-card::before { border-color: color-mix(in srgb, var(--lime) 24%, transparent); }
.hero-pipeline-card .hero-copy h2,
.hero-pipeline-card #heroTitle {
  max-width: 100%;
  margin: 12px 0 11px;
  font-size: 21px;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-pipeline-card .hero-copy p { color: var(--t2); font-size: 13px; line-height: 1.55; }
.hero-pipeline-card .hero-kicker { color: var(--green) !important; font-size: 13px !important; font-weight: 700; }
.hero-pipeline-card .chip.hot { color: var(--t1); background: var(--lime-soft); border-color: transparent; }
.hero-pipeline-card .hero-cover { width: 126px; height: 194px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); box-shadow: var(--cover-shadow); }
.hero-pipeline-card .hero-hit-stats { gap: 5px; }
.hero-pipeline-card .hero-hit-stats b { color: var(--green) !important; font-size: 43px; line-height: 1; }
.hero-pipeline-card .hero-hit-stats span { color: var(--t2); font-size: 12px; }
.hero-pipeline-card .hero-hit-stats strong { color: var(--orange) !important; font-size: 21px; margin-top: 12px; }
.hero-pipeline-card .hero-hit-stats small { color: var(--t2); font-size: 12px; }

.cockpit-metrics { gap: 20px; }
.cockpit-right .metric-card { min-height: 190.52px; padding: 23px 20px 20px; border-radius: 20px; }
.cockpit-right .metric-card::after { display: none; }
.cockpit-right .metric-card::before { height: 3px; background: var(--lime); opacity: 1; }
.cockpit-right .metric-card.accent-orange::before { background: var(--orange); }
.cockpit-right .metric-card.accent-cyan::before { background: var(--lime); }
.cockpit-right .metric-card .metric-label { padding-left: 0; display: flex; align-items: center; gap: 12px; color: var(--t2); font-size: 14px; margin-bottom: auto; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--lime-soft); color: var(--t1); font-style: normal; }
.metric-icon .icon { width: 19px; height: 19px; stroke-width: 1.65; }
.cockpit-right .metric-card strong { color: var(--t1) !important; font-family: var(--font-mono); font-size: 42px; line-height: 1.05; letter-spacing: -.04em; }
.cockpit-right .metric-card.accent-cyan strong { font-size: clamp(31px, 2.7vw, 43px); }
.cockpit-right .metric-card small { color: var(--t2); font-size: 12px; line-height: 1.45; }
.cockpit-right .metric-card small + small { margin-top: 2px; }
.cockpit-right .capture-shortcuts { gap: 12px; }
.cockpit-right .capture-shortcut-grid { gap: 12px; }
.capture-shortcut { min-height: 80px; padding: 15px 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 7px 20px rgba(17, 19, 15, .045); }
.capture-shortcut:hover { border-color: color-mix(in srgb, var(--lime) 60%, var(--line)); background: var(--lime-soft); transform: translateY(-1px); }
.shortcut-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.shortcut-logo .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.shortcut-logo.wx { color: #169B38; background: var(--green-soft); }
.shortcut-logo.dy { color: #FF4D79; background: var(--orange-soft); }
.shortcut-copy strong { color: var(--t1); font-size: 13px; }
.shortcut-copy small { color: var(--t2); font-size: 10px; }
.shortcut-arrow { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--elevated); color: var(--t1); }
.shortcut-arrow .icon { width: 17px; height: 17px; }

/* Preserve the optimized three-column pipeline strip and its compact height. */
.pipeline-attachment { background: var(--elevated); border-top-color: var(--line); padding: 8px 16px 10px; }
.pipeline-attachment-head > .hero-status-strip { color: var(--t2); font-size: 11px; }
.pipeline-attachment-head > .hero-status-strip i { background: var(--lime); }
.pipeline-attachment-head > .hero-status-strip b { color: var(--t1); }
.pipeline-attachment-head > .panel-title { align-items: flex-end; }
.pipeline-detail { color: var(--t1); background: var(--card); border-color: var(--line); box-shadow: 0 4px 13px rgba(17, 19, 15, .06); }
.pipeline-detail:hover { border-color: var(--lime); background: var(--lime-soft); }
.pipeline-attachment > .pipeline-compact .pipeline-step { color: var(--t2); }
.pipeline-attachment > .pipeline-compact .pipeline-step::before { background: color-mix(in srgb, var(--lime) 34%, var(--line)); }
.pipeline-attachment > .pipeline-compact .pipeline-step i { width: 14px; height: 14px; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); color: var(--green); }
.pipeline-attachment > .pipeline-compact .pipeline-step i .icon { width: 9px; height: 9px; stroke-width: 3; opacity: 0; }
.pipeline-attachment > .pipeline-compact .pipeline-step.done i { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 17%, transparent); }
.pipeline-attachment > .pipeline-compact .pipeline-step.done i .icon { opacity: 1; color: #11130F; }
.pipeline-attachment > .pipeline-compact .pipeline-step.active i { border-color: var(--orange); background: var(--orange-soft); }

#view-dashboard > .section-head {
  margin: 29px 0 0;
  padding: 21px 22px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--card);
}
#view-dashboard > .section-head h2 { color: var(--t1); font-size: 25px; }
#view-dashboard > .section-head .row-actions { align-items: center; }
#view-dashboard > .section-head .legend { white-space: nowrap; }
#view-dashboard > .leaderboard-panel { border-radius: 0 0 22px 22px; box-shadow: var(--card-shadow); }
#view-dashboard > .leaderboard-panel table { min-width: 980px; }
#view-dashboard > .leaderboard-panel th { color: var(--t2); font-size: 11px; padding: 15px 18px; }
#view-dashboard > .leaderboard-panel td { color: var(--t1); border-bottom-color: var(--sep); padding: 17px 18px; }
#view-dashboard > .leaderboard-panel tbody tr:hover { background: var(--hover-bg); }
#view-dashboard > .leaderboard-panel .video-cell strong { color: var(--t1); font-size: 14px; }
#view-dashboard > .leaderboard-panel .video-cell small { color: var(--t2); }
#view-dashboard > .leaderboard-panel .rank-num.top { color: var(--orange); }
#view-dashboard > .leaderboard-panel .rank-num { color: var(--t2); }
#view-dashboard > .leaderboard-panel .source-tag { color: var(--green); border-color: color-mix(in srgb, var(--green) 38%, var(--line)); background: var(--green-soft); }
#view-dashboard > .leaderboard-panel .mapping-edit { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); background: var(--orange-soft); }

/* Keep dense table cells readable at every desktop width. */
#view-dashboard > .leaderboard-panel table { table-layout: fixed; min-width: 1160px; }
#view-dashboard > .leaderboard-panel th:nth-child(1),
#view-dashboard > .leaderboard-panel td:nth-child(1) { width: 72px; }
#view-dashboard > .leaderboard-panel th:nth-child(2),
#view-dashboard > .leaderboard-panel td:nth-child(2) { width: 440px; }
#view-dashboard > .leaderboard-panel th:nth-child(3),
#view-dashboard > .leaderboard-panel td:nth-child(3) { width: 135px; }
#view-dashboard > .leaderboard-panel th:nth-child(4),
#view-dashboard > .leaderboard-panel td:nth-child(4) { width: 145px; }
#view-dashboard > .leaderboard-panel th:nth-child(5),
#view-dashboard > .leaderboard-panel td:nth-child(5) { width: 125px; }
#view-dashboard > .leaderboard-panel th:nth-child(6),
#view-dashboard > .leaderboard-panel td:nth-child(6) { width: 125px; }
#view-dashboard > .leaderboard-panel th:nth-child(7),
#view-dashboard > .leaderboard-panel td:nth-child(7) { width: 130px; }
#view-dashboard > .leaderboard-panel th:nth-child(8),
#view-dashboard > .leaderboard-panel td:nth-child(8) { width: 55px; }
#view-dashboard > .leaderboard-panel td:nth-child(n+3) { white-space: nowrap; }
#view-dashboard > .leaderboard-panel .number-strong,
#view-dashboard > .leaderboard-panel .money,
#view-dashboard > .leaderboard-panel .rank-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
#view-dashboard > .leaderboard-panel .video-cell small,
#view-dashboard > .leaderboard-panel .operator-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-dashboard > .leaderboard-panel .operator-line { color: var(--t2); font-size: 12px; }
#view-dashboard > .leaderboard-panel .mapping-source {
  color: var(--green);
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 34%, var(--line));
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 6px;
}
#view-dashboard > .leaderboard-panel .mapping-edit {
  color: color-mix(in srgb, var(--orange) 82%, #7A2812);
  background: var(--orange-soft);
  border-color: color-mix(in srgb, var(--orange) 32%, var(--line));
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 6px;
  border-radius: 999px;
}
#view-dashboard > .leaderboard-panel .trend-line { color: var(--green); font-size: 12px; white-space: nowrap; }
#view-dashboard > .leaderboard-panel .trend-line.down { color: var(--danger); }
#view-dashboard > .leaderboard-panel .trend-line.flat { color: var(--t2); }

.tool-logo { border: 0; }
.tool-logo .icon { width: 24px; height: 24px; }
.tool-logo.wx { color: #169B38; background: var(--green-soft); }
.tool-logo.dy { color: #FF4D79; background: var(--orange-soft); }
.input, .model-select { background: var(--input-bg); color: var(--t1); border-color: var(--line); }
.input::placeholder { color: var(--t3); }

@media (max-width: 1399px) and (min-width: 1101px) {
  main { padding-inline: 30px; }
  .dashboard-cockpit { grid-template-columns: minmax(0, 1.25fr) minmax(390px, 1fr); gap: 16px; }
  .hero-pipeline-card .hero-cover { width: 112px; height: 174px; }
  .hero-pipeline-card > .hero-card { grid-template-columns: 104px minmax(0, 1fr) 105px; }
}

@media (max-width: 1399px) and (min-width: 901px) {
  .hero-pipeline-card > .hero-card { min-height: 232.5px; }
  .pipeline-attachment {
    display: grid;
    grid-template-columns: minmax(125px, 1fr) minmax(170px, 1.7fr) minmax(115px, .9fr);
    align-items: center;
    gap: 8px;
    padding: 7px 12px 8px;
  }
  .pipeline-attachment-head { display: contents; }
  .pipeline-attachment-head > .hero-status-strip {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    padding: 2px 0;
    overflow: hidden;
  }
  .pipeline-attachment-head > .panel-title {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    min-height: 0;
    margin: 0;
  }
  .pipeline-attachment > .pipeline-compact {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }
}

@media (min-width: 1101px) {
  .cockpit-right { min-height: 100%; }
  .cockpit-right .capture-shortcuts { flex: 1 1 auto; min-height: 80px; }
  .cockpit-right .capture-shortcut-grid { height: 100%; }
  .cockpit-right .capture-shortcut { height: 100%; min-height: 80px; }
}

@media (max-width: 1100px) {
  .shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding: 25px 10px; }
  .brand { padding-inline: 9px; }
  .brand div, .nav-item:not(.active) { font-size: 0; }
  .nav-item { justify-content: center; padding-inline: 8px; }
  .nav-item .nav-icon { width: 25px; }
  .nav-item.active::after { display: none; }
  .service-dot span { display: none; }
  main { padding-inline: 24px; }
  .dashboard-cockpit { grid-template-columns: 1fr; }
  .cockpit-right { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  main { padding: 0 15px 90px; }
  .topbar { height: auto; padding: 20px 0; align-items: flex-start; }
  .topbar h1 { font-size: 23px; }
  .top-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; gap: 8px; }
  .top-actions .cockpit-range-slot { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
  #refreshBtn { grid-column: 1; grid-row: 1; min-width: 0; padding-inline: 12px; }
  #runBtn { grid-column: 2; grid-row: 1; justify-self: end; min-width: 0; padding-inline: 13px; }
  #runProgressCard { grid-column: 3; grid-row: 1; }
  .hero-pipeline-card > .hero-card { min-height: 250px; padding: 20px; display: block; }
  .hero-pipeline-card .hero-cover { width: 92px; height: 132px; }
  .hero-pipeline-card .hero-visual { display: none !important; }
  .hero-pipeline-card .hero-copy h2 { font-size: 20px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cockpit-metrics, .cockpit-right .capture-shortcut-grid { grid-template-columns: 1fr 1fr; }
  .cockpit-right .metric-card { min-height: 155px; padding: 17px; }
  .cockpit-right .metric-card strong { font-size: 34px; }
  .cockpit-right .metric-card.accent-cyan strong { font-size: 27px; }
  .capture-shortcut { min-height: 72px; padding: 12px 10px; }
  #view-dashboard > .section-head { padding: 17px 15px 12px; display: block; }
  #view-dashboard > .section-head .row-actions { margin-top: 12px; flex-wrap: wrap; }
  #view-dashboard > .section-head .legend { white-space: normal; }
  .ranking-title-line { gap: 8px 12px; }
  .ranking-confirmations { gap: 6px 10px; }
  .pipeline-attachment { padding-inline: 12px; }
  .pipeline-attachment { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .pipeline-attachment-head { display: grid; }
  .pipeline-attachment-head > .hero-status-strip { min-height: 22px; }
  .pipeline-attachment-head > .panel-title { position: absolute; right: 12px; top: 8px; }
  .pipeline-attachment > .pipeline-compact { overflow-x: auto; padding-top: 3px; }
  .pipeline-attachment > .pipeline-compact .pipeline { min-width: 520px; }
}

@media (max-width: 500px) {
  .cockpit-metrics, .cockpit-right .capture-shortcut-grid { grid-template-columns: 1fr; }
  .top-actions .button span { display: none; }
  #refreshBtn, #runBtn { padding-inline: 13px; }
  .range-picker-caption { display: none; }
}

/* TOP1 placement refinement from the annotated card: cover, copy and stats use
   three deliberate columns and share the same top baseline. */
@media (min-width: 761px) {
  .hero-pipeline-card > .hero-card {
    grid-template-columns: 140px minmax(0, 1fr) 160px;
    align-items: start;
  }
  .hero-pipeline-card > .hero-card .hero-copy,
  .hero-pipeline-card > .hero-card .hero-hit-stats {
    align-self: start;
  }
  .hero-pipeline-card > .hero-card .hero-copy { padding-top: 0; }
  .hero-pipeline-card > .hero-card .hero-cover { justify-self: center; }
  .hero-pipeline-card > .hero-card .hero-hit-stats { justify-self: end; width: 160px; padding-top: 0; }
}

@media (max-width: 1399px) and (min-width: 761px) {
  .hero-pipeline-card > .hero-card {
    grid-template-columns: 132px minmax(0, 1fr) 132px;
  }
  .hero-pipeline-card > .hero-card .hero-hit-stats { width: 132px; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .hero-pipeline-card > .hero-card { grid-template-columns: 140px minmax(0, 1fr) 160px; }
  .hero-pipeline-card > .hero-card .hero-hit-stats { width: 160px; }
}

/* Centered detail, report and local-video dialogs */
#detailModal { z-index: 960; }
/* 文案详情（1.0.60 沉浸阅读）：标题栏、信息行和底栏收紧，正文直接铺在弹窗上；有正文时弹窗固定为近满高，加载前后不跳动。 */
.detail-modal { width: min(1040px, calc(100vw - 40px)); max-height: calc(100vh - 32px); border-radius: 18px; overflow: hidden; }
@media (min-width: 761px) { .detail-modal[data-reader="full"] { height: min(calc(100vh - 32px), 940px); } }
.detail-modal > header { align-items: flex-start; gap: 14px; padding: 14px 16px 12px 24px; }
.detail-modal > header > div { min-width: 0; padding-top: 3px; }
.detail-modal > header h2 { display: -webkit-box; margin: 0; overflow: hidden; font-size: 18px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.detail-modal .drawer-content { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 24px 24px; }
.detail-modal > footer { flex-wrap: wrap; position: sticky; bottom: 0; padding: 10px 16px 10px 24px; background: var(--drawer-bg); }
.detail-summary-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-height: 24px; margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line); color: var(--t2); font-size: 13px; line-height: 1.5; }
.detail-meta-item { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.detail-meta-rank b { padding: 1px 9px; border-radius: 999px; background: var(--elevated); font-size: 12px; white-space: nowrap; }
.detail-meta-item small { color: var(--t3); font-size: 12px; white-space: nowrap; }
.detail-meta-item b { color: var(--t1); font-weight: 600; overflow-wrap: anywhere; }
.detail-summary-bar .money { color: var(--amber); }
.detail-summary-bar .detail-operator-value { display: inline-flex; align-items: center; gap: 2px; }
.detail-summary-bar .detail-operator-edit { align-self: center; width: 24px; height: 24px; margin-block: -3px; }
.detail-meta-skeleton { width: 120px; height: 14px; border-radius: 6px; background: color-mix(in srgb, var(--t2) 12%, transparent); }
.detail-body-skeleton { display: grid; gap: 17px; padding-top: 9px; }
.detail-body-skeleton > span { height: 16px; border-radius: 6px; background: color-mix(in srgb, var(--t2) 12%, transparent); }
.detail-body-skeleton > span:nth-child(3n) { width: 93%; }
.detail-body-skeleton > span:last-child { width: 46%; }
.detail-body > .load-feedback { padding: 28px 0; }
.detail-video-disclosure { margin-top: 16px; }
.detail-video-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 11px; background: var(--elevated); color: var(--t1); cursor: pointer; list-style: none; }
.detail-video-disclosure summary::-webkit-details-marker { display: none; }
.detail-video-disclosure summary small { margin-left: auto; color: var(--t3); }
.detail-video-disclosure summary::after { content: '⌄'; color: var(--t2); font-size: 17px; transition: transform .15s ease; }
.detail-video-disclosure[open] summary::after { transform: rotate(180deg); }
.detail-video-disclosure .detail-video-wrap, .detail-video-disclosure .detail-video-placeholder { margin: 14px auto 0; }
.detail-modal .daily-breakdown { margin-top: 14px; }
/* 打开：遮罩淡入，弹窗轻微放大上浮；信息行逐项出现，正文到达后上浮淡入。关闭：随遮罩淡出并略微回缩。 */
@media (prefers-reduced-motion: no-preference) {
  @keyframes detail-content-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes detail-skeleton-pulse { to { opacity: .45; } }
  .detail-summary-bar.detail-enter-stagger > * { animation: detail-content-in .24s cubic-bezier(.22, 1, .36, 1) calc(60ms + var(--i, 0) * 35ms) both; }
  .detail-body.detail-enter { animation: detail-content-in .28s cubic-bezier(.22, 1, .36, 1) both; }
  .detail-summary-bar.detail-enter-stagger + .detail-body.detail-enter { animation-delay: 110ms; }
  .detail-meta-skeleton, .detail-body-skeleton > span { animation: detail-skeleton-pulse 1s ease-in-out infinite alternate; }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  @keyframes detail-reader-in { from { opacity: 0; transform: translateY(14px) scale(.965); } to { opacity: 1; transform: none; } }
  #detailModal.open > .detail-modal { animation: detail-reader-in .28s cubic-bezier(.22, 1, .36, 1) both; }
  /* 关闭用关键帧而不是 transition：打开动画仍占着 transform 时，浏览器不会为同一属性启动过渡。 */
  @keyframes detail-reader-out { from { transform: none; } to { transform: translateY(8px) scale(.975); } }
  #detailModal:not(.open) > .detail-modal { animation: detail-reader-out .2s ease-in both; }
}
.detail-video-wrap { display: grid; justify-items: center; gap: 8px; margin: 24px auto; }
.detail-video { width: min(360px, 100%); max-height: 480px; border-radius: 16px; background: #050505; box-shadow: var(--cover-shadow); }
.detail-video-wrap small { color: var(--t3); font-size: 11px; }
.detail-video-wrap.unavailable .detail-cover { margin-bottom: 0; }
.detail-video-placeholder { display: grid; justify-items: center; gap: 7px; margin: 24px auto; padding: 34px 22px; max-width: 430px; border: 1px dashed var(--line); border-radius: 16px; color: var(--t2); background: var(--elevated); }
.detail-video-placeholder span { color: var(--t3); font-size: 12px; }
.detail-modal .copy-paper { padding: 0; border-radius: 0; background: transparent; box-shadow: none; font-family: "Source Han Sans SC","Noto Sans SC","Microsoft YaHei",sans-serif; font-size: 17.5px; line-height: 1.9; letter-spacing: .01em; white-space: normal; }
.detail-modal .copy-paper p { margin: 0; white-space: normal; }
.detail-modal .copy-paper p + p { margin-block-start: .85em; }

.report-modal { width: min(1080px, calc(100vw - 40px)); max-height: 88vh; }
.report-modal-body { min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(260px,.72fr) minmax(480px,1.28fr); gap: 18px; padding: 22px; }
.report-modal-body > article { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--elevated); }
.report-modal .workspace-report-preview { min-height: 340px; max-height: 48vh; }
.report-events { margin-top: 15px; color: var(--t2); }
.report-events summary { cursor: pointer; font-weight: 700; }
.report-events .run-events { margin-top: 10px; max-height: 240px; overflow-y: auto; }

.video-player-modal { width: min(760px, calc(100vw - 40px)); max-height: 88vh; }
.video-player-body { display: grid; place-items: center; min-height: 0; padding: 20px; overflow: auto; }
.video-player-body video { display: block; width: 100%; max-height: 70vh; border-radius: 14px; background: #050505; }

/* Capture inbox and local transcription */
.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.tool-heading > div:not(.compact-actions) { min-width: 0; }
.tool-heading > .compact-actions { flex: 0 0 auto; }
.wx-capture-scroll { max-height: min(56vh,600px); overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
.wx-capture-scroll .feed-item { align-items: center; }
.wx-capture-copy { flex: 1; min-width: 0; }
.wx-capture-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capture-remove { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; color: var(--danger); background: var(--card); cursor: pointer; font-size: 18px; }
.capture-remove:hover { background: color-mix(in srgb,var(--danger) 10%,var(--card)); }
.capture-local-transcribe { margin-top: 20px; }
.danger-text { color: var(--danger) !important; }

/* Current-session WeChat download manager */
.download-manager-panel { padding: 22px; }
.download-manager-note { display: flex; align-items: center; gap: 13px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.download-manager-note strong { display: block; color: var(--t1); margin-bottom: 5px; }
.download-manager-note p { margin: 0; color: var(--t2); font-size: 12px; line-height: 1.55; }
.download-job-list { display: grid; gap: 12px; margin-top: 18px; }
.download-job { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--elevated); }
.download-job-main { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; }
.download-source { padding: 5px 8px; border-radius: 999px; background: var(--lime-soft); color: var(--green); font-size: 10px; font-weight: 800; white-space: nowrap; }
.download-job-copy { min-width: 0; }
.download-job-copy h3 { margin: 0 0 5px; color: var(--t1); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.download-job-copy p { margin: 0; color: var(--t3); font-size: 11px; }
.download-status { color: var(--t2); font-size: 12px; font-weight: 700; }
.download-job.downloading .download-status,.download-job.transcribing .download-status { color: var(--orange); }
.download-job.done .download-status,.download-job.transcribed .download-status { color: var(--green); }
.download-job.failed .download-status { color: var(--danger); }
.download-progress { height: 7px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: var(--panel2); }
.download-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--lime),var(--green)); transition: width .25s ease; }
.download-job.failed .download-progress span { background: var(--danger); }
.download-job.is-transcribing .download-progress span { background: linear-gradient(90deg, var(--orange), var(--lime)); }
.download-job-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 7px; color: var(--t3); font-family: var(--font-mono); font-size: 11px; }
.download-job-meta strong { color: var(--danger); font-family: var(--font-cjk); font-weight: 600; }
.download-job-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.download-transcript { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--t2); }
.download-transcript summary { cursor: pointer; font-weight: 700; }
.download-transcript p { max-height: 220px; overflow-y: auto; margin: 12px 0; color: var(--t1); font-family: "Source Han Sans SC","Noto Sans SC","Microsoft YaHei",sans-serif; font-size: 14px; line-height: 1.8; }

@media (max-width: 760px) {
  .two-columns { grid-template-columns: 1fr; }
  .detail-modal,.report-modal,.video-player-modal { width: calc(100vw - 16px); max-height: 96vh; border-radius: 15px; }
  .detail-modal { border-radius: 15px; }
  .detail-modal .drawer-content { padding: 12px 16px 18px; }
  .detail-modal .detail-stats { grid-template-columns: 1fr 1fr; }
  .detail-modal footer { justify-content: stretch; padding: 12px; }
  .detail-modal footer .button { flex: 1 1 calc(50% - 8px); }
  .detail-modal .copy-paper { font-size: 16.5px; }
  .report-modal-body { grid-template-columns: 1fr; padding: 12px; }
  .report-modal .workspace-report-preview { min-height: 280px; }
  .download-job-main { grid-template-columns: 1fr auto; }
  .download-source { grid-column: 1 / -1; justify-self: start; }
  .download-job-meta { display: grid; gap: 5px; }
}

/* Copy-library title fission lab */
.title-fission-lab {
  align-self: start;
  position: sticky;
  top: 18px;
  padding: 22px !important;
  overflow: hidden;
}

.title-fission-lab::before {
  content: '';
  position: absolute;
  width: 210px;
  height: 210px;
  right: -120px;
  top: -125px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lime) 18%, transparent), transparent 68%);
  pointer-events: none;
}

.title-fission-lab .panel-title { position: relative; }
.title-fission-lab .panel-title h3 { font-size: 19px; }
.title-fission-lab .panel-title .chip { white-space: nowrap; }

.title-fission-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 78px;
  gap: 9px;
  align-items: end;
  margin: 14px 0;
}

.title-fission-controls label {
  min-width: 0;
  color: var(--t2);
  font-size: 11px;
  font-weight: 700;
}

.title-fission-controls select,
.title-fission-controls input {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--t1);
  background: var(--elevated);
  font: inherit;
}

.title-fission-controls .title-seed-label { grid-column: 1 / 3; }
.title-fission-controls > .button { height: 42px; }

.title-generation-progress {
  margin: 14px 0 4px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--lime) 48%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-2) 88%, var(--lime) 12%);
}
.title-generation-compact { display: flex; align-items: center; gap: 9px; min-width: 0; }
.title-generation-compact strong { flex: 0 0 auto; font-size: 13px; color: var(--text); }
.title-generation-compact > span:not(.title-generation-spinner) { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.title-generation-compact .button { flex: 0 0 auto; margin-left: auto; }
.title-generation-spinner { flex: 0 0 auto; width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--orange) 24%, var(--line)); border-top-color: var(--orange); border-radius: 50%; animation: title-generation-spin .8s linear infinite; }
.title-generation-progress.is-failed { border-color: color-mix(in srgb, var(--orange) 52%, var(--line)); }
.title-generation-progress.is-failed .title-generation-spinner { animation: none; border-color: var(--orange); }
@keyframes title-generation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .title-generation-spinner { animation-duration: 1.8s; } }
.title-generation-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-generation-progress-head > div { display: grid; gap: 3px; }
.title-generation-progress-head strong { font-size: 15px; color: var(--text); }
.title-generation-progress-head span { font-size: 12px; color: var(--muted); }
.title-generation-time { display: flex; gap: 22px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.title-generation-time b { margin-left: 5px; color: var(--text); font-family: var(--font-mono); }
.title-generation-milestones { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; max-height: 190px; overflow: auto; }
.title-generation-milestones li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; align-items: start; }
.title-generation-milestones i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 18%, transparent); }
.title-generation-milestones div { display: grid; gap: 2px; min-width: 0; }
.title-generation-milestones strong { font-size: 12px; color: var(--text); }
.title-generation-milestones small { font-size: 11px; line-height: 1.5; color: var(--muted); }
.title-generation-milestones time { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.title-picked {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--lime) 45%, var(--line));
  border-radius: 13px;
  background: var(--lime-soft);
}

.title-picked span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.title-picked strong {
  display: block;
  margin-bottom: 10px;
  color: var(--t1);
  font-size: 14px;
  line-height: 1.65;
}

.title-variant-list {
  display: grid;
  gap: 9px;
  max-height: min(58vh, 610px);
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.title-variant-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--elevated);
  transition: border-color .2s ease, background .2s ease;
}

.title-variant-item:hover {
  border-color: color-mix(in srgb, var(--lime) 52%, var(--line));
  background: color-mix(in srgb, var(--lime) 5%, var(--elevated));
}

.title-variant-index {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.title-variant-copy { min-width: 0; }
.title-variant-copy strong {
  display: block;
  color: var(--t1);
  font-size: 13px;
  line-height: 1.55;
}

.title-variant-copy strong i {
  margin: 0 2px;
  color: var(--orange);
  font-style: normal;
}

.title-half-anchor { color: var(--t1); }
.title-half-changed { color: color-mix(in srgb, var(--green) 72%, var(--t1)); }

.title-variant-copy small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--t3);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.title-variant-copy small span { color: var(--green); font-weight: 700; }
.title-variant-actions { display: flex; gap: 6px; }

.title-history {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.title-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.title-history-head strong { color: var(--t1); font-size: 13px; }
.title-history-head small { color: var(--t3); font-size: 10px; }
.title-history-list { display: grid; gap: 6px; max-height: 180px; overflow-y: auto; }
.title-history-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--t1);
  background: var(--elevated);
  text-align: left;
  cursor: pointer;
}
.title-history-list button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.title-history-list button small { color: var(--t3); }

.title-ai-settings { grid-column: 1 / -1; padding: 22px !important; }
.title-ai-browser-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 18px; }
.title-ai-browser-settings label { color: var(--t2); font-size: 11px; font-weight: 700; }
.title-ai-browser-settings .input { display: block; width: 100%; margin-top: 6px; }
.title-ai-browser-settings > .muted { grid-column: 1 / -1; margin: 0; }
.title-ai-form { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 18px; }
.title-ai-form label { color: var(--t2); font-size: 11px; font-weight: 700; }
.title-ai-form .input { display: block; width: 100%; margin-top: 6px; }
.title-ai-form .row-actions { flex-wrap: nowrap; }
.title-ai-form > .muted { grid-column: 1 / -1; margin: 0; }

@media (max-width: 1450px) {
  .title-fission-controls { grid-template-columns: 1fr 88px 78px; }
  .title-fission-controls .title-seed-label { grid-column: 1 / -1; }
  .title-fission-controls > .button { grid-column: 1 / -1; width: 100%; }
  .title-variant-item { grid-template-columns: 27px minmax(0, 1fr); }
  .title-variant-actions { grid-column: 2; justify-content: flex-end; }
  .title-ai-form { grid-template-columns: 1fr 1fr; }
  .title-ai-form .row-actions { justify-content: flex-start; }
}

@media (max-width: 1100px) {
  .title-fission-lab { position: static; }
}

@media (max-width: 600px) {
  .title-fission-controls { grid-template-columns: 1fr; }
  .title-fission-controls > .button { grid-column: auto; }
  .title-fission-lab .panel-title { display: grid; }
  .title-fission-lab .panel-title .chip { justify-self: start; }
  .title-ai-form { grid-template-columns: 1fr; }
  .title-ai-form > .muted { grid-column: auto; }
  .title-ai-browser-settings { grid-template-columns: 1fr; }
  .title-ai-browser-settings > .muted { grid-column: auto; }
  .title-history-head { display: grid; }
}

/* Unified copywriting pipeline */
.library-list-head { display:flex; align-items:center; justify-content:flex-end; margin-bottom:12px; }

#view-library [data-copywriter-pane="assets"] .library-layout { display:block; width:100%; }
#view-library .library-assets-panel { min-width:0; }
#view-library .library-assets-panel .library-list { max-height:none; min-height:0; overflow:visible; padding:2px 0 4px; }
#view-library .library-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); color:var(--muted); font-size:12px; }
#view-library .library-pagination>div { display:flex; gap:8px; }

@media(max-width:700px){#view-library .library-pagination{flex-wrap:wrap}}

.copywriter-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; padding:5px; width:max-content; max-width:100%; border:1px solid var(--border); border-radius:16px; background:var(--panel); box-shadow:var(--shadow-soft); }
.copywriter-tabs button { min-width:0; flex:0 1 auto; border:0; border-radius:11px; padding:10px 24px; background:transparent; color:var(--muted); font:800 14px var(--font); cursor:pointer; }
.copywriter-tabs button.active { color:#11130f; background:var(--lime); box-shadow:0 8px 22px color-mix(in srgb,var(--lime) 30%,transparent); }
.copywriter-pane { display:none; }.copywriter-pane.active { display:block; }

.library-card-actions { display:flex; gap:7px; margin-top:12px; padding-top:10px; border-top:1px solid var(--border); }

.copywriter-empty { display:grid; min-height:220px; place-items:center; padding:30px; border:1px dashed var(--border); border-radius:16px; color:var(--muted); text-align:center; }

.course-settings label{ display:block; color:var(--muted); font-size:12px; font-weight:700; }.assembly-selectors select{ display:block; width:100%; margin-top:5px; padding:10px; border:1px solid var(--border); border-radius:10px; background:var(--panel); color:var(--text); }.button.wide { width:100%; }
.copywriter-settings { margin-top:16px; border-top:1px solid var(--border); padding-top:14px; }.copywriter-settings summary { cursor:pointer; font-weight:800; }.agent-url-grid { display:grid; gap:9px; margin:12px 0; }.agent-url-grid label { color:var(--muted); font-size:12px; }.agent-url-grid .input { width:100%; margin-top:5px; }.course-settings { display:grid; gap:10px; margin:12px 0; max-height:420px; overflow:auto; }.course-settings article { padding:13px; border:1px solid var(--border); border-radius:13px; background:var(--panel2); }.course-settings article>div:first-child { display:flex; justify-content:space-between; align-items:center; }.course-enabled { display:flex!important; align-items:center; gap:5px; }.course-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:9px 0; }.course-settings textarea { min-height:68px; resize:vertical; }.course-settings .input { width:100%; margin-top:4px; }
.assembly-selectors { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:12px 0; }.assembly-selectors label { color:var(--muted); font-size:11px; }
@media (max-width:1200px) { .assembly-selectors { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) { .library-list-head { flex-wrap:wrap; }.copywriter-tabs { width:100%; }.copywriter-tabs button { flex:1 1 120px; padding:10px 5px; }.course-grid,.assembly-selectors{ grid-template-columns:1fr; }.library-card-actions{ flex-wrap:wrap; } }

/* All sidebar menu entries use the teacher-radar card style. */
.sidebar .nav-item {
  width: 100%;
  position: relative;
  border: none;
  background: transparent;
  color: var(--t1);
  text-decoration: none;
  box-shadow: none;
}

.sidebar .nav-item .nav-icon {
  color: var(--t2);
}

.sidebar .nav-item:hover {
  color: var(--t1);
  border-color: transparent;
  background: linear-gradient(100deg, color-mix(in srgb, var(--lime) 17%, var(--card)), var(--card));
}

.sidebar .nav-item:hover .nav-icon {
  color: color-mix(in srgb, var(--lime) 75%, var(--t1));
}

.sidebar .nav-item.active {
  color: var(--t1);
  border-color: transparent;
  background: linear-gradient(100deg, color-mix(in srgb, var(--lime) 18%, var(--card)), var(--card));
  box-shadow: 0 7px 20px color-mix(in srgb, var(--lime) 12%, transparent);
}

.sidebar .nav-item.active .nav-icon {
  color: color-mix(in srgb, var(--lime) 75%, var(--t1));
}

.sidebar .nav-item.active::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  margin-left: auto;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px color-mix(in srgb, var(--lime) 58%, transparent);
}

/* 侧边栏按钮之间以渐变细线分隔：两端渐变透明，中间实、近端虚；桌面端隐藏设置按钮 */
.sidebar #nav {
  gap: 0;
}
.sidebar #nav > .nav-item {
  margin: 4px 0;
}
.sidebar #nav > .nav-item + .nav-item::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--t3) 12%, transparent) 15%,
    color-mix(in srgb, var(--t3) 40%, transparent) 40%,
    color-mix(in srgb, var(--t3) 40%, transparent) 60%,
    color-mix(in srgb, var(--t3) 12%, transparent) 85%,
    transparent 100%);
}
.sidebar .sidebar-foot .nav-item[data-view="settings"] { display: none; }

.sidebar .radar-entry {
  margin-bottom: 9px;
}

.sidebar .radar-entry::after {
  content: '\2197';
  width: auto;
  height: auto;
  margin-left: auto;
  flex: 0 0 auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--t3);
  font-size: 14px;
}

@media (max-width: 1100px) and (min-width: 761px) {
  .sidebar .nav-item {
    min-height: 52px;
  }

  .sidebar .nav-item.active::after {
    position: absolute;
    top: 8px;
    right: 7px;
  }

  .sidebar .radar-entry::after {
    display: none;
  }
}

/* Active run control: the button and its detail surface share one wrapper. */
.top-actions { flex-wrap: wrap; }
.top-actions > .run-progress-card {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}
.top-actions > .run-progress-card > #runBtn {
  position: relative;
  height: 48px;
  min-height: 48px;
  padding-inline: 18px;
  /* 与全局按钮圆角保持一致：这里原本是 999px 胶囊，优先级 (1,2,0) 会压过 .button 的 11px。 */
  border-radius: 11px;
  overflow: hidden;
  isolation: isolate;
}
.top-actions > .run-progress-card > #runBtn.is-active {
  color: var(--t1);
  background: color-mix(in srgb, var(--t1) 11%, var(--card));
  border-color: color-mix(in srgb, var(--t1) 18%, var(--line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--t1) 10%, transparent);
}
.top-actions > .run-progress-card > #runBtn.is-active:hover,
.top-actions > .run-progress-card > #runBtn.is-active:active {
  transform: none;
  filter: none;
  animation: none;
}
.top-actions > .run-progress-card > #runBtn.is-active[aria-disabled="true"] {
  cursor: progress;
  pointer-events: auto;
  user-select: none;
}
.top-actions > .run-progress-card > #runBtn .run-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  display: block !important;
  width: var(--run-progress, 0%);
  height: 100%;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--lime));
  opacity: .9;
  transition: width .25s ease;
}
.top-actions > .run-progress-card > #runBtn > :not(.run-progress-fill) { position: relative; z-index: 1; }
.top-actions > .run-progress-card > #runBtn.is-active .button-icon,
.top-actions > .run-progress-card > #runBtn.is-active #runButtonLabel { display: none; }
.top-actions > .run-progress-card > #runBtn.is-active #runProgressPercent { display: inline !important; }
.top-actions > .run-progress-card > #runBtn .run-progress-spinner {
  display: none;
  width: 14px;
  height: 14px;
}
.top-actions > .run-progress-card > #runBtn.is-loading .run-progress-spinner { display: inline-block; }
.top-actions > .run-progress-card > #runBtn.is-submitting .button-icon { display: none; }
@media (prefers-reduced-motion: reduce) {
  .top-actions > .run-progress-card > #runBtn .run-progress-spinner { animation: none; }
}

.top-actions > .run-progress-card > .run-progress-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(350px, calc(100vw - 30px));
  max-width: calc(100vw - 30px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.top-actions > .run-progress-card.is-active:not(.dismissed):hover > .run-progress-popover,
.top-actions > .run-progress-card.is-active:not(.dismissed):focus-within > .run-progress-popover,
.top-actions > .run-progress-card.is-active:not(.dismissed).manual-open > .run-progress-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.top-actions > .run-progress-card:not(.is-active) > .run-progress-popover { display: none; }
.top-actions > .run-progress-card.is-active > .run-progress-popover .run-status {
  display: block;
  margin: 5px 0 0;
  max-width: none;
  overflow: visible;
  white-space: normal;
}

/* Width follows the applied range, never the rendered text length. */
.top-actions > .cockpit-range-slot {
  flex: 0 0 245px;
  width: 245px;
  min-width: 235px;
  max-width: 255px;
}
.top-actions > .cockpit-range-slot.is-single-day {
  flex-basis: 245px;
  width: 245px;
  min-width: 235px;
  max-width: 255px;
}
.top-actions > .cockpit-range-slot.is-multi-day {
  flex-basis: 350px;
  width: 350px;
  min-width: 330px;
  max-width: 370px;
}
.top-actions > .cockpit-range-slot .range-picker,
.top-actions > .cockpit-range-slot .range-picker-toggle { width: 100%; }
.top-actions > .cockpit-range-slot .range-picker-toggle strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .top-actions > .cockpit-range-slot { order: 2; }
  .top-actions > #refreshBtn { order: 1; }
  .top-actions > .run-progress-card { order: 3; }
  .top-actions > .cockpit-range-slot.is-multi-day { flex-basis: 350px; }
}

@media (max-width: 760px) {
  .top-actions > .cockpit-range-slot,
  .top-actions > .cockpit-range-slot.is-single-day,
  .top-actions > .cockpit-range-slot.is-multi-day {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex-basis: auto;
  }
  .top-actions > .run-progress-card { width: auto; }
  .top-actions > #runProgressCard { grid-column: 2; grid-row: 1; justify-self: end; }
  .top-actions > .run-progress-card > .run-progress-popover {
    right: 0;
    width: min(350px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 500px) {
  .top-actions > .run-progress-card { width: auto; min-width: 0; }
  .top-actions > .run-progress-card > #runBtn.is-active #runProgressPercent { display: inline !important; }
  .top-actions > .run-progress-card > #runBtn .run-progress-fill { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  .top-actions > .run-progress-card > #runBtn .run-progress-fill,
  .top-actions > .run-progress-card > .run-progress-popover { transition: none; }
}
/* Protected administrator + WeChat login coordinator */
[hidden]{display:none!important}
.wechat-admin-card{margin-bottom:18px;padding:24px;display:grid;gap:18px}.wechat-admin-summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;padding:16px 18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.wechat-admin-summary strong{font-size:18px}.wechat-admin-summary span,.wechat-admin-summary small{color:var(--muted)}.wechat-admin-actions{flex-wrap:wrap}.wechat-bind-code{display:flex;align-items:center;gap:18px;padding:18px;border:1px dashed var(--lime);border-radius:16px;background:color-mix(in srgb,var(--lime) 9%,var(--surface))}.wechat-bind-code strong{font:800 32px/1 JetBrains Mono,monospace;letter-spacing:.18em}.wechat-bind-code span{color:var(--muted)}
.wechat-restart-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:13px 15px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);color:var(--muted);font-size:12px}.wechat-restart-status b{color:var(--text);font-weight:650}.wechat-restart-status small{flex-basis:100%;color:var(--muted)}
.auth-modal{max-width:520px}.auth-form{display:grid;gap:16px;padding:24px}.auth-form label{display:grid;gap:8px;font-weight:700}.auth-gate.open{z-index:990}.wechat-login-modal{width:min(720px,calc(100vw - 32px));max-height:90vh}.wechat-login-body{display:grid;gap:18px;padding:24px}.wechat-state-panel{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.wechat-state-dot{width:13px;height:13px;border-radius:50%;background:#ef7d31;box-shadow:0 0 0 6px color-mix(in srgb,#ef7d31 15%,transparent)}.wechat-state-dot.online{background:#28a745;box-shadow:0 0 0 6px color-mix(in srgb,#28a745 15%,transparent)}.wechat-state-panel p{margin:4px 0 0}.wechat-qr-wrap{display:grid;justify-items:center;gap:12px;padding:20px;border:1px solid var(--border);border-radius:18px;background:#fff;color:#111}.wechat-qr-wrap img{width:min(320px,70vw);aspect-ratio:1;object-fit:contain;image-rendering:auto}.wechat-login-actions{display:flex;flex-wrap:wrap;gap:10px}.admin-access{margin-bottom:4px}
.sidebar .service-dot.admin-access{width:100%;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;color:var(--muted);font:inherit;text-align:left;cursor:pointer;box-shadow:none;transform:none}.sidebar .service-dot.admin-access:hover{color:var(--text);background:transparent;transform:none;filter:none}.sidebar .service-dot.admin-access.online i{background:var(--green);box-shadow:0 0 12px color-mix(in srgb,var(--green) 65%,transparent)}
.wechat-top-status{display:inline-flex;align-items:center;gap:9px;white-space:nowrap}.wechat-top-status i{width:8px;height:8px;border-radius:50%;background:#ef7d31;box-shadow:0 0 0 5px color-mix(in srgb,#ef7d31 14%,transparent);flex:0 0 auto}.wechat-top-status.online i{background:#28a745;box-shadow:0 0 0 5px color-mix(in srgb,#28a745 14%,transparent)}.wechat-top-status.offline{color:var(--muted)}
@media(max-width:600px){.wechat-admin-actions .button,.wechat-login-actions .button{flex:1 1 44%}.wechat-bind-code{align-items:flex-start;flex-direction:column}.wechat-bind-code strong{font-size:26px}}
/* Local AI provider manager */
.ai-provider-settings{grid-column:1/-1;display:grid;gap:18px}
.settings-ai-primary{margin-bottom:18px}
.ai-provider-current{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border:1px solid var(--border);border-radius:18px;background:var(--soft);min-height:76px}
.ai-provider-current>div{display:grid;gap:4px}.ai-provider-current small,.ai-provider-current span{color:var(--muted)}
.ai-provider-current strong{font-size:18px}.ai-provider-dot{width:12px;height:12px;border-radius:50%;background:var(--orange);box-shadow:0 0 0 6px color-mix(in srgb,var(--orange) 14%,transparent)}
.ai-provider-dot.ready{background:var(--lime);box-shadow:0 0 0 6px color-mix(in srgb,var(--lime) 18%,transparent)}
.ai-provider-list{display:grid;gap:10px}
.ai-provider-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;border:1px solid color-mix(in srgb,var(--muted) 34%,var(--line));border-radius:14px;background:var(--card);box-shadow:none;transform:none;transition:none}
.ai-provider-item.active,.ai-provider-item:hover{border-color:color-mix(in srgb,var(--muted) 34%,var(--line));background:var(--card);box-shadow:none;transform:none}
.ai-provider-main{min-width:0;display:grid;gap:5px}.ai-provider-main>div{display:flex;align-items:center;gap:8px}.ai-provider-main p,.ai-provider-main small{margin:0;color:var(--muted);overflow-wrap:anywhere}.ai-provider-main em{color:var(--orange);font-style:normal;font-size:12px}
.ai-provider-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex:0 0 auto}
.button.danger{color:#d84141;border-color:color-mix(in srgb,#d84141 35%,var(--border))}
.ai-provider-modal{width:min(760px,calc(100vw - 32px))}.ai-provider-form{padding:22px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.ai-provider-form label{display:grid;gap:7px;color:var(--muted);font-size:13px}.ai-provider-form select{width:100%}.ai-provider-wide{grid-column:1/-1}.ai-provider-clear{display:flex!important;grid-auto-flow:column;justify-content:start;align-items:center;grid-template-columns:auto 1fr!important}.ai-provider-clear input{accent-color:var(--lime)}
@media(max-width:760px){.ai-provider-item{align-items:flex-start;flex-direction:column}.ai-provider-actions{justify-content:flex-start}.ai-provider-form{grid-template-columns:1fr}.ai-provider-wide{grid-column:auto}.ai-provider-settings .panel-title{align-items:flex-start;flex-direction:column}}

/* Unified settings page: status first, editable options behind disclosure rows. */
#view-settings{display:none;gap:24px}
#view-settings.active{display:grid}
#view-settings>.section-head{margin-bottom:0}
.settings-status-section,.settings-advanced-section{display:grid;gap:14px}
.settings-subhead{display:flex;align-items:end;justify-content:space-between;gap:24px;padding:0 2px}
.settings-subhead h3{margin:0;font-size:19px}
.settings-subhead>p{max-width:560px;margin:0;color:var(--muted);font-size:12px;text-align:right}
.settings-status-grid{display:grid;grid-template-columns:minmax(240px,1fr) minmax(240px,1fr) minmax(420px,1.65fr);gap:14px;align-items:stretch}
.settings-status-card{position:relative;min-width:0;min-height:168px;padding:20px!important;display:flex;flex-direction:column;gap:16px}
.settings-status-card-head{display:flex;align-items:center;gap:11px;min-width:0}
.settings-status-card-head>div{display:grid;gap:2px;min-width:0}
.settings-status-card-head small{color:var(--muted);font-size:11px;letter-spacing:.08em}
.settings-status-card-head strong{font-size:20px;line-height:1.2;letter-spacing:-.02em}
.settings-status-card-head>.chip{position:absolute;top:18px;right:18px;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-advanced-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;color:#65706b}
.settings-advanced-icon .icon{width:21px;height:21px}
.settings-card-icon{display:block;width:21px;height:21px;background:currentColor;-webkit-mask:var(--settings-icon) center/contain no-repeat;mask:var(--settings-icon) center/contain no-repeat}
.settings-advanced-icon.wechat{color:#13993c}
.settings-advanced-icon.mapping{color:#4c6e77}
.settings-advanced-icon.home{color:#8b6f52}
.settings-status-card .ai-provider-current{min-height:0;padding:0;border:0;border-radius:0;background:transparent;align-items:end;flex:1}
.settings-status-card .ai-provider-current>div{gap:5px}
.settings-status-card .ai-provider-current strong{display:block;max-width:100%;font-size:16px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-status-card .ai-provider-current .ai-provider-dot{width:10px;height:10px;flex:0 0 10px}
.settings-status-card .wechat-admin-summary{padding:0;border:0;border-radius:0;background:transparent;gap:5px 10px;align-content:end;flex:1}
.settings-status-card .wechat-admin-summary strong{font-size:17px}
.settings-status-card .wechat-admin-summary small{flex-basis:100%}
.settings-status-services{min-height:168px}
.settings-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;margin-top:auto}
.settings-service-grid .service-line{min-width:0;padding:6px 0;border:0;font-size:11px;gap:10px}
.settings-service-grid .service-line span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-service-grid .service-line b{white-space:nowrap}
.settings-advanced-list{display:grid;gap:10px}
.settings-advanced-list .account-settings{margin:0}
.account-settings .settings-advanced-body>.row-actions{justify-content:flex-end}
.settings-home-card{min-height:82px;padding:17px 20px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px}
.settings-home-copy{min-width:0}
.settings-home-copy strong{font-size:15px}
.settings-home-control{display:block;min-width:220px}
.settings-home-control select{width:100%;min-width:0;min-height:42px}
.settings-advanced-card{padding:0!important;overflow:visible}
.settings-advanced-card>summary{list-style:none;min-height:82px;padding:17px 20px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;cursor:pointer;user-select:none;border-radius:inherit;transition:background .2s ease,box-shadow .2s ease}
.settings-advanced-card>summary::-webkit-details-marker{display:none}
.settings-advanced-card>summary:hover{background:color-mix(in srgb,var(--lime) 5%,transparent)}
.settings-advanced-card>summary>span:nth-child(2){display:grid;gap:4px}
.settings-advanced-card>summary strong{font-size:15px}
.settings-advanced-card>summary small{color:var(--muted);font-size:12px;font-weight:500}
.settings-advanced-card>summary>i{width:11px;height:11px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s ease;margin-right:5px}
.settings-advanced-card[open]>summary>i{transform:rotate(225deg) translate(-2px,-2px)}
.settings-advanced-card[open]>summary{background:color-mix(in srgb,var(--lime) 4%,transparent)}
.settings-advanced-body{padding:20px;border-top:1px solid var(--border);display:grid;gap:16px}
.settings-advanced-body>.panel-title{align-items:center}
.settings-advanced-body>.panel-title p{max-width:720px}
.settings-advanced-body .ai-provider-list{gap:10px}
.settings-advanced-body .mapping-list:empty{display:none}
.wecom-target-list{display:grid;gap:9px;max-height:240px;overflow:auto;padding:12px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--panel) 86%,transparent)}.wecom-target-option{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--panel)}.wecom-target-option small{display:block;margin-top:3px;color:var(--muted);overflow-wrap:anywhere}.wecom-settings-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.wecom-settings-head h4{margin:0 0 4px}.wecom-settings-head p{margin:0}.wecom-settings-preview{min-height:220px;max-height:360px;margin:0}.wecom-settings-preview+.row-actions{justify-content:flex-end}
@media(max-width:1180px){.settings-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-status-services{grid-column:1/-1}}
@media(max-width:760px){.settings-subhead{align-items:flex-start;flex-direction:column;gap:5px}.settings-subhead>p{text-align:left}.settings-status-grid{grid-template-columns:1fr}.settings-status-services{grid-column:auto}.settings-service-grid{grid-template-columns:1fr}.settings-advanced-card>summary{min-height:74px;padding:14px}.settings-advanced-body{padding:15px}.settings-advanced-body>.panel-title{align-items:flex-start;flex-direction:column}.settings-advanced-body>.panel-title .button{width:100%}}
@media(max-width:760px){.settings-home-card{min-height:74px;padding:14px;grid-template-columns:auto minmax(0,1fr) minmax(132px,42%);gap:10px}.settings-home-control{min-width:0}.settings-home-control select{min-height:40px}}

/* Unified compact select controls */
.ui-select{position:relative;display:inline-flex;min-width:0;width:100%;vertical-align:middle}
.ui-select-native{display:none!important;position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;pointer-events:none!important}
.ui-select-trigger{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;min-height:42px;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--text);font:inherit;font-weight:650;text-align:left;cursor:pointer;box-shadow:0 5px 18px color-mix(in srgb,var(--text) 5%,transparent);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease}
.ui-select-trigger:hover{border-color:color-mix(in srgb,var(--lime) 58%,var(--line));box-shadow:0 8px 24px color-mix(in srgb,var(--lime) 14%,transparent);transform:translateY(-1px)}
.ui-select-trigger:focus-visible{outline:3px solid color-mix(in srgb,var(--lime) 30%,transparent);outline-offset:2px;border-color:var(--lime)}
.ui-select.is-open .ui-select-trigger{border-color:var(--lime);box-shadow:0 0 0 3px color-mix(in srgb,var(--lime) 16%,transparent),0 10px 28px color-mix(in srgb,var(--lime) 14%,transparent);background:color-mix(in srgb,var(--lime) 4%,var(--card))}
.ui-select.is-disabled{opacity:.55}.ui-select.is-disabled .ui-select-trigger{cursor:not-allowed;transform:none;box-shadow:none}
.ui-select-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-select-value.has-icon{display:flex;align-items:center;gap:7px}.ui-select-value-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-leading-icon{display:block;flex:0 0 20px;width:20px;height:20px;color:currentColor}.ui-select-option.has-icon{grid-template-columns:30px minmax(0,1fr) 18px}.ui-select-option.has-icon.has-status{grid-template-columns:30px minmax(0,1fr) auto 18px}.ui-select-option.has-icon>.ui-select-leading-icon{width:24px;height:24px;padding:3px;border:1px solid currentColor;border-radius:8px}.ui-select-option-copy{display:grid;gap:2px;min-width:0}.ui-select-option-copy strong,.ui-select-option-copy small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-option-copy strong{font-size:13px}.ui-select-option-copy small{color:var(--muted);font-size:10px;font-weight:500}.ui-select-option.is-selected .ui-select-option-copy small{color:currentColor;opacity:.72}
.ui-select-chevron{display:grid;place-items:center;width:18px;height:18px;flex:0 0 18px;transform-origin:center;transition:transform .2s ease,color .18s ease;color:var(--muted)}
.ui-select-chevron svg{display:block;width:16px;height:16px;overflow:visible}.ui-select-chevron path{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ui-select.is-open .ui-select-chevron{transform:rotate(180deg) scale(.82);color:var(--text)}
.ui-select-menu{position:fixed;z-index:1000;display:grid;gap:3px;padding:7px;overflow:auto;overscroll-behavior:contain;border:1px solid color-mix(in srgb,var(--lime) 24%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--card) 97%,transparent);box-shadow:0 20px 55px color-mix(in srgb,#111 20%,transparent),0 0 0 1px color-mix(in srgb,var(--t1) 8%,transparent);backdrop-filter:blur(18px);animation:ui-select-in .16s ease-out}
.ui-select-menu[hidden]{display:none!important}
.ui-select-menu.opens-above{transform-origin:bottom center}
.ui-select-option{display:grid;grid-template-columns:minmax(0,1fr) 18px;align-items:center;gap:10px;width:100%;min-height:39px;padding:8px 10px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text);font:inherit;font-size:13px;font-weight:600;text-align:left;cursor:pointer;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.ui-select-option.has-status{grid-template-columns:minmax(0,1fr) auto 18px}.ui-select-value.has-status{display:flex;align-items:center;gap:8px}.ui-select-value.has-status>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-status{display:inline-flex;min-height:22px;flex:0 0 auto;align-items:center;padding:1px 7px;border:1px solid currentColor;border-radius:999px;background:var(--card);font-size:10px;font-style:normal;font-weight:800;line-height:1}.ui-select-status.online{border-color:color-mix(in srgb,var(--green) 58%,var(--line));background:color-mix(in srgb,var(--green) 10%,var(--card));color:var(--green)}.ui-select-status.offline{border-color:color-mix(in srgb,var(--danger) 58%,var(--line));background:color-mix(in srgb,var(--danger) 10%,var(--card));color:var(--danger)}
.ui-select-option span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-select-option i{opacity:0;color:#17200b;font-style:normal;font-weight:900;text-align:center}
.ui-select-option:hover,.ui-select-option:focus-visible{outline:none;background:color-mix(in srgb,var(--lime) 12%,var(--surface-soft));border-color:color-mix(in srgb,var(--lime) 35%,transparent);box-shadow:0 5px 16px color-mix(in srgb,var(--lime) 12%,transparent);transform:translateX(2px)}
.ui-select-option.is-selected{background:var(--lime);border-color:var(--lime);color:#17200b;box-shadow:0 7px 20px color-mix(in srgb,var(--lime) 28%,transparent)}
.ui-select-option.is-selected i{opacity:1}.ui-select-option:disabled{opacity:.42;cursor:not-allowed;transform:none;box-shadow:none}
.ui-select-group{padding:9px 10px 4px;color:var(--muted);font:700 10px/1 Inter,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.ui-select-group.has-icon{display:flex;align-items:center;gap:7px;color:var(--text);letter-spacing:.08em}.ui-select-group.has-icon .ui-select-leading-icon{width:17px;height:17px}
.model-select:has(.ui-select){height:42px;padding:0 12px;align-items:center;gap:8px;border-radius:12px;background:var(--card);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.model-select:has(.ui-select):hover,.model-select:has(.ui-select.is-open){border-color:color-mix(in srgb,var(--lime) 58%,var(--line));box-shadow:0 8px 24px color-mix(in srgb,var(--lime) 12%,transparent)}
.model-select .ui-select{width:auto;min-width:132px}.model-select .ui-select-trigger{min-height:32px;padding:0 0 0 3px;border:0;background:transparent;box-shadow:none}.model-select .ui-select-trigger:hover,.model-select .ui-select.is-open .ui-select-trigger{transform:none;box-shadow:none;background:transparent}
.library-filter:has(.ui-select){height:42px;min-width:max-content;gap:8px;padding:0 10px;white-space:nowrap}.library-filter .ui-select{width:auto;min-width:104px}.library-filter .ui-select-trigger{min-height:32px;padding:0 2px 0 4px;border:0;background:transparent;box-shadow:none}.library-filter .ui-select-trigger:hover,.library-filter .ui-select.is-open .ui-select-trigger{transform:none;box-shadow:none;background:transparent}
.title-fission-controls .ui-select{width:100%}
@keyframes ui-select-in{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:620px){.ui-select-menu{max-width:calc(100vw - 24px)}.ui-select-option span{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.45}.ui-select-option .ui-select-option-copy{display:grid;-webkit-line-clamp:unset}.model-select .ui-select{min-width:132px}}
@media(prefers-reduced-motion:reduce){.ui-select-trigger,.ui-select-chevron,.ui-select-option{transition:none!important}.ui-select-menu{animation:none!important}.ui-select-trigger:hover,.ui-select-option:hover{transform:none!important}}

/* Sidebar account entry and profile menu */
.auth-locked .shell{visibility:visible}
.public-dashboard #refreshBtn,.public-dashboard #runProgressCard,.public-dashboard #pendingVideosBtn,.public-dashboard .hero-status-strip,.public-dashboard .dashboard-bottom{display:none!important}
.sidebar-account{position:relative;margin:0 0 8px}
.sidebar-app-version{display:block;margin:7px 8px 0;padding:0 4px;overflow:hidden;color:var(--t3);font:500 10px/18px var(--font-cjk);letter-spacing:.06em;text-align:center;text-overflow:ellipsis;white-space:nowrap;user-select:text}
.sidebar-app-version:hover{color:var(--t2)}
@media(min-width:761px){
  #workspaceSidebar{padding-bottom:8px}
  #workspaceSidebar .sidebar-account{margin-bottom:0}
  #workspaceSidebar .sidebar-app-version{margin-top:3px;line-height:14px}
}
.sidebar-account-trigger{display:grid;grid-template-columns:36px minmax(0,1fr) 18px;align-items:center;gap:10px;width:100%;min-height:58px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--orange) 72%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--card) 94%,transparent);color:var(--t1);font:inherit;text-align:left;cursor:pointer;box-shadow:0 8px 24px color-mix(in srgb,var(--orange) 7%,transparent);transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}
.sidebar-account-trigger:hover,.sidebar-account-trigger[aria-expanded="true"]{border-color:var(--orange);background:color-mix(in srgb,var(--orange-soft) 32%,var(--card));box-shadow:0 10px 28px color-mix(in srgb,var(--orange) 12%,transparent)}
.sidebar-account-trigger.is-login{display:flex;justify-content:center;min-height:40px;padding:8px 12px;color:var(--orange);text-align:center;box-shadow:none}
.sidebar-account-trigger.is-login .sidebar-account-avatar,.sidebar-account-trigger.is-login .sidebar-account-chevron{display:none}
.sidebar-account-trigger.is-login .sidebar-account-copy{display:block;flex:none}
.sidebar-account-trigger.is-login .sidebar-account-copy strong{color:var(--orange);font-size:12px;font-weight:700}
.sidebar-account-avatar{position:relative;display:grid;place-items:center;width:36px;height:36px;border:1px solid color-mix(in srgb,var(--orange) 18%,var(--line));border-radius:50%;background:linear-gradient(145deg,#fff2e7,#f0d8c7);color:#8b4b29;font-size:14px;font-weight:850;box-shadow:inset 0 0 0 2px color-mix(in srgb,#fff 68%,transparent)}
[data-theme="dark"] .sidebar-account-avatar{background:linear-gradient(145deg,#503424,#2b241d);color:#ffd7bd}
.sidebar-account-avatar i{position:absolute;right:-1px;bottom:1px;width:8px;height:8px;border:2px solid var(--sidebar);border-radius:50%;background:var(--green);box-shadow:0 0 7px color-mix(in srgb,var(--green) 45%,transparent)}
.sidebar-account-copy{display:grid;gap:3px;min-width:0}
.sidebar-account-copy strong,.sidebar-account-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-account-copy strong{color:var(--t1);font-size:13px;font-weight:750}
.sidebar-account-copy small{color:var(--t2);font-size:10.5px}
.sidebar-account-chevron{display:block;width:15px;height:15px;flex:0 0 15px;overflow:visible;fill:currentColor;stroke:none;color:var(--t2);transform:rotate(0deg);transition:transform .18s ease}
.sidebar-account-trigger[aria-expanded="true"] .sidebar-account-chevron{transform:rotate(180deg)}
.account-popover{position:absolute;left:0;right:0;bottom:calc(100% + 9px);z-index:80;padding:7px;border:1px solid var(--line);border-radius:13px;background:var(--card);box-shadow:0 18px 50px rgba(17,19,15,.16)}
.account-popover[hidden]{display:none}
.account-popover-head{display:grid;gap:3px;padding:9px 10px 11px;border-bottom:1px solid var(--line);margin-bottom:5px}
.account-popover-head strong{overflow:hidden;color:var(--t1);font-size:14px;text-overflow:ellipsis;white-space:nowrap}
.account-popover-head small{overflow:hidden;color:var(--t3);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.account-popover button{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--t2);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.account-popover button[hidden]{display:none}
.account-popover button:hover,.account-popover button:focus-visible{outline:0;background:var(--orange-soft);color:var(--orange)}
.account-popover button span{display:grid;place-items:center;width:18px;color:var(--t3);font-size:14px;line-height:1}
.account-popover #themeToggleLabel{color:inherit;font:inherit;font-weight:inherit}
.account-popover .account-theme-icon{font-size:16px;line-height:1}
.account-popover .account-menu-logout{margin-top:5px;border-top:1px solid var(--line);border-radius:0 0 8px 8px;color:var(--danger)}
.display-name-modal{max-width:480px}
@media(max-width:1100px) and (min-width:761px){.sidebar-account-trigger:not(.is-login){display:flex;justify-content:center;padding:8px}.sidebar-account-trigger:not(.is-login) .sidebar-account-copy,.sidebar-account-trigger:not(.is-login) .sidebar-account-chevron{display:none}.account-popover{position:fixed;left:86px;right:auto;bottom:20px;width:190px}}
@media(max-width:1100px) and (min-width:761px){.sidebar-app-version{margin-inline:0;font-size:9px;letter-spacing:.03em}}
@media(max-width:760px){.auth-locked .sidebar{display:flex;top:0;bottom:0;height:100vh;padding:24px 20px;flex-direction:column;border:0;background:var(--sidebar)}.auth-locked .brand{display:flex!important}.auth-locked .sidebar-foot{display:block!important;width:100%;margin-top:auto}.auth-locked .sidebar-account{display:block}.auth-locked .sidebar .nav-item[data-view="settings"]{display:none!important}}
.sidebar .sidebar-foot .nav-item[data-view="settings"]{display:none!important}
.sidebar-account-trigger{outline:none}
.sidebar-account-trigger:focus-visible{border-color:var(--orange);box-shadow:0 0 0 2px color-mix(in srgb,var(--orange) 20%,transparent)}

/* Unified password field: visibility control and Caps Lock feedback */
.password-input-wrap{position:relative;display:block;width:100%;min-width:0}
.password-input-wrap>.input{display:block;width:100%;padding-right:86px}
.password-visibility-toggle{position:absolute!important;z-index:2;top:0;right:7px;bottom:0;display:grid;place-items:center;width:34px;height:34px;margin:auto 0!important;padding:0;border:0;border-radius:9px;background:transparent;color:var(--t3);cursor:pointer;transform:none!important;animation:none!important;filter:none!important;will-change:auto!important;transition:color .18s ease,background-color .18s ease,border-color .18s ease!important}
.password-visibility-toggle:hover,.password-visibility-toggle:focus-visible,.password-visibility-toggle:active{outline:0;background:var(--orange-soft);color:var(--orange);transform:none!important;animation:none!important;filter:none!important}
.password-visibility-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.password-caps-hint{position:absolute;z-index:2;top:0;right:45px;bottom:0;display:grid;width:30px;height:30px;margin:auto 0;place-items:center;color:var(--orange);line-height:1}
.password-caps-hint::before{content:"⇧";display:grid;width:26px;height:26px;place-items:center;border-radius:8px;background:var(--orange-soft);font-size:14px;font-weight:800}
.password-caps-hint[hidden]{display:none}

/* Cards use their border and spacing without decorative accent strips. */
.metric-card::before { content: none; display: none; }

/* Batch transcription: visual preparation counts. */
#batchTranscribeModal header > div { min-width:0; flex:1; }
.batch-transcribe-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:16px; }
.batch-transcribe-summary:has(> :nth-child(4)) { grid-template-columns:repeat(4,minmax(0,1fr)); }
.batch-transcribe-metric { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--elevated); }
.batch-transcribe-metric span { color:var(--t2); font-size:13px; white-space:nowrap; }
.batch-transcribe-metric strong { color:var(--t1); font:600 26px/1.15 var(--font-latin); font-variant-numeric:tabular-nums; }
.batch-transcribe-metric.is-total { border-color:color-mix(in srgb,var(--orange) 28%,var(--line)); background:var(--orange-soft); }
.batch-transcribe-metric.is-total strong { color:var(--orange); }
@media(max-width:760px) { .batch-transcribe-summary { gap:6px; margin-top:12px; } .batch-transcribe-metric { flex-direction:column; align-items:flex-start; gap:6px; padding:10px; } .batch-transcribe-metric span { font-size:12px; } .batch-transcribe-metric strong { font-size:24px; } }

/* Batch entries: symmetric match panel and aligned title/metadata rows. */
#batchTranscribeModal .batch-transcribe-entry { gap:14px; padding:16px; }
#batchTranscribeModal .batch-transcribe-entry-head { display:grid; grid-template-columns:60px minmax(0,1fr); align-items:start; gap:12px; }
#batchTranscribeModal .batch-transcribe-rank { display:inline-flex; align-items:center; justify-content:center; width:100%; box-sizing:border-box; min-height:24px; padding:4px 8px; font-size:12px; line-height:1.3; }
#batchTranscribeModal .batch-transcribe-entry-copy { display:grid; gap:8px; }
#batchTranscribeModal .batch-transcribe-entry-title { padding:0; font-size:14px; font-weight:600; line-height:1.6; }
#batchTranscribeModal .batch-transcribe-entry-meta { display:flex; align-items:center; justify-content:flex-end; gap:12px; min-width:0; }
#batchTranscribeModal .batch-transcribe-entry-author { flex:0 1 auto; min-width:0; max-width:65%; padding:3px 8px; font-size:12px; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#batchTranscribeModal .batch-transcribe-entry-state { flex:0 1 auto; min-width:0; max-width:50%; font-size:12px; line-height:1.5; text-align:right; }
#batchTranscribeModal .batch-transcribe-match { margin:0; padding:14px; }
#batchTranscribeModal .batch-transcribe-ready { margin:0; }
#batchTranscribeModal .batch-transcribe-search { align-items:stretch; }
#batchTranscribeModal .batch-transcribe-search > .input, #batchTranscribeModal .batch-transcribe-search > .button { min-height:38px; height:38px; margin:0; }
#batchTranscribeModal .batch-transcribe-candidate { display:grid; grid-template-columns:24px minmax(0,1fr) 64px; gap:10px; align-items:center; padding:12px; }
#batchTranscribeModal .batch-transcribe-candidate-index, #batchTranscribeModal .batch-transcribe-candidate-copy small, #batchTranscribeModal .batch-transcribe-candidate b { font-size:12px; }
#batchTranscribeModal .batch-transcribe-candidate b { text-align:right; }
@media(max-width:760px) {
  #batchTranscribeModal .batch-transcribe-entry { padding:12px; }
  #batchTranscribeModal .batch-transcribe-entry-head { gap:8px; }
  #batchTranscribeModal .batch-transcribe-entry-meta { flex-wrap:wrap; gap:6px 10px; }
  #batchTranscribeModal .batch-transcribe-entry-author, #batchTranscribeModal .batch-transcribe-entry-state { max-width:100%; }
  #batchTranscribeModal .batch-transcribe-entry-state { margin-left:auto; }
  #batchTranscribeModal .batch-transcribe-match { padding:12px; }
  #batchTranscribeModal .batch-transcribe-candidate { grid-template-columns:20px minmax(0,1fr) 56px; gap:8px; padding:10px; }
}

/* Rank, title and author remain on one line. */
#batchTranscribeModal .batch-transcribe-entry-head { align-items:center; }
#batchTranscribeModal .batch-transcribe-entry-copy { display:flex; align-items:center; flex-wrap:nowrap; gap:12px; }
#batchTranscribeModal .batch-transcribe-entry-title { flex:1 1 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#batchTranscribeModal .batch-transcribe-entry-meta { flex:0 1 auto; max-width:40%; flex-wrap:nowrap; }
#batchTranscribeModal .batch-transcribe-entry-author { max-width:100%; }
@media(max-width:760px) { #batchTranscribeModal .batch-transcribe-entry-copy { gap:8px; } }

/* Standalone batch progress dialog; interactions remain in interaction.css. */
#batchTranscribeProgressModal .batch-transcribe-progress-card { position:relative; width:min(420px,calc(100vw - 32px)); overflow:visible; }
#batchTranscribeProgress { display:grid; justify-items:center; width:100%; }
.batch-progress-collapse { position:absolute; top:12px; right:12px; }

.wx-profile-video-rows { display:contents; }
.wx-profile-pager { padding:4px 0; text-align:center; overflow-anchor:none; }
