:root {
  color-scheme: light;
  --tblr-primary: #087f5b;
  --tblr-primary-rgb: 8, 127, 91;
  --tblr-link-color-rgb: 8, 127, 91;
  --tblr-link-hover-color-rgb: 6, 108, 78;
  --tblr-body-font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  --tblr-body-bg: #f4f7f6;
  --tblr-body-color: #18231f;
  --tblr-border-color: #dfe8e4;
  --tblr-border-radius: 9px;
  --tblr-border-radius-lg: 14px;
  --page: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --text: #18231f;
  --muted: #66756f;
  --line: #dfe8e4;
  --accent: #087f5b;
  --accent-hover: #066c4e;
  --accent-soft: #e5f7f0;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warning: #8a5b00;
  --warning-soft: #fff7df;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { max-width: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
}

button, input, select { font: inherit; }
:where(button, input, select):focus-visible {
  outline: 3px solid rgba(8, 127, 91, .28);
  outline-offset: 2px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 10%, rgba(8, 127, 91, .08), transparent 34%),
    var(--page);
}
.login-card {
  width: min(380px, 100%);
  display: grid;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(28, 61, 50, .09);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}
.login-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}
.login-title {
  margin: 2px 0 0;
  font-size: 1.45rem;
  font-weight: 780;
  letter-spacing: -.025em;
}
.login-fields { display: grid; gap: 8px; }
.login-fields label {
  margin-top: 4px;
  color: #52635d;
  font-size: .78rem;
  font-weight: 700;
}
.login-card input { min-height: 44px; }
.login-card .primary { min-height: 44px; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-main,
.module-nav,
.workspace {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

.header-main {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.header-brand-group { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.redis-admin-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--accent); font-size: .78rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.redis-admin-link:hover { background: var(--accent-soft); border-color: #b5dece; }
.redis-admin-link:focus-visible { outline: 3px solid rgba(8, 127, 91, .28); outline-offset: 2px; }
.brand strong { font-size: 1.05rem; letter-spacing: -.015em; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.center-instance {
  color: #075f47;
  background: var(--accent-soft);
  border: 1px solid #c7e9dc;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}
.session-username { color: #34443e; font-size: .84rem; font-weight: 700; }
.machine-id-value { display: inline-block; margin-right: 7px; vertical-align: middle; }
.login-instance {
  margin: -4px 0 10px;
  color: #557068;
  font-size: .76rem;
  text-align: center;
}
.muted { color: var(--muted); font-size: .78rem; }

.ai-chat-body { display: grid; gap: 18px; padding: 20px; }
.ai-chat-explainer { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #cce7dc; border-radius: 12px; background: #f0faf6; }
.ai-chat-explainer strong { white-space: nowrap; color: #076e51; }
.ai-chat-explainer span { color: #52665f; font-size: .82rem; line-height: 1.6; }
.ai-chat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ai-chat-column-external { grid-column: 1 / -1; }
.ai-chat-column { min-width: 0; display: grid; grid-template-rows: auto minmax(360px, 1fr) auto; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-soft); }
.ai-chat-column-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ai-chat-column-heading h3 { margin: 3px 0 0; font-size: 1rem; }
.ai-chat-kicker { color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.ai-chat-messages { height: min(52vh, 560px); min-height: 360px; overflow-y: auto; padding: 18px; }
.ai-chat-empty { height: 100%; min-height: 260px; display: grid; place-content: center; gap: 7px; color: var(--muted); text-align: center; }
.ai-chat-empty strong { color: #40534c; }
.ai-chat-message { width: min(88%, 620px); margin: 0 0 14px; padding: 12px 14px; border: 1px solid #d8e5e0; border-radius: 13px 13px 13px 4px; background: #fff; box-shadow: 0 4px 14px rgba(35, 73, 60, .04); }
.ai-chat-message.user { margin-left: auto; border-color: #bfe2d5; border-radius: 13px 13px 4px 13px; background: #e9f8f2; }
.ai-chat-message.error { border-color: #f1c3bd; background: var(--danger-soft); }
.ai-chat-message > span { display: block; margin-bottom: 5px; color: var(--accent); font-size: .7rem; font-weight: 800; }
.ai-chat-message > p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.ai-chat-message > small { display: block; margin-top: 8px; color: var(--muted); }
.ai-chat-actions { display: grid; gap: 7px; margin-top: 10px; }
.ai-chat-actions > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 10px; border-radius: 9px; background: #f3f8f6; }
.ai-chat-actions span { color: #52665f; font-size: .74rem; }
.ai-chat-actions p { grid-column: 1 / -1; margin: 0; color: #52665f; font-size: .78rem; }
.laya-score-panel { display: grid; gap: 8px; margin: 12px 0; }
.laya-score-panel > h4 { margin: 0; font-size: .8rem; color: #253d35; }
.laya-score-card { display: grid; gap: 7px; padding: 10px 12px; border: 1px solid #d7e4df; border-left: 4px solid #b8c6c1; border-radius: 10px; background: #f8fbfa; }
.laya-score-card.passed { border-left-color: var(--accent); background: #f0faf6; }
.laya-score-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.laya-score-values { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.laya-score-values span { padding: 6px 7px; border-radius: 7px; background: #eaf2ef; color: #354d45; font-size: .72rem; text-align: center; }
.laya-score-reason { margin: 0; color: var(--muted); font-size: .74rem; }
.ai-chat-raw { margin-top: 9px; color: #53665f; font-size: .75rem; }
.ai-chat-raw summary { cursor: pointer; font-weight: 700; }
.ai-chat-raw pre { max-height: 240px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 8px; background: #13201c; color: #e8f4ef; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-chat-composer { display: grid; gap: 9px; padding: 15px 18px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.ai-chat-composer label { color: #41544d; font-size: .78rem; font-weight: 750; }
.ai-chat-composer textarea, .ai-chat-composer select { width: 100%; padding: 11px 12px; border: 1px solid #cbd9d4; border-radius: 10px; color: var(--text); background: #fff; font: inherit; line-height: 1.55; }
.ai-chat-composer textarea { min-height: 84px; resize: vertical; }
.ai-chat-composer textarea:focus, .ai-chat-composer select:focus { outline: 3px solid rgba(8, 127, 91, .18); border-color: #6eb9a0; }
.ai-chat-composer > div { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.ai-chat-composer > div > span { margin-right: auto; color: var(--muted); font-size: .72rem; }

@media (max-width: 900px) {
  .ai-chat-grid { grid-template-columns: 1fr; }
  .ai-chat-column-external { grid-column: auto; }
  .ai-chat-explainer { align-items: flex-start; flex-direction: column; }
  .ai-chat-column { grid-template-rows: auto minmax(320px, 1fr) auto; }
  .laya-score-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.module-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding-bottom: 8px;
}

.video-upload-panel { margin-bottom: 20px; }
.video-upload-panel .panel-heading p { margin: 7px 0 0; }
.video-upload-form { display: flex; align-items: center; gap: 20px; }
.video-file-picker { display: grid; gap: 10px; flex: 1; min-width: 0; padding: 20px; border: 1px dashed #a7cfc4; border-radius: 14px; background: #f5faf8; }
.video-file-picker input { max-width: 100%; }
.video-upload-actions { display: flex; flex-direction: column; gap: 10px; min-width: 155px; }
.video-upload-actions .primary { padding: 14px 24px; white-space: nowrap; }
.video-audio-option { display: flex; align-items: flex-start; gap: 10px; padding-top: 12px; border-top: 1px solid #dce8e4; cursor: pointer; }
.video-audio-option input { width: 18px; height: 18px; margin: 2px 0; accent-color: #09896b; flex-shrink: 0; }
.video-audio-option span { display: grid; gap: 5px; }
.video-audio-option small { color: #657774; line-height: 1.6; }
.video-transfer-progress { margin-top: 16px; padding: 14px 18px; border-radius: 10px; background: #eff8f4; color: #087358; }
.video-transfer-progress progress { display: block; width: 100%; margin-top: 9px; height: 8px; accent-color: #09896b; }
.video-history-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
.video-history-master { border: 1px solid #dce8e4; border-radius: 14px; background: #f8fbfa; overflow: hidden; }
.video-history-list { padding: 10px; height: 580px; overflow-y: auto; }
.video-history-item { display: flex; flex-wrap: wrap; gap: 9px; width: 100%; padding: 14px; margin-bottom: 8px; text-align: left; border: 1px solid transparent; border-radius: 10px; background: white; }
.video-history-item strong { flex: 1; min-width: 90px; overflow-wrap: anywhere; }
.video-history-item small { width: 100%; font-size: 11px; line-height: 1.7; }
.video-history-item.selected { border-color: #49ab90; background: #eaf7f2; }
.video-history-item:hover { border-color: #91c8b8; }
.video-history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-top: 1px solid #dce8e4; }
.video-detail { min-width: 0; }
.video-detail-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.video-detail-heading h3 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.video-detail-heading p { margin: 7px 0 16px; }
.video-detail progress { display: block; width: 100%; height: 8px; accent-color: #09896b; }
.video-job-message { overflow-wrap: anywhere; line-height: 1.7; }
.video-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0; }
.video-download { display: inline-block; border: 1px solid #d4e4de; border-radius: 9px; padding: 8px 12px; text-decoration: none; color: #087358; font-size: 13px; }
.video-transcript { height: 370px; overflow-y: auto; padding: 22px; border-radius: 14px; background: #f5f9f7; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2; font-size: 16px; }
.video-status-failed { background: #fff0ee; color: #b32922; }
.video-status-cancelled, .video-status-queued, .video-status-paused { background: #eef1f1; color: #657774; }
@media (max-width: 850px) {
  .video-history-layout { grid-template-columns: 1fr; }
  .video-history-list { height: 250px; }
  .video-upload-form { align-items: stretch; flex-direction: column; }
}
.nav-tab {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: #52635d;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.nav-tab:hover { color: var(--text); background: var(--surface-soft); }
.nav-tab.active { color: #076b4d; background: var(--accent-soft); }

.workspace { padding: 18px 0 38px; }
.module-view[hidden] { display: none !important; }
.module-view.active { display: block; }
.home-grid,
.asr-grid { display: grid; grid-template-columns: minmax(320px, .7fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.broadcaster-grid { display: grid; grid-template-columns: minmax(320px, .7fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--tblr-border-color, var(--line));
  border-radius: var(--tblr-border-radius-lg, 14px);
  background: var(--tblr-bg-surface, var(--surface));
  box-shadow: var(--tblr-box-shadow-sm, 0 5px 18px rgba(28, 61, 50, .045));
}
.panel-heading { min-height: 30px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel > .panel-heading.card-header {
  min-height: 64px;
  margin: -20px -20px 20px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--tblr-border-color, var(--line));
  border-radius: var(--tblr-border-radius-lg, 14px) var(--tblr-border-radius-lg, 14px) 0 0;
  background: var(--tblr-bg-surface, var(--surface));
}
h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #cad7d2;
  border-radius: 9px;
  padding: 8px 11px;
  color: var(--text);
  background: #fff;
}
input:hover { border-color: #9fb6ad; }
select:hover { border-color: #9fb6ad; }

button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 14px;
  color: var(--text);
  background: #edf3f1;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { color: #fff; background: var(--accent); font-weight: 750; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.wide { width: 100%; }
.small { min-height: 30px; padding: 4px 9px; font-size: .75rem; border-color: #d5e0dc; background: var(--surface-soft); }
.small:hover { background: #eaf3f0; }
.small.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.small.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.small.danger { color: #6b302b; background: #fff; border-color: #e1c8c4; }

.configuration-state { display: grid; justify-items: end; gap: 2px; text-align: right; }
.configuration-state strong { color: var(--warning); font-size: .8rem; }
.configuration-state strong.ready { color: var(--accent); }
.configuration-state span,
.secret-note,
.form-blocker { color: var(--muted); font-size: .74rem; }

.stack-form,
.task-form { display: grid; gap: 9px; }
.stream-code-panel { display: grid; gap: 12px; }
.stream-code-panel .panel-heading { margin-bottom: 0; }
.stream-code-list { display: grid; gap: 8px; margin-top: 4px; }
.stream-code-card { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.stream-code-heading { display: grid; grid-template-columns: minmax(100px, 1fr) auto auto; align-items: center; gap: 8px; }
.url-display { min-height: 34px; padding-block: 5px; font-family: "Cascadia Mono", Consolas, monospace; font-size: .68rem; background: #fff; }
.compact-empty { margin: 0; padding: 16px; }
.stack-form label,
.field-grid label { color: #52635d; font-size: .77rem; font-weight: 700; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.field-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 9px 12px; }
.advanced-options { color: var(--muted); }
.advanced-options > summary { width: max-content; color: var(--accent); font-size: .75rem; font-weight: 700; cursor: pointer; }
.advanced-fields { margin-top: 9px; }
.form-blocker { min-height: 17px; margin: 0; }
.form-blocker.ready { visibility: hidden; }

.security-alerts { margin-bottom: 12px; }
.security-alert {
  padding: 10px 13px;
  border: 1px solid #efd2a0;
  border-radius: 10px;
  color: #765008;
  background: var(--warning-soft);
  font-size: .78rem;
}

.table-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th { padding: 0 9px 9px; text-align: left; color: #70807a; font-size: .7rem; font-weight: 750; border-bottom: 1px solid var(--line); }
td { max-width: 260px; padding: 12px 9px; vertical-align: top; border-bottom: 1px solid #edf2f0; font-size: .8rem; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.subline { display: block; margin-top: 3px; color: var(--muted); font-size: .69rem; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: .72rem; overflow-wrap: anywhere; }
.empty { max-width: none; color: var(--muted); text-align: center; padding: 30px 12px; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 999px; color: #086447; background: var(--accent-soft); font-size: .68rem; font-weight: 800; }
.badge.warn { color: var(--warning); background: var(--warning-soft); }
.badge.bad { color: var(--danger); background: var(--danger-soft); }
.badge.inactive { color: var(--muted); background: #edf1ef; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.broadcaster-status-panel { min-width: 0; }
.broadcaster-card-list { display: grid; gap: 10px; }
.broadcaster-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 11px 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.broadcaster-card-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.broadcaster-card-identity { min-width: 0; display: flex; align-items: center; gap: 7px; }
.broadcaster-card-name { min-width: 0; }
.broadcaster-card-name > :first-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.broadcaster-card-facts { min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(86px, 1fr)); gap: 9px; margin: 0; }
.broadcaster-card-facts .asr-card-fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.broadcaster-card-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; padding-left: 14px; border-left: 1px solid var(--line); }
.broadcaster-card-actions .actions { flex-wrap: nowrap; }
.broadcaster-card-actions button { min-width: 82px; white-space: nowrap; }

.asr-node-card-list,
.asr-task-card-list { display: grid; gap: 10px; }
.asr-node-card,
.asr-task-card { min-width: 0; display: grid; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.asr-card-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.asr-card-identity { min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.asr-card-identity > :first-child,
.machine-id-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asr-card-facts,
.asr-task-facts { min-width: 0; display: grid; gap: 7px; margin: 0; }
.asr-task-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asr-card-fact { min-width: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; align-items: baseline; }
.asr-card-fact dt { color: var(--muted); font-size: .69rem; font-weight: 700; white-space: nowrap; }
.asr-card-fact dd { min-width: 0; margin: 0; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asr-task-operation { min-width: 0; display: grid; grid-template-columns: max-content minmax(180px, 1fr) auto; gap: 9px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.asr-control-label { color: var(--muted); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.asr-task-service { min-width: 0; }
.asr-task-service select { white-space: nowrap; text-overflow: ellipsis; }
.asr-task-config-note,
.asr-task-blockers { margin: 6px 0 0; font-size: .68rem; line-height: 1.45; overflow-wrap: anywhere; }
.asr-task-config-note { color: var(--accent); }
.asr-task-blockers { color: var(--danger); }
.asr-node-card .actions,
.asr-task-operation .actions { flex-wrap: nowrap; }
.asr-node-card button,
.asr-task-card button { white-space: nowrap; }
.asr-node-name-editor,
.asr-node-order-editor { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.asr-node-name-editor[hidden],
.asr-node-order-editor[hidden] { display: none; }
.asr-node-name-editor input,
.asr-node-order-editor input { min-width: 0; min-height: 36px; padding: 7px 10px; font-size: .78rem; }
.asr-node-name-editor button,
.asr-node-order-editor button { min-width: 62px; }

.captions-panel { min-height: min(640px, calc(100vh - 150px)); }
.caption-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.caption-filter-form label { display: grid; gap: 5px; color: #52635d; font-size: .7rem; font-weight: 700; }
.caption-filter-form input { min-height: 36px; padding: 6px 9px; font-size: .76rem; }
.caption-filter-actions { display: flex; gap: 7px; }
.caption-filter-actions button { min-height: 36px; padding-inline: 11px; }
.caption-history-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.6fr); gap: 14px; min-height: 430px; }
.caption-task-stack { min-width: 0; display: grid; align-content: start; gap: 14px; }
.caption-task-pane,
.caption-detail-pane { min-width: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface-soft); }
.caption-pane-heading,
.caption-detail-heading { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #fff; }
.caption-detail-heading { align-items: flex-start; }
.caption-detail-heading > span { text-align: right; white-space: pre-line; }
.caption-detail-sections { min-height: 360px; display: grid; grid-template-rows: minmax(130px, auto) minmax(230px, 1fr); }
.caption-full-section,
.caption-segments-section { min-width: 0; padding: 12px; }
.caption-full-section { border-bottom: 1px solid var(--line); background: #fff; }
.caption-full-section h3,
.caption-segments-section h3 { margin: 0 0 9px; color: #52635d; font-size: .76rem; }
.caption-full-text { max-height: 220px; margin: 0; overflow-y: auto; line-height: 1.75; white-space: normal; overflow-wrap: anywhere; }
.caption-interim-text { color: #63736d; }
.caption-interim-label { margin-left: 6px; color: #7b8b85; font-size: .7rem; white-space: nowrap; }
.caption-segments-section { min-height: 0; }
.caption-history-list,
.caption-detail-list { display: grid; gap: 7px; max-height: calc(100vh - 340px); min-height: 360px; overflow-y: auto; padding: 9px; margin: 0; list-style: none; }
.caption-segments-section .caption-detail-list { min-height: 230px; max-height: calc(100vh - 570px); padding: 0; }
.live-task-list { min-height: 88px; max-height: 230px; }
.history-task-pane .caption-history-list { min-height: 190px; max-height: calc(100vh - 580px); }
.task-history-pagination { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fff; }
.task-history-pagination button { min-width: 68px; }
.caption-task-row { display: flex; align-items: stretch; gap: 6px; }
.caption-task-row .caption-task-button { flex: 1 1 auto; width: auto; min-width: 0; }
.caption-history-delete { flex: 0 0 auto; align-self: center; white-space: nowrap; }
.caption-task-button { width: 100%; display: grid; gap: 5px; text-align: left; border-color: transparent; background: #fff; }
.caption-task-button:hover,
.caption-task-button.active { border-color: #8fcdb7; background: var(--accent-soft); }
.caption-task-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 750; }
.caption-task-meta { color: var(--muted); font-size: .68rem; line-height: 1.45; white-space: pre-line; }
.caption { display: grid; grid-template-columns: minmax(170px, .38fr) minmax(0, 1fr) auto; gap: 13px; padding: 12px 13px; border-radius: 9px; background: #fff; }
.caption .who, .caption time { color: var(--muted); font-size: .68rem; }
.caption p { margin: 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.caption.caption-interim { border: 1px dashed #aab8b3; background: #f3f6f5; color: #5f706a; }
.caption.caption-interim time { white-space: nowrap; }

.semantic-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.semantic-hub-panel { grid-column: 1 / -1; min-height: 0; overflow: hidden; }
.semantic-hub-panel > .panel-heading { margin-bottom: 14px; }
.semantic-hub-body { min-width: 0; }
.semantic-hub-tabs { display: flex; align-items: center; gap: 6px; padding: 6px; margin-bottom: 14px; overflow-x: auto; border: 1px solid #dfeae6; border-radius: 12px; background: #f5f9f7; scrollbar-width: thin; }
.semantic-hub-tab { flex: 0 0 auto; min-height: 36px; padding: 7px 14px; border: 1px solid transparent; border-radius: 9px; color: #52635d; background: transparent; font-size: .73rem; font-weight: 750; white-space: nowrap; }
.semantic-hub-tab:hover { color: #075f47; background: #fff; }
.semantic-hub-tab.active { color: #fff; border-color: var(--accent); background: var(--accent); box-shadow: 0 5px 13px rgba(8, 127, 91, .15); }
.semantic-hub-tab span { display: inline-grid; min-width: 20px; place-items: center; padding: 1px 5px; margin-left: 5px; border-radius: 999px; color: inherit; background: rgba(255, 255, 255, .2); font-size: .64rem; }
.semantic-hub-tab:not(.active) span { color: #087456; background: #e3f5ee; }
.semantic-hub-pane { min-width: 0; }
.semantic-hub-pane[hidden] { display: none !important; }
.semantic-pane-heading { min-height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.semantic-pane-heading.compact { min-height: 30px; align-items: center; }
.semantic-pane-heading h2 { font-size: .92rem; }
.semantic-config-panel { min-height: 0; overflow: hidden; border: 1px solid #e1ebe7; border-radius: 13px; background: #fff; }
#ai-config-panel .semantic-config-panel { border: 0; border-radius: 0; overflow: visible; }
#ai-config-panel .semantic-model-status-grid { padding: 0 0 18px; background: transparent; }
#ai-config-panel .semantic-config-toolbar { padding: 18px 0 0; min-height: 0; }
#ai-config-panel .semantic-config-toolbar h3 { margin: 0; font-size: 1rem; }
#ai-config-panel .semantic-config-layout { padding: 14px 0; gap: 18px; }
#ai-config-panel .semantic-step { display: none; }
#ai-config-panel .semantic-config-section-heading p { display: none; }
#ai-config-panel .semantic-config-section { padding: 16px; background: #fafcfb; }
#ai-config-panel .semantic-model-options { gap: 6px; }
#ai-config-panel .ai-config-mode { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
#ai-config-panel .ai-config-mode h3 { margin: 0; font-size: .92rem; }
#ai-config-panel .ai-config-mode p { margin: 4px 0 0; font-size: .75rem; }
#ai-config-panel #semantic-policy-forced-note { flex-basis: 100%; color: var(--muted); }
#ai-config-panel .ai-config-switch { display: flex; align-items: center; gap: 10px; padding: 0; margin: 0; }
#ai-config-panel .ai-config-switch .form-check-input { float: none; margin: 0; width: 2.2rem; height: 1.2rem; min-height: 1.2rem; }
#ai-config-panel .ai-config-switch .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
#ai-config-panel .ai-config-save { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 20px; }
#ai-config-panel .ai-config-principles { padding: 22px 0 0; gap: 14px; }
#ai-config-panel .semantic-policy-table tbody th { width: 20%; }
#ai-config-panel .semantic-policy-table td:nth-child(2) { width: 80%; }
#ai-config-panel .ai-config-technical { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .75rem; line-height: 1.7; }
#ai-config-panel .ai-config-technical summary { color: var(--text); cursor: pointer; }
#ai-config-panel .ai-config-technical ul { margin: 10px 0 0; padding-left: 18px; }
#ai-config-panel .ai-config-technical li + li { margin-top: 6px; }
@media(max-width:680px) {
  #ai-config-panel .semantic-config-layout { grid-template-columns: minmax(0,1fr); }
  #ai-config-panel .ai-config-save { align-items: flex-start; flex-direction: column; }
}
.semantic-model-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #f8fbfa; }
.semantic-model-status-card { min-width: 0; display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.semantic-model-status-heading, .semantic-model-status-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.semantic-model-status-heading h3 { margin: 0; font-size: 14px; }
.semantic-model-status-card > strong { font-size: 13px; overflow-wrap: anywhere; }
.semantic-model-status-card code { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.semantic-model-status-footer > span { flex: 1; min-width: 110px; color: var(--muted); font-size: 11px; }
.semantic-local-model-switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.semantic-local-model-switch select { min-width: 0; width: 100%; }
.semantic-feedback-settings { display: grid; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); background: #f6fbf8; }
.semantic-policy-guide { gap: 12px; background: #fff; }
.semantic-policy-heading, .semantic-policy-mode-control { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.semantic-policy-heading h3 { margin: 0; font-size: 16px; }
.semantic-policy-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.semantic-policy-mode-control { padding-top: 4px; font-size: 12px; }
.semantic-policy-flow { margin: 0; padding: 12px 14px; border-radius: 8px; background: #eaf6f1; color: #17664f; font-size: 13px; font-weight: 600; }
.semantic-policy-forced-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.semantic-policy-table-heading { padding-top: 4px; font-size: 13px; }
.semantic-policy-guide .table-responsive { border: 1px solid var(--line); border-radius: 8px; }
.semantic-policy-table { font-size: 12px; line-height: 1.65; }
.semantic-policy-table th, .semantic-policy-table td { padding: 11px 12px; white-space: normal; }
.semantic-policy-table thead th { font-size: 11px; background: #f5f8f7; }
.semantic-policy-table tbody th { width: 21%; min-width: 120px; font-weight: 600; }
.semantic-policy-table td:nth-child(2) { width: 15%; min-width: 112px; }
.semantic-policy-table tr:last-child > * { border-bottom: 0; }
.semantic-policy-outcome { display: grid; gap: 5px; padding: 12px 14px; border-radius: 8px; background: #f5f8f7; font-size: 12px; line-height: 1.7; }
.semantic-policy-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.semantic-policy-detail-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 10px; }
.semantic-policy-detail-heading h4 { margin: 0; font-size: 14px; }
.semantic-policy-detail-heading span { color: var(--muted); font-size: 11px; }
.semantic-policy-evidence { font-size: 12px; line-height: 1.8; }
.semantic-policy-evidence ol { margin: 0; padding-left: 22px; }
.semantic-policy-evidence li + li { margin-top: 7px; }
.semantic-policy-score-grid, .semantic-policy-none-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.semantic-policy-score-grid > div, .semantic-policy-none-grid > div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f7faf9; font-size: 12px; line-height: 1.7; }
.semantic-policy-score-grid strong { display: block; margin: 5px 0; color: var(--accent); font-size: 20px; }
.semantic-policy-score-grid p, .semantic-policy-none-grid p { margin: 6px 0 0; }
.semantic-policy-guide code { overflow-wrap: anywhere; font-size: 11px; }
.semantic-policy-none-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.semantic-policy-examples tbody th { width: 29%; }
.semantic-policy-examples td:nth-child(2) { width: 28%; }
.semantic-policy-examples .badge { margin-right: 5px; }

@media (max-width: 760px) {
  .semantic-policy-score-grid, .semantic-policy-none-grid { grid-template-columns: minmax(0, 1fr); }
  .semantic-policy-table thead { display: none; }
  .semantic-policy-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--line); }
  .semantic-policy-table tbody th, .semantic-policy-table td { width: auto; min-width: 0; border: 0; }
  .semantic-policy-table td:last-child { grid-column: 1 / -1; padding-top: 0; }
  .semantic-policy-table tr:last-child { border-bottom: 0; }
  .semantic-policy-examples tbody tr { grid-template-columns: minmax(0, 1fr); }
  .semantic-policy-examples tbody th, .semantic-policy-examples td:nth-child(2) { width: auto; min-width: 0; }
  .semantic-policy-examples td:nth-child(2) { padding-top: 0; }
  .semantic-policy-examples tbody th::before { content: "主播原文"; }
  .semantic-policy-examples td:nth-child(2)::before { content: "本地返回及条件"; }
  .semantic-policy-examples tbody th::before, .semantic-policy-examples td:nth-child(2)::before { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }

}

.semantic-feedback-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.semantic-feedback-switch > span { display: grid; gap: 4px; }
.semantic-feedback-switch strong { font-size: 13px; }
.semantic-feedback-switch small, #semantic-feedback-status { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.6; }
.semantic-feedback-switch input { appearance: none; position: relative; flex: 0 0 36px; width: 36px; height: 21px; min-height: 21px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: #cad7d0; cursor: pointer; }
.semantic-feedback-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; transition: transform .15s; }
.semantic-feedback-switch input:checked { background: var(--accent); }
.semantic-feedback-switch input:checked::after { transform: translateX(15px); }
.semantic-feedback-switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.semantic-module-panel { grid-column: 1 / -1; min-width: 0; }
.semantic-module-body { min-width: 0; }
#semantic-recognition-content { display: contents; }
.semantic-training-panel { margin-top: 0; box-shadow: none; }
.training-body { min-width: 0; }
.training-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.training-metrics > div { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f6faf8; }
.training-metrics span, .training-meta, .training-explainer { font-size: 12px; color: var(--muted); line-height: 1.7; }
.training-metrics strong { font-size: 26px; color: var(--accent); line-height: 1; }
.training-explainer { margin: 14px 0 18px; }
.training-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.training-toolbar label { font-size: 12px; }
.training-toolbar select { width: auto; min-width: 180px; }
.training-list { display: grid; gap: 12px; }
.training-record { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.training-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.training-record-heading > strong { font-size: 14px; }
.training-state { padding: 4px 9px; border-radius: 6px; font-size: 11px; background: #edf2ef; color: #50625b; }
.training-state.pending, .training-state.stale { background: #fff5df; color: #805600; }
.training-state.applied { background: #e4f6ed; color: #096347; }
.training-state.failed { background: #fff0ec; color: #9d3929; }
.training-state.same { background: #e4f6ed; color: #096347; }
.training-state.different { background: #fff5df; color: #805600; }
.training-meta { margin: 8px 0; overflow-wrap: anywhere; }
.training-quote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid #c4ded2; background: #f7faf8; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; }
.training-detail summary { cursor: pointer; color: #33725b; font-size: 12px; padding: 6px 0; }
.training-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.training-comparison > div { padding: 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.training-comparison span { color: var(--muted); font-size: 11px; }
.training-comparison p { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.training-comparison-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.training-comparison-heading strong { font-size: 12px; }
.training-result { padding: 3px 7px; border-radius: 999px; background: #edf2ef; }
.training-result.correct { color: #096347; background: #e4f6ed; }
.training-result.incorrect { color: #9d3929; background: #fff0ec; }
.training-answer { margin: 10px 0; padding: 10px 12px; border-radius: 8px; color: #245e4b; background: #edf8f3; font-size: 12px; font-weight: 700; }
.training-diff-wrap { overflow-x: auto; }
.training-diff { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.training-diff caption { text-align: left; color: var(--muted); margin-bottom: 8px; }
.training-diff th, .training-diff td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.training-diff th { background: #f5f8f6; font-weight: 500; }
.training-diff th:first-child { width: 22%; }
.training-diff td:nth-child(2) { background: #fff9f5; color: #795b4d; }
.training-diff td:nth-child(3) { background: #f0faf4; color: #205f44; }
.training-reason, .training-verification { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.training-verification { padding: 12px; border-radius: 8px; background: #f2f6fa; color: #476176; }
.training-empty { margin: 0; padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.training-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }
@media (max-width: 760px) {
  .training-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .training-comparison { grid-template-columns: minmax(0, 1fr); }
  .training-diff { min-width: 480px; }
}
@media (max-width: 1100px) { .training-comparison { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .semantic-model-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .semantic-model-status-grid { grid-template-columns: minmax(0, 1fr); } }
.semantic-config-header { width: 100%; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; border-bottom: 1px solid #dbeae4; color: inherit; background: linear-gradient(115deg, #f4fbf8 0%, #fff 60%); text-align: left; }
.semantic-config-brand { min-width: 0; display: flex; align-items: center; gap: 13px; }
.semantic-config-copy { min-width: 0; display: grid; gap: 3px; }
.semantic-config-title { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.semantic-config-subtitle { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.semantic-config-section-heading h3 { margin: 0; letter-spacing: -.02em; }
.semantic-config-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.semantic-ai-mark { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #07936a, #046b50); box-shadow: 0 8px 18px rgba(8, 127, 91, .2); font-size: .78rem; font-weight: 850; letter-spacing: .04em; }
.semantic-config-summary { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.semantic-config-state { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 10px; border: 1px solid #cfe7de; border-radius: 999px; color: #17664f; background: #f1faf6; font-size: .7rem; font-weight: 750; }
.semantic-config-state::before { width: 7px; height: 7px; border-radius: 50%; background: #26a578; content: ""; box-shadow: 0 0 0 3px rgba(38, 165, 120, .12); }
.semantic-config-state.pending { color: #7a5a12; border-color: #eadcac; background: #fff9e8; }
.semantic-config-state.pending::before { background: #d79718; box-shadow: 0 0 0 3px rgba(215, 151, 24, .12); }
.semantic-config-state.disconnected { color: var(--danger); border-color: #f1c7c2; background: var(--danger-soft); }
.semantic-config-state.disconnected::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
.semantic-config-state.unconfigured { color: #66756f; border-color: #dce5e1; background: #f6f8f7; }
.semantic-config-state.unconfigured::before { background: #89958f; box-shadow: none; }
.semantic-config-content { background: #fff; }
.semantic-config-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px 0; }
.semantic-config-toolbar p { margin: 0; color: var(--muted); font-size: .72rem; }
.semantic-config-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 14px; padding: 16px 20px 14px; }
.semantic-config-section { min-width: 0; display: grid; align-content: start; gap: 13px; padding: 16px; border: 1px solid #e1ebe7; border-radius: 14px; background: #fbfdfc; }
.semantic-config-section-heading { display: flex; align-items: center; gap: 10px; }
.semantic-config-section-heading h3 { font-size: .9rem; }
.semantic-step { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #087456; background: #e3f5ee; font-size: .66rem; font-weight: 850; }
.semantic-service-grid { display: grid; grid-template-columns: minmax(145px, .42fr) minmax(250px, 1fr); gap: 10px; }
.semantic-access-grid { display: grid; gap: 10px; }
.semantic-model-options { display: flex; flex-wrap: wrap; gap: 7px; min-height: 33px; align-items: center; }
.semantic-model-option { min-height: 32px; padding: 6px 10px; border-color: #d6e5df; border-radius: 9px; color: #42564f; background: #fff; font-size: .69rem; }
.semantic-model-option:hover { color: #075f47; border-color: #8fcdb7; background: #f3fbf8; }
.semantic-model-option.selected { color: #fff; border-color: var(--accent); background: var(--accent); box-shadow: 0 5px 12px rgba(8, 127, 91, .16); }
.semantic-model-empty { color: var(--muted); font-size: .69rem; }
.semantic-config-footer { display: flex; align-items: center; min-height: 38px; padding: 9px 22px; border-top: 1px solid #edf2f0; color: var(--muted); background: #fcfdfd; }
.semantic-config-tip { font-size: .68rem; line-height: 1.45; }
.semantic-page[hidden] { display: none; }
.semantic-processing-guide { min-height: 0; }
.semantic-guide-heading { margin-bottom: 14px; }
.semantic-guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .27fr); gap: 14px; }
.semantic-guide-main,
.semantic-guide-usage { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.semantic-flow { display: grid; grid-template-columns: repeat(2, minmax(105px, 1fr) 18px) minmax(105px, 1fr); align-items: stretch; gap: 5px; }
.semantic-flow-overview { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; }
.semantic-flow-step { min-width: 0; display: grid; align-content: start; gap: 5px; padding: 12px; border: 1px solid #dcebe5; border-radius: 11px; background: #fff; }
.semantic-flow-step[data-active="false"] { border-style: dashed; background: #f7faf9; opacity: .68; }
.semantic-flow-step-status { width: max-content; padding: 2px 6px; border-radius: 999px; color: #087455; background: #e5f5ef; font-size: .58rem; font-weight: 750; }
.semantic-flow-step > span { color: var(--accent); font-size: .64rem; font-weight: 850; letter-spacing: .08em; }
.semantic-flow-step > strong { font-size: .78rem; }
.semantic-flow-step > small { color: var(--muted); font-size: .66rem; line-height: 1.5; }
.semantic-flow-arrow { align-self: center; color: #79a898; font-size: 1rem; text-align: center; }
.semantic-scope-note { display: grid; gap: 3px; padding: 10px 12px; margin-top: 11px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; color: #315348; background: #eaf7f2; }
.semantic-scope-note strong { font-size: .74rem; }
.semantic-scope-note span { color: #557068; font-size: .68rem; line-height: 1.5; }
.semantic-guide-usage { background: #fff; }
.semantic-guide-usage h3 { margin: 0 0 10px; font-size: .84rem; }
.semantic-guide-usage ol { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.semantic-guide-usage li { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; color: #3c5048; font-size: .7rem; line-height: 1.45; }
.semantic-guide-usage li > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #087456; background: #e3f5ee; font-size: .65rem; font-weight: 850; }
.semantic-guide-usage p { padding-top: 10px; margin: 11px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .67rem; line-height: 1.55; }
.semantic-live-panel,
.semantic-trace-panel,
.semantic-rules-panel { min-height: 0; }
.semantic-live-list { display: grid; gap: 10px; }
.semantic-live-empty { min-height: 120px; display: grid; place-content: center; gap: 6px; color: var(--muted); text-align: center; }
.semantic-live-empty strong { color: #3e514a; }
.semantic-live-card { position: relative; display: grid; gap: 11px; padding: 15px; border: 1px solid #b9dfd1; border-radius: 13px; background: linear-gradient(135deg, #f8fdfa 0%, #eef9f5 100%); box-shadow: 0 7px 20px rgba(8, 127, 91, .06); }
.semantic-live-heading,
.semantic-live-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.semantic-live-heading > div { min-width: 0; display: grid; gap: 3px; }
.semantic-live-heading strong { font-size: .9rem; }
.semantic-live-heading .muted,
.semantic-live-footer { font-size: .68rem; }
.semantic-live-caption { margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; color: #233f35; background: #fff; font-size: .84rem; line-height: 1.7; }
.semantic-live-stages { margin-top: 2px; }
.semantic-live-step { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid #d8e8e2; border-radius: 9px; background: rgba(255, 255, 255, .78); }
.semantic-live-step small { color: var(--muted); font-size: .62rem; }
.semantic-live-step strong { color: #486159; font-size: .69rem; }
.semantic-live-step.completed strong { color: var(--accent); }
.semantic-live-step.failed { border-color: #efd0cc; background: #fff8f7; }
.semantic-live-step.failed strong { color: #a83a30; }
.semantic-live-step.processing strong { color: #ad7610; }
.semantic-live-footer > span:first-child { color: #245443; font-weight: 750; }
.semantic-live-detail-button { justify-self: end; }
.recognition-history-source-tabs { display: flex; gap: 7px; padding: 4px; margin-bottom: 14px; border-radius: 11px; background: #eef4f2; }
.recognition-history-source-tabs .semantic-hub-tab { flex: 0 0 auto; min-width: 120px; }
.semantic-history-filter-grid { width: 100%; display: grid; grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(160px, 1fr)); gap: 10px; }
.semantic-history-filter-grid .semantic-history-instruction-filter { display: grid; gap: 5px; align-content: end; }
.semantic-history-filter-grid .semantic-history-instruction-filter select { width: 100%; min-width: 0; }
.realtime-command-intro { display: grid; gap: 4px; padding: 12px 14px; margin-bottom: 12px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; color: #315348; background: #eaf7f2; }
.realtime-command-intro strong { font-size: .78rem; }
.realtime-command-intro span { color: var(--muted); font-size: .68rem; }
.realtime-command-list { display: grid; gap: 9px; }
.realtime-command-card { display: grid; gap: 8px; padding: 14px; border: 1px solid #c9e3da; border-radius: 12px; background: #fbfefd; box-shadow: 0 4px 14px rgba(8, 127, 91, .05); }
.realtime-command-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.realtime-command-heading strong { color: #173f33; font-size: .86rem; }
.realtime-command-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .66rem; }
.realtime-command-card p { margin: 0; font-size: .68rem; }
.semantic-history-tabs { display: flex; align-items: center; gap: 6px; }
.semantic-history-tab { min-height: 34px; padding: 7px 11px; border: 1px solid #d5e2dd; border-radius: 999px; color: #52635d; background: #f7faf9; font-size: .68rem; }
.semantic-history-tab:hover { border-color: #9bcbb9; }
.semantic-history-tab.active { border-color: #78c0a6; color: #087456; background: #e7f7f1; font-weight: 800; }
.semantic-history-tab span { display: inline-grid; min-width: 22px; place-items: center; padding: 1px 5px; margin-left: 4px; border-radius: 999px; background: rgba(8, 127, 91, .08); }
.semantic-trace-layout { display: grid; grid-template-columns: minmax(250px, .34fr) minmax(0, 1fr); gap: 14px; min-height: 430px; }
.semantic-comparison-summary { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: 16px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid #bcded2; border-radius: 12px; background: linear-gradient(135deg, #edf9f5, #f8fcfa); }
.semantic-comparison-summary > div { display: grid; gap: 3px; min-width: 0; }
.semantic-comparison-summary strong { color: #173f33; font-size: .78rem; }
.semantic-comparison-summary span { color: var(--muted); font-size: .66rem; line-height: 1.45; }
.semantic-comparison-summary dl { display: flex; align-items: stretch; gap: 7px; margin: 0; }
.semantic-comparison-summary dl div { min-width: 76px; padding: 7px 9px; border-radius: 9px; background: rgba(255, 255, 255, .86); text-align: center; }
.semantic-comparison-summary dt { color: var(--muted); font-size: .6rem; }
.semantic-comparison-summary dd { margin: 2px 0 0; color: var(--accent); font-size: .75rem; font-weight: 850; }
.semantic-trace-master { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.semantic-trace-list { height: min(760px, 70vh); display: grid; align-content: start; gap: 7px; padding: 9px; margin: 0; overflow-y: auto; list-style: none; }
.semantic-trace-item { width: 100%; display: grid; gap: 7px; padding: 11px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: #fff; text-align: left; }
.semantic-trace-item:hover { border-color: #b8d9cd; background: #f8fcfa; }
.semantic-trace-item.selected { border-color: #69b99e; background: #ebf8f3; box-shadow: 0 5px 14px rgba(8, 127, 91, .08); }
.semantic-trace-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.semantic-trace-item-badges { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.semantic-ai-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border-radius: 999px; color: #075c48; background: #d7f5ea; font-size: .62rem; font-weight: 900; letter-spacing: .03em; }
.semantic-ai-badge.external { color: #315f78; background: #e5f3fa; }
.semantic-trace-source { overflow: hidden; color: #344a42; font-size: .72rem; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.semantic-trace-meta { color: var(--muted); font-size: .65rem; line-height: 1.45; }
.semantic-trace-detail { min-width: 0; padding: 15px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfc; }
.semantic-trace-empty { min-height: 380px; display: grid; place-content: center; gap: 8px; color: var(--muted); text-align: center; }
.semantic-trace-empty strong { color: #3e514a; }
.semantic-trace-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.semantic-trace-detail-header h3 { margin: 0 0 5px; font-size: .92rem; }
.semantic-trace-detail-header p { margin: 0; color: var(--muted); font-size: .68rem; }
.semantic-trace-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.semantic-history-instruction-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.semantic-history-instruction-filter select { min-width: 190px; }
.semantic-instruction-category-badge { color: #075c48; border-color: #b9dfd1; background: #e7f7f1; white-space: nowrap; }
.semantic-trace-caption { margin: 13px 0; padding: 11px 13px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; color: #29443a; background: #edf8f4; font-size: .78rem; line-height: 1.65; }
.semantic-instruction-result { display: grid; gap: 8px; padding: 11px; margin: 0 0 12px; border: 1px solid #b8dfd1; border-radius: 11px; background: #f1faf7; }
.semantic-instruction-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.semantic-instruction-result-heading h4 { margin: 0; color: #163e32; font-size: .78rem; }
.semantic-instruction-result-list { display: grid; gap: 7px; }
.semantic-instruction-result-action { width: 100%; display: grid; gap: 5px; padding: 10px 11px; border: 1px solid #cee5dc; border-radius: 9px; color: var(--text); background: #fff; text-align: left; }
.semantic-instruction-result-action:hover { border-color: #69b99e; background: #fbfefd; box-shadow: 0 4px 12px rgba(8, 127, 91, .07); }
.semantic-instruction-result-action:focus-visible { outline: 3px solid rgba(20, 147, 105, .2); outline-offset: 2px; }
.semantic-instruction-result-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.semantic-instruction-result-execution { color: #254a3e; font-size: .72rem; font-weight: 750; line-height: 1.5; }
.semantic-instruction-result-hint { color: var(--muted); font-size: .64rem; line-height: 1.45; }
.semantic-trace-stages { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.semantic-trace-stage { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.semantic-trace-stage.failed { border-color: #efd0cc; background: #fffafa; }
.semantic-trace-stage.skipped { background: #f7f9f8; }
.semantic-trace-stage-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.semantic-trace-stage-heading h4 { margin: 0; font-size: .78rem; }
.semantic-trace-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: .62rem; font-weight: 850; }
.semantic-trace-message { min-height: 34px; margin: 9px 0 0; color: #445850; font-size: .7rem; line-height: 1.5; }
.semantic-trace-raw { margin-top: 8px; color: var(--muted); font-size: .66rem; }
.semantic-trace-raw summary { cursor: pointer; }
.semantic-trace-raw pre { max-height: 220px; padding: 9px; overflow: auto; border-radius: 8px; color: #30433c; background: #f4f8f6; font: .66rem/1.5 Consolas, "Microsoft YaHei UI", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.semantic-factory-pipeline { position: relative; }
.semantic-factory-stage { position: relative; display: grid; grid-template-columns: 126px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 12px; border-left: 3px solid #a8d8c7; box-shadow: 0 3px 10px rgba(28, 73, 58, .035); }
.semantic-factory-stage.completed { border-left-color: var(--accent); }
.semantic-factory-stage.processing { border-left-color: #dfa022; background: #fffdf7; }
.semantic-factory-stage.failed { border-left-color: var(--danger); }
.semantic-factory-stage.locally-stopped { border-left-color: #5e9bb2; background: #f5fafc; }
.semantic-factory-rail { min-width: 0; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 6px 7px; padding: 2px 10px 2px 0; border-right: 1px solid #e2ece8; }
.semantic-factory-rail h4 { margin: 0; font-size: .75rem; line-height: 1.3; }
.semantic-factory-rail .semantic-trace-number { width: 24px; height: 24px; border-radius: 7px; }
.semantic-factory-rail .badge { grid-column: 1 / -1; justify-self: start; white-space: nowrap; }
.semantic-factory-body { min-width: 0; display: grid; gap: 5px; }
.semantic-factory-message { min-height: 0; margin: 0; color: #304c42; font-size: .69rem; font-weight: 700; line-height: 1.4; }
.semantic-factory-facts { display: grid; grid-template-columns: minmax(88px, .16fr) minmax(0, 1fr); gap: 3px 9px; padding: 7px 9px; margin: 0; border-radius: 8px; background: #f7faf9; font-size: .65rem; line-height: 1.4; }
.semantic-factory-facts:empty { display: none; }
.semantic-factory-facts dt { color: #6c7e77; font-weight: 700; }
.semantic-factory-facts dd { min-width: 0; margin: 0; color: #30463e; overflow-wrap: anywhere; }
.semantic-factory-raw { margin: 0; }
.semantic-factory-raw summary { width: max-content; color: #4f6b61; font-weight: 700; }
.semantic-factory-raw[open] summary { margin-bottom: 6px; }
.semantic-trace-call-link { width: 100%; margin-top: 11px; }
.semantic-history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border-top: 1px solid var(--line); }
.semantic-draft-revisions { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.semantic-draft-revisions > summary { cursor: pointer; color: #315348; font-size: .7rem; font-weight: 800; }
.semantic-draft-revision-list { display: grid; gap: 6px; max-height: 260px; margin-top: 9px; overflow-y: auto; }
.semantic-draft-revision { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: start; gap: 9px; width: 100%; padding: 8px 9px; border: 1px solid #e0ebe7; border-radius: 8px; color: #344a42; background: #f8fbfa; text-align: left; }
.semantic-draft-revision:hover { border-color: #9bcbb9; background: #f0f9f5; }
.semantic-draft-revision strong { font-size: .67rem; }
.semantic-draft-revision span { overflow: hidden; font-size: .67rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.semantic-draft-revision small { color: var(--muted); font-size: .61rem; }
.semantic-rules-layout { display: block; min-width: 0; }
.semantic-rule-section { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.semantic-rule-heading { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.semantic-rule-heading h3 { margin: 0 0 4px; font-size: .84rem; }
.semantic-rule-heading p { margin: 0; color: var(--muted); font-size: .67rem; line-height: 1.45; }
.semantic-normalization-form { display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr) auto auto; align-items: end; gap: 7px; padding: 11px 0; }
.semantic-normalization-form label,
.semantic-normalization-preview label,
.semantic-pipeline-settings-form label { min-width: 0; display: grid; gap: 5px; color: #52635d; font-size: .69rem; font-weight: 700; }
.semantic-normalization-form input,
.semantic-normalization-preview input,
.semantic-pipeline-settings-form select { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #cad7d2; border-radius: 9px; color: var(--text); background: #fff; }
.semantic-normalization-arrow { padding-bottom: 10px; color: var(--accent); font-weight: 850; }
.semantic-normalization-list { max-height: 310px; display: grid; align-content: start; gap: 7px; overflow-y: auto; }
.semantic-normalization-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.semantic-normalization-row.disabled { opacity: .58; }
.semantic-normalization-wording { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.semantic-normalization-wording strong { overflow-wrap: anywhere; font-size: .72rem; }
.semantic-normalization-wording small { color: var(--muted); font-size: .62rem; }
.semantic-normalization-inline-arrow { color: var(--accent); }
.semantic-normalization-row .actions { flex-wrap: nowrap; }
.semantic-normalization-row button { min-height: 31px; padding: 5px 8px; font-size: .65rem; }
.semantic-normalization-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding-top: 11px; margin-top: 11px; border-top: 1px solid var(--line); }
.semantic-normalization-preview output { grid-column: 1 / -1; min-height: 38px; padding: 9px 11px; border-radius: 9px; color: #355348; background: #eaf7f2; font-size: .7rem; line-height: 1.5; }
.semantic-pipeline-settings-form { display: grid; gap: 10px; margin-top: 11px; }
.semantic-pipeline-settings-form label small,
.semantic-setting-model small { color: var(--muted); font-size: .63rem; font-weight: 400; line-height: 1.4; }
.semantic-setting-model { display: grid; gap: 4px; padding: 9px 10px; border-radius: 9px; background: #eaf4f0; }
.semantic-setting-model > span { color: var(--muted); font-size: .65rem; }
.semantic-setting-model > strong { overflow-wrap: anywhere; font-size: .72rem; }
.semantic-input-panel { grid-column: 1 / -1; min-width: 0; }
.semantic-cleaning-config { min-width: 0; display: grid; gap: 22px; padding: 0 0 26px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.input-cleaning-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.laya-config-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.laya-config-status-grid > section { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 14px 15px; border: 1px solid #dce8e3; border-radius: 11px; background: #f7fbf9; }
.laya-config-status-grid span { color: var(--muted); font-size: 10px; font-weight: 700; }
.laya-config-status-grid strong { overflow-wrap: anywhere; color: #274a3b; font-size: 12px; line-height: 1.5; }
.laya-config-status-grid small { color: #71847a; font-size: 10px; line-height: 1.5; }
.laya-config-status-grid small.disconnected { color: var(--danger); }
.input-panel-description { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.input-version { flex-shrink: 0; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.input-version.dirty { color: #946b20; border-color: #eadbb7; background: #fff9ed; }
.input-workspace { min-width: 0; font-size: 13px; line-height: 1.6; }
.input-workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 18px; }
.input-workspace-intro { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.input-workspace-intro h2 { margin: 0; font-size: 15px; }
.input-workspace-intro p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.input-mode-label { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #087456; background: #e2f4ec; font-size: 10px; font-weight: 750; }
.input-workspace-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.input-workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.input-view-tabs { display: flex; align-items: stretch; gap: 24px; }
.input-view-tabs button { position: relative; min-height: 42px; padding: 7px 1px 10px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.input-view-tabs button:hover { color: var(--accent); background: transparent; }
.input-view-tabs button.active { color: var(--accent); background: transparent; }
.input-view-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.input-count { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 4px; border-radius: 4px; color: #60796e; background: #e1ece7; font-size: 10px; }
.input-service-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin: 14px 0 18px; color: var(--muted); font-size: 11px; }
.input-service-line strong { color: #315f4d; font-weight: 650; }
.input-service-label { padding: 2px 7px; border-radius: 999px; color: #087456; background: #e9f6f0; font-size: 10px; font-weight: 700; }
.input-preview-only { display: inline-flex; align-items: center; gap: 6px; }
.input-preview-only::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #79aa96; }
.input-test-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.input-test-form { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }
.input-field { min-width: 0; display: grid; gap: 8px; color: #3c5047; font-size: 12px; font-weight: 600; }
.input-field > span { display: flex; align-items: center; gap: 7px; }
.input-field small { color: var(--muted); font-size: 11px; line-height: 1.6; font-weight: 400; }
.semantic-input-panel textarea, .semantic-cleaning-config textarea { width: 100%; min-width: 0; min-height: 72px; resize: vertical; padding: 11px 13px; border: 1px solid #d4e1da; border-radius: 9px; background: #fff; color: var(--text); font: inherit; font-size: 13px; font-weight: 400; line-height: 1.7; transition: border-color .15s; }
.semantic-input-panel textarea:hover, .semantic-cleaning-config textarea:hover { border-color: #a5bfb2; }
.semantic-input-panel textarea:focus-visible, .semantic-cleaning-config textarea:focus-visible { outline: 3px solid rgba(8, 127, 91, .12); outline-offset: 1px; border-color: var(--accent); }
.semantic-input-panel textarea::placeholder, .semantic-cleaning-config textarea::placeholder { color: #95a29c; }
.input-speech-field > span { color: var(--text); font-size: 14px; }
.input-speech-field textarea { min-height: 132px; font-size: 15px; background: #fcfefd; }
.input-context-details > summary { cursor: pointer; color: #52685d; font-size: 12px; }
.input-context-details > summary > span { margin-left: 6px; color: #8c9c94; font-size: 11px; font-weight: 400; }
.input-context-details .input-field { margin-top: 9px; }
.input-test-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.input-test-actions .primary { flex-shrink: 0; padding-inline: 20px; }
.input-test-actions .primary > span { margin-left: 12px; }
.input-test-actions-primary .primary { width: 100%; justify-content: center; }
.input-test-actions-secondary { margin-top: -6px; }
.input-test-actions-secondary button { flex: 1; padding-inline: 10px; font-size: 11px; }
.input-module-tests { display: grid; gap: 12px; margin-top: 6px; padding-top: 16px; border-top: 1px solid #dde8e2; }
.input-module-tests > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.input-module-tests > header h3 { margin: 0; color: #173d2e; font-size: 13px; }
.input-module-tests > header p { margin: 3px 0 0; color: #7a8e84; font-size: 10px; }
.input-module-tests > header > span { padding: 3px 8px; border-radius: 999px; color: #087653; background: #e8f6f0; font-size: 9px; }
.input-module-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.input-module-test-card { min-width: 0; overflow: hidden; border: 1px solid #dce7e1; border-radius: 10px; background: #fbfdfc; }
.input-module-test-card.running { border-color: #91cdb5; box-shadow: 0 0 0 2px rgba(7, 136, 94, .08); }
.input-module-test-card.completed { border-color: #a9d6c3; }
.input-module-test-card.failed { border-color: #e7bfb8; }
.input-module-test-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; background: #f5f9f7; }
.input-module-test-heading > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; color: #087653; background: #e4f3ed; font-size: 9px; font-weight: 750; }
.input-module-test-heading strong, .input-module-test-heading small { display: block; }
.input-module-test-heading strong { color: #244b3a; font-size: 11px; }
.input-module-test-heading small { margin-top: 2px; color: #84958d; font-size: 8px; line-height: 1.35; }
.input-module-test-heading button { min-height: 30px; padding: 5px 9px; font-size: 9px; }
.input-module-test-result { display: grid; gap: 6px; min-height: 62px; padding: 10px; border-top: 1px solid #e4ece7; }
.input-module-test-result p { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 7px; margin: 0; color: #5b7065; font-size: 9px; line-height: 1.55; }
.input-module-test-result p > strong { color: #29483b; }
.input-module-test-result .input-module-conclusion { display: block; padding: 7px 8px; border-radius: 7px; color: #185b41; background: #eaf7f1; font-size: 10px; font-weight: 650; }
.input-module-test-card.failed .input-module-conclusion { color: #9b3e32; background: #fff0ed; }
.input-module-test-card > details { border-top: 1px solid #e4ece7; }
.input-module-test-card > details > summary { padding: 8px 10px; color: #6d8076; font-size: 9px; }
.input-module-json { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 0 10px 10px; }
.input-module-json strong { display: block; margin-bottom: 4px; color: #51675c; font-size: 8px; }
.input-module-json pre { max-height: 150px; margin: 0; padding: 8px; overflow: auto; border-radius: 7px; color: #d8eee5; background: #13251e; font-size: 8px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.input-module-output-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px 10px 0; border-top: 1px solid #e4ece7; }
.input-module-output-fields label { display: grid; gap: 4px; color: #53695d; font-size: 8px; }
.input-module-output-fields select, .input-module-output-fields input { width: 100%; min-width: 0; min-height: 30px; padding: 5px 7px; border: 1px solid #cfddd6; border-radius: 7px; background: #fff; font-size: 9px; }
.semantic-input-panel .input-switch-label, .semantic-input-panel .input-check-label, .semantic-cleaning-config .input-switch-label, .semantic-cleaning-config .input-check-label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #344d41; cursor: pointer; }
.input-switch-label > span, .input-check-label > span { display: grid; gap: 1px; }
.input-switch-label small, .input-check-label small { color: #85938b; font-size: 10px; font-weight: 400; }
.semantic-input-panel input[type="checkbox"], .semantic-cleaning-config input[type="checkbox"] { width: 17px; height: 17px; min-height: 17px; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.semantic-input-panel input.input-switch, .semantic-cleaning-config input.input-switch { appearance: none; position: relative; width: 36px; height: 21px; min-height: 21px; padding: 0; border: 0; border-radius: 12px; background: #cad7d0; transition: background .15s; }
.semantic-input-panel input.input-switch::after, .semantic-cleaning-config input.input-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .15s; }
.semantic-input-panel input.input-switch:checked, .semantic-cleaning-config input.input-switch:checked { background: var(--accent); }
.semantic-input-panel input.input-switch:checked::after, .semantic-cleaning-config input.input-switch:checked::after { transform: translateX(15px); }
.input-caption { margin: 0; color: #829289; font-size: 11px; line-height: 1.65; }
.input-test-form { border: 1px solid #dce7e1; border-radius: 12px; background: #fff; }
.input-result-stack { min-width: 0; display: grid; gap: 14px; }
.input-diagnostic-workspace { align-content: start; }
.input-judgement-feedback { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid #cfe3d9; border-radius: 10px; background: #f3faf7; }
.input-judgement-feedback[hidden] { display: none; }
.input-judgement-feedback > div:first-child { display: grid; gap: 3px; }
.input-judgement-feedback strong { color: #26483a; font-size: 12px; }
.input-judgement-feedback span { color: #73877d; font-size: 10px; line-height: 1.55; }
.input-judgement-actions { flex-shrink: 0; display: flex; gap: 8px; }
.input-judgement-actions button { min-height: 34px; }
.input-diagnosis { display: grid; gap: 6px; padding: 15px 17px; border: 1px solid #d7e5dd; border-left: 4px solid #92aa9e; border-radius: 10px; background: #f8fbf9; }
.input-diagnosis > div { display: flex; align-items: center; gap: 9px; }
.input-diagnosis-label { flex-shrink: 0; padding: 3px 7px; border-radius: 5px; color: #577064; background: #e7efeb; font-size: 9px; font-weight: 750; }
.input-diagnosis strong { font-size: 13px; }
.input-diagnosis p { margin: 0; color: #62766c; font-size: 11px; line-height: 1.65; }
.input-diagnosis.completed { border-color: #bfe0ce; border-left-color: var(--accent); background: #f0f9f4; }
.input-diagnosis.completed .input-diagnosis-label { color: #087456; background: #dff2e8; }
.input-diagnosis.review { border-color: #eadbb7; border-left-color: #c69236; background: #fffaf0; }
.input-diagnosis.review .input-diagnosis-label { color: #8b641f; background: #f8eacb; }
.input-diagnosis.failed { border-color: #efc9c2; border-left-color: #bd5144; background: #fff6f4; }
.input-diagnosis.failed .input-diagnosis-label { color: #a33c2f; background: #f9e2dd; }
.input-diagnosis.processing { border-left-color: #7190a2; }
.input-flow-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.input-flow-overview li { position: relative; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 7px; align-items: center; padding: 10px; border: 1px solid #dce7e1; border-radius: 9px; color: #60736a; background: #fff; }
.input-flow-overview li:not(:last-child)::after { content: ""; position: absolute; right: -9px; z-index: 1; width: 9px; height: 1px; background: #cddbd4; }
.input-flow-overview li > span { grid-row: 1 / 3; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #71847a; background: #edf2ef; font-size: 9px; font-weight: 800; }
.input-flow-overview li strong { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.input-flow-overview li small { overflow: hidden; color: #91a097; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.input-flow-overview li.completed { border-color: #bddfcc; background: #f1f9f5; }
.input-flow-overview li.completed > span { color: #fff; background: var(--accent); }
.input-flow-overview li.skipped { border-color: #d7e0dc; background: #f5f7f6; }
.input-flow-overview li.skipped > span { color: #61736b; background: #dde6e2; }
.input-flow-overview li.review { border-color: #eadbb7; background: #fffaf0; }
.input-flow-overview li.review > span { color: #805b1b; background: #f6e6c4; }
.input-flow-overview li.failed { border-color: #efc9c2; background: #fff6f4; }
.input-flow-overview li.failed > span { color: #a33c2f; background: #f7dfda; }
.input-flow-overview li.processing > span { color: #496b7b; background: #e2edf2; }
.input-flow-stage { overflow: hidden; border: 1px solid #dce7e1; border-radius: 11px; background: #fff; }
.input-flow-stage.completed { border-color: #cbe1d5; }
.input-flow-stage.skipped { border-color: #d8e1dd; background: #fafbfa; }
.input-flow-stage.review { border-color: #eadbb7; }
.input-flow-stage.failed { border-color: #efc9c2; }
.input-flow-stage-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 14px 16px; border-bottom: 1px solid #e4ece7; background: #fafcfb; }
.input-flow-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #5c7569; background: #e8f0ec; font-size: 10px; font-weight: 800; }
.input-flow-stage.completed .input-flow-number { color: #fff; background: var(--accent); }
.input-flow-stage.skipped .input-flow-number { color: #60736a; background: #e2e9e6; }
.input-flow-stage.review .input-flow-number { color: #805b1b; background: #f6e6c4; }
.input-flow-stage.failed .input-flow-number { color: #a33c2f; background: #f7dfda; }
.input-flow-stage-head h3 { margin: 0; font-size: 12px; }
.input-flow-stage-head p { margin: 2px 0 0; color: #87978f; font-size: 9px; line-height: 1.5; }
.input-flow-stage-body { display: grid; gap: 8px; padding: 14px 16px; }
.input-flow-stage-body > p, .input-preview-summary > p { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 9px; margin: 0; color: #53695d; font-size: 11px; line-height: 1.65; }
.input-flow-stage-body > p > strong, .input-preview-summary > p > strong { color: #29483b; font-weight: 650; }
.input-flow-stage-body > p > span, .input-preview-summary > p > span { min-width: 0; overflow-wrap: anywhere; }
.input-model-warning > span { color: #91671d; }
.input-retrieval-candidates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 3px; }
.input-retrieval-candidates article { min-width: 0; display: flex; gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid #e0e9e4; border-radius: 8px; background: #f9fbfa; }
.input-retrieval-candidates article > span { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: #087456; background: #e3f2eb; font-size: 9px; font-weight: 800; }
.input-retrieval-candidates article > div { min-width: 0; }
.input-retrieval-candidates strong { display: block; overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.input-retrieval-candidates p { margin: 2px 0 0; color: #85958d; font-size: 9px; }
.input-model-stage > .input-result-card { margin: 12px; padding: 14px; border-radius: 9px; }
.input-model-stage .input-empty-result { min-height: 100px; }
.input-result-card { min-width: 0; padding: 18px; border: 1px solid #dce7e1; border-radius: 12px; background: #fff; }
.input-model-result-local { border-top: 3px solid #258866; }
.input-model-result-external { border-top: 3px solid #7190a2; }
.input-model-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.input-model-title > span { flex-shrink: 0; padding: 3px 7px; border-radius: 5px; color: #087455; background: #e0f3e9; font-size: 10px; font-weight: 700; }
.input-model-result-external .input-model-title > span { color: #496b7b; background: #e9f1f5; }
.input-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.input-section-heading h3, .input-config-intro h3 { margin: 0; font-size: 13px; font-weight: 650; }
.input-result-badge { flex-shrink: 0; padding: 3px 7px; border-radius: 5px; color: #7e8f85; background: #eaf0ec; font-size: 10px; }
.input-result-badge.confirmed { color: #087455; background: #e0f3e9; }
.input-result-badge.review { color: #946b20; background: #fcf0d5; }
.input-empty-result { min-height: 206px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.input-empty-result img { width: 26px; height: 26px; margin-bottom: 14px; opacity: .35; }
.input-empty-result strong { color: #5a7365; font-size: 13px; font-weight: 550; }
.input-empty-result p { margin: 7px 0 0; color: #91a097; font-size: 11px; line-height: 1.8; }
.input-preview-summary { overflow-wrap: anywhere; }
.input-preview-summary { display: grid; gap: 8px; }
.input-action-result { margin-top: 10px; padding: 12px 14px; border: 1px solid #cce5d6; border-radius: 8px; background: #fff; }
.input-action-result strong { display: block; margin-bottom: 4px; color: var(--accent); font-size: 13px; }
.input-action-result p { margin: 3px 0 0; color: #667e70; font-size: 11px; }
.input-model-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e0e9e4; }
.input-model-data[hidden] { display: none; }
.input-model-data details { min-width: 0; border: 1px solid #dce7e1; border-radius: 8px; background: #f8fbf9; }
.input-model-data summary { display: flex; align-items: center; gap: 7px; padding: 9px 10px; cursor: pointer; color: #496055; font-size: 11px; font-weight: 650; }
.input-data-kind { flex-shrink: 0; padding: 2px 5px; border-radius: 4px; color: #3e6e5d; background: #e2f1eb; font-size: 9px; }
.input-data-kind.response { color: #516e7d; background: #e7f0f4; }
.input-model-data pre { max-height: 310px; overflow: auto; margin: 0; padding: 12px; border-top: 1px solid #dce7e1; color: #dfece7; background: #18231f; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; line-height: 1.65; }
.input-parser-io { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e0e9e4; }
.input-parser-io[hidden] { display: none; }
.input-parser-model { overflow: hidden; border: 1px solid #d8e5de; border-radius: 10px; background: #fbfdfc; }
.input-parser-model > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #e1eae5; background: #f4f8f6; }
.input-parser-model > header strong { color: #214d3b; font-size: 12px; }
.input-parser-model > header span { color: #71857b; font-size: 10px; }
.input-parser-io-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.input-parser-io-panel { min-width: 0; padding: 11px 12px; }
.input-parser-io-panel + .input-parser-io-panel { border-left: 1px solid #e1eae5; }
.input-parser-io-panel h4 { margin: 0 0 7px; color: #38584a; font-size: 11px; }
.input-parser-io-panel p { margin: 0 0 8px; color: #6c8076; font-size: 10px; line-height: 1.55; }
.input-parser-io-panel pre { max-height: 320px; overflow: auto; margin: 0; padding: 11px; border-radius: 8px; color: #dfece7; background: #18231f; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; line-height: 1.6; }
.input-text-button { min-height: 28px; padding: 3px 0; border-radius: 4px; background: transparent; color: var(--accent); font-size: 11px; text-align: left; }
.input-text-button:hover { color: var(--accent-hover); text-decoration: underline; }
#input-correct-result { margin-top: 14px; }
.input-profile-form { display: grid; gap: 18px; padding: 20px 0 22px; border-bottom: 1px solid var(--line); }
.input-config-intro { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.input-config-intro p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.input-definition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.input-definition-grid i { font-size: 10px; font-style: normal; color: #8da096; }
.input-advanced { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.input-always-open-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #52685d; font-size: 12px; }
.input-always-open-heading span { color: #8c9c94; font-size: 10px; font-weight: 500; }
.input-threshold-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.input-threshold-grid input { min-height: 36px; font-size: 13px; font-weight: 400; }
.input-form-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.input-form-footer > span { font-size: 11px; color: var(--muted); }
.laya-rule-catalog { display: grid; gap: 12px; padding: 18px; border: 1px solid #d8e7e0; border-radius: 12px; background: #f8fbfa; }
.laya-rule-catalog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #dce8e3; }
.laya-rule-catalog-heading h3 { margin: 0; color: #24483a; font-size: 15px; }
.laya-rule-catalog-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.laya-rule-section { min-width: 0; display: grid; gap: 12px; padding: 16px; border: 1px solid #dfe9e5; border-radius: 10px; background: #fff; }
.laya-exclusion-section { border-color: #eadbb8; background: #fffdf8; }
.laya-rule-section-title { display: flex; align-items: flex-start; gap: 10px; }
.laya-rule-section-title > span { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #087456; background: #e3f3ed; font-size: 10px; font-weight: 800; }
.laya-exclusion-section .laya-rule-section-title > span { color: #93691f; background: #f7e9c9; }
.laya-rule-section-title h4 { margin: 1px 0 0; color: #2d4c40; font-size: 13px; }
.laya-rule-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.laya-policy-list { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.laya-policy-list li { position: relative; padding: 9px 11px 9px 28px; border-radius: 8px; color: #405c50; background: #f3f8f6; font-size: 11px; line-height: 1.55; }
.laya-policy-list li::before { position: absolute; top: 10px; left: 10px; color: var(--accent); content: "✓"; font-weight: 800; }
.laya-rule-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.laya-rule-card { min-width: 0; display: grid; align-content: start; gap: 9px; padding: 13px; border: 1px solid #dce8e3; border-radius: 9px; background: #fbfdfc; }
.laya-rule-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.laya-rule-card > div:first-child strong { color: #2c4d3f; font-size: 12px; }
.laya-rule-card > div:first-child span { flex-shrink: 0; padding: 3px 6px; border-radius: 5px; color: #087456; background: #e5f3ed; font-size: 9px; font-weight: 700; }
.laya-rule-card > p { margin: 0; color: #586e63; font-size: 10px; line-height: 1.6; }
.laya-rule-card .laya-rule-question { color: #243e34; font-size: 11px; font-weight: 650; }
.laya-rule-card .laya-rule-examples { padding: 8px 9px; border-radius: 7px; background: #f1f6f4; color: #60736a; }
.laya-rule-card dl { display: grid; gap: 6px; margin: 0; }
.laya-rule-card dl > div { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 10px; line-height: 1.5; }
.laya-rule-card dl .positive { background: #edf8f3; }
.laya-rule-card dl .negative { background: #f7f4ef; }
.laya-rule-card dt { color: #71847a; font-weight: 700; }
.laya-rule-card dd { margin: 0; color: #405a4f; }
.laya-rule-technical { min-width: 0; display: grid; gap: 5px; padding-top: 7px; border-top: 1px solid #e5ece8; }
.laya-rule-technical span { color: #84938c; font-size: 9px; }
.laya-rule-technical code { display: block; max-height: 88px; overflow: auto; padding: 7px 8px; border-radius: 6px; color: #52665d; background: #edf2f0; font-family: Consolas, monospace; font-size: 9px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.input-button-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.input-button-group button { padding-inline: 16px; font-size: 12px; }
.input-notice { margin: 0; padding: 12px 15px; border: 1px solid #d4e8db; border-radius: 9px; background: #f1f8f3; color: #496555; font-size: 12px; }
.input-samples-grid { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.input-sample-library { min-width: 0; padding: 18px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--surface-soft); }
.input-sample-list { display: grid; gap: 7px; align-content: start; max-height: 390px; overflow-y: auto; scrollbar-gutter: stable; }
.input-sample-item { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 10px 11px; border: 1px solid #e1eae4; border-radius: 8px; background: #fff; text-align: left; }
.input-sample-item:hover, .input-sample-item.selected { border-color: #96cbb0; background: #f0faf4; }
.input-sample-item > span:last-child { overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; }
.input-sample-label { flex-shrink: 0; padding: 2px 5px; border-radius: 4px; font-size: 10px; line-height: 1.6; color: #8a742f; background: #fff5da; }
.input-sample-label.reviewed { color: #4e7b62; background: #e9f4ed; }
.input-empty-list { padding: 20px 6px; color: var(--muted); text-align: center; font-size: 12px; }
.input-sample-editor { min-width: 0; display: grid; gap: 14px; align-content: start; padding: 18px; }
.input-sample-editor .input-section-heading { margin-bottom: 0; }
.input-sample-quote { max-height: 112px; overflow-y: auto; overflow-wrap: anywhere; margin: 0; padding: 12px 15px; border-left: 3px solid #9ac8ae; border-radius: 0 8px 8px 0; color: #476351; background: #f5f9f6; font-size: 13px; }
.input-sample-editor select { min-height: 138px; padding: 6px; font-size: 12px; font-weight: 400; border-color: #d4e1da; }
.input-sample-editor option { margin: 2px 0; padding: 7px 9px; border-radius: 5px; }
.input-feedback { margin: 18px 0 0; padding: 10px 13px; border-radius: 8px; color: #51715f; background: #edf6f0; font-size: 12px; }
.input-feedback.error { color: #a33c2f; background: #fff2ef; }
.input-raw-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.input-raw-result > summary { cursor: pointer; }
.input-raw-result pre { max-height: 340px; overflow: auto; margin: 12px 0 0; padding: 14px; border-radius: 8px; color: #476052; background: #f3f7f4; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.7; }
.input-maintenance-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 0; }
.input-maintenance-grid > .semantic-rule-section { padding: 16px; background: #fafcfb; }
.semantic-maintenance-details > summary { cursor: pointer; list-style: none; }
.semantic-maintenance-details > summary::-webkit-details-marker { display: none; }
.semantic-maintenance-details > summary::after { content: "展开"; align-self: center; flex-shrink: 0; color: var(--accent); font-size: .66rem; font-weight: 700; }
.semantic-maintenance-details[open] > summary::after { content: "收起"; }
.semantic-maintenance-details[open] > summary { margin-bottom: 4px; }
.input-maintenance-grid > .semantic-rule-section:last-child .semantic-pipeline-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.input-maintenance-grid > .semantic-rule-section:last-child .semantic-setting-model,
.input-maintenance-grid > .semantic-rule-section:last-child .semantic-pipeline-settings-form > button { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .laya-config-status-grid, .laya-rule-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .input-test-actions { flex-wrap: wrap; }
  .input-test-actions-secondary button { flex: 1 1 120px; }
  .input-module-test-grid { grid-template-columns: minmax(0, 1fr); }
  .input-module-output-fields { grid-template-columns: minmax(0, 1fr); }
  .input-flow-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .input-flow-overview li:nth-child(3)::after { display: none; }
  .input-samples-grid { grid-template-columns: minmax(200px, .8fr) minmax(0, 1.2fr); }
}
@media (max-width: 760px) {
  .input-test-grid, .input-samples-grid, .input-definition-grid, .input-maintenance-grid, .laya-config-status-grid, .laya-rule-card-grid { grid-template-columns: minmax(0, 1fr); }
  .input-workspace-head { align-items: flex-start; }
  .input-workspace-intro { flex-direction: column; gap: 7px; }
  .input-result-card { min-height: 220px; border-top: 1px solid #dce7e1; border-left: 0; }
  .input-model-result-local, .input-model-result-external { border-top-width: 3px; }
  .input-model-data { grid-template-columns: minmax(0, 1fr); }
  .input-parser-io-grid { grid-template-columns: minmax(0, 1fr); }
  .input-parser-io-panel + .input-parser-io-panel { border-left: 0; border-top: 1px solid #e1eae5; }
  .input-sample-library { border-right: 0; border-bottom: 1px solid var(--line); }
  .input-empty-result { min-height: 145px; }
  .input-sample-list { max-height: 220px; }
  .input-flow-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .input-flow-overview li::after { display: none; }
}
@media (max-width: 480px) {
  .input-view-tabs { width: 100%; gap: 14px; overflow-x: auto; }
  .input-view-tabs button { flex: 0 0 auto; font-size: 12px; }
  .input-workspace-head { flex-direction: column; }
  .input-workspace-meta { width: 100%; justify-content: space-between; }
  .input-preview-only { display: none; }
  .input-flow-overview, .input-retrieval-candidates { grid-template-columns: minmax(0, 1fr); }
  .input-flow-overview li::after { display: none; }
  .input-flow-stage-head { grid-template-columns: auto minmax(0, 1fr); }
  .input-flow-stage-head > .input-result-badge { grid-column: 2; justify-self: start; }
  .input-flow-stage-body > p, .input-preview-summary > p { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .input-threshold-grid { grid-template-columns: minmax(0, 1fr); }
  .input-maintenance-grid > .semantic-rule-section:last-child .semantic-pipeline-settings-form { grid-template-columns: minmax(0, 1fr); }
  .input-maintenance-grid .semantic-normalization-form { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .semantic-normalization-form > button { justify-self: start; }
}
.semantic-definitions-panel { min-height: 0; }
/* Instruction configuration: categories first, then the selected live rule catalog. */
#instruction-library-panel .semantic-instruction-workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
#instruction-library-panel .semantic-instruction-master { height: auto; border: 0; background: transparent; }
#instruction-library-panel .semantic-instruction-master-heading { display: none; }
#instruction-library-panel .semantic-definition-list { height: auto; padding: 0; overflow: visible; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
#instruction-library-panel .semantic-instruction-card { height: auto; min-height: 128px; align-content: start; gap: 12px; padding: 15px 12px; }
#instruction-library-panel .semantic-action-heading { flex-wrap: wrap; gap: 9px; }
#instruction-library-panel .semantic-instruction-description { white-space: normal; overflow: visible; line-height: 1.6; min-height: 36px; }
#instruction-library-panel .instruction-view-logic { color: var(--accent); font-size: .7rem; }
#instruction-library-panel .instruction-switch { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; min-height: 0; cursor: pointer; }
#instruction-library-panel .instruction-switch .form-check-input { flex: 0 0 auto; float: none; margin: 0; width: 2rem; min-height: 1.1rem; height: 1.1rem; cursor: pointer; }
#instruction-library-panel .instruction-switch .form-check-label { font-size: .7rem; white-space: nowrap; }
#instruction-library-panel .instruction-switch .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
#instruction-library-panel .instruction-switch .form-check-input:disabled { cursor: default; }
#instruction-library-panel .semantic-editor-pane { height: auto; overflow: visible; background: #fff; }
#instruction-library-panel .semantic-editor-form { height: auto; overflow: visible; gap: 12px; }
#instruction-library-panel .semantic-editor-form label[hidden] { display: none; }
#instruction-library-panel .semantic-editor-grid { grid-template-columns: minmax(0, 1fr); }
#instruction-library-panel .semantic-route-summary { min-height: 0; }
#instruction-library-panel .semantic-route-summary .semantic-route-facts { margin-top: 14px; }
#instruction-library-panel .semantic-instruction-toolbar > label,
#instruction-library-panel .semantic-instruction-toolbar > select { display: none; }
#instruction-library-panel .semantic-route-summary-intro { margin-top: 12px; }
#instruction-library-panel .laya-rule-catalog { margin: 0; padding: 18px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
#instruction-library-panel .laya-rule-card-grid { grid-template-columns: minmax(0, 1fr); }
#instruction-library-panel #laya-trigger-rule-list,
#instruction-library-panel #laya-exclusion-rule-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#instruction-library-panel .laya-rule-section { margin-top: 14px; }
#instruction-library-panel .laya-rule-technical { display: block; margin-top: 10px; }
#instruction-library-panel .laya-rule-technical summary { color: var(--muted); font-size: .68rem; cursor: pointer; }
#instruction-library-panel .laya-rule-technical code { display: block; padding-top: 8px; overflow-wrap: anywhere; }
#instruction-library-panel .semantic-cleaning-config { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
#instruction-library-panel .laya-config-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#instruction-library-panel .input-profile-form { margin-top: 12px; }
#instruction-library-panel .input-maintenance-grid { grid-template-columns: minmax(0, 1fr); }
#instruction-library-panel .semantic-pipeline-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#instruction-library-panel .semantic-editor-empty { height: auto; min-height: 100px; }
@media (max-width: 1200px) {
  #instruction-library-panel .semantic-definition-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  #instruction-library-panel .semantic-definition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #instruction-library-panel #laya-trigger-rule-list,
  #instruction-library-panel #laya-exclusion-rule-list,
  #instruction-library-panel .laya-config-status-grid,
  #instruction-library-panel .semantic-pipeline-settings-form { grid-template-columns: minmax(0, 1fr); }
}
.semantic-instruction-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.semantic-instruction-toolbar label { color: var(--muted); font-size: .7rem; font-weight: 650; }
.semantic-instruction-toolbar select { width: auto; min-width: 132px; min-height: 34px; padding: 5px 30px 5px 10px; font-size: .72rem; }
.semantic-help { margin: 0 0 13px; color: var(--muted); font-size: .74rem; line-height: 1.55; }
.semantic-instruction-workspace { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); gap: 14px; align-items: stretch; }
.semantic-instruction-master,
.semantic-editor-pane { min-width: 0; height: 856px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.semantic-instruction-master { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.semantic-instruction-master-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.semantic-instruction-master-heading strong { font-size: .8rem; }
.semantic-instruction-master-heading span { font-size: .66rem; }
.semantic-definition-list { height: 808px; display: grid; align-content: start; gap: 8px; padding: 8px; overflow-y: auto; scrollbar-gutter: stable; }
.semantic-instruction-card { min-width: 0; height: 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; align-items: center; padding: 8px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; cursor: pointer; }
.semantic-instruction-card:hover { border-color: #abd4c5; background: #f8fcfa; }
.semantic-instruction-card:focus-visible { border-color: #238d69; box-shadow: 0 0 0 3px rgba(35, 141, 105, .16); }
.semantic-instruction-card.selected { border-color: #55ad8e; background: #eaf7f2; box-shadow: 0 5px 14px rgba(8, 127, 91, .08); }
.semantic-instruction-card .semantic-action-heading,
.semantic-instruction-description,
.semantic-instruction-meta { grid-column: 1; }
.semantic-instruction-description { overflow: hidden; margin: 0; color: #42554e; font-size: .69rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.semantic-instruction-meta { display: flex; gap: 6px 10px; overflow: hidden; color: var(--muted); font-size: .63rem; white-space: nowrap; }
.semantic-route-summary { min-height: 808px; padding: 18px; background: #fff; }
.semantic-route-summary-intro { margin: 18px 0 14px; padding: 13px 14px; border: 1px solid #cfe3db; border-radius: 10px; color: #29483d; background: #f3faf7; line-height: 1.65; }
.semantic-route-facts { display: grid; grid-template-columns: 120px minmax(0,1fr); margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.semantic-route-facts dt,
.semantic-route-facts dd { margin: 0; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.semantic-route-facts dt { color: var(--muted); background: #f7f9f8; font-size: .7rem; font-weight: 750; }
.semantic-route-facts dd { color: var(--text); font-size: .74rem; }
.semantic-route-facts > :nth-last-child(-n+2) { border-bottom: 0; }
.semantic-route-products { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.semantic-route-products h3 { margin: 0 0 5px; font-size: .84rem; }
.semantic-route-products > p { margin: 0 0 12px; color: var(--muted); font-size: .7rem; line-height: 1.55; }
.semantic-route-product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.semantic-route-product { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #fff; text-align: left; }
.semantic-route-product:hover { border-color: #79bea5; background: #f7fcfa; }
.semantic-action-card { min-width: 0; display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.semantic-action-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.semantic-action-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .42fr); gap: 9px; }
.semantic-field { min-width: 0; display: grid; gap: 5px; color: #52635d; font-size: .7rem; font-weight: 700; }
.semantic-field.wide-field { grid-column: 1 / -1; }
.semantic-field input,
.semantic-field select,
.semantic-field textarea { width: 100%; border: 1px solid #cad7d2; border-radius: 9px; padding: 8px 11px; color: var(--text); background: #fff; font: inherit; font-weight: 400; }
.semantic-field textarea { min-height: 62px; resize: vertical; }
.semantic-model-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.semantic-model-control button { min-width: 76px; white-space: nowrap; }
.semantic-enable { display: flex; align-items: center; gap: 7px; color: #34443e; font-size: .76rem; font-weight: 700; }
.semantic-enable input { width: 18px; min-height: 18px; }
.semantic-action-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }
.semantic-editor-page { min-width: 0; }
.semantic-editor-empty { height: 100%; display: grid; place-content: center; gap: 7px; padding: 24px; color: var(--muted); text-align: center; }
.semantic-editor-empty strong { color: #344a42; font-size: .9rem; }
.semantic-editor-empty span { max-width: 360px; font-size: .7rem; line-height: 1.55; }
.semantic-editor-empty[hidden],
.semantic-editor-form[hidden] { display: none; }
.semantic-editor-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.semantic-editor-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.semantic-editor-toolbar h2 { margin: 2px 0 0; font-size: 1.15rem; }
.semantic-editor-kicker { color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: .08em; }
.semantic-editor-form { height: 100%; display: grid; align-content: start; gap: 16px; padding: 18px; overflow-y: auto; background: #fff; }
.semantic-editor-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
.semantic-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr); gap: 14px; }
.semantic-editor-grid textarea { min-height: 105px; line-height: 1.55; }
.semantic-editor-grid #semantic-editor-examples { min-height: 170px; }
.semantic-editor-grid .semantic-field small { color: var(--muted); font-size: .65rem; font-weight: 400; line-height: 1.45; }
.semantic-comment-dynamic-info { padding: 12px 14px; border: 1px solid #b9ded1; border-radius: 10px; background: #f0faf6; }
.semantic-comment-dynamic-info strong { color: #08775b; font-size: .78rem; }
.semantic-comment-dynamic-info span { color: #304b42; font-size: .72rem; font-weight: 500; line-height: 1.55; }
.semantic-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.semantic-call-panel { min-height: 0; }
.semantic-call-content { min-width: 0; }
.semantic-call-layout { display: grid; grid-template-columns: minmax(280px, 0.36fr) minmax(0, 1fr); height: clamp(540px, calc(100dvh - 360px), 760px); min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfc; }
.semantic-call-master { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border-right: 1px solid var(--line); background: var(--surface-soft); }
.semantic-call-master-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.semantic-call-master-heading strong { color: #233d34; font-size: .78rem; }
.semantic-call-master-heading span { color: var(--muted); font-size: .65rem; }
.semantic-call-list { min-height: 0; display: grid; align-content: start; gap: 7px; padding: 9px; margin: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; list-style: none; }
.semantic-call-item { width: 100%; display: grid; gap: 7px; padding: 11px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: #fff; text-align: left; }
.semantic-call-item:hover { border-color: #b8d9cd; background: #f8fcfa; }
.semantic-call-item.selected { border-color: #69b99e; background: #ebf8f3; box-shadow: 0 5px 14px rgba(8, 127, 91, .08); }
.semantic-call-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.semantic-call-item-meta { color: var(--muted); font-size: .68rem; line-height: 1.45; }
.semantic-call-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border-top: 1px solid var(--line); background: #fff; }
.semantic-call-detail { min-width: 0; min-height: 0; height: 100%; padding: 15px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #fbfdfc; }
.semantic-call-detail-empty { min-height: 420px; display: grid; place-content: center; gap: 8px; color: var(--muted); text-align: center; }
.semantic-call-detail-empty strong { color: #3e514a; }
.semantic-call-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.semantic-call-detail-header h3 { margin: 0 0 5px; }
.semantic-call-detail-header p { margin: 0; color: var(--muted); font-size: .7rem; }
.semantic-call-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.semantic-call-fact { min-width: 0; display: grid; gap: 3px; padding: 9px 10px; border-radius: 9px; background: #edf6f2; }
.semantic-call-fact span { color: var(--muted); font-size: .64rem; }
.semantic-call-fact strong { overflow-wrap: anywhere; font-size: .74rem; }
.semantic-call-section { margin-top: 11px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.semantic-call-section h4 { margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--line); color: #40534c; background: #f5f9f7; font-size: .72rem; }
.semantic-call-section pre { max-height: 320px; margin: 0; padding: 12px; overflow: auto; color: #25332e; background: #fff; font: .7rem/1.58 Consolas, "Microsoft YaHei UI", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.semantic-call-section.error { border-color: #efd0cc; }
.semantic-call-section.error h4 { color: var(--danger); background: var(--danger-soft); }
.semantic-call-section.request { border-left: 3px solid #79bda6; }
.semantic-call-section.response { border-left: 3px solid #5c91ac; }
.semantic-call-section.response h4 { color: #315d72; background: #f1f7fa; }
.ai-call-statistics { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; margin: 0 0 14px; }
.ai-call-statistics > div { min-width: 0; padding: 13px 12px; border: 1px solid #dbe9e3; border-radius: 11px; background: linear-gradient(145deg, #fbfdfc, #f1f8f5); }
.ai-call-statistics dt { color: var(--muted); font-size: .68rem; }
.ai-call-statistics dd { margin: 6px 0 0; color: #153c30; font-size: 1.15rem; font-weight: 780; }
.ai-call-source-tabs { margin-bottom: 13px; }
.semantic-call-item-conclusion { color: #143e32; font-size: .78rem; line-height: 1.55; }
.semantic-call-item-result-label { width: max-content; padding: 2px 6px; border-radius: 5px; color: #087455; background: #e8f6f0; font-size: .61rem; font-weight: 750; letter-spacing: .04em; }
.semantic-call-item-input { display: -webkit-box; overflow: hidden; color: #64736d; font-size: .7rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ai-call-business-view { display: grid; gap: 10px; margin: 14px 0; }
.ai-call-user-input, .ai-call-final-answer { display: grid; gap: 9px; padding: 16px; border-radius: 12px; }
.ai-call-user-input { border: 1px solid #d7e2de; background: #f7faf9; }
.ai-call-card-label { color: #5a6e67; font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.ai-call-user-input blockquote { margin: 0; padding-left: 12px; border-left: 3px solid #90aaa0; color: #203d34; font-size: .92rem; font-style: normal; font-weight: 650; line-height: 1.7; white-space: pre-wrap; }
.ai-call-final-answer { border: 1px solid #a9d9c6; background: linear-gradient(145deg, #eef9f4, #e4f5ed); box-shadow: 0 6px 18px rgba(21, 105, 79, .07); }
.ai-call-conclusion-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-call-conclusion-heading > span:first-child { color: #087455; font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.ai-call-return-state { padding: 4px 8px; border-radius: 999px; color: #087455; background: #d8f0e6; font-size: .65rem; font-weight: 750; }
.ai-call-return-state.error { color: var(--danger); background: var(--danger-soft); }
.ai-call-final-answer > strong { color: #123e31; font-size: 1rem; line-height: 1.65; }
.ai-call-final-answer > p { margin: 0; color: #536861; font-size: .76rem; line-height: 1.65; }
.ai-call-returned-actions { display: grid; gap: 8px; margin-top: 3px; }
.ai-call-returned-action { display: grid; gap: 6px; padding: 11px 12px; border: 1px solid #c9e5da; border-radius: 9px; background: #fff; }
.ai-call-returned-action-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-call-returned-action-heading strong { color: #143e32; font-size: .8rem; }
.ai-call-returned-action p { margin: 0; color: #4e625b; font-size: .72rem; line-height: 1.55; }
.ai-call-returned-action .ai-call-returned-action-meta { color: #6b7c76; }
.ai-call-no-action { padding: 9px 10px; border-radius: 8px; background: rgba(255, 255, 255, .78); }
.ai-call-final-answer.error { border-color: #edcbc6; background: #fff5f3; box-shadow: none; }
.ai-call-final-answer.error > span, .ai-call-final-answer.error > strong { color: var(--danger); }
.ai-call-technical { margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.ai-call-technical > summary { padding: 12px 14px; color: #4d625a; cursor: pointer; font-size: .75rem; font-weight: 700; }
.ai-call-technical[open] > summary { border-bottom: 1px solid var(--line); }
.ai-call-technical .semantic-call-section { margin: 11px; }
.semantic-call-hidden-delete { display: none; }

.app-confirm-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; color: var(--text); background: transparent; box-shadow: 0 24px 70px rgba(24, 54, 45, .24); }
.app-confirm-dialog::backdrop { background: rgba(18, 34, 29, .42); backdrop-filter: blur(2px); }
.app-confirm-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 22px; border: 1px solid #dce8e4; border-radius: 16px; background: #fff; }
.app-confirm-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #a33126; background: #fff0ee; font-size: 1.1rem; font-weight: 900; }
.app-confirm-card h2 { margin: 1px 0 7px; font-size: 1rem; }
.app-confirm-card p { margin: 0; color: #344a42; font-size: .78rem; line-height: 1.55; }
.app-confirm-card small { display: block; margin-top: 6px; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.app-confirm-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(400px, calc(100% - 40px));
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  background: #176a51;
  box-shadow: 0 14px 35px rgba(19, 70, 54, .2);
}
.toast.error { background: #9f251b; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .ai-call-statistics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .semantic-comparison-summary { grid-template-columns: 1fr; }
  .semantic-comparison-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-main { align-items: flex-start; padding: 12px 0; }
  .header-actions { flex-wrap: wrap; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .broadcaster-grid { grid-template-columns: minmax(0, 1fr); }
  .asr-grid { grid-template-columns: minmax(0, 1fr); }
  .semantic-grid { grid-template-columns: minmax(0, 1fr); }
  .semantic-config-layout { grid-template-columns: minmax(0, 1fr); }
  .semantic-guide-layout { grid-template-columns: minmax(0, 1fr); }
  .semantic-flow { grid-template-columns: minmax(0, 1fr); }
  .semantic-flow-arrow { transform: rotate(90deg); }
  .semantic-trace-layout,
  .semantic-rules-layout { grid-template-columns: minmax(0, 1fr); }
  .semantic-history-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .semantic-live-stages,
  .semantic-trace-stages { grid-template-columns: minmax(0, 1fr); }
  .semantic-instruction-workspace { grid-template-columns: minmax(0, 1fr); }
  .semantic-instruction-master { height: 520px; }
  .semantic-definition-list { height: 472px; }
  .semantic-editor-pane { height: auto; min-height: 650px; }
  .semantic-call-layout { grid-template-columns: minmax(230px, .42fr) minmax(0, 1fr); }
  .semantic-call-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asr-task-operation { grid-template-columns: max-content minmax(0, 1fr) auto; }
  .broadcaster-card-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .caption-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caption-filter-actions { align-self: end; }
}

@media (max-width: 680px) {
  .ai-call-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-main,
  .module-nav,
  .workspace { width: min(100% - 24px, 1280px); }
  .app-header { position: static; }
  .header-main { gap: 10px; flex-wrap: wrap; }
  .module-nav { padding-bottom: 7px; }
  .nav-tab { padding-inline: 5px; font-size: .82rem; }
  .workspace { padding-top: 12px; }
  .panel { padding: 16px; border-radius: 12px; }
  .panel-heading { margin-bottom: 13px; }
  .field-grid { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .stream-code-heading { grid-template-columns: minmax(0, 1fr) auto; }
  .stream-code-heading .actions { grid-column: 1 / -1; }
  .field-grid input { margin-bottom: 5px; }
  .configuration-state { justify-items: start; text-align: left; }
  .panel-heading { flex-direction: column; gap: 6px; }
  .semantic-config-header { min-height: 74px; padding: 14px 16px; }
  .semantic-config-summary { gap: 8px; }
  .semantic-config-toolbar { align-items: flex-start; flex-direction: column; padding: 12px 16px 0; }
  .semantic-config-toolbar .actions { width: 100%; }
  .semantic-config-layout { padding: 12px; }
  .semantic-service-grid { grid-template-columns: minmax(0, 1fr); }

  .broadcaster-card { grid-template-columns: minmax(0, 1fr); }
  .broadcaster-card-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .broadcaster-card-actions { grid-column: 1; grid-row: auto; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }

  .responsive-table thead { display: none; }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td { display: block; width: 100%; }
  .responsive-table tbody { display: grid; gap: 10px; }
  .responsive-table tr { padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
  .responsive-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; max-width: none; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 700; }
  .responsive-table td.empty { display: block; border: 0; }
  .responsive-table td.empty::before { content: none; }
  .caption { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .captions-panel { min-height: 0; }
  .caption-filter-form { grid-template-columns: minmax(0, 1fr); }
  .caption-history-layout { grid-template-columns: minmax(0, 1fr); }
  .caption-history-list,
  .caption-detail-list { min-height: 0; max-height: none; }
  .caption-detail-sections { min-height: 0; grid-template-rows: auto auto; }
  .caption-full-text,
  .caption-segments-section .caption-detail-list { min-height: 0; max-height: none; }
  .asr-task-facts { grid-template-columns: minmax(0, 1fr); }
  .asr-task-operation { grid-template-columns: minmax(0, 1fr); }
  .semantic-action-grid { grid-template-columns: minmax(0, 1fr); }
  .semantic-normalization-form { grid-template-columns: minmax(0, 1fr); }
  .semantic-normalization-arrow { display: none; }
  .semantic-normalization-row { align-items: flex-start; flex-direction: column; }
  .semantic-instruction-card { height: auto; grid-template-columns: minmax(0, 1fr); }
  .semantic-factory-stage { grid-template-columns: 104px minmax(0, 1fr); gap: 8px; }
  .semantic-factory-rail { grid-template-columns: 23px minmax(0, 1fr); padding-right: 7px; }
  .semantic-factory-rail .semantic-trace-number { width: 22px; height: 22px; }
  .semantic-editor-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .semantic-back-button { grid-column: 1 / -1; justify-self: start; }
  .semantic-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .semantic-editor-footer { align-items: flex-start; flex-direction: column; }
  .semantic-field.wide-field { grid-column: auto; }
  .semantic-call-layout { height: auto; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .semantic-call-master { height: 340px; border-right: 0; border-bottom: 1px solid var(--line); }
  .semantic-call-detail { height: auto; min-height: 460px; }
  .live-task-list,
  .history-task-pane .caption-history-list { min-height: 0; max-height: none; }
  .login-screen { padding: 16px; }
  .login-card { padding: 24px; border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
:root .semantic-runtime-status {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #edf8f4;
  color: #21715b;
  font-size: 13px;
  line-height: 1.5;
}
:root .semantic-runtime-status.error { background: #fff1ed; color: #a43425; }

.video-metadata-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .7fr); gap: 12px; width: 100%; }
.video-metadata-fields label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.video-metadata-editor { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.video-metadata-editor .video-metadata-fields { margin-bottom: 12px; }
.video-metadata-editor button + button { margin-left: 8px; }
.video-source-filename { overflow-wrap: anywhere; font-size: 12px; }
.video-semantic-toolbar { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.video-semantic-toolbar select { flex: 1; min-width: 0; }
#semantic-history-panel > .panel-heading { display: none; }
#semantic-history-panel .recognition-history-source-tabs { margin-bottom: 10px; }
#video-semantic-panel > p:first-child, #video-semantic-message:empty { display: none; }
#video-semantic-panel .video-semantic-toolbar { margin: 8px 0; }
#video-semantic-panel .video-history-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 0; height: var(--video-history-height, max(440px, calc(100dvh - 300px))); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
#video-semantic-panel .video-history-master { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; }
#video-semantic-runs { flex: 1; min-height: 0; height: auto; padding: 8px; overscroll-behavior: contain; scrollbar-gutter: stable; }
#video-semantic-runs .video-history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 12px; }
#video-semantic-runs .video-history-item strong { min-width: 0; font-size: 13px; }
#video-semantic-runs .video-history-item small { grid-column: 1 / -1; line-height: 1.5; }
#video-semantic-runs .video-history-item .badge { align-self: start; }
#video-semantic-panel .video-history-pagination { flex: 0 0 auto; padding: 10px; font-size: 11px; }
#video-semantic-detail { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.video-history-detail-top { flex: 0 0 auto; min-width: 0; padding: 14px 16px 0; }
.video-history-detail-top > .video-detail-heading { align-items: center; flex-wrap: wrap; }
.video-history-detail-top > .video-detail-heading > div:first-child { flex: 1; min-width: 0; }
.video-history-detail-top h3 { font-size: 16px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.video-history-detail-top .video-detail-heading p { margin: 5px 0 0; font-size: 11px; }
.video-history-detail-top .video-detail-actions { margin: 0; }
.video-history-detail-top > progress { height: 4px; margin: 10px 0 6px; }
.video-history-detail-top > p { margin: 0; font-size: 11px; overflow-wrap: anywhere; }
.video-history-detail-top > p.error { max-height: 80px; overflow-y: auto; }
#video-semantic-detail > .video-semantic-items { flex: 1; min-height: 0; max-height: none; padding: 12px 16px; overscroll-behavior: contain; scrollbar-gutter: stable; }
#video-semantic-detail > .video-history-pagination { border-top: 1px solid var(--line); padding-inline: 16px; }
#video-semantic-detail > .empty { display: grid; align-content: center; flex: 1; text-align: center; padding: 20px; }
.video-semantic-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.video-semantic-metric { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #dce8e3; border-radius: 10px; background: #f7faf9; }
.video-semantic-metric span { color: var(--muted); font-size: 11px; }
.video-semantic-metric strong { color: #263e35; font-size: 21px; }
.video-semantic-metric.success { border-color: #cbe6da; background: #eff9f5; }
.video-semantic-metric.success strong { color: #087658; }
.video-semantic-metric.warning { border-color: #efcfbf; background: #fff6f1; }
.video-semantic-metric.warning strong { color: #a23d2c; }
.video-semantic-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 10px; margin: 10px 0 0; border: 1px solid #d8e6df; border-radius: 10px; background: #fbfdfc; }
.video-semantic-filter-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.video-semantic-filter-field { display: grid; min-width: 0; gap: 5px; color: #52635c; font-size: 11px; font-weight: 600; }
.video-semantic-filter { width: 100%; min-width: 0; min-height: 34px; height: 34px; padding: 6px 28px 6px 9px; border: 1px solid #d6e3de; border-radius: 7px; color: #344f44; background-color: #fff; font-size: 11px; font-weight: 400; }
.video-semantic-filter:hover { border-color: #8fc7b6; color: #087658; }
.video-semantic-filter.active { border-color: #078866; color: #087658; background-color: #edf8f3; }
.video-semantic-filter-footer { display: grid; gap: 5px; }
.video-semantic-filter-footer .muted { font-size: 11px; }
.video-semantic-filter-footer button { min-height: 34px; padding: 6px 8px; font-size: 11px; }
.video-history-detail-top .video-semantic-summary { gap: 8px; margin: 10px 0; }
.video-history-detail-top .video-semantic-metric { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; gap: 8px; border-radius: 8px; }
.video-history-detail-top .video-semantic-metric strong { font-size: 18px; }
.video-semantic-items { display: grid; align-content: start; gap: 16px; max-height: 720px; overflow-y: auto; padding-right: 6px; }
.video-semantic-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.video-semantic-item.ai-overridden { border-color: #e7b8a5; box-shadow: inset 4px 0 #c95a41; }
.video-segment-heading { align-items: center; padding-bottom: 10px; border-bottom: 1px solid #e5ece8; }
.video-segment-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.video-semantic-original { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.video-semantic-item details { margin: 10px 0; }
.video-semantic-item summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.video-semantic-step { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--line); padding: 10px 0; font-size: 12px; }
.video-semantic-step p { margin: 0 0 6px; overflow-wrap: anywhere; }
.video-semantic-step pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.video-semantic-command { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px; margin: 8px 0; background: #e2f5ed; border-radius: 8px; }
.video-semantic-command-heading { display: inline-flex; align-items: center; gap: 7px; }
.video-semantic-command-value { font-weight: 700; color: #145d48; }
.video-semantic-command small { flex-basis: 100%; }
.video-model-comparison { display: grid; gap: 12px; padding: 14px; margin: 14px 0; border: 1px solid #dce8e3; border-radius: 11px; background: #f8fbfa; }
.video-model-comparison-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.video-model-comparison-heading > strong { font-size: 13px; }
.video-model-comparison-heading > .badge { max-width: 72%; white-space: normal; text-align: right; line-height: 1.5; }
.video-ai-override-alert { display: flex; align-items: flex-start; gap: 12px; padding: 11px 13px; border: 1px solid #efc3b2; border-radius: 9px; color: #833426; background: #fff3ed; }
.video-ai-override-alert strong { flex: 0 0 auto; font-size: 12px; }
.video-ai-override-alert span { font-size: 11px; line-height: 1.6; }
.video-model-comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.video-model-results-dual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-routing-context { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; padding-bottom: 12px; border-bottom: 1px solid #dce8e3; }
.video-routing-context small { flex-basis: 100%; }
.video-parser-result { display: flex; flex-direction: column; gap: 9px; }
.video-parser-rejected { padding: 9px 11px; border-radius: 6px; background: #fff3dd; color: #805515; overflow-wrap: anywhere; }
.qwen-review-explanation { display: block; margin: 0; overflow-wrap: anywhere; }
.qwen-review-explanation.alert-warning { color: #704814; }
.qwen-review-explanation p { margin: 7px 0; }
.qwen-review-scores { margin-top: 10px; font-size: 12px; }
.qwen-review-scores > summary { cursor: pointer; }
.qwen-review-scores > div { margin-top: 6px; }
.video-model-column { min-width: 0; padding: 12px; border: 1px solid #dfe9e4; border-radius: 9px; background: white; }
.video-model-column-title { display: block; margin-bottom: 10px; color: #536c62; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.video-model-column > p { margin: 0; font-size: 11px; line-height: 1.6; }
.video-model-column pre { max-height: 300px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.video-laya-route, .video-ai-review { display: grid; gap: 7px; padding: 10px; border-radius: 8px; background: #f3f7f5; }
.video-laya-route + .video-laya-route, .video-ai-review + .video-ai-review { margin-top: 8px; }
.video-laya-route > strong, .video-ai-review > strong { overflow-wrap: anywhere; font-size: 12px; }
.video-laya-route .badge, .video-ai-review .badge { justify-self: start; }
.video-ai-review p { margin: 0; font-size: 11px; line-height: 1.55; }
.video-ai-review.confirmed { border: 1px solid #cce7dc; background: #edf8f4; }
.video-ai-review.rejected { border: 1px solid #edc5b5; background: #fff3ed; }
.video-ai-review.pending { border: 1px solid #dde4e1; }
.video-model-column.output .video-semantic-command { display: grid; align-items: start; margin: 0; }
.video-model-column.output .video-semantic-command + .video-semantic-command { margin-top: 8px; }
.video-final-empty { display: grid; gap: 6px; padding: 14px; border: 1px dashed #d2ded9; border-radius: 8px; color: #6a7872; background: #f7f9f8; }
.video-final-empty strong { color: #42574f; font-size: 12px; }
.video-final-empty span { font-size: 11px; }
.video-semantic-filter-empty { display: grid; place-items: center; gap: 7px; min-height: 180px; border: 1px dashed #cadbd4; border-radius: 12px; background: #fafcfb; }

.semantic-retrieval-page { display: grid; gap: 16px; }
.semantic-retrieval-model-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px; border: 1px solid #cfe4da; border-radius: 12px; background: linear-gradient(135deg, #f1faf6, #fff); }
.semantic-retrieval-model-card > div { display: grid; gap: 5px; }
.semantic-retrieval-kicker { color: #16815f; font-size: 11px; font-weight: 700; }
.semantic-retrieval-model-card strong { font-size: 17px; }
.semantic-retrieval-model-card p { margin: 0; color: #637269; font-size: 12px; }
.semantic-retrieval-model-card dl { display: flex; gap: 10px; margin: 0; }
.semantic-retrieval-model-card dl div { min-width: 100px; padding: 10px 12px; border-radius: 9px; background: #e7f5ef; }
.semantic-retrieval-model-card dt { color: #61736a; font-size: 10px; }
.semantic-retrieval-model-card dd { margin: 3px 0 0; color: #173b2e; font-size: 13px; font-weight: 700; }
.semantic-retrieval-settings-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto; align-items: end; gap: 16px; padding: 16px 18px; border: 1px solid #d8e6df; border-radius: 11px; background: #fbfdfc; }
.semantic-retrieval-settings-form > div { align-self: center; }
.semantic-retrieval-settings-form strong { display: block; margin-bottom: 5px; font-size: 13px; }
.semantic-retrieval-settings-form p { margin: 0; color: #66766e; font-size: 11px; line-height: 1.55; }
.semantic-retrieval-settings-form label { display: grid; gap: 6px; color: #344b41; font-size: 11px; font-weight: 700; }
.semantic-retrieval-settings-form input { width: 100%; }
.semantic-retrieval-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.semantic-retrieval-flow section { display: flex; gap: 12px; min-height: 112px; padding: 16px; border: 1px solid #dce7e1; border-radius: 11px; background: #fbfdfc; }
.semantic-retrieval-flow section > span { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; color: #087756; background: #e4f4ed; font-size: 12px; font-weight: 800; }
.semantic-retrieval-flow strong { display: block; margin: 3px 0 7px; font-size: 13px; }
.semantic-retrieval-flow p { margin: 0; color: #65736c; font-size: 11px; line-height: 1.65; }
.semantic-retrieval-history { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid #dce7e1; }
.semantic-retrieval-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.semantic-retrieval-history-heading h3 { margin: 0 0 4px; font-size: 16px; }
.semantic-retrieval-history-heading p { margin: 0; color: #68776f; font-size: 11px; }
.semantic-retrieval-history-tools { display: flex; align-items: center; gap: 8px; }
.semantic-retrieval-history-layout { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); height: 620px; overflow: hidden; border: 1px solid #d8e4de; border-radius: 12px; background: #fff; }
.semantic-retrieval-history-list-shell { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; border-right: 1px solid #dce7e1; background: #f8fbf9; }
.semantic-retrieval-history-list { min-height: 0; margin: 0; padding: 10px; overflow-y: auto; list-style: none; }
.semantic-retrieval-history-list > li + li { margin-top: 8px; }
.semantic-retrieval-history-list .empty { padding: 28px 16px; color: #718078; text-align: center; font-size: 12px; }
.semantic-retrieval-history-item { display: grid; width: 100%; gap: 8px; padding: 13px; border: 1px solid #dce6e1; border-radius: 10px; color: #23382f; background: #fff; text-align: left; }
.semantic-retrieval-history-item:hover { border-color: #99cdb9; background: #f4fbf8; }
.semantic-retrieval-history-item.selected { border-color: #15906b; box-shadow: 0 0 0 2px rgb(21 144 107 / 10%); background: #eef9f4; }
.semantic-retrieval-history-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.semantic-retrieval-history-item-heading strong { min-width: 0; font-size: 12px; }
.semantic-retrieval-history-source { display: -webkit-box; overflow: hidden; color: #43594f; font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.semantic-retrieval-history-meta { color: #78877f; font-size: 10px; line-height: 1.5; }
.semantic-retrieval-history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-top: 1px solid #dce7e1; font-size: 11px; }
.semantic-retrieval-history-detail { min-width: 0; padding: 22px; overflow-y: auto; }
.semantic-retrieval-history-detail > .empty { display: grid; min-height: 100%; place-items: center; color: #74827a; font-size: 12px; }
.semantic-retrieval-history-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.semantic-retrieval-history-detail-heading h3 { margin: 4px 0; font-size: 17px; }
.semantic-retrieval-history-detail-heading p { margin: 0; color: #75837b; font-size: 11px; }
.semantic-retrieval-history-kind { color: #0b8460; font-size: 10px; font-weight: 800; }
.semantic-retrieval-history-caption { margin: 18px 0; padding: 14px 16px; border-left: 3px solid #15906b; border-radius: 0 9px 9px 0; color: #23372e; background: #f1f8f5; font-size: 13px; line-height: 1.7; }
.semantic-retrieval-history-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 20px; }
.semantic-retrieval-history-summary-item { min-width: 0; padding: 11px; border-radius: 9px; background: #f3f7f5; }
.semantic-retrieval-history-summary dt { color: #718078; font-size: 10px; }
.semantic-retrieval-history-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #20392e; font-size: 12px; font-weight: 750; }
.semantic-retrieval-candidate-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.semantic-retrieval-candidate-heading h4 { margin: 0; font-size: 13px; }
.semantic-retrieval-candidate-heading span { font-size: 10px; }
.semantic-retrieval-candidates { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.semantic-retrieval-candidate { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #dfe8e3; border-radius: 9px; }
.semantic-retrieval-candidate-rank { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #087957; background: #e6f5ef; font-size: 11px; font-weight: 800; }
.semantic-retrieval-candidate-copy { display: grid; min-width: 0; gap: 4px; }
.semantic-retrieval-candidate-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.semantic-retrieval-candidate-copy span { color: #74827a; font-size: 10px; }
.semantic-retrieval-candidate-result { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.semantic-retrieval-candidate-result > strong { font-size: 12px; }
.semantic-retrieval-candidate-result > span:not(.badge) { color: #74827a; font-size: 9px; }
.semantic-retrieval-history-raw { margin-top: 14px; color: #5e6f66; font-size: 11px; }
.semantic-retrieval-history-raw pre { max-height: 280px; padding: 12px; overflow: auto; border-radius: 8px; background: #f4f7f5; white-space: pre-wrap; }
@container (max-width: 950px) {
  .video-semantic-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 800px) {
  #video-semantic-panel .video-history-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  #video-semantic-panel .video-history-master { height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  #video-semantic-detail { height: max(620px, var(--video-history-height, 620px)); }
  .video-semantic-filters { grid-template-columns: minmax(0, 1fr); }
  .video-semantic-filter-footer { display: flex; align-items: center; justify-content: space-between; }
}
@media (max-width: 1100px) {
  .video-model-comparison-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .video-metadata-fields { grid-template-columns: minmax(0, 1fr); }
  .video-semantic-toolbar { align-items: stretch; flex-direction: column; }
  .video-semantic-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-model-comparison-heading, .video-ai-override-alert { align-items: stretch; flex-direction: column; }
  .video-model-comparison-heading > .badge { max-width: none; text-align: left; }
  .video-semantic-step { grid-template-columns: 80px minmax(0, 1fr); }
  .semantic-retrieval-model-card { align-items: stretch; flex-direction: column; }
  .semantic-retrieval-model-card dl { flex-wrap: wrap; }
  .semantic-retrieval-settings-form { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .semantic-retrieval-flow { grid-template-columns: minmax(0, 1fr); }
  .semantic-retrieval-history-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .semantic-retrieval-history-list-shell { max-height: 420px; border-right: 0; border-bottom: 1px solid #dce7e1; }
  .semantic-retrieval-history-detail { min-height: 420px; }
  .semantic-retrieval-history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .semantic-retrieval-candidate { grid-template-columns: 34px minmax(0, 1fr); }
  .semantic-retrieval-candidate-result { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
}
