@import url("https://static.yanbeiai.com/features-20261101-r1/static__linsi__assets__sidebar-icons-minimal.css");
@import url("https://static.yanbeiai.com/features-20261101-r1/static__linsi__assets__system-settings.css");
@import url("https://static.yanbeiai.com/features-20261101-r1/static__linsi__assets__review-navigation.css");
@import url("https://static.yanbeiai.com/features-20261101-r1/static__linsi__assets__content-assets-navigation-motion.css");

:root {
  color-scheme: light;
  --v3-bg: #f6f8fc;
  --v3-surface: #ffffff;
  --v3-surface-soft: #f8faff;
  --v3-ink: #0f172a;
  --v3-muted: #64748b;
  --v3-line: #e2e8f0;
  --v3-primary: #3f6faf;
  --v3-primary-2: #6c5a9f;
  --v3-primary-soft: #eef3fa;
  --v3-good: #13875d;
  --v3-warn: #b7791f;
  --v3-bad: #dc4c5a;
  --v3-gradient: linear-gradient(135deg, #5686c2 0%, #4c72b1 54%, #6c5a9f 100%);
  --v3-shadow: 0 14px 38px rgba(15, 23, 42, .065);
  --v3-shadow-strong: 0 18px 46px rgba(15, 23, 42, .12);
  --v3-radius: 18px;
  --bg: #f6f8fc;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f8faff;
  --panel-soft: #f1f5ff;
  --line: #e2e8f0;
  --muted: #64748b;
  --text: #0f172a;
  --soft: #334155;
  --accent: #3f6faf;
  --accent-2: #6c5a9f;
  --cyan: #3f6faf;
  --violet: #6c5a9f;
  --warn: #b7791f;
  --bad: #dc4c5a;
  --ok: #13875d;
}

/* AI competitor discovery: review-first, responsive candidate queue. */
.competitor-discovery-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(860px, calc(100dvh - 32px));
}

.competitor-discovery-shell {
  display: grid;
  gap: 16px;
}

.competitor-discovery-modal .competitor-discovery-shell > .competitor-discovery-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: end;
  gap: 12px 16px;
  padding: 16px;
}

.competitor-discovery-form #discovery-request-text {
  min-height: 76px;
  height: 76px;
  max-height: 160px;
  margin: 0;
  resize: vertical;
}

.competitor-discovery-form .v3-card-actions.compact {
  align-items: end;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
}

.competitor-discovery-form .v3-btn { min-height: 44px; padding: 10px 12px; }
.competitor-discovery-form > p { grid-column: 1 / -1; margin: 0; }
.competitor-discovery-candidate > p { margin: 0; line-height: 1.65; }
.competitor-discovery-modal .competitor-discovery-shell > .small { margin: 0; }
.competitor-discovery-profile .checkbox-row { white-space: nowrap; }

.competitor-discovery-issue {
  padding: 22px;
  border: 1px solid #f2d6b3;
  border-radius: 16px;
  background: #fffaf2;
  color: #1e293b;
}

.competitor-discovery-issue strong { display: block; font-size: 17px; }
.competitor-discovery-issue p { margin: 8px 0 18px; line-height: 1.65; color: #475569; }
.competitor-discovery-issue .v3-card-actions { justify-content: flex-start; }

@media (max-width: 640px) {
  .competitor-discovery-modal .competitor-discovery-shell > .competitor-discovery-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .competitor-discovery-issue .v3-card-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

.competitor-discovery-progress,
.competitor-discovery-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line, #dfe5ef);
  border-radius: 16px;
  background: var(--surface-soft, #f7f9fc);
}

.competitor-discovery-progress > div,
.competitor-discovery-summary > div {
  min-width: 0;
}

.competitor-discovery-progress strong,
.competitor-discovery-summary strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.competitor-discovery-progress p,
.competitor-discovery-summary p {
  margin: 0;
  color: var(--text-muted, #667085);
}

.competitor-discovery-query-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.competitor-discovery-query-list span,
.competitor-discovery-summary > span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .09);
  color: #1d4ed8;
  font-size: 12px;
  white-space: nowrap;
}

.competitor-discovery-list {
  display: grid;
  gap: 12px;
}

.competitor-discovery-candidate {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line, #dfe5ef);
  border-radius: 16px;
  background: var(--surface, #fff);
}

.competitor-discovery-profile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.competitor-discovery-profile .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.competitor-discovery-profile strong,
.competitor-discovery-profile span {
  display: block;
}

.competitor-discovery-profile span,
.competitor-discovery-profile p {
  margin: 3px 0 0;
  color: var(--text-muted, #667085);
  font-size: 13px;
}

.competitor-discovery-score {
  display: grid;
  min-width: 62px;
  text-align: center;
  color: #1d4ed8;
  font-size: 22px;
}

.competitor-discovery-score small {
  color: var(--text-muted, #667085);
  font-size: 11px;
  font-weight: 500;
}

.competitor-discovery-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.competitor-discovery-evidence span,
.competitor-discovery-evidence a {
  display: block;
  overflow: hidden;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--surface-soft, #f7f9fc);
  color: var(--text-muted, #667085);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-discovery-evidence a,
.competitor-discovery-profile span a {
  color: #1d4ed8;
  text-decoration: none;
}

.competitor-discovery-evidence a:hover,
.competitor-discovery-profile span a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .competitor-discovery-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .competitor-discovery-profile {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .competitor-discovery-profile .avatar {
    width: 42px;
    height: 42px;
  }

  .competitor-discovery-summary,
  .competitor-discovery-progress {
    align-items: flex-start;
  }

  .competitor-discovery-candidate .v3-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .competitor-discovery-candidate .v3-card-actions .primary {
    grid-column: 1 / -1;
  }
}

/* Laboratory auto-editor workspace. */
.auto-caption-workspace-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 18px;
  background: #f4f6f8;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .09);
}

.auto-caption-workspace-mount { min-height: 680px; }
.auto-caption-workspace-mount { opacity: 1; transition: opacity .17s ease; }
.auto-caption-workspace-mount.is-entering { opacity: 0; }

.auto-caption-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  min-height: 280px;
  display: grid;
  box-sizing: border-box;
  align-content: start;
  justify-items: center;
  padding: 40px 32px;
  color: #14273c;
  background: #f5f7fb;
  opacity: 1;
  transition: opacity .17s ease;
}

.auto-caption-loading.is-leaving { opacity: 0; pointer-events: none; }
.video-workspace-loading-card {
  display: flex;
  box-sizing: border-box;
  width: min(1096px, 100%);
  min-height: 116px;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid #dce6f4;
  border-radius: 18px;
  background: linear-gradient(115deg, #fff 56%, #f2f7ff 100%);
  box-shadow: 0 8px 28px rgba(35, 76, 135, .045);
}
.video-workspace-loading-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border: 1px solid #dce9fc;
  border-radius: 13px;
  background: #edf5ff;
  color: #176be2;
}
.video-workspace-loading-icon svg { width: 23px; height: 23px; }
.video-workspace-loading-copy { display: grid; min-width: 0; flex: 1; gap: 5px; overflow-wrap: anywhere; text-align: left; }
.video-workspace-loading-copy strong { color: #10243b; font-size: 22px; line-height: 1.3; letter-spacing: -.03em; }
.video-workspace-loading-copy small { color: #667b90; font-size: 13px; line-height: 1.55; }
.video-workspace-loading-spinner {
  width: 22px;
  height: 22px;
  flex: none;
  margin-left: auto;
  border: 2px solid #d9e7fb;
  border-top-color: #196ce6;
  border-radius: 50%;
  animation: video-workspace-loading-spin .85s linear infinite;
}
.video-workspace-loading-card.is-error { border-color: #efd7da; background: #fffafb; }
.video-workspace-loading-card.is-error .video-workspace-loading-icon { border-color: #f5dfe2; background: #fff0f2; color: #bd4351; }
.auto-caption-loading .video-workspace-loading-card .v3-btn { flex: none; min-height: 40px; margin: 0 0 0 auto; }
@keyframes video-workspace-loading-spin { to { transform: rotate(360deg); } }
@media (max-width: 650px) {
  .auto-caption-loading { padding: 24px 18px; }
  .video-workspace-loading-card { min-height: 0; flex-wrap: wrap; padding: 20px; border-radius: 15px; }
  .video-workspace-loading-icon { width: 43px; height: 43px; }
  .video-workspace-loading-copy { flex: 1; }
  .video-workspace-loading-copy strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .video-workspace-loading-spinner { animation: none; }
}

/* Once the automatic edit is ready, the dark studio owns the full viewport. */
body.lab-studio-open {
  overflow: hidden;
  color-scheme: dark;
  background: #090d12;
}

body.lab-studio-open > .v3-shell.is-lab-route {
  min-height: 100dvh;
  display: block;
  overflow: hidden;
  background: #090d12;
}

body.lab-studio-open > .v3-shell.is-lab-route > .v3-sidebar,
body.lab-studio-open > .v3-shell.is-lab-route > .mobile-appbar,
body.lab-studio-open > .v3-shell.is-lab-route > .mobile-bottom-nav,
body.lab-studio-open > .v3-shell.is-lab-route > .v3-main > .v3-topbar {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.lab-studio-open > .v3-shell.is-lab-route > .v3-main,
body.lab-studio-open > .v3-shell.is-lab-route > .v3-main > .v3-scroll-region,
body.lab-studio-open > .v3-shell.is-lab-route .content.route-labEdit {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #090d12;
}

body.lab-studio-open > .v3-shell.is-lab-route > .v3-main { z-index: 90; }
body.lab-studio-open > .v3-shell.is-lab-route > .v3-main > .v3-scroll-region { z-index: 91; }
body.lab-studio-open > .v3-shell.is-lab-route .content.route-labEdit { z-index: 92; }

body.lab-studio-open .route-labEdit .auto-caption-workspace-shell.is-studio-takeover {
  position: fixed;
  z-index: 93;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #090d12;
  box-shadow: none;
}

body.lab-studio-open .route-labEdit .auto-caption-workspace-mount {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.v3-shell.is-lab-route .v3-topbar {
  min-height: 68px;
  padding: 10px 20px;
}

.v3-shell.is-lab-route .v3-topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v3-shell.is-lab-route .v3-back-button { margin: 0; }
.v3-shell.is-lab-route .page-crumbs,
.v3-shell.is-lab-route .page-sub { display: none; }
.v3-shell.is-lab-route .page-title { margin: 0; font-size: 20px; }
.v3-shell.is-lab-route .v3-scroll-region { overflow: hidden; }
.v3-shell.is-lab-route .content.route-labEdit {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
}
.v3-shell.is-lab-route .route-labEdit + .v3-icp-footer { display: none; }

.route-labEdit .auto-caption-workspace-shell,
.route-labEdit .auto-caption-workspace-mount {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.route-labEdit .auto-caption-workspace-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .v3-shell.is-lab-route .v3-scroll-region { overflow-y: auto; }
  .v3-shell.is-lab-route .content.route-labEdit { height: auto; min-height: 100%; }
  .route-labEdit .auto-caption-workspace-shell,
  .route-labEdit .auto-caption-workspace-mount { height: auto; min-height: 680px; }
}

@media (max-width: 760px) {
  .auto-caption-workspace-shell,
  .auto-caption-workspace-mount { min-height: 620px; }
  .auto-caption-workspace-shell { border-radius: 14px; }
  .route-labEdit .auto-caption-workspace-shell,
  .route-labEdit .auto-caption-workspace-mount { height: auto; min-height: 620px; }
  .route-labEdit .auto-caption-workspace-shell { border-radius: 0; }
}

/* Publish review report v208: summary first, evidence second, history on demand. */
.review-dashboard {
  display: grid;
  gap: 12px;
}
.review-summary-card {
  --review-accent: #64748b;
  padding: 18px 20px;
  border: 1px solid var(--v3-line);
  border-left: 4px solid var(--review-accent);
  border-radius: 15px;
  background: var(--v3-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}
.review-summary-card.is-pursue { --review-accent: #258457; }
.review-summary-card.is-angle { --review-accent: #c98516; }
.review-summary-card.is-keep { --review-accent: #5273b8; }
.review-summary-card.is-stop { --review-accent: #b84d58; }
.review-summary-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.review-summary-card .review-action-heading { display: flex; align-items: center; gap: 9px; }
.review-summary-card .review-decision {
  padding: 4px 8px;
  color: var(--review-accent);
  border: 1px solid color-mix(in srgb, var(--review-accent), #fff 68%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--review-accent), #fff 93%);
  font-size: 10px;
  font-weight: 800;
}
.review-summary-card h2 {
  margin: 12px 0 11px;
  max-width: 1080px;
  overflow: hidden;
  color: var(--v3-ink);
  font-size: clamp(19px, 1.65vw, 24px);
  line-height: 1.42;
  letter-spacing: -.015em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.review-summary-card .review-next-action {
  min-height: 42px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #dfe7f1;
  border-left: 3px solid var(--review-accent);
  border-radius: 10px;
  background: #f8fafc;
}
.review-summary-card .review-next-action strong {
  color: var(--review-accent);
  font-size: 11px;
  white-space: nowrap;
}
.review-summary-card .review-next-action p {
  margin: 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.65;
}
.review-summary-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}
.review-summary-meta span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}
.review-summary-meta span + span::before {
  margin-right: 12px;
  color: #cbd5e1;
  content: "·";
}
.review-work-report,
.review-pattern-panel {
  padding: 16px;
  border: 1px solid var(--v3-line);
  border-radius: 15px;
  background: var(--v3-surface);
}
.review-work-report > header,
.review-pattern-panel > header {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.review-work-report h3,
.review-pattern-panel h3 {
  margin: 4px 0 0;
  color: var(--v3-ink);
  font-size: 17px;
}
.review-work-report .review-level-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.review-work-report .review-level-summary > span {
  min-height: 30px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
}
.review-work-report .review-level-summary b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
}
.review-work-report .review-level-summary strong {
  color: var(--v3-ink);
  font-size: 12px;
}
.review-work-table-head,
.review-work-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) minmax(120px, .72fr) minmax(280px, 1.45fr) minmax(260px, 1.55fr);
  gap: 14px;
}
.review-work-table-head {
  padding: 8px 12px;
  color: #94a3b8;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  background: #fafbfd;
  font-size: 11px;
  font-weight: 750;
}
.review-work-list { display: grid; }
.review-work-row {
  min-width: 0;
  padding: 12px;
  align-items: start;
  border-bottom: 1px solid #edf1f6;
}
.review-work-row:last-child { border-bottom: 0; }
.review-work-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.review-level-badge {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #64748b;
  font-size: 11px;
  font-weight: 850;
}
.review-work-row.is-pursue .review-level-badge { background: #258457; }
.review-work-row.is-angle .review-level-badge { background: #c98516; }
.review-work-row.is-keep .review-level-badge { background: #5273b8; }
.review-work-row.is-stop .review-level-badge { background: #b84d58; }
.review-work-identity strong {
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.review-work-decision { min-width: 0; display: grid; gap: 3px; }
.review-work-decision strong { color: var(--v3-ink); font-size: 12px; }
.review-work-decision span { color: #64748b; font-size: 11px; line-height: 1.5; }
.review-work-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 8px;
}
.review-work-metrics span {
  color: #94a3b8;
  font-size: 10px;
  white-space: nowrap;
}
.review-work-metrics b { margin-left: 3px; color: #475569; font-size: 11px; }
.review-work-verdict { min-width: 0; }
.review-work-verdict > p {
  margin: 0;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.review-work-verdict details { margin-top: 5px; }
.review-work-verdict summary,
.review-complete-report summary,
.review-history-panel > summary {
  color: var(--v3-primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.review-work-verdict details :is(p, li) { color: #475569; font-size: 11px; line-height: 1.6; }
.review-work-verdict details ul { margin: 7px 0; padding-left: 17px; }
.review-pattern-panel > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.review-pattern-panel article {
  min-height: 92px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
}
.review-pattern-panel article > span { color: var(--v3-primary); font-size: 10px; font-weight: 800; }
.review-pattern-panel :is(ul, p) { margin: 6px 0 0; color: #334155; font-size: 11px; line-height: 1.6; }
.review-pattern-panel ul { padding-left: 17px; }
.review-complete-report { margin-top: 10px; border-top: 1px solid #edf1f6; }
.review-complete-report > summary { padding-top: 10px; }
.review-complete-report > div { max-height: 520px; margin-top: 10px; padding: 12px; overflow: auto; border-radius: 10px; background: #f8fafc; }
.review-complete-report p { color: #475569; font-size: 11px; line-height: 1.65; }
.review-history-panel {
  padding: 0 16px;
  border: 1px solid var(--v3-line);
  border-radius: 13px;
  background: var(--v3-surface);
}
.review-history-panel > summary {
  padding: 13px 0;
  color: #475569;
  list-style-position: inside;
}
.review-history-panel > summary span { margin-left: 4px; color: #94a3b8; font-weight: 600; }
.review-history-panel[open] { padding-bottom: 14px; }
.review-history-panel .review-result-list { margin-top: 0; }

:root[data-theme="dark"] .review-summary-card,
:root[data-theme="dark"] .review-work-report,
:root[data-theme="dark"] .review-pattern-panel,
:root[data-theme="dark"] .review-history-panel { background: #111827; }
:root[data-theme="dark"] .review-summary-card .review-next-action,
:root[data-theme="dark"] .review-work-table-head,
:root[data-theme="dark"] .review-pattern-panel article,
:root[data-theme="dark"] .review-complete-report > div { background: #172033; }

@media (max-width: 1100px) {
  .review-work-table-head { display: none; }
  .review-work-row { grid-template-columns: minmax(220px, 1fr) minmax(140px, .7fr) minmax(260px, 1.2fr); }
  .review-work-verdict { grid-column: 1 / -1; padding-left: 33px; }
}
@media (max-width: 760px) {
  .review-summary-card { padding: 16px; }
  .review-summary-card > header { align-items: flex-start; flex-direction: column; }
  .review-summary-card h2 { font-size: 19px; }
  .review-summary-card .review-next-action { grid-template-columns: 1fr; gap: 4px; }
  .review-summary-meta { display: grid; gap: 3px; }
  .review-summary-meta span + span::before { content: none; }
  .review-work-report > header,
  .review-pattern-panel > header { align-items: stretch; flex-direction: column; }
  .review-work-report .review-level-summary { justify-content: flex-start; }
  .review-work-row { grid-template-columns: 1fr; gap: 9px; }
  .review-work-verdict { grid-column: auto; padding-left: 0; }
  .review-work-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-pattern-panel > div { grid-template-columns: 1fr; }
  .review-pattern-panel article { min-height: 0; }
}

/* Publish review decision workbench */
.review-action-hero.review-action-hero-compact {
  --review-accent: #64748b;
  padding: 24px;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  color: var(--v3-ink);
  border: 1px solid var(--v3-line);
  border-left: 5px solid var(--review-accent);
  background: linear-gradient(135deg, #fff 0%, #f7faff 100%) !important;
  box-shadow: 0 10px 30px rgba(18, 38, 63, .06);
}
.review-action-hero.review-action-hero-compact.is-pursue { --review-accent: #258457; }
.review-action-hero.review-action-hero-compact.is-angle { --review-accent: #c98516; }
.review-action-hero.review-action-hero-compact.is-keep { --review-accent: #5273b8; }
.review-action-hero.review-action-hero-compact.is-stop { --review-accent: #b84d58; }
.review-action-hero.review-action-hero-compact h2 {
  max-width: 980px;
  margin: 12px 0 16px;
  color: var(--v3-ink) !important;
  font-size: clamp(22px, 2vw, 31px);
  line-height: 1.28;
}
.review-action-hero.review-action-hero-compact .review-next-action {
  max-width: 980px;
  border: 1px solid #dce6f2;
  border-left: 3px solid var(--review-accent);
  background: #f8fafc;
}
.review-action-hero.review-action-hero-compact .review-next-action :is(strong, p) { color: #334155 !important; }
.review-action-hero.review-action-hero-compact .review-action-meta span {
  color: #64748b !important;
  border: 1px solid #dce5ef;
  background: #fff;
}
.review-action-hero.review-action-hero-compact .review-decision {
  color: var(--review-accent);
  border-color: color-mix(in srgb, var(--review-accent), #fff 65%);
  background: color-mix(in srgb, var(--review-accent), #fff 92%);
}
.review-action-hero.review-action-hero-compact .review-completeness {
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--v3-line);
}
.review-action-hero.review-action-hero-compact .review-progress-ring {
  background: conic-gradient(var(--review-accent) var(--review-progress), #e2e8f0 0);
}
.review-action-hero.review-action-hero-compact .review-progress-ring::after { background: #fff; }
.review-action-hero.review-action-hero-compact .review-progress-ring strong,
.review-action-hero.review-action-hero-compact .review-completeness > strong { color: var(--v3-ink) !important; }
.review-action-hero.review-action-hero-compact .review-progress-ring span,
.review-action-hero.review-action-hero-compact .review-completeness > p { color: #64748b !important; }

.review-level-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.review-level-summary > span {
  min-height: 54px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--v3-line);
  border-radius: 13px;
  color: #475569;
  background: #fff;
  font-size: 12px;
}
.review-level-summary b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #64748b;
  font-size: 13px;
}
.review-level-summary strong { color: var(--v3-ink); font-size: 20px; }
.review-level-summary .is-pursue b { background: #258457; }
.review-level-summary .is-angle b { background: #c98516; }
.review-level-summary .is-keep b { background: #5273b8; }
.review-level-summary .is-stop b { background: #b84d58; }

.review-verdict-workbench,
.review-pattern-panel {
  padding: 18px;
  border: 1px solid var(--v3-line);
  border-radius: 17px;
  background: #fff;
}
.review-verdict-workbench > header,
.review-pattern-panel > header {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.review-verdict-workbench h3,
.review-pattern-panel h3 { margin: 5px 0 0; color: var(--v3-ink); font-size: 18px; }
.review-verdict-workbench > header em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.review-level-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.review-level-column {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #64748b;
  border-radius: 13px;
  background: #f8fafc;
}
.review-level-column.is-pursue { border-top-color: #258457; }
.review-level-column.is-angle { border-top-color: #c98516; }
.review-level-column.is-keep { border-top-color: #5273b8; }
.review-level-column.is-stop { border-top-color: #b84d58; }
.review-level-column > header { padding: 13px; border-bottom: 1px solid #e2e8f0; }
.review-level-column > header > div { display: flex; align-items: center; gap: 8px; }
.review-level-column > header span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #64748b;
  font-weight: 800;
}
.review-level-column.is-pursue > header span { background: #258457; }
.review-level-column.is-angle > header span { background: #c98516; }
.review-level-column.is-keep > header span { background: #5273b8; }
.review-level-column.is-stop > header span { background: #b84d58; }
.review-level-column > header strong { color: var(--v3-ink); font-size: 13px; }
.review-level-column > header > b { float: right; margin-top: -25px; color: var(--v3-ink); font-size: 18px; }
.review-level-column > header p { margin: 8px 0 0; color: #64748b; font-size: 10px; line-height: 1.5; }
.review-level-column > div { padding: 9px; display: grid; gap: 8px; }
.review-verdict-card { padding: 11px; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; }
.review-verdict-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 7px; }
.review-verdict-card > header span { color: #64748b; font-size: 10px; font-weight: 800; }
.review-verdict-card > header strong { overflow: hidden; color: var(--v3-ink); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.review-verdict-metrics { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.review-verdict-metrics span { padding: 3px 6px; border-radius: 6px; color: #64748b; background: #f1f5f9; font-size: 9px; }
.review-verdict-card > p { margin: 9px 0 0; color: #334155; font-size: 11px; line-height: 1.55; }
.review-verdict-card details { margin-top: 9px; border-top: 1px solid #edf1f6; }
.review-verdict-card summary { padding-top: 8px; color: var(--v3-primary); cursor: pointer; font-size: 10px; font-weight: 700; }
.review-verdict-card details :is(p, li, em) { color: #475569; font-size: 10px; line-height: 1.55; }
.review-verdict-card details ul { margin: 7px 0; padding-left: 17px; }
.review-level-empty { padding: 16px 8px; color: #94a3b8; text-align: center; font-size: 10px; }

.review-pattern-panel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.review-pattern-panel article { padding: 14px; border-radius: 12px; background: #f8fafc; }
.review-pattern-panel article > span { color: var(--v3-primary); font-size: 11px; font-weight: 800; }
.review-pattern-panel :is(ul, p) { margin: 8px 0 0; color: #334155; font-size: 11px; line-height: 1.65; }
.review-pattern-panel ul { padding-left: 18px; }

.review-report-summary { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.review-report-summary > div { min-width: 130px; padding: 9px 11px; display: grid; gap: 3px; border: 1px solid #e5ebf2; border-radius: 10px; background: #f8fafc; }
.review-report-summary span { color: #64748b; font-size: 9px; }
.review-report-summary strong { color: var(--v3-ink); font-size: 12px; }
.review-report-conclusion { margin-top: 12px; padding: 13px; border-left: 3px solid var(--v3-primary); border-radius: 10px; background: #f6f9ff; }
.review-report-conclusion span { color: var(--v3-primary); font-size: 10px; font-weight: 800; }
.review-report-conclusion p { margin: 5px 0 0; color: #334155; font-size: 12px; line-height: 1.6; }
.review-structured-report .review-visible-conclusion ul { margin: 7px 0 0; padding-left: 17px; color: #334155; font-size: 11px; line-height: 1.6; }

.review-range-picker {
  margin: 14px 0;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--v3-line);
  border-radius: 13px;
  background: #f8fafc;
}
.review-range-picker > div:first-child { display: grid; gap: 3px; }
.review-range-picker > div:first-child strong { color: var(--v3-ink); font-size: 14px; }
.review-range-picker > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.review-range-picker button { min-height: 34px; padding: 0 12px; border: 1px solid #dbe3ed; border-radius: 9px; color: #475569; background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.review-range-picker button.is-active { color: #fff; border-color: var(--v3-primary); background: var(--v3-primary); }

:root[data-theme="dark"] .review-action-hero.review-action-hero-compact,
:root[data-theme="dark"] .review-level-summary > span,
:root[data-theme="dark"] .review-verdict-workbench,
:root[data-theme="dark"] .review-pattern-panel,
:root[data-theme="dark"] .review-verdict-card { background: #111827 !important; }
:root[data-theme="dark"] .review-level-column,
:root[data-theme="dark"] .review-pattern-panel article,
:root[data-theme="dark"] .review-report-summary > div,
:root[data-theme="dark"] .review-range-picker { background: #172033; }
:root[data-theme="dark"] .review-action-hero.review-action-hero-compact .review-progress-ring::after { background: #111827; }

@media (max-width: 1180px) {
  .review-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .review-action-hero.review-action-hero-compact { grid-template-columns: 1fr; padding: 18px; }
  .review-action-hero.review-action-hero-compact .review-completeness { padding: 18px 0 0; border-top: 1px solid var(--v3-line); border-left: 0; }
  .review-level-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-level-grid, .review-pattern-panel > div { grid-template-columns: 1fr; }
  .review-verdict-workbench > header, .review-pattern-panel > header, .review-range-picker { align-items: stretch; flex-direction: column; }
  .review-range-picker > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hot radar 2.0: one decision stage, restrained motion, compact evidence browser. */
.route-hotRadar { --radar-navy: #0e1b36; --radar-blue: #2f6bff; --radar-cyan: #40c8ff; --radar-amber: #d79a2b; }
.hot-radar-topbar {
  margin-bottom: 14px;
  min-height: 54px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #dfe7f3;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 32px rgba(30, 58, 105, .05);
  backdrop-filter: blur(16px);
}
.hot-radar-title-lockup { min-width: 0; display: flex; align-items: center; gap: 10px; }
.hot-radar-title-lockup .v3-eyebrow { display: inline-flex; }
.hot-radar-title-lockup h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hot-radar-account-pill { max-width: 190px; overflow: hidden; padding: 5px 9px; border-radius: 999px; background: #edf4ff; color: #235bbd; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hot-radar-source-chips { display: flex; align-items: center; justify-content: flex-start; gap: 6px; overflow-x: auto; min-width: 0; }
.hot-radar-source-chips span { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e1e8f3; border-radius: 999px; background: #f8faff; color: #607087; font-size: 9px; font-weight: 700; }
.hot-radar-source-chips svg { width: 13px; color: var(--radar-blue); }
.hot-radar-refresh-area { display: flex; align-items: center; gap: 10px; }
.hot-radar-refresh-area .v3-btn { min-height: 36px; padding-inline: 13px; }

.hot-radar-command-center.hot-radar-decision-stage {
  position: relative;
  margin: 0 0 24px;
  padding: 0;
  grid-template-columns: minmax(460px, 1.12fr) minmax(360px, .88fr);
  grid-template-areas: "head head" "chart summary" "signals signals";
  gap: 0;
  overflow: hidden;
  border-color: #d9e4f4;
  background:
    radial-gradient(circle at 16% 30%, rgba(64,200,255,.09), transparent 29%),
    radial-gradient(circle at 72% 10%, rgba(47,107,255,.08), transparent 25%),
    #fff;
  box-shadow: 0 18px 48px rgba(31, 67, 126, .08);
}
.hot-radar-decision-head { grid-area: head; padding: 20px 24px 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.hot-radar-decision-head h2 { max-width: 820px; margin: 5px 0 0; color: var(--radar-navy); font-size: clamp(20px, 2vw, 29px); line-height: 1.28; letter-spacing: -.025em; }
.hot-radar-decision-head .hot-radar-verdict { flex: 0 0 auto; margin-top: 2px; padding: 7px 11px; }
.hot-radar-decision-stage .hot-radar-command-chart { grid-area: chart; position: relative; min-height: 400px; padding: 0 28px 14px; display: grid; place-items: center; border: 0; }
.hot-radar-decision-stage .hot-radar-chart { width: min(100%, 475px); max-width: 475px; margin: 0 auto; }
.hot-radar-decision-stage .hot-radar-chart svg { overflow: visible; filter: drop-shadow(0 18px 30px rgba(47,107,255,.06)); }
.radar-grid { animation: radar-grid-enter .22s ease-out both; }
.radar-grid polygon, .radar-grid line { stroke: #dbe5f2; stroke-width: .9; }
.radar-grid polygon:last-of-type { stroke: #c8d6e9; stroke-width: 1.2; }
.radar-threshold { fill: rgba(215,154,43,.025); stroke: var(--radar-amber); stroke-width: 1.35; stroke-dasharray: 4 6; }
.radar-current { fill: url(#radar-signal-fill); stroke: var(--radar-blue); stroke-width: 2.8; stroke-linejoin: round; filter: drop-shadow(0 8px 9px rgba(47,107,255,.2)); }
.radar-current.has-missing { stroke-dasharray: none; }
.radar-data-point { fill: #fff; stroke: var(--radar-blue); stroke-width: 2.3; transform-box: fill-box; transform-origin: center; animation: radar-point-enter .32s calc(.18s + var(--radar-point-index) * .06s) cubic-bezier(.2,.9,.3,1.2) both; }
.radar-missing-ray { stroke: var(--radar-amber); stroke-width: 1.25; stroke-dasharray: 3 6; opacity: .75; }
.radar-missing-point { fill: #fffaf0; stroke: var(--radar-amber); stroke-width: 2; animation: radar-missing-once .9s .55s ease-out both; }
.radar-center circle { fill: rgba(255,255,255,.94); stroke: #d9e6f7; stroke-width: 1.2; filter: drop-shadow(0 6px 12px rgba(25,66,130,.1)); }
.radar-center text { fill: var(--radar-navy); font-size: 20px; font-weight: 850; }
.radar-center .radar-center-label { fill: #7a879a; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.radar-labels text { fill: #46566d; font-size: 9.5px; font-weight: 760; }
.radar-labels .radar-axis-value { fill: var(--radar-blue); font-size: 10px; }
.radar-labels .radar-axis-value.missing { fill: #a36a12; }
.radar-axis-hit { cursor: help; outline: none; }
.radar-axis-hit circle { fill: transparent; stroke: transparent; stroke-width: 2; }
.radar-axis-hit:hover circle, .radar-axis-hit:focus circle { fill: rgba(47,107,255,.06); stroke: rgba(47,107,255,.38); }
.hot-radar-decision-stage .hot-radar-legend { margin-top: -6px; font-size: 9px; }
.hot-radar-decision-stage.is-refreshing .hot-radar-command-chart::after { content: ""; position: absolute; inset: 13% 18%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 79%, rgba(64,200,255,.48) 94%, transparent 100%); mask: radial-gradient(circle, transparent 0 58%, #000 59% 62%, transparent 63%); pointer-events: none; animation: radar-scan-once .85s linear both; }

.hot-radar-decision-stage .hot-radar-command-summary { grid-area: summary; padding: 26px 28px 24px 10px; display: flex; flex-direction: column; justify-content: center; }
.hot-radar-command-summary > h3 { margin: 9px 0 8px; color: var(--radar-navy); font-size: clamp(19px, 1.6vw, 25px); line-height: 1.42; letter-spacing: -.02em; }
.hot-radar-command-summary > p { margin: 0; color: #637087; font-size: 12px; line-height: 1.75; }
.hot-radar-insight-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.hot-radar-insight-grid section { min-height: 104px; padding: 12px; border: 1px solid #e1e8f2; border-radius: 13px; background: rgba(248,250,255,.84); }
.hot-radar-insight-grid section > span { display: block; margin-bottom: 7px; color: #78869a; font-size: 9px; font-weight: 800; }
.hot-radar-insight-grid section > div { min-height: 25px; display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 6px; }
.hot-radar-insight-grid section > div i { width: 6px; height: 6px; border-radius: 50%; background: #35a674; }
.hot-radar-insight-grid section > div i.gap { background: #e6aa3c; }
.hot-radar-insight-grid section > div i.unknown { border: 1px solid #d49729; background: transparent; }
.hot-radar-insight-grid b { color: #304057; font-size: 10px; }
.hot-radar-insight-grid em { color: #245fc8; font-size: 10px; font-style: normal; font-weight: 800; }
.hot-radar-insight-grid p { margin: 12px 0 0; color: #7b8798; font-size: 10px; }
.hot-radar-decision-stage .hot-radar-gate { margin-top: 10px; padding: 11px 12px; border: 1px solid #dce9e2; background: #f5fbf7; }
.hot-radar-decision-stage .hot-radar-gate.missing { border-color: #ecdab6; background: #fffaf0; }
.hot-radar-decision-stage .hot-radar-gate b { color: #255e49; }
.hot-radar-decision-stage .hot-radar-gate.missing b { color: #8d6420; }
.hot-radar-decision-stage .hot-radar-gate p { color: #697588; font-size: 10px; }
.hot-radar-decision-stage .hot-radar-command-actions { margin-top: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.hot-radar-decision-stage .hot-radar-command-actions .v3-btn { min-height: 40px; }
.hot-radar-decision-stage .hot-radar-boundary { margin: 10px 0 0; color: #8995a6; }
.hot-radar-signal-bar { grid-area: signals; min-height: 60px; padding: 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); align-items: center; border-top: 1px solid #e7edf5; background: rgba(247,250,254,.82); }
.hot-radar-signal-bar > span { min-height: 34px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 9px; border-right: 1px solid #e3eaf4; }
.hot-radar-signal-bar > span:last-child { border-right: 0; }
.hot-radar-signal-bar em { color: #748196; font-size: 10px; font-style: normal; }
.hot-radar-signal-bar strong { color: var(--radar-navy); font-size: 18px; }

.hot-radar-browser-head { margin: 0 0 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.hot-radar-browser-head h2 { margin: 4px 0 0; color: var(--radar-navy); font-size: 20px; }
.hot-radar-browser-head .hot-radar-list-tools { margin: 0; }
.hot-radar-workspace { grid-template-columns: minmax(0,1.55fr) minmax(320px,.72fr); gap: 12px; }
.hot-radar-list-head { min-height: 58px; padding: 10px 14px; }
.hot-radar-list-head > div:first-child { display: flex; align-items: baseline; gap: 5px; color: #6f7d91; font-size: 10px; }
.hot-radar-list-head > div:first-child strong { color: var(--radar-navy); font-size: 18px; }
.hot-radar-filter button { min-height: 32px; padding: 6px 9px; border-radius: 999px; }
.hot-radar-topic-list { max-height: 620px; }
.hot-radar-topic { min-height: 72px; padding: 11px 15px; grid-template-columns: 32px minmax(0,1fr) 58px; }
.hot-radar-topic-main { gap: 7px; }
.hot-radar-topic-main > strong { font-size: 12px; }
.hot-radar-topic.active { background: linear-gradient(90deg, #f0f6ff, #f8fbff); }
.hot-radar-detail { top: 10px; min-height: 0; padding: 18px; }
.hot-radar-detail > h2 { margin: 11px 0 12px; font-size: 18px; }
.hot-radar-facts { margin: 12px 0; }
.hot-radar-reason, .hot-radar-evidence { padding: 12px; }
.hot-radar-no-fit { margin-bottom: 20px; padding: 22px 24px; border: 1px dashed #cbd8ea; background: linear-gradient(115deg,#fff,#f5f9ff); }
.hot-radar-no-fit strong { color: #172b50; font-size: 18px; }
.hot-radar-no-fit p { margin: 7px 0 0; color: #66758e; font-size: 12px; line-height: 1.7; }
.hot-radar-proof-list, .hot-radar-proof-picker, .hot-radar-origin-links { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8edf5; }
.hot-radar-proof-list > span, .hot-radar-origin-links > span, .hot-radar-proof-picker label { display: block; margin-bottom: 7px; color: #52627d; font-size: 11px; font-weight: 800; }
.hot-radar-proof-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; }
.hot-radar-proof-list a, .hot-radar-origin-links a { color: #2457ba; font-size: 11px; line-height: 1.5; text-decoration: none; }
.hot-radar-proof-list a:hover, .hot-radar-origin-links a:hover { text-decoration: underline; }
.hot-radar-proof-list button { flex: 0 0 auto; border: 0; background: transparent; color: #77849a; font-size: 10px; cursor: pointer; }
.hot-radar-proof-list p, .hot-radar-proof-hint { margin: 5px 0 0; color: #758299; font-size: 11px; line-height: 1.65; }
.hot-radar-proof-picker > div { display: flex; gap: 7px; }
.hot-radar-proof-picker select { min-width: 0; flex: 1; padding: 8px; border: 1px solid #d8e2f0; border-radius: 8px; color: #25395a; background: #fff; }
.hot-radar-proof-picker .v3-btn { min-height: 34px; padding: 7px 10px; white-space: nowrap; }
.hot-radar-origin-links { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.hot-radar-origin-links > span { flex-basis: 100%; margin: 0; }
.hot-radar-origin-links a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #dce6f4; border-radius: 8px; background: #f7faff; }
.hot-radar-origin-links svg { width: 12px; height: 12px; }

@keyframes radar-grid-enter { from { opacity: 0; transform: scale(.96); transform-origin: center; } to { opacity: 1; transform: scale(1); } }
@keyframes radar-point-enter { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes radar-missing-once { 0% { opacity: 0; transform: scale(.6); transform-origin: center; } 55% { opacity: 1; stroke-width: 4; } 100% { opacity: 1; stroke-width: 2; transform: scale(1); } }
@keyframes radar-scan-once { from { opacity: 0; transform: rotate(0); } 15% { opacity: 1; } to { opacity: 0; transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .hot-radar-command-center.hot-radar-decision-stage { grid-template-columns: minmax(390px,1fr) minmax(320px,.9fr); }
  .hot-radar-decision-stage .hot-radar-command-action { display: block; grid-column: auto; }
  .hot-radar-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .route-hotRadar { padding-top: 2px; }
  .hot-radar-topbar { min-height: 0; padding: 11px 12px; grid-template-columns: 1fr auto; gap: 9px; }
  .hot-radar-title-lockup { flex-wrap: wrap; gap: 6px 8px; }
  .hot-radar-title-lockup .v3-eyebrow { display: none; }
  .hot-radar-account-pill { max-width: 145px; }
  .hot-radar-source-chips { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
  .hot-radar-refresh-area { grid-column: 2; grid-row: 1; }
  .hot-radar-updated { display: none; }
  .hot-radar-refresh-area .v3-btn { width: 38px; min-width: 38px; min-height: 38px; padding: 0; font-size: 0; }
  .hot-radar-refresh-area .v3-btn svg { width: 17px; }
  .hot-radar-command-center.hot-radar-decision-stage { grid-template-columns: 1fr; grid-template-areas: "head" "chart" "summary" "signals"; margin-bottom: 18px; }
  .hot-radar-decision-head { padding: 17px 16px 5px; }
  .hot-radar-decision-head h2 { font-size: 20px; }
  .hot-radar-decision-head .hot-radar-verdict { padding: 6px 9px; font-size: 9px; }
  .hot-radar-decision-stage .hot-radar-command-chart { min-height: 0; padding: 6px 16px 14px; border-bottom: 1px solid #e7edf5; }
  .hot-radar-decision-stage .hot-radar-chart { display: none; }
  .hot-radar-decision-stage .hot-radar-compact-bars { width: 100%; margin: 4px 0 0; display: grid; gap: 10px; }
  .hot-radar-axis-row { grid-template-columns: 66px minmax(0,1fr) 45px; font-size: 10px; }
  .hot-radar-axis-row > i { height: 8px; }
  .hot-radar-decision-stage .hot-radar-command-summary { padding: 18px 16px; }
  .hot-radar-command-summary > h3 { font-size: 19px; }
  .hot-radar-insight-grid { margin-top: 14px; }
  .hot-radar-signal-bar { min-height: 100px; padding: 8px; grid-template-columns: 1fr 1fr; }
  .hot-radar-signal-bar > span { min-height: 40px; padding: 0 8px; }
  .hot-radar-signal-bar > span:nth-child(2) { border-right: 0; }
  .hot-radar-browser-head { align-items: flex-start; flex-direction: column; gap: 9px; }
  .hot-radar-browser-head .hot-radar-list-tools { width: 100%; align-items: center; }
  .hot-radar-browser-head .hot-radar-list-tools em { width: 100%; }
  .hot-radar-list-head { align-items: flex-start; flex-direction: column; }
  .hot-radar-filter { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .hot-radar-filter button { flex: 0 0 auto; }
  .hot-radar-topic { min-height: 74px; grid-template-columns: 28px minmax(0,1fr) 46px; }
  .hot-radar-topic-main > strong { white-space: normal; }
  .hot-radar-topic-meta i:nth-child(2) { display: none; }
}

@media (max-width: 430px) {
  .hot-radar-decision-head { align-items: flex-start; flex-direction: column-reverse; gap: 8px; }
  .hot-radar-insight-grid { grid-template-columns: 1fr; }
  .hot-radar-insight-grid section { min-height: 0; }
  .hot-radar-decision-stage .hot-radar-command-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .radar-grid, .radar-data-point, .radar-missing-point, .hot-radar-decision-stage.is-refreshing .hot-radar-command-chart::after { animation: none !important; }
  .hot-radar-topic { transition: none; }
}

/* Knowledge-script publication workbench. Isolated from existing review modes. */
.publication-workbench { display: grid; gap: 16px; min-width: 0; }
.publication-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 4px 2px 0; }
.publication-heading h2 { margin: 4px 0 6px; color: var(--v3-ink); font-size: 24px; line-height: 1.2; }
.publication-heading p { max-width: 760px; margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.7; }
.publication-mode-switch { padding: 5px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; border: 1px solid var(--v3-line); border-radius: 15px; background: #edf2f8; }
.publication-mode-switch button { min-height: 58px; padding: 10px 14px; display: grid; align-content: center; gap: 3px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #65758a; cursor: pointer; text-align: left; }
.publication-mode-switch button.is-active { border-color: #b9d1f0; background: #fff; color: #1f5fae; box-shadow: 0 4px 14px rgba(35, 81, 145, .1); }
.publication-mode-switch button.is-unavailable { color: #718096; cursor: pointer; }
.publication-mode-switch button.is-unavailable:hover { border-color: #d5deea; background: rgba(255, 255, 255, .58); }
.publication-mode-switch button:focus-visible { outline: 3px solid rgba(31, 95, 174, .18); outline-offset: 2px; }
.publication-mode-switch strong { font-size: 12px; }
.publication-mode-switch span { color: #8390a1; font-size: 9px; }
.publication-mode-switch button.is-unavailable strong { display: flex; align-items: center; gap: 7px; }
.publication-mode-switch .publication-mode-status { padding: 2px 6px; border-radius: 999px; background: #e3e9f2; color: #66758a; font-size: 8px; font-style: normal; font-weight: 850; }
.publication-upgrade-modal { width: min(460px, calc(100vw - 24px)); }
.publication-upgrade-message { padding: 8px 4px 4px; display: grid; gap: 10px; }
.publication-upgrade-message > span { color: var(--v3-blue); font-size: 10px; font-weight: 850; }
.publication-upgrade-message h3 { margin: 0; color: var(--v3-ink); font-size: 21px; line-height: 1.3; }
.publication-upgrade-message p { margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.75; }
.publication-upgrade-message .v3-btn { justify-self: end; min-width: 96px; margin-top: 4px; }
.publication-heading-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.publication-save-state { color: var(--v3-muted); font-size: 10px; }
.publication-stepbar { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 8px; border: 1px solid #e4eaf3; border-radius: 14px; background: #fff; scrollbar-width: none; }
.publication-stepbar::-webkit-scrollbar { display: none; }
.publication-stepbar span { min-width: max-content; padding: 8px 13px; display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; color: #7a879b; font-size: 11px; font-weight: 800; }
.publication-stepbar span.is-active { background: #edf4ff; color: #2162c7; }
.publication-stepbar i { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: #e8edf5; color: #63728a; font-size: 10px; font-style: normal; }
.publication-stepbar span.is-active i { background: #2563c7; color: #fff; }
.publication-grid { display: grid; grid-template-columns: minmax(240px, .62fr) minmax(480px, 1.45fr) minmax(290px, .72fr); align-items: start; gap: 14px; min-width: 0; }
.publication-grid > .v3-card { min-width: 0; margin: 0; padding: 18px; border-radius: 17px; }
.publication-grid > .v3-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.publication-grid h3 { margin: 3px 0 0; color: var(--v3-ink); font-size: 17px; }
.publication-source-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.publication-source-card > header { width: 100%; min-width: 0; }
.publication-source-card > header > div { min-width: 0; }
.publication-source-card .v3-count-chip { flex: 0 0 auto; padding: 5px 8px; font-size: 9px; }
.publication-script-summary { max-height: 390px; padding: 14px; overflow: auto; border: 1px solid #e6ebf3; border-radius: 13px; background: #f8fafc; }
.publication-script-summary strong { display: block; margin-bottom: 9px; color: #1d2d45; font-size: 13px; line-height: 1.5; }
.publication-script-summary p { margin: 0; color: #596a81; font-size: 11px; line-height: 1.9; white-space: pre-wrap; }
.publication-script-summary span { display: block; margin-top: 10px; color: #94a0b2; font-size: 9px; }
.publication-scope-note { padding: 12px; display: grid; gap: 4px; border-left: 3px solid #2c6ed5; border-radius: 8px; background: #f2f7ff; }
.publication-scope-note strong { color: #285ba8; font-size: 11px; }
.publication-scope-note span { color: #687b98; font-size: 10px; line-height: 1.6; }
.publication-provider-badge,
.publication-preview-dot { padding: 5px 9px; border-radius: 999px; background: #eef4ff; color: #2b64ba; font-size: 9px; font-weight: 850; }
.publication-cover-editor { display: grid; grid-template-columns: minmax(210px, 270px) minmax(230px, 1fr); align-items: start; gap: 18px; }
.publication-cover-stage { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border: 1px dashed #bbc8da; border-radius: 17px; background: #172236; box-shadow: 0 12px 28px rgba(28, 43, 67, .14); }
.publication-cover-stage img { width: 100%; height: 100%; display: block; object-fit: cover; }
.publication-cover-placeholder { position: absolute; inset: 0; padding: 34px 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; background: #172236; }
.publication-cover-placeholder strong { color: #ffd34e; font-size: clamp(24px, 3vw, 38px); line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.36); }
.publication-cover-placeholder span { color: rgba(255,255,255,.68); font-size: 10px; }
.publication-cover-controls { display: grid; gap: 12px; }
.publication-cover-controls > .v3-field,
.publication-copy-editor > .v3-field { display: grid; gap: 7px; }
.publication-style-field { display: grid; gap: 7px; }
.publication-style-field > span { color: var(--v3-muted); font-size: 10px; font-weight: 800; }
.publication-style-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.publication-style-options button { min-height: 38px; padding: 0 8px; border: 1px solid #dfe6f0; border-radius: 10px; background: #fff; color: #5f6f85; cursor: pointer; font-size: 10px; font-weight: 800; }
.publication-style-options button.is-active { border-color: #91b4eb; background: #edf4ff; color: #225fb9; box-shadow: inset 0 0 0 1px #c8dcfa; }
.publication-generate-button { min-height: 44px; }
.publication-help { margin: 0; color: #7a8799; font-size: 10px; line-height: 1.65; }
.publication-candidates { margin-top: 16px; display: grid; gap: 8px; }
.publication-candidates > span { color: var(--v3-muted); font-size: 10px; font-weight: 800; }
.publication-candidates > div { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 2px; }
.publication-candidates button { position: relative; width: 72px; flex: 0 0 72px; aspect-ratio: 9 / 16; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 10px; background: #edf1f6; cursor: pointer; }
.publication-candidates button.is-selected { border-color: #2d6bc9; }
.publication-candidates img { width: 100%; height: 100%; display: block; object-fit: cover; }
.publication-candidates em { position: absolute; right: 4px; bottom: 4px; left: 4px; padding: 4px; border-radius: 6px; background: rgba(14, 25, 43, .82); color: #fff; font-size: 8px; font-style: normal; }
.publication-copy-editor { margin-top: 18px; padding-top: 16px; display: grid; gap: 11px; border-top: 1px solid #edf0f5; }
.publication-copy-editor textarea { min-height: 112px; }
.publication-preview-card { position: sticky; top: 76px; }
.publication-phone { max-width: 270px; margin: 0 auto; padding: 7px; border: 1px solid #cad3df; border-radius: 28px; background: #111827; box-shadow: 0 15px 34px rgba(28, 39, 57, .18); }
.publication-phone-screen { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 22px; background: #26334a; }
.publication-phone-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.publication-phone-empty { position: absolute; inset: 0; padding: 26px 54px 78px 18px; display: flex; align-items: flex-end; background: #26334a; }
.publication-phone-empty strong { color: #ffd34e; font-size: 26px; line-height: 1.15; }
.publication-phone-overlay { position: absolute; right: 46px; bottom: 22px; left: 14px; z-index: 2; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.66); }
.publication-phone-overlay strong { font-size: 10px; }
.publication-phone-overlay p { max-height: 48px; margin: 6px 0 4px; overflow: hidden; font-size: 9px; line-height: 1.55; }
.publication-phone-overlay span { display: block; overflow: hidden; color: #e8f1ff; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.publication-phone-actions { position: absolute; right: 10px; bottom: 62px; z-index: 3; display: grid; gap: 12px; color: #fff; }
.publication-phone-actions span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 18, 31, .62); }
.publication-phone-actions .ui-icon { width: 15px; height: 15px; }
.publication-checklist { margin-top: 15px; display: grid; gap: 7px; }
.publication-checklist strong { color: var(--v3-ink); font-size: 11px; }
.publication-checklist span { padding: 8px 10px; border-left: 3px solid #d5dde8; border-radius: 7px; background: #f7f9fc; color: #7c899b; font-size: 9px; }
.publication-checklist span.is-done { border-left-color: #3c9564; background: #f0f8f4; color: #347650; }
.publication-preview-note { margin: 10px 0 0; color: #96a1b1; font-size: 9px; text-align: center; }
.publication-empty { margin-top: 8px; }

/* Publication studio v2: material-first cover editor. */
.route-review.is-publication-workspace .review-page-intro { margin-bottom: 8px; }
.publication-workbench { display: grid; gap: 14px; }
.publication-heading { padding: 18px 20px; border: 1px solid var(--v3-line); border-radius: 18px; background: var(--v3-surface); box-shadow: var(--v3-shadow); }
.publication-heading h2 { margin: 5px 0 4px; font-size: 22px; }
.publication-heading p { max-width: 760px; margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.7; }
.publication-script-bar { min-width: 0; padding: 12px 14px; display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--v3-line); border-radius: 15px; background: var(--v3-surface); }
.publication-script-bar label { display: grid; gap: 5px; }
.publication-script-bar label > span { color: var(--v3-muted); font-size: 10px; font-weight: 800; }
.publication-script-bar select { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--v3-line); border-radius: 9px; background: #fff; color: var(--v3-ink); }
.publication-script-bar > div { min-width: 0; display: grid; gap: 3px; }
.publication-script-bar > div strong,
.publication-script-bar > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publication-script-bar > div strong { color: var(--v3-ink); font-size: 12px; }
.publication-script-bar > div span { color: var(--v3-muted); font-size: 10px; }
.publication-script-bar > em { padding: 6px 9px; border-radius: 999px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.publication-studio { min-width: 0; display: grid; grid-template-columns: minmax(250px, 292px) minmax(360px, 1fr) minmax(250px, 286px); align-items: start; gap: 12px; }
.publication-studio.is-hot-template { grid-template-columns: minmax(340px, 430px) minmax(420px, 1fr); }
.publication-studio.is-hot-template.is-editing { grid-template-columns: minmax(280px, 360px) minmax(360px, 1fr) minmax(250px, 286px); }
.publication-preset-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 8px; }
.publication-preset-heading strong { font-size: 12px; color: #233b5b; }
.publication-preset-heading button { border: 0; background: none; color: #155ab3; font-size: 11px; font-weight: 750; cursor: pointer; }
.publication-preset-empty { margin: 0 0 12px; color: #76869b; font-size: 10px; line-height: 1.5; }
.publication-preset-list { display: grid; gap: 7px; margin-bottom: 12px; }
.publication-preset-item { display: flex; align-items: stretch; border: 1px solid #dbe5f2; border-radius: 10px; background: #f8fbff; }
.publication-preset-item img { width: 34px; height: 49px; margin: 4px 0 4px 4px; border-radius: 5px; object-fit: cover; }
.publication-preset-item button { border: 0; background: none; cursor: pointer; }
.publication-preset-item button:first-child { flex: 1; min-width: 0; padding: 9px 11px; display: grid; gap: 2px; text-align: left; }
.publication-preset-item strong { overflow: hidden; color: #244268; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.publication-preset-item span { color: #8290a2; font-size: 9px; }
.publication-preset-item button:last-child { padding: 0 10px; color: #8c99aa; font-size: 10px; }
.publication-preset-item button:hover { color: #1257b5; }
.publication-preset-form { display: grid; gap: 14px; }
.publication-preset-form p { margin: 0; color: #687b94; font-size: 12px; line-height: 1.6; }
.publication-material-panel,
.publication-canvas-panel,
.publication-property-panel { min-width: 0; border: 1px solid var(--v3-line); border-radius: 18px; background: var(--v3-surface); box-shadow: 0 8px 24px rgba(48, 70, 104, .055); }
.publication-material-panel,
.publication-property-panel { padding: 16px; }
.publication-panel-heading { margin-bottom: 12px; }
.publication-panel-heading h3 { margin: 4px 0 0; color: var(--v3-ink); font-size: 15px; }
.publication-panel-heading p { margin: 6px 0 0; color: var(--v3-muted); font-size: 9px; line-height: 1.55; }
.publication-smart-plan { margin-bottom: 13px; padding: 11px; display: grid; gap: 8px; border: 1px solid #dce5f1; border-radius: 12px; background: #f8faff; }
.publication-smart-plan.is-ready { border-color: #b9d8c8; background: #f2faf6; }
.publication-smart-plan.is-stale { border-style: dashed; }
.publication-smart-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.publication-smart-plan-head strong { color: #30445f; font-size: 10px; }
.publication-smart-plan-head button { min-height: 28px; padding: 0 9px; border: 1px solid #8eb5ec; border-radius: 8px; background: #fff; color: #2363bc; cursor: pointer; font-size: 9px; font-weight: 850; white-space: nowrap; }
.publication-plan-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.publication-plan-tags span { padding: 4px 6px; border-radius: 999px; background: #fff; color: #3c6b58; font-size: 8px; font-weight: 800; box-shadow: inset 0 0 0 1px #cfe5d9; }
.publication-smart-plan p { margin: 0; color: #6c7c91; font-size: 9px; line-height: 1.55; }
.publication-smart-plan em { color: #8290a2; font-size: 8px; font-style: normal; }
.publication-reference-card { min-height: 150px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #b9cbe2; border-radius: 13px; background: #f6f9fd; }
.publication-reference-card.has-image { grid-template-columns: 82px minmax(0, 1fr); place-items: stretch; border-style: solid; background: #fff; }
.publication-reference-card > img { width: 82px; height: 146px; object-fit: cover; }
.publication-reference-card > div:not(.publication-reference-empty) { padding: 11px; display: grid; align-content: center; gap: 5px; min-width: 0; }
.publication-reference-empty { padding: 18px 14px; display: grid; justify-items: center; gap: 7px; text-align: center; }
.publication-reference-card strong,
.publication-portrait-current strong { color: #30445f; font-size: 10px; }
.publication-reference-card span,
.publication-portrait-current span { overflow: hidden; color: #7d8999; font-size: 8px; line-height: 1.45; text-overflow: ellipsis; }
.publication-reference-card button,
.publication-portrait-current button { min-height: 28px; padding: 0 8px; border: 1px solid #8eb5ec; border-radius: 8px; background: #fff; color: #2363bc; cursor: pointer; font-size: 8px; font-weight: 850; }
.publication-reference-library { margin-top: 9px; display: grid; gap: 6px; }
.publication-reference-library > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.publication-reference-library > div:first-child strong { color: #40526a; font-size: 9px; }
.publication-reference-library > div:first-child em { color: #8a97a7; font-size: 8px; font-style: normal; }
.publication-reference-library > div:last-child { padding-bottom: 3px; display: flex; gap: 6px; overflow-x: auto; }
.publication-reference-library button { flex: 0 0 44px; width: 44px; height: 70px; padding: 2px; overflow: hidden; border: 1px solid #d8e1ed; border-radius: 8px; background: #fff; cursor: pointer; }
.publication-reference-library button.is-active { border-color: #3979cf; box-shadow: 0 0 0 2px #d9e8fb; }
.publication-reference-library img { width: 100%; height: 100%; border-radius: 5px; object-fit: cover; }
.publication-template-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.publication-account-reference-drawer { margin-top: 12px; border: 1px solid #dce4ef; border-radius: 11px; background: #f8fafc; }
.publication-account-reference-drawer > summary { min-height: 39px; padding: 0 11px; display: flex; align-items: center; gap: 7px; color: #40526a; cursor: pointer; font-size: 9px; font-weight: 800; }
.publication-account-reference-drawer > summary em { margin-left: auto; color: #8390a1; font-size: 8px; font-style: normal; font-weight: 500; }
.publication-account-reference-drawer > .publication-template-choice-grid { padding: 0 9px 9px; }
.publication-template-choice { min-width: 0; padding: 5px; display: grid; gap: 6px; border: 1px solid #dce4ef; border-radius: 11px; background: #fff; color: #33465e; cursor: pointer; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.publication-template-choice:hover { border-color: #92b7e9; transform: translateY(-1px); }
.publication-template-choice.is-active { border-color: #2d71cf; background: #f3f8ff; box-shadow: 0 0 0 2px #dceafd; }
.publication-template-choice > span { position: relative; overflow: hidden; border-radius: 7px; aspect-ratio: 9 / 16; background: #eef2f8; }
.publication-template-choice > span { container-type: inline-size; }
.publication-template-choice img { width: 100%; height: 100%; object-fit: cover; }
.publication-template-preview-line { position: absolute; z-index: 1; display: block; padding: .3cqw .6cqw; font-weight: 900; line-height: 1.12; overflow-wrap: anywhere; paint-order: stroke fill; }
.publication-template-preview-line.has-shadow { text-shadow: 0 .7cqw 1.2cqw rgba(0,0,0,.75); }
.publication-template-choice i { position: absolute; right: 5px; bottom: 5px; padding: 4px 6px; border-radius: 999px; background: rgba(12, 31, 57, .78); color: #fff; font-size: 7px; font-style: normal; font-weight: 850; backdrop-filter: blur(5px); }
.publication-template-choice.is-active i { background: #2169c7; }
.publication-template-choice > strong { overflow: hidden; padding: 0 2px 2px; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.publication-template-choice > small { overflow: hidden; padding: 0 2px 2px; color: #8390a1; font-size: 7px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.publication-legacy-reference { margin-top: 12px; padding: 9px; border: 1px dashed #cbd8ea; border-radius: 11px; background: #f8fafc; }
.publication-legacy-reference > strong { display: block; margin-bottom: 7px; color: #60738d; font-size: 9px; }
.publication-legacy-reference .publication-template-choice-grid { max-width: 33%; }
.publication-template-empty { min-height: 180px; padding: 24px; display: grid; place-content: center; gap: 6px; border: 1px dashed #bdcce0; border-radius: 13px; background: #f7f9fc; text-align: center; }
.publication-template-empty strong { color: #3b4e67; font-size: 11px; }
.publication-template-empty span { color: #8290a2; font-size: 9px; line-height: 1.5; }
.publication-hot-title-block { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--v3-line); }
.publication-hot-title-block .publication-template-heading { margin-top: 0; }
.publication-hot-title-block textarea { min-height: 82px; resize: vertical; }
.publication-account-auto { margin-top: 11px; padding: 10px 11px; display: grid; gap: 3px; border: 1px solid #e1e7ef; border-radius: 10px; background: #f8fafc; }
.publication-account-auto.is-ready { border-color: #c6e0d2; background: #f2faf6; }
.publication-account-auto.is-required { border-color: #efc6c3; background: #fff7f6; }
.publication-account-auto strong { color: #455970; font-size: 9px; }
.publication-account-auto.is-ready strong { color: #2b7650; }
.publication-account-auto.is-required strong { color: #b1433b; }
.publication-account-auto span { color: #7c8999; font-size: 8px; line-height: 1.5; }
.publication-inline-portrait-upload { margin-top: 8px; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid #e1e7ef; border-radius: 10px; background: #fff; }
.publication-inline-portrait-upload label { display: flex; align-items: center; gap: 7px; color: #66758a; font-size: 8px; line-height: 1.45; cursor: pointer; }
.publication-inline-portrait-upload input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--v3-primary); }
.publication-inline-portrait-upload > div { display: flex; gap: 6px; }
.publication-inline-portrait-upload .v3-btn { min-height: 34px; white-space: nowrap; }
.publication-selected-portrait { margin-top: 8px; padding: 7px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid #c6e0d2; border-radius: 10px; background: #f2faf6; }
.publication-selected-portrait img { width: 42px; height: 52px; border-radius: 7px; object-fit: cover; }
.publication-selected-portrait span { min-width: 0; display: grid; gap: 2px; }
.publication-selected-portrait strong { overflow: hidden; color: #2b7650; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.publication-selected-portrait em { color: #718477; font-size: 8px; font-style: normal; }
.publication-selected-portrait button { min-height: 28px; padding: 0 8px; border: 1px solid #d4e1da; border-radius: 8px; background: #fff; color: #64756b; cursor: pointer; font-size: 8px; font-weight: 800; }
.publication-reference-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.publication-reference-actions button { min-height: 76px; padding: 10px; display: grid; align-content: center; gap: 4px; border: 1px solid #dfe6f0; border-radius: 11px; background: #fbfcfe; color: #33465e; cursor: pointer; text-align: left; }
.publication-reference-actions button.is-active { border-color: #78a5e5; background: #edf4ff; box-shadow: inset 0 0 0 1px #c9ddfa; }
.publication-reference-actions strong { font-size: 10px; }
.publication-reference-actions span { color: #7b8899; font-size: 8px; line-height: 1.45; }
.publication-portrait-current { min-height: 86px; display: grid; grid-template-columns: 64px minmax(0, 1fr); overflow: hidden; border: 1px solid #e0e7f0; border-radius: 11px; background: #fbfcfe; }
.publication-portrait-current > img { width: 64px; height: 90px; object-fit: cover; }
.publication-portrait-current > div { grid-column: 1 / -1; padding: 10px; display: grid; gap: 4px; }
.publication-portrait-current > img + div { grid-column: auto; }
.publication-fidelity-options { padding: 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 10px; background: #f0f4fa; }
.publication-fidelity-options button { min-height: 31px; padding: 0 4px; border: 0; border-radius: 7px; background: transparent; color: #728096; cursor: pointer; font-size: 8px; font-weight: 850; }
.publication-fidelity-options button.is-active { background: #fff; color: #205eb8; box-shadow: 0 2px 8px rgba(37, 88, 160, .11); }
.publication-rights-check { margin-top: 10px; min-height: 40px; padding: 8px 10px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid #e0e6ef; border-radius: 9px; background: #fffdf8; color: #66758a; font-size: 9px; line-height: 1.45; }
.publication-rights-check input { margin-top: 1px; accent-color: var(--v3-primary); }
.publication-material-heading { margin-top: 0; }
.publication-subject-title { margin: 0 0 8px; color: #36475e; font-size: 11px; }
.publication-subject-tabs { margin-bottom: 11px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 11px; background: #f0f4fa; }
.publication-subject-tabs button { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #6c7b90; cursor: pointer; font-size: 11px; font-weight: 850; }
.publication-subject-tabs button.is-active { background: #fff; color: #205eb8; box-shadow: 0 2px 8px rgba(37, 88, 160, .11); }
.publication-source-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.publication-source-options button { min-height: 67px; padding: 10px; display: grid; align-content: center; gap: 4px; border: 1px solid #dfe6f0; border-radius: 11px; background: #fbfcfe; color: var(--v3-ink); cursor: pointer; text-align: left; }
.publication-source-options button:hover { border-color: #a9c5ee; background: #f6f9fe; }
.publication-source-options button.is-active { border-color: #78a5e5; background: #edf4ff; box-shadow: inset 0 0 0 1px #c9ddfa; }
.publication-source-options button strong { font-size: 11px; }
.publication-source-options button span { color: #7b8899; font-size: 9px; line-height: 1.35; }
.publication-safety-note { margin-top: 10px; padding: 10px 11px; display: grid; gap: 3px; border-left: 3px solid #2c79d4; border-radius: 8px; background: #f1f7ff; }
.publication-safety-note.is-person { border-left-color: #c77724; background: #fff8ee; }
.publication-safety-note strong { color: #285fa4; font-size: 10px; }
.publication-safety-note.is-person strong { color: #a96018; }
.publication-safety-note span { color: #687b94; font-size: 9px; line-height: 1.55; }
.publication-template-heading { margin: 15px 0 8px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; }
.publication-template-heading > span { grid-column: 1 / -1; }
.publication-template-heading > strong { color: var(--v3-ink); font-size: 12px; }
.publication-template-heading > em { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.publication-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 325px; overflow: auto; padding-right: 2px; }
.publication-template-card { min-width: 0; padding: 7px; display: grid; grid-template-columns: 37px minmax(0, 1fr); grid-template-rows: auto auto; gap: 1px 7px; border: 1px solid #e1e7f0; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.publication-template-card:hover { border-color: #abc5e9; }
.publication-template-card.is-active { border-color: #77a4e4; background: #f1f6fe; box-shadow: inset 0 0 0 1px #d4e3f8; }
.publication-template-card > i { grid-row: 1 / 3; width: 37px; aspect-ratio: 9 / 16; padding: 5px 3px; display: flex; flex-direction: column; justify-content: center; border-radius: 5px; background: #192438; color: #fff; font-style: normal; overflow: hidden; }
.publication-template-card > i b { color: var(--template-accent); font-size: 7px; line-height: 1; }
.publication-template-card > i span { margin-top: 2px; font-size: 6px; }
.publication-template-card > strong { align-self: end; overflow: hidden; color: #28374d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.publication-template-card > em { overflow: hidden; color: #8793a4; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.publication-canvas-panel { padding-bottom: 13px; overflow: hidden; background: #f8faff; }
.publication-canvas-toolbar { min-height: 56px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--v3-line); background: #fff; }
.publication-canvas-toolbar > div:first-child { display: grid; gap: 2px; }
.publication-canvas-toolbar strong { color: var(--v3-ink); font-size: 12px; }
.publication-canvas-toolbar span { color: var(--v3-muted); font-size: 9px; }
.publication-canvas-toolbar .publication-image-quota-hint { color: #1d5db8; font-size: 9px; font-weight: 750; }
.publication-canvas-toolbar > div:last-child { display: flex; gap: 6px; }
.publication-canvas-toolbar button { min-height: 34px; padding: 0 10px; border: 1px solid #dce4ef; border-radius: 9px; background: #fff; color: #53657c; cursor: pointer; font-size: 9px; font-weight: 800; }
.publication-canvas-toolbar button.primary { border-color: #2d6dca; background: #2766c3; color: #fff; }
.publication-canvas-shell { min-height: 590px; padding: 20px; display: grid; place-items: center; background: #eef2f8; }
.publication-canvas-shell .publication-cover-stage { width: min(100%, 338px); border-style: solid; border-color: #b9c6d8; border-radius: 12px; background: #172236; box-shadow: 0 18px 40px rgba(25, 40, 62, .22); container-type: inline-size; }
.publication-cover-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(8,12,20,.72), rgba(8,12,20,.08) 76%); opacity: var(--cover-overlay, .54); }
.publication-cover-stage.is-ai-complete::after { display: none; }
.publication-edit-line-preview { position: absolute; z-index: 2; padding: 2px 4px; line-height: 1.2; font-weight: 900; overflow-wrap: anywhere; -webkit-text-stroke: var(--cover-stroke-width, 1px) var(--cover-stroke, #111827); paint-order: stroke fill; pointer-events: none; }
.publication-edit-line-preview.has-shadow { text-shadow: 2px 3px 4px rgba(0,0,0,.72); }
.publication-phone-edit-line { position: absolute; z-index: 2; padding: 1px 2px; line-height: 1.2; font-weight: 900; overflow-wrap: anywhere; -webkit-text-stroke: var(--cover-stroke-width, .3px) var(--cover-stroke, #111827); paint-order: stroke fill; pointer-events: none; }
.publication-phone-edit-line.has-shadow { text-shadow: 1px 2px 2px #111827; }
.publication-stage-badge { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 6px 9px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(13,25,45,.76); color: #fff; font-size: 9px; font-weight: 850; line-height: 1; backdrop-filter: blur(8px); }
.publication-stage-badge.is-result { background: rgba(24,116,76,.86); }
.publication-cover-stage > img { transform-origin: center; transition: transform .18s ease, object-position .18s ease; }
.publication-cover-placeholder { z-index: 0; justify-content: flex-start; padding-top: 22px; background: #172236; }
.publication-cover-placeholder span,
.publication-cover-placeholder em { color: rgba(255,255,255,.62); font-size: 10px; font-style: normal; }
.publication-cover-placeholder.is-hot-template-empty { z-index: 2; justify-content: center; align-items: center; padding: 34px 30px; gap: 11px; background: radial-gradient(circle at 50% 34%, #263a59 0, #172236 48%, #101827 100%); text-align: center; }
.publication-cover-placeholder.is-hot-template-empty > i { padding: 5px 9px; border: 1px solid rgba(139,181,236,.36); border-radius: 999px; background: rgba(84,139,213,.14); color: #a9cbfa; font-size: 8px; font-style: normal; font-weight: 850; letter-spacing: .08em; }
.publication-cover-placeholder.is-hot-template-empty > strong { max-width: 90%; color: #fff; font-size: clamp(18px, 7cqw, 28px); line-height: 1.2; text-shadow: none; }
.publication-cover-placeholder.is-hot-template-empty > span { max-width: 88%; color: rgba(229,237,248,.72); font-size: clamp(9px, 3cqw, 11px); line-height: 1.65; }
.publication-cover-placeholder.is-hot-template-empty > ol { width: min(88%, 228px); margin: 8px 0 0; padding: 0; display: grid; gap: 7px; list-style: none; text-align: left; }
.publication-cover-placeholder.is-hot-template-empty > ol li { position: relative; padding: 8px 10px 8px 27px; border: 1px solid rgba(139,181,236,.2); border-radius: 8px; background: rgba(255,255,255,.04); color: rgba(232,240,251,.8); font-size: 9px; }
.publication-cover-placeholder.is-hot-template-empty > ol li::before { content: ""; position: absolute; top: 50%; left: 10px; width: 7px; height: 7px; margin-top: -4px; border: 2px solid rgba(153,194,247,.34); border-top-color: #8fc0ff; border-radius: 50%; animation: publication-generation-spin 1s linear infinite; }
.publication-cover-stage.is-generation-error .publication-cover-placeholder.is-hot-template-empty > i { border-color: rgba(255,137,137,.35); background: rgba(181,60,60,.16); color: #ffc0c0; }
@keyframes publication-generation-spin { to { transform: rotate(360deg); } }
.publication-safe-zone { position: absolute; inset: 6% 8% 10%; z-index: 2; border: 1px dashed rgba(255,255,255,.3); border-radius: 4px; pointer-events: none; }
.publication-title-layer { position: absolute; z-index: 4; padding: 5px; display: flex; flex-direction: column; color: var(--cover-text); font-weight: 950; line-height: .98; letter-spacing: -.04em; cursor: grab; touch-action: none; user-select: none; -webkit-text-stroke: var(--cover-stroke-width) var(--cover-stroke); }
.publication-title-layer.is-locked { cursor: default; touch-action: auto; }
.publication-title-layer:active { cursor: grabbing; }
.publication-title-layer:focus { outline: 1px solid #67a3ff; outline-offset: 4px; }
.publication-title-layer:focus::before,
.publication-title-layer:focus::after,
.publication-title-layer > i { content: ""; position: absolute; width: 8px; height: 8px; border: 1px solid #fff; border-radius: 2px; background: #2f7add; box-shadow: 0 0 0 1px #2f7add; }
.publication-title-layer:focus::before { top: -8px; left: -8px; }
.publication-title-layer:focus::after { right: -8px; bottom: -8px; }
.publication-title-layer > i { top: -8px; right: -8px; display: none; }
.publication-title-layer:focus > i { display: block; }
.publication-title-layer.has-shadow { text-shadow: 0 3px 7px rgba(0,0,0,.8); }
.publication-title-layer em { color: var(--cover-accent); font-style: normal; }
.publication-title-layer span { color: var(--cover-text); }
.publication-canvas-panel > .publication-candidates { margin: 12px 14px 0; }
.publication-canvas-panel > .publication-help { margin: 10px 14px 0; }
.publication-cover-job { margin: 12px 14px 0; padding: 13px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 14px; align-items: center; border: 1px solid #cbd9ec; border-radius: 12px; background: #f5f8fd; }
.publication-cover-job > div:first-child { min-width: 0; display: grid; gap: 3px; }
.publication-cover-job strong { color: #20334f; font-size: 12px; }
.publication-cover-job span { color: #738197; font-size: 10px; line-height: 1.5; }
.publication-cover-job progress { grid-column: 1 / -1; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 999px; accent-color: #246ee9; }
.publication-cover-job progress::-webkit-progress-bar { background: #dfe8f5; border-radius: 999px; }
.publication-cover-job progress::-webkit-progress-value { background: linear-gradient(90deg, #246ee9, #63a1ff); border-radius: 999px; }
.publication-cover-job-actions button { padding: 7px 10px; border: 1px solid #b9c9dd; border-radius: 8px; background: #fff; color: #31506f; font-size: 10px; font-weight: 800; cursor: pointer; }
.publication-cover-job.is-error { border-color: #f0c7c7; background: #fff7f7; }
.publication-cover-job.is-error strong { color: #a64040; }
.publication-cover-job.is-cancelled { border-color: #d7dce5; background: #f8f9fb; }
.publication-cover-quality { margin: 12px 14px 0; padding: 13px 14px; border: 1px solid #cfe1d7; border-radius: 12px; background: #f5fbf7; }
.publication-cover-quality > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.publication-cover-quality > header > div { display: grid; gap: 2px; }
.publication-cover-quality > header span { color: #6d7d74; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.publication-cover-quality > header strong { color: #1f5d3c; font-size: 12px; }
.publication-cover-quality > header em { min-width: 62px; padding: 5px 8px; border-radius: 999px; background: #e3f4e9; color: #26704a; font-size: 10px; font-style: normal; font-weight: 900; text-align: center; }
.publication-cover-quality > p { margin: 8px 0 9px; color: #64746b; font-size: 10px; line-height: 1.55; }
.publication-cover-quality > div { display: flex; flex-wrap: wrap; gap: 6px; }
.publication-cover-quality > div > span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #d6e2da; border-radius: 7px; background: #fff; color: #506158; font-size: 9px; font-weight: 800; }
.publication-cover-quality > div > span > i { width: 6px; height: 6px; border-radius: 50%; background: #36a269; }
.publication-cover-quality > div > span.is-warn > i { background: #e9a23b; }
.publication-cover-quality > div > span.is-fail > i { background: #d9534f; }
.publication-cover-quality.is-failed { border-color: #f0c7c7; background: #fff7f7; }
.publication-cover-quality.is-failed > header strong { color: #a64040; }
.publication-cover-quality.is-failed > header em { background: #f9e3e3; color: #a64040; }
.publication-workbench.is-cover-generating .publication-hot-template-panel { opacity: .68; pointer-events: none; }
.publication-property-panel { display: grid; align-content: start; gap: 12px; }
.publication-property-panel .publication-panel-heading { margin-bottom: 0; }
.publication-property-panel > .v3-field { display: grid; gap: 6px; }
.publication-property-panel > .v3-field > span { color: var(--v3-muted); font-size: 10px; font-weight: 800; }
.publication-property-panel textarea { min-height: 74px; resize: vertical; }
.publication-edit-lines { display: grid; gap: 8px; }
.publication-edit-line-card { display: grid; gap: 7px; padding: 10px; border: 1px solid #d8e4f2; border-radius: 10px; background: #f8fbff; }
.publication-edit-line-card > strong { color: #234b83; font-size: 11px; }
.publication-edit-line-card > input { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #d3deed; border-radius: 7px; background: #fff; font-size: 11px; }
.publication-edit-line-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.publication-edit-line-card label { display: grid; gap: 3px; color: #60738d; font-size: 9px; }
.publication-edit-line-card label input,
.publication-edit-line-card label select { width: 100%; min-width: 0; height: 30px; border: 1px solid #d3deed; border-radius: 6px; background: #fff; }
.publication-edit-line-card .publication-edit-line-check { display: flex; align-items: center; gap: 5px; }
.publication-edit-line-card .publication-edit-line-check input { width: 14px; min-width: 14px; height: 14px; margin: 0; accent-color: #2c70ce; }
.publication-edit-line-help { margin: 0; color: #728298; font-size: 10px; }
.publication-edit-line-help.is-over { color: #c83b3b; }
.publication-range-field { display: grid; gap: 6px; }
.publication-range-field > label { display: flex; justify-content: space-between; color: var(--v3-muted); font-size: 10px; font-weight: 800; }
.publication-range-field output { color: var(--v3-primary); font-size: 9px; }
.publication-range-field input[type="range"] { width: 100%; accent-color: var(--v3-primary); }
.publication-position-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.publication-color-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.publication-color-row label { display: grid; gap: 5px; color: var(--v3-muted); font-size: 9px; font-weight: 800; }
.publication-color-row input { width: 100%; height: 34px; padding: 3px; border: 1px solid var(--v3-line); border-radius: 8px; background: #fff; }
.publication-check-field { min-height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--v3-line); border-radius: 9px; color: #53657c; font-size: 10px; }
.publication-check-field input { accent-color: var(--v3-primary); }
.publication-publish-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); align-items: start; gap: 12px; }
.publication-publish-row > .v3-card { margin: 0; padding: 17px; border-radius: 17px; }
.publication-publish-row .publication-copy-editor { margin-top: 0; padding-top: 17px; border-top: 1px solid var(--v3-line); }
.publication-copy-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.publication-copy-editor > header h3 { margin: 3px 0 0; font-size: 15px; }
.publication-caption-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.publication-caption-label small { color: #718198; font-size: 10px; font-weight: 600; }
.publication-caption-footer { margin-top: -4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.publication-caption-count { color: #607087; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.publication-caption-count.is-over { color: #c94040; }
.publication-caption-actions { display: flex; align-items: center; gap: 8px; }
.publication-caption-actions .v3-btn { min-height: 34px; padding: 0 13px; }
.publication-publish-row .publication-preview-card { position: static; }
.publication-publish-row .publication-phone { max-width: 218px; }
.publication-phone-title { position: absolute; z-index: 2; display: flex; flex-direction: column; color: var(--cover-text, #fff); font-size: 18px; font-weight: 950; line-height: 1; letter-spacing: -.04em; text-shadow: 0 2px 5px rgba(0,0,0,.75); }
.publication-phone-title em { color: var(--cover-accent, #ffd34e); font-style: normal; }
.publication-checklist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.publication-checklist span { padding: 7px 3px; border-left: 0; border-bottom: 2px solid #d5dde8; text-align: center; }
.publication-checklist span.is-done { border-left: 0; border-bottom-color: #3c9564; }

@media (max-width: 1240px) {
  .publication-studio { grid-template-columns: minmax(240px, 280px) minmax(360px, 1fr); }
  .publication-studio.is-hot-template { grid-template-columns: minmax(320px, 390px) minmax(360px, 1fr); }
  .publication-studio.is-hot-template.is-editing { grid-template-columns: minmax(320px, 390px) minmax(360px, 1fr); }
  .publication-property-panel { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .publication-property-panel .publication-panel-heading,
  .publication-property-panel .publication-color-row { grid-column: 1 / -1; }
  .publication-grid { grid-template-columns: minmax(220px, .62fr) minmax(470px, 1.38fr); }
  .publication-preview-card { position: static; grid-column: 1 / -1; }
  .publication-phone { max-width: 250px; }
}

@media (max-width: 860px) {
  .publication-script-bar { grid-template-columns: 1fr; }
  .publication-script-bar > em { justify-self: start; }
  .publication-studio { grid-template-columns: 1fr; }
  .publication-studio.is-hot-template { grid-template-columns: 1fr; }
  .publication-studio.is-hot-template.is-editing { grid-template-columns: 1fr; }
  .publication-material-panel,
  .publication-property-panel { grid-column: auto; }
  .publication-property-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-canvas-shell { min-height: 520px; }
  .publication-publish-row { grid-template-columns: 1fr; }
  .publication-heading { align-items: stretch; flex-direction: column; }
  .publication-heading-actions { justify-content: space-between; }
  .publication-grid { grid-template-columns: 1fr; }
  .publication-preview-card { grid-column: auto; }
  .publication-cover-editor { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .publication-copy-editor > header,
  .publication-caption-label,
  .publication-caption-footer { align-items: stretch; flex-direction: column; }
  .publication-caption-actions { width: 100%; }
  .publication-caption-actions .v3-btn { flex: 1; }
  .publication-inline-portrait-upload { grid-template-columns: 1fr; }
  .publication-inline-portrait-upload > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-inline-portrait-upload .v3-btn { width: 100%; }
  .publication-source-options,
  .publication-template-grid,
  .publication-property-panel { grid-template-columns: 1fr 1fr; }
  .publication-property-panel .publication-panel-heading,
  .publication-property-panel .publication-color-row,
  .publication-property-panel > .v3-field,
  .publication-property-panel > .v3-btn,
  .publication-property-panel > .publication-check-field,
  .publication-property-panel > .publication-position-grid { grid-column: 1 / -1; }
  .publication-canvas-toolbar { align-items: stretch; flex-direction: column; }
  .publication-canvas-toolbar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .publication-canvas-shell { min-height: 460px; padding: 14px; }
  .route-review.is-publication-workspace .agent-view-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
  }
  .route-review.is-publication-workspace .agent-view-tabs button {
    min-width: 0;
    padding: 0 4px;
    font-size: 10px;
  }
  .publication-stepbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    overflow: hidden;
    padding: 7px;
  }
  .publication-stepbar span {
    min-width: 0;
    padding: 7px 2px;
    justify-content: center;
    gap: 4px;
    font-size: 9px;
  }
  .publication-stepbar i { width: 18px; height: 18px; }
  .publication-grid > .v3-card { padding: 14px; }
  .publication-heading h2 { font-size: 20px; }
  .publication-heading-actions { align-items: stretch; flex-direction: column; }
  .publication-cover-editor { grid-template-columns: 1fr; }
  .publication-cover-stage { width: min(100%, 260px); margin: 0 auto; }
  .publication-style-options { grid-template-columns: 1fr; }
  .publication-phone { max-width: 242px; }
}

/* Knowledge growth: make usage, feedback and historical works observable. */
.v3-shell .knowledge-growth-panel {
  margin: 10px 0 14px;
  border: 1px solid #d9e3f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(44, 73, 117, .05);
  overflow: hidden;
}
.v3-shell .knowledge-growth-summary {
  display: flex;
  min-height: 72px;
  padding: 12px 14px;
  align-items: center;
  gap: 18px;
}
.v3-shell .knowledge-growth-primary {
  display: grid;
  min-width: 250px;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
}
.v3-shell .knowledge-growth-primary > span { grid-column: 1; color: #58708f; font-size: 10px; font-weight: 800; }
.v3-shell .knowledge-growth-primary > strong { grid-column: 1; color: #10213a; font-size: 15px; line-height: 1.25; }
.v3-shell .knowledge-growth-progress {
  width: 92px;
  height: 6px;
  grid-column: 2;
  grid-row: 1 / span 2;
  border-radius: 999px;
  background: #edf2f8;
  overflow: hidden;
}
.v3-shell .knowledge-growth-progress i { display: block; height: 100%; border-radius: inherit; background: #286ed7; }
.v3-shell .knowledge-growth-quick {
  display: flex;
  min-width: 0;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-shell .knowledge-growth-quick > span { padding: 5px 8px; border-radius: 8px; color: #63738a; background: #f5f7fa; font-size: 10px; white-space: nowrap; }
.v3-shell .knowledge-growth-quick b { color: #233b5d; font-size: 11px; }
.v3-shell .knowledge-growth-quick .is-pending { color: #7b571d; background: #fff6e5; }
.v3-shell .knowledge-growth-quick .is-pending b { color: #9b6205; }
.v3-shell .knowledge-growth-toggle { flex: none; min-width: 58px; padding: 7px 11px; border: 1px solid #ccd9eb; border-radius: 9px; color: #235da9; background: #fff; cursor: pointer; font-size: 10px; font-weight: 800; }
.v3-shell .knowledge-growth-toggle:hover { border-color: #91b4e8; background: #f5f9ff; }
.v3-shell .knowledge-growth-detail { display: grid; padding: 14px; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.7fr); border-top: 1px solid #e6ebf3; background: #f9fbfe; gap: 14px; }
.v3-shell .knowledge-growth-explain,
.v3-shell .knowledge-growth-empty { display: grid; align-content: start; padding: 14px; border: 1px solid #e1e8f2; border-radius: 12px; background: #fff; gap: 8px; }
.v3-shell .knowledge-growth-explain > strong,
.v3-shell .knowledge-growth-empty > strong { color: #1b2f4b; font-size: 12px; }
.v3-shell .knowledge-growth-explain > p,
.v3-shell .knowledge-growth-empty > span { margin: 0; color: #6d7c91; font-size: 10px; line-height: 1.65; }
.v3-shell .knowledge-growth-explain > div { display: grid; margin-top: 3px; gap: 6px; }
.v3-shell .knowledge-growth-explain > div span { color: #718096; font-size: 10px; }
.v3-shell .knowledge-growth-explain > div b { display: inline-block; min-width: 24px; color: #1e5fb9; font-size: 12px; }
.v3-shell .knowledge-rule-review { min-width: 0; }
.v3-shell .knowledge-rule-review > header { display: flex; margin-bottom: 8px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.v3-shell .knowledge-rule-review > header div { display: grid; gap: 3px; }
.v3-shell .knowledge-rule-review > header strong { color: #263a58; font-size: 12px; }
.v3-shell .knowledge-rule-review > header span { color: #728198; font-size: 10px; }
.v3-shell .knowledge-rule-review > header em { flex: none; color: #9a650d; font-size: 10px; font-style: normal; font-weight: 750; }
.v3-shell .knowledge-rule-list { display: grid; max-height: 218px; padding-right: 4px; overflow-y: auto; gap: 6px; }
.v3-shell .knowledge-rule-list article { display: flex; min-height: 44px; padding: 7px 8px 7px 10px; align-items: center; justify-content: space-between; border: 1px solid #e2e8f1; border-radius: 10px; background: #fff; gap: 10px; }
.v3-shell .knowledge-rule-list article > span { display: flex; min-width: 0; align-items: center; gap: 8px; }
.v3-shell .knowledge-rule-list article b { flex: none; padding: 3px 6px; border-radius: 999px; color: #805821; background: #fff6e7; font-size: 9px; }
.v3-shell .knowledge-rule-list article i { overflow: hidden; color: #3e4d63; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.v3-shell .knowledge-rule-list article div { display: flex; flex: none; gap: 5px; }
.v3-shell .knowledge-rule-list article button { padding: 5px 8px; border: 1px solid #d9e2ef; border-radius: 8px; color: #576a84; background: #fff; cursor: pointer; font-size: 9px; font-weight: 750; }
.v3-shell .knowledge-rule-list article button:first-child { border-color: #276bd3; color: #fff; background: #276bd3; }
.v3-shell .knowledge-tree-history-works { display: grid; padding: 3px 2px 3px 22px; gap: 2px; }
.v3-shell .knowledge-tree-history-work,
.v3-shell .knowledge-tree-history-more {
  display: grid;
  min-height: 28px;
  padding: 5px 7px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  color: #53647b;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  grid-template-columns: 13px minmax(0, 1fr) auto;
  gap: 6px;
  text-align: left;
}
.v3-shell .knowledge-tree-history-work:hover,
.v3-shell .knowledge-tree-history-more:hover { color: #1f66d6; background: #f1f6ff; }
.v3-shell .knowledge-tree-history-work svg { width: 12px; height: 12px; }
.v3-shell .knowledge-tree-history-work span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-shell .knowledge-tree-history-work b { color: #8a97a9; font-size: 8px; }
.v3-shell .knowledge-unused-reason,
.v3-shell .knowledge-used-summary {
  display: flex;
  margin-bottom: 12px;
  padding: 9px 11px;
  align-items: center;
  border: 1px solid #f0dfbd;
  border-radius: 10px;
  color: #725527;
  background: #fffaf0;
  font-size: 10px;
  gap: 8px;
}
.v3-shell .knowledge-used-summary { border-color: #cfe8db; color: #316e50; background: #f2fbf6; }
.v3-shell .knowledge-reader-badges .is-used { color: #28734f; background: #eaf8f1; }
.v3-shell .knowledge-reader-badges .is-unused { color: #896125; background: #fff5e4; }

@media (max-width: 1100px) {
  .v3-shell .knowledge-growth-summary { gap: 12px; }
  .v3-shell .knowledge-growth-quick > span:nth-child(2) { display: none; }
}
@media (max-width: 700px) {
  .v3-shell .knowledge-growth-summary { min-height: 66px; padding: 10px 12px; }
  .v3-shell .knowledge-growth-primary { min-width: 0; flex: 1; }
  .v3-shell .knowledge-growth-progress { display: none; }
  .v3-shell .knowledge-growth-quick > span { display: none; }
  .v3-shell .knowledge-growth-quick > .is-pending { display: inline-flex; }
  .v3-shell .knowledge-growth-detail { grid-template-columns: 1fr; }
  .v3-shell .knowledge-growth-explain { display: none; }
  .v3-shell .knowledge-rule-list article { align-items: stretch; flex-direction: column; }
  .v3-shell .knowledge-rule-list article div { align-self: flex-end; }
}

@media (max-width: 620px) {
  .ai-config-item { align-items: stretch; flex-direction: column; }
  .ai-config-copy span, .ai-config-copy small { white-space: normal; overflow-wrap: anywhere; }
  .ai-config-item .v3-card-actions.compact { justify-content: flex-start; }
  .ai-config-editor { padding: 14px; }
}

/* LingSi Create scrollbar system: quiet by default, clearer while interacting. */
html,
body,
* {
  scrollbar-color: rgba(79, 103, 174, .42) rgba(232, 237, 247, .62);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(232, 237, 247, .62);
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(91, 119, 196, .72), rgba(91, 82, 158, .62));
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(63, 111, 175, .92), rgba(108, 90, 159, .84));
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Tenant account center */
.v3-tenant-account-card {
  width: calc(100% - 8px);
  min-height: 72px;
  margin: auto 4px 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  border: 1px solid #e3e9f2;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f5f8fd);
  color: #1d2939;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(33, 68, 126, .06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.v3-tenant-account-card:hover {
  border-color: #b7c8ed;
  box-shadow: 0 12px 26px rgba(33, 68, 126, .11);
  transform: translateY(-1px);
}
.v3-tenant-avatar,
.tenant-account-hero-avatar {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1759d1, #5474df);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 7px 16px rgba(26, 83, 204, .22);
}
.v3-tenant-avatar { width: 38px; height: 38px; font-size: 15px; }
.v3-tenant-card-copy { min-width: 0; display: grid; gap: 1px; }
.v3-tenant-card-copy em,
.v3-tenant-card-copy small { overflow: hidden; color: #98a2b3; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.v3-tenant-card-copy em { font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.v3-tenant-card-copy strong { overflow: hidden; color: #26344c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.v3-tenant-card-copy small { font-size: 9px; }
.v3-tenant-card-arrow { color: #8da1c8; font-size: 21px; line-height: 1; }

.tenant-account-modal {
  width: min(920px, calc(100vw - 44px));
  max-width: 100%;
  height: min(820px, calc(100vh - 44px));
  height: min(820px, calc(100dvh - 44px));
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 24px;
}
.tenant-account-modal > header { min-height: 58px; padding: 15px 20px; }
.tenant-account-modal .modal-body { min-height: 0; max-height: none; padding: 0; overflow: hidden; background: #f5f7fb; }
.tenant-account-center { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; color: #1d2939; }
.tenant-account-scroll {
  min-height: 0;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.tenant-account-hero {
  position: relative;
  min-height: 132px;
  padding: 24px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border-radius: 19px;
  background: linear-gradient(125deg, #0e55cb, #315fd7 58%, #6c72df);
  color: #fff;
  box-shadow: 0 18px 40px rgba(30, 78, 181, .2);
}
.tenant-account-hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -84px;
  bottom: -150px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 72px rgba(255,255,255,.025);
}
.tenant-account-hero-avatar { width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.34); background: rgba(255,255,255,.17); font-size: 25px; backdrop-filter: blur(10px); }
.tenant-account-hero > div { min-width: 0; position: relative; z-index: 1; }
.tenant-account-hero > div > span { color: rgba(255,255,255,.72); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.tenant-account-hero h2 { margin: 5px 0 3px; overflow: hidden; color: #fff; font-size: clamp(22px, 3vw, 30px); text-overflow: ellipsis; white-space: nowrap; }
.tenant-account-hero p { margin: 0; color: rgba(255,255,255,.77); font-size: 13px; }
.tenant-account-hero > em { position: relative; z-index: 1; padding: 7px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; font-style: normal; font-weight: 750; }
.tenant-account-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tenant-account-panel,
.tenant-device-panel { padding: 18px; border: 1px solid #e2e8f2; border-radius: 17px; background: #fff; box-shadow: 0 8px 24px rgba(31, 51, 87, .055); }
.tenant-account-panel { display: grid; align-content: start; gap: 13px; }
.tenant-account-panel > header,
.tenant-device-panel > header > div { display: flex; align-items: center; gap: 10px; }
.tenant-account-panel > header > span,
.tenant-device-panel > header > div > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #eaf1ff; color: #2457c7; }
.tenant-account-panel > header .ui-icon,
.tenant-device-panel > header .ui-icon { width: 18px; height: 18px; }
.tenant-account-panel header div,
.tenant-device-panel header div div { display: grid; gap: 2px; }
.tenant-account-panel header strong,
.tenant-device-panel header strong { color: #1d2939; font-size: 14px; }
.tenant-account-panel header em,
.tenant-device-panel header em { color: #98a2b3; font-size: 10px; font-style: normal; }
.tenant-account-panel label { display: grid; gap: 6px; }
.tenant-account-panel label > span { color: #667085; font-size: 11px; font-weight: 750; }
.tenant-account-panel input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  outline: 0;
  background: #fbfcfe;
  color: #26344c;
  font: inherit;
  font-size: 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.tenant-account-panel input:focus { border-color: #7d9be2; box-shadow: 0 0 0 4px rgba(53, 91, 194, .1); }
.tenant-account-panel input:disabled { background: #f4f6f9; color: #98a2b3; cursor: not-allowed; }
.tenant-account-panel > .v3-btn { justify-self: start; min-width: 112px; }
.tenant-mfa-note { margin: 0; color: #667085; font-size: 12px; line-height: 1.65; }
.tenant-mfa-recovery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tenant-mfa-recovery code { padding: 8px 10px; border: 1px solid #dce4f2; border-radius: 9px; background: #f7f9fd; color: #17376b; text-align: center; font-size: 12px; font-weight: 750; }
.tenant-device-panel { margin-top: 14px; }
.tenant-device-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tenant-device-panel > header > span { padding: 5px 9px; border-radius: 999px; background: #f0f3f8; color: #7a879d; font-size: 10px; font-weight: 750; }
.tenant-device-list { margin-top: 13px; display: grid; gap: 8px; }
.tenant-device-list.is-collapsed article:nth-child(n + 4) { display: none; }
.tenant-device-list article { min-height: 58px; padding: 9px 11px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #e6ebf2; border-radius: 12px; background: #fbfcfe; }
.tenant-device-list article.is-current { border-color: #b9d7cd; background: #f1faf6; }
.tenant-device-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #edf2fb; color: #5a6f9e; }
.tenant-device-list article.is-current .tenant-device-icon { background: #dff3eb; color: #25936b; }
.tenant-device-icon .ui-icon { width: 17px; height: 17px; }
.tenant-device-list article > div { min-width: 0; display: grid; gap: 3px; }
.tenant-device-list article strong { overflow: hidden; color: #344054; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tenant-device-list article em { color: #98a2b3; font-size: 10px; font-style: normal; }
.tenant-device-list article b { padding: 5px 8px; border-radius: 999px; background: #eef2f7; color: #7a879d; font-size: 9px; }
.tenant-device-list article.is-current b { background: #d9f0e7; color: #197554; }
.tenant-device-toggle {
  width: 100%;
  min-height: 36px;
  margin-top: 9px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #315fc8;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.tenant-device-toggle:hover { border-color: #bfcde0; background: #f1f5fb; }
.tenant-session-panel {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-top: 1px solid #efd6d6;
  border-radius: 0 0 23px 23px;
  background: rgba(255, 250, 250, .98);
  box-shadow: 0 -10px 24px rgba(56, 43, 43, .07);
}
.tenant-session-panel > div { min-width: 0; display: flex; align-items: center; gap: 11px; }
.tenant-session-panel > div > span { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 11px; background: #fdeaea; color: #b54747; }
.tenant-session-panel .ui-icon { width: 18px; height: 18px; }
.tenant-session-panel > div > div { min-width: 0; display: grid; gap: 3px; }
.tenant-session-panel strong { color: #5f2727; font-size: 13px; }
.tenant-session-panel em { color: #9b6b6b; font-size: 10px; font-style: normal; line-height: 1.45; }
.tenant-session-panel .v3-btn { flex: 0 0 auto; }

@media (max-width: 820px) {
  .v3-tenant-account-card { display: none; }
  .tenant-account-modal {
    width: min(680px, 100%);
    height: calc(100vh - 44px);
    height: calc(100dvh - 44px);
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    border-radius: 20px;
  }
  .tenant-account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tenant-account-modal {
    width: 100%;
    height: calc(100vh - 44px);
    height: calc(100dvh - 44px);
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    border-radius: 16px;
  }
  .tenant-account-modal > header { min-height: 52px; padding: 10px 13px; }
  .tenant-account-scroll { padding: 10px; scrollbar-gutter: auto; }
  .tenant-account-hero { min-height: 118px; padding: 18px; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .tenant-account-hero-avatar { width: 52px; height: 52px; font-size: 21px; }
  .tenant-account-hero > em { grid-column: 2; justify-self: start; margin-top: -4px; }
  .tenant-account-panel, .tenant-device-panel { padding: 15px; }
  .tenant-session-panel { padding: 10px 12px; gap: 10px; border-radius: 0 0 15px 15px; }
  .tenant-session-panel em { display: none; }
  .tenant-device-list article { grid-template-columns: 34px minmax(0, 1fr); }
  .tenant-device-list article > b { grid-column: 2; justify-self: start; }
}

@media (max-height: 760px) {
  .tenant-account-scroll { padding: 12px; }
  .tenant-account-hero { min-height: 92px; padding: 14px 18px; }
  .tenant-account-hero-avatar { width: 50px; height: 50px; font-size: 20px; }
  .tenant-account-grid { margin-top: 10px; gap: 10px; }
  .tenant-account-panel,
  .tenant-device-panel { padding: 14px; }
  .tenant-account-panel { gap: 9px; }
  .tenant-device-panel { margin-top: 10px; }
  .tenant-session-panel { padding-top: 10px; padding-bottom: 10px; }
}

/* Agent system-tool execution cards */
.agent-message-tool-card {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #d9e3f3;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fbff, #f3f7ff);
}
.agent-message-tool-card > header,
.agent-message-tool-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
}
.agent-message-tool-card > header { border-bottom: 1px solid #e3eaf5; }
.agent-message-tool-card > header div { display: grid; gap: 2px; }
.agent-message-tool-card > header span { color: #667892; font-size: 11px; }
.agent-message-tool-card > header strong { color: #14233d; font-size: 14px; }
.agent-message-tool-card > header em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8efff;
  color: #2455c3;
  font-size: 11px;
  font-style: normal;
}
.agent-message-tool-card.is-completed > header em { background: #e8f8f1; color: #16835a; }
.agent-message-tool-card.is-failed > header em { background: #fff0ef; color: #bd3b34; }
.agent-message-tool-card > div { display: grid; gap: 0; padding: 5px 13px; }
.agent-message-tool-card > div > article {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  border-bottom: 1px dashed #dfe7f3;
}
.agent-message-tool-card > div > article:last-child { border-bottom: 0; }
.agent-message-tool-card article > i { width: 8px; height: 8px; border-radius: 50%; background: #8da0bd; }
.agent-message-tool-card article.is-running > i,
.agent-message-tool-card article.is-processing > i,
.agent-message-tool-card article.is-queued > i { background: #2f68e8; box-shadow: 0 0 0 4px #e6efff; }
.agent-message-tool-card article.is-completed > i,
.agent-message-tool-card article.is-success > i { background: #22a878; }
.agent-message-tool-card article.is-failed > i { background: #d84b45; }
.agent-message-tool-card article > div { display: grid; gap: 2px; }
.agent-message-tool-card article strong { color: #22324a; font-size: 12px; }
.agent-message-tool-card article span { color: #718098; font-size: 11px; }
.agent-message-tool-card article > em { color: #5270a5; font-size: 11px; font-style: normal; }
.agent-message-tool-card > footer { justify-content: flex-end; border-top: 1px solid #e3eaf5; }

@media (max-width: 520px) {
  .agent-message-tool-card { border-radius: 13px; }
  .agent-message-tool-card > header,
  .agent-message-tool-card > footer { padding: 9px 10px; }
  .agent-message-tool-card > div { padding: 4px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-tenant-account-card { transition: none; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --v3-bg: #080f20;
  --v3-surface: #101a30;
  --v3-surface-soft: #14213a;
  --v3-ink: #f8fafc;
  --v3-muted: #94a3b8;
  --v3-line: rgba(148, 163, 184, .18);
  --v3-primary: #60a5fa;
  --v3-primary-2: #a78bfa;
  --v3-primary-soft: rgba(59, 130, 246, .14);
  --v3-good: #4adea4;
  --v3-warn: #f5c66a;
  --v3-bad: #fb7185;
  --v3-shadow: 0 16px 44px rgba(0, 0, 0, .22);
  --v3-shadow-strong: 0 20px 54px rgba(0, 0, 0, .32);
  --bg: #080f20;
  --bg-2: #101a30;
  --panel: #101a30;
  --panel-2: #14213a;
  --panel-soft: #182640;
  --line: rgba(148, 163, 184, .18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --accent: #60a5fa;
  --accent-2: #a78bfa;
  --cyan: #60a5fa;
  --violet: #a78bfa;
  --warn: #f5c66a;
  --bad: #fb7185;
  --ok: #4adea4;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--v3-bg); color: var(--v3-ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.linsi-window-titlebar { display: none; }

:root[data-window-controls-overlay="true"] body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: var(--linsi-window-titlebar-height, env(titlebar-area-height, 32px));
  border-bottom: 1px solid #e8edf5;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .025);
  pointer-events: none;
  z-index: 999;
}

:root[data-window-controls-overlay="true"] .linsi-window-titlebar {
  position: fixed;
  top: env(titlebar-area-y, 0);
  left: env(titlebar-area-x, 0);
  width: env(titlebar-area-width, calc(100% - 150px));
  height: var(--linsi-window-titlebar-height, env(titlebar-area-height, 32px));
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #17243a;
  background: transparent;
  -webkit-app-region: drag;
  user-select: none;
  z-index: 1000;
}

:root[data-window-controls-overlay="true"] .linsi-window-titlebar img {
  width: 21px;
  height: 21px;
  border-radius: 6px;
  object-fit: contain;
  pointer-events: none;
}

:root[data-window-controls-overlay="true"] .linsi-window-titlebar strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.01em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

:root[data-window-controls-overlay="true"] .linsi-window-titlebar strong span {
  color: #75839a;
  font-weight: 560;
}

:root[data-window-controls-overlay="true"] .v3-shell {
  padding-top: var(--linsi-window-titlebar-height, env(titlebar-area-height, 32px));
}

:root[data-window-controls-overlay="true"] .v3-sidebar {
  top: var(--linsi-window-titlebar-height, env(titlebar-area-height, 32px));
  height: calc(100vh - var(--linsi-window-titlebar-height, env(titlebar-area-height, 32px)));
}

:root[data-window-controls-overlay="true"] .v3-shell > .main {
  height: calc(100vh - var(--linsi-window-titlebar-height, env(titlebar-area-height, 32px)));
}

.v3-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background:
    radial-gradient(circle at 82% -4%, rgba(63, 111, 175, .065), transparent 28%),
    radial-gradient(circle at 98% 25%, rgba(108, 90, 159, .035), transparent 23%),
    var(--v3-bg);
}
.v3-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: auto;
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: color-mix(in srgb, var(--v3-surface) 92%, transparent);
  border-right: 1px solid var(--v3-line);
  backdrop-filter: blur(16px);
  z-index: 20;
}
.v3-sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.v3-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 14px;
  background: #f8faff;
  color: #fff;
  box-shadow: 0 10px 25px rgba(63, 111, 175, .12);
}
.v3-brand-mark svg { width: 39px; height: 39px; display: block; }
.v3-sidebar .brand-title { color: var(--v3-ink); font-size: 18px; font-weight: 850; letter-spacing: -.035em; }
.v3-sidebar .brand-title span { margin-left: 4px; color: var(--v3-primary); font-size: 10px; font-weight: 800; letter-spacing: .01em; }
.v3-sidebar .brand-sub { margin-top: 3px; color: var(--v3-muted); font-size: 11px; }
.v3-account-mini { padding: 14px 15px; display: grid; gap: 4px; border: 1px solid var(--v3-line); border-radius: 15px; background: var(--v3-surface-soft); }
.v3-account-mini span { color: var(--v3-muted); font-size: 11px; }
.v3-account-mini strong { color: var(--v3-ink); font-size: 14px; }
.v3-account-mini em { color: var(--v3-primary); font-size: 11px; font-style: normal; }
.v3-sidebar .nav { display: flex; flex-direction: column; flex: 1; gap: 18px; overflow: auto; }
.v3-sidebar .nav-section { display: grid; gap: 5px; }
.v3-sidebar .nav-title, .v3-sidebar .nav-section-title { padding: 0 12px 5px; color: var(--v3-muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.v3-sidebar .nav button, .v3-sidebar .nav-item {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.v3-sidebar .nav button:hover, .v3-sidebar .nav-item:hover { background: #f1f5ff; color: var(--v3-primary); transform: translateX(2px); }
.v3-sidebar .nav button.active, .v3-sidebar .nav-item.active,
:root[data-theme="light"] .v3-sidebar .nav button.active {
  border-color: transparent;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
  box-shadow: inset 3px 0 0 var(--v3-primary), 0 7px 18px rgba(63, 111, 175, .045);
  font-weight: 760;
}
.v3-sidebar .nav svg { width: 19px; height: 19px; flex: 0 0 auto; }
.v3-sidebar .nav-item-text { display: block; min-width: 0; }
.v3-sidebar .nav-item-text strong { display: block; font-size: 13px; }
.v3-sidebar .nav-item-text em { display: none; }
.v3-sidebar .nav button .nav-icon,
:root[data-theme="light"] .v3-sidebar .nav button .nav-icon {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
}
.v3-sidebar .nav button.active .nav-icon,
:root[data-theme="light"] .v3-sidebar .nav button.active .nav-icon {
  border-color: transparent;
  background: var(--v3-gradient);
  color: #fff;
}

.v3-sidebar .nav button:is(.is-route-entering, .is-route-pressing) .nav-icon svg {
  transform-box: fill-box;
  transform-origin: center;
  animation: nav-icon-tap .2s ease-out;
}

@keyframes nav-icon-tap {
  0% { transform: scale(1); }
  48% { transform: scale(.92); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .v3-sidebar .nav button:is(.is-route-entering, .is-route-pressing) .nav-icon svg {
    animation: none !important;
  }
}

/* Baidu Netdisk import: clear light list independent of the legacy global theme. */
:root[data-theme] .modal-card.baidu-library-import-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(780px, calc(100dvh - 32px));
  border: 1px solid #dbe3ee;
  border-radius: 20px;
  background: #ffffff;
  color: #17263c;
  box-shadow: 0 28px 80px rgba(31, 45, 70, .22);
}

:root[data-theme] .modal-card.baidu-library-import-modal > header {
  min-height: 62px;
  padding: 14px 18px;
  border-bottom: 1px solid #e3e9f2;
  background: #ffffff;
}

:root[data-theme] .modal-card.baidu-library-import-modal > header strong { color: #17263c; font-size: 16px; font-weight: 850; }
:root[data-theme] .modal-card.baidu-library-import-modal > header .mini {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d8e1ed;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-weight: 750;
}
:root[data-theme] .modal-card.baidu-library-import-modal > header .mini:hover { border-color: #b8c8dc; background: #f6f8fc; }
:root[data-theme] .modal-card.baidu-library-import-modal .modal-body { max-height: calc(100dvh - 98px); padding: 0; background: #f5f7fb; }

.baidu-import-dialog { display: grid; gap: 12px; padding: 16px; color: #17263c; }
.baidu-import-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #ffffff;
}
.baidu-import-guide > div { min-width: 0; display: grid; gap: 4px; }
.baidu-import-guide strong { color: #17263c; font-size: 14px; font-weight: 850; }
.baidu-import-guide p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.baidu-import-guide > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: #1457b8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.baidu-import-list { display: grid; gap: 8px; }
.baidu-import-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  align-items: center;
  gap: 16px;
  padding: 11px 12px 11px 16px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(31, 51, 78, .035);
}
.baidu-import-row:hover { border-color: #c8d5e6; box-shadow: 0 7px 18px rgba(31, 51, 78, .07); }
.baidu-import-file { min-width: 0; display: grid; gap: 7px; }
.baidu-import-file > strong {
  overflow: hidden;
  color: #17263c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.baidu-import-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.baidu-import-meta span {
  padding-right: 7px;
  border-right: 1px solid #d9e2ed;
  color: #6b7b91;
  font-size: 11px;
  line-height: 1;
}
.baidu-import-meta span:last-child { padding-right: 0; border-right: 0; }
.baidu-import-action {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #1457c2;
  border-radius: 10px;
  background: #175dcc;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.baidu-import-action.is-importable:hover { background: #0f4fae; }
.baidu-import-action:disabled { cursor: default; opacity: 1; }
.baidu-import-action.is-indexed {
  border-color: #cce7d9;
  background: #edf8f2;
  color: #24734d;
}
.baidu-import-action.is-unsupported {
  border-color: #dfe5ed;
  background: #f1f4f8;
  color: #708096;
}
.baidu-import-list > .empty { margin: 0; border-color: #dfe6ef; background: #ffffff; color: #64748b; }

@media (max-width: 620px) {
  :root[data-theme] .modal-card.baidu-library-import-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  :root[data-theme] .modal-card.baidu-library-import-modal .modal-body { max-height: calc(100dvh - 78px); }
  .baidu-import-dialog { padding: 10px; }
  .baidu-import-guide { align-items: flex-start; flex-direction: column; gap: 10px; }
  .baidu-import-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .baidu-import-action { width: 100%; }
}

.benchmark-add-modal {
  width: min(560px, 100%);
}

.benchmark-add-choice {
  display: grid;
  gap: 14px;
}

.benchmark-add-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce6f2;
  border-radius: 14px;
  background: #f8fbff;
}

.benchmark-add-account img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #e7edf6;
}

.benchmark-add-account span,
.benchmark-tracking-choice span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.benchmark-add-account strong,
.benchmark-tracking-choice strong {
  color: #0b1f3a;
  font-size: 15px;
}

.benchmark-add-account small,
.benchmark-tracking-choice small {
  color: #63758b;
  line-height: 1.55;
}

.benchmark-add-summary {
  display: grid;
  gap: 5px;
  padding: 4px 2px;
}

.benchmark-add-summary strong {
  color: #10243e;
  font-size: 15px;
}

.benchmark-add-summary span {
  color: #63758b;
  font-size: 13px;
  line-height: 1.6;
}

.benchmark-tracking-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #cbd9ea;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.benchmark-tracking-choice:has(input:checked) {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .1);
  background: #f5f9ff;
}

.benchmark-tracking-choice.is-locked {
  cursor: default;
}

.benchmark-tracking-choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #1f6feb;
}

.benchmark-add-actions {
  justify-content: flex-end;
}

@media (max-width: 620px) {
  .benchmark-add-account,
  .benchmark-tracking-choice {
    padding: 12px;
  }
}

.library-workspace.is-cover-mode {
  grid-template-columns: 190px minmax(0, 1fr);
}

.cover-library-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #cfe0f5;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f9ff, #eef6ff);
}

.cover-library-intro > div {
  display: grid;
  gap: 5px;
}

.cover-library-intro strong {
  color: #102a4c;
  font-size: 16px;
}

.cover-library-intro span,
.cover-library-intro em {
  color: #5f728a;
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.cover-library-intro em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #1454a3;
  background: #fff;
}

.cover-library-toolbar {
  justify-content: space-between;
}

.cover-library-toolbar > label:last-child {
  min-width: 220px;
  display: grid;
  gap: 5px;
  color: #64758a;
  font-size: 12px;
}

.cover-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.cover-library-card {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(36, 65, 99, .07);
}

.cover-library-card.is-confirmed {
  border-color: #9ed8b4;
}

.cover-library-preview {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #0c1420;
}

.cover-library-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cover-library-preview span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  background: rgba(8, 20, 35, .72);
  backdrop-filter: blur(8px);
}

.cover-library-card-body {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.cover-library-card-body > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cover-library-type,
.cover-library-status {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
}

.cover-library-type {
  color: #1657a8;
  background: #edf5ff;
}

.cover-library-status {
  color: #9b6300;
  background: #fff5dc;
}

.cover-library-card.is-confirmed .cover-library-status {
  color: #167044;
  background: #e9f8ef;
}

.cover-library-card-body > strong {
  min-height: 42px;
  color: #10243f;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cover-library-card-body small {
  color: #748398;
  line-height: 1.5;
}

.publication-canvas-toolbar button.is-confirmed {
  color: #177245;
  border-color: #a7d9bb;
  background: #ecf9f1;
}

@media (max-width: 900px) {
  .library-workspace.is-cover-mode {
    grid-template-columns: 1fr;
  }

  .cover-library-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .cover-library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .cover-library-toolbar > label:last-child {
    min-width: 0;
  }

  .cover-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cover-library-card-body {
    padding: 10px;
  }

  .cover-library-card-body > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Cloud knowledge library: Obsidian-inspired virtual hierarchy without moving data. */
.v3-shell .knowledge-manager-grid {
  grid-template-columns: 216px minmax(286px, 318px) minmax(0, 1fr);
  gap: 12px;
}

.v3-shell .knowledge-tree-panel,
.v3-shell .knowledge-list-panel,
.v3-shell .knowledge-editor-panel {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface);
  box-shadow: var(--v3-shadow);
}

.v3-shell .knowledge-tree-panel {
  position: sticky;
  top: 18px;
  height: min(760px, calc(100vh - 36px));
  min-height: 520px;
  padding: 10px;
  overflow: hidden auto;
  border-radius: 16px;
  scrollbar-width: thin;
}

.knowledge-tree-head {
  min-height: 52px;
  padding: 8px 7px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf1f5;
}

.knowledge-tree-head > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
}

.knowledge-tree-head svg { width: 16px; height: 16px; }
.knowledge-tree-head > div { min-width: 0; display: grid; gap: 3px; }
.knowledge-tree-head strong { color: var(--v3-ink); font-size: 12px; }
.knowledge-tree-head em { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.knowledge-tree-groups { padding: 10px 0 6px; display: grid; gap: 12px; }

.knowledge-tree-group > header {
  min-height: 34px;
  padding: 0 7px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #64748b;
}

.knowledge-tree-group > header svg { width: 14px; height: 14px; }
.knowledge-tree-group > header span { min-width: 0; display: grid; gap: 2px; }
.knowledge-tree-group > header strong { color: #475569; font-size: 10px; }
.knowledge-tree-group > header em { overflow: hidden; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-tree-group > header b,
.knowledge-tree-group button b,
.knowledge-tree-foot b { min-width: 20px; color: #94a3b8; font-size: 9px; font-weight: 750; text-align: right; }

.knowledge-tree-group > div,
.knowledge-tree-accounts { display: grid; gap: 3px; }

.knowledge-tree-group button {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px 6px 31px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.knowledge-tree-group button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-tree-group button:hover { background: #f7f9fc; color: #334155; }
.knowledge-tree-group button.active { background: var(--v3-primary-soft); color: var(--v3-primary); font-weight: 850; }
.knowledge-tree-group button.active b { color: var(--v3-primary); }
.knowledge-tree-group button:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 1px; }

.knowledge-tree-accounts {
  margin: 3px 0 0 31px;
  padding: 3px 0 3px 8px;
  border-left: 1px solid #e2e8f0;
}

.knowledge-tree-accounts button { min-height: 29px; padding: 5px 7px; font-size: 9px; }

.knowledge-tree-foot {
  min-height: 38px;
  margin-top: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #edf1f5;
  color: #64748b;
  font-size: 9px;
}

.knowledge-tree-foot span { display: inline-flex; align-items: center; gap: 7px; }
.knowledge-tree-foot svg { width: 14px; height: 14px; }
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-tree-panel { display: none; }

@media (max-width: 1180px) {
  .v3-shell .knowledge-manager-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .v3-shell .knowledge-tree-panel {
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    grid-column: 1 / -1;
    overflow: visible;
  }
  .knowledge-tree-head { min-height: 44px; padding-bottom: 9px; }
  .knowledge-tree-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .knowledge-tree-group { padding: 6px; border: 1px solid #edf1f5; border-radius: 11px; }
  .knowledge-tree-foot { margin-top: 2px; }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-tree-panel { display: none; }
}

@media (max-width: 900px) {
  .v3-shell .knowledge-manager-grid { grid-template-columns: 1fr; }
  .v3-shell .knowledge-tree-panel { grid-column: auto; padding: 9px; border-radius: 14px; }
  .knowledge-tree-groups { grid-template-columns: 1fr; }
  .knowledge-tree-group { padding: 4px; }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-tree-panel { display: block; }
}

.knowledge-benchmark-group { display: grid; gap: 7px; padding: 8px; border: 1px solid #e7edf5; border-radius: 14px; background: #f8fafc; }
.knowledge-benchmark-group + .knowledge-benchmark-group { margin-top: 10px; }
.knowledge-benchmark-group > header { display: flex; align-items: center; justify-content: space-between; padding: 3px 4px 1px; }
.knowledge-benchmark-group > header strong { color: var(--v3-ink); font-size: 12px; }
.knowledge-benchmark-group > header em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.knowledge-import-preview { display: grid; gap: 16px; min-width: min(680px, 80vw); }
.knowledge-import-preview > p { margin: 0; color: var(--v3-muted); line-height: 1.65; }
.knowledge-import-summary { display: grid; grid-template-columns: repeat(5, minmax(80px, 1fr)); gap: 8px; }
.knowledge-import-summary span { padding: 12px; display: grid; gap: 3px; border: 1px solid #e6ebf2; border-radius: 12px; background: #f8fafc; color: var(--v3-muted); font-size: 11px; text-align: center; }
.knowledge-import-summary b { color: var(--v3-ink); font-size: 19px; }
.knowledge-import-items { max-height: 360px; display: grid; gap: 7px; overflow: auto; }
.knowledge-import-items article { padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; border: 1px solid #e7edf5; border-radius: 11px; }
.knowledge-import-items article span { min-width: 0; display: grid; gap: 3px; }
.knowledge-import-items article strong { font-size: 12px; }
.knowledge-import-items article em { overflow: hidden; color: var(--v3-muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-import-items article > b { color: var(--v3-primary); font-size: 11px; }
.knowledge-import-items article > small { grid-column: 1 / -1; color: #9a5a3a; }
.knowledge-import-items article.is-conflict,
.knowledge-import-items article.is-unresolved { border-color: #eed7c9; background: #fffaf7; }
.external-knowledge-preview { width: min(720px, 82vw); }
.external-knowledge-file { padding: 13px 14px; display: flex; align-items: center; gap: 11px; border: 1px solid #dce6f4; border-radius: 12px; background: #f8fbff; }
.external-knowledge-file > svg { width: 22px; height: 22px; color: var(--v3-primary); }
.external-knowledge-file span { min-width: 0; display: grid; gap: 4px; }
.external-knowledge-file strong { overflow: hidden; color: var(--v3-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.external-knowledge-file em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.external-knowledge-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.external-knowledge-metrics span { padding: 10px; display: grid; gap: 3px; border: 1px solid #e5eaf2; border-radius: 10px; color: var(--v3-muted); font-size: 10px; text-align: center; }
.external-knowledge-metrics b { color: var(--v3-ink); font-size: 17px; }
.external-knowledge-warnings { display: grid; gap: 6px; }
.external-knowledge-warnings span { padding: 8px 10px; display: flex; align-items: center; gap: 7px; border-radius: 8px; background: #f0f7ff; color: #285a91; font-size: 10px; }
.external-knowledge-warnings svg { width: 13px; height: 13px; }
.external-knowledge-options { display: grid; gap: 12px; }
.external-knowledge-options > label:not(.external-knowledge-ai) { display: grid; gap: 6px; }
.external-knowledge-options label > span { color: var(--v3-ink); font-size: 11px; font-weight: 700; }
.external-knowledge-options select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #dfe5ee; border-radius: 9px; background: #fff; color: var(--v3-ink); }
.external-knowledge-options small { color: var(--v3-muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
.external-knowledge-ai { padding: 11px 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #dfe8f5; border-radius: 10px; background: #fafcff; cursor: pointer; }
.external-knowledge-ai input { margin-top: 2px; }
.external-knowledge-ai > span { display: grid; gap: 3px; }
.external-knowledge-ai strong { font-size: 11px; }
.external-knowledge-excerpt { border: 1px solid #e5eaf2; border-radius: 10px; overflow: hidden; }
.external-knowledge-excerpt summary { padding: 9px 11px; color: var(--v3-muted); cursor: pointer; font-size: 10px; }
.external-knowledge-excerpt pre { max-height: 180px; margin: 0; padding: 12px; overflow: auto; border-top: 1px solid #e5eaf2; background: #f8fafc; color: #445066; font: 10px/1.65 ui-monospace, Consolas, monospace; white-space: pre-wrap; }

@media (max-width: 760px) {
  .knowledge-import-preview { min-width: 0; }
  .knowledge-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .external-knowledge-preview { width: auto; }
  .external-knowledge-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.v3-side-health { padding: 13px 12px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--v3-line); }
.v3-side-health div { display: grid; gap: 2px; }
.v3-side-health strong { font-size: 12px; }
.v3-side-health em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.health-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #55a475; box-shadow: 0 0 0 5px rgba(85, 164, 117, .12); }
.health-dot.is-warn { background: #c17b3c; box-shadow: 0 0 0 5px rgba(193, 123, 60, .12); }

.v3-shell > .main {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: transparent;
}
.v3-topbar {
  min-height: 104px;
  padding: 24px clamp(26px, 4vw, 60px) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--v3-bg) 84%, transparent);
  border: 0;
  backdrop-filter: blur(18px);
}
.v3-topbar .page-crumbs { color: var(--v3-muted); font-size: 11px; }
.v3-topbar .page-title { margin-top: 3px; color: var(--v3-ink); font-size: clamp(22px, 2.2vw, 30px); font-weight: 850; letter-spacing: -.04em; }
.v3-topbar .page-sub { margin-top: 4px; color: var(--v3-muted); font-size: 12px; }
.v3-top-actions { display: flex; align-items: center; gap: 10px; }
.v3-icon-button, .v3-status-button { min-height: 42px; padding: 0 15px; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface); cursor: pointer; }
.v3-icon-button { width: 42px; padding: 0; display: grid; place-items: center; }
.v3-icon-button svg { width: 17px; height: 17px; }
.v3-settings-button {
  border-color: #d6e0ef;
  background: linear-gradient(145deg, #fff, #f3f7fd);
  color: #245cae;
  box-shadow: 0 5px 14px rgba(39, 79, 139, .08);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.v3-settings-button svg { width: 20px; height: 20px; stroke-width: 1.85; transition: transform .25s ease; }
.v3-settings-button:hover { border-color: #aec3e2; box-shadow: 0 8px 18px rgba(39, 79, 139, .14); transform: translateY(-1px); }
.v3-settings-button:hover svg { transform: rotate(24deg); }
.v3-settings-button:active { transform: translateY(0); }
.v3-settings-button.is-warning { border-color: #f0d9b9; background: #fffaf3; color: var(--v3-warn); }
.v3-status-button { color: var(--v3-warn); font-size: 12px; font-weight: 700; }
.v3-status-button.is-ok { color: var(--v3-good); }
.v3-scroll-region {
  min-width: 0;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
}
.v3-shell .content {
  width: min(1200px, calc(100% - 52px));
  min-height: 0;
  margin: 0 auto;
  padding: 12px 0 64px;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 18px;
  overflow: visible;
}
.v3-icp-footer { box-sizing: border-box; width: min(1100px, calc(100% - 64px)); margin: 28px auto 0; padding: 17px 0 25px; border-top: 1px solid #e1e7f1; color: #64738b; }
.v3-icp-footer-main { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 28px; }
.v3-icp-footer-copyright { color: #61718c; font-size: 12px; line-height: 20px; letter-spacing: .005em; white-space: nowrap; }
.v3-icp-footer-links,.v3-icp-footer-records { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 17px; }
.v3-icp-footer-records { margin-top: 8px; }
.v3-shell .v3-scroll-region > .v3-icp-footer a { display: inline-flex; align-items: center; gap: 5px; color: #60718f; font-size: 12px; line-height: 20px; text-decoration: none; white-space: nowrap; }
.v3-shell .v3-scroll-region > .v3-icp-footer .v3-icp-footer-records a { color: #78869e; font-size: 11px; }
.v3-icp-footer img { width: 14px; height: 16px; object-fit: contain; }
.v3-shell .v3-scroll-region > .v3-icp-footer a:hover { color: var(--v3-primary); text-decoration: underline; }
.v3-icp-footer a:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: 3px; border-radius: 2px; }
@media (max-width: 760px) { .v3-icp-footer { width: calc(100% - 32px); margin-top: 20px; padding-top: 14px; } .v3-icp-footer-main { align-items: flex-start; flex-direction: column; gap: 8px; } .v3-icp-footer-links { gap: 3px 14px; } .v3-icp-footer-records { gap: 3px 14px; } }

.v3-dashboard-head, .v3-page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 14px 0 4px; }
.v3-dashboard-head h1, .v3-page-intro h1 { margin: 5px 0 7px; color: var(--v3-ink); font-size: clamp(25px, 3vw, 38px); line-height: 1.16; letter-spacing: -.045em; }
.v3-page-intro h1 { font-size: clamp(24px, 2.5vw, 34px); }
.v3-dashboard-head p, .v3-page-intro p { max-width: 720px; margin: 0; color: var(--v3-muted); font-size: 13px; line-height: 1.7; }
.v3-eyebrow { color: var(--v3-primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.v3-account-picker { min-width: 180px; display: grid; gap: 6px; }
.v3-account-picker label { color: var(--v3-muted); font-size: 11px; }
.v3-account-picker select { height: 44px; padding: 0 38px 0 13px; border: 1px solid var(--v3-line); border-radius: 13px; outline: 0; background: var(--v3-surface); color: var(--v3-ink); }

.v3-action-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v3-primary-action {
  min-height: 72px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--v3-line);
  border-radius: 17px;
  background: var(--v3-surface);
  box-shadow: 0 7px 22px rgba(37, 99, 235, .04);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.v3-primary-action:hover { transform: translateY(-2px); border-color: #b7cafc; box-shadow: var(--v3-shadow); }
.v3-primary-action:nth-child(2) { background: var(--v3-gradient); color: #fff; border-color: transparent; box-shadow: 0 13px 30px rgba(63, 111, 175, .14); }
.v3-primary-action svg { width: 25px; height: 25px; flex: 0 0 auto; }
.v3-primary-action span { display: grid; gap: 4px; }
.v3-primary-action strong { font-size: 14px; }
.v3-primary-action em { opacity: .7; font-size: 11px; font-style: normal; }
.v3-primary-action.is-disabled { opacity: .52; cursor: not-allowed; filter: saturate(.5); }

.v3-health-strip { min-height: 54px; padding: 0 20px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--v3-line); border-radius: 15px; background: var(--v3-surface); cursor: pointer; text-align: left; }
.v3-health-strip strong { font-size: 12px; }
.v3-health-strip span:not(.health-dot) { color: var(--v3-muted); font-size: 11px; }
.v3-health-strip em { margin-left: auto; display: flex; align-items: center; gap: 5px; color: var(--v3-primary); font-size: 11px; font-style: normal; }
.v3-health-strip svg { width: 14px; height: 14px; }
.v3-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.v3-stat-grid article { min-height: 108px; padding: 20px; display: flex; flex-direction: column; justify-content: center; gap: 7px; border: 1px solid var(--v3-line); border-radius: 18px; background: var(--v3-surface); box-shadow: 0 8px 25px rgba(37, 99, 235, .04); }
.v3-stat-grid strong { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.v3-stat-grid span { color: var(--v3-muted); font-size: 11px; }
.v3-stat-grid.compact article { min-height: 92px; }
.v3-stat-grid.compact strong { font-size: 25px; }

.v3-card { padding: 24px; border: 1px solid var(--v3-line); border-radius: 20px; background: var(--v3-surface); box-shadow: var(--v3-shadow); }
.v3-card > header { margin: 0 0 20px; padding: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border: 0; background: transparent; }
.v3-card h2 { margin: 4px 0 0; color: var(--v3-ink); font-size: 19px; line-height: 1.35; letter-spacing: -.025em; }
.v3-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .8fr); gap: 16px; }
.v3-focus-card > p, .v3-brief-card > p { margin: 18px 0; color: var(--v3-muted); font-size: 13px; line-height: 1.8; }
.v3-score { display: flex; align-items: baseline; color: var(--v3-primary); }
.v3-score strong { font-size: 34px; line-height: 1; }
.v3-score span { font-size: 11px; }
.v3-gate { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 12px; background: #fbf3ea; color: #7f5630; font-size: 11px; }
.v3-gate strong { text-align: right; font-size: 11px; }
.v3-gate.is-pass { background: #edf6f0; color: var(--v3-good); }
.v3-next-action { margin-top: 14px; padding: 13px 15px; display: grid; gap: 4px; border-left: 3px solid var(--v3-primary); background: var(--v3-surface-soft); }
.v3-next-action span { color: var(--v3-muted); font-size: 10px; }
.v3-next-action strong { font-size: 12px; line-height: 1.5; }
.v3-card-actions { margin-top: 18px; display: flex; gap: 9px; }
.v3-card-actions.compact { margin-top: 0; flex-wrap: wrap; justify-content: flex-end; }
.ai-config-list { display: grid; gap: 10px; }
.ai-config-item { padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--v3-line); border-radius: 14px; background: var(--v3-surface-soft); }
.ai-config-item.is-default { border-color: rgba(37, 99, 235, .38); background: linear-gradient(135deg, #f8fbff, #eef5ff); }
.ai-config-copy { min-width: 0; display: grid; gap: 4px; }
.ai-config-copy strong { font-size: 13px; }
.ai-config-copy span, .ai-config-copy small { overflow: hidden; color: var(--v3-muted); font-size: 10px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.ai-config-editor { padding: 18px; border: 1px dashed #b9c9dd; border-radius: 16px; background: #fbfdff; }
.ai-config-editor-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-config-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ai-config-form-grid .v3-field { min-width: 0; }
.ai-config-form-grid .v3-field input, .ai-config-form-grid .v3-field select { width: 100%; min-width: 0; }
.v3-btn { min-height: 39px; padding: 0 15px; border: 1px solid var(--v3-line); border-radius: 11px; background: var(--v3-surface); color: var(--v3-ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.v3-btn:hover { border-color: #b9c5d4; }
.v3-btn.primary { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }
.v3-progress-list { display: grid; gap: 15px; }
.v3-progress-list > div { display: grid; grid-template-columns: 62px minmax(90px, 1fr) 24px; align-items: center; gap: 10px; }
.v3-progress-list span { color: var(--v3-muted); font-size: 11px; }
.v3-progress-list i { height: 7px; overflow: hidden; border-radius: 10px; background: #f1f5f9; }
.v3-progress-list b { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--v3-primary-2), var(--v3-primary)); }
.v3-progress-list strong { font-size: 11px; }
.v3-text-link { padding: 0; display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--v3-primary); cursor: pointer; font-size: 11px; font-weight: 700; }
.v3-progress-card .v3-text-link { margin-top: 21px; }
.v3-text-link svg { width: 14px; height: 14px; }
.v3-brief-warning { padding: 12px 14px; display: flex; gap: 9px; align-items: center; border-radius: 12px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 11px; }
.v3-brief-warning svg { width: 16px; height: 16px; flex: 0 0 auto; }
.v3-empty { padding: 28px; color: var(--v3-muted); font-size: 12px; text-align: center; }
.v3-count-chip, .v3-system-ok { padding: 7px 10px; border-radius: 999px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 10px; font-weight: 750; }

.v3-benchmark-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.v3-benchmark-grid article { padding: 13px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--v3-line); border-radius: 14px; background: var(--v3-surface-soft); }
.v3-benchmark-grid img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.v3-benchmark-grid article > div { min-width: 0; display: grid; gap: 3px; }
.v3-benchmark-grid strong, .v3-benchmark-grid span, .v3-benchmark-grid em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-benchmark-grid strong { font-size: 12px; }
.v3-benchmark-grid span { color: var(--v3-muted); font-size: 10px; }
.v3-benchmark-grid em { color: var(--v3-primary); font-size: 10px; font-style: normal; }
.benchmark-directory-card { display: grid; gap: 18px; }
.benchmark-directory-card > header { align-items: center; }
.benchmark-directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.benchmark-directory-item { position: relative; min-width: 0; padding: 18px; display: grid; gap: 13px; border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface-soft); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.benchmark-directory-item.is-bulk-mode { padding-top: 56px; }
.benchmark-directory-item.is-bulk-selected { border-color: var(--v3-primary); background: linear-gradient(145deg, #fff, var(--v3-primary-soft)); box-shadow: 0 0 0 2px rgba(37, 99, 235, .1); }
.benchmark-bulk-check { position: absolute; top: 14px; right: 14px; min-height: 31px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--v3-line); border-radius: 999px; background: #fff; color: var(--v3-muted); cursor: pointer; font-size: 11px; font-weight: 750; }
.benchmark-bulk-check:has(input:checked) { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }
.benchmark-bulk-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--v3-primary); }
.benchmark-bulk-toolbar { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #c9d8f2; border-radius: 14px; background: linear-gradient(135deg, #f8fbff, #edf4ff); }
.benchmark-bulk-toolbar > div:first-child { min-width: 0; display: grid; gap: 3px; }
.benchmark-bulk-toolbar strong { font-size: 13px; }
.benchmark-bulk-toolbar span { color: var(--v3-muted); font-size: 10px; line-height: 1.5; }
.benchmark-bulk-preview-list { max-height: 230px; padding: 6px; display: grid; gap: 6px; overflow-y: auto; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface-soft); }
.benchmark-bulk-preview-list > div { padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 9px; background: #fff; }
.benchmark-bulk-preview-list strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.benchmark-bulk-preview-list span { flex: 0 0 auto; color: var(--v3-muted); font-size: 10px; }
.benchmark-directory-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.benchmark-directory-main .avatar { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.benchmark-directory-main > div { min-width: 0; display: grid; gap: 4px; }
.benchmark-directory-main strong, .benchmark-directory-main span, .benchmark-directory-main em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benchmark-directory-main strong { font-size: 14px; }
.benchmark-directory-main span { color: var(--v3-primary); font-size: 11px; }
.benchmark-directory-main em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.benchmark-directory-metrics { display: flex; flex-wrap: wrap; gap: 8px; color: var(--v3-muted); font-size: 11px; }
.benchmark-directory-metrics span { padding: 6px 9px; border-radius: 9px; background: var(--v3-surface); }
.benchmark-directory-metrics b { color: var(--v3-ink); margin-left: 3px; }
.benchmark-directory-links { min-height: 36px; color: var(--v3-muted); font-size: 11px; line-height: 1.65; }
.benchmark-directory-item .v3-card-actions { margin-top: 0; }
@media (max-width: 860px) {
  .benchmark-directory-grid { grid-template-columns: 1fr; }
}
.v3-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.v3-tool-grid button { min-height: 126px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border: 1px solid var(--v3-line); border-radius: 17px; background: var(--v3-surface); cursor: pointer; text-align: left; }
.v3-tool-grid button:hover { border-color: #d6dfeb; box-shadow: var(--v3-shadow); }
.v3-tool-grid svg { width: 22px; height: 22px; color: var(--v3-primary); }
.v3-tool-grid strong { margin-top: auto; font-size: 13px; }
.v3-tool-grid span { color: var(--v3-muted); font-size: 10px; }
.v3-tool-grid.compact button { min-height: 108px; }

.v3-account-home-grid { display: grid; grid-template-columns: 1.08fr 1fr 1fr 1fr; gap: 14px; }
.v3-account-home-card { min-height: 280px; display: flex; flex-direction: column; }
.v3-account-home-card.is-primary { background: linear-gradient(145deg, #ffffff, #f1f5f9); }
.v3-account-home-card > p { margin: 0 0 18px; color: var(--v3-muted); font-size: 13px; line-height: 1.75; }
.v3-account-home-card .v3-card-actions { margin-top: auto; }
.account-tools-section { display: grid; gap: 18px; }
.account-tools-section.is-collapsed { gap: 0; padding-top: 17px; padding-bottom: 17px; }
.account-tools-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.account-tools-header > div { min-width: 0; }
.account-tools-header h2 { margin: 4px 0 5px; font-size: 21px; }
.account-tools-header p { margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.65; }
.account-tools-section.is-collapsed .account-tools-header { align-items: center; }
.account-tools-section.is-collapsed .account-tools-header h2 { margin-bottom: 0; font-size: 16px; }
.account-tools-header-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.account-tools-toggle { width: 34px; height: 34px; }
.account-tools-body { display: grid; gap: 18px; }
.account-tools-body[hidden] { display: none; }
.account-tool-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.account-tool-filters button { min-height: 34px; padding: 0 15px; border: 1px solid var(--v3-line); border-radius: 999px; background: #fff; color: var(--v3-muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.account-tool-filters button:hover { border-color: #b9c9e2; color: var(--v3-primary); }
.account-tool-filters button.is-active { border-color: var(--v3-primary); background: var(--v3-primary-soft); color: var(--v3-primary); }
.account-all-tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.account-tool-card { position: relative; min-width: 0; min-height: 178px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; overflow: hidden; border: 1px solid var(--v3-line); border-radius: 16px; background: linear-gradient(150deg, #fff, #f9fbff); color: var(--v3-ink); text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.account-tool-card:hover { transform: translateY(-2px); border-color: #b8c9e5; box-shadow: 0 12px 28px rgba(38, 68, 112, .1); }
.account-tool-card:focus-visible { outline: 3px solid rgba(47, 104, 232, .2); outline-offset: 2px; }
.account-tool-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--v3-primary-soft); color: var(--v3-primary); }
.account-tool-icon svg { width: 20px; height: 20px; }
.account-tool-state { position: absolute; top: 16px; right: 16px; max-width: calc(100% - 70px); padding: 5px 8px; overflow: hidden; border-radius: 999px; background: #edf2f8; color: #667892; font-size: 10px; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.account-tool-card.tone-ready .account-tool-state { background: #e8f7ef; color: #16835a; }
.account-tool-card.tone-working .account-tool-state { background: #e9f0ff; color: var(--v3-primary); }
.account-tool-card.tone-needs .account-tool-state { background: #fff4df; color: #a76500; }
.account-tool-card > strong { margin-top: 3px; font-size: 15px; line-height: 1.35; }
.account-tool-description { min-height: 38px; color: var(--v3-muted); font-size: 12px; line-height: 1.6; }
.account-tool-footer { width: 100%; margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #e9eef6; }
.account-tool-footer em, .account-tool-footer b { overflow: hidden; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.account-tool-footer em { color: var(--v3-muted); }
.account-tool-footer b { color: var(--v3-primary); font-weight: 750; }
.v3-account-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.v3-account-kpis span { padding: 11px; border-radius: 12px; background: rgba(255,255,255,.72); color: var(--v3-muted); font-size: 11px; }
.v3-account-kpis strong { display: block; margin-top: 4px; color: var(--v3-ink); font-size: 17px; }
.v3-account-mini-list { display: grid; gap: 8px; margin-bottom: 16px; }
.v3-account-mini-list button { width: 100%; padding: 9px; display: grid; grid-template-columns: 36px minmax(0,1fr) 18px; align-items: center; gap: 10px; border: 1px solid var(--v3-line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.v3-account-mini-list button:hover { border-color: #d6dfeb; background: #ffffff; }
.v3-account-mini-list img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.v3-account-mini-list span { min-width: 0; }
.v3-account-mini-list strong, .v3-account-mini-list em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-account-mini-list strong { color: var(--v3-ink); font-size: 12px; }
.v3-account-mini-list em { margin-top: 3px; color: var(--v3-muted); font-size: 10px; font-style: normal; }
.v3-account-mini-list svg { width: 17px; color: var(--v3-primary); }
.v3-latest-event { min-width: 0; padding: 14px; display: grid; gap: 7px; border: 1px solid var(--v3-line); border-radius: 13px; background: #fff; }
.v3-latest-event span { color: var(--v3-primary); font-size: 10px; font-weight: 800; }
.v3-latest-event strong { display: -webkit-box; overflow: hidden; color: var(--v3-ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.v3-latest-event em { color: var(--v3-muted); font-size: 10px; font-style: normal; }

.hot-radar-entry {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 8%, rgba(37,99,235,.10), transparent 34%),
    linear-gradient(145deg, #fff, #f8fbff);
}
.hot-radar-entry .hot-radar-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37,99,235,.08);
  animation: hot-radar-pulse 2.4s ease-out infinite;
}
.hot-radar-entry-visual {
  min-height: 92px;
  margin: 2px 0 14px;
  padding: 13px;
  display: grid;
  align-content: center;
  gap: 9px;
  border: 1px solid #e3eaf5;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
.hot-radar-entry-visual span { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px; color: #526178; font-size: 11px; }
.hot-radar-entry-visual i { height: 3px; overflow: hidden; border-radius: 99px; background: #e6edf8; }
.hot-radar-entry-visual i::after { content: ""; display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #93b4ed, #2563eb); }
.hot-radar-entry-visual span:nth-child(2) i::after { width: 48%; }
.hot-radar-entry-visual span:nth-child(3) i::after { width: 86%; }
.hot-radar-entry-visual b { font-weight: 700; }

.hot-radar-loading { min-height: 280px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--v3-muted); }
.hot-radar-loader { width: 22px; height: 22px; border: 2px solid #dbe5f5; border-top-color: #2563eb; border-radius: 50%; animation: hot-radar-spin .8s linear infinite; }
.hot-radar-intro .v3-card-actions { align-items: center; }
.hot-radar-updated { color: var(--v3-muted); font-size: 12px; white-space: nowrap; }
.hot-radar-capabilities {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.hot-radar-capabilities > span { min-height: 54px; padding: 10px 13px; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; align-items: center; border-radius: 11px; background: #f7f9fc; }
.hot-radar-capabilities svg { grid-row: 1 / 3; width: 18px; color: #2563eb; }
.hot-radar-capabilities b { color: var(--v3-ink); font-size: 12px; }
.hot-radar-capabilities em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.hot-radar-stats { grid-template-columns: repeat(4, minmax(0,1fr)); }
.hot-radar-priority-strip { margin: 14px 0; padding: 17px; border: 1px solid #d8e6fb; border-radius: 16px; background: linear-gradient(135deg, #f4f8ff, #fff); }
.hot-radar-priority-strip header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.hot-radar-priority-strip h2 { margin: 4px 0 0; color: var(--v3-ink); font-size: 17px; }
.hot-radar-priority-strip p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.hot-radar-priority-strip > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.hot-radar-priority-strip button { min-width: 0; padding: 12px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 9px; align-items: center; border: 1px solid #dbe6f7; border-radius: 12px; background: rgba(255,255,255,.88); color: inherit; text-align: left; cursor: pointer; }
.hot-radar-priority-strip button:hover { border-color: #9ebce9; box-shadow: 0 7px 20px rgba(37,99,235,.08); }
.hot-radar-priority-strip button > b { color: #2563eb; font-size: 12px; }
.hot-radar-priority-strip button span { min-width: 0; display: grid; gap: 4px; }
.hot-radar-priority-strip button strong, .hot-radar-priority-strip button em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-radar-priority-strip button strong { color: var(--v3-ink); font-size: 12px; }
.hot-radar-priority-strip button em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.hot-radar-priority-strip button > i { color: #1658c7; font-size: 17px; font-style: normal; font-weight: 800; }
.hot-radar-evidence { margin-top: 14px; padding: 13px; display: grid; gap: 6px; border: 1px solid #f0dcb1; border-radius: 13px; background: #fffaf0; }
.hot-radar-evidence > span { color: #8d6420; font-size: 10px; font-weight: 800; }
.hot-radar-evidence strong { color: var(--v3-ink); font-size: 12px; }
.hot-radar-evidence p, .hot-radar-evidence em { margin: 0; color: #6d737d; font-size: 10px; font-style: normal; line-height: 1.65; }
.hot-radar-workspace { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(310px,.75fr); gap: 14px; align-items: start; }
.hot-radar-list-card { padding: 0; overflow: hidden; }
.hot-radar-list-head { padding: 17px 18px; align-items: center; border-bottom: 1px solid var(--v3-line); }
.hot-radar-list-head h2 { margin-top: 4px; }
.hot-radar-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.hot-radar-filter button { padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--v3-muted); font: inherit; font-size: 11px; cursor: pointer; }
.hot-radar-filter button:hover { background: #f3f6fb; color: var(--v3-ink); }
.hot-radar-filter button.active { border-color: #d7e3f6; background: #edf4ff; color: #1658c7; font-weight: 750; }
.hot-radar-topic-list { max-height: 680px; overflow: auto; }
.hot-radar-topic {
  width: 100%;
  min-height: 91px;
  padding: 14px 17px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 58px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease;
}
.hot-radar-topic:hover { background: #f8faff; }
.hot-radar-topic.active { position: relative; z-index: 1; background: #f4f8ff; box-shadow: inset 3px 0 #2563eb; }
.hot-radar-rank { color: #7b8799; font-size: 17px; font-weight: 780; text-align: center; }
.hot-radar-topic:nth-child(-n+3) .hot-radar-rank { color: #1d5dcc; }
.hot-radar-topic-main { min-width: 0; display: grid; gap: 6px; }
.hot-radar-topic-main > strong { overflow: hidden; color: var(--v3-ink); font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.hot-radar-topic-main > em { overflow: hidden; color: var(--v3-muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.hot-radar-topic-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.hot-radar-topic-meta i { padding: 3px 6px; border-radius: 6px; background: #f0f3f7; color: #6f7a8a; font-size: 9px; font-style: normal; }
.hot-radar-topic-meta .trend-rising { background: #edf8f3; color: #287556; }
.hot-radar-topic-meta .trend-new { background: #edf4ff; color: #1e5fc8; }
.hot-radar-topic-meta .trend-falling { background: #f5f5f6; color: #7a7f89; }
.hot-radar-topic-meta .decision { background: #f1edff; color: #6550b5; }
.hot-radar-fit { display: grid; justify-items: end; gap: 2px; }
.hot-radar-fit b { color: #1658c7; font-size: 20px; }
.hot-radar-fit em { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.hot-radar-detail { position: sticky; top: 14px; min-height: 470px; }
.hot-radar-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hot-radar-detail-rank { color: var(--v3-muted); font-size: 10px; }
.hot-radar-detail > h2 { margin: 13px 0 16px; color: var(--v3-ink); font-size: 21px; line-height: 1.42; }
.hot-radar-score { padding: 15px; display: flex; align-items: center; gap: 11px; border-radius: 14px; background: #f2f6fd; }
.hot-radar-score > strong { color: #1658c7; font-size: 36px; line-height: 1; }
.hot-radar-score span { display: grid; gap: 3px; }
.hot-radar-score b { color: var(--v3-ink); font-size: 12px; }
.hot-radar-score em { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.hot-radar-facts { margin: 16px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.hot-radar-facts div { padding: 10px; border: 1px solid var(--v3-line); border-radius: 10px; }
.hot-radar-facts dt { color: var(--v3-muted); font-size: 9px; }
.hot-radar-facts dd { margin: 5px 0 0; color: var(--v3-ink); font-size: 11px; font-weight: 700; }
.hot-radar-reason { padding: 14px; border: 1px solid var(--v3-line); border-radius: 13px; }
.hot-radar-reason > span { color: var(--v3-ink); font-size: 11px; font-weight: 750; }
.hot-radar-reason p { margin: 7px 0 0; color: var(--v3-muted); font-size: 11px; line-height: 1.65; }
.hot-radar-reason div { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.hot-radar-reason i { padding: 4px 7px; border-radius: 7px; background: #edf4ff; color: #1e5fc8; font-size: 9px; font-style: normal; }
.hot-radar-detail-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.hot-radar-source-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 5px; color: #1658c7; font-size: 11px; font-weight: 700; text-decoration: none; }
.hot-radar-source-link svg { width: 15px; }
.hot-radar-note { margin: 14px 0 0; color: var(--v3-muted); font-size: 9px; line-height: 1.6; }

.hot-radar-command-center {
  margin: 14px 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(320px,.92fr) minmax(360px,1.2fr) minmax(250px,.72fr);
  gap: 18px;
  overflow: hidden;
  background: radial-gradient(circle at 12% 12%, rgba(37,99,235,.09), transparent 34%), #fff;
}
.hot-radar-command-center > * { min-width: 0; }
.hot-radar-command-chart { padding-right: 18px; border-right: 1px solid var(--v3-line); }
.hot-radar-command-chart > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hot-radar-command-chart h2 { margin: 4px 0 0; color: var(--v3-ink); font-size: 16px; }
.hot-radar-opportunity-score { color: #1658c7; font-size: 28px; line-height: 1; text-align: right; }
.hot-radar-opportunity-score em { margin-top: 4px; display: block; color: var(--v3-muted); font-size: 9px; font-style: normal; font-weight: 600; }
.hot-radar-chart { margin: 4px auto 0; max-width: 350px; }
.hot-radar-chart svg { width: 100%; overflow: visible; }
.radar-grid polygon, .radar-grid line { fill: none; stroke: #dfe8f5; stroke-width: 1; }
.radar-grid polygon:nth-child(3), .radar-grid polygon:nth-child(4) { stroke: #d2deef; }
.radar-threshold { fill: rgba(245,158,11,.04); stroke: #d89821; stroke-width: 1.5; stroke-dasharray: 5 5; }
.radar-current { fill: rgba(37,99,235,.2); stroke: #2563eb; stroke-width: 2.2; filter: drop-shadow(0 5px 7px rgba(37,99,235,.16)); }
.radar-points circle { fill: #fff; stroke: #2563eb; stroke-width: 2; }
.radar-labels text { fill: #526178; font-size: 10px; font-weight: 650; }
.radar-labels .radar-axis-value { fill: #1658c7; font-size: 9px; font-weight: 800; }
.radar-labels .radar-axis-value.missing { fill: #a36a12; }
.hot-radar-legend { display: flex; justify-content: center; gap: 18px; color: var(--v3-muted); font-size: 9px; }
.hot-radar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hot-radar-legend i { width: 18px; height: 7px; display: inline-block; border-radius: 3px; }
.hot-radar-legend .current { background: rgba(37,99,235,.2); border: 1px solid #2563eb; }
.hot-radar-legend .threshold { height: 0; border-top: 1px dashed #d89821; border-radius: 0; }
.hot-radar-compact-bars { display: none; }
.hot-radar-command-summary { padding: 3px 0; }
.hot-radar-verdict { padding: 5px 9px; display: inline-flex; border-radius: 99px; background: #eef3fa; color: #526178; font-size: 10px; font-weight: 800; }
.hot-radar-verdict.priority { background: #e9f7ef; color: #24714f; }
.hot-radar-verdict.observe { background: #fff6df; color: #936414; }
.hot-radar-command-summary > h2 { margin: 12px 0 7px; color: var(--v3-ink); font-size: 22px; line-height: 1.35; }
.hot-radar-command-summary > p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.7; }
.hot-radar-signal-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.hot-radar-signal-grid article { min-height: 72px; padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; border: 1px solid #e0e8f4; border-radius: 11px; background: #f8faff; }
.hot-radar-signal-grid article.missing { border-color: #ead9b5; background: #fffaf0; }
.hot-radar-signal-grid span { color: var(--v3-muted); font-size: 9px; }
.hot-radar-signal-grid strong { color: #1658c7; font-size: 15px; }
.hot-radar-signal-grid .missing strong { color: #a36a12; font-size: 11px; }
.hot-radar-signal-grid em { grid-column: 1 / -1; overflow: hidden; color: #667386; font-size: 9px; font-style: normal; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.hot-radar-command-action { padding: 15px; border-radius: 14px; background: #101d32; color: #fff; }
.hot-radar-command-action .v3-eyebrow { color: #91b9ff; }
.hot-radar-command-action h3 { margin: 11px 0 14px; font-size: 16px; line-height: 1.5; }
.hot-radar-gate { padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.06); }
.hot-radar-gate.missing { border-color: rgba(245,189,82,.35); background: rgba(196,132,19,.12); }
.hot-radar-gate b { font-size: 11px; }
.hot-radar-gate p { margin: 6px 0 0; color: #b8c5d8; font-size: 9px; line-height: 1.55; }
.hot-radar-command-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hot-radar-command-actions .v3-btn { min-width: 0; padding-inline: 8px; }
.hot-radar-command-actions .subtle { grid-column: 1 / -1; color: #bac6d7; border-color: rgba(255,255,255,.14); }
.hot-radar-boundary { margin: 12px 0 0; color: #8fa0b8; font-size: 9px; line-height: 1.6; }
.hot-radar-list-tools { margin: 0 0 8px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--v3-muted); font-size: 10px; }
.hot-radar-list-tools select { min-height: 34px; padding: 0 30px 0 10px; border: 1px solid #d8e2f0; border-radius: 9px; background: #fff; color: var(--v3-ink); font: inherit; }
.hot-radar-list-tools em { font-style: normal; }

@keyframes hot-radar-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.18); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(37,99,235,0); }
}
@keyframes hot-radar-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .hot-radar-command-center { grid-template-columns: minmax(300px,.85fr) minmax(360px,1.15fr); }
  .hot-radar-command-action { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(200px,.75fr) minmax(260px,1fr); gap: 10px 18px; align-items: start; }
  .hot-radar-command-action h3 { margin: 7px 0; }
  .hot-radar-command-action .hot-radar-gate { grid-row: 1 / 3; grid-column: 2; }
  .hot-radar-command-actions { grid-column: 1; }
  .hot-radar-boundary { grid-column: 2; }
  .hot-radar-workspace { grid-template-columns: 1fr; }
  .hot-radar-detail { position: static; min-height: 0; }
}
@media (max-width: 760px) {
  .hot-radar-command-center { padding: 14px; grid-template-columns: 1fr; gap: 14px; }
  .hot-radar-command-chart { padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--v3-line); }
  .hot-radar-chart { display: none; }
  .hot-radar-compact-bars { margin-top: 15px; display: grid; gap: 9px; }
  .hot-radar-axis-row { display: grid; grid-template-columns: 62px minmax(0,1fr) 42px; align-items: center; gap: 8px; color: #526178; font-size: 9px; }
  .hot-radar-axis-row > i { position: relative; height: 7px; border-radius: 99px; background: #e8eef7; }
  .hot-radar-axis-row > i b { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#70a0ef,#2563eb); }
  .hot-radar-axis-row > i em { position: absolute; top: -2px; width: 1px; height: 11px; background: #d89821; }
  .hot-radar-axis-row strong { color: #1658c7; font-size: 9px; text-align: right; }
  .hot-radar-axis-row.missing strong { color: #a36a12; }
  .hot-radar-command-action { grid-column: auto; display: block; }
  .hot-radar-list-tools { align-items: flex-start; justify-content: flex-start; flex-wrap: wrap; }
  .hot-radar-list-tools em { width: 100%; }
  .hot-radar-capabilities, .hot-radar-stats { grid-template-columns: 1fr 1fr; }
  .hot-radar-priority-strip header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .hot-radar-priority-strip > div { grid-template-columns: 1fr; }
  .hot-radar-list-head { align-items: flex-start; flex-direction: column; }
  .hot-radar-filter { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .hot-radar-signal-grid { grid-template-columns: 1fr; }
  .hot-radar-command-summary > h2 { font-size: 19px; }
  .hot-radar-capabilities, .hot-radar-stats { grid-template-columns: 1fr; }
  .hot-radar-topic { grid-template-columns: 26px minmax(0,1fr); }
  .hot-radar-fit { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: baseline; gap: 6px; }
  .hot-radar-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .route-library .library-storage-card::after,
  .route-library .library-storage-card.is-connected .library-storage-status > i,
  .route-library .library-quota-track i,
  .route-library .library-quota-loading i {
    animation: none;
  }
}

.v3-opportunity-list { display: grid; gap: 12px; }
.v3-opportunity-list > article { padding: 18px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 68px auto; align-items: center; gap: 16px; border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface-soft); }
.v3-opportunity-list > article.is-ready { border-color: #aecbbb; background: #fbfffc; }
.v3-rank { color: #b9c5d4; font-size: 19px; font-weight: 800; }
.v3-opportunity-main { display: grid; gap: 8px; }
.v3-opportunity-main h3 { margin: 0; font-size: 15px; }
.v3-opportunity-main p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.v3-grade { width: max-content; padding: 3px 7px; border-radius: 6px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 9px; font-weight: 800; }
.v3-score-ring { width: 62px; height: 62px; display: grid; align-content: center; justify-content: center; border: 5px solid var(--v3-primary-soft); border-top-color: var(--v3-primary); border-radius: 50%; text-align: center; }
.v3-score-ring strong { font-size: 20px; line-height: 1; }
.v3-score-ring span { color: var(--v3-muted); font-size: 8px; }
.v3-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.v3-theme-grid article { padding: 16px; display: grid; gap: 8px; border: 1px solid var(--v3-line); border-radius: 14px; background: var(--v3-surface-soft); }
.v3-theme-grid strong { font-size: 13px; }
.v3-theme-grid p { margin: 0; color: var(--v3-muted); font-size: 10px; line-height: 1.65; }
.v3-theme-grid span { color: var(--v3-primary); font-size: 9px; }

.v3-flow-card { padding: 22px; display: grid; grid-template-columns: repeat(9, auto); align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--v3-line); border-radius: 20px; background: var(--v3-surface); box-shadow: var(--v3-shadow); }
.v3-flow-card button { width: 116px; min-height: 102px; padding: 12px; display: grid; place-items: center; gap: 5px; border: 0; border-radius: 15px; background: var(--v3-surface-soft); cursor: pointer; }
.v3-flow-card button:hover { background: var(--v3-primary-soft); }
.v3-flow-card svg { width: 24px; height: 24px; color: var(--v3-primary); }
.v3-flow-card strong { font-size: 11px; }
.v3-flow-card button span { color: #94a3b8; font-size: 9px; }
.v3-flow-card > i { color: #b9c5d4; font-style: normal; }
.v3-simple-list { display: grid; }
.v3-simple-list article { padding: 13px 4px; display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--v3-line); }
.v3-simple-list article:first-child { border-top: 0; }
.v3-simple-list article div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.v3-simple-list strong { max-width: 680px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.v3-simple-list span { padding: 3px 7px; border-radius: 999px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 9px; }
.v3-simple-list em { color: var(--v3-muted); font-size: 10px; font-style: normal; }

.v3-board { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 11px; overflow-x: auto; padding-bottom: 6px; }
.v3-board-column { min-height: 330px; padding: 13px; border: 1px solid var(--v3-line); border-radius: 17px; background: rgba(255, 255, 255, .72); }
.v3-board-column > header { display: flex; align-items: center; justify-content: space-between; padding: 3px 2px 13px; }
.v3-board-column > header strong { font-size: 11px; }
.v3-board-column > header span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 9px; }
.v3-board-column > div { display: grid; gap: 9px; }
.v3-board-item { padding: 13px; display: grid; gap: 7px; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface); box-shadow: 0 6px 18px rgba(15, 23, 42, .04); }
.v3-board-item strong { font-size: 11px; line-height: 1.55; }
.v3-board-item span { color: var(--v3-muted); font-size: 9px; }
.v3-board-item em { color: var(--v3-primary); font-size: 9px; font-style: normal; }
.v3-board-empty { padding: 40px 5px; color: #b9c5d4; font-size: 10px; text-align: center; }
.v3-board.is-simple { grid-template-columns: repeat(4, minmax(190px, 1fr)); }
.v3-section-heading { padding: 8px 2px 0; }
.v3-section-heading h2 { margin: 5px 0 0; color: var(--v3-ink); font-size: 22px; }
.v3-simple-opportunities { display: grid; gap: 11px; }
.v3-simple-opportunities > article { padding: 16px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--v3-line); border-radius: 15px; background: #fff; }
.v3-simple-opportunities > article.is-ready { border-color: #d6dfeb; background: linear-gradient(90deg, #fff, #ffffff); }
.v3-simple-opportunities h3 { margin: 0 0 8px; color: var(--v3-ink); font-size: 15px; }
.v3-simple-opportunities p { margin: 4px 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.v3-simple-opportunities p b { color: var(--v3-ink); }
.v3-simple-opportunities .v3-rank { color: #b9c5d4; font-size: 17px; font-weight: 850; }
.v3-history-drawer { padding: 18px 20px; border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface); }
.v3-history-drawer summary { cursor: pointer; font-size: 12px; font-weight: 750; }
.v3-history-drawer summary span { margin-left: 7px; color: var(--v3-muted); font-weight: 400; }
.v3-history-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.v3-history-grid section { display: grid; gap: 8px; align-content: start; }
.v3-history-grid h3 { margin: 0 0 5px; font-size: 12px; }

.v3-system-ok { display: flex; align-items: center; gap: 9px; background: #edf6f0; color: var(--v3-good); }
.v3-system-ok.is-warn { background: #fbf3ea; color: var(--v3-warn); }
.v3-system-ok .health-dot { width: 7px; height: 7px; }
.v3-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.v3-status-grid article { min-height: 142px; padding: 20px; display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--v3-line); border-radius: 17px; background: var(--v3-surface); }
.v3-status-grid span { color: var(--v3-muted); font-size: 10px; }
.v3-status-grid strong { margin-top: auto; font-size: 17px; }
.v3-status-grid em { color: var(--v3-good); font-size: 9px; font-style: normal; }

/* System center: user-facing service, task and issue overview. */
.system-center-intro { margin-bottom: 0; }
.system-center-summary {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #cfe8d8;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5fcf7 0%, #edf8f1 100%);
}
.system-center-summary.is-warning { border-color: #f0d9b9; background: linear-gradient(135deg, #fffaf3 0%, #fbf3e8 100%); }
.system-center-summary-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #dff3e6;
  color: var(--v3-good);
}
.system-center-summary.is-warning .system-center-summary-icon { background: #f9e8ce; color: var(--v3-warn); }
.system-center-summary-icon svg { width: 22px; height: 22px; stroke-width: 2.4; }
.system-center-summary > div { display: grid; gap: 3px; }
.system-center-summary strong { color: var(--v3-ink); font-size: 16px; }
.system-center-summary span { color: var(--v3-muted); font-size: 12px; line-height: 1.55; }
.system-center-summary > em { color: var(--v3-muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.system-center-card { display: grid; gap: 16px; }
.system-center-card > header { margin: 0; }
.system-settings-card { padding: 0; overflow: hidden; }
.system-settings-entry {
  width: 100%;
  min-height: 112px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 0;
  background: linear-gradient(135deg, #fff 0%, #f5f8fe 100%);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease;
}
.system-settings-entry:hover { background: linear-gradient(135deg, #fff 0%, #eef4ff 100%); }
.system-settings-entry-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: #e8f1ff; color: var(--v3-primary); }
.system-settings-entry-icon svg { width: 24px; height: 24px; }
.system-settings-entry-copy { min-width: 0; display: grid; gap: 3px; }
.system-settings-entry-copy em { color: var(--v3-primary); font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .05em; }
.system-settings-entry-copy strong { color: var(--v3-ink); font-size: 17px; }
.system-settings-entry-copy small { color: var(--v3-muted); font-size: 11px; line-height: 1.55; }
.system-settings-entry-meta { display: grid; justify-items: end; gap: 9px; }
.system-settings-entry-meta b { padding: 6px 10px; border-radius: 999px; background: #e9f7ee; color: var(--v3-good); font-size: 10px; }
.system-settings-entry-meta em { display: flex; align-items: center; gap: 7px; color: var(--v3-primary); font-size: 11px; font-style: normal; font-weight: 800; }
.system-settings-entry-meta svg { width: 15px; height: 15px; }
.system-service-list { display: grid; gap: 10px; }
.system-service-row {
  width: 100%;
  min-height: 76px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 118px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--v3-line);
  border-radius: 15px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.system-service-row:hover { border-color: #c8d7ee; box-shadow: 0 10px 28px rgba(42, 67, 108, .08); transform: translateY(-1px); }
.system-service-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
}
.system-service-icon svg { width: 21px; height: 21px; }
.system-service-copy { min-width: 0; display: grid; gap: 3px; }
.system-service-copy strong { color: var(--v3-ink); font-size: 14px; }
.system-service-copy em { overflow: hidden; color: var(--v3-muted); font-size: 11px; font-style: normal; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.system-service-state { padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.system-service-state.is-ready { background: #e9f7ee; color: var(--v3-good); }
.system-service-state.is-pending { background: #fbf2df; color: #a96c07; }
.system-service-state.is-error { background: #fff0ef; color: #c0443b; }
.system-service-action { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--v3-primary); font-size: 11px; font-weight: 750; white-space: nowrap; }
.system-service-action svg { width: 15px; height: 15px; }
.system-task-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.system-task-metrics article { min-height: 88px; padding: 15px 16px; display: grid; align-content: space-between; border: 1px solid var(--v3-line); border-radius: 14px; background: #f9fbfe; }
.system-task-metrics article.is-error { border-color: #efd2cf; background: #fff7f6; }
.system-task-metrics span { color: var(--v3-muted); font-size: 11px; }
.system-task-metrics strong { color: var(--v3-ink); font-size: 24px; line-height: 1; }
.system-task-metrics article.is-error strong { color: #c0443b; }
.system-task-note { margin: 0; padding: 10px 12px; border-radius: 11px; background: #eef4ff; color: var(--v3-primary); font-size: 11px; }
.system-task-note.is-calm { background: #f4f7fa; color: var(--v3-muted); }
.system-anomaly-card { border-color: #efd2cf; }
.system-anomaly-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.system-anomaly-list > span { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; border-radius: 12px; background: #fff7f6; color: var(--v3-muted); font-size: 11px; }
.system-anomaly-list strong { color: #c0443b; }
.system-center-advanced { border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface); overflow: hidden; }
.system-center-advanced summary { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; list-style: none; }
.system-center-advanced summary::-webkit-details-marker { display: none; }
.system-center-advanced summary > span { display: grid; grid-template-columns: 22px auto; align-items: center; gap: 2px 10px; }
.system-center-advanced summary > span > svg { grid-row: 1 / 3; width: 20px; color: var(--v3-primary); }
.system-center-advanced summary strong { color: var(--v3-ink); font-size: 13px; }
.system-center-advanced summary em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.system-center-advanced summary > svg { width: 18px; color: var(--v3-muted); transition: transform .18s ease; }
.system-center-advanced[open] summary > svg { transform: rotate(180deg); }
.system-center-advanced-body { padding: 0 18px 18px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.system-center-advanced-body > div { padding: 13px 14px; display: grid; gap: 4px; border-radius: 12px; background: #f7f9fc; }
.system-center-advanced-body span { color: var(--v3-muted); font-size: 10px; }
.system-center-advanced-body strong { color: var(--v3-ink); font-size: 12px; }
.system-center-diagnostic-privacy {
  grid-column: 1 / -1;
  margin: -2px 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--v3-muted);
  font-size: 10px;
  line-height: 1.5;
}
.system-center-diagnostic-privacy svg { width: 14px; height: 14px; color: var(--v3-good); }

/* Connection and storage settings: overview plus one focused page per service. */
.settings-hub-hero {
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #d8e4f5;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 72%, #eaf2ff 100%);
  box-shadow: 0 14px 34px rgba(42, 67, 108, .07);
}
.settings-hub-hero > div:first-child { min-width: 0; }
.settings-hub-hero h1, .settings-detail-head h1 { margin: 6px 0 7px; color: var(--v3-ink); font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
.settings-hub-hero p, .settings-detail-head p { margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.7; }
.settings-hub-score {
  min-width: 104px;
  padding: 15px 18px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid #cfe0f8;
  border-radius: 17px;
  background: rgba(255, 255, 255, .86);
}
.settings-hub-score strong { color: var(--v3-primary); font-size: 28px; line-height: 1; }
.settings-hub-score small { color: #8294ae; font-size: 14px; }
.settings-hub-score span { color: var(--v3-muted); font-size: 10px; }
.settings-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.settings-hub-card {
  position: relative;
  min-height: 206px;
  padding: 20px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 13px 14px;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 19px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.settings-hub-card::after {
  position: absolute;
  right: -38px;
  bottom: -54px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--settings-card-glow, #edf4ff);
  content: "";
  opacity: .62;
  pointer-events: none;
}
.settings-hub-card:hover { border-color: #bbcee9; box-shadow: 0 15px 35px rgba(42, 67, 108, .1); transform: translateY(-2px); }
.settings-hub-card.tone-douyin { --settings-card-accent: #2369d8; --settings-card-soft: #eaf2ff; --settings-card-glow: #dceaff; }
.settings-hub-card.tone-ai { --settings-card-accent: #7158c8; --settings-card-soft: #f0edff; --settings-card-glow: #e9e4ff; }
.settings-hub-card.tone-storage { --settings-card-accent: #16877f; --settings-card-soft: #e7f7f4; --settings-card-glow: #d8f1ed; }
.settings-hub-card.tone-tasks { --settings-card-accent: #b26b19; --settings-card-soft: #fff3e4; --settings-card-glow: #f9e8cf; }
.settings-hub-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--settings-card-soft);
  color: var(--settings-card-accent);
}
.settings-hub-icon svg { width: 23px; height: 23px; }
.settings-hub-copy { min-width: 0; display: grid; gap: 3px; }
.settings-hub-copy em { color: var(--settings-card-accent); font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .05em; }
.settings-hub-copy strong { color: var(--v3-ink); font-size: 17px; }
.settings-hub-copy small { color: var(--v3-muted); font-size: 11px; line-height: 1.55; }
.settings-hub-state { padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.settings-hub-state.is-ready { background: #e9f7ee; color: var(--v3-good); }
.settings-hub-state.is-pending { background: #fbf2df; color: #9f680e; }
.settings-hub-detail { grid-column: 1 / -1; min-height: 32px; color: var(--v3-muted); font-size: 11px; line-height: 1.55; }
.settings-hub-open { z-index: 1; grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--settings-card-accent); font-size: 11px; font-weight: 800; }
.settings-hub-open svg { width: 15px; height: 15px; }
.settings-hub-note { padding: 17px 19px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; border: 1px solid #dce5f1; border-radius: 16px; background: #f8fafd; }
.settings-hub-note > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #eaf1fb; color: #526b8f; }
.settings-hub-note svg { width: 18px; height: 18px; }
.settings-hub-note strong { color: var(--v3-ink); font-size: 12px; }
.settings-hub-note p { margin: 4px 0 0; color: var(--v3-muted); font-size: 11px; line-height: 1.65; }
.settings-hub-note p a { color: var(--v3-primary); text-decoration: none; }
.settings-hub-note p a:hover { text-decoration: underline; }
.settings-detail-head {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--v3-line);
  border-radius: 19px;
  background: linear-gradient(135deg, #fff 0%, #f7faff 100%);
}
.settings-detail-head h1 { font-size: 27px; }
.settings-detail-head > .v3-btn svg { width: 16px; height: 16px; }
.settings-task-overview { display: grid; gap: 16px; }

@media (max-width: 820px) {
  .settings-hub-grid { grid-template-columns: 1fr; }
  .ai-config-form-grid { grid-template-columns: 1fr; }
  .settings-detail-head { grid-template-columns: auto minmax(0, 1fr); }
  .settings-detail-head > .v3-btn { grid-column: 2; justify-self: start; }
}

@media (max-width: 560px) {
  .settings-hub-hero { padding: 20px; align-items: flex-start; }
  .settings-hub-score { min-width: 82px; padding: 12px; }
  .settings-hub-card { min-height: 190px; padding: 17px; grid-template-columns: 44px minmax(0, 1fr); }
  .settings-hub-icon { width: 44px; height: 44px; }
  .settings-hub-state { grid-column: 2; justify-self: start; }
  .settings-detail-head { padding: 17px; grid-template-columns: 1fr; gap: 13px; }
  .settings-detail-head > .v3-btn { grid-column: auto; justify-self: start; }
  .settings-detail-head h1 { font-size: 24px; }
}

@media (max-width: 820px) {
  .system-service-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .system-service-action { grid-column: 2 / -1; justify-content: flex-start; }
  .system-task-metrics, .system-anomaly-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-center-advanced-body { grid-template-columns: 1fr 1fr; }
  .system-center-advanced-body > button { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 520px) {
  .system-center-summary { grid-template-columns: 40px minmax(0, 1fr); padding: 15px; }
  .system-center-summary-icon { width: 40px; height: 40px; }
  .system-center-summary > em { grid-column: 2; }
  .system-settings-entry { min-height: 0; padding: 17px; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .system-settings-entry-icon { width: 44px; height: 44px; border-radius: 14px; }
  .system-settings-entry-meta { grid-column: 2; justify-items: start; grid-template-columns: auto auto; align-items: center; }
  .system-service-row { grid-template-columns: 38px minmax(0, 1fr); padding: 13px; gap: 10px; }
  .system-service-icon { width: 38px; height: 38px; }
  .system-service-copy em { white-space: normal; }
  .system-service-state { grid-column: 2; justify-self: start; }
  .system-service-action { grid-column: 2; }
  .system-task-metrics { gap: 8px; }
  .system-task-metrics article { min-height: 78px; padding: 13px; }
  .system-anomaly-list, .system-center-advanced-body { grid-template-columns: 1fr; }
  .system-center-advanced-body > button { grid-column: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .system-service-row, .system-settings-entry, .system-center-advanced summary > svg, .settings-hub-card { transition: none; }
}

/* 二级旧工具在新壳层中保持可用，但视觉降噪。 */
.v3-shell .content > .panel { border-color: var(--v3-line); border-radius: 18px; background: var(--v3-surface); box-shadow: var(--v3-shadow); }
.v3-shell .content .field, .v3-shell .content input, .v3-shell .content select, .v3-shell .content textarea { border-color: var(--v3-line); background: #fff; color: var(--v3-ink); }
.v3-shell .content .btn { border-radius: 10px; }

@media (max-width: 1050px) {
  .v3-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .v3-dashboard-grid { grid-template-columns: 1fr; }
  .v3-account-home-grid { grid-template-columns: 1fr 1fr; }
  .v3-account-home-card.is-primary { grid-column: 1 / -1; }
  .v3-tool-grid, .v3-status-grid, .account-all-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-opportunity-list > article { grid-template-columns: 32px minmax(0, 1fr) 62px; }
  .v3-opportunity-list > article > .v3-btn { grid-column: 2 / -1; justify-self: start; }
  .v3-flow-card { grid-template-columns: repeat(5, 1fr); }
  .v3-flow-card > i { display: none; }
  .v3-flow-card button { width: auto; }
  .v3-simple-opportunities > article { grid-template-columns: 36px minmax(0,1fr); }
  .v3-simple-opportunities > article > .v3-btn { grid-column: 2; justify-self: start; }
}
@media (max-width: 820px) {
  .v3-shell { display: block; }
  .v3-shell > .main {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto;
    overflow: visible;
  }
  .v3-sidebar { position: relative; width: 100%; height: auto; padding: 16px; gap: 14px; }
  .v3-sidebar .nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .v3-sidebar .nav-section { display: contents; }
  .v3-sidebar .nav-title, .v3-account-mini, .v3-side-health { display: none; }
  .v3-topbar { padding: 18px; align-items: flex-start; }
  .v3-shell .content { width: calc(100% - 28px); padding-bottom: 36px; overflow: visible; }
  .v3-scroll-region { overflow: visible; }
  .v3-icp-footer { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .v3-dashboard-head, .v3-page-intro { align-items: stretch; flex-direction: column; }
  .v3-action-row, .v3-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-action-row .v3-primary-action:last-child { grid-column: 1 / -1; }
  .v3-health-strip span:not(.health-dot) { display: none; }
  .v3-benchmark-grid, .v3-theme-grid, .v3-history-grid { grid-template-columns: 1fr; }
  .v3-account-home-grid { grid-template-columns: 1fr; }
  .v3-account-home-card.is-primary { grid-column: auto; }
  .account-tools-header { align-items: stretch; flex-direction: column; }
  .v3-flow-card { grid-template-columns: repeat(2, 1fr); }
  .v3-opportunity-list > article { grid-template-columns: 28px minmax(0,1fr); }
  .v3-score-ring { grid-column: 2; }
  .v3-opportunity-list > article > .v3-btn { grid-column: 2; }
}
@media (max-width: 480px) {
  .v3-action-row, .v3-stat-grid, .v3-tool-grid, .v3-status-grid, .account-all-tools-grid { grid-template-columns: 1fr; }
  .v3-action-row .v3-primary-action:last-child { grid-column: auto; }
  .v3-topbar .page-sub { display: none; }
  .v3-status-button { min-width: 44px; padding: 0 10px; font-size: 0; }
  .v3-status-button::after { content: "状态"; font-size: 12px; }
  .v3-card { padding: 18px; }
  .v3-simple-opportunities > article { grid-template-columns: 1fr; }
  .v3-simple-opportunities > article > .v3-btn { grid-column: auto; }
  .v3-health-strip { padding: 0 14px; }
}

/* 2026-07-13 readability and full-page adaptation pass */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { font-size: 15px; line-height: 1.6; }
.v3-shell { width: 100%; max-width: 100vw; overflow-x: clip; }
.v3-shell > .main {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overflow-y: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}
.v3-topbar { flex-direction: row; }
.v3-shell .content {
  max-width: calc(100vw - 300px);
  overflow-x: clip;
}
.v3-shell .content > *,
.v3-shell .content article,
.v3-shell .content section,
.v3-shell .content div { min-width: 0; }
.v3-shell .content p,
.v3-shell .content strong,
.v3-shell .content span { overflow-wrap: anywhere; }

.v3-sidebar .nav-item-text strong { font-size: 14px; }
.v3-sidebar .nav-title,
.v3-sidebar .nav-section-title { font-size: 11px; }
.v3-account-mini span,
.v3-side-health em { font-size: 12px; }
.v3-account-mini strong { font-size: 15px; }
.v3-account-mini em,
.v3-side-health strong { font-size: 13px; }
.v3-topbar .page-crumbs { font-size: 13px; }
.v3-topbar .page-sub { font-size: 14px; }
.v3-status-button { font-size: 14px; }
.v3-dashboard-head p,
.v3-page-intro p { font-size: 15px; line-height: 1.75; }
.v3-eyebrow { font-size: 13px; }
.v3-account-picker label { font-size: 13px; }
.v3-account-picker select { min-height: 46px; font-size: 15px; }
.v3-primary-action { min-height: 82px; }
.v3-primary-action strong { font-size: 16px; }
.v3-primary-action em { font-size: 13px; }
.v3-health-strip { min-height: 58px; }
.v3-health-strip strong { font-size: 14px; }
.v3-health-strip span:not(.health-dot),
.v3-health-strip em { font-size: 13px; }
.v3-stat-grid span { font-size: 14px; }
.v3-card h2 { font-size: 21px; }
.v3-focus-card > p,
.v3-brief-card > p { font-size: 15px; }
.v3-gate,
.v3-gate strong { font-size: 13px; line-height: 1.55; }
.v3-next-action span { font-size: 12px; }
.v3-next-action strong { font-size: 14px; }
.v3-btn { min-height: 44px; padding-inline: 17px; font-size: 14px; }
.v3-progress-list span,
.v3-progress-list strong,
.v3-text-link,
.v3-brief-warning { font-size: 13px; }
.v3-empty { font-size: 14px; line-height: 1.7; }
.v3-count-chip,
.v3-system-ok { font-size: 12px; }
.v3-benchmark-grid strong { font-size: 14px; }
.v3-benchmark-grid span,
.v3-benchmark-grid em { font-size: 12px; }
.v3-tool-grid strong { font-size: 15px; }
.v3-tool-grid span { font-size: 13px; line-height: 1.55; }
.v3-opportunity-main h3 { font-size: 17px; line-height: 1.5; }
.v3-opportunity-main p { font-size: 14px; line-height: 1.75; }
.v3-grade { font-size: 11px; }
.v3-theme-grid strong { font-size: 15px; }
.v3-theme-grid p { font-size: 13px; line-height: 1.7; }
.v3-theme-grid span { font-size: 12px; }
.v3-flow-card strong { font-size: 13px; }
.v3-flow-card button span { font-size: 11px; }
.v3-simple-list strong { font-size: 14px; }
.v3-simple-list span,
.v3-simple-list em { font-size: 12px; }
.v3-board-column > header strong { font-size: 13px; }
.v3-board-column > header span,
.v3-board-item span,
.v3-board-item em { font-size: 11px; }
.v3-board-item strong { font-size: 13px; }
.v3-board-empty { font-size: 12px; }
.v3-history-drawer summary,
.v3-history-grid h3 { font-size: 14px; }
.v3-status-grid span { font-size: 12px; }
.v3-status-grid em { font-size: 12px; }

/* Unify legacy tools under the warm light V3 shell. */
.v3-shell .content > .empty,
.v3-shell .panel,
.v3-shell .hero-panel,
.v3-shell .account-head,
.v3-shell .account-workbench-tabs,
.v3-shell .selection-toolbar,
.v3-shell .video-row,
.v3-shell .material-row,
.v3-shell .material-row-rich,
.v3-shell .user-card,
.v3-shell .task,
.v3-shell .task-card,
.v3-shell .workflow-ledger-card {
  border-color: var(--v3-line);
  background: var(--v3-surface);
  color: var(--v3-ink);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .05);
}
.v3-shell .content > .empty { border: 1px solid var(--v3-line); border-radius: 14px; }
.v3-shell .muted,
.v3-shell .small.muted,
.v3-shell .video-time { color: var(--v3-muted); }
.v3-shell .section-title { color: var(--v3-ink); font-size: 18px; }
.v3-shell .field,
.v3-shell .select,
.v3-shell .textarea,
.v3-shell .video-action-select {
  min-height: 44px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
  color: var(--v3-ink);
  font-size: 14px;
}
.v3-shell .btn,
.v3-shell .mini {
  min-height: 42px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
  color: var(--v3-ink);
  font-size: 14px;
}
.v3-shell .btn.primary,
.v3-shell .mini.primary,
.v3-shell .btn:not(.secondary):not(.green) {
  border-color: var(--v3-primary);
  background: var(--v3-primary);
  color: #fff;
}
.v3-shell .btn.green { border-color: #5c806b; background: #5c806b; color: #fff; }
.v3-shell .tag,
.v3-shell .value-badge,
.v3-shell .video-stats.upgraded span {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface-soft);
  color: #334155;
}
.v3-shell input[type="checkbox"] { accent-color: var(--v3-primary); }
.v3-shell .checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: var(--v3-surface-soft);
  color: var(--v3-ink);
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}
.v3-shell .checkbox-row input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.v3-shell .metric-card,
.v3-shell .traffic-summary > div,
.v3-shell .trend-chart-card,
.v3-shell .account-status-strip > div,
.v3-shell .workflow-ledger-summary > div,
.v3-shell .workflow-ledger-summary > button,
.v3-shell .review-kpis > div,
.v3-shell .library-pipeline > div,
.v3-shell .pipeline-snapshot > div,
.v3-shell .kpi {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface);
  color: var(--v3-ink);
  box-shadow: none;
}
.v3-shell .workflow-ledger-summary > button {
  min-height: 82px;
  padding: 13px 14px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.v3-shell .workflow-ledger-summary > button:hover,
.v3-shell .workflow-ledger-summary > button.is-active {
  border-color: #9bb8e8;
  background: var(--v3-primary-soft);
}
.v3-shell .workflow-task-actions {
  min-width: 126px;
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 8px;
}
.v3-shell .workflow-task-actions .btn { min-height: 34px; padding: 0 11px; font-size: 12px; }
.v3-shell .workflow-ledger-card.is-error { border-color: #efc2c2; }
.v3-shell .workflow-ledger-card.is-capacity { border-color: #efb0b0; background: #fffafa; }
.workflow-single-progress,
.workflow-dual-progress { margin: 12px 0 2px; }
.workflow-single-progress > i,
.workflow-dual-progress i { height: 7px; display: block; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.workflow-single-progress b,
.workflow-dual-progress b { height: 100%; display: block; border-radius: inherit; background: var(--v3-gradient); }
.workflow-dual-progress { display: grid; gap: 8px; }
.workflow-dual-progress > div { display: grid; grid-template-columns: 86px minmax(100px, 1fr) 62px; align-items: center; gap: 10px; }
.workflow-dual-progress span,
.workflow-dual-progress strong { color: var(--v3-muted); font-size: 10px; }
.workflow-dual-progress strong { text-align: right; }
.workflow-ledger-card.is-error .workflow-dual-progress > div:last-child b,
.workflow-ledger-card.is-capacity .workflow-dual-progress > div:last-child b { background: #d74747; }
.v3-shell .metric-card strong,
.v3-shell .traffic-summary strong,
.v3-shell .account-status-strip strong,
.v3-shell .workflow-ledger-summary strong,
.v3-shell .review-kpis strong,
.v3-shell .library-pipeline strong,
.v3-shell .pipeline-snapshot strong,
.v3-shell .kpi strong { color: var(--v3-ink); }
.v3-shell .metric-card span,
.v3-shell .metric-card em,
.v3-shell .traffic-summary span,
.v3-shell .traffic-summary em,
.v3-shell .account-status-strip span,
.v3-shell .workflow-ledger-summary span,
.v3-shell .review-kpis span,
.v3-shell .library-pipeline span,
.v3-shell .pipeline-snapshot span,
.v3-shell .kpi span { color: var(--v3-muted); font-size: 13px; }
.v3-shell .insight-strip,
.v3-shell .notice,
.v3-shell .result-area,
.v3-shell .online-asr-progress,
.v3-shell .library-filter-bar,
.v3-shell .group-title,
.v3-shell .asset-chain,
.v3-shell .match-row,
.v3-shell .account-profile-card {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface-soft);
  color: var(--v3-ink);
}
.v3-shell .notice { font-size: 14px; line-height: 1.7; }
.v3-shell .traffic-tabs {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface-soft);
}
.v3-shell .traffic-tabs button { color: var(--v3-muted); font-size: 13px; }
.v3-shell .traffic-tabs button.active { background: var(--v3-primary); color: #fff; }
.v3-shell .trend-chart-svg .grid line { stroke: var(--v3-line); }
.v3-shell .trend-chart-svg .axis-labels text { fill: #64748b; font-size: 11px; }
.v3-shell .material-row,
.v3-shell .material-row-rich,
.v3-shell .review-row,
.v3-shell .workflow-result-row,
.v3-shell .library-groups section {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface);
  color: var(--v3-ink);
}
.v3-shell .library-groups section { border-radius: 14px; }
.v3-shell .workflow-result-row strong,
.v3-shell .material-row strong,
.v3-shell .material-row-rich strong,
.v3-shell .review-row strong { color: var(--v3-ink); }
.v3-shell .workflow-result-row span,
.v3-shell .material-row span,
.v3-shell .material-row-rich span,
.v3-shell .review-row span { color: var(--v3-muted); }
.v3-shell .material-advanced {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: #ffffff;
}
.v3-shell .material-advanced summary {
  cursor: pointer;
  color: var(--v3-muted);
  font-size: 12px;
  font-weight: 750;
}
.v3-shell .material-advanced[open] summary { margin-bottom: 10px; color: var(--v3-primary); }
.v3-shell .material-full-path {
  display: block;
  overflow-wrap: anywhere;
  color: var(--v3-muted);
  font-size: 11px;
  line-height: 1.55;
}
.v3-shell .material-advanced .asset-chain,
.v3-shell .material-advanced .material-bind { margin-top: 10px; }

/* Material center: browse downloaded assets first, process them second. */
.route-library .library-center-panel { padding: 22px; }
.route-library .library-section-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
  padding: 6px;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: var(--v3-surface-soft);
}
.route-library .library-section-tabs button {
  display: flex;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--v3-muted);
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}
.route-library .library-section-tabs button strong { color: inherit; font-size: 14px; }
.route-library .library-section-tabs button span { color: inherit; font-size: 11px; }
.route-library .library-section-tabs button.is-active {
  border-color: #d6dfeb;
  background: #fff;
  color: var(--v3-primary);
  box-shadow: 0 7px 18px rgba(94, 55, 69, .08);
}
.route-library .library-shelf-summary,
.route-library .library-quarantine-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.route-library .library-shelf-summary article,
.route-library .library-quarantine-summary article {
  display: grid;
  min-height: 104px;
  padding: 17px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #fff;
  align-content: center;
  gap: 4px;
}
.route-library .library-shelf-summary article span,
.route-library .library-quarantine-summary article span { color: var(--v3-muted); font-size: 12px; }
.route-library .library-shelf-summary article strong,
.route-library .library-quarantine-summary article strong { color: var(--v3-ink); font-size: 28px; line-height: 1; }
.route-library .library-shelf-summary article em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.route-library .library-unassigned-callout {
  display: flex;
  margin-bottom: 16px;
  padding: 15px 17px;
  border: 1px solid #ead7aa;
  border-radius: 14px;
  background: #fff9ea;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.route-library .library-unassigned-callout div { display: grid; gap: 3px; }
.route-library .library-unassigned-callout strong { color: #6d5521; font-size: 14px; }
.route-library .library-unassigned-callout span { color: #8a7340; font-size: 12px; line-height: 1.55; }
.route-library .library-shelf-toolbar {
  display: grid;
  grid-template-columns: 150px 170px 160px minmax(210px, 1fr) auto;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: var(--v3-surface-soft);
  align-items: end;
}
.route-library .library-shelf-toolbar label,
.route-library .library-task-filter label {
  display: grid;
  color: var(--v3-muted);
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
}
.route-library .library-shelf-toolbar select,
.route-library .library-shelf-toolbar input,
.route-library .library-task-filter select {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
  color: var(--v3-ink);
  font-size: 13px;
}
.route-library .library-layout-switch { display: flex; gap: 5px; }
.route-library .library-layout-switch .mini { min-width: 54px; min-height: 40px; }
.route-library .library-layout-switch .mini.is-active { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }
.route-library .library-result-head {
  display: flex;
  margin: 10px 2px 12px;
  color: var(--v3-muted);
  font-size: 12px;
  align-items: center;
  justify-content: space-between;
}
.route-library .library-result-head strong { color: var(--v3-ink); font-size: 20px; }
.route-library .library-package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.route-library .library-package-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .06);
}
.route-library .library-package-cover {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  background: #17141a;
  cursor: pointer;
}
.route-library .library-package-cover video,
.route-library .library-package-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-library .library-play-mark {
  position: absolute;
  left: 14px;
  bottom: 13px;
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  background: rgba(18, 14, 18, .68);
  color: #fff;
  font-size: 12px;
  place-items: center;
}
.route-library .library-preview-note {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  background: rgba(15, 30, 53, .72);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-library .library-audio-mark { display: grid; width: 100%; height: 100%; color: #fff; font-weight: 800; place-items: center; }
.route-library .library-package-body { display: grid; padding: 15px; gap: 10px; }
.route-library .library-package-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-library .library-source-badge,
.route-library .library-stage-badge {
  display: inline-flex;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  align-items: center;
}
.route-library .library-source-badge.source-mine { background: #e8f1ff; color: #315f9d; }
.route-library .library-source-badge.source-competitor { background: #f0eaff; color: #6849a6; }
.route-library .library-source-badge.source-monitor { background: #fff0dd; color: #9a5c19; }
.route-library .library-source-badge.source-upload { background: #edf0f3; color: #59636c; }
.route-library .library-source-badge.source-unassigned { background: #fff7d8; color: #876915; }
.route-library .library-stage-badge { background: #f1f5f9; color: #475569; }
.route-library .library-stage-badge.stage-imported { background: #e5f3e9; color: #356d49; }
.route-library .library-stage-badge.stage-ready { background: #e8f1ff; color: #315f9d; }
.route-library .library-stage-badge.stage-dissected { background: #ecf4e6; color: #50713c; }
.route-library .library-package-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: var(--v3-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.route-library .library-package-origin { display: flex; overflow: hidden; color: var(--v3-muted); font-size: 11px; gap: 10px; flex-wrap: wrap; }
.route-library .library-components { display: flex; gap: 5px; flex-wrap: wrap; }
.route-library .library-package-flow { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: #9aaac0; font-size: 10px; font-weight: 750; }
.route-library .library-package-flow span { padding: 3px 6px; border-radius: 7px; background: #f0f4f9; color: #8596ae; }
.route-library .library-package-flow span.is-ready { background: #e8f3eb; color: #3c7350; }
.route-library .library-package-flow i { color: #a7b5c9; font-style: normal; }
.route-library .library-component { padding: 3px 7px; border-radius: 7px; font-size: 10px; font-weight: 750; }
.route-library .library-component.is-ready { background: #e8f3eb; color: #3c7350; }
.route-library .library-component.is-missing { background: #f1f5f9; color: #94a3b8; }
.route-library .library-next-step {
  display: flex;
  padding: 9px 10px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--v3-muted);
  font-size: 11px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.route-library .library-next-step strong { color: var(--v3-ink); font-size: 11px; }
.route-library .library-package-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.route-library .library-package-actions .mini { min-height: 36px; padding: 0 10px; font-size: 11px; }
.route-library .library-package-details { border-top: 1px solid var(--v3-line); padding-top: 10px; }
.route-library .library-package-details > summary { cursor: pointer; color: var(--v3-muted); font-size: 11px; font-weight: 750; }
.route-library .library-detail-grid { display: grid; grid-template-columns: auto 1fr; margin-top: 10px; padding: 10px; border-radius: 10px; background: var(--v3-surface-soft); gap: 6px 12px; }
.route-library .library-detail-grid span { color: var(--v3-muted); font-size: 10px; }
.route-library .library-detail-grid strong { overflow-wrap: anywhere; color: var(--v3-ink); font-size: 10px; text-align: right; }
.route-library .library-file-list { display: grid; max-height: 130px; margin: 8px 0 0; padding: 0; list-style: none; overflow-y: auto; gap: 5px; }
.route-library .library-file-list li { display: flex; color: var(--v3-muted); font-size: 10px; justify-content: space-between; gap: 8px; }
.route-library .library-file-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-library .library-file-list li em { font-style: normal; white-space: nowrap; }
.route-library .library-package-list { display: grid; gap: 10px; }
.route-library .library-package-list .library-package-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.route-library .library-package-list .library-package-cover { height: 100%; min-height: 230px; aspect-ratio: auto; }
.route-library .library-friendly-empty {
  display: grid;
  min-height: 210px;
  padding: 32px;
  border: 1px dashed #d6dfeb;
  border-radius: 16px;
  background: #ffffff;
  color: var(--v3-muted);
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 8px;
}
.route-library .library-friendly-empty strong { color: var(--v3-ink); font-size: 17px; }
.route-library .library-friendly-empty span { max-width: 520px; font-size: 12px; line-height: 1.6; }
.route-library .library-friendly-empty .mini { margin-top: 6px; }
.route-library .library-quarantine-notice { margin-bottom: 14px; padding: 13px 15px; border: 1px solid #efd5d5; border-radius: 12px; background: #fff4f4; color: #8b5151; font-size: 12px; }
.route-library .library-quarantine-list { display: grid; gap: 8px; }
.route-library .library-quarantine-list article { display: flex; padding: 13px 15px; border: 1px solid var(--v3-line); border-radius: 12px; background: #fff; align-items: center; justify-content: space-between; gap: 12px; }
.route-library .library-quarantine-list article div { display: grid; min-width: 0; gap: 3px; }
.route-library .library-quarantine-list article strong { overflow: hidden; color: var(--v3-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.route-library .library-quarantine-list article span,
.route-library .library-quarantine-list article em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.route-library .library-task-filter { margin-bottom: 12px; }

@media (max-width: 1180px) {
  .route-library .library-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-library .library-shelf-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-library .library-search-label { grid-column: span 2; }
}
@media (max-width: 780px) {
  .route-library .library-section-tabs,
  .route-library .library-shelf-summary,
  .route-library .library-quarantine-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-library .library-package-grid { grid-template-columns: 1fr; }
  .route-library .library-shelf-toolbar { grid-template-columns: 1fr; }
  .route-library .library-search-label { grid-column: auto; }
  .route-library .library-package-list .library-package-card { grid-template-columns: 1fr; }
  .route-library .library-package-list .library-package-cover { min-height: 190px; aspect-ratio: 16 / 10; }
  .route-library .library-unassigned-callout { align-items: stretch; flex-direction: column; }
}

/* Account works: remove the old dark card and the phantom fourth column. */
.route-account .account-head {
  border: 1px solid var(--v3-line);
  background: var(--v3-surface);
  color: var(--v3-ink);
}
.route-account .account-head .muted { color: var(--v3-muted); font-size: 14px; line-height: 1.65; }
.route-account .account-head .tag { min-height: 34px; font-size: 13px; }
.route-account .account-workbench-tabs { overflow-x: auto; scrollbar-width: thin; }
.route-account .account-workbench-tabs button {
  min-height: 46px;
  color: var(--v3-muted);
  font-size: 14px;
}

.route-account .account-workbench-tabs button.active { color: var(--v3-primary); }
.route-account .account-work-pool { width: 100%; max-width: 100%; overflow: hidden; }
.route-account .account-list-title { color: var(--v3-ink); }
.route-account .account-pool-filters { flex-wrap: wrap; }
.route-account .account-pool-filters button {
  min-height: 38px;
  border: 1px solid var(--v3-line);
  background: #fff;
  color: var(--v3-muted);
  font-size: 13px;
}
.route-account .account-pool-filters button.active {
  border-color: var(--v3-primary);
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
}
.route-account .account-work-pool .check-control { color: var(--v3-muted); font-size: 13px; }
.route-account .video-list { width: 100%; max-width: 100%; display: grid; grid-template-columns: 1fr; gap: 14px; }
.route-account .video-row,
:root[data-theme="light"] .route-account .video-row,
:root[data-theme="dark"] .route-account .video-row {
  width: 100%;
  max-width: 100%;
  min-height: 166px;
  display: grid;
  grid-template-columns: 28px 108px minmax(0, 1fr);
  grid-template-areas: "check thumb body";
  align-items: center;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: var(--v3-surface);
  color: var(--v3-ink);
}
.route-account .video-row.is-selected { border-color: #94a3b8; background: #ffffff; }
.route-account .row-check { grid-area: check; }
.route-account .thumb-btn,
:root[data-theme="light"] .route-account .thumb-btn,
:root[data-theme="dark"] .route-account .thumb-btn {
  grid-area: thumb;
  width: 102px;
  height: 136px;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: #f1f5f9;
}
.route-account .video-card-body {
  grid-area: body;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
  gap: 12px;
}
.route-account .video-main,
.route-account .video-stats.upgraded,
.route-account .video-card-foot { grid-area: auto; }
.route-account .video-title {
  max-width: none;
  min-height: 0;
  max-height: none;
  color: var(--v3-ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
}
.route-account .video-stats.upgraded { display: flex; flex-wrap: wrap; gap: 8px; }
.route-account .video-stats.upgraded span { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.route-account .video-card-foot {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.route-account .video-time { order: 2; flex: 0 0 auto; font-size: 13px; text-align: right; }
.route-account .video-row .actions.compact {
  order: 1;
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: minmax(136px, 1fr) 44px 86px;
  grid-template-areas: "select play transcribe";
  gap: 8px;
  align-items: center;
  justify-self: start;
}
.route-account .video-row .actions.compact .mini { min-width: 0; min-height: 44px; }
.route-account .video-row .actions.compact [data-copy] { display: none; }
.route-account .video-action-select { width: 100%; min-width: 0; }

@media (max-width: 1050px) {
  .v3-shell .content { max-width: calc(100vw - 250px); }
  .route-account .account-work-pool .account-list-title {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }
  .route-account .video-row,
  :root[data-theme="light"] .route-account .video-row,
  :root[data-theme="dark"] .route-account .video-row {
    grid-template-columns: 26px 96px minmax(0, 1fr);
    gap: 13px;
  }
  .route-account .thumb-btn,
  :root[data-theme="light"] .route-account .thumb-btn,
  :root[data-theme="dark"] .route-account .thumb-btn { width: 92px; height: 124px; }
  .route-account .video-card-foot { align-items: stretch; flex-direction: column; }
  .route-account .video-time { order: 1; text-align: left; }
  .route-account .video-row .actions.compact { order: 2; width: 100%; max-width: 360px; }
}

@media (max-width: 820px) {
  .v3-shell > .main {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto;
    overflow: visible;
  }
  .v3-shell .content { overflow: visible; }
  .v3-scroll-region { overflow: visible; }
  .v3-shell .content { max-width: calc(100vw - 28px); }
  .v3-topbar { min-height: 92px; }
  .v3-dashboard-head h1,
  .v3-page-intro h1 { font-size: 28px; }
  .v3-action-row { grid-template-columns: 1fr; }
  .v3-action-row .v3-primary-action:last-child { grid-column: auto; }
  .v3-opportunity-list > article {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }
  .v3-opportunity-list .v3-score-ring,
  .v3-opportunity-list > article > .v3-btn { grid-column: 2; }
  .v3-theme-grid { grid-template-columns: 1fr; }
  .route-account .account-head { grid-template-columns: 58px minmax(0, 1fr); padding: 16px; }
  .route-account .user-line.big strong { font-size: 21px; }
  .route-account .video-row,
  :root[data-theme="light"] .route-account .video-row,
  :root[data-theme="dark"] .route-account .video-row {
    grid-template-columns: 24px 86px minmax(0, 1fr);
    padding: 13px;
  }
  .route-account .thumb-btn,
  :root[data-theme="light"] .route-account .thumb-btn,
  :root[data-theme="dark"] .route-account .thumb-btn { width: 82px; height: 110px; }
  .route-account .video-title { font-size: 16px; }
  .route-account .video-row .actions.compact {
    grid-template-columns: minmax(112px, 1fr) 44px 82px;
  }
}

@media (max-width: 520px) {
  .v3-stat-grid { grid-template-columns: 1fr; }
  .v3-dashboard-head h1,
  .v3-page-intro h1 { font-size: 25px; }
  .v3-topbar .page-title { font-size: 24px; }
  .v3-health-strip em { display: none; }
  .v3-opportunity-list > article { padding: 15px; gap: 12px; }
  .route-account .video-row,
  :root[data-theme="light"] .route-account .video-row,
  :root[data-theme="dark"] .route-account .video-row {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
      "check body"
      "thumb thumb";
    align-items: start;
  }
  .route-account .thumb-btn,
  :root[data-theme="light"] .route-account .thumb-btn,
  :root[data-theme="dark"] .route-account .thumb-btn {
    width: min(100%, 210px);
    height: 280px;
    justify-self: center;
  }
  .route-account .video-row .actions.compact { grid-template-columns: 1fr 44px 82px; }
}

/* Account monitor: server-ledger snapshots and high-value event timeline. */
.route-monitor { gap: 16px; }
.monitor-safe-note { padding: 7px 10px; border-radius: 999px; background: #edf6f0; color: var(--v3-good); font-size: 12px; font-weight: 700; }
.monitor-add-card { padding: 22px 24px; }
.monitor-account-source { margin-top: 18px; }
.monitor-account-source label { min-width: 0; display: grid; gap: 7px; }
.monitor-account-source label > span { color: var(--v3-muted); font-size: 12px; }
.monitor-account-source input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--v3-line); border-radius: 11px; outline: 0; background: #fff; color: var(--v3-ink); font-size: 13px; }
.monitor-account-source input:focus { border-color: var(--v3-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .11); }
.monitor-input-wide > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.monitor-input-wide .v3-btn { min-width: 92px; }
.monitor-config-panel { margin-top: 10px; padding: 8px 10px 10px; border: 1px solid var(--v3-line); border-radius: 12px; background: var(--v3-surface-soft); }
.monitor-config-panel.is-editing { border-color: #bfd3f6; background: #f5f9ff; box-shadow: 0 0 0 3px rgba(37,99,235,.06); }
.monitor-config-head { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.monitor-config-head > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.monitor-config-head > div > span { color: var(--v3-primary); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.monitor-config-head > div > strong { overflow: hidden; color: var(--v3-muted); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.monitor-config-head > div > p, .monitor-config-copy small { display: none; }
.monitor-config-head .v3-btn { min-width: 94px; height: 30px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.monitor-config-head .v3-btn svg { width: 14px; height: 14px; }
.monitor-config-grid { margin-top: 6px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid #dce4ee; border-radius: 10px; background: #fff; }
.monitor-config-item { min-width: 0; min-height: 52px; padding: 6px 9px; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 8px; border: 0; border-right: 1px solid #e4e9f0; background: #fff; transition: background-color .18s ease; }
.monitor-config-item:last-child { border-right: 0; }
.monitor-config-item:hover { background: #f8fbff; }
.monitor-config-icon { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--v3-primary-soft); color: var(--v3-primary); }
.monitor-config-icon svg { width: 15px; height: 15px; }
.monitor-config-copy { min-width: 0; display: grid; align-content: center; gap: 2px; }
.monitor-config-copy em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.monitor-config-copy strong { overflow: hidden; color: var(--v3-ink); font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.monitor-config-copy select,
.monitor-config-copy input { width: 100%; height: 30px; padding: 0 8px; border: 1px solid var(--v3-line); border-radius: 8px; outline: 0; background: #fff; color: var(--v3-ink); font-size: 11px; }
.monitor-config-copy select:focus { border-color: var(--v3-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.monitor-config-copy select:disabled { background: #f3f6fa; color: #64748b; cursor: not-allowed; }
.monitor-config-item.is-locked input { background: #f3f6fa; color: #4c5d73; cursor: default; }
.monitor-parse-hint { margin-top: 14px; padding: 12px 14px; border-radius: 11px; background: var(--v3-surface-soft); color: var(--v3-muted); font-size: 12px; line-height: 1.6; }
.monitor-preview { margin-top: 16px; padding: 15px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid #d6dfeb; border-radius: 14px; background: #ffffff; }
.monitor-preview img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.monitor-preview > div { min-width: 0; display: grid; gap: 3px; }
.monitor-preview span { color: var(--v3-good); font-size: 10px; font-weight: 800; }
.monitor-preview strong { font-size: 15px; }
.monitor-preview p { margin: 0; overflow: hidden; color: var(--v3-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-preview em { color: var(--v3-primary); font-size: 11px; font-style: normal; }
.monitor-workspace { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 2.1fr); gap: 16px; align-items: start; }
.monitor-list-card { position: sticky; top: 18px; padding: 19px; }
.monitor-list-card > header { margin-bottom: 12px; }
.monitor-account-list { display: grid; gap: 8px; }
.monitor-account-item { width: 100%; padding: 11px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 13px; background: var(--v3-surface-soft); color: var(--v3-ink); cursor: pointer; text-align: left; }
.monitor-account-item:hover { border-color: #d6dfeb; background: #fff; }
.monitor-account-item.active { border-color: #b9c5d4; background: var(--v3-primary-soft); }
.monitor-account-item img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.monitor-account-item > span { min-width: 0; display: grid; gap: 3px; }
.monitor-account-item strong, .monitor-account-item em, .monitor-account-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-account-item strong { font-size: 13px; }
.monitor-account-item em { color: var(--v3-primary); font-size: 10px; font-style: normal; }
.monitor-account-item small { color: var(--v3-muted); font-size: 9px; }
.monitor-account-item > i { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: #f8e4dd; color: #a05238; font-size: 11px; font-style: normal; font-weight: 800; }
.monitor-main-column { min-width: 0; display: grid; gap: 16px; }
.monitor-profile-card { padding: 22px; }
.monitor-profile-main { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 15px; }
.monitor-profile-main > img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.monitor-profile-main > div { min-width: 0; }
.monitor-profile-main h2 { margin: 6px 0 4px; font-size: 23px; }
.monitor-profile-main p { margin: 0; color: var(--v3-muted); font-size: 13px; line-height: 1.65; }
.monitor-status { padding: 4px 8px; border-radius: 999px; background: #f1f5f9; color: var(--v3-muted); font-size: 10px; font-weight: 750; }
.monitor-status.is-active { background: #edf6f0; color: var(--v3-good); }
.monitor-status.is-error { background: #fbefeb; color: #9d4d35; }
.monitor-auth-warning { padding: 16px 18px; display: flex; align-items: center; gap: 18px; border-color: #efcdbf; background: #fff8f4; }
.monitor-auth-warning > div { min-width: 0; display: grid; gap: 4px; }
.monitor-auth-warning strong { color: #813f2e; font-size: 14px; }
.monitor-auth-warning span { color: #64748b; font-size: 11px; line-height: 1.55; }
.monitor-auth-warning .v3-btn { margin-left: auto; flex: 0 0 auto; }
.monitor-profile-metrics { margin-top: 19px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.monitor-profile-metrics > div { padding: 13px 15px; display: grid; gap: 5px; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface-soft); }
.monitor-profile-metrics span { color: var(--v3-muted); font-size: 10px; }
.monitor-profile-metrics strong { font-size: 22px; }
.monitor-profile-metrics em { color: var(--v3-good); font-size: 9px; font-style: normal; }
.monitor-profile-actions { margin-top: 16px; display: flex; align-items: center; gap: 9px; }
.monitor-profile-actions > span { margin-left: auto; color: var(--v3-muted); font-size: 10px; }
.monitor-error { margin-top: 14px; padding: 11px 13px; display: flex; align-items: center; gap: 14px; border-radius: 11px; background: #fbefeb; color: #9d4d35; font-size: 11px; line-height: 1.6; }
.monitor-error > div { min-width: 0; display: grid; gap: 2px; }
.monitor-error strong { font-size: 12px; }
.monitor-error span { color: #64748b; }
.monitor-error .v3-btn { margin-left: auto; flex: 0 0 auto; min-height: 34px; background: #fffaf8; }
.monitor-inspiration-card { padding: 22px; }
.monitor-inspiration-card > header { margin-bottom: 14px; }
.monitor-inspiration-list { display: grid; gap: 10px; }
.monitor-inspiration-list[hidden] { display: none; }
.monitor-inspiration-card.is-collapsed > header { margin-bottom: 0; }
.monitor-section-actions { display: flex; align-items: center; gap: 10px; }
.section-collapse-toggle,
.task-monitor-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d6dfeb;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8fafc);
  color: var(--v3-primary);
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(77, 45, 57, .08);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.section-collapse-toggle .ui-icon,
.task-monitor-toggle .ui-icon { width: 18px; height: 18px; stroke-width: 2.25; }
.section-collapse-toggle:hover,
.task-monitor-toggle:hover {
  transform: translateY(-2px);
  border-color: #b9c5d4;
  background: var(--v3-primary-soft);
  box-shadow: 0 8px 18px rgba(77, 45, 57, .12);
}
.section-collapse-toggle:focus-visible,
.task-monitor-toggle:focus-visible,
.v3-back-button:focus-visible { outline: 3px solid rgba(123, 64, 88, .18); outline-offset: 2px; }
.monitor-inspiration-item { padding: 12px; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid var(--v3-line); border-radius: 14px; background: var(--v3-surface-soft); }
.monitor-inspiration-cover { position: relative; width: 62px; height: 78px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #f1f5f9; color: var(--v3-primary); font-size: 24px; font-weight: 850; }
.monitor-inspiration-cover img { width: 100%; height: 100%; object-fit: cover; }
.monitor-inspiration-cover > b { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--v3-primary); color: #fff; font-size: 10px; }
.monitor-inspiration-body { min-width: 0; display: grid; gap: 5px; }
.monitor-inspiration-heading { display: flex; align-items: center; gap: 7px; }
.monitor-inspiration-heading span { color: var(--v3-muted); font-size: 10px; }
.monitor-inspiration-heading em { color: var(--v3-primary); font-size: 11px; font-style: normal; font-weight: 850; }
.monitor-inspiration-heading i { padding: 3px 7px; border-radius: 999px; background: #edf6f0; color: var(--v3-good); font-size: 9px; font-style: normal; font-weight: 750; }
.monitor-inspiration-body > strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-inspiration-body > p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.55; }
.monitor-inspiration-body > small { color: #64748b; font-size: 10px; }
.monitor-inspiration-actions { display: grid; gap: 7px; justify-items: stretch; }
.monitor-inspiration-actions .v3-btn { min-height: 36px; padding: 0 12px; white-space: nowrap; }
.monitor-inspiration-actions a.v3-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.monitor-inspiration-item.grade-s { border-color: #b9c5d4; background: #ffffff; }
.monitor-inspiration-item.grade-a { border-color: #d6dfeb; }
.monitor-timeline-card { padding: 22px; }
.monitor-event-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.monitor-event-filters button { min-height: 34px; padding: 0 11px; border: 1px solid var(--v3-line); border-radius: 999px; background: #fff; color: var(--v3-muted); cursor: pointer; font-size: 11px; }
.monitor-event-filters button.active { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }
.monitor-timeline { position: relative; display: grid; gap: 14px; }
.monitor-timeline::before { position: absolute; top: 9px; bottom: 16px; left: 6px; width: 1px; background: #d6dfeb; content: ""; }
.monitor-event { position: relative; padding-left: 29px; display: grid; gap: 8px; }
.monitor-event-dot { position: absolute; top: 6px; left: 0; width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: var(--v3-primary); box-shadow: 0 0 0 1px #b9c5d4; z-index: 1; }
.monitor-event-publish .monitor-event-dot { background: #4f7a63; }
.monitor-event-milestone .monitor-event-dot { background: #a76d37; }
.monitor-event-head { display: flex; align-items: center; gap: 8px; }
.monitor-event-head time { color: var(--v3-muted); font-size: 10px; }
.monitor-event-head em { padding: 3px 7px; border-radius: 999px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 9px; font-style: normal; font-weight: 750; }
.monitor-event-body { padding: 15px; border: 1px solid var(--v3-line); border-radius: 14px; background: var(--v3-surface-soft); }
.monitor-event-body h3 { margin: 0; font-size: 14px; line-height: 1.5; }
.monitor-event-body > p { margin: 7px 0 0; color: var(--v3-muted); font-size: 11px; line-height: 1.65; }
.monitor-diff-list { margin-top: 12px; display: grid; gap: 8px; }
.monitor-diff-list > div { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: start; }
.monitor-diff-list span { color: var(--v3-muted); font-size: 10px; }
.monitor-diff-list del, .monitor-diff-list ins { padding: 8px 10px; border-radius: 9px; font-size: 11px; line-height: 1.5; text-decoration: none; word-break: break-word; }
.monitor-diff-list del { background: #faecec; color: #9a4d4d; }
.monitor-diff-list ins { background: #eaf6ef; color: #3e7657; }
.monitor-post-snapshot { margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.monitor-post-snapshot img { width: 58px; height: 76px; border-radius: 9px; object-fit: cover; background: #f1f5f9; }
.monitor-post-snapshot > div { min-width: 0; display: grid; gap: 5px; }
.monitor-post-snapshot strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-post-snapshot span { color: var(--v3-muted); font-size: 10px; }
.monitor-post-snapshot a { color: var(--v3-primary); font-size: 10px; font-weight: 750; text-decoration: none; }

@media (max-width: 1180px) {
  .monitor-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-config-item:nth-child(2) { border-right: 0; }
  .monitor-config-item:nth-child(-n+2) { border-bottom: 1px solid #e4e9f0; }
}

@media (min-width: 621px) {
  .monitor-config-panel.is-compact {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
  }
  .monitor-config-panel.is-compact .monitor-config-head { display: contents; }
  .monitor-config-panel.is-compact .monitor-config-head > div { grid-column: 1; grid-row: 1; }
  .monitor-config-panel.is-compact .monitor-config-head > div > strong { display: none; }
  .monitor-config-panel.is-compact .monitor-config-head .v3-btn { grid-column: 3; grid-row: 1; }
  .monitor-config-panel.is-compact .monitor-config-grid {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr) minmax(0, .72fr) minmax(0, 1.35fr);
  }
  .monitor-config-panel.is-compact .monitor-config-item { min-height: 48px; padding: 5px 8px; }
  .monitor-config-panel.is-compact .monitor-config-item:nth-child(2) { border-right: 1px solid #e4e9f0; }
  .monitor-config-panel.is-compact .monitor-config-item:nth-child(-n+2) { border-bottom: 0; }
}

@media (min-width: 621px) and (max-width: 1000px) {
  .monitor-config-panel.is-compact .monitor-config-item { grid-template-columns: minmax(0, 1fr); }
  .monitor-config-panel.is-compact .monitor-config-icon { display: none; }
}

@media (max-width: 900px) {
  .monitor-workspace { grid-template-columns: 1fr; }
  .monitor-list-card { position: static; }
  .monitor-account-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .monitor-config-grid, .monitor-account-list, .monitor-profile-metrics { grid-template-columns: 1fr; }
  .monitor-config-head > div > strong { display: none; }
  .monitor-config-head .v3-btn { min-width: 88px; }
  .monitor-config-item { min-height: 52px; border-right: 0; border-bottom: 1px solid #e4e9f0; }
  .monitor-config-item:last-child { border-bottom: 0; }
  .monitor-auth-warning, .monitor-error { align-items: stretch; flex-direction: column; }
  .monitor-auth-warning .v3-btn, .monitor-error .v3-btn { margin-left: 0; width: 100%; }
  .monitor-preview { grid-template-columns: 48px minmax(0, 1fr); }
  .monitor-preview img { width: 48px; height: 48px; }
  .monitor-preview .v3-btn { grid-column: 1 / -1; }
  .monitor-profile-actions { align-items: stretch; flex-direction: column; }
  .monitor-profile-actions > span { margin-left: 0; }
  .monitor-timeline-card > header { align-items: stretch; flex-direction: column; }
  .monitor-inspiration-item { grid-template-columns: 54px minmax(0, 1fr); }
  .monitor-inspiration-cover { width: 54px; height: 70px; }
  .monitor-inspiration-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .monitor-diff-list > div { grid-template-columns: 1fr; }
}

/* Global service-account context switcher. */
.v3-account-switcher { position: relative; z-index: 30; }
.v3-account-switcher .v3-account-mini {
  position: relative;
  width: 100%;
  padding-right: 48px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.v3-account-switcher .v3-account-mini:hover,
.v3-account-switcher .v3-account-mini[aria-expanded="true"] { border-color: #d6dfeb; background: #fff; box-shadow: 0 10px 28px rgba(74, 45, 57, .1); }
.v3-account-mini > strong,
.v3-account-mini > em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-account-mini-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  border: 1px solid #dbe6f5;
  border-radius: 9px;
  background: #fff;
  color: var(--v3-primary);
  box-shadow: 0 3px 10px rgba(27, 71, 137, .06);
  pointer-events: none;
  place-items: center;
  transform: translateY(-50%) rotate(0deg);
  transform-origin: center;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
}
.v3-account-mini-chevron svg { width: 15px; height: 15px; display: block; stroke-width: 2.2; }
.v3-account-mini:hover .v3-account-mini-chevron,
.v3-account-mini[aria-expanded="true"] .v3-account-mini-chevron { border-color: #c6d8f1; background: #edf4ff; color: #0d52bd; }
.v3-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 350px;
  max-height: min(66vh, 620px);
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 60px rgba(52, 31, 39, .18);
  backdrop-filter: blur(18px);
}
.v3-account-menu[hidden] { display: none; }
.v3-account-group { padding: 7px 4px 10px; display: grid; gap: 6px; border-bottom: 1px solid #f1f5f9; }
.v3-account-group:last-of-type { border-bottom: 0; }
.v3-account-group > header { padding: 0 8px; display: flex; align-items: center; justify-content: space-between; }
.v3-account-group > header span { color: #64748b; font-size: 12px; font-weight: 800; }
.v3-account-group > header em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.v3-account-option { width: 100%; min-height: 58px; padding: 8px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 13px; background: transparent; cursor: pointer; text-align: left; }
.v3-account-option:hover { background: #f8fafc; }
.v3-account-option.is-active { border-color: #d6dfeb; background: var(--v3-primary-soft); }
.v3-account-option img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #f1f5f9; }
.v3-account-option span { min-width: 0; display: grid; gap: 3px; }
.v3-account-option strong { overflow: hidden; color: var(--v3-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.v3-account-option em { overflow: hidden; color: var(--v3-muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.v3-account-option b { color: var(--v3-primary); }
.v3-account-empty { min-height: 38px; padding: 0 10px; border: 1px dashed #d6dfeb; border-radius: 11px; background: #f8fafc; color: var(--v3-primary); cursor: pointer; text-align: left; }
.v3-account-menu-footer { padding: 10px 4px 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.v3-account-menu-footer button { min-height: 40px; padding: 0 10px; border: 1px solid var(--v3-line); border-radius: 11px; background: #fff; color: var(--v3-ink); cursor: pointer; }
.v3-account-menu-footer button:first-child { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }

@media (max-width: 820px) {
  .v3-account-switcher { width: min(100%, 420px); }
  .v3-sidebar .v3-account-mini { display: grid; }
  .v3-account-menu { width: min(380px, calc(100vw - 32px)); }
}

@media (max-width: 480px) {
  .v3-account-menu-footer { grid-template-columns: 1fr; }
}

/* Comment collection: truthful coverage, resumable tasks and value-first review. */
.comment-preview-modal { width: min(1240px, 96vw); }
.comment-preview-modal > header { min-height: 58px; }
.comment-preview-modal .modal-body { padding: 0; background: #ffffff; }
.comment-preview-shell { min-height: min(720px, calc(100vh - 120px)); }
.comment-preview-tabs { position: sticky; top: 0; z-index: 4; display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--v3-line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px); }
.comment-preview-tabs button { min-width: 108px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--v3-muted); cursor: pointer; font-weight: 800; }
.comment-preview-tabs button:hover { background: var(--v3-primary-soft); color: var(--v3-primary); }
.comment-preview-tabs button.active { border-color: #d6dfeb; background: var(--v3-primary-soft); color: var(--v3-primary); }
.comment-preview-shell [data-preview-pane="detail"] { padding: 18px; }
.comment-media-missing { min-height: 320px; padding: 24px; display: grid; place-content: center; gap: 8px; border: 1px dashed #d6dfeb; border-radius: 14px; background: #f8fafc; text-align: center; }
.comment-media-missing strong { color: var(--v3-ink); }
.comment-media-missing span { color: var(--v3-muted); font-size: 12px; }
.comment-preview-pane { padding: 18px; }
.comment-preview-pane[hidden], .comment-preview-shell [data-preview-pane][hidden] { display: none; }
.comment-collection-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid var(--v3-line); border-radius: 18px; background: #fff; box-shadow: var(--v3-shadow); }
.comment-collection-head > div:first-child { min-width: 0; }
.comment-collection-head span { color: var(--v3-primary); font-size: 12px; font-weight: 900; }
.comment-collection-head h3 { margin: 5px 0 4px; font-size: 24px; }
.comment-collection-head p { margin: 0; color: var(--v3-muted); line-height: 1.65; }
.comment-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.comment-task-progress { margin: 12px 2px 0; display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 10px; }
.comment-task-progress i, .comment-coverage i { height: 8px; overflow: hidden; border-radius: 999px; background: var(--v3-line); }
.comment-task-progress b, .comment-coverage b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--v3-primary), #94a3b8); transition: width .25s ease; }
.comment-task-progress span { color: var(--v3-primary); font-size: 12px; font-weight: 900; }
.comment-metric-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.comment-metric-grid article { min-height: 94px; padding: 16px; display: grid; align-content: center; gap: 8px; border: 1px solid var(--v3-line); border-radius: 16px; background: #fff; }
.comment-metric-grid strong { color: var(--v3-ink); font-size: 24px; }
.comment-metric-grid span { color: var(--v3-muted); font-size: 12px; }
.comment-coverage { margin: 10px 2px 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.comment-coverage span { color: var(--v3-muted); font-size: 11px; }
.comment-warning { margin: 12px 0; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid #e6c590; border-radius: 14px; background: #fff8e9; }
.comment-warning strong { color: #8b5311; }
.comment-warning span { color: #8b6a43; line-height: 1.55; }
.comment-insight-grid { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr); gap: 14px; }
.comment-insight-grid > article, .comment-representative { padding: 17px; border: 1px solid var(--v3-line); border-radius: 18px; background: #fff; box-shadow: var(--v3-shadow); }
.comment-insight-grid article > header, .comment-representative > header { padding: 0 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; }
.comment-insight-grid header span, .comment-representative header span { color: var(--v3-ink); font-size: 15px; font-weight: 900; }
.comment-insight-grid header strong, .comment-representative header strong { color: var(--v3-muted); font-size: 11px; }
.comment-category-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.comment-category-list span { min-height: 38px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; border-radius: 10px; background: #f8fafc; }
.comment-category-list em { color: var(--v3-muted); font-size: 12px; font-style: normal; }
.comment-category-list b { color: var(--v3-primary); }
.comment-topic-list { display: grid; gap: 7px; }
.comment-topic-list button { min-height: 44px; padding: 8px 10px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; border: 1px solid #e7edf5; border-radius: 11px; background: #fff; cursor: pointer; text-align: left; }
.comment-topic-list button:hover { border-color: #d6dfeb; background: #f8fafc; }
.comment-topic-list b { color: #94a3b8; font-size: 11px; }
.comment-topic-list span { color: var(--v3-ink); font-size: 12px; line-height: 1.5; }
.comment-representative { margin-top: 14px; }
.comment-item { padding: 14px 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; border-top: 1px solid #f1f5f9; }
.comment-item:first-of-type { border-top: 0; }
.comment-item > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.comment-anonymous-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef4ff; color: var(--v3-primary); font-size: 13px; font-weight: 900; }
.comment-item > div { min-width: 0; }
.comment-item header { min-height: 0; padding: 0; display: flex; justify-content: flex-start; gap: 8px; border: 0; }
.comment-item header strong { color: var(--v3-ink); font-size: 12px; }
.comment-item header span { color: var(--v3-muted); font-size: 10px; }
.comment-item header em { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 10px; font-style: normal; font-weight: 900; }
.comment-item > div > p { margin: 6px 0 8px; color: #334155; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.comment-item footer { padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; border: 0; color: var(--v3-muted); font-size: 10px; }
.comment-item footer i { padding: 2px 7px; border-radius: 999px; background: #f1f5f9; color: #475569; font-style: normal; }
.settings-privacy-actions { padding-top: 16px; border-top: 1px solid var(--v3-line); }
.comment-replies { margin-top: 10px; padding: 9px 11px; display: grid; gap: 8px; border-left: 3px solid #b9c5d4; border-radius: 0 10px 10px 0; background: #f8fafc; }
.comment-replies p { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px; color: var(--v3-muted); font-size: 11px; line-height: 1.55; }
.comment-replies strong { color: var(--v3-primary); }
.comment-raw-tools { display: grid; grid-template-columns: 170px 150px minmax(220px, 1fr) auto; align-items: end; gap: 10px; }
.comment-raw-tools label { display: grid; gap: 6px; color: var(--v3-muted); font-size: 11px; font-weight: 800; }
.comment-raw-tools select, .comment-raw-tools input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--v3-line); border-radius: 11px; background: #fff; color: var(--v3-ink); font: inherit; }
.comment-raw-count { margin: 12px 0; padding: 10px 12px; border-radius: 11px; background: #f8fafc; color: var(--v3-muted); font-size: 11px; }
.comment-raw-list { padding: 4px 17px 12px; border: 1px solid var(--v3-line); border-radius: 18px; background: #fff; }

@media (max-width: 980px) {
  .comment-collection-head { flex-direction: column; }
  .comment-actions { justify-content: flex-start; }
  .comment-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .comment-insight-grid { grid-template-columns: 1fr; }
  .comment-raw-tools { grid-template-columns: 1fr 1fr; }
  .comment-keyword { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .comment-preview-tabs { overflow-x: auto; }
  .comment-preview-tabs button { min-width: 96px; }
  .comment-preview-pane, .comment-preview-shell [data-preview-pane="detail"] { padding: 12px; }
  .comment-metric-grid { grid-template-columns: 1fr 1fr; }
  .comment-metric-grid article:last-child { grid-column: 1 / -1; }
  .comment-actions { display: grid; width: 100%; }
  .comment-actions .v3-btn { width: 100%; }
  .comment-category-list, .comment-raw-tools { grid-template-columns: 1fr; }
  .comment-keyword { grid-column: auto; }
  .comment-warning { grid-template-columns: 1fr; }
  .comment-coverage { grid-template-columns: 1fr; }
}

/* Content production and Obsidian knowledge manager. */
.production-mode-tabs {
  width: fit-content;
  margin-bottom: 18px;
  padding: 4px;
  display: flex;
  gap: 4px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #f8fafc;
}
.production-mode-tabs button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--v3-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}
.production-mode-tabs button.active { background: #fff; color: var(--v3-primary); box-shadow: 0 4px 12px rgba(67, 40, 50, .08); }
.v3-btn.danger { border-color: #e2c1c1; background: #fff8f8; color: #9d3838; }
.knowledge-page-intro { margin-bottom: 14px; }
.knowledge-category-tabs {
  margin-bottom: 14px;
  padding: 7px;
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 6px;
  overflow-x: auto;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--v3-shadow);
}
.knowledge-category-tabs button {
  min-width: 128px;
  min-height: 44px;
  padding: 9px 12px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--v3-muted);
  cursor: pointer;
  text-align: center;
}
.knowledge-category-tabs button:hover { background: #f8fafc; }
.knowledge-category-tabs button.active { border-color: #d6dfeb; background: var(--v3-primary-soft); color: var(--v3-primary); }
.knowledge-category-tabs strong { color: inherit; font-size: 13px; }
.knowledge-manager-grid { min-height: 680px; display: grid; grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.knowledge-list-panel,
.knowledge-editor-panel { min-width: 0; overflow: hidden; border: 1px solid var(--v3-line); border-radius: 18px; background: #fff; box-shadow: var(--v3-shadow); }
.knowledge-list-panel { padding: 12px; display: flex; flex-direction: column; }
.knowledge-list-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.knowledge-list-tools input,
.knowledge-quick-fields input,
.knowledge-quick-fields select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--v3-line);
  border-radius: 11px;
  background: #fff;
  color: var(--v3-ink);
  font: inherit;
  font-size: 13px;
}
.knowledge-list-tools > span { min-width: 44px; color: var(--v3-muted); font-size: 11px; text-align: right; }
.knowledge-doc-list { margin-top: 10px; display: grid; align-content: start; gap: 7px; max-height: 680px; overflow-y: auto; scrollbar-width: thin; }
.knowledge-doc-item { width: 100%; padding: 12px; display: grid; gap: 10px; border: 1px solid #f1f5f9; border-radius: 13px; background: #fff; cursor: pointer; text-align: left; }
.knowledge-doc-item:hover { border-color: #d6dfeb; background: #f8fafc; }
.knowledge-doc-item.active { border-color: var(--v3-primary); background: var(--v3-primary-soft); }
.knowledge-doc-item > span { min-width: 0; display: grid; gap: 5px; }
.knowledge-doc-item strong { overflow: hidden; color: var(--v3-ink); font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-doc-item em { display: -webkit-box; overflow: hidden; color: var(--v3-muted); font-size: 10px; font-style: normal; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.knowledge-doc-item footer { padding: 0; display: flex; align-items: center; gap: 6px; border: 0; }
.knowledge-doc-item footer b,
.knowledge-doc-item footer i { padding: 3px 7px; border-radius: 999px; background: #f1f5f9; color: var(--v3-primary); font-size: 9px; font-style: normal; }
.knowledge-doc-item footer time { margin-left: auto; color: var(--v3-muted); font-size: 9px; }
.knowledge-trash { margin-top: 10px; border-top: 1px solid var(--v3-line); }
.knowledge-trash[hidden] { display: none; }
.knowledge-trash summary { padding: 13px 4px 4px; cursor: pointer; color: var(--v3-muted); font-size: 11px; font-weight: 850; }
.knowledge-trash summary span { float: right; }
.knowledge-trash > div { margin-top: 7px; display: grid; gap: 6px; }
.knowledge-trash article { padding: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #f1f5f9; border-radius: 10px; background: #f8fafc; }
.knowledge-trash article > span { min-width: 0; display: grid; gap: 3px; }
.knowledge-trash strong { overflow: hidden; color: var(--v3-ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-trash em { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.knowledge-editor-panel { padding: 18px; }
.knowledge-editor-empty { min-height: 620px; display: grid; place-content: center; gap: 8px; color: var(--v3-muted); text-align: center; }
.knowledge-editor-empty strong { color: var(--v3-ink); font-size: 18px; }
.knowledge-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.knowledge-editor-head > div:first-child { min-width: 0; }
.knowledge-editor-head span { color: var(--v3-primary); font-size: 10px; font-weight: 900; }
.knowledge-editor-head h2 { margin: 5px 0; color: var(--v3-ink); font-size: 21px; }
.knowledge-editor-head p { margin: 0; overflow-wrap: anywhere; color: var(--v3-muted); font-size: 10px; }
.knowledge-editor-head .v3-card-actions .v3-btn { min-width: 74px; white-space: nowrap; }
.knowledge-create-location { margin-top: 16px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; border: 1px solid #dbe6f4; border-radius: 12px; background: #f7faff; color: var(--v3-primary); }
.knowledge-create-location svg { width: 18px; height: 18px; flex: 0 0 auto; }
.knowledge-create-location > span { min-width: 0; display: grid; gap: 3px; }
.knowledge-create-location em { color: var(--v3-muted); font-size: 9px; font-style: normal; font-weight: 750; }
.knowledge-create-location strong { overflow: hidden; color: #334155; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.knowledge-reader-head > div:first-child { min-width: 0; }
.knowledge-reader-head > div:first-child > span { color: var(--v3-primary); font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.knowledge-reader-head h2 { margin: 6px 0 10px; color: var(--v3-ink); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.28; }
.knowledge-reader-head .v3-card-actions { flex: 0 0 auto; }
.knowledge-reader-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.knowledge-reader-badges > b { padding: 4px 9px; border-radius: 999px; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 10px; }
.knowledge-reader-badges > span { padding-left: 9px; display: inline-flex; align-items: center; gap: 5px; border-left: 1px solid var(--v3-line); color: var(--v3-muted); font-size: 10px; }
.knowledge-reader-badges > span b { color: #475569; font-size: inherit; }
.knowledge-document-paper {
  width: min(100%, 920px);
  margin: 22px auto 18px;
  padding: clamp(26px, 4vw, 56px);
  border: 1px solid #e7edf5;
  border-radius: 18px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 18px 45px rgba(70, 42, 53, .075);
}
.knowledge-document-lead { margin: 0 0 24px; padding: 16px 18px; border-radius: 13px; background: #f8fafc; color: #475569; }
.knowledge-reader-section { margin: 0 0 28px; }
.knowledge-reader-section:last-child { margin-bottom: 0; }
.knowledge-reader-section h2,
.knowledge-reader-section h3,
.knowledge-reader-section h4 { margin: 0 0 13px; color: #1e293b; line-height: 1.35; }
.knowledge-reader-section h2 { padding-bottom: 9px; border-bottom: 1px solid #f1f5f9; font-size: 20px; }
.knowledge-reader-section h3 { font-size: 17px; }
.knowledge-reader-section h4 { font-size: 15px; }
.knowledge-document-paper p { margin: 0 0 13px; color: #334155; font-size: 15px; line-height: 1.95; }
.knowledge-document-paper ul,
.knowledge-document-paper ol { margin: 0 0 15px; padding-left: 24px; color: #334155; }
.knowledge-document-paper li { margin: 7px 0; padding-left: 3px; font-size: 14px; line-height: 1.8; }
.knowledge-document-paper strong { color: #1e293b; font-weight: 850; }
.knowledge-document-paper code { padding: 2px 6px; border-radius: 6px; background: #f1f5f9; color: #475569; font: 12px/1.6 "SFMono-Regular", Consolas, monospace; }
.knowledge-document-paper pre { margin: 14px 0; padding: 16px; overflow: auto; border-radius: 12px; background: #1e293b; color: #fff; }
.knowledge-document-paper pre code { padding: 0; background: transparent; color: inherit; }
.knowledge-document-paper blockquote { margin: 14px 0; padding: 13px 16px; border-left: 4px solid #94a3b8; border-radius: 0 10px 10px 0; background: #f8fafc; color: #475569; font-size: 14px; line-height: 1.8; }
.knowledge-document-paper hr { height: 1px; margin: 28px 0; border: 0; background: var(--v3-line); }
.knowledge-document-paper a { color: #475569; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.knowledge-wikilink { padding: 2px 7px; border-radius: 6px; background: #f8fafc; color: #475569; font-size: .92em; }
.knowledge-table-wrap { margin: 15px 0; overflow-x: auto; border: 1px solid #e7edf5; border-radius: 12px; }
.knowledge-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.knowledge-table-wrap th { padding: 10px 12px; background: #f8fafc; color: #334155; text-align: left; }
.knowledge-table-wrap td { padding: 10px 12px; border-top: 1px solid #f1f5f9; color: #475569; vertical-align: top; }
.knowledge-reader-section.highlight { padding: 18px 20px; border: 1px solid #e7edf5; border-left: 5px solid #64748b; border-radius: 13px; background: linear-gradient(100deg, #ffffff, #fff); }
.knowledge-reader-section.highlight h2,
.knowledge-reader-section.highlight h3 { padding: 0; border: 0; color: #475569; }
.knowledge-reader-section.primary { padding: 22px clamp(18px, 3vw, 30px); border-radius: 15px; background: #ffffff; box-shadow: inset 0 0 0 1px #f1f5f9; }
.knowledge-reader-section.primary h2,
.knowledge-reader-section.primary h3 { color: #475569; }
.knowledge-reader-section.script-copy p { color: #1e293b; font-size: 17px; line-height: 2.05; }
.knowledge-reader-section.production { padding: 18px 20px; border-radius: 13px; background: #f7f9fb; box-shadow: inset 0 0 0 1px #e4e9ed; }
.knowledge-reader-section.review { padding: 18px 20px; border-radius: 13px; background: #f5faf6; box-shadow: inset 0 0 0 1px #dfeae2; }
.knowledge-reader-section.rule { padding: 18px 20px; border-radius: 13px; background: #fff9f0; box-shadow: inset 0 0 0 1px #eee2cf; }
.knowledge-reader-secondary { margin: 12px 0; border: 1px solid #e7edf5; border-radius: 11px; background: #ffffff; }
.knowledge-reader-secondary summary { padding: 12px 14px; cursor: pointer; color: #64748b; font-size: 11px; font-weight: 850; }
.knowledge-reader-secondary > div { padding: 2px 14px 14px; }
.knowledge-reader-secondary p,
.knowledge-reader-secondary li { font-size: 12px; line-height: 1.7; }
.knowledge-reader-empty { padding: 70px 20px; color: var(--v3-muted); text-align: center; }
.knowledge-empty-section { color: var(--v3-muted) !important; font-style: italic; }
.knowledge-quick-fields { margin: 18px 0 12px; display: grid; grid-template-columns: minmax(220px, 1fr) 160px 110px; gap: 10px; }
.knowledge-quick-fields.is-new-document { grid-template-columns: minmax(260px, 1fr) minmax(210px, 280px); }
.knowledge-quick-fields label { display: grid; gap: 6px; color: var(--v3-muted); font-size: 10px; font-weight: 850; }
.knowledge-content-field { display: grid; gap: 8px; }
.knowledge-content-field > span { display: flex; justify-content: space-between; color: var(--v3-ink); font-size: 12px; font-weight: 850; }
.knowledge-content-field em { color: var(--v3-muted); font-size: 10px; font-style: normal; font-weight: 500; }
#knowledge-content-editor { width: 100%; min-height: 500px; padding: 16px; resize: vertical; border: 1px solid var(--v3-line); border-radius: 14px; background: #ffffff; color: #1e293b; font: 13px/1.75 "SFMono-Regular", Consolas, "Liberation Mono", monospace; outline: none; }
#knowledge-content-editor:focus { border-color: #b9c5d4; box-shadow: 0 0 0 3px rgba(63, 111, 175, .06); background: #fff; }
.knowledge-save-note { margin-top: 10px; padding: 11px 13px; display: flex; align-items: center; gap: 8px; border-radius: 11px; background: #f5faf6; color: #4f7159; font-size: 10px; line-height: 1.5; }
.knowledge-save-note svg { width: 16px; height: 16px; }
.knowledge-file-meta { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--v3-line); border-radius: 11px; background: #ffffff; }
.knowledge-file-meta summary { cursor: pointer; color: var(--v3-muted); font-size: 10px; font-weight: 850; }
.knowledge-file-meta > div { margin-top: 9px; display: grid; gap: 5px; color: var(--v3-muted); font-size: 9px; overflow-wrap: anywhere; }
.knowledge-reader-meta { width: min(100%, 920px); margin: 0 auto; }
.knowledge-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px !important; }
.knowledge-meta-grid span { min-width: 0; padding-bottom: 7px; display: grid; gap: 3px; border-bottom: 1px dashed var(--v3-line); }
.knowledge-meta-grid b { color: #475569; font-size: 9px; }
.knowledge-meta-grid em { overflow-wrap: anywhere; color: #64748b; font-size: 9px; font-style: normal; }
.knowledge-archive-secondary { margin-top: 12px; min-height: 36px; font-size: 11px; }
.production-ready-card { margin-bottom: 14px; }
.production-knowledge-list { display: grid; gap: 8px; }
.production-knowledge-item { padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e7edf5; border-radius: 14px; background: linear-gradient(90deg, #fff, #ffffff); }
.production-knowledge-item > div { min-width: 0; display: grid; gap: 5px; }
.production-knowledge-item span { color: var(--v3-primary); font-size: 10px; font-weight: 850; }
.production-knowledge-item strong { color: var(--v3-ink); font-size: 15px; }
.production-knowledge-item em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.production-source-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; }
.production-source-grid button { min-width: 0; min-height: 80px; padding: 13px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--v3-line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; }
.production-source-grid button:hover { border-color: #d6dfeb; background: #f8fafc; }
.production-source-grid svg { color: var(--v3-primary); }
.production-source-grid button > span { min-width: 0; display: grid; gap: 4px; }
.production-source-grid strong { color: var(--v3-ink); font-size: 12px; }
.production-source-grid em { overflow: hidden; color: var(--v3-muted); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.production-source-grid b { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--v3-primary-soft); color: var(--v3-primary); font-size: 10px; }
.production-board-link { width: 100%; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.production-board-link:hover .v3-board-item { border-color: #b9c5d4; background: #ffffff; }
.production-board-link .v3-board-item { pointer-events: none; transition: .15s ease; }

@media (max-width: 1180px) {
  .knowledge-category-tabs { grid-template-columns: repeat(7, 128px); }
  .knowledge-manager-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .knowledge-editor-head { flex-direction: column; }
  .knowledge-reader-head { flex-direction: column; }
  .production-source-grid { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}
@media (max-width: 900px) {
  .knowledge-manager-grid { grid-template-columns: 1fr; }
  .knowledge-doc-list { max-height: 360px; }
  .knowledge-quick-fields { grid-template-columns: 1fr 1fr; }
  .knowledge-quick-fields label:first-child { grid-column: 1 / -1; }
  .knowledge-quick-fields.is-new-document { grid-template-columns: 1fr; }
  .knowledge-quick-fields.is-new-document label:first-child { grid-column: auto; }
  .production-source-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (hover: none), (pointer: coarse) {
  .v3-shell .knowledge-tree-create { opacity: 1; transform: scale(1); }
}
@media (max-width: 620px) {
  .production-mode-tabs { width: 100%; }
  .production-mode-tabs button { flex: 1; padding: 0 10px; }
  .knowledge-page-intro .v3-card-actions,
  .knowledge-editor-head .v3-card-actions,
  .knowledge-reader-head .v3-card-actions { width: 100%; display: grid; }
  .knowledge-category-tabs { margin-left: -4px; margin-right: -4px; }
  .knowledge-manager-grid { min-height: 0; }
  .knowledge-list-panel,
  .knowledge-editor-panel { border-radius: 14px; }
  .knowledge-editor-panel { padding: 13px; }
  .knowledge-editor-empty { min-height: 280px; }
  .knowledge-quick-fields { grid-template-columns: 1fr; }
  .knowledge-quick-fields label:first-child { grid-column: auto; }
  #knowledge-content-editor { min-height: 420px; font-size: 12px; }
  .knowledge-document-paper { margin-top: 16px; padding: 22px 17px; border-radius: 13px; }
  .knowledge-document-paper p { font-size: 14px; }
  .knowledge-reader-section.script-copy p { font-size: 16px; }
  .knowledge-reader-badges > span { width: 100%; padding: 0; border: 0; }
  .knowledge-meta-grid { grid-template-columns: 1fr; }
  .production-knowledge-item { align-items: flex-start; flex-direction: column; }
  .production-knowledge-item .v3-btn { width: 100%; }
  .production-source-grid { grid-template-columns: 1fr; }
}

/* Shared account scope + result-first publishing review */
.operation-scope-bar { margin: 0 0 14px; padding: 10px 13px; display: flex; align-items: center; gap: 14px; border: 1px solid #e7edf5; border-radius: 14px; background: #fff; }
.operation-scope-bar label { display: flex; align-items: center; gap: 9px; }
.operation-scope-bar label > span { color: var(--v3-muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.operation-scope-bar select { min-width: 220px; height: 38px; padding: 0 34px 0 11px; border: 1px solid #d6dfeb; border-radius: 10px; background: #ffffff; color: var(--v3-ink); font-weight: 800; }
.operation-scope-bar p { margin: 0; color: var(--v3-muted); font-size: 11px; }
.v3-loading-card { padding: 24px; border: 1px dashed #d6dfeb; border-radius: 14px; background: #ffffff; color: var(--v3-muted); text-align: center; }
.review-page-intro { margin-top: 0; }
.review-view-tabs { margin-bottom: 14px; padding: 4px; display: inline-flex; gap: 3px; border-radius: 12px; background: #f1f5f9; }
.review-view-tabs button { min-height: 36px; padding: 0 18px; border: 0; border-radius: 9px; background: transparent; color: var(--v3-muted); cursor: pointer; font-weight: 800; }
.review-view-tabs button.is-active { background: #fff; color: var(--v3-primary); box-shadow: 0 3px 10px rgba(67, 40, 50, .08); }
.review-summary-grid { margin-bottom: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.review-summary-grid article { min-height: 106px; padding: 16px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--v3-line); border-radius: 15px; background: #fff; }
.review-summary-grid span { color: var(--v3-muted); font-size: 11px; font-weight: 750; }
.review-summary-grid strong { color: var(--v3-ink); font-size: 26px; line-height: 1; }
.review-summary-grid em { color: #94a3b8; font-size: 10px; font-style: normal; }
.review-dashboard { margin-bottom: 16px; display: grid; gap: 12px; }
.review-action-hero { --review-accent: #8d641c; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; border: 1px solid #e7edf5; border-left: 5px solid var(--review-accent); border-radius: 18px; background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); box-shadow: 0 10px 28px rgba(73, 43, 54, .05); }
.review-action-hero.is-pursue { --review-accent: #3d7d55; }
.review-action-hero.is-angle { --review-accent: #b27a20; }
.review-action-hero.is-stop { --review-accent: #a4474d; }
.review-action-hero.is-pending { --review-accent: #475569; }
.review-action-heading { display: flex; align-items: center; gap: 10px; }
.review-action-copy h2 { margin: 10px 0 0; max-width: 900px; color: var(--v3-ink); font-size: clamp(19px, 2vw, 28px); line-height: 1.42; letter-spacing: -.02em; }
.review-next-action { margin-top: 16px; padding: 13px 15px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; border-radius: 12px; background: rgba(255, 255, 255, .78); }
.review-next-action strong { color: var(--review-accent); font-size: 11px; }
.review-next-action p { margin: 0; color: #334155; font-size: 12px; line-height: 1.65; }
.review-action-meta { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; }
.review-action-meta span { padding: 5px 8px; border-radius: 999px; background: #f1f5f9; color: var(--v3-muted); font-size: 9px; font-weight: 750; }
.review-completeness { display: grid; place-items: center; align-content: center; text-align: center; }
.review-progress-ring { width: 112px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--review-accent) var(--review-progress), #e7edf5 0); position: relative; }
.review-progress-ring::after { content: ""; position: absolute; inset: 10px; border-radius: inherit; background: #fff; box-shadow: inset 0 0 0 1px #f1f5f9; }
.review-progress-ring > div { z-index: 1; display: grid; gap: 2px; }
.review-progress-ring strong { color: var(--v3-ink); font-size: 23px; line-height: 1; }
.review-progress-ring span { color: var(--v3-muted); font-size: 9px; }
.review-completeness > strong { margin-top: 10px; color: var(--v3-ink); font-size: 11px; }
.review-completeness > p { margin: 5px 0 0; max-width: 170px; color: var(--v3-muted); font-size: 9px; line-height: 1.5; }
.review-chart-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 12px; }
.review-chart-card { min-width: 0; padding: 18px; border: 1px solid var(--v3-line); border-radius: 16px; background: #fff; }
.review-chart-card > header { margin-bottom: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.review-chart-card h3 { margin: 5px 0 0; color: var(--v3-ink); font-size: 16px; }
.review-chart-card header em { color: var(--v3-muted); font-size: 9px; font-style: normal; text-align: right; }
.review-chart-card header > strong { color: var(--v3-ink); font-size: 28px; line-height: 1; }
.review-ranking-list, .review-decision-bars { display: grid; gap: 12px; }
.review-ranking-row { display: grid; grid-template-columns: minmax(180px, .95fr) minmax(160px, 1fr) 38px; align-items: center; gap: 11px; }
.review-ranking-copy { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 2px 7px; }
.review-ranking-copy > span { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #f1f5f9; color: #475569; font-size: 10px; font-weight: 900; }
.review-ranking-copy > span.is-level-s { background: #e3f2e8; color: #32704b; }
.review-ranking-copy > span.is-level-a { background: #fff0d4; color: #8d641c; }
.review-ranking-copy > span.is-level-b { background: #f2edf6; color: #73578a; }
.review-ranking-copy > span.is-level-c { background: #f9e5e6; color: #9a444a; }
.review-ranking-copy strong { overflow: hidden; color: var(--v3-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.review-ranking-copy em { color: var(--v3-muted); font-size: 8px; font-style: normal; }
.review-ranking-track, .review-decision-row > div { height: 9px; overflow: hidden; border-radius: 999px; background: #f1f5f9; }
.review-ranking-track i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #94a3b8, var(--v3-primary)); }
.review-ranking-row > b { color: var(--v3-primary); font-size: 11px; text-align: right; }
.review-decision-row { display: grid; grid-template-columns: 50px minmax(90px, 1fr) 24px; align-items: center; gap: 9px; }
.review-decision-row > span { color: var(--v3-muted); font-size: 10px; }
.review-decision-row i { min-width: 0; height: 100%; display: block; border-radius: inherit; }
.review-decision-row i.is-pursue { background: #4d9367; }
.review-decision-row i.is-angle { background: #d39a3e; }
.review-decision-row i.is-stop { background: #b8565d; }
.review-decision-row i.is-pending { background: #64748b; }
.review-decision-row > strong { color: var(--v3-ink); font-size: 11px; text-align: right; }
.review-chart-note { margin: 17px 0 0; padding: 11px 12px; border-radius: 10px; background: #f8fafc; color: var(--v3-muted); font-size: 10px; line-height: 1.55; }
.review-chart-empty { padding: 22px; border: 1px dashed #d6dfeb; border-radius: 12px; color: var(--v3-muted); font-size: 10px; text-align: center; }
.review-result-list { display: grid; gap: 12px; }
.review-result-card { padding: 18px; border: 1px solid var(--v3-line); border-radius: 16px; background: #fff; }
.review-result-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.review-result-card > header > div { min-width: 0; }
.review-result-card h3 { margin: 7px 0 4px; color: var(--v3-ink); font-size: 17px; line-height: 1.35; }
.review-result-card header p { margin: 0; color: var(--v3-muted); font-size: 11px; }
.review-type-badge, .review-status-badge, .review-decision { display: inline-flex; min-height: 24px; padding: 0 9px; align-items: center; border-radius: 999px; background: #f1f5f9; color: var(--v3-primary); font-size: 10px; font-weight: 850; white-space: nowrap; }
.review-type-badge.is-data { background: #eaf2ee; color: #426a52; }
.review-status-badge { background: #eff5f1; color: #4e735d; }
.review-decision.is-pursue { background: #e8f4ec; color: #32704b; }
.review-decision.is-angle { background: #fff3dc; color: #8d641c; }
.review-decision.is-stop { background: #f9e7e8; color: #9a444a; }
.review-decision.is-pending { background: #f0edef; color: #475569; }
.review-visible-conclusion { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 9px; }
.review-visible-conclusion section { padding: 13px; border-radius: 12px; background: #f8fafc; }
.review-visible-conclusion strong { color: var(--v3-primary); font-size: 11px; }
.review-visible-conclusion p { margin: 6px 0 0; color: #334155; font-size: 13px; line-height: 1.65; }
.review-performance { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.review-performance span { min-width: 88px; padding: 9px 11px; display: grid; gap: 2px; border: 1px solid #f1f5f9; border-radius: 10px; color: var(--v3-muted); font-size: 9px; }
.review-performance strong { color: var(--v3-ink); font-size: 14px; }
.review-full-detail { margin-top: 12px; border-top: 1px solid #f1f5f9; }
.review-full-detail summary { padding-top: 12px; color: var(--v3-primary); cursor: pointer; font-size: 11px; font-weight: 800; }
.review-full-detail > div { margin-top: 12px; max-height: 520px; overflow: auto; padding: 15px; border-radius: 12px; background: #ffffff; }
.review-full-detail h4 { margin: 18px 0 7px; color: var(--v3-ink); font-size: 14px; }
.review-full-detail h4:first-child { margin-top: 0; }
.review-full-detail p { margin: 5px 0; color: #334155; font-size: 12px; line-height: 1.7; }
.review-full-detail p.is-bullet { padding-left: 14px; position: relative; }
.review-full-detail p.is-bullet::before { content: "•"; position: absolute; left: 2px; color: var(--v3-primary); }
.review-detail-actions { display: flex; gap: 8px; }
.review-friendly-empty { min-height: 250px; padding: 34px; display: grid; place-items: center; align-content: center; gap: 9px; border: 1px dashed #d6dfeb; border-radius: 16px; background: #ffffff; text-align: center; }
.review-friendly-empty strong { color: var(--v3-ink); font-size: 17px; }
.review-friendly-empty span { max-width: 520px; color: var(--v3-muted); font-size: 12px; line-height: 1.6; }
.review-create-card { max-width: 980px; }
.review-account-lock { margin-bottom: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-radius: 12px; background: #f8fafc; }
.review-account-lock span, .review-account-lock em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.review-account-lock strong { color: var(--v3-ink); font-size: 13px; }
.review-account-lock em { margin-left: auto; }
.review-agent-create { max-width: none; padding: 24px; }
.review-agent-create > header { margin-bottom: 18px; align-items: flex-start; }
.review-agent-create > header h2 { margin: 6px 0 7px; font-size: 22px; }
.review-agent-create > header p { max-width: 720px; margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.65; }
.review-auto-steps { margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--v3-line); border-radius: 13px; background: #f8fafc; }
.review-auto-steps span { min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--v3-muted); font-size: 11px; font-weight: 800; }
.review-auto-steps span + span { border-left: 1px solid var(--v3-line); }
.review-auto-steps span.is-active { background: #eef5ff; color: var(--v3-primary); }
.review-auto-steps b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: 10px; }
.review-auto-steps .is-active b { background: var(--v3-primary); color: #fff; }
.review-account-wide { margin: 0 0 14px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #b9d2f6; border-radius: 15px; background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 62%, #fff 100%); box-shadow: 0 10px 24px rgba(25, 94, 207, .07); }
.review-account-wide > div { min-width: 0; display: grid; gap: 5px; }
.review-account-wide strong { color: var(--v3-ink); font-size: 16px; }
.review-account-wide p { max-width: 680px; margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.review-account-wide .v3-btn { min-width: 190px; min-height: 46px; }
.review-work-picker { margin-top: 14px; padding: 16px; border: 1px solid var(--v3-line); border-radius: 15px; background: #fbfcfe; }
.review-work-picker-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.review-work-picker-head > div { display: grid; gap: 3px; }
.review-work-picker-head strong { color: var(--v3-ink); font-size: 14px; }
.review-work-picker-head span { color: var(--v3-muted); font-size: 10px; }
.review-work-options { max-height: 350px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; overflow: auto; padding-right: 3px; }
.review-work-option { min-width: 0; min-height: 112px; padding: 10px; display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--v3-line); border-radius: 13px; background: #fff; color: inherit; cursor: pointer; text-align: left; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.review-work-option:hover { border-color: #9bb9ef; transform: translateY(-1px); }
.review-work-option:focus-visible { outline: 3px solid rgba(25, 94, 207, .22); outline-offset: 2px; }
.review-work-option.is-selected { border-color: #5d91e7; background: #f2f7ff; box-shadow: inset 0 0 0 1px rgba(25, 94, 207, .12); }
.review-work-cover { width: 68px; height: 90px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #edf2f8; color: #7890b0; }
.review-work-cover img { width: 100%; height: 100%; object-fit: cover; }
.review-work-cover svg { width: 22px; height: 22px; }
.review-work-copy { min-width: 0; display: grid; gap: 6px; }
.review-work-copy strong { display: -webkit-box; overflow: hidden; color: var(--v3-ink); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.review-work-copy em, .review-work-copy small { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.review-work-check { min-width: 48px; min-height: 28px; padding: 0 9px; display: grid; place-items: center; border-radius: 9px; background: #f1f5f9; color: #64748b; font-size: 9px; font-weight: 850; }
.review-work-option.is-selected .review-work-check { background: var(--v3-primary); color: #fff; }
.review-selected-snapshot { margin-top: 14px; padding: 17px; border: 1px solid #cfe0f8; border-radius: 15px; background: #f7faff; }
.review-selected-snapshot > header { margin-bottom: 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.review-selected-snapshot h3 { margin: 5px 0 0; color: var(--v3-ink); font-size: 15px; }
.review-selected-snapshot > header > span, .review-selected-snapshot > p { color: var(--v3-muted); font-size: 10px; }
.review-selected-snapshot > p { margin: 12px 0 0; line-height: 1.55; }
.review-auto-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.review-auto-metrics > span { min-width: 0; padding: 11px; display: grid; gap: 4px; border: 1px solid #e1eaf6; border-radius: 11px; background: #fff; }
.review-auto-metrics small { color: var(--v3-muted); font-size: 9px; }
.review-auto-metrics strong { overflow: hidden; color: var(--v3-ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.review-agent-cta { margin-top: 16px; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--v3-line); }
.review-agent-cta > div { display: grid; gap: 4px; }
.review-agent-cta strong { color: var(--v3-ink); font-size: 12px; }
.review-agent-cta span { color: var(--v3-muted); font-size: 10px; line-height: 1.55; }
.review-agent-cta .v3-btn { min-width: 168px; min-height: 44px; }
.review-agent-progress { margin: 0 0 14px; padding: 15px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid #cfe0f8; border-radius: 14px; background: #f4f8ff; }
.review-agent-progress > div:nth-child(2) { display: grid; gap: 4px; }
.review-agent-progress span { color: var(--v3-primary); font-size: 9px; font-weight: 850; }
.review-agent-progress strong { color: var(--v3-ink); font-size: 13px; }
.review-agent-progress p { margin: 0; color: var(--v3-muted); font-size: 10px; line-height: 1.5; }
.review-agent-progress > b { color: var(--v3-primary); font-size: 12px; }
.review-agent-orbit { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--v3-primary); color: #fff; }
.review-agent-orbit svg { width: 22px; height: 22px; animation: review-agent-pulse 1.5s ease-in-out infinite; }
.review-agent-progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: #dce8f8; }
.review-agent-progress-track i { height: 100%; display: block; border-radius: inherit; background: var(--v3-primary); transition: width .35s ease; }
.review-agent-progress.is-failed, .review-agent-progress.is-cancelled { border-color: #efc8cb; background: #fff7f7; }
.review-agent-progress.is-failed .review-agent-orbit, .review-agent-progress.is-cancelled .review-agent-orbit { background: #a4474d; }
.review-agent-progress.is-succeeded { border-color: #c9e3d2; background: #f5fbf7; }
.review-agent-progress.is-succeeded .review-agent-orbit { background: #3d7d55; }
@keyframes review-agent-pulse { 0%, 100% { transform: scale(.9) rotate(-8deg); opacity: .75; } 50% { transform: scale(1.08) rotate(8deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .review-agent-orbit svg { animation: none; } .review-work-option { transition: none; } }
@media (max-width: 980px) {
  .review-work-options { grid-template-columns: 1fr; }
  .review-auto-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .review-agent-create { padding: 16px; }
  .review-agent-create > header, .review-account-wide, .review-work-picker-head, .review-agent-cta { align-items: stretch; flex-direction: column; }
  .review-auto-steps { grid-template-columns: 1fr; }
  .review-auto-steps span { justify-content: flex-start; }
  .review-auto-steps span + span { border-top: 1px solid var(--v3-line); border-left: 0; }
  .review-work-option { grid-template-columns: 58px minmax(0, 1fr); }
  .review-work-cover { width: 58px; height: 78px; }
  .review-work-check { grid-column: 2; justify-self: start; }
  .review-auto-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-agent-progress { grid-template-columns: 40px minmax(0, 1fr); }
  .review-agent-progress > b, .review-agent-progress > button { grid-column: 1 / -1; }
  .review-account-wide .v3-btn, .review-agent-cta .v3-btn { width: 100%; }
}

/* Compact processing drawer: visible status without taking over the material page. */
.v3-shell .task-monitor {
  margin: 0 0 16px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6dfeb;
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  color: var(--v3-ink);
  box-shadow: 0 12px 30px rgba(78, 48, 59, .07);
}
.task-monitor-header {
  min-height: 66px;
  padding: 12px 14px 12px 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 320px) 38px;
  align-items: center;
  gap: 16px;
  background: linear-gradient(100deg, #ffffff, #f8fafc);
}
.task-monitor-summary { min-width: 0; display: flex; align-items: center; gap: 11px; }
.task-monitor-summary > div { min-width: 0; display: grid; gap: 3px; }
.task-monitor-summary strong { color: var(--v3-ink); font-size: 14px; }
.task-monitor-summary small { color: var(--v3-muted); font-size: 11px; }
.task-live-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5b8a6d;
  box-shadow: 0 0 0 0 rgba(91, 138, 109, .35);
  animation: taskLivePulse 1.8s ease-out infinite;
}
.task-monitor-total { min-width: 0; display: flex; align-items: center; gap: 10px; }
.task-monitor-total > span { height: 7px; flex: 1; overflow: hidden; border-radius: 999px; background: var(--v3-line); }
.task-monitor-total i { height: 100%; display: block; border-radius: inherit; background: var(--v3-gradient); transition: width .35s ease; }
.task-monitor-total b { min-width: 34px; color: var(--v3-primary); font-size: 12px; text-align: right; }
.task-monitor-toggle {
  border-radius: 50%;
}
.v3-shell .task-monitor-list {
  max-height: 520px;
  padding: 4px 14px 14px;
  overflow: auto;
  display: grid;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
}
.v3-shell .task-monitor-list[hidden] { display: none; }
.v3-shell .task-card {
  padding: 11px 12px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.v3-shell .task-card:first-child { margin-top: 8px; }
.v3-shell .task-head { align-items: center; }
.v3-shell .task-head strong { min-width: 0; overflow: hidden; color: #334155; font-size: 12px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.v3-shell .task-head span { flex: 0 0 auto; color: var(--v3-primary); font-size: 11px; font-weight: 800; }
.v3-shell .task-card .progress { height: 6px; margin-top: 8px; border: 0; background: #f1f5f9; }
.v3-shell .task-card .progress div { position: relative; overflow: hidden; background: linear-gradient(90deg, #475569, #8295bb); }
.v3-shell .task-card.is-running .progress div::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.55) 48%, transparent 70%);
  transform: translateX(-100%);
  animation: taskBarShimmer 1.7s linear infinite;
}
.v3-shell .task-card .progress.is-indeterminate div { animation: taskQueueSlide 1.45s ease-in-out infinite; }
.v3-shell .task-meta { margin-top: 6px; color: #64748b; font-size: 10px; }
.task-live-dot.is-warning { background: #d74747; box-shadow: 0 0 0 0 rgba(215, 71, 71, .28); }
.task-live-dot.is-complete { background: #4fa876; animation: none; }
.v3-shell .task-monitor.has-attention { border-color: #efc0c0; }
.v3-shell .task-card.is-failed,
.v3-shell .task-card.is-capacity { border-color: #efc0c0; background: #fffafa; }
.v3-shell .task-card.is-completed { border-color: #cfe7d9; background: #fbfffc; }
.v3-shell .task-card.is-failed .task-head span,
.v3-shell .task-card.is-capacity .task-head span { color: #c83232; }
.v3-shell .task-card.is-completed .task-head span { color: #317b50; }
.task-dual-progress { margin-top: 9px; display: grid; gap: 7px; }
.task-dual-progress > div { display: grid; grid-template-columns: 66px minmax(80px, 1fr) 54px; align-items: center; gap: 8px; }
.task-dual-progress span,
.task-dual-progress b { color: #64748b; font-size: 9px; font-weight: 750; }
.task-dual-progress b { text-align: right; }
.task-dual-progress .progress { margin: 0 !important; }
.task-card.is-failed .task-dual-progress > div:last-child .progress div,
.task-card.is-capacity .task-dual-progress > div:last-child .progress div { background: #d74747; }
.task-card.is-completed .progress div { background: #4fa876; }
.task-failure-reason { margin-top: 7px; padding: 7px 9px; display: flex; gap: 7px; border-radius: 8px; background: #ffecec; color: #a73333; font-size: 9px; line-height: 1.5; }
.task-failure-reason strong { flex: 0 0 auto; }
@keyframes taskLivePulse { 70% { box-shadow: 0 0 0 8px rgba(91, 138, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 138, 109, 0); } }
@keyframes taskBarShimmer { to { transform: translateX(100%); } }
@keyframes taskQueueSlide { 0%, 100% { transform: translateX(-85%); } 50% { transform: translateX(195%); } }
@media (prefers-reduced-motion: reduce) {
  .task-live-dot, .v3-shell .task-card .progress div, .v3-shell .task-card .progress div::after { animation: none !important; }
}

@media (max-width: 900px) {
  .review-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-chart-grid { grid-template-columns: 1fr; }
  .operation-scope-bar { align-items: flex-start; flex-direction: column; gap: 6px; }
}
@media (max-width: 620px) {
  .operation-scope-bar label, .operation-scope-bar select { width: 100%; }
  .review-summary-grid { grid-template-columns: 1fr 1fr; }
  .review-action-hero { grid-template-columns: 1fr; padding: 18px; }
  .review-completeness { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 13px; justify-items: start; text-align: left; }
  .review-progress-ring { grid-row: 1 / 3; width: 82px; }
  .review-progress-ring strong { font-size: 19px; }
  .review-completeness > strong { margin-top: 0; align-self: end; }
  .review-completeness > p { align-self: start; text-align: left; }
  .review-ranking-row { grid-template-columns: minmax(0, 1fr) 32px; }
  .review-ranking-track { grid-column: 1 / -1; grid-row: 2; }
  .review-result-card > header { flex-direction: column; }
  .review-visible-conclusion { grid-template-columns: 1fr; }
  .review-account-lock { align-items: flex-start; flex-direction: column; }
  .review-account-lock em { margin-left: 0; }
  .task-monitor-header { grid-template-columns: minmax(0, 1fr) 36px; gap: 10px; }
  .task-monitor-total { grid-column: 1 / -1; grid-row: 2; }
  .task-monitor-toggle { grid-column: 2; grid-row: 1; }
  .library-storage-alert { align-items: stretch; flex-direction: column; }
  .library-storage-alert button { width: 100%; }
  .task-dual-progress > div { grid-template-columns: 60px minmax(60px, 1fr) 48px; }
}
.v3-topbar-heading {
  position: relative;
}

.v3-back-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d6dfeb;
  background: linear-gradient(145deg, #fff, #f8fafc);
  color: var(--v3-primary, #475569);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  margin: 0 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(77, 45, 57, .08);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.v3-back-button .ui-icon { width: 18px; height: 18px; stroke-width: 2.25; }

.v3-back-button:hover {
  transform: translateX(-2px);
  border-color: #94a3b8;
  background: var(--v3-primary-soft, #f1f5f9);
  color: #475569;
  box-shadow: 0 9px 20px rgba(77, 45, 57, .12);
}

/* Interactive account trend studio */
.v3-shell .account-traffic-panel {
  position: relative;
  margin: 22px 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 4%, rgba(122, 64, 88, .08), transparent 28%),
    linear-gradient(145deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 18px 48px rgba(79, 43, 57, .06);
}
.v3-shell .account-traffic-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25px;
  width: 3px;
  height: 34px;
  border-radius: 0 4px 4px 0;
  background: var(--v3-primary);
}
.v3-shell .traffic-head { position: relative; margin-bottom: 18px; }
.v3-shell .traffic-head .section-title {
  margin: 0;
  color: #1e293b;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.v3-shell .traffic-head p { margin-top: 7px; color: #64748b; line-height: 1.65; }
.v3-shell .account-data-source-note,
.v3-shell .account-data-empty-note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: #f6f9fd;
  color: #52647c;
  line-height: 1.55;
}
.v3-shell .account-data-source-note strong,
.v3-shell .account-data-empty-note strong { flex: none; color: #263b58; }
.v3-shell .account-data-unavailable { min-height: 190px; }
.v3-shell .account-data-unavailable .account-data-empty-note {
  margin: 26px 0 0;
  border-style: dashed;
  background: rgba(246, 249, 253, .82);
}
.v3-shell .traffic-tabs {
  gap: 3px;
  padding: 4px;
  border-color: #e7edf5;
  background: rgba(255, 255, 255, .76);
}
.v3-shell .traffic-tabs button {
  min-width: 78px;
  height: 34px;
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.v3-shell .traffic-tabs button:hover { color: var(--v3-primary); transform: translateY(-1px); }
.v3-shell .traffic-tabs button.active {
  background: linear-gradient(135deg, #475569, #475569);
  color: #fff;
  box-shadow: 0 7px 16px rgba(111, 55, 79, .2);
}
.v3-shell .traffic-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.v3-shell .traffic-summary > div {
  position: relative;
  min-height: 94px;
  padding: 14px 15px;
  overflow: hidden;
  border-color: #e7edf5;
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.v3-shell .traffic-summary > div:hover {
  transform: translateY(-2px);
  border-color: #d6dfeb;
  box-shadow: 0 10px 24px rgba(92, 48, 66, .08);
}
.v3-shell .traffic-summary > div::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(122, 64, 88, .055);
}
.v3-shell .traffic-summary strong {
  margin: 8px 0 4px;
  color: #1e293b;
  font-size: 28px;
  letter-spacing: -.035em;
}
.v3-shell .trend-chart-card {
  padding: 0;
  overflow: hidden;
  border-color: #e7edf5;
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
}
.v3-shell .traffic-chart-toolbar {
  display: grid;
  grid-template-columns: minmax(145px, .7fr) minmax(360px, 1.6fr) minmax(130px, .6fr);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(90deg, #fff, #f8fafc);
}
.v3-shell .traffic-chart-toolbar > div:first-child span,
.v3-shell .traffic-chart-toolbar > div:first-child strong { display: block; }
.v3-shell .traffic-chart-toolbar > div:first-child span {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.v3-shell .traffic-chart-toolbar > div:first-child strong {
  margin-top: 3px;
  color: #334155;
  font-size: 15px;
}
.v3-shell .traffic-chart-toolbar > em {
  justify-self: end;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}
.v3-shell .traffic-metric-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.v3-shell .traffic-metric-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.v3-shell .traffic-metric-tabs button i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--metric-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--metric-color) 14%, transparent);
}
.v3-shell .traffic-metric-tabs button:hover {
  transform: translateY(-1px);
  color: #334155;
  background: #f8fafc;
}
.v3-shell .traffic-metric-tabs button.active {
  border-color: #d6dfeb;
  background: #fff;
  color: #334155;
  box-shadow: 0 5px 13px rgba(96, 51, 70, .09);
}
.v3-shell .traffic-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 352px;
}
.v3-shell .traffic-chart-main {
  min-width: 0;
  padding: 14px 16px 10px;
  background:
    linear-gradient(rgba(122, 64, 88, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 64, 88, .018) 1px, transparent 1px);
  background-size: 30px 30px;
}
.v3-shell .traffic-chart-stage { min-height: 315px; }
.v3-shell .traffic-month-chart { position: relative; }
.v3-shell .trend-chart-svg { height: 315px; overflow: visible; }
.v3-shell .traffic-grid line { stroke: #f1f5f9; stroke-width: 1; stroke-dasharray: 3 7; }
.v3-shell .traffic-grid text { fill: #64748b; font-size: 10px; }
.v3-shell .traffic-area {
  fill: url(#trafficMetricFill);
  opacity: 0;
  animation: trafficAreaReveal .65s .25s ease forwards;
}
.v3-shell .traffic-line {
  fill: none;
  stroke: var(--metric-color);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  filter: drop-shadow(0 5px 9px color-mix(in srgb, var(--metric-color) 22%, transparent));
  animation: trafficLineDraw .95s cubic-bezier(.2, .75, .25, 1) forwards;
}
.v3-shell .traffic-selected-guide {
  stroke: color-mix(in srgb, var(--metric-color) 35%, transparent);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  animation: trafficFadeIn .25s ease both;
}
.v3-shell .traffic-point { outline: none; cursor: pointer; }
.v3-shell .traffic-point-hit { fill: transparent; }
.v3-shell .traffic-point-dot {
  fill: #fff;
  stroke: var(--metric-color);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: trafficPointPop .34s .5s ease both;
  transition: r .18s ease, fill .18s ease;
}
.v3-shell .traffic-point:hover .traffic-point-dot,
.v3-shell .traffic-point:focus .traffic-point-dot,
.v3-shell .traffic-point.is-selected .traffic-point-dot {
  fill: var(--metric-color);
  stroke: #fff;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--metric-color) 48%, transparent));
}
.v3-shell .trend-chart-svg .axis-labels text { fill: #64748b; font-size: 10px; }
.v3-shell .traffic-week-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(62px, 1fr));
  align-items: end;
  gap: 11px;
  min-height: 315px;
  padding: 16px 8px 4px;
}
.v3-shell .traffic-week-column {
  display: grid;
  grid-template-rows: 24px 210px auto auto;
  gap: 6px;
  min-width: 0;
  padding: 0 8px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.v3-shell .traffic-week-column:hover,
.v3-shell .traffic-week-column:focus,
.v3-shell .traffic-week-column.is-selected {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--metric-color) 28%, #eee);
  background: color-mix(in srgb, var(--metric-soft) 28%, #fff);
  outline: none;
}
.v3-shell .traffic-week-value {
  align-self: end;
  color: var(--metric-color);
  font-size: 11px;
  font-weight: 850;
  opacity: 0;
  animation: trafficFadeIn .3s .45s ease forwards;
}
.v3-shell .traffic-week-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(122, 64, 88, .025), rgba(122, 64, 88, .07));
}
.v3-shell .traffic-week-track i {
  width: 64%;
  height: var(--bar-height);
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--metric-color), color-mix(in srgb, var(--metric-color) 72%, #fff));
  transform: scaleY(0);
  transform-origin: bottom;
  animation: trafficBarGrow .65s cubic-bezier(.2, .8, .25, 1) forwards;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--metric-color) 20%, transparent);
}
.v3-shell .traffic-week-track b {
  position: absolute;
  bottom: 7px;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  color: #fff;
  font-size: 9px;
  white-space: nowrap;
}
.v3-shell .traffic-week-column strong { font-size: 12px; }
.v3-shell .traffic-week-column em { color: #64748b; font-size: 9px; font-style: normal; }
.v3-shell .traffic-posts-chart { display: grid; gap: 7px; padding: 4px 0; }
.v3-shell .traffic-rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.v3-shell .traffic-rank-row:hover,
.v3-shell .traffic-rank-row:focus,
.v3-shell .traffic-rank-row.is-selected {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--metric-color) 26%, #eee);
  background: color-mix(in srgb, var(--metric-soft) 24%, #fff);
  outline: none;
}
.v3-shell .traffic-rank-no { color: #94a3b8; font: 800 12px/1.2 "SFMono-Regular", Consolas, monospace; }
.v3-shell .traffic-rank-main { min-width: 0; }
.v3-shell .traffic-rank-main > strong {
  display: block;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-shell .traffic-rank-main > i {
  display: block;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}
.v3-shell .traffic-rank-main > i b {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--metric-color) 68%, #fff), var(--metric-color));
  transform: scaleX(0);
  transform-origin: left;
  animation: trafficRankGrow .55s cubic-bezier(.2, .8, .25, 1) forwards;
}
.v3-shell .traffic-rank-value { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; }
.v3-shell .traffic-rank-value strong { color: var(--metric-color); font-size: 16px; }
.v3-shell .traffic-rank-value em { color: #64748b; font-size: 9px; font-style: normal; }
.v3-shell .traffic-empty-chart { display: grid; min-height: 280px; place-items: center; color: #64748b; }
.v3-shell .traffic-detail-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 19px;
  border-left: 1px solid #e7edf5;
  background: linear-gradient(155deg, #f8fafc, #fff);
  animation: trafficDetailIn .28s ease both;
}
.v3-shell .traffic-detail-card > div:first-child > span,
.v3-shell .traffic-detail-card > div:first-child > strong,
.v3-shell .traffic-detail-card > div:first-child > em { display: block; }
.v3-shell .traffic-detail-card > div:first-child > span {
  color: var(--v3-primary);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.v3-shell .traffic-detail-card > div:first-child > strong {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.v3-shell .traffic-detail-card > div:first-child > em {
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
}
.v3-shell .traffic-detail-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
.v3-shell .traffic-detail-card dl span {
  padding: 9px 10px;
  border: 1px solid #e7edf5;
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
}
.v3-shell .traffic-detail-card dl span.is-primary { border-color: #d6dfeb; background: #f1f5f9; }
.v3-shell .traffic-detail-card dt { color: #64748b; font-size: 9px; }
.v3-shell .traffic-detail-card dd { margin: 4px 0 0; color: #334155; font-size: 16px; font-weight: 900; }
.v3-shell .traffic-detail-works {
  display: grid;
  gap: 6px;
  max-height: 144px;
  overflow: auto;
}
.v3-shell .traffic-detail-works a,
.v3-shell .traffic-detail-works > div {
  display: block;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .76);
  color: #334155;
  text-decoration: none;
}
.v3-shell .traffic-detail-works a:hover { background: #eef2f6; }
.v3-shell .traffic-detail-works span,
.v3-shell .traffic-detail-works em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-shell .traffic-detail-works span { font-size: 10px; font-weight: 800; }
.v3-shell .traffic-detail-works em { margin-top: 3px; color: #64748b; font-size: 8px; font-style: normal; }
.v3-shell .traffic-detail-card > .v3-btn { margin-top: auto; text-align: center; text-decoration: none; }

@keyframes trafficLineDraw { to { stroke-dashoffset: 0; } }
@keyframes trafficAreaReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes trafficPointPop { from { opacity: 0; transform: scale(.25); } to { opacity: 1; transform: scale(1); } }
@keyframes trafficBarGrow { to { transform: scaleY(1); } }
@keyframes trafficRankGrow { to { transform: scaleX(1); } }
@keyframes trafficDetailIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes trafficFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1180px) {
  .v3-shell .traffic-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v3-shell .traffic-chart-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .v3-shell .traffic-chart-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .v3-shell .traffic-chart-toolbar > em { justify-self: start; }
  .v3-shell .traffic-metric-tabs { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .v3-shell .account-traffic-panel { padding: 16px; border-radius: 14px; }
  .v3-shell .traffic-chart-layout { grid-template-columns: 1fr; }
  .v3-shell .traffic-detail-card { border-top: 1px solid #e7edf5; border-left: 0; }
  .v3-shell .traffic-week-chart { gap: 5px; overflow-x: auto; }
  .v3-shell .traffic-week-column { min-width: 70px; }
}
@media (max-width: 560px) {
  .v3-shell .traffic-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-shell .traffic-tabs { width: 100%; }
  .v3-shell .traffic-tabs button { flex: 1; min-width: 0; }
  .v3-shell .traffic-metric-tabs button { padding: 0 8px; }
  .v3-shell .traffic-rank-row { grid-template-columns: 28px minmax(0, 1fr) 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-shell .traffic-area,
  .v3-shell .traffic-line,
  .v3-shell .traffic-point-dot,
  .v3-shell .traffic-week-value,
  .v3-shell .traffic-week-track i,
  .v3-shell .traffic-rank-main > i b,
  .v3-shell .traffic-detail-card {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* Knowledge manager reading workspace */
.v3-shell .knowledge-category-tabs {
  position: relative;
  top: auto;
  z-index: auto;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: var(--v3-shadow);
  backdrop-filter: none;
}
.v3-shell .knowledge-manager-grid {
  align-items: start;
  transition: grid-template-columns .24s ease;
}
.v3-shell .knowledge-list-panel {
  position: sticky;
  top: 18px;
  height: min(760px, calc(100vh - 36px));
  min-height: 520px;
  padding: 10px;
  overflow: hidden;
}
.v3-shell .knowledge-directory-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid #f1f5f9;
}
.v3-shell .knowledge-directory-head > strong {
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-shell .knowledge-directory-head > em {
  color: #64748b;
  font-size: 9px;
  font-style: normal;
}
.v3-shell .knowledge-directory-toggle {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--v3-primary);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.v3-shell .knowledge-directory-toggle:hover {
  transform: translateX(-1px);
  border-color: #b9c5d4;
  background: var(--v3-primary-soft);
}
.v3-shell .knowledge-directory-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform .24s ease;
}
.v3-shell .knowledge-directory-body {
  min-height: 0;
  padding-top: 9px;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}
.v3-shell .knowledge-list-panel {
  display: flex;
  flex-direction: column;
}
.v3-shell .knowledge-doc-list {
  min-height: 0;
  max-height: none;
  flex: 1;
  overscroll-behavior: contain;
}
.v3-shell .knowledge-editor-panel {
  min-height: 680px;
  overflow: visible;
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-list-panel {
  width: 54px;
  height: 54px;
  min-height: 0;
  grid-column: 1;
  grid-row: 1;
  z-index: 5;
  padding: 9px;
  overflow: visible;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(70, 42, 53, .1);
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-editor-panel {
  grid-column: 1;
  grid-row: 1;
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head {
  min-height: 34px;
  display: block;
  padding: 0;
  border: 0;
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head > strong,
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head > em,
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-toggle span,
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-body {
  display: none;
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-toggle svg {
  transform: rotate(180deg);
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-reader-head,
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-editor-head {
  width: min(100%, 920px);
  margin-right: auto;
  margin-left: auto;
}
.v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-document-paper {
  animation: knowledgeFocusIn .28s ease both;
}
@keyframes knowledgeFocusIn {
  from { opacity: .75; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 900px) {
  .v3-shell .knowledge-list-panel,
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-list-panel {
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    grid-column: auto;
    grid-row: auto;
    padding: 12px;
    border-radius: 14px;
    box-shadow: var(--v3-shadow);
  }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed {
    grid-template-columns: 1fr;
  }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-editor-panel {
    grid-column: auto;
    grid-row: auto;
  }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head {
    min-height: 42px;
    display: grid;
    padding-bottom: 9px;
    border-bottom: 1px solid #f1f5f9;
  }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head > strong,
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head > em,
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-body {
    display: flex;
  }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head > strong { display: block; }
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-directory-head > em { display: block; }
  .v3-shell .knowledge-directory-toggle { display: none; }
  .v3-shell .knowledge-directory-body { overflow: visible; }
  .v3-shell .knowledge-doc-list { max-height: 360px; flex: none; }
  .v3-shell .knowledge-editor-panel { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-shell .knowledge-manager-grid,
  .v3-shell .knowledge-directory-toggle,
  .v3-shell .knowledge-directory-toggle svg,
  .v3-shell .knowledge-manager-grid.is-directory-collapsed .knowledge-document-paper {
    animation: none;
    transition: none;
  }
}

/* LingSi unified component system */
.v3-shell :is(.panel, .hero-panel, .account-head, .metric-card, .user-card, .video-row, .material-row, .task, .task-card, .workflow-ledger-card, .selection-toolbar, .review-result-card, .review-chart-card, .v3-card) {
  border-color: var(--v3-line);
  background: var(--v3-surface);
  color: var(--v3-ink);
}
.v3-shell :is(.panel, .hero-panel, .account-head, .workflow-ledger-card, .review-result-card, .review-chart-card, .v3-card) {
  border-radius: var(--v3-radius);
  box-shadow: var(--v3-shadow);
}
.v3-shell :is(.panel, .hero-panel, .account-head, .metric-card, .user-card, .video-row, .material-row, .task, .task-card, .workflow-ledger-card, .selection-toolbar)::before {
  content: none;
  display: none;
}
.v3-shell :is(.panel, .hero-panel, .account-head, .metric-card, .user-card, .video-row, .material-row, .task, .task-card, .workflow-ledger-card, .selection-toolbar) {
  animation: none;
}
.v3-shell :is(.panel, .v3-card, .review-result-card, .review-chart-card):hover {
  border-color: #cbd8fa;
}
.v3-shell :is(.section-title, .v3-card h2, .review-result-card h3, .review-chart-card h3) {
  color: var(--v3-ink);
  letter-spacing: -.025em;
}
.v3-shell .section-title {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom-color: var(--v3-line);
  font-size: 14px;
  font-weight: 820;
}
.v3-shell .section-title::before {
  width: 4px;
  height: 17px;
  border-radius: 999px;
  background: var(--v3-gradient);
  box-shadow: none;
}
.v3-shell :is(.btn, .mini, .v3-btn, .v3-icon-button, .v3-status-button, .theme-toggle, .pill) {
  border: 1px solid var(--v3-line);
  border-radius: 11px;
  background: var(--v3-surface);
  color: var(--v3-ink);
  box-shadow: none;
  font-weight: 750;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.v3-shell :is(.btn, .mini, .v3-btn, .v3-icon-button, .v3-status-button, .theme-toggle, .pill):hover {
  border-color: #aabff6;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
  box-shadow: 0 7px 18px rgba(37, 99, 235, .09);
  transform: translateY(-1px);
}
.v3-shell :is(.btn.green, .btn.primary, .mini.primary, .v3-btn.primary) {
  border-color: transparent;
  background: var(--v3-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .17);
}
.v3-shell :is(.btn.green, .btn.primary, .mini.primary, .v3-btn.primary):hover {
  border-color: transparent;
  background: var(--v3-gradient);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}
.v3-shell :is(.btn.secondary, .mini, .v3-btn):not(.primary) {
  background: var(--v3-surface);
  color: var(--v3-ink);
}
.v3-shell :is(.danger-btn, .btn.danger, .mini.danger-btn) {
  border-color: color-mix(in srgb, var(--v3-bad) 30%, var(--v3-line));
  color: var(--v3-bad);
}
.v3-shell :is(input, select, textarea, .field, .select, .textarea, .video-action-select) {
  border: 1px solid var(--v3-line);
  border-radius: 11px;
  outline: 0;
  background: var(--v3-surface);
  color: var(--v3-ink);
  box-shadow: none;
}
.v3-shell :is(input, select, textarea, .field, .select, .textarea, .video-action-select):focus {
  border-color: var(--v3-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
}
.v3-shell :is(input, textarea)::placeholder { color: #94a3b8; }
.v3-shell :is(.tag, .badge, .pill, .value-badge, .v3-count-chip, .review-type-badge, .review-status-badge) {
  border-color: transparent;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
}
.v3-shell :is(.notice, .empty, .v3-empty, .review-friendly-empty) {
  border-color: var(--v3-line);
  border-radius: 14px;
  background: var(--v3-surface-soft);
  color: var(--v3-muted);
}
.v3-shell :is(table, .table) { color: var(--v3-ink); }
.v3-shell :is(th, .table-head) {
  border-color: var(--v3-line);
  background: var(--v3-surface-soft);
  color: var(--v3-muted);
}
.v3-shell :is(td, tr, .table-row) { border-color: var(--v3-line); }
.v3-shell tr:hover td { background: color-mix(in srgb, var(--v3-primary-soft) 58%, var(--v3-surface)); }
.v3-shell :is(.kpi, .account-status-strip > div, .workflow-ledger-summary > div, .review-performance span) {
  border-color: var(--v3-line);
  background: var(--v3-surface-soft);
  color: var(--v3-muted);
}
.v3-shell :is(.kpi strong, .metric-card strong, .account-status-strip strong, .workflow-ledger-summary strong, .review-performance strong) {
  color: var(--v3-ink);
}
.v3-shell :is(.progress, .v3-progress-list i, .review-ranking-track, .review-decision-row > div) {
  background: #e8edf7;
}
.v3-shell :is(.progress > div, .v3-progress-list b, .review-ranking-track i) {
  background: var(--v3-gradient);
}
.v3-shell :is(.modal-card, .toast) {
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius);
  background: var(--v3-surface);
  color: var(--v3-ink);
  box-shadow: var(--v3-shadow-strong);
}
.v3-shell .review-action-hero {
  border-color: var(--v3-line);
  border-left-color: var(--review-accent);
  background:
    radial-gradient(circle at 92% 8%, rgba(124, 58, 237, .08), transparent 27%),
    linear-gradient(135deg, var(--v3-surface) 0%, var(--v3-surface-soft) 100%);
  box-shadow: var(--v3-shadow);
}
.v3-shell .review-next-action,
.v3-shell .review-visible-conclusion section,
.v3-shell .review-chart-note,
.v3-shell .review-full-detail > div {
  background: var(--v3-surface-soft);
}
.v3-shell .review-progress-ring::after { background: var(--v3-surface); box-shadow: inset 0 0 0 1px var(--v3-line); }
.v3-shell :is(.v3-text-link, .review-full-detail summary, a) { color: var(--v3-primary); }
.v3-shell :focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}
.v3-shell .v3-topbar {
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--v3-line) 70%, transparent);
}
.v3-shell .v3-page-intro,
.v3-shell .v3-dashboard-head {
  position: relative;
}
.v3-shell .v3-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--v3-primary);
}
.v3-shell .v3-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--v3-gradient);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

:root[data-theme="dark"] .v3-shell {
  background:
    radial-gradient(circle at 82% -4%, rgba(59, 130, 246, .15), transparent 30%),
    radial-gradient(circle at 98% 25%, rgba(124, 58, 237, .10), transparent 24%),
    var(--v3-bg);
}
:root[data-theme="dark"] .v3-sidebar {
  background: rgba(10, 18, 35, .94);
}
:root[data-theme="dark"] .v3-brand-mark {
  border-color: rgba(96, 165, 250, .22);
  background: #0d1730;
}
:root[data-theme="dark"] .v3-sidebar .nav button,
:root[data-theme="dark"] .v3-sidebar .nav-item { color: #cbd5e1; }
:root[data-theme="dark"] .v3-sidebar .nav button:hover,
:root[data-theme="dark"] .v3-sidebar .nav-item:hover { background: rgba(59, 130, 246, .12); color: #93c5fd; }
:root[data-theme="dark"] .v3-shell :is(.panel, .hero-panel, .account-head, .metric-card, .user-card, .video-row, .material-row, .task, .task-card, .workflow-ledger-card, .selection-toolbar, .review-result-card, .review-chart-card, .v3-card, .modal-card, .toast) {
  background: var(--v3-surface);
  color: var(--v3-ink);
}
:root[data-theme="dark"] .v3-shell :is(.progress, .v3-progress-list i, .review-ranking-track, .review-decision-row > div) {
  background: rgba(148, 163, 184, .16);
}
:root[data-theme="dark"] .v3-shell :is(input, select, textarea, .field, .select, .textarea, .video-action-select) {
  background: var(--v3-surface-soft);
}

/* LingSi comfort palette pass */
:root {
  --v3-good: #39775c;
  --v3-warn: #956b2b;
  --v3-bad: #b85a65;
  --v3-success-soft: #f0f7f3;
  --v3-warning-soft: #fbf7ec;
  --v3-danger-soft: #fff3f4;
  --v3-info-soft: #f2f6fb;
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .v3-board-column,
  .v3-board-item,
  .v3-simple-opportunities > article,
  .v3-account-group,
  .monitor-account-item,
  .monitor-inspiration-item,
  .comment-preview-card,
  .comment-topic-card,
  .comment-item,
  .knowledge-doc-item,
  .knowledge-trash article,
  .knowledge-document-paper,
  .production-knowledge-item,
  .review-chart-card,
  .review-result-card,
  .task-card,
  .traffic-summary > div,
  .traffic-chart-main,
  .traffic-detail-card
) {
  border-color: var(--v3-line);
  background-color: var(--v3-surface);
  color: var(--v3-ink);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .v3-board-column,
  .comment-replies,
  .knowledge-file-meta,
  .review-chart-note,
  .review-visible-conclusion section,
  .review-full-detail > div,
  .review-account-lock,
  .traffic-chart-toolbar,
  .traffic-detail-card dl span,
  .knowledge-reader-section.lead,
  .knowledge-reader-section.primary
) {
  border-color: var(--v3-line);
  background: var(--v3-surface-soft);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .comment-item,
  .comment-replies,
  .knowledge-reader-section h2,
  .knowledge-table-wrap td,
  .review-full-detail,
  .task-monitor-list,
  .traffic-chart-toolbar,
  .knowledge-directory-head
) {
  border-color: var(--v3-line);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .knowledge-document-paper p,
  .knowledge-document-paper ol,
  .knowledge-table-wrap td,
  .review-next-action p,
  .review-visible-conclusion p,
  .review-full-detail p,
  .task-head strong,
  .traffic-chart-toolbar strong,
  .traffic-detail-card dd
) {
  color: var(--v3-ink);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .v3-flow-card button span,
  .v3-board-empty,
  .task-meta,
  .traffic-head p,
  .traffic-grid text,
  .traffic-week-column em,
  .traffic-rank-no,
  .traffic-rank-value em,
  .traffic-empty-chart,
  .traffic-detail-card dt,
  .traffic-detail-works em
) {
  color: var(--v3-muted);
  fill: var(--v3-muted);
}
:root:not([data-theme="dark"]) .v3-shell .v3-simple-opportunities > article.is-ready,
:root:not([data-theme="dark"]) .v3-shell .production-knowledge-item,
:root:not([data-theme="dark"]) .v3-shell .production-board-link:hover .v3-board-item {
  border-color: #cbd8e7;
  background: linear-gradient(90deg, var(--v3-surface), var(--v3-info-soft));
}
:root:not([data-theme="dark"]) .v3-shell .knowledge-reader-section.highlight {
  border-color: #d7e1ee;
  border-left-color: var(--v3-primary);
  background: linear-gradient(100deg, var(--v3-info-soft), var(--v3-surface));
}
:root:not([data-theme="dark"]) .v3-shell .knowledge-document-paper :is(code, pre) {
  border-color: var(--v3-line);
  background: #edf2f7;
  color: #415a77;
}
:root:not([data-theme="dark"]) .v3-shell .knowledge-document-paper blockquote {
  border-left-color: #8ca3c2;
  background: #f6f8fc;
  color: #475569;
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .review-ranking-track,
  .review-decision-row > div,
  .task-card .progress,
  .traffic-rank-main > i
) {
  background: #e8edf4;
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .review-ranking-track i,
  .task-card .progress div,
  .traffic-rank-main > i b
) {
  background: var(--v3-gradient);
}
:root:not([data-theme="dark"]) .v3-shell .traffic-grid line {
  stroke: #e2e8f0;
}
:root:not([data-theme="dark"]) .v3-shell .traffic-detail-card dl span.is-primary,
:root:not([data-theme="dark"]) .v3-shell .traffic-rank-row.is-selected,
:root:not([data-theme="dark"]) .v3-shell .traffic-week-column.is-selected {
  border-color: #cbd8e7;
  background: var(--v3-info-soft);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .review-type-badge,
  .review-status-badge,
  .review-decision.is-pending,
  .library-stage-badge
) {
  background: #eef2f6;
  color: #52647a;
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .review-type-badge.is-data,
  .review-status-badge,
  .review-decision.is-pursue,
  .library-stage-badge.stage-imported,
  .library-component.is-ready
) {
  background: var(--v3-success-soft);
  color: var(--v3-good);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .review-decision.is-angle,
  .library-source-badge.source-monitor,
  .library-source-badge.source-unassigned
) {
  background: var(--v3-warning-soft);
  color: var(--v3-warn);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .review-decision.is-stop,
  .library-quarantine-notice,
  .monitor-auth-warning
) {
  border-color: #efd9dc;
  background: var(--v3-danger-soft);
  color: var(--v3-bad);
}
:root:not([data-theme="dark"]) .v3-shell :is(
  .traffic-tabs button.active,
  .traffic-metric-tabs button.active
) {
  border-color: transparent;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
  box-shadow: none;
}
:root:not([data-theme="dark"]) .v3-shell .account-traffic-panel::before {
  opacity: .42;
  filter: saturate(.72);
}
:root:not([data-theme="dark"]) .v3-shell :is(.review-action-hero, .account-traffic-panel) {
  box-shadow: var(--v3-shadow);
}
:root:not([data-theme="dark"]) .v3-shell .review-action-hero {
  background:
    radial-gradient(circle at 92% 8%, rgba(63, 111, 175, .055), transparent 27%),
    linear-gradient(135deg, var(--v3-surface) 0%, var(--v3-surface-soft) 100%);
}
:root[data-theme="dark"] {
  --v3-good: #73c69f;
  --v3-warn: #d8b56c;
  --v3-bad: #e58a96;
  --v3-success-soft: rgba(74, 222, 164, .11);
  --v3-warning-soft: rgba(245, 198, 106, .11);
  --v3-danger-soft: rgba(251, 113, 133, .11);
  --v3-info-soft: rgba(96, 165, 250, .10);
}

/* LingSi blue command center */
:root {
  --v3-bg: #f4f6f9;
  --v3-surface: #ffffff;
  --v3-surface-soft: #f7f9fc;
  --v3-ink: #111827;
  --v3-muted: #667085;
  --v3-line: #e5e9f0;
  --v3-primary: #0b4fc4;
  --v3-primary-2: #083a91;
  --v3-primary-soft: #eaf2ff;
  --v3-gradient: linear-gradient(135deg, #0b4fc4 0%, #0b4fc4 100%);
  --v3-shadow: none;
  --v3-shadow-strong: 0 20px 48px rgba(17, 24, 39, .14);
  --v3-radius: 16px;
  --bg: #f4f6f9;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --panel-soft: #eef3f9;
  --line: #e5e9f0;
  --muted: #667085;
  --text: #111827;
  --soft: #344054;
  --accent: #0b4fc4;
  --accent-2: #083a91;
  --cyan: #0b4fc4;
  --violet: #0b4fc4;
}

.v3-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--v3-bg);
}
.v3-shell .v3-sidebar {
  padding: 26px 16px 18px;
  gap: 22px;
  border-right: 1px solid var(--v3-line);
  background: #fff;
  backdrop-filter: none;
}
:root[data-theme="light"] .v3-shell .v3-sidebar {
  background: #fff;
  box-shadow: none;
}
.v3-sidebar .brand { padding: 0 8px; gap: 11px; }
.v3-brand-mark {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.v3-brand-mark img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
}
:root[data-theme="dark"] .v3-shell .v3-brand-mark { background: #fff; }
.v3-sidebar .brand-title {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #101828;
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -.025em;
  line-height: 1.3;
}
.v3-sidebar .brand-title span {
  margin-left: 0;
  color: #6867d9;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .015em;
}
.v3-sidebar .brand-sub { color: #98a2b3; font-size: 10px; }
.v3-account-switcher { padding: 0 4px; }
.v3-account-mini {
  min-height: 62px;
  padding: 10px 12px;
  border-color: transparent;
  border-radius: 12px;
  background: #f7f9fc;
}
.v3-account-mini:hover { border-color: #d9e4f4; background: #f2f6fb; }
.v3-account-mini span { color: #98a2b3; }
.v3-account-mini strong { color: #101828; font-size: 13px; }
.v3-account-mini em { color: var(--v3-primary); font-size: 10px; }
.v3-sidebar .nav { gap: 20px; }
.v3-sidebar .nav-section { gap: 4px; }
.v3-sidebar .nav-title,
.v3-sidebar .nav-section-title {
  padding: 0 10px 5px;
  color: #98a2b3;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .12em;
}
.v3-sidebar .nav button,
.v3-sidebar .nav-item {
  min-height: 42px;
  padding: 0 10px;
  gap: 10px;
  border-radius: 10px;
  color: #475467;
  font-size: 13px;
}
.v3-sidebar .nav button:hover,
.v3-sidebar .nav-item:hover {
  background: #f3f6fa;
  color: #1d2939;
  transform: none;
}
.v3-sidebar .nav button.active,
.v3-sidebar .nav-item.active,
:root[data-theme="light"] .v3-sidebar .nav button.active {
  background: #eaf2ff;
  color: var(--v3-primary);
  box-shadow: none;
}
.v3-sidebar .nav .nav-icon {
  width: 28px;
  height: 28px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
  color: #667085;
}
.v3-sidebar .nav button.active .nav-icon,
:root[data-theme="light"] .v3-sidebar .nav button.active .nav-icon {
  border-color: transparent;
  background: var(--v3-primary);
  color: #fff;
}
.v3-side-health {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top-color: var(--v3-line);
}
.v3-side-health strong { color: #475467; font-size: 11px; }
.v3-side-health em { color: #98a2b3; font-size: 9px; }

.v3-main {
  min-width: 0;
  background: var(--v3-bg);
}
.v3-shell .v3-topbar {
  position: relative;
  top: auto;
  width: min(calc(100% - 64px), 1440px);
  min-height: 126px;
  margin: 0 auto;
  padding: 28px 0 20px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
:root[data-theme="light"] .v3-shell .v3-topbar {
  background: transparent;
  box-shadow: none;
}
.v3-topbar-heading { min-width: 0; }
.v3-topbar .page-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
}
.v3-topbar .page-crumbs em {
  display: inline-flex;
  align-items: center;
  color: #98a2b3;
  font-style: normal;
  font-weight: 500;
}
.v3-topbar .page-crumbs em::before { content: "·"; margin-right: 8px; }
.v3-topbar .page-title {
  margin-top: 9px;
  color: #101828;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 760;
  letter-spacing: -.045em;
}
.v3-topbar .page-sub {
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
}
.v3-top-actions { align-self: flex-start; margin-top: 8px; }
.v3-icon-button,
.v3-status-button {
  min-height: 38px;
  border-radius: 9px;
  background: #fff;
}
.v3-icon-button { width: 38px; }
.v3-status-button.is-ok { border-color: #dce5df; color: #39775c; }
.v3-main:has(.v3-page-intro) .v3-topbar {
  min-height: 66px;
  padding-bottom: 0;
}
.v3-main:has(.v3-page-intro) .v3-topbar .page-title,
.v3-main:has(.v3-page-intro) .v3-topbar .page-sub {
  display: none;
}
.v3-shell .content {
  width: min(calc(100% - 64px), 1440px);
  margin: 0 auto;
  padding: 0 0 56px;
  gap: 18px;
}
@media (min-width: 901px) {
  .v3-main:has(.content:is(.route-dashboard, .route-research, .route-review, .route-library, .route-production)) .v3-topbar,
  .v3-shell .content:is(.route-dashboard, .route-research, .route-review, .route-library, .route-production) {
    width: min(calc(100% - 32px), 1560px);
  }
}
.v3-page-intro,
.v3-dashboard-head {
  min-height: 104px;
  padding: 14px 0 20px;
  align-items: center;
  border: 0;
  background: transparent;
}
.v3-page-intro h1,
.v3-dashboard-head h1 {
  max-width: 860px;
  margin: 7px 0 0;
  color: #101828;
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 760;
  letter-spacing: -.045em;
}
.v3-page-intro p,
.v3-dashboard-head p {
  max-width: 820px;
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.7;
}
.v3-eyebrow {
  color: #667085;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.v3-eyebrow::before { display: none; }

.v3-command-hero {
  min-height: 272px;
  padding: 36px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr);
  align-items: stretch;
  gap: 36px;
  overflow: hidden;
  position: relative;
  border: 0;
  border-radius: 18px;
  background: #0b4fc4;
  color: #fff;
  box-shadow: none;
}
.v3-command-hero::after {
  content: "";
  width: 320px;
  height: 320px;
  position: absolute;
  right: -140px;
  bottom: -190px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 88px rgba(255,255,255,.018);
  pointer-events: none;
}
.v3-command-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.v3-command-kicker {
  color: rgba(255,255,255,.7);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .08em;
}
.v3-command-copy h1 {
  margin: 14px 0 10px;
  color: #fff;
  font-size: clamp(34px, 3.5vw, 46px);
  line-height: 1.18;
  letter-spacing: -.055em;
}
.v3-command-copy > p {
  max-width: 690px;
  margin: 0;
  color: rgba(255,255,255,.74);
  font-size: 13px;
  line-height: 1.75;
}
.v3-command-actions {
  margin-top: 23px;
  display: flex;
  align-items: center;
  gap: 17px;
}
.v3-command-primary {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 9px;
  background: #fff;
  color: #0b4fc4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 8px 20px rgba(5, 33, 91, .12);
}
.v3-command-primary:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(5, 33, 91, .18); }
.v3-command-primary svg,
.v3-command-link svg { width: 15px; height: 15px; }
.v3-command-link {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.82);
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
}
.v3-command-link:hover { color: #fff; }
.v3-command-summary {
  padding-left: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  border-left: 1px solid rgba(255,255,255,.16);
}
.v3-command-summary > span { color: rgba(255,255,255,.62); font-size: 10px; }
.v3-command-summary > strong { margin-top: 5px; color: #fff; font-size: 56px; font-weight: 520; line-height: 1; letter-spacing: -.06em; }
.v3-command-summary > em { margin-top: 5px; color: rgba(255,255,255,.62); font-size: 10px; font-style: normal; }
.v3-command-mini-metrics {
  margin-top: 20px;
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.v3-command-mini-metrics span { color: rgba(255,255,255,.62); font-size: 9px; }
.v3-command-mini-metrics b { margin-bottom: 2px; display: block; color: #fff; font-size: 15px; }
.v3-command-account { margin-top: 17px; display: grid; gap: 5px; }
.v3-command-account > span { color: rgba(255,255,255,.58); font-size: 9px; }
.v3-command-account select {
  width: 100%;
  min-height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 11px;
}
.v3-command-account select option { color: #111827; }

.dashboard-command-hero {
  min-height: 286px;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 520px);
  gap: 32px;
  perspective: 1200px;
}
.dashboard-first-account-hero { min-height: 330px; }
.dashboard-first-account-hero .v3-command-copy > p { max-width: 640px; }
.dashboard-first-account-panel {
  min-width: 0;
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  background: rgba(255,255,255,.09);
  box-shadow: 0 16px 34px rgba(4,34,94,.12);
  backdrop-filter: blur(10px);
}
.dashboard-first-account-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255,255,255,.16);
  color: #fff;
}
.dashboard-first-account-icon svg { width: 22px; height: 22px; }
.dashboard-first-account-panel > div strong { color: #fff; font-size: 17px; }
.dashboard-first-account-panel > div p { margin: 6px 0 0; color: rgba(255,255,255,.7); font-size: 11px; line-height: 1.7; }
.dashboard-first-account-panel ul { margin: 2px 0 0; padding: 0; display: grid; gap: 9px; list-style: none; }
.dashboard-first-account-panel li { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.86); font-size: 11px; }
.dashboard-first-account-panel li svg { width: 15px; height: 15px; color: #bfdbfe; }
.dashboard-data-overview {
  --dashboard-data-rotate-x: 0deg;
  --dashboard-data-rotate-y: 0deg;
  min-width: 0;
  padding: 18px 20px;
  display: grid;
  align-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.085);
  box-shadow: 0 16px 34px rgba(4, 34, 94, .12);
  backdrop-filter: blur(10px);
  transform: translateY(0) rotateX(var(--dashboard-data-rotate-x)) rotateY(var(--dashboard-data-rotate-y));
  transform-style: preserve-3d;
  transition: opacity .34s ease, transform .34s cubic-bezier(.22,1,.36,1), border-color .22s ease, box-shadow .22s ease, background .22s ease;
  will-change: transform;
}
.dashboard-data-overview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 28px rgba(128,181,255,.08);
  opacity: .2;
  pointer-events: none;
  animation: dashboard-data-breathe 7s ease-in-out infinite;
}
.dashboard-data-overview > * { position: relative; z-index: 1; }
.dashboard-data-overview.is-motion-ready {
  opacity: 0;
  transform: translateY(8px) rotateX(0) rotateY(0);
}
.dashboard-data-overview.is-motion-ready.is-visible {
  opacity: 1;
  transform: translateY(0) rotateX(var(--dashboard-data-rotate-x)) rotateY(var(--dashboard-data-rotate-y));
}
.dashboard-data-overview.is-motion-ready :is(.dashboard-data-head, .dashboard-data-primary, .dashboard-data-secondary, .dashboard-data-footer, .dashboard-data-actions) {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .28s ease, transform .34s cubic-bezier(.22,1,.36,1);
}
.dashboard-data-overview.is-visible :is(.dashboard-data-head, .dashboard-data-primary, .dashboard-data-secondary, .dashboard-data-footer, .dashboard-data-actions) {
  opacity: 1;
  transform: translateY(0);
}
.dashboard-data-overview.is-visible .dashboard-data-head { transition-delay: .06s; }
.dashboard-data-overview.is-visible .dashboard-data-primary { transition-delay: .11s; }
.dashboard-data-overview.is-visible .dashboard-data-secondary { transition-delay: .17s; }
.dashboard-data-overview.is-visible .dashboard-data-footer { transition-delay: .22s; }
.dashboard-data-overview.is-visible .dashboard-data-actions { transition-delay: .26s; }
@keyframes dashboard-data-breathe {
  0%, 100% { opacity: .18; }
  50% { opacity: .72; }
}
@keyframes dashboard-data-status-pulse {
  0%, 100% { opacity: .62; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.16); }
}
@keyframes dashboard-data-sync-success {
  0%, 100% { box-shadow: 0 16px 34px rgba(4, 34, 94, .12); }
  35% { box-shadow: 0 18px 40px rgba(4, 34, 94, .18), 0 0 0 3px rgba(167,243,208,.22); }
}
@keyframes dashboard-data-spin { to { transform: rotate(360deg); } }
.dashboard-data-head,
.dashboard-data-footer,
.dashboard-data-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-data-head > div { min-width: 0; display: grid; gap: 2px; }
.dashboard-data-head > div > span { color: rgba(255,255,255,.64); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.dashboard-data-head > div > strong { color: #fff; font-size: 15px; font-weight: 760; }
.dashboard-data-status {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.82);
  font-size: 9px;
  font-weight: 720;
  white-space: nowrap;
}
.dashboard-data-status.is-ready { display: inline-flex; align-items: center; gap: 6px; border-color: rgba(167,243,208,.3); background: rgba(16,185,129,.18); color: #d1fae5; }
.dashboard-data-status.is-ready::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px rgba(209,250,229,.72);
  animation: dashboard-data-status-pulse 2.4s ease-in-out infinite;
}
.dashboard-data-primary {
  display: grid;
  grid-template-columns: 1.25fr repeat(2, minmax(0, .8fr));
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.dashboard-data-primary article { min-width: 0; padding: 11px 13px; border-radius: 8px; transition: background .2s ease, transform .2s cubic-bezier(.22,1,.36,1); }
.dashboard-data-primary article:first-child { padding-left: 0; }
.dashboard-data-primary article + article { border-left: 1px solid rgba(255,255,255,.12); }
.dashboard-data-primary span,
.dashboard-data-secondary em { display: block; color: rgba(255,255,255,.6); font-size: 9px; font-style: normal; }
.dashboard-data-primary strong { display: block; overflow: hidden; margin-top: 5px; color: #fff; font-size: 21px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; transform-origin: left center; transition: transform .2s cubic-bezier(.22,1,.36,1), text-shadow .2s ease; }
.dashboard-data-primary .is-featured strong { font-size: 30px; letter-spacing: -.045em; }
.dashboard-data-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dashboard-data-secondary > span {
  min-width: 0;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  transition: background .2s ease, transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease;
}
.dashboard-data-secondary strong { overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; transition: transform .2s cubic-bezier(.22,1,.36,1); }
.dashboard-data-footer { justify-content: flex-start; flex-wrap: wrap; color: rgba(255,255,255,.58); font-size: 9px; }
.dashboard-data-footer span + span { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.14); }
.dashboard-data-footer .is-warn { color: #fde68a; }
.dashboard-data-actions { justify-content: flex-end; }
.dashboard-data-actions button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
  position: relative;
  transition: transform .18s cubic-bezier(.22,1,.36,1), border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.dashboard-data-actions button:hover { border-color: rgba(255,255,255,.46); background: rgba(255,255,255,.08); transform: translateY(-1px); }
.dashboard-data-actions button.is-primary { border-color: #fff; background: #fff; color: #0b4fc4; }
.dashboard-data-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}
.dashboard-data-actions button:focus-visible {
  outline: 3px solid rgba(255,255,255,.34);
  outline-offset: 2px;
}
.dashboard-data-actions button.is-primary:hover { background: #f8fbff; box-shadow: 0 8px 18px rgba(4,34,94,.2); }
.dashboard-data-actions button:active:not(:disabled) { transform: translateY(0) scale(.98); }
.dashboard-data-overview.is-syncing .dashboard-data-actions button.is-primary { padding-left: 27px; }
.dashboard-data-overview.is-syncing .dashboard-data-actions button.is-primary::before {
  content: "";
  width: 11px;
  height: 11px;
  position: absolute;
  left: 10px;
  top: 50%;
  margin-top: -7px;
  border: 2px solid rgba(11,79,196,.22);
  border-top-color: #0b4fc4;
  border-radius: 50%;
  animation: dashboard-data-spin .7s linear infinite;
}
.dashboard-data-overview.is-sync-success { animation: dashboard-data-sync-success 1.35s ease both; }
.dashboard-data-overview :is(button, [title]) { -webkit-tap-highlight-color: transparent; }

@media (hover: hover) and (pointer: fine) {
  .dashboard-data-overview.is-visible:hover {
    border-color: rgba(255,255,255,.32);
    background: rgba(255,255,255,.105);
    box-shadow: 0 22px 44px rgba(4,34,94,.2);
    transform: translateY(-3px) rotateX(var(--dashboard-data-rotate-x)) rotateY(var(--dashboard-data-rotate-y));
  }
  .dashboard-data-primary article:hover { background: rgba(255,255,255,.055); transform: translateY(-1px); }
  .dashboard-data-primary article:hover strong { transform: translateY(-1px) scale(1.03); text-shadow: 0 5px 18px rgba(5,31,83,.2); }
  .dashboard-data-secondary > span:hover { background: rgba(255,255,255,.12); box-shadow: 0 7px 16px rgba(5,31,83,.1); transform: translateY(-2px); }
  .dashboard-data-secondary > span:hover strong { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-data-overview,
  .dashboard-data-overview.is-motion-ready,
  .dashboard-data-overview.is-motion-ready.is-visible,
  .dashboard-data-overview.is-visible:hover {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .dashboard-data-overview::before,
  .dashboard-data-status.is-ready::before,
  .dashboard-data-overview.is-syncing .dashboard-data-actions button.is-primary::before { animation: none; }
  .dashboard-data-overview.is-motion-ready :is(.dashboard-data-head, .dashboard-data-primary, .dashboard-data-secondary, .dashboard-data-footer, .dashboard-data-actions) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.v3-quick-action-bar {
  min-height: 76px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #fff;
}
.v3-quick-action-bar button {
  min-width: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  text-align: left;
}
.v3-quick-action-bar button:hover { background: #f5f8fc; color: var(--v3-primary); }
.v3-quick-action-bar button + button { border-left: 1px solid var(--v3-line); border-radius: 0 10px 10px 0; }
.v3-quick-action-bar svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--v3-primary); }
.v3-quick-action-bar span { min-width: 0; display: grid; gap: 2px; }
.v3-quick-action-bar strong { font-size: 12px; }
.v3-quick-action-bar em { overflow: hidden; color: #98a2b3; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.v3-quick-action-bar .is-disabled { opacity: .45; cursor: not-allowed; }

.v3-health-strip {
  min-height: 46px;
  padding: 0 15px;
  border-color: var(--v3-line);
  border-radius: 12px;
  box-shadow: none;
}
.v3-stat-grid { gap: 10px; }
.v3-stat-grid article {
  min-height: 96px;
  padding: 17px 18px;
  border-radius: 14px;
  box-shadow: none;
}
.v3-stat-grid strong { color: #101828; font-size: 27px; font-weight: 680; }
.v3-stat-grid span { color: #667085; font-size: 11px; }
.v3-dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr); gap: 14px; }

.v3-shell :is(
  .panel,
  .hero-panel,
  .account-head,
  .metric-card,
  .user-card,
  .video-row,
  .material-row,
  .task,
  .task-card,
  .workflow-ledger-card,
  .selection-toolbar,
  .review-result-card,
  .review-chart-card,
  .v3-card
) {
  border-color: var(--v3-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: none;
}
:root[data-theme="light"] .v3-shell :is(
  .panel,
  .hero-panel,
  .account-head,
  .metric-card,
  .user-card,
  .video-row,
  .material-row,
  .task,
  .task-card,
  .workflow-ledger-card,
  .selection-toolbar,
  .review-result-card,
  .review-chart-card,
  .v3-card
) {
  border-color: var(--v3-line);
  background: #fff;
  color: var(--v3-ink);
  box-shadow: none;
}
.v3-shell :is(.panel, .v3-card, .review-result-card, .review-chart-card):hover {
  border-color: #d9e1ec;
  box-shadow: none;
}
.v3-card { padding: 22px; border-radius: 15px; box-shadow: none; }
.v3-card > header { margin-bottom: 17px; }
.v3-card h2 { color: #101828; font-size: 18px; font-weight: 720; }
.v3-focus-card > p,
.v3-brief-card > p { color: #667085; font-size: 13px; }
.v3-gate { background: var(--v3-warning-soft); color: var(--v3-warn); }
.v3-gate.is-pass { background: var(--v3-success-soft); }
.v3-next-action { border-left-color: var(--v3-primary); background: #f7f9fc; }
.v3-progress-list b { background: var(--v3-primary); }
.v3-brief-warning { background: #eef4fb; color: #46668e; }

.v3-shell :is(.btn, .mini, .v3-btn, .v3-icon-button, .v3-status-button, .theme-toggle, .pill) {
  border-color: var(--v3-line);
  border-radius: 9px;
  background: #fff;
  color: #344054;
  box-shadow: none;
}
.v3-shell :is(.btn, .mini, .v3-btn, .v3-icon-button, .v3-status-button, .theme-toggle, .pill):hover {
  border-color: #cfd9e6;
  background: #f5f8fc;
  color: var(--v3-primary);
  box-shadow: none;
  transform: none;
}
.v3-shell :is(.btn.green, .btn.primary, .mini.primary, .v3-btn.primary) {
  border-color: var(--v3-primary);
  background: var(--v3-primary);
  color: #fff;
  box-shadow: none;
}
.v3-shell :is(.btn.green, .btn.primary, .mini.primary, .v3-btn.primary):hover {
  border-color: #083a91;
  background: #083a91;
  color: #fff;
  box-shadow: none;
}
.v3-shell :is(input, select, textarea, .field, .select, .textarea, .video-action-select) {
  border-color: #dfe4ec;
  border-radius: 9px;
  background: #fff;
  color: #101828;
}
.v3-shell :is(input, select, textarea, .field, .select, .textarea, .video-action-select):focus {
  border-color: #6f9de2;
  box-shadow: 0 0 0 3px rgba(11,79,196,.09);
}
.v3-shell :is(.tag, .badge, .pill, .value-badge, .v3-count-chip) {
  background: #eef3f9;
  color: #52647a;
}
.v3-shell :is(.notice, .empty, .v3-empty, .review-friendly-empty) {
  border-color: var(--v3-line);
  background: #f8fafc;
}
.v3-shell :is(th, .table-head) { background: #f7f9fc; color: #667085; }

.review-action-hero {
  min-height: 300px;
  padding: 30px 36px;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .45fr);
  border: 0;
  border-radius: 18px;
  background: #0b4fc4;
  color: #fff;
  box-shadow: none;
}
:root:not([data-theme="dark"]) .v3-shell .review-action-hero {
  background: #0b4fc4;
}
.review-action-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.review-action-heading .v3-eyebrow,
.review-action-hero .review-action-meta span { color: rgba(255,255,255,.64); }
.review-action-hero .review-decision {
  border: 1px solid rgba(255,255,255,.19);
  background: rgba(255,255,255,.11);
  color: #fff;
}
.review-action-hero h2 {
  max-width: 850px;
  margin: 13px 0 15px;
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.32;
  letter-spacing: -.045em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.review-action-hero .review-next-action {
  width: 100%;
  padding: 13px 15px;
  border-left: 2px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.09);
}
.review-action-hero .review-next-action strong,
.review-action-hero .review-next-action p { color: #fff; }
:root[data-theme="light"] .v3-shell .review-action-hero .review-next-action p {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255,255,255,.76);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.review-action-hero .review-action-meta { margin: 14px 0 17px; }
.review-action-hero .review-completeness {
  align-content: center;
  border-left: 1px solid rgba(255,255,255,.16);
}
.review-action-hero .review-progress-ring {
  background: conic-gradient(#fff var(--review-progress), rgba(255,255,255,.16) 0);
  box-shadow: none;
}
.review-action-hero .review-progress-ring::after {
  background: #0b4fc4;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.review-action-hero .review-progress-ring strong,
.review-action-hero .review-completeness > strong { color: #fff; }
.review-action-hero .review-progress-ring span,
.review-action-hero .review-completeness > p { color: rgba(255,255,255,.64); }
.review-chart-grid { grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr); gap: 14px; }
.review-control-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.review-control-row .operation-scope-bar,
.review-control-row .review-view-tabs {
  min-height: 52px;
  margin: 0;
}
.review-control-row .review-view-tabs { width: max-content; }
.review-chart-card { padding: 20px; border-radius: 15px; }
.review-decision-visual {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.review-decision-donut {
  width: 132px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(
    #3f7d62 0 var(--review-pursue-stop),
    #a8742a var(--review-pursue-stop) var(--review-angle-stop),
    #b85a65 var(--review-angle-stop) var(--review-stop-stop),
    #d8dee8 var(--review-stop-stop) 360deg
  );
}
.review-decision-donut::after {
  content: "";
  width: 82px;
  height: 82px;
  position: absolute;
  border-radius: 50%;
  background: #fff;
}
.review-decision-donut > div { z-index: 1; display: grid; gap: 2px; text-align: center; }
.review-decision-donut strong { color: #101828; font-size: 24px; line-height: 1; }
.review-decision-donut span { color: #98a2b3; font-size: 9px; }
.review-decision-bars { gap: 9px; }
.review-decision-row { grid-template-columns: 48px minmax(72px, 1fr) 18px; gap: 7px; }
.review-ranking-track i { background: var(--v3-primary); }
.review-chart-note,
.review-visible-conclusion section,
.review-full-detail > div { background: #f7f9fc; }

.v3-shell :is(.traffic-tabs button.active, .traffic-metric-tabs button.active) {
  border-color: transparent;
  background: #eaf2ff;
  color: var(--v3-primary);
  box-shadow: none;
}
.route-library .library-source-badge.source-competitor,
.route-library .library-stage-badge.stage-ready,
.route-library .library-source-badge.source-mine {
  background: #eaf2ff;
  color: #315f9d;
}
:root[data-theme="light"] .v3-shell .pipe-step {
  border-color: var(--v3-line);
  background: #fff;
  box-shadow: none;
}
:root[data-theme="light"] .v3-shell .pipe-step.done {
  border-color: #d8e3f2;
  background: #eef4fb;
}
:root[data-theme="light"] .v3-shell .pipe-step.done span {
  background: var(--v3-primary);
  color: #fff;
}
.operation-scope-bar,
.review-view-tabs,
.production-mode-tabs,
.knowledge-category-tabs,
.library-section-tabs {
  border-color: var(--v3-line);
  background: #fff;
  box-shadow: none;
}

@media (max-width: 1120px) {
  .v3-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .v3-topbar,
  .v3-shell .content { width: min(calc(100% - 40px), 1440px); }
  .v3-command-hero { grid-template-columns: minmax(0, 1fr) 250px; padding: 32px; gap: 28px; }
  .dashboard-command-hero { grid-template-columns: minmax(0, 1fr) minmax(380px, 440px); gap: 24px; }
  .v3-dashboard-grid,
  .review-chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .v3-sidebar { padding: 14px; }
  .v3-topbar,
  .v3-shell .content { width: calc(100% - 28px); }
  .v3-topbar { min-height: 112px; padding-top: 20px; }
  .v3-main:has(.v3-page-intro) .v3-topbar { min-height: 54px; }
  .v3-command-hero { grid-template-columns: 1fr; padding: 28px; }
  .v3-command-summary { padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.16); border-left: 0; }
  .v3-command-summary > strong { font-size: 46px; }
  .dashboard-data-overview { width: 100%; padding: 18px; }
  .v3-quick-action-bar { grid-template-columns: 1fr; }
  .v3-quick-action-bar button + button { border-top: 1px solid var(--v3-line); border-left: 0; border-radius: 8px; }
  .review-action-hero { grid-template-columns: 1fr; padding: 28px; }
  .review-action-hero .review-completeness { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); border-left: 0; }
  .review-control-row { grid-template-columns: 1fr; }
  .review-control-row .review-view-tabs { width: 100%; }
}
@media (max-width: 520px) {
  .v3-topbar { align-items: flex-start; }
  .v3-topbar .page-title { font-size: 27px; }
  .v3-topbar .page-crumbs em { display: none; }
  .v3-top-actions { gap: 6px; }
  .v3-page-intro { align-items: stretch; }
  .v3-page-intro h1 { font-size: 28px; }
  .v3-command-hero { min-height: 0; padding: 24px 20px; border-radius: 15px; }
  .v3-command-copy h1 { font-size: 32px; }
  .v3-command-actions { align-items: flex-start; flex-direction: column; }
  .v3-command-mini-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-data-overview { padding: 16px; border-radius: 14px; }
  .dashboard-data-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-data-primary .is-featured { grid-column: 1 / -1; padding-left: 0; }
  .dashboard-data-primary article:nth-child(2) { padding-left: 0; border-left: 0; }
  .dashboard-data-primary article:nth-child(3) { border-left: 1px solid rgba(255,255,255,.12); }
  .dashboard-data-primary .is-featured strong { font-size: 28px; }
  .dashboard-data-secondary { gap: 6px; }
  .dashboard-data-secondary > span { align-items: flex-start; flex-direction: column; gap: 3px; }
  .dashboard-data-footer span + span { padding-left: 0; border-left: 0; }
  .dashboard-data-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-data-actions button { min-height: 42px; }
  .review-action-hero { padding: 24px 20px; border-radius: 15px; }
  .review-action-hero h2 { font-size: 25px; }
  .review-decision-visual { grid-template-columns: 1fr; justify-items: center; }
  .review-decision-bars { width: 100%; }
}

/* Material workspace: navigation, visual shelf and click-through inspector. */
.route-library .library-intro { margin-bottom: 18px; }
.route-library .library-center-panel {
  overflow: visible;
  padding: 0;
}
.route-library .library-center-title {
  min-height: 64px;
  margin: 0;
  padding: 0 20px;
}
.route-library .library-center-title .actions {
  color: var(--v3-muted);
  font-size: 12px;
}
.route-library .library-workspace {
  display: grid;
  min-height: 720px;
  border-top: 1px solid var(--v3-line);
  grid-template-columns: 190px minmax(0, 1fr) 326px;
  align-items: start;
}
.route-library .library-navigation {
  position: sticky;
  top: 18px;
  display: grid;
  min-width: 0;
  padding: 20px 14px;
  border-right: 1px solid var(--v3-line);
  background: #fbfcff;
  gap: 10px;
}
.route-library .library-nav-title {
  padding: 4px 10px 2px;
  color: var(--v3-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}
.route-library .library-nav-list {
  display: grid;
  margin-bottom: 8px;
  gap: 4px;
}
.route-library .library-nav-list button {
  display: flex;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #526071;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.route-library .library-nav-list button:hover {
  border-color: #dbe5f4;
  background: #f1f6ff;
  color: var(--v3-primary);
}
.route-library .library-nav-list button.is-active {
  border-color: #d7e5ff;
  background: #eaf2ff;
  color: var(--v3-primary);
}
.route-library .library-nav-list button em {
  min-width: 24px;
  color: #8b98aa;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  text-align: right;
}
.route-library .library-nav-list button.is-active em { color: var(--v3-primary); }
.route-library .library-nav-utility {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--v3-line);
}
.route-library .library-facets {
  display: grid;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dfe6f1;
  border-radius: 14px;
  background: #f9fbfe;
  gap: 9px;
}
.route-library .library-facets-mobile-head { display: none; }
.route-library .library-facet-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.route-library .library-facet-row > strong {
  color: #65748a;
  font-size: 11px;
  font-weight: 780;
}
.route-library .library-facet-row > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}
.route-library .library-facet-row button {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #536176;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.route-library .library-facet-row button:hover {
  border-color: #d7e2f3;
  background: #fff;
  color: var(--v3-primary);
}
.route-library .library-facet-row button.is-active {
  border-color: #c9dcff;
  background: #eaf2ff;
  color: var(--v3-primary);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .03);
}
.route-library .library-facet-row button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .20);
  outline-offset: 2px;
}
.route-library .library-facet-row button em {
  color: #8b98aa;
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
}
.route-library .library-facet-row button.is-active em { color: var(--v3-primary); }
.route-library .library-active-filters {
  display: flex;
  min-height: 30px;
  padding-top: 8px;
  border-top: 1px solid #e4eaf3;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.route-library .library-active-filters > span {
  margin-right: 4px;
  color: #7b889a;
  font-size: 10px;
  font-weight: 720;
}
.route-library .library-active-filters > em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2d60b3;
  font-size: 10px;
  font-style: normal;
  font-weight: 720;
}
.route-library .library-active-filters > button {
  min-height: 26px;
  margin-left: auto;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #6b7890;
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}
.route-library .library-active-filters > button:hover { color: var(--v3-primary); }
.route-library .library-review-summary {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
}
.route-library .library-review-summary > div {
  display: grid;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid #dfe6f1;
  border-radius: 13px;
  background: #fff;
  align-content: center;
  gap: 2px;
}
.route-library .library-review-summary strong { color: #17345f; font-size: 23px; line-height: 1; }
.route-library .library-review-summary span { color: #718096; font-size: 10px; }
.route-library .library-review-section { display: grid; margin-top: 16px; gap: 10px; }
.route-library .library-review-section > header div { display: grid; gap: 3px; }
.route-library .library-review-section > header strong { color: var(--v3-ink); font-size: 14px; }
.route-library .library-review-section > header span { color: var(--v3-muted); font-size: 10px; }
.route-library .library-review-ok {
  padding: 12px 14px;
  border: 1px solid #d7eadf;
  border-radius: 12px;
  background: #f4fbf7;
  color: #397359;
  font-size: 11px;
  font-weight: 720;
}
.route-library .library-storage-card {
  position: relative;
  display: grid;
  overflow: hidden;
  margin-top: 5px;
  padding: 15px;
  border: 1px solid #d9e5f5;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(87, 142, 236, .13), transparent 48%),
    linear-gradient(145deg, #fff 0%, #f7faff 100%);
  box-shadow: 0 10px 28px rgba(56, 94, 153, .08);
  gap: 7px;
}
.route-library .library-storage-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.72) 44%, transparent 62%);
  content: "";
  pointer-events: none;
  transform: translateX(-120%);
  animation: libraryStorageSheen 7s ease-in-out infinite;
}
.route-library .library-storage-card > * { position: relative; z-index: 1; }
.route-library .library-storage-card > span {
  color: #65748a;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .04em;
}
.route-library .library-storage-card > em { color: #8c98a8; font-size: 10px; font-style: normal; }
.route-library .library-storage-card .mini { width: 100%; margin-top: 6px; }
.route-library .library-storage-status {
  display: flex;
  align-items: center;
  gap: 7px;
}
.route-library .library-storage-status > i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a8b2c1;
}
.route-library .library-storage-card.is-connected .library-storage-status > i {
  background: #4fa876;
  box-shadow: 0 0 0 0 rgba(79,168,118,.32);
  animation: libraryStoragePulse 2.4s ease-out infinite;
}
.route-library .library-storage-status strong {
  color: var(--v3-ink);
  font-size: 17px;
}
.route-library .library-storage-capacity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #7b899d;
  font-size: 9px;
}
.route-library .library-storage-capacity strong { color: #4d6f9f; font-size: 10px; }
.route-library .library-quota {
  display: grid;
  min-height: 82px;
  padding: 10px 0 3px;
  border-top: 1px solid rgba(203, 217, 238, .72);
  gap: 7px;
}
.route-library .library-quota-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px;
}
.route-library .library-quota-primary > span,
.route-library .library-quota-primary > strong { grid-column: 1; }
.route-library .library-quota-primary span,
.route-library .library-quota-total,
.route-library .library-quota-meta {
  color: #7b899d;
  font-size: 9px;
}
.route-library .library-quota-primary strong {
  color: #1c56a6;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.route-library .library-capacity-label {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf4ff;
  color: #315f9d;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.route-library .library-quota-pending {
  padding-top: 7px;
  border-top: 1px solid rgba(203, 217, 238, .72);
  color: #7b899d;
  font-size: 9px;
  line-height: 1.5;
}
.route-library .library-quota-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef8;
}
.route-library .library-quota-track i {
  display: block;
  width: var(--quota-used);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f6faf, #6b9bea);
  box-shadow: 0 0 13px rgba(63,111,175,.28);
  transform-origin: left center;
  animation: libraryQuotaGrow .9s cubic-bezier(.2,.75,.25,1) both;
}
.route-library .library-quota-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.route-library .library-quota-meta em { color: #4d6f9f; font-style: normal; font-weight: 780; }
.route-library .library-quota-loading {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7b899d;
  font-size: 10px;
}
.route-library .library-quota-loading i {
  width: 13px;
  height: 13px;
  border: 2px solid #d7e2f2;
  border-top-color: #4f7cbd;
  border-radius: 50%;
  animation: libraryQuotaSpin .8s linear infinite;
}
.route-library .library-quota-unavailable { padding: 18px 0; color: #8b97a8; font-size: 10px; }
.route-library .library-storage-card.is-warning {
  border-color: #efc879;
  background: linear-gradient(145deg, #fffdf7, #fff8e8);
}
.route-library .library-storage-card.is-warning .library-storage-capacity strong,
.route-library .library-capacity-label.is-warning { color: #9a6700; }
.route-library .library-storage-card.is-critical,
.route-library .library-storage-card.is-full {
  border-color: #ef9b9b;
  background: linear-gradient(145deg, #fffafa, #fff0f0);
  box-shadow: 0 12px 28px rgba(190, 43, 43, .1);
}
.route-library .library-storage-card.is-critical .library-storage-capacity strong,
.route-library .library-storage-card.is-full .library-storage-capacity strong,
.route-library .library-storage-card.is-critical .library-quota-primary strong,
.route-library .library-storage-card.is-full .library-quota-primary strong,
.route-library .library-capacity-label.is-critical,
.route-library .library-capacity-label.is-full { color: #c83232; }
.route-library .library-storage-card.is-critical .library-capacity-label,
.route-library .library-storage-card.is-full .library-capacity-label { background: #ffe4e4; }
.route-library .library-storage-card.is-warning .library-quota-track i { background: #d79a22; box-shadow: none; }
.route-library .library-storage-card.is-critical .library-quota-track i,
.route-library .library-storage-card.is-full .library-quota-track i { background: #d74747; box-shadow: 0 0 12px rgba(215, 71, 71, .24); }
.route-library .library-storage-card.is-critical .mini,
.route-library .library-storage-card.is-full .mini { border-color: #d74747; background: #d74747; color: #fff; }
.library-storage-alert {
  margin: 0 0 16px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #ef9b9b;
  border-radius: 14px;
  background: #fff2f2;
  color: #8f2525;
}
.library-storage-alert > div { min-width: 0; display: grid; gap: 3px; }
.library-storage-alert strong { font-size: 12px; }
.library-storage-alert span { color: #a94a4a; font-size: 10px; line-height: 1.55; }
.library-storage-alert button {
  min-height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
  border: 1px solid #d74747;
  border-radius: 9px;
  background: #d74747;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
@keyframes libraryStoragePulse {
  0% { box-shadow: 0 0 0 0 rgba(79,168,118,.32); }
  65%, 100% { box-shadow: 0 0 0 7px rgba(79,168,118,0); }
}
@keyframes libraryStorageSheen {
  0%, 72% { transform: translateX(-120%); }
  88%, 100% { transform: translateX(120%); }
}
@keyframes libraryQuotaGrow {
  from { transform: scaleX(0); opacity: .5; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes libraryQuotaSpin {
  to { transform: rotate(360deg); }
}
.route-library .library-browser {
  min-width: 0;
  padding: 18px;
}
.route-library .library-shelf-toolbar {
  grid-template-columns: 145px 145px minmax(200px, 1fr) auto;
  margin-bottom: 12px;
  padding: 10px;
  background: #f7f9fc;
}
.route-library .library-package-grid {
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 12px;
}
.route-library .library-package-card {
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(31, 74, 140, .055);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.route-library .library-package-card:hover {
  border-color: #b9ccef;
  box-shadow: 0 10px 24px rgba(31, 85, 170, .10);
  transform: translateY(-1px);
}
.route-library .library-package-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}
.route-library .library-package-card.is-selected {
  border-color: var(--v3-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .11), 0 10px 25px rgba(37, 99, 235, .11);
}
.route-library .library-package-cover {
  cursor: inherit;
  background: #e8edf5;
}
.route-library .library-package-cover video,
.route-library .library-package-cover img { object-position: center; }
.route-library .library-cover-stage {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: rgba(15, 30, 53, .70);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.route-library .library-package-body {
  padding: 12px;
  gap: 8px;
}
.route-library .library-package-heading > span:last-child {
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-library .library-package-title {
  min-height: 40px;
  font-size: 14px;
  line-height: 1.45;
}
.route-library .library-components { gap: 4px; }
.route-library .library-component { padding: 3px 6px; font-size: 9px; }
.route-library .library-card-hint {
  display: flex;
  padding-top: 8px;
  border-top: 1px solid #edf1f6;
  color: var(--v3-muted);
  font-size: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.route-library .library-card-hint strong { color: var(--v3-primary); font-size: 10px; }
.route-library .library-package-list .library-package-card {
  grid-template-columns: 176px minmax(0, 1fr);
}
.route-library .library-package-list .library-package-cover {
  min-height: 188px;
}
.route-library .library-inspector {
  position: sticky;
  top: 18px;
  display: grid;
  overflow-y: auto;
  max-height: calc(100vh - 36px);
  min-width: 0;
  padding: 16px;
  border-left: 1px solid var(--v3-line);
  background: #fbfcff;
  gap: 13px;
}
.route-library .library-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.route-library .library-inspector-head > div { display: grid; gap: 2px; }
.route-library .library-inspector-head > div span { color: var(--v3-ink); font-size: 15px; font-weight: 850; }
.route-library .library-inspector-head > div strong { color: var(--v3-muted); font-size: 10px; }
.route-library .library-inspector-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 275px;
  max-height: 390px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #101827;
  place-items: center;
}
.route-library .library-inspector-preview video,
.route-library .library-inspector-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 390px;
  object-fit: contain;
}
.route-library .library-inspector-preview audio {
  width: calc(100% - 32px);
}
.modal-body audio.material-preview-media {
  width: 100%;
}
.route-library .library-inspector-preview .library-audio-mark {
  min-height: 275px;
  background: linear-gradient(145deg, #132a55, #174fa8);
}
.route-library .library-inspector-title {
  display: grid;
  gap: 4px;
}
.route-library .library-inspector-title strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.route-library .library-inspector-title span { color: var(--v3-muted); font-size: 11px; }
.route-library .library-inspector-progress {
  display: grid;
  padding: 12px 4px 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.route-library .library-inspector-progress > div {
  position: relative;
  display: grid;
  color: #9aa6b5;
  font-size: 9px;
  text-align: center;
  gap: 6px;
  justify-items: center;
}
.route-library .library-inspector-progress > div::before {
  position: absolute;
  top: 4px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #dfe6ef;
  content: "";
}
.route-library .library-inspector-progress > div:first-child::before { display: none; }
.route-library .library-inspector-progress i {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
}
.route-library .library-inspector-progress > div.is-ready { color: var(--v3-primary); font-weight: 750; }
.route-library .library-inspector-progress > div.is-ready::before { background: #87aef0; }
.route-library .library-inspector-progress > div.is-ready i { border-color: var(--v3-primary); background: var(--v3-primary); }
.route-library .library-inspector-section {
  display: grid;
  margin: 0;
  padding: 13px;
  border: 1px solid #e0e7f0;
  border-radius: 12px;
  background: #fff;
  gap: 7px;
}
.route-library .library-primary-action > span { color: var(--v3-muted); font-size: 10px; }
.route-library .library-primary-action > strong { color: var(--v3-ink); font-size: 13px; }
.route-library .library-inspector-actions {
  display: flex;
  margin-top: 4px;
  gap: 6px;
  flex-wrap: wrap;
}
.route-library .library-inspector-actions .mini { min-height: 34px; padding: 0 9px; font-size: 10px; }
.route-library .library-inspector-section-title { color: var(--v3-ink); font-size: 12px; font-weight: 850; }
.route-library .library-inspector-meta {
  display: grid;
  margin: 2px 0 0;
  gap: 6px;
}
.route-library .library-inspector-meta div {
  display: grid;
  min-width: 0;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}
.route-library .library-inspector-meta dt { color: var(--v3-muted); font-size: 10px; }
.route-library .library-inspector-meta dd {
  overflow: hidden;
  margin: 0;
  color: var(--v3-ink);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-library .library-inspector-files > summary {
  display: flex;
  color: var(--v3-ink);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  justify-content: space-between;
}
.route-library .library-inspector-files[open] > summary { margin-bottom: 8px; color: var(--v3-primary); }
.route-library .library-inspector-empty {
  display: grid;
  min-height: 430px;
  padding: 30px 18px;
  color: var(--v3-muted);
  text-align: center;
  place-items: center;
  align-content: center;
  gap: 9px;
}
.route-library .library-inspector-empty > span { color: #9bb7e8; font-size: 42px; }
.route-library .library-inspector-empty strong { color: var(--v3-ink); font-size: 15px; }
.route-library .library-inspector-empty p { margin: 0; font-size: 11px; line-height: 1.65; }

@media (max-width: 1320px) {
  .route-library .library-workspace { grid-template-columns: 174px minmax(0, 1fr) 292px; }
  .route-library .library-package-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
}
@media (max-width: 1080px) {
  .route-library .library-workspace { grid-template-columns: 170px minmax(0, 1fr); }
  .route-library .library-inspector {
    position: static;
    max-height: none;
    border-top: 1px solid var(--v3-line);
    border-left: 0;
    grid-column: 2;
  }
  .route-library .library-inspector.has-selection {
    grid-template-columns: minmax(240px, .8fr) minmax(260px, 1.2fr);
    align-items: start;
  }
  .route-library .library-inspector.has-selection .library-inspector-head,
  .route-library .library-inspector.has-selection .library-inspector-preview { grid-column: 1; }
}
@media (max-width: 760px) {
  .route-library .library-center-title { padding: 0 14px; }
  .route-library .library-workspace { grid-template-columns: 1fr; }
  .route-library .library-navigation {
    position: static;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--v3-line);
  }
  .route-library .library-nav-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .route-library .library-nav-list button { flex: 0 0 auto; }
  .route-library .library-source-list,
  .route-library .library-navigation .library-nav-title:nth-of-type(2),
  .route-library .library-storage-card { display: none; }
  .route-library .library-browser { padding: 12px; }
  .route-library .library-shelf-toolbar { grid-template-columns: 1fr; }
  .route-library .library-inspector,
  .route-library .library-inspector.has-selection {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
  .route-library .library-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .route-library .library-package-grid { grid-template-columns: 1fr; }
  .route-library .library-package-list .library-package-card { grid-template-columns: 1fr; }
}

/* Material shelf view order: list first, dense table second. */
.route-library .library-package-list {
  display: grid;
  gap: 10px;
}
.route-library .library-package-list .library-package-card {
  display: grid;
  min-height: 158px;
  grid-template-columns: 158px minmax(0, 1fr);
}
.route-library .library-package-list .library-package-cover {
  height: 100%;
  min-height: 158px;
  aspect-ratio: auto;
}
.route-library .library-package-list .library-package-body {
  align-content: center;
}
.route-library .library-package-table {
  overflow-x: auto;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #fff;
}
.route-library .library-table-head,
.route-library .library-table-row {
  display: grid;
  min-width: 790px;
  grid-template-columns: 76px minmax(210px, 1.6fr) minmax(130px, 1fr) 112px minmax(130px, 1fr) 82px;
  align-items: center;
  gap: 12px;
}
.route-library .library-table-head {
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--v3-line);
  background: #f7f9fc;
  color: var(--v3-muted);
  font-size: 10px;
  font-weight: 800;
}
.route-library .library-table-row {
  min-height: 88px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f6;
  color: var(--v3-ink);
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}
.route-library .library-table-row:last-child { border-bottom: 0; }
.route-library .library-table-row:hover { background: #f6f9ff; }
.route-library .library-table-row.is-selected {
  position: relative;
  z-index: 1;
  background: #edf4ff;
  box-shadow: inset 3px 0 var(--v3-primary);
}
.route-library .library-table-row:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: -3px;
}
.route-library .library-table-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 62px;
  height: 70px;
  border-radius: 9px;
  background: #101827;
  place-items: center;
}
.route-library .library-table-preview video,
.route-library .library-table-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.route-library .library-table-preview .library-audio-mark {
  font-size: 9px;
  text-align: center;
}
.route-library .library-table-title,
.route-library .library-table-account {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.route-library .library-table-title strong,
.route-library .library-table-account strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-library .library-table-title span,
.route-library .library-table-account span,
.route-library .library-table-assets,
.route-library .library-table-date {
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
}
.route-library .library-table-title span,
.route-library .library-table-account span,
.route-library .library-table-date { white-space: nowrap; }

/* Account context: calm spring menu and clearer account actions. */
.v3-account-switcher .v3-account-mini[aria-expanded="true"] .v3-account-mini-chevron {
  transform: translateY(-50%) rotate(180deg);
}
.v3-account-switcher .v3-account-mini:hover,
.v3-account-switcher .v3-account-mini[aria-expanded="true"] {
  border-color: #cbd8eb;
  box-shadow: 0 12px 30px rgba(27, 71, 137, .09);
}
.v3-account-menu {
  width: 364px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-9px) scale(.985);
  transform-origin: 28px 0;
  transition:
    opacity .16s ease,
    transform .2s cubic-bezier(.16, 1, .3, 1),
    visibility .2s ease;
  box-shadow: 0 24px 64px rgba(31, 53, 86, .16);
}
.v3-account-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.v3-account-menu.is-closing {
  visibility: visible;
}
.v3-account-option-row { position: relative; border-radius: 13px; }
.v3-account-option-row .v3-account-option { padding-right: 42px; }
.v3-account-option-row .v3-account-option b { position: absolute; right: 42px; }
.v3-account-manage {
  position: absolute;
  z-index: 2;
  right: 7px;
  top: 50%;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #718096;
  cursor: pointer;
  opacity: .56;
  place-items: center;
  transform: translateY(-50%);
  transition: opacity .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.v3-account-manage .ui-icon { width: 15px; height: 15px; }
.v3-account-option-row:hover .v3-account-manage,
.v3-account-manage:focus-visible { opacity: 1; }
.v3-account-option-row.is-active .v3-account-manage { opacity: .72; }
.v3-account-manage:hover,
.v3-account-manage:focus-visible { border-color: #cbd9eb; background: #fff; color: var(--v3-primary); outline: none; }
.v3-account-menu-footer {
  padding: 10px 4px 2px;
  grid-template-columns: 1fr;
  gap: 8px;
}
.v3-account-menu-footer .v3-account-footer-action {
  min-height: 58px;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border-color: #dfe7f2;
  background: #f8fafc;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.v3-account-menu-footer .v3-account-footer-action:hover {
  border-color: #c9d8ed;
  background: #f1f6ff;
  transform: translateY(-1px);
}
.v3-account-menu-footer .v3-account-footer-action i {
  width: 34px;
  height: 34px;
  display: grid;
  border-radius: 10px;
  background: #e9f1ff;
  color: var(--v3-primary);
  font-size: 18px;
  font-style: normal;
  place-items: center;
}
.v3-account-menu-footer .v3-account-footer-action i .ui-icon { width: 17px; height: 17px; }
.v3-account-menu-footer .v3-account-footer-action span { min-width: 0; display: grid; gap: 2px; }
.v3-account-menu-footer .v3-account-footer-action strong { font-size: 12px; }
.v3-account-menu-footer .v3-account-footer-action em { color: #7c899b; font-size: 10px; font-style: normal; }
.v3-account-menu-footer .v3-account-footer-action b { color: #8c9aab; font-size: 15px; }
.v3-account-menu-footer .v3-account-footer-action.is-primary {
  border-color: #0f62d6;
  background: linear-gradient(135deg, #1767d6, #0d52bd);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 82, 189, .18);
}
.v3-account-menu-footer .v3-account-footer-action.is-primary:hover {
  border-color: #0d52bd;
  background: linear-gradient(135deg, #1a6ee3, #0d52bd);
}
.v3-account-menu-footer .v3-account-footer-action.is-primary i {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.v3-account-menu-footer .v3-account-footer-action.is-primary em,
.v3-account-menu-footer .v3-account-footer-action.is-primary b { color: rgba(255, 255, 255, .72); }
.v3-account-menu-footer .v3-account-footer-action.is-danger {
  border-color: #f1d5d8;
  background: #fff8f8;
  color: #8e3540;
}
.v3-account-menu-footer .v3-account-footer-action.is-danger:hover { border-color: #e8bfc5; background: #fff1f2; }
.v3-account-menu-footer .v3-account-footer-action.is-danger i { background: #fde8ea; color: #b54755; }
.v3-account-menu-footer .v3-account-footer-action.is-danger em,
.v3-account-menu-footer .v3-account-footer-action.is-danger b { color: #a96c74; }

.account-removal-modal { width: min(620px, calc(100vw - 32px)); }
.account-removal-dialog { display: grid; gap: 16px; }
.account-removal-summary { padding: 14px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid #f1d2d7; border-radius: 14px; background: #fff8f9; }
.account-removal-icon { width: 36px; height: 36px; display: grid; flex: 0 0 auto; border-radius: 11px; background: #ffe8eb; color: #b64a5b; place-items: center; }
.account-removal-icon .ui-icon { width: 18px; height: 18px; }
.account-removal-summary > div { min-width: 0; display: grid; gap: 4px; }
.account-removal-summary strong { color: var(--v3-ink); font-size: 14px; }
.account-removal-summary p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.account-removal-impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.account-removal-impact article { min-height: 62px; padding: 10px 12px; display: grid; align-content: center; gap: 3px; border: 1px solid var(--v3-line); border-radius: 12px; background: #fbfcfe; }
.account-removal-impact span { color: var(--v3-muted); font-size: 10px; }
.account-removal-impact strong { color: var(--v3-ink); font-size: 17px; }
.account-removal-blocker { padding: 11px 12px; border: 1px solid #f0c9cf; border-radius: 11px; background: #fff6f7; color: #9c3f4f; font-size: 11px; line-height: 1.55; }
.account-removal-blocker.is-info { border-color: #cfe0f8; background: #f4f8ff; color: #315b8f; }
.account-removal-field { display: grid; gap: 7px; color: var(--v3-ink); font-size: 11px; font-weight: 700; }
.account-removal-field :is(input, select) { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--v3-line); border-radius: 11px; background: #fff; color: var(--v3-ink); outline: none; }
.account-removal-field :is(input, select):focus { border-color: var(--v3-primary); box-shadow: 0 0 0 3px rgba(15, 98, 214, .09); }
.account-removal-confirm { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--v3-line); border-radius: 11px; background: #fafcff; color: var(--v3-ink); font-size: 11px; line-height: 1.5; }
.account-removal-confirm input { width: 16px; height: 16px; accent-color: var(--v3-primary); }
.account-removal-note { margin: -4px 0 0; color: var(--v3-muted); font-size: 10px; line-height: 1.6; }
.account-removal-status { min-height: 20px; display: flex; align-items: center; gap: 6px; color: #9c3f4f; font-size: 10px; font-weight: 650; line-height: 1.5; }
.account-removal-status::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.account-removal-status.is-ready { color: #168766; }
.account-removal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.account-removal-actions .v3-btn { min-width: 110px; }
.account-removal-actions .v3-btn.danger:not(:disabled) { border-color: #c55061; background: #b74556; color: #fff; }

.account-manager-modal { width: min(680px, calc(100vw - 32px)); }
.account-manager-dialog { display: grid; gap: 20px; }
.account-manager-dialog section { display: grid; gap: 10px; }
.account-manager-dialog section > header > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.account-manager-dialog section > header strong { color: var(--v3-ink); font-size: 13px; }
.account-manager-dialog section > header span { color: var(--v3-muted); font-size: 10px; }
.account-manager-list { display: grid; gap: 8px; }
.account-manager-list article { min-height: 64px; padding: 9px 10px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--v3-line); border-radius: 13px; background: #fff; }
.account-manager-list article > img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: #f1f5f9; }
.account-manager-list article > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.account-manager-list article > span:nth-child(2) strong { overflow: hidden; color: var(--v3-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-manager-list article > span:nth-child(2) em { overflow: hidden; color: var(--v3-muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.account-manager-list article > div { display: flex; gap: 6px; }
.account-manager-trash { padding-top: 16px; border-top: 1px solid var(--v3-line); }
.account-manager-trash-icon { width: 42px; height: 42px; display: grid; border-radius: 12px; background: #f3f6fa; color: #6f7f92; place-items: center; }
.account-manager-trash-icon .ui-icon { width: 18px; height: 18px; }
.account-manager-empty { min-height: 92px; display: grid; align-content: center; justify-items: center; gap: 4px; border: 1px dashed #d8e1ed; border-radius: 13px; background: #fafbfd; text-align: center; }
.account-manager-empty strong { color: var(--v3-ink); font-size: 12px; }
.account-manager-empty span { color: var(--v3-muted); font-size: 10px; }
.account-manager-empty .v3-btn { margin-top: 8px; }

@media (hover: none) {
  .v3-account-manage { opacity: .72; }
}
@media (max-width: 640px) {
  .account-removal-impact { grid-template-columns: repeat(2, 1fr); }
  .account-removal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .account-removal-actions .v3-btn { width: 100%; min-width: 0; }
  .account-manager-list article { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .account-manager-list article > img,
  .account-manager-trash-icon { width: 38px; height: 38px; }
}

/* Account operations v239: one reliable wait state for switch, add and remove. */
body.account-operation-running { overflow: hidden; }
.account-operation-backdrop {
  z-index: 10080;
  padding: 20px;
  background: rgba(27, 40, 59, .32);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
}
.account-operation-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 22px;
  display: grid;
  gap: 18px;
  overflow: auto;
  border: 1px solid rgba(194, 208, 227, .88);
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 86px rgba(25, 45, 72, .24);
  color: var(--v3-ink);
}
.account-operation-profile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}
.account-operation-avatar {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: #eef3f9;
}
.account-operation-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-operation-profile > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.account-operation-profile small { color: #7b899d; font-size: 10px; }
.account-operation-profile strong { overflow: hidden; color: #182a43; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-operation-spinner { width: 42px; height: 42px; justify-self: end; }
.account-operation-spinner .ui-icon { width: 20px; height: 20px; color: #20814c; }
.account-operation-backdrop.is-error .account-operation-spinner { background: #fff0f2; }
.account-operation-backdrop.is-error .account-operation-spinner .ui-icon { color: #b74556; }
.account-operation-copy { display: grid; gap: 7px; }
.account-operation-copy h2 { margin: 0; color: #12233b; font-size: 19px; line-height: 1.35; }
.account-operation-copy p { margin: 0; color: #68788e; font-size: 12px; line-height: 1.65; }
.account-operation-steps { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.account-operation-steps li {
  min-height: 46px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #fafcff;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.account-operation-steps b {
  width: 28px;
  height: 28px;
  display: grid;
  border-radius: 9px;
  background: #eef3f9;
  color: #78879a;
  font-size: 11px;
  place-items: center;
}
.account-operation-steps b .ui-icon { width: 15px; height: 15px; }
.account-operation-steps span { color: #344861; font-size: 12px; font-weight: 760; }
.account-operation-steps em { color: #8b98a9; font-size: 10px; font-style: normal; }
.account-operation-steps li.is-current { border-color: #93b7ef; background: #f3f7ff; box-shadow: 0 0 0 3px rgba(20, 88, 212, .06); }
.account-operation-steps li.is-current b { background: #dfebff; color: var(--v3-primary); }
.account-operation-steps li.is-current em { color: var(--v3-primary); font-weight: 750; }
.account-operation-steps li.is-complete { border-color: #d7eadf; background: #f7fcf9; }
.account-operation-steps li.is-complete b { background: #dff3e7; color: #20814c; }
.account-operation-steps li.is-complete em { color: #20814c; }
.account-operation-steps li.is-error { border-color: #efcbd1; background: #fff7f8; }
.account-operation-steps li.is-error b { background: #ffe7ea; color: #b74556; }
.account-operation-steps li.is-error em { color: #b74556; }
.account-operation-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.account-operation-actions[hidden] { display: none; }
.account-operation-actions .v3-btn { min-width: 108px; }

@media (max-width: 560px) {
  .account-operation-backdrop { padding: 10px; align-items: end; }
  .account-operation-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    gap: 15px;
    border-radius: 20px 20px 14px 14px;
  }
  .account-operation-profile { grid-template-columns: 44px minmax(0, 1fr) 38px; }
  .account-operation-avatar { width: 44px; height: 44px; border-radius: 12px; }
  .account-operation-spinner { width: 38px; height: 38px; }
  .account-operation-copy h2 { font-size: 17px; }
  .account-operation-steps li { min-height: 44px; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; }
  .account-operation-steps b { width: 26px; height: 26px; }
  .account-operation-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .account-operation-actions .v3-btn { width: 100%; min-width: 0; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-operation-modal,
  .account-operation-steps li { transition: none; }
}

/* Non-library pages are visibly locked to the active service account. */
.operation-scope-lock {
  min-height: 52px;
  padding: 8px 13px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #fff;
}
.operation-scope-lock > span {
  color: var(--v3-muted);
  font-size: 11px;
  font-weight: 800;
}
.operation-scope-lock > strong {
  padding: 7px 10px;
  border-radius: 9px;
  background: #eaf2ff;
  color: var(--v3-primary);
  font-size: 12px;
}
.operation-scope-lock > em {
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-control-row .operation-scope-lock { min-width: 0; }

/* Material table: native table geometry, fixed columns and strong row rhythm. */
.route-library .library-workspace.is-table-mode {
  grid-template-columns: 168px minmax(680px, 1fr) 276px;
}
.route-library .library-package-table {
  overflow: auto;
  max-height: calc(100vh - 260px);
  border-color: #d8e2ef;
  border-radius: 12px;
}
.route-library .library-package-table table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #fff;
}
.route-library .library-package-table .col-preview { width: 68px; }
.route-library .library-package-table .col-title { width: 28%; }
.route-library .library-package-table .col-account { width: 18%; }
.route-library .library-package-table .col-status { width: 124px; }
.route-library .library-package-table .col-assets { width: 19%; }
.route-library .library-package-table .col-date { width: 92px; }
.route-library .library-package-table .col-actions { width: 68px; }
.route-library .library-package-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}
.route-library .library-package-table th {
  height: 42px;
  padding: 0 12px;
  border-right: 1px solid #e5ebf3;
  border-bottom: 1px solid #d8e2ef;
  background: #f4f7fb;
  color: #526174;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
}
.route-library .library-package-table th:last-child { border-right: 0; text-align: center; }
.route-library .library-table-row {
  display: table-row;
  min-height: 0;
  padding: 0;
  border: 0;
  background: #fff;
}
.route-library .library-table-row:nth-child(even) { background: #fbfcfe; }
.route-library .library-table-row:hover { background: #f3f7fd; }
.route-library .library-table-row.is-selected {
  background: #eaf2ff;
  box-shadow: none;
}
.route-library .library-table-row td {
  height: 74px;
  padding: 8px 12px;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #e4eaf2;
  vertical-align: middle;
}
.route-library .library-table-row td:first-child {
  box-shadow: inset 0 0 transparent;
}
.route-library .library-table-row.is-selected td:first-child {
  box-shadow: inset 3px 0 var(--v3-primary);
}
.route-library .library-table-row td:last-child { border-right: 0; text-align: center; }
.route-library .library-table-row:last-child td { border-bottom: 0; }
.route-library .library-table-preview { width: 44px; height: 54px; border-radius: 8px; }
.route-library .library-table-title strong,
.route-library .library-table-account strong { font-size: 11px; }
.route-library .library-table-assets,
.route-library .library-table-date { font-size: 10px; }
.route-library .library-table-actions button {
  min-width: 42px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #f0cfd5;
  border-radius: 8px;
  background: #fff7f8;
  color: #b44555;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.route-library .library-table-actions button:hover { border-color: #e6aeb8; background: #fff0f2; }

.route-library .library-card-hint > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.route-library .library-card-trash {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b05260;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.route-library .library-card-trash:hover { color: #8f2f3e; text-decoration: underline; }
.route-library .library-inspector-danger {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #f0d7dc;
  border-radius: 12px;
  background: #fffafb;
}
.route-library .library-inspector-danger > div { min-width: 0; display: grid; gap: 3px; }
.route-library .library-inspector-danger strong { color: #8f3948; font-size: 11px; }
.route-library .library-inspector-danger span { color: #9a737a; font-size: 9px; }
.route-library .library-inspector-danger button {
  min-width: 70px;
  height: 30px;
  border: 1px solid #e6b9c1;
  border-radius: 8px;
  background: #fff;
  color: #a23f4f;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.cloud-remove-dialog { display: grid; gap: 16px; }
.cloud-remove-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: #f5f7fb;
}
.cloud-remove-summary strong { color: #18243a; font-size: 15px; }
.cloud-remove-summary span,
.cloud-remove-option em,
.cloud-remove-warning { color: #748198; font-size: 12px; line-height: 1.65; }
.cloud-remove-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid #efd1d7;
  border-radius: 12px;
  background: #fffafb;
  cursor: pointer;
}
.cloud-remove-option input { margin-top: 3px; }
.cloud-remove-option span { display: grid; gap: 4px; }
.cloud-remove-option strong { color: #983847; }
.cloud-remove-option em { font-style: normal; }
.cloud-remove-confirm { display: grid; gap: 7px; }
.cloud-remove-confirm[hidden] { display: none; }
.cloud-remove-confirm span { color: #6e7789; font-size: 12px; font-weight: 750; }
.cloud-remove-confirm input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddb8bf;
  border-radius: 9px;
  outline: 0;
}
.cloud-remove-confirm input:focus {
  border-color: #b64456;
  box-shadow: 0 0 0 3px rgba(182, 68, 86, .1);
}
.cloud-remove-warning {
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff6e8;
  color: #8a611e;
}

/* Recoverable material deletion. */
.route-library .library-trash-toolbar {
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #dfe7f2;
  border-radius: 13px;
  background: #fff;
}
.route-library .library-trash-toolbar > div { display: grid; gap: 4px; }
.route-library .library-trash-toolbar > div strong { color: var(--v3-ink); font-size: 15px; }
.route-library .library-trash-toolbar > div span { color: var(--v3-muted); font-size: 10px; }
.route-library .library-trash-toolbar label { display: grid; gap: 4px; color: var(--v3-muted); font-size: 9px; }
.route-library .library-trash-toolbar select { min-width: 190px; height: 34px; border: 1px solid #d7e0ec; border-radius: 9px; background: #fff; color: var(--v3-ink); font-size: 11px; }
.route-library .library-trash-notice {
  margin: 10px 0;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
  background: #fff8e8;
  color: #7c642d;
  font-size: 10px;
}
.route-library .library-trash-notice strong { color: #9b3e4d; }
.route-library .library-trash-list { display: grid; gap: 8px; }
.route-library .library-trash-list article {
  min-height: 78px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #fff;
}
.route-library .library-trash-icon {
  width: 36px;
  height: 36px;
  display: grid;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 17px;
  place-items: center;
}
.route-library .library-trash-main { min-width: 0; display: grid; gap: 3px; }
.route-library .library-trash-main strong,
.route-library .library-trash-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-library .library-trash-main strong { color: var(--v3-ink); font-size: 12px; }
.route-library .library-trash-main span { color: #66758a; font-size: 10px; }
.route-library .library-trash-main em { color: #98a4b4; font-size: 9px; font-style: normal; }
.route-library .library-trash-actions { display: flex; gap: 7px; }
.route-library .library-trash-actions button {
  height: 32px;
  padding: 0 11px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
  color: #40516a;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.route-library .library-trash-actions button:hover { background: #f5f8fc; }
.route-library .library-trash-actions button.is-danger { border-color: #efcbd2; color: #ad4252; }

@media (max-width: 820px) {
  .operation-scope-lock { grid-template-columns: auto 1fr; }
  .operation-scope-lock > em { grid-column: 1 / -1; white-space: normal; }
  .route-library .library-trash-toolbar,
  .route-library .library-trash-notice { align-items: stretch; flex-direction: column; }
  .route-library .library-trash-toolbar select { width: 100%; }
  .route-library .library-trash-list article { grid-template-columns: 38px minmax(0, 1fr); }
  .route-library .library-trash-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-account-menu,
  .v3-account-mini-chevron { transition: none; }
}

@media (max-width: 760px) {
  .route-library .library-package-list .library-package-card {
    min-height: 0;
    grid-template-columns: 116px minmax(0, 1fr);
  }
  .route-library .library-package-list .library-package-cover { min-height: 148px; }
}
@media (max-width: 520px) {
  .route-library .library-package-list .library-package-card { grid-template-columns: 1fr; }
  .route-library .library-package-list .library-package-cover {
    min-height: 190px;
    aspect-ratio: 16 / 10;
  }
}

/* Shared knowledge and material graph workspace. */
.knowledge-view-switch {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: #f5f7fb;
  gap: 4px;
}
.knowledge-view-switch button {
  min-width: 88px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--v3-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.knowledge-view-switch button.is-active {
  background: #fff;
  color: var(--v3-primary);
  box-shadow: 0 4px 12px rgba(32, 73, 139, .09);
}
.graph-workbench {
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(29, 70, 132, .06);
}
.graph-workbench-head {
  display: flex;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--v3-line);
  background: #fbfcff;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.graph-workbench-head > div:first-child {
  display: grid;
  max-width: 420px;
  gap: 4px;
}
.graph-workbench-head > div:first-child strong {
  color: var(--v3-ink);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}
.graph-tools {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.graph-tools label {
  display: grid;
  color: var(--v3-muted);
  font-size: 9px;
  font-weight: 800;
  gap: 4px;
}
.graph-tools input,
.graph-tools select {
  width: 150px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--v3-line);
  border-radius: 9px;
  background: #fff;
  color: var(--v3-ink);
  font-size: 11px;
}
.graph-tools select { width: 128px; }
.graph-tools .mini { min-height: 34px; padding: 0 10px; font-size: 10px; }
.graph-legend {
  display: flex;
  overflow-x: auto;
  min-height: 42px;
  padding: 9px 16px;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
  gap: 14px;
  align-items: center;
}
.graph-legend span {
  display: inline-flex;
  color: var(--v3-muted);
  font-size: 9px;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
}
.graph-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--graph-color);
}
.graph-stage {
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(0, 1fr) 292px;
}
.graph-canvas {
  position: relative;
  min-width: 0;
  height: 650px;
  background:
    radial-gradient(circle at 1px 1px, rgba(103, 126, 157, .15) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, #fbfcff, #f6f8fc);
}
.graph-loading,
.graph-error {
  position: absolute;
  inset: 0;
  display: grid;
  padding: 30px;
  color: var(--v3-muted);
  font-size: 12px;
  text-align: center;
  place-items: center;
}
.graph-error { color: #9b5f5f; }
.graph-detail {
  display: grid;
  overflow-y: auto;
  max-height: 650px;
  padding: 16px;
  border-left: 1px solid var(--v3-line);
  background: #fbfcff;
  align-content: start;
  gap: 13px;
}
.graph-detail-empty {
  display: grid;
  min-height: 430px;
  color: var(--v3-muted);
  text-align: center;
  place-items: center;
  align-content: center;
  gap: 9px;
}
.graph-detail-empty > span { color: #9bb7e8; font-size: 42px; }
.graph-detail-empty strong { color: var(--v3-ink); font-size: 15px; }
.graph-detail-empty p { max-width: 210px; margin: 0; font-size: 10px; line-height: 1.65; }
.graph-detail-node {
  display: grid;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--v3-line);
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.graph-detail-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--graph-color) 14%, white);
  color: var(--graph-color);
  font-size: 16px;
  font-weight: 900;
  place-items: center;
}
.graph-detail-node > div:last-child { display: grid; min-width: 0; gap: 3px; }
.graph-detail-node span { color: var(--graph-color); font-size: 9px; font-weight: 850; }
.graph-detail-node strong { color: var(--v3-ink); font-size: 13px; line-height: 1.5; }
.graph-detail-node em { overflow: hidden; color: var(--v3-muted); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.graph-detail-excerpt {
  margin: 0;
  padding: 11px;
  border-radius: 10px;
  background: #fff;
  color: #5c6878;
  font-size: 10px;
  line-height: 1.65;
}
.graph-detail-meta {
  display: grid;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--v3-line);
  border-radius: 11px;
  background: #fff;
  gap: 8px;
}
.graph-detail-meta div {
  display: grid;
  min-width: 0;
  grid-template-columns: 65px minmax(0, 1fr);
  gap: 8px;
}
.graph-detail-meta dt { color: var(--v3-muted); font-size: 9px; }
.graph-detail-meta dd {
  overflow: hidden;
  margin: 0;
  color: var(--v3-ink);
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.graph-detail-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.graph-detail-actions .mini { min-height: 34px; font-size: 10px; }
.graph-detail-path {
  padding: 11px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
}
.graph-detail-path summary { color: var(--v3-muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.graph-detail-path span { display: block; margin-top: 8px; color: var(--v3-muted); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.route-library .library-workspace.is-graph-mode {
  grid-template-columns: 190px minmax(0, 1fr);
}
.route-library .library-workspace.is-graph-mode .library-browser { padding: 16px; }
.route-library .library-workspace.is-graph-mode .library-shelf-toolbar {
  grid-template-columns: 145px 145px minmax(180px, 1fr) auto;
}
.route-library .library-workspace.is-graph-mode .graph-stage { min-height: 610px; }
.route-library .library-workspace.is-graph-mode .graph-canvas { height: 610px; }
.route-library .library-workspace.is-graph-mode .graph-detail { max-height: 610px; }

@media (max-width: 1120px) {
  .graph-workbench-head { align-items: stretch; flex-direction: column; }
  .graph-tools { justify-content: flex-start; }
  .graph-stage { grid-template-columns: 1fr; }
  .graph-detail {
    max-height: none;
    border-top: 1px solid var(--v3-line);
    border-left: 0;
  }
  .graph-detail-empty { min-height: 180px; }
}
@media (max-width: 760px) {
  .graph-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-tools label,
  .graph-tools input,
  .graph-tools select { width: 100%; }
  .graph-canvas { height: 520px; }
  .route-library .library-workspace.is-graph-mode { grid-template-columns: 1fr; }
  .route-library .library-workspace.is-graph-mode .graph-canvas { height: 520px; }
}

/* LingSi star map: quiet by default, expressive on interaction. */
.graph-page-heading {
  display: flex;
  margin: 10px 0 14px;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.graph-page-heading > div { display: grid; gap: 3px; }
.graph-page-heading span {
  color: #718096;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.graph-page-heading h1 {
  margin: 0;
  color: #182337;
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 720;
  letter-spacing: -.035em;
}
.graph-workbench {
  position: relative;
  overflow: hidden;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 16px 44px rgba(57, 78, 111, .055);
}
.graph-workbench-head {
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 58px;
  padding: 10px 13px 10px 17px;
  border-bottom: 1px solid rgba(226, 232, 240, .78);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.graph-workbench-head > div:first-child {
  display: grid;
  max-width: 440px;
  gap: 2px;
}
.graph-workbench-head > div:first-child strong {
  color: #1f2a3d;
  font-size: 12px;
  font-weight: 720;
}
.graph-workbench-head > div:first-child span {
  color: #8895a8;
  font-size: 9px;
  line-height: 1.5;
}
.graph-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.graph-tools .graph-search {
  display: flex;
  width: 178px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #fff;
  align-items: center;
  gap: 6px;
}
.graph-tools .graph-search > span {
  color: #8a99ad;
  font-size: 18px;
  line-height: 1;
}
.graph-tools .graph-search input {
  width: 100%;
  min-height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #2c384a;
  font-size: 10px;
}
.graph-tools select {
  width: 112px;
  min-height: 34px;
  padding: 0 26px 0 10px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  outline: 0;
  background-color: #fff;
  color: #5d6b7e;
  font-size: 9px;
}
.graph-tools .graph-icon-button {
  min-width: 48px;
  min-height: 34px;
  padding: 0 10px;
  border-color: #e3e8f0;
  border-radius: 10px;
  background: #fff;
  color: #66758a;
  font-size: 9px;
}
.graph-tools .graph-icon-button:hover,
.graph-tools .graph-icon-button.is-active {
  border-color: #bfd2f4;
  background: #eef5ff;
  color: #2563eb;
}
.graph-tools .graph-icon-button:disabled {
  opacity: .38;
  cursor: default;
}
.graph-tools .graph-fullscreen-button {
  display: inline-flex;
  min-width: 66px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.graph-tools .graph-fullscreen-button .ui-icon {
  width: 14px;
  height: 14px;
}
.graph-workbench:fullscreen,
.graph-workbench:-webkit-full-screen,
.graph-workbench.is-fullscreen-fallback {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
}
.graph-workbench.is-fullscreen-fallback {
  position: fixed;
  z-index: 1200;
  inset: 0;
}
.graph-workbench:fullscreen .graph-stage,
.graph-workbench:-webkit-full-screen .graph-stage,
.graph-workbench.is-fullscreen-fallback .graph-stage {
  min-height: calc(100vh - 59px);
}
.graph-workbench:fullscreen .graph-canvas,
.graph-workbench:-webkit-full-screen .graph-canvas,
.graph-workbench.is-fullscreen-fallback .graph-canvas {
  height: calc(100vh - 59px);
}
.graph-stage {
  position: relative;
  display: block;
  min-height: 660px;
  background: #f8fafc;
}
.graph-canvas {
  width: 100%;
  height: 660px;
  background:
    radial-gradient(circle at 48% 42%, rgba(219, 234, 254, .38), transparent 30%),
    radial-gradient(circle at 72% 64%, rgba(237, 233, 254, .32), transparent 25%),
    #f8fafc;
}
.graph-canvas::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 48%, rgba(248, 250, 252, .7) 100%);
}
.graph-canvas.is-graph-growing::after {
  background:
    radial-gradient(circle at center, transparent 42%, rgba(248, 250, 252, .62) 100%),
    radial-gradient(circle at 50% 50%, rgba(219, 234, 254, .12), transparent 54%);
}
.graph-canvas.is-node-dragging {
  cursor: grabbing;
  user-select: none;
}
.graph-canvas-meta {
  position: absolute;
  z-index: 4;
  bottom: 14px;
  left: 15px;
  display: flex;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(226, 232, 240, .88);
  border-radius: 11px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 7px 20px rgba(51, 65, 85, .06);
  backdrop-filter: blur(12px);
  align-items: center;
  gap: 12px;
}
.graph-canvas-meta > span {
  padding-left: 11px;
  border-left: 1px solid #e7ebf1;
  color: #8a96a8;
  font-size: 8px;
  white-space: nowrap;
}
.graph-legend {
  display: flex;
  overflow: visible;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
  gap: 10px;
}
.graph-legend span {
  display: inline-flex;
  color: #748195;
  font-size: 8px;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
}
.graph-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--graph-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--graph-color) 13%, transparent);
}
.graph-canvas-hint {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 20px;
  color: #9aa5b5;
  font-size: 8px;
  pointer-events: none;
}
.graph-detail {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  display: grid;
  overflow-y: auto;
  width: min(310px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 18px;
  border: 1px solid rgba(222, 229, 239, .92);
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 20px 52px rgba(39, 55, 81, .14);
  backdrop-filter: blur(18px);
  align-content: start;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px) scale(.985);
  transition: opacity .2s ease, transform .24s ease;
}
.graph-detail.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}
.graph-detail-empty { display: none; }
.graph-detail-close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f5f9;
  color: #7b8798;
  font-size: 16px;
  cursor: pointer;
}
.graph-detail-node {
  display: grid;
  padding: 2px 28px 12px 0;
  border-bottom: 1px solid #edf0f5;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.graph-detail-icon {
  width: 34px;
  height: 34px;
  border: 6px solid color-mix(in srgb, var(--graph-color) 14%, white);
  border-radius: 50%;
  background: var(--graph-color);
}
.graph-detail-node span { color: #718096; font-size: 8px; font-weight: 700; }
.graph-detail-node strong { color: #202b3d; font-size: 12px; line-height: 1.45; }
.graph-detail-node em { color: #94a0b1; font-size: 8px; }
.graph-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.graph-progress span {
  padding: 7px 4px;
  border-radius: 8px;
  background: #f1f4f8;
  color: #a0a9b6;
  font-size: 8px;
  text-align: center;
}
.graph-progress span.is-done {
  background: #edf4ff;
  color: #3265b5;
}
.graph-detail-excerpt,
.graph-detail-meta,
.graph-detail-path {
  border-color: #edf0f5;
  background: #f8fafc;
}
.graph-detail-actions .mini {
  min-height: 32px;
  border-radius: 9px;
  font-size: 9px;
}
.route-library .library-workspace.is-graph-mode .library-browser { padding: 12px; }
.route-library .library-workspace.is-graph-mode .graph-stage { min-height: 640px; }
.route-library .library-workspace.is-graph-mode .graph-canvas { height: 640px; }

@media (max-width: 1120px) {
  .graph-workbench-head { align-items: flex-start; }
  .graph-stage { display: block; }
  .graph-detail {
    top: 12px;
    right: 12px;
    max-height: calc(100% - 24px);
    border: 1px solid rgba(222, 229, 239, .92);
  }
}
@media (max-width: 760px) {
  .graph-page-heading h1 { font-size: 21px; }
  .graph-workbench-head { padding: 12px; }
  .graph-tools {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .graph-tools .graph-search { flex: 1 1 180px; width: auto; }
  .graph-tools select { flex: 1 1 105px; width: auto; }
  .graph-tools .graph-icon-button { min-width: 42px; padding: 0 7px; }
  .graph-tools .graph-fullscreen-button { min-width: 58px; }
  .graph-canvas,
  .route-library .library-workspace.is-graph-mode .graph-canvas { height: 530px; }
  .graph-stage,
  .route-library .library-workspace.is-graph-mode .graph-stage { min-height: 530px; }
  .graph-canvas-hint { display: none; }
  .graph-canvas-meta { right: 10px; bottom: 10px; left: 10px; justify-content: space-between; }
}

.graph-workbench:fullscreen .graph-stage,
.graph-workbench:-webkit-full-screen .graph-stage,
.graph-workbench.is-fullscreen-fallback .graph-stage {
  min-height: calc(100vh - 59px) !important;
}

.graph-workbench:fullscreen .graph-canvas,
.graph-workbench:-webkit-full-screen .graph-canvas,
.graph-workbench.is-fullscreen-fallback .graph-canvas {
  height: calc(100vh - 59px) !important;
}

@media (prefers-reduced-motion: reduce) {
  .graph-canvas { scroll-behavior: auto; }
}

/* Mobile application shell.
   Kept outside the desktop layout and enabled only at the compact breakpoint. */
.mobile-appbar,
.mobile-bottom-nav,
.mobile-account-sheet,
.mobile-sheet-backdrop { display: none; }
.mobile-library-inspector-close { display: none; }
.mobile-account-tabs { display: none; }

.account-search-card { max-width: 920px; }
.account-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.account-search-row .field { min-width: 0; min-height: 46px; }
.account-search-row .btn { min-width: 112px; }
.account-search-card .result-area { margin-top: 16px; }
.account-search-link-hint {
  margin: 9px 2px 0;
  color: #728197;
  font-size: 12px;
  line-height: 1.55;
}
.douyin-search-empty,
.douyin-search-recovery {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dce5f1;
  border-radius: 15px;
  background: #f8fafc;
}
.douyin-search-empty {
  justify-items: start;
  color: #627087;
}
.douyin-search-empty strong { color: #24364f; }
.douyin-search-empty span { font-size: 13px; line-height: 1.65; }
.douyin-search-empty.is-danger {
  border-color: #f0d7d5;
  background: #fff9f8;
}
.douyin-search-recovery {
  border-color: #cfe0fb;
  background: linear-gradient(135deg, #f7fbff 0%, #f4f8ff 100%);
  color: #53657d;
}
.douyin-search-recovery-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}
.douyin-search-recovery-heading > div { display: grid; gap: 3px; }
.douyin-search-recovery-heading strong { color: #173b74; font-size: 15px; }
.douyin-search-recovery-heading span { color: #61728a; font-size: 12px; }
.douyin-search-recovery-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #087f5b;
  background: #dff7ed;
}
.douyin-search-recovery-icon svg { width: 17px; height: 17px; }
.douyin-search-recovery p { margin: 0; font-size: 13px; line-height: 1.7; }
.douyin-search-recovery small { color: #718198; line-height: 1.6; }
.douyin-search-recovery-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.douyin-search-recovery-actions .v3-btn[disabled] { cursor: not-allowed; opacity: .62; }
.douyin-search-recovery.is-compact { padding: 15px; text-align: left; }
.douyin-search-recovery.is-compact .douyin-search-recovery-actions { justify-content: center; }
.signal-type-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.signal-type-tabs .v3-btn { display: inline-flex; align-items: center; gap: 7px; }
.signal-type-tabs svg { width: 17px; height: 17px; }
.signals-workspace .result-area { margin-top: 16px; }

@media (max-width: 767px) {
  :root {
    --mobile-page-gutter: 14px;
    --mobile-nav-height: 64px;
  }

  html { background: var(--v3-bg); }
  body {
    min-width: 320px;
    background: var(--v3-bg);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
  }
  body.mobile-sheet-open { overflow: hidden; }
  body.mobile-library-detail-open { overflow: hidden; }
  body.mobile-hot-radar-detail-open { overflow: hidden; }

  .v3-shell {
    display: block;
    min-height: 100dvh;
    overflow: visible;
    background: var(--v3-bg);
  }
  .v3-sidebar,
  .v3-topbar { display: none; }
  .v3-shell > .main {
    width: 100%;
    min-height: calc(100dvh - 58px);
    overflow: visible;
  }
  .v3-shell .content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding:
      12px
      var(--mobile-page-gutter)
      calc(var(--mobile-nav-height) + 30px + env(safe-area-inset-bottom));
    gap: 14px;
    overflow: visible;
  }

  .mobile-appbar {
    position: sticky;
    z-index: 45;
    top: 0;
    min-height: calc(58px + env(safe-area-inset-top));
    padding:
      env(safe-area-inset-top)
      var(--mobile-page-gutter)
      0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid rgba(219, 227, 239, .88);
    background: rgba(248, 250, 253, .92);
    box-shadow: 0 5px 18px rgba(35, 52, 76, .045);
    backdrop-filter: blur(18px);
  }
  .mobile-appbar-leading { width: 42px; height: 42px; display: grid; place-items: center; }
  .mobile-brand-mark,
  .mobile-back-button,
  .mobile-account-trigger {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: transparent;
  }
  .mobile-brand-mark img { width: 34px; height: 34px; object-fit: contain; }
  .mobile-back-button { border: 1px solid var(--v3-line); background: #fff; color: var(--v3-ink); }
  .mobile-back-button svg { width: 19px; height: 19px; }
  .mobile-appbar-title { min-width: 0; display: grid; justify-items: center; line-height: 1.25; }
  .mobile-appbar-title strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--v3-ink);
    font-size: 16px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-appbar-title span {
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    color: var(--v3-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-account-trigger { position: relative; cursor: pointer; }
  .mobile-account-trigger img {
    width: 36px;
    height: 36px;
    border: 2px solid #fff;
    border-radius: 12px;
    background: #eef2f7;
    box-shadow: 0 5px 15px rgba(45, 66, 96, .12);
    object-fit: cover;
  }
  .mobile-account-trigger i {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #55a475;
  }
  .mobile-account-trigger i.is-warn { background: #c17b3c; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 44;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid rgba(213, 223, 236, .92);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 -8px 26px rgba(35, 52, 76, .07);
    backdrop-filter: blur(20px);
  }
  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 54px;
    padding: 4px 1px 3px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #7b8798;
    cursor: pointer;
  }
  .mobile-bottom-nav button > span {
    width: 30px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
  }
  .mobile-bottom-nav svg { width: 19px; height: 19px; }
  .mobile-bottom-nav strong {
    overflow: hidden;
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-bottom-nav button.active { color: var(--v3-primary); }
  .mobile-bottom-nav button.active > span { background: var(--v3-primary-soft); }

  .mobile-sheet-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: block;
    opacity: 0;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(2px);
    transition: opacity .2s ease;
  }
  .mobile-sheet-backdrop.is-open { opacity: 1; }
  .mobile-account-sheet {
    position: fixed;
    z-index: 71;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(82dvh, 720px);
    padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
    display: grid;
    overflow-y: auto;
    border: 1px solid rgba(213, 223, 236, .95);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -22px 60px rgba(20, 37, 63, .2);
    transform: translateY(105%);
    transition: transform .22s ease;
    align-content: start;
  }
  .mobile-account-sheet[hidden],
  .mobile-sheet-backdrop[hidden] { display: none; }
  .mobile-account-sheet.is-open { transform: translateY(0); }
  .mobile-account-sheet::before {
    width: 40px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 999px;
    background: #d7dee8;
    content: "";
  }
  .mobile-account-sheet > header {
    min-height: 54px;
    padding: 4px 2px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #edf1f6;
  }
  .mobile-account-sheet > header > div { min-width: 0; display: grid; gap: 2px; }
  .mobile-account-sheet > header span { color: var(--v3-muted); font-size: 10px; }
  .mobile-account-sheet > header strong {
    overflow: hidden;
    color: var(--v3-ink);
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-account-sheet > header button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
  }
  .mobile-account-sheet-body { padding-top: 8px; }
  .mobile-account-sheet .v3-account-group { max-height: 310px; overflow-y: auto; }
  .mobile-account-sheet .v3-account-menu-footer { grid-template-columns: 1fr; }
  .mobile-account-sheet .v3-account-menu-footer .v3-account-footer-action.is-danger { display: none; }
  .mobile-account-sheet-shortcuts {
    margin-top: 10px;
    padding-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-top: 1px solid #edf1f6;
  }
  .mobile-account-sheet-shortcuts button {
    min-width: 0;
    min-height: 62px;
    padding: 10px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid var(--v3-line);
    border-radius: 13px;
    background: #f8fafc;
    color: var(--v3-ink);
    text-align: left;
  }
  .mobile-account-sheet-shortcuts svg { width: 20px; height: 20px; color: var(--v3-primary); }
  .mobile-account-sheet-shortcuts button.is-danger { border-color: #f0d5d8; background: #fff7f8; color: #8e3540; }
  .mobile-account-sheet-shortcuts button.is-danger svg { color: #b54755; }
  .mobile-account-sheet-shortcuts span { min-width: 0; display: grid; gap: 2px; }
  .mobile-account-sheet-shortcuts strong { font-size: 12px; }
  .mobile-account-sheet-shortcuts em {
    overflow: hidden;
    color: var(--v3-muted);
    font-size: 9px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-account-tabs {
    position: sticky;
    z-index: 39;
    top: calc(58px + env(safe-area-inset-top));
    margin: -12px calc(var(--mobile-page-gutter) * -1) 2px;
    padding: 7px var(--mobile-page-gutter);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(219, 227, 239, .86);
    background: rgba(248, 250, 253, .94);
    box-shadow: 0 6px 16px rgba(35, 52, 76, .035);
    scrollbar-width: none;
    backdrop-filter: blur(16px);
  }
  .mobile-account-tabs::-webkit-scrollbar { display: none; }
  .mobile-account-tabs button {
    min-width: max-content;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--v3-muted);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
  }
  .mobile-account-tabs button.active {
    border-color: #d4e1f4;
    background: #eaf2ff;
    color: var(--v3-primary);
  }

  /* Compact page rhythm: these rules only reshape existing components. */
  .v3-shell .content :is(button, input, select, textarea) { touch-action: manipulation; }
  .v3-shell .content :is(input, select, textarea) { font-size: 16px; }
  .v3-shell .content :is(.v3-card, .panel, .hero-panel, .review-result-card, .review-chart-card) {
    border-radius: 15px;
    box-shadow: 0 7px 22px rgba(45, 66, 96, .045);
  }
  .v3-shell .content :is(.v3-card, .panel) { padding: 16px; }
  .v3-dashboard-head,
  .v3-page-intro {
    padding: 4px 0 0;
    gap: 12px;
    align-items: stretch;
    flex-direction: column;
  }
  .v3-dashboard-head h1,
  .v3-page-intro h1 {
    margin: 3px 0 5px;
    font-size: 24px;
    line-height: 1.22;
  }
  .v3-dashboard-head p,
  .v3-page-intro p { font-size: 12px; line-height: 1.65; }
  .v3-page-intro .v3-card-actions {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-wrap: nowrap;
  }
  .v3-page-intro .v3-card-actions .v3-btn { min-height: 44px; white-space: nowrap; }

  .v3-command-hero {
    min-height: 0;
    padding: 21px 18px;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }
  .v3-command-copy h1 { max-width: 310px; font-size: clamp(27px, 8vw, 34px); line-height: 1.15; }
  .v3-command-copy p { margin-top: 10px; font-size: 12px; line-height: 1.6; }
  .v3-command-kicker { font-size: 9px; }
  .v3-command-actions { margin-top: 18px; align-items: stretch; flex-direction: column; }
  .v3-command-primary,
  .v3-command-link { min-height: 44px; justify-content: center; }
  .v3-command-summary { display: none; }
  .dashboard-data-overview { padding: 15px; gap: 11px; }
  .dashboard-data-head > div > strong { font-size: 14px; }
  .dashboard-data-primary article { padding: 10px 9px; }
  .dashboard-data-primary strong { font-size: 19px; }
  .dashboard-data-primary .is-featured strong { font-size: 27px; }
  .v3-quick-action-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 5px;
    gap: 4px;
    border-radius: 15px;
  }
  .v3-quick-action-bar button {
    min-width: 0;
    min-height: 70px;
    padding: 9px 5px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0 !important;
    border-radius: 11px !important;
    text-align: center;
  }
  .v3-quick-action-bar button:active { background: var(--v3-primary-soft); }
  .v3-quick-action-bar svg { width: 20px; height: 20px; }
  .v3-quick-action-bar span { display: block; }
  .v3-quick-action-bar strong { display: block; font-size: 11px; }
  .v3-quick-action-bar em { display: none; }
  .v3-health-strip { min-height: 50px; padding: 0 13px; border-radius: 14px; }
  .v3-health-strip span:not(.health-dot),
  .v3-health-strip em { display: none; }
  .v3-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .v3-stat-grid article { min-height: 88px; padding: 14px; border-radius: 14px; }
  .v3-stat-grid strong { font-size: 25px; }
  .v3-stat-grid span { font-size: 11px; line-height: 1.4; }
  .v3-dashboard-grid,
  .v3-account-home-grid,
  .v3-tool-grid,
  .v3-status-grid,
  .review-chart-grid { grid-template-columns: 1fr; }
  .v3-account-home-card { min-height: 0; }
  .v3-flow-card {
    padding: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .v3-flow-card button { width: auto; min-height: 84px; }
  .v3-flow-card > i { display: none; }

  /* Account discovery and research. */
  .account-search-card { max-width: none; }
  .account-search-card > header { align-items: flex-start; flex-direction: column; }
  .account-search-row { grid-template-columns: 1fr; }
  .account-search-row .btn { width: 100%; min-height: 46px; }
  .account-search-card .user-card {
    padding: 13px;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
  }
  .account-search-card .user-card .avatar { width: 48px; height: 48px; }
  .account-search-card .user-card > .mini { grid-column: 1 / -1; width: 100%; min-height: 44px; }
  .benchmark-directory-card { padding: 14px; }
  .benchmark-directory-card > header { align-items: flex-start; flex-direction: column; }
  .benchmark-bulk-toolbar { align-items: stretch; flex-direction: column; }
  .benchmark-bulk-toolbar .v3-card-actions { width: 100%; }
  .benchmark-bulk-toolbar .v3-btn { flex: 1 1 0; }
  .benchmark-bulk-preview-list > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .benchmark-directory-grid { grid-template-columns: 1fr; gap: 9px; }
  .benchmark-directory-item { padding: 14px; border-radius: 14px; }
  .benchmark-directory-main .avatar { width: 48px; height: 48px; }
  .benchmark-directory-item .v3-card-actions,
  .benchmark-directory-item .v3-btn { width: 100%; }
  .benchmark-directory-item .v3-btn { justify-content: center; }

  .route-account .account-head {
    position: relative;
    padding: 14px;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
  }
  .route-account .account-head .avatar.large { width: 58px; height: 58px; }
  .route-account .user-line.big { align-items: flex-start; flex-direction: column; gap: 3px; }
  .route-account .user-line.big strong { font-size: 19px; }
  .route-account .account-head .tag-row { margin-top: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .route-account .account-head .tag { min-height: 30px; padding: 0 8px; font-size: 10px; }
  .route-account .account-head > .actions {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 3px;
    display: grid;
    grid-template-columns: repeat(4, 44px) minmax(0, 1fr);
    gap: 7px;
  }
  .route-account .account-head > .actions .service-picker {
    grid-column: 1 / -1;
    width: 100%;
  }
  .route-account .account-head > .actions :is(#batch-transcribe, #generate-workflow-command) {
    grid-column: span 2;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
  }
  .route-account .account-workbench-tabs {
    margin-right: calc(var(--mobile-page-gutter) * -1);
    margin-left: calc(var(--mobile-page-gutter) * -1);
    padding: 0 var(--mobile-page-gutter);
    scrollbar-width: none;
  }
  .route-account .account-workbench-tabs::-webkit-scrollbar { display: none; }
  .route-account .account-workbench-tabs button { min-width: max-content; min-height: 43px; padding: 0 13px; font-size: 12px; }
  .route-account .account-work-pool { padding: 13px; }
  .route-account .account-work-pool .account-list-title { display: grid; grid-template-columns: 1fr; }
  .route-account .account-pool-filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .route-account .account-pool-filters::-webkit-scrollbar { display: none; }
  .route-account .account-pool-filters button { flex: 0 0 auto; white-space: nowrap; }
  .route-account .video-list { gap: 10px; }
  .route-account .video-row,
  :root[data-theme="light"] .route-account .video-row,
  :root[data-theme="dark"] .route-account .video-row {
    position: relative;
    min-height: 190px;
    padding: 11px;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas: "thumb body";
    align-items: stretch;
    gap: 11px;
    border-radius: 14px;
  }
  .route-account .row-check {
    position: absolute;
    z-index: 2;
    top: 17px;
    left: 17px;
    padding: 4px;
    border-radius: 7px;
    background: rgba(255,255,255,.9);
  }
  .route-account .thumb-btn,
  :root[data-theme="light"] .route-account .thumb-btn,
  :root[data-theme="dark"] .route-account .thumb-btn {
    width: 104px;
    height: auto;
    min-height: 178px;
    aspect-ratio: 9 / 16;
    align-self: stretch;
    justify-self: stretch;
    border-radius: 11px;
  }
  .route-account .video-card-body { min-width: 0; gap: 8px; align-content: start; }
  .route-account .video-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .route-account .video-value-badges { gap: 4px; }
  .route-account .video-value-badges span { font-size: 8px; }
  .route-account .video-stats.upgraded { gap: 4px; }
  .route-account .video-stats.upgraded span { min-height: 28px; padding: 4px 6px; font-size: 10px; }
  .route-account .video-card-foot { gap: 7px; }
  .route-account .video-time { font-size: 9px; }
  .route-account .video-row .actions.compact {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 38px;
    grid-template-areas: "select play" "transcribe transcribe";
    gap: 5px;
  }
  .route-account .video-row .actions.compact .mini { min-height: 38px; padding: 0 6px; font-size: 10px; }
  .route-account .video-row .actions.compact [data-transcribe] { width: 100%; }

  /* Monitoring: form, account strip, inspiration cards and timeline. */
  .monitor-auth-warning { align-items: stretch; flex-direction: column; }
  .monitor-auth-warning .v3-btn { width: 100%; margin-left: 0; }
  .monitor-add-card { padding: 14px; }
  .monitor-add-card > header { align-items: flex-start; flex-direction: column; }
  .monitor-safe-note { white-space: normal; line-height: 1.45; }
  .monitor-input-wide > div { grid-template-columns: 1fr; }
  .monitor-input-wide .v3-btn { width: 100%; min-height: 44px; }
  .monitor-config-panel { padding: 10px; }
  .monitor-config-grid { grid-template-columns: 1fr; }
  .monitor-preview {
    padding: 12px;
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: start;
  }
  .monitor-preview img { width: 50px; height: 50px; }
  .monitor-preview > .v3-btn { grid-column: 1 / -1; width: 100%; }
  .monitor-workspace { grid-template-columns: 1fr; gap: 11px; }
  .monitor-list-card { position: static; padding: 13px; overflow: hidden; }
  .monitor-list-card > header { margin-bottom: 9px; }
  .monitor-account-list {
    margin-right: -13px;
    padding-right: 13px;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .monitor-account-list::-webkit-scrollbar { display: none; }
  .monitor-account-item {
    flex: 0 0 min(82vw, 290px);
    scroll-snap-align: start;
  }
  .monitor-profile-card,
  .monitor-inspiration-card,
  .monitor-timeline-card { padding: 14px; }
  .monitor-profile-main { grid-template-columns: 60px minmax(0, 1fr); gap: 11px; align-items: start; }
  .monitor-profile-main > img { width: 60px; height: 60px; }
  .monitor-profile-main h2 { margin: 5px 0 3px; font-size: 19px; }
  .monitor-profile-main p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .monitor-profile-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .monitor-profile-metrics > div { padding: 10px; }
  .monitor-profile-metrics strong { font-size: 18px; }
  .monitor-profile-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .monitor-profile-actions .v3-btn { width: 100%; min-width: 0; padding: 0 8px; }
  .monitor-profile-actions > span { grid-column: 1 / -1; margin-left: 0; }
  .monitor-error { align-items: stretch; flex-direction: column; }
  .monitor-error .v3-btn { width: 100%; margin-left: 0; }
  .monitor-inspiration-card > header,
  .monitor-timeline-card > header { align-items: flex-start; flex-direction: column; }
  .monitor-section-actions { width: 100%; justify-content: space-between; }
  .monitor-inspiration-item {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }
  .monitor-inspiration-cover { width: 58px; height: 78px; }
  .monitor-inspiration-body > strong { white-space: normal; line-height: 1.5; }
  .monitor-inspiration-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-inspiration-actions .v3-btn { width: 100%; min-width: 0; white-space: normal; }
  .monitor-event-filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .monitor-event-filters::-webkit-scrollbar { display: none; }
  .monitor-event-filters button { flex: 0 0 auto; }
  .monitor-event { padding-left: 22px; }
  .monitor-event-body { padding: 12px; }
  .monitor-diff-list > div { grid-template-columns: 1fr; }
  .monitor-diff-list span { font-weight: 800; }

  /* Hot radar uses a list first and opens judgment as a mobile detail sheet. */
  .hot-radar-capabilities {
    margin-right: calc(var(--mobile-page-gutter) * -1);
    padding-right: var(--mobile-page-gutter);
    display: flex;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
  }
  .hot-radar-capabilities::-webkit-scrollbar { display: none; }
  .hot-radar-capabilities > span { flex: 0 0 190px; }
  .hot-radar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hot-radar-workspace { grid-template-columns: 1fr; }
  .hot-radar-list-card { padding: 0 !important; }
  .hot-radar-list-head { padding: 14px; }
  .hot-radar-filter {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .hot-radar-filter::-webkit-scrollbar { display: none; }
  .hot-radar-filter button { flex: 0 0 auto; min-height: 36px; }
  .hot-radar-topic-list { max-height: none; }
  .hot-radar-topic {
    min-height: 88px;
    padding: 12px;
    grid-template-columns: 28px minmax(0, 1fr) 44px;
    gap: 8px;
  }
  .hot-radar-topic-main > strong { white-space: normal; line-height: 1.45; }
  .hot-radar-topic-main > em {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .hot-radar-fit b { font-size: 18px; }
  .hot-radar-detail { display: none; }
  body.mobile-hot-radar-detail-open .hot-radar-detail {
    position: fixed;
    z-index: 66;
    inset: 0;
    display: block;
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    padding:
      calc(12px + env(safe-area-inset-top))
      16px
      calc(88px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #f8fafc;
    overscroll-behavior: contain;
  }
  .hot-radar-detail > h2 { font-size: 22px; }
  .hot-radar-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hot-radar-detail-actions {
    position: sticky;
    z-index: 2;
    bottom: calc(-88px - env(safe-area-inset-bottom));
    margin: 18px -16px -88px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255,255,255,.96);
    border-top: 1px solid var(--v3-line);
    box-shadow: 0 -10px 28px rgba(35, 52, 76, .1);
    backdrop-filter: blur(16px);
  }
  .hot-radar-detail-actions .v3-btn { width: 100%; min-width: 0; }
  .hot-radar-detail-actions .subtle { grid-column: 1 / -1; }

  /* Low-frequency interactive signals retain the same touch language. */
  .signals-page-intro > .v3-btn { width: 100%; min-height: 44px; justify-content: center; }
  .signals-workspace { padding: 14px; }
  .signals-workspace > header { align-items: flex-start; flex-direction: column; }
  .signal-type-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .signal-type-tabs .v3-btn {
    min-width: 0;
    min-height: 64px;
    padding: 8px 3px;
    justify-content: center;
    flex-direction: column;
    font-size: 10px;
  }
  .route-signals .video-list { gap: 10px; }
  .route-signals .video-row { padding: 11px; border-radius: 14px; }

  .route-library .library-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .route-library .library-browser { padding: 10px; }
  .route-library .library-workspace { border-radius: 15px; }
  .route-library .library-shelf-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .route-library .library-shelf-toolbar .library-search-label { grid-column: 1 / -1; }
  .route-library .library-layout-switch { display: none; }
  .route-library .library-package-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .route-library .library-package-list .library-package-card {
    display: block;
    min-height: 0;
    border-radius: 14px;
    grid-template-columns: none;
  }
  .route-library .library-package-list .library-package-cover {
    height: auto;
    min-height: 0;
    aspect-ratio: 9 / 13;
  }
  .route-library .library-package-list .library-package-body {
    padding: 9px;
    gap: 6px;
  }
  .route-library .library-package-heading > span:last-child,
  .route-library .library-package-origin,
  .route-library .library-components,
  .route-library .library-card-hint { display: none; }
  .route-library .library-source-badge { font-size: 9px; }
  .route-library .library-package-title {
    display: -webkit-box;
    min-height: 34px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .route-library .library-cover-stage {
    top: 7px;
    right: 7px;
    max-width: calc(100% - 14px);
    padding: 4px 6px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .route-library .library-play-mark {
    left: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
  }
  .route-library .library-inspector:not(.has-selection) { display: none; }
  .route-library .library-inspector.has-selection {
    position: fixed;
    z-index: 65;
    inset: 0;
    display: grid;
    overflow-y: auto;
    width: 100%;
    max-height: 100dvh;
    padding:
      calc(8px + env(safe-area-inset-top))
      12px
      calc(14px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: #f6f8fb;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 11px;
    overscroll-behavior: contain;
  }
  .route-library .library-inspector.has-selection .library-inspector-head {
    position: sticky;
    z-index: 4;
    top: calc(-8px - env(safe-area-inset-top));
    min-height: calc(58px + env(safe-area-inset-top));
    margin:
      calc(-8px - env(safe-area-inset-top))
      -12px
      0;
    padding:
      env(safe-area-inset-top)
      12px
      0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--v3-line);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 6px 18px rgba(35, 52, 76, .055);
    backdrop-filter: blur(18px);
  }
  .route-library .mobile-library-inspector-close {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    border: 1px solid var(--v3-line);
    border-radius: 13px;
    background: #fff;
    color: var(--v3-ink);
    cursor: pointer;
    place-items: center;
  }
  .route-library .mobile-library-inspector-close svg { width: 19px; height: 19px; }
  .route-library .library-inspector-head > div { min-width: 0; }
  .route-library .library-inspector-head > div span,
  .route-library .library-inspector-head > div strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .route-library .library-inspector-preview {
    width: min(100%, 430px);
    height: min(56dvh, 520px);
    min-height: 340px;
    max-height: none;
    margin: 0 auto;
    border-radius: 17px;
    box-shadow: 0 14px 34px rgba(15, 24, 39, .14);
  }
  .route-library .library-inspector-preview video,
  .route-library .library-inspector-preview img {
    max-height: none;
    object-fit: contain;
  }
  .route-library .library-inspector-title { padding: 2px 3px; }
  .route-library .library-inspector-title strong { font-size: 17px; }
  .route-library .library-inspector-progress {
    padding: 10px 0 4px;
    background: transparent;
  }
  .route-library .library-inspector-section { padding: 14px; border-radius: 14px; }
  .route-library .library-primary-action {
    position: sticky;
    z-index: 3;
    bottom: calc(-14px - env(safe-area-inset-bottom));
    margin: 0 -12px;
    padding:
      12px
      14px
      calc(12px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 30px rgba(35, 52, 76, .12);
  }
  .route-library .library-inspector-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .route-library .library-inspector-actions .mini {
    width: 100%;
    min-height: 44px;
    padding: 0 8px;
    font-size: 11px;
  }
  .route-library .library-inspector-actions .mini:first-child { grid-column: 1 / -1; }
  .route-library .library-inspector-meta div { grid-template-columns: 86px minmax(0, 1fr); }
  .route-library #task-monitor-slot:has(.task-monitor) {
    position: sticky;
    z-index: 38;
    top: calc(58px + env(safe-area-inset-top));
  }
  .route-library #task-monitor-slot .task-monitor {
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(35, 52, 76, .1);
  }
  .route-library .library-intro .v3-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    gap: 8px;
  }
  .route-library .library-intro .v3-card-actions .v3-btn {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    justify-content: center;
  }
  .route-library .library-intro .v3-card-actions .v3-btn.primary {
    order: -1;
    grid-column: 1 / -1;
  }
  .route-library .library-nav-list,
  .knowledge-category-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .route-library .library-nav-list::-webkit-scrollbar,
  .knowledge-category-tabs::-webkit-scrollbar { display: none; }

  .knowledge-category-tabs {
    margin-right: calc(var(--mobile-page-gutter) * -1);
    padding-right: var(--mobile-page-gutter);
    scroll-padding-left: 4px;
  }
  .knowledge-manager-grid { min-height: 0; gap: 10px; grid-template-columns: 1fr; }
  .knowledge-doc-list { max-height: 330px; }
  .knowledge-list-panel,
  .knowledge-editor-panel { border-radius: 15px; }
  .knowledge-document-paper { padding: 20px 16px; }

  .review-view-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .review-view-tabs button { min-width: max-content; flex: 1; }
  .review-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .review-summary-grid article { min-height: 88px; padding: 13px; }
  .review-action-hero { padding: 16px; border-radius: 15px; }
  .review-chart-card,
  .review-result-card { padding: 15px; }

  .modal-card,
  .comment-preview-modal {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  :root { --mobile-page-gutter: 11px; }
  .mobile-bottom-nav { padding-right: 3px; padding-left: 3px; }
  .mobile-bottom-nav strong { font-size: 9px; }
  .mobile-account-sheet-shortcuts { grid-template-columns: 1fr; }
  .v3-command-copy h1 { font-size: 27px; }
  .route-library .library-package-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-account-sheet,
  .mobile-sheet-backdrop { transition: none; }
}

.douyin-dashboard-summary {
  display: grid;
  gap: 18px;
  margin: 18px 0;
  padding: 22px;
  border: 1px solid var(--line, #e4e8f0);
  border-radius: 22px;
  background: var(--panel, #fff);
  box-shadow: 0 8px 28px rgba(31, 42, 68, 0.06);
}

.douyin-dashboard-summary > header,
.douyin-dashboard-summary > footer,
.douyin-account-data-panel .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.douyin-dashboard-summary h2 {
  margin: 4px 0 2px;
  font-size: clamp(22px, 2.4vw, 32px);
}

.douyin-dashboard-summary p {
  margin: 0;
  color: var(--muted, #748099);
}

.douyin-dashboard-kpis,
.douyin-account-data-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.douyin-dashboard-kpis article,
.douyin-account-data-kpis article {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line, #e4e8f0);
  border-radius: 17px;
  background: color-mix(in srgb, var(--panel, #fff) 92%, #eef4ff);
}

.douyin-dashboard-kpis span,
.douyin-account-data-kpis span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted, #748099);
  font-size: 13px;
}

.douyin-dashboard-kpis strong,
.douyin-account-data-kpis strong {
  display: block;
  overflow: hidden;
  color: var(--text, #1d2433);
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.douyin-dashboard-summary > footer {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted, #748099);
  font-size: 13px;
}

.douyin-dashboard-summary > footer span + span {
  padding-left: 16px;
  border-left: 1px solid var(--line, #e4e8f0);
}

.douyin-sync-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff4dc;
  color: #9a6500;
  font-size: 12px;
  font-weight: 700;
}

.douyin-sync-status.is-ready {
  background: #e8f8ef;
  color: #157544;
}

.douyin-account-data-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.douyin-account-data-panel .section-title em {
  margin-left: 8px;
  font-style: normal;
  font-weight: 400;
}

.douyin-account-data-kpis {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.douyin-account-data-kpis article {
  padding: 14px;
}

.douyin-account-data-kpis strong {
  font-size: 21px;
}

.douyin-metric-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff8e8;
  color: #805d13;
  font-size: 13px;
  line-height: 1.55;
}

.douyin-metric-notice .ui-icon {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin-top: 2px;
}

.video-stats.upgraded .stat-play b {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .douyin-dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .douyin-account-data-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .douyin-dashboard-summary {
    margin: 12px 0;
    padding: 16px;
    border-radius: 18px;
  }

  .douyin-dashboard-summary > header,
  .douyin-account-data-panel .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .douyin-dashboard-summary .v3-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .douyin-dashboard-summary .douyin-sync-status {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .douyin-dashboard-kpis,
  .douyin-account-data-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .douyin-dashboard-kpis article,
  .douyin-account-data-kpis article {
    padding: 13px;
  }

  .douyin-dashboard-kpis article:last-child,
  .douyin-account-data-kpis article:last-child {
    grid-column: 1 / -1;
  }

  .douyin-dashboard-summary > footer span + span {
    padding-left: 0;
    border-left: 0;
  }
}

.agent-page-intro {
  position: relative;
  overflow: hidden;
}

.agent-page-intro::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: 12%;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 123, 255, .2), rgba(120, 91, 214, 0) 70%);
  pointer-events: none;
}

.agent-page-actions {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.review-fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #49627f;
}

.review-fullscreen-button .ui-icon {
  width: 15px;
  height: 15px;
}

.review-fullscreen-button:hover,
.review-fullscreen-button.is-active {
  border-color: #bfd2f4;
  background: #eef5ff;
  color: #2563eb;
}

#view:fullscreen,
#view:-webkit-full-screen,
#view.is-review-fullscreen-fallback {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  padding: 0 28px 40px;
  overflow: auto;
  background: var(--v3-bg);
}

#view.is-review-fullscreen-fallback {
  position: fixed;
  z-index: 1300;
  inset: 0;
}

#view:fullscreen .agent-chat-shell,
#view:-webkit-full-screen .agent-chat-shell,
#view.is-review-fullscreen-fallback .agent-chat-shell {
  height: max(720px, calc(100vh - 270px));
  max-height: none;
}

.agent-view-tabs {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.agent-view-tabs::-webkit-scrollbar {
  display: none;
}

.agent-connector-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 18px;
}

.agent-connector-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #dde5f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #60708a;
  font-size: 12px;
  font-weight: 700;
}

.agent-connector-strip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d69b2d;
  box-shadow: 0 0 0 4px rgba(214, 155, 45, .12);
}

.agent-connector-strip .is-ready i {
  background: #1b9b69;
  box-shadow: 0 0 0 4px rgba(27, 155, 105, .12);
}

.agent-chat-shell {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  height: clamp(820px, 88vh, 1040px);
  min-height: 0;
  max-height: 1040px;
  overflow: hidden;
  border: 1px solid #dfe6f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(54, 72, 112, .1);
}

.agent-session-rail {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid #e4e9f3;
  background: linear-gradient(180deg, #f8faff, #f3f6fc);
}

.agent-session-collapse {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #d9e1ef;
  border-radius: 9px;
  background: rgba(255, 255, 255, .9);
  color: #53627d;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(65, 82, 128, .08);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.agent-session-collapse:hover {
  transform: translateX(-1px);
  border-color: #aebce2;
  color: #4057b8;
}

@media (min-width: 901px) {
  .agent-chat-shell {
    transition: grid-template-columns .22s ease;
  }

  .agent-chat-shell.is-session-collapsed {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .agent-chat-shell.is-session-collapsed .agent-session-rail {
    display: block;
    padding: 12px 8px;
  }

  .agent-chat-shell.is-session-collapsed .agent-session-collapse {
    position: static;
    margin: 0 auto;
  }

  .agent-chat-shell.is-session-collapsed .agent-session-collapse:hover {
    transform: translateX(1px);
  }

  .agent-chat-shell.is-session-collapsed .agent-session-rail > header,
  .agent-chat-shell.is-session-collapsed .agent-session-tools,
  .agent-chat-shell.is-session-collapsed .agent-session-list,
  .agent-chat-shell.is-session-collapsed .agent-session-rail > footer {
    display: none;
  }
}

.agent-session-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 12px;
}

.agent-session-tools input {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #dce3ef;
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, .86);
  color: #334159;
  font: inherit;
  font-size: 11px;
}

.agent-session-tools input:focus {
  border-color: #7586dd;
  box-shadow: 0 0 0 3px rgba(91, 111, 216, .09);
}

.agent-session-tools button {
  padding: 0 9px;
  border: 1px solid #dce3ef;
  border-radius: 10px;
  background: #fff;
  color: #68768c;
  font-size: 10px;
  cursor: pointer;
}

.agent-session-tools button.is-active {
  border-color: #6d7ed8;
  color: #5063c4;
}

.agent-session-rail > header {
  display: grid;
  gap: 12px;
  padding-right: 34px;
}

.agent-session-rail > header > div,
.agent-chat-header > div {
  min-width: 0;
}

.agent-session-rail h2,
.agent-chat-header h2 {
  margin: 3px 0 0;
}

.agent-session-list {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 15px -5px;
  padding: 0 5px;
  overflow-y: auto;
}

.agent-session-entry {
  position: relative;
  min-width: 0;
}

.agent-session-open {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px 38px 12px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #66748a;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}

.agent-session-open:hover,
.agent-session-entry:focus-within .agent-session-open {
  border-color: #dbe3f2;
  background: rgba(255, 255, 255, .78);
}

.agent-session-open.is-active {
  border-color: rgba(80, 100, 210, .22);
  background: #fff;
  box-shadow: 0 8px 22px rgba(70, 88, 142, .09);
}

.agent-session-entry.is-pinned .agent-session-open {
  border-color: rgba(66, 91, 196, .16);
  background: rgba(255, 255, 255, .58);
}

.agent-session-entry.is-pinned .agent-session-open.is-active {
  background: #fff;
}

.agent-session-pin-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9efff;
  color: #3558c4;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.agent-session-more {
  position: absolute;
  top: 9px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7c899d;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -1px;
  opacity: 0;
  transition: background .16s ease, color .16s ease, opacity .16s ease;
}

.agent-session-entry:hover .agent-session-more,
.agent-session-entry:focus-within .agent-session-more,
.agent-session-more:focus-visible {
  opacity: 1;
}

.agent-session-more:hover {
  background: #edf2fb;
  color: #4057b8;
}

.agent-session-context-menu {
  position: absolute;
  z-index: 12;
  display: grid;
  width: 156px;
  padding: 6px;
  border: 1px solid #dce3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(36, 50, 80, .18);
}

.agent-session-context-menu[hidden] { display: none; }

.agent-session-context-menu button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #35445d;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}

.agent-session-context-menu button:hover,
.agent-session-context-menu button:focus-visible {
  outline: 0;
  background: #f1f5fb;
  color: #244ca7;
}

.agent-session-context-menu button.is-danger {
  color: #bd3c47;
}

.agent-session-context-menu button.is-danger:hover,
.agent-session-context-menu button.is-danger:focus-visible {
  background: #fff0f1;
  color: #a5212e;
}

.agent-session-list strong,
.agent-session-list span,
.agent-session-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-session-list strong {
  color: #243149;
  font-size: 13px;
}

.agent-session-list span {
  font-size: 11px;
}

.agent-session-list em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
}

.agent-session-empty {
  padding: 20px 10px;
  color: #8490a4;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.agent-session-rail > footer {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dfe6f3;
  border-radius: 13px;
  background: rgba(255, 255, 255, .8);
}

.agent-session-rail > footer span,
.agent-session-rail > footer em {
  color: #8490a4;
  font-size: 10px;
  font-style: normal;
}

.agent-session-rail > footer strong {
  color: #2c3c59;
  font-size: 13px;
}

.agent-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(88, 106, 218, .07), transparent 30%),
    #fff;
}

.agent-chat-panel.has-current-task {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.route-review .agent-chat-panel.has-current-task {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.agent-current-task {
  min-width: 0;
  margin: 10px clamp(18px, 4vw, 48px) 0;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce5f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f8ff, #fbfcff);
  color: #273856;
}

.agent-current-task > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8eefc;
  color: #4968ad;
}

.agent-current-task svg { width: 16px; height: 16px; }
.agent-current-task > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 9px; align-items: baseline; }
.agent-current-task small { color: #6c7c99; font-size: 10px; }
.agent-current-task strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agent-current-task em { grid-column: 1 / -1; color: #7b879c; font-size: 10px; font-style: normal; }

.agent-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5eaf3;
  background: rgba(255, 255, 255, .92);
}

.agent-chat-header h2 {
  overflow: hidden;
  color: #1e293c;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-chat-header p {
  margin: 3px 0 0;
  color: #7c889b;
  font-size: 11px;
}

.agent-chat-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.agent-chat-live {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #7d8798;
  font-size: 11px;
  font-weight: 700;
}

.agent-chat-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b0b8c6;
}

.agent-chat-live.is-online i {
  background: #1ba46e;
  box-shadow: 0 0 0 4px rgba(27, 164, 110, .12);
}

.agent-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 24px clamp(18px, 4vw, 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-color: rgba(79, 103, 174, .42) rgba(232, 237, 247, .32);
  scrollbar-width: thin;
}

.agent-chat-messages::-webkit-scrollbar {
  width: 7px;
}

.agent-chat-messages::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(91, 119, 196, .72), rgba(91, 82, 158, .62));
  background-clip: padding-box;
}

.agent-chat-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(88%, 880px);
}

.agent-chat-message.is-entering {
  animation: agent-message-in .34s cubic-bezier(.2, .75, .25, 1) both;
}

.agent-chat-message.is-user.is-entering {
  animation-name: agent-message-in-user;
}

@keyframes agent-message-in {
  from { opacity: 0; transform: translate3d(-10px, 8px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes agent-message-in-user {
  from { opacity: 0; transform: translate3d(10px, 8px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

.agent-chat-message.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.agent-chat-avatar {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .96);
  border-radius: 50%;
  background: linear-gradient(145deg, #576bd6, #354eb9);
  box-shadow: 0 0 0 1px rgba(77, 99, 208, .22), 0 8px 22px rgba(67, 87, 191, .25);
}

.agent-chat-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-chat-message.is-user .agent-chat-avatar {
  background: #dfe5f1;
  box-shadow: 0 0 0 1px rgba(111, 127, 157, .18), 0 5px 14px rgba(64, 79, 112, .12);
}

.agent-chat-bubble {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid #e1e7f1;
  border-radius: 7px 17px 17px 17px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(63, 80, 118, .07);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.agent-chat-message.is-agent:hover .agent-chat-bubble {
  border-color: #d3ddf0;
  box-shadow: 0 13px 30px rgba(63, 80, 118, .1);
}

.agent-chat-message.is-user .agent-chat-bubble {
  border-color: #d7ddfa;
  border-radius: 17px 7px 17px 17px;
  background: linear-gradient(145deg, #eef1ff, #e6ebff);
}

.agent-chat-bubble > header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-chat-bubble > header strong {
  color: #26334b;
  font-size: 12px;
}

.agent-chat-bubble > header span {
  color: #9aa4b4;
  font-size: 10px;
}

.agent-rich-content {
  display: grid;
  gap: 12px;
  margin-top: 9px;
  color: #334159;
  font-size: 13px;
  line-height: 1.82;
  word-break: break-word;
}

.agent-rich-content p {
  margin: 0;
}

.agent-rich-content:not(.is-user-copy) > p + p {
  padding-top: 2px;
}

.agent-rich-content.is-user-copy p {
  white-space: pre-wrap;
}

.agent-rich-content h3 {
  margin: 3px 0 0;
  padding-left: 10px;
  border-left: 3px solid #5c70d7;
  color: #1f2d47;
  font-size: 15px;
  line-height: 1.45;
}

.agent-rich-content strong {
  color: #1f3155;
  font-weight: 800;
}

.agent-rich-lead {
  color: #596a83;
  font-weight: 650;
}

.agent-rich-list {
  display: grid;
  gap: 8px;
  margin: 1px 0;
  padding: 0;
  list-style: none;
  counter-reset: agent-rich-item;
}

.agent-rich-list > li {
  position: relative;
  min-width: 0;
  padding: 10px 12px 10px 38px;
  border: 1px solid #e2e8f3;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(249, 251, 255, .92), rgba(245, 248, 254, .72));
  color: #3b4b64;
}

ol.agent-rich-list > li {
  counter-increment: agent-rich-item;
}

ol.agent-rich-list > li::before {
  position: absolute;
  top: 10px;
  left: 11px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 7px;
  background: #566cd2;
  color: #fff;
  content: counter(agent-rich-item);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 5px 11px rgba(77, 98, 198, .2);
}

ul.agent-rich-list > li::before {
  position: absolute;
  top: 18px;
  left: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6074d8;
  box-shadow: 0 0 0 4px rgba(96, 116, 216, .1);
  content: "";
}

.agent-rich-title,
.agent-rich-quote {
  color: #304cad;
  font-weight: 760;
}

.agent-rich-callout {
  position: relative;
  display: grid;
  gap: 5px;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid #d8e1f4;
  border-radius: 13px;
  background: linear-gradient(135deg, #f4f7ff, #eef2ff);
}

.agent-rich-callout::after {
  position: absolute;
  top: -25px;
  right: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(88, 108, 210, .09);
  content: "";
}

.agent-rich-callout > span {
  color: #687997;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.agent-rich-callout > strong {
  position: relative;
  z-index: 1;
  color: #243c8d;
  font-size: 14px;
  line-height: 1.55;
}

.agent-rich-callout.is-conclusion {
  border-color: #d5e9df;
  background: linear-gradient(135deg, #f2fbf6, #ebf7f1);
}

.agent-rich-callout.is-conclusion > strong {
  color: #166b4c;
}

.agent-rich-metric {
  padding: 10px 12px;
  border: 1px solid #e5deca;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0, #fff7e7);
  color: #745823;
  font-weight: 680;
}

.agent-rich-number {
  margin: 0 2px;
  padding: 1px 5px;
  border-radius: 6px;
  background: #fff;
  color: #ba7114;
  font-size: 1.04em;
  font-weight: 850;
  box-shadow: 0 2px 8px rgba(170, 109, 26, .12);
}

.agent-chat-bubble > footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
  color: #8792a4;
  font-size: 10px;
}

.agent-chat-bubble > footer .agent-source-panel {
  margin: 0;
}

.agent-message-attachments,
.agent-selected-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-message-attachments {
  margin-top: 10px;
}

.agent-material-read-panel {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #dce7f7;
  border-radius: 10px;
  background: #f7faff;
}

.agent-material-read-panel > strong {
  color: #40516b;
  font-size: 10px;
}

.agent-material-read-panel > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-material-read-panel span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #52647f;
  font-size: 10px;
}

.agent-material-read-panel span b {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-material-read-panel span em {
  color: #7082a1;
  font-style: normal;
}

.agent-message-attachments > span,
.agent-selected-attachments > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #dce4f1;
  border-radius: 999px;
  background: #f7f9fd;
  color: #64728a;
  font-size: 10px;
}

.agent-selected-attachments {
  margin: 0 0 9px;
}

.agent-selected-attachments button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a95a7;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.agent-message-task-card {
  margin-top: 11px;
  overflow: hidden;
  border: 1px solid #dfe6f2;
  border-radius: 12px;
  background: rgba(248, 250, 255, .85);
}

.agent-message-task-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  color: #4f5f79;
  cursor: pointer;
  font-size: 10px;
  list-style: none;
}

.agent-message-task-card > summary::-webkit-details-marker {
  display: none;
}

.agent-message-task-card > summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.agent-message-task-card > summary span > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #99a4b7;
}

.agent-message-task-card > summary span > i.is-running,
.agent-message-task-card > summary span > i.is-queued {
  background: #5c72d6;
  box-shadow: 0 0 0 4px rgba(92, 114, 214, .1);
}

.agent-message-task-card > summary span > i.is-succeeded {
  background: #20a36e;
}

.agent-message-task-card > summary em {
  color: #8793a6;
  font-style: normal;
}

.agent-message-task-steps {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.agent-message-task-steps > span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #68778e;
  font-size: 10px;
}

.agent-message-task-steps > span > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c1c8d4;
}

.agent-message-task-steps > span.is-completed > i {
  background: #20a36e;
}

.agent-message-task-steps > span.is-running > i {
  background: #5c72d6;
  animation: agent-chat-dot 1.1s ease-in-out infinite;
}

.agent-message-task-steps em {
  color: #99a3b2;
  font-style: normal;
}

.agent-message-task-card > footer,
.agent-message-script-card > footer {
  display: flex;
  gap: 7px;
  padding: 0 10px 10px;
}

.agent-message-script-card {
  margin-top: 11px;
  padding: 11px;
  border: 1px solid #d9e1f5;
  border-radius: 13px;
  background: linear-gradient(150deg, #fafbff, #f2f5ff);
}

.agent-message-script-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.agent-message-script-card > header div {
  display: grid;
  gap: 3px;
}

.agent-message-script-card > header span,
.agent-message-script-card > header em {
  color: #75829a;
  font-size: 9px;
  font-style: normal;
}

.agent-message-script-card > header strong {
  color: #34435e;
  font-size: 11px;
}

.agent-message-script-card > p {
  max-height: 240px;
  margin: 10px 0;
  overflow: auto;
  color: #3b4960;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.agent-message-topic-cards,
.agent-message-topic-script {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d9e2f5;
  border-radius: 14px;
  background: linear-gradient(145deg, #fbfcff, #f3f6ff);
}

.agent-message-topic-cards > header,
.agent-message-topic-script > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-message-topic-cards > header strong,
.agent-message-topic-script > header strong {
  color: #35445f;
  font-size: 12px;
}

.agent-message-topic-cards > header span,
.agent-message-topic-script > header span,
.agent-message-topic-script > header em {
  color: #7e8ca2;
  font-size: 10px;
  font-style: normal;
}

.agent-message-topic-cards > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.agent-message-topic-cards article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e0e6f2;
  border-radius: 11px;
  background: rgba(255, 255, 255, .9);
}

.agent-message-topic-cards article header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.agent-message-topic-cards article strong {
  color: #34425a;
  font-size: 11px;
  line-height: 1.45;
}

.agent-message-topic-cards article em {
  flex: 0 0 auto;
  color: #5165c5;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.agent-message-topic-cards article p {
  margin: 0;
  color: #6e7b90;
  font-size: 10px;
  line-height: 1.55;
}

.agent-message-topic-cards article .v3-btn {
  width: 100%;
  margin-top: auto;
}

.agent-message-topic-script > header div {
  display: grid;
  gap: 3px;
}

.agent-message-topic-script > footer {
  display: flex;
  gap: 8px;
  margin-top: 11px;
}

@media (max-width: 720px) {
  .agent-message-topic-cards > div {
    grid-template-columns: 1fr;
  }

  .agent-message-topic-script > footer {
    flex-direction: column;
  }

  .agent-message-topic-script > footer .v3-btn {
    width: 100%;
  }
}

.agent-chat-suggestions,
.agent-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.agent-chat-suggestions {
  margin-top: 11px;
}

.agent-chat-suggestions button,
.agent-chat-quick button {
  padding: 6px 9px;
  border: 1px solid #dce3f0;
  border-radius: 999px;
  background: #f8faff;
  color: #536682;
  font-size: 11px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.agent-chat-suggestions button:hover,
.agent-chat-quick button:hover {
  transform: translateY(-1px);
  border-color: #aebce2;
  color: #3f56b5;
  box-shadow: 0 6px 14px rgba(66, 86, 143, .1);
}

.agent-chat-welcome {
  display: grid;
  justify-items: center;
  max-width: 480px;
  margin: auto;
  padding: 30px;
  color: #65738a;
  text-align: center;
}

.agent-chat-welcome > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #5b70dc, #3950bb);
  color: #fff;
  box-shadow: 0 15px 32px rgba(64, 84, 190, .24);
}

.agent-chat-welcome h3 {
  margin: 15px 0 5px;
  color: #26334a;
}

.agent-chat-welcome p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.agent-live-progress {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(82%, 620px);
  padding: 12px 14px;
  border: 1px solid #dde4f2;
  border-radius: 16px;
  background: linear-gradient(105deg, #f8faff 20%, #eef2ff 42%, #f8faff 64%);
  background-size: 220% 100%;
  animation: agent-progress-sheen 2.8s ease-in-out infinite;
}

.agent-live-progress > div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-right: auto;
}

.agent-live-progress strong {
  color: #34435e;
  font-size: 12px;
}

.agent-live-progress span {
  color: #8290a5;
  font-size: 10px;
}

.agent-live-orb {
  display: flex;
  gap: 3px;
}

.agent-live-orb i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6074d8;
  animation: agent-chat-dot 1.1s ease-in-out infinite;
}

.agent-live-orb i:nth-child(2) { animation-delay: .15s; }
.agent-live-orb i:nth-child(3) { animation-delay: .3s; }

@keyframes agent-chat-dot {
  50% { opacity: .25; transform: translateY(-3px); }
}

@keyframes agent-progress-sheen {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .agent-chat-message.is-entering,
  .agent-live-progress,
  .agent-live-orb i,
  .agent-run-steps .is-running i,
  .agent-message-task-steps > span.is-running > i {
    animation: none;
  }
}

.agent-chat-composer {
  position: relative;
  z-index: 2;
  max-height: 290px;
  overflow-y: auto;
  padding: 9px 14px 10px;
  border-top: 1px solid #e3e8f2;
  background: linear-gradient(180deg, rgba(249, 251, 255, .97), rgba(244, 247, 253, .98));
}

.agent-attachment-picker {
  display: grid;
  gap: 10px;
  max-height: 230px;
  margin-bottom: 10px;
  padding: 11px;
  overflow-y: auto;
  border: 1px solid #dce4f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(60, 78, 116, .09);
}

.agent-attachment-picker > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-attachment-picker > header strong {
  color: #34435e;
  font-size: 11px;
}

.agent-attachment-picker > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-attachment-picker > div > span {
  flex: 0 0 100%;
  color: #8793a7;
  font-size: 9px;
}

.agent-attachment-picker > div > button {
  max-width: 250px;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid #dce4f1;
  border-radius: 9px;
  background: #f8faff;
  color: #5b6c87;
  cursor: pointer;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-attachment-picker > div > button.is-selected {
  border-color: #6477d7;
  background: #eef1ff;
  color: #4258bd;
}

.agent-attachment-picker > div > button.is-transcribable {
  border-style: dashed;
  border-color: #d5a75a;
  background: #fffaf0;
  color: #9a6419;
}

.agent-attachment-picker > div > button.is-transcribable.is-selected {
  border-style: solid;
  border-color: #c6872d;
  background: #fff1d6;
  color: #87510c;
}

.agent-attachment-picker > div > em {
  color: #9aa4b4;
  font-size: 10px;
  font-style: normal;
}

.agent-chat-quick {
  margin-bottom: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.agent-chat-quick button {
  flex: 0 0 auto;
  padding: 5px 8px;
  background: #fff;
}

.agent-chat-quick button.is-primary {
  border-color: #d5a75a;
  background: #fff7e8;
  color: #8a580f;
  font-weight: 800;
}

.agent-chat-input-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(78px, auto) minmax(70px, auto) minmax(0, 1fr) minmax(78px, auto);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #ccd6e8;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(62, 80, 120, .1);
}

.agent-chat-input-wrap:focus-within {
  border-color: #7082dd;
  box-shadow: 0 0 0 4px rgba(91, 111, 216, .1);
}

.agent-chat-input-wrap textarea {
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  min-height: 50px;
  max-height: 132px;
  padding: 10px 4px;
  border: 0;
  outline: 0;
  resize: none;
  color: #26344c;
  font: inherit;
  line-height: 1.55;
}

.agent-chat-add,
.agent-web-toggle,
.agent-chat-send {
  grid-row: 1;
  align-self: center;
  display: inline-flex;
  width: auto;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.agent-web-toggle {
  grid-column: 3;
  color: #65728a;
  background: #f3f5fa;
  cursor: pointer;
  border: 1px solid #e1e6f0;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.agent-web-toggle span {
  color: #7382c9;
  font-size: 14px;
}

.agent-web-toggle strong {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.agent-web-toggle:hover,
.agent-web-toggle.is-active {
  color: #3854bd;
  border-color: #aebbea;
  background: #eaf0ff;
  box-shadow: 0 5px 14px rgba(70, 88, 165, .1);
}

.agent-web-toggle.is-active span {
  color: #2fa879;
}

.agent-web-toggle:disabled {
  cursor: not-allowed;
  box-shadow: none;
  opacity: .45;
}

.agent-chat-add {
  grid-column: 1;
  color: #8a95a7;
  background: #f1f4f9;
  cursor: pointer;
}

.agent-chat-add span {
  font-size: 17px;
  line-height: 1;
}

.agent-chat-add em {
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.agent-chat-add.is-active {
  background: #e6eaff;
  color: #4e63c8;
}

.agent-model-select {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: inline-flex;
  min-width: 78px;
  min-height: 42px;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid #e1e6f0;
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfcff, #f4f6fb);
  color: #4f5e79;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.agent-model-select:hover,
.agent-model-select:focus-within {
  border-color: #aebbea;
  background: #f1f4ff;
  box-shadow: 0 5px 14px rgba(70, 88, 165, .1);
}

.agent-model-select select {
  min-width: 0;
  flex: 1;
  padding: 0 13px 0 0;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: #465572;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.agent-model-select select:disabled {
  cursor: not-allowed;
}

.agent-model-spark {
  flex: 0 0 auto;
  color: #6478d7;
  font-size: 12px;
}

.agent-model-chevron {
  position: absolute;
  right: 8px;
  top: 50%;
  color: #8a95aa;
  font-size: 12px;
  pointer-events: none;
  transform: translateY(-57%);
}

.agent-chat-send {
  grid-column: 5;
  color: #fff;
  background: linear-gradient(145deg, #5269d4, #344db7);
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(57, 79, 185, .22);
}

.agent-chat-send .ui-icon {
  width: 17px;
  height: 17px;
}

.agent-chat-send strong {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.agent-chat-send:disabled {
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(.5);
  opacity: .5;
}

.agent-chat-composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: #8994a7;
  font-size: 10px;
}

.agent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 16px;
}

.agent-layout .v3-card {
  margin: 0;
}

.agent-history-card {
  grid-column: 1 / -1;
}

.agent-request,
.agent-script-content {
  min-height: 180px;
  margin-top: 14px;
  resize: vertical;
}

.agent-context-card ul {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.agent-account-note {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: #eef2ff;
  color: #445888;
  font-size: 12px;
  line-height: 1.6;
}

.agent-context-card li {
  position: relative;
  padding: 11px 12px 11px 34px;
  border: 1px solid #e2e8f4;
  border-radius: 12px;
  background: #f8faff;
  color: #45546d;
  font-size: 13px;
}

.agent-context-card li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  color: #168b5c;
  font-weight: 800;
}

.agent-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.agent-skill-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  margin: 0;
}

.agent-skill-card p {
  flex: 1;
}

.agent-skill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.agent-skill-meta span {
  padding: 6px 9px;
  border-radius: 9px;
  background: #f1f5fc;
  color: #64738a;
  font-size: 12px;
}

.agent-skill-workbench {
  overflow: hidden;
  border: 1px solid #dfe6f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(54, 72, 112, .09);
}

.agent-skill-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid #e6ebf4;
  background:
    radial-gradient(circle at 92% 0, rgba(81, 103, 215, .12), transparent 36%),
    linear-gradient(135deg, #fff, #f8faff);
}

.agent-skill-intro h2 {
  margin: 4px 0 6px;
  color: #1f2b40;
  font-size: 21px;
}

.agent-skill-intro p {
  max-width: 760px;
  margin: 0;
  color: #718097;
  font-size: 13px;
  line-height: 1.7;
}

.agent-skill-ready-count {
  display: grid;
  min-width: 104px;
  color: #425ac8;
  font-size: 30px;
  font-weight: 850;
  text-align: center;
}

.agent-skill-ready-count em {
  color: #7e8ba1;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.agent-skill-stage {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  min-height: 610px;
}

.agent-skill-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid #e6ebf4;
  background: #f7f9fd;
}

.agent-skill-list button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #65738a;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}

.agent-skill-list button:hover {
  border-color: #dce4f2;
  background: rgba(255, 255, 255, .82);
}

.agent-skill-list button.is-active {
  border-color: rgba(73, 94, 205, .24);
  background: #fff;
  box-shadow: 0 9px 24px rgba(65, 82, 139, .1);
}

.agent-skill-list button > span {
  color: #9aa5b8;
  font-size: 11px;
  font-weight: 800;
}

.agent-skill-list button div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-skill-list button strong {
  overflow: hidden;
  color: #26334a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-skill-list button em {
  overflow: hidden;
  color: #8a96a9;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-skill-list button.is-active > i {
  color: #4b60cd;
}

.agent-skill-runner {
  min-width: 0;
  padding: 24px;
}

.agent-skill-runner > header,
.agent-skill-input > header,
.agent-skill-recent > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.agent-skill-runner > header h2 {
  margin: 4px 0 0;
  color: #202d43;
  font-size: 20px;
}

.agent-skill-description {
  margin: 12px 0 0;
  color: #64728a;
  font-size: 13px;
  line-height: 1.75;
}

.agent-skill-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.agent-skill-flow li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e3e9f3;
  border-radius: 13px;
  background: #fafbfe;
}

.agent-skill-flow li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #edf1f8;
  color: #748199;
  font-size: 11px;
  font-weight: 850;
}

.agent-skill-flow li.is-complete > span {
  background: #e7f7f0;
  color: #16845a;
}

.agent-skill-flow li div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-skill-flow strong {
  color: #34425a;
  font-size: 12px;
}

.agent-skill-flow em {
  overflow: hidden;
  color: #8a96a8;
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

.agent-skill-input {
  padding: 17px;
  border: 1px solid #dfe6f2;
  border-radius: 16px;
  background: #f9fbff;
}

.agent-skill-input > header {
  margin-bottom: 13px;
}

.agent-skill-input > header strong {
  color: #2e3c54;
  font-size: 13px;
}

.agent-skill-input > header span {
  color: #8390a4;
  font-size: 10px;
}

.agent-skill-input label {
  display: grid;
  gap: 7px;
}

.agent-skill-input label > span {
  color: #53627a;
  font-size: 12px;
  font-weight: 750;
}

.agent-skill-input select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d8e0ed;
  border-radius: 11px;
  outline: 0;
  background: #fff;
  color: #344158;
  font: inherit;
}

.agent-skill-input label em,
.agent-skill-auto-input em {
  color: #8591a4;
  font-size: 10px;
  font-style: normal;
}

.agent-skill-input .is-warning {
  color: #b07619;
}

.agent-skill-auto-input {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #dce7e2;
  border-radius: 12px;
  background: #fff;
}

.agent-skill-auto-input > span {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8f7f0;
  color: #16845a;
  font-weight: 850;
}

.agent-skill-auto-input div {
  display: grid;
  gap: 4px;
}

.agent-skill-auto-input strong {
  color: #314058;
  font-size: 12px;
}

.agent-skill-blocked {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #f0dfb5;
  border-radius: 12px;
  background: #fff9eb;
}

.agent-skill-blocked strong {
  color: #8c651f;
  font-size: 12px;
}

.agent-skill-blocked span {
  color: #a17c39;
  font-size: 11px;
}

.agent-skill-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
}

.agent-skill-actions > span {
  color: #8793a6;
  font-size: 10px;
}

.agent-skill-recent {
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid #e7ebf3;
}

.agent-skill-recent > header {
  margin-bottom: 9px;
}

.agent-skill-recent article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f6;
}

.agent-skill-recent article div {
  display: grid;
  gap: 3px;
}

.agent-skill-recent article strong {
  color: #344158;
  font-size: 12px;
}

.agent-skill-recent article span,
.agent-skill-recent article em,
.agent-skill-recent > p {
  color: #8a96a8;
  font-size: 10px;
  font-style: normal;
}

.agent-script-card .v3-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.agent-script-card .v3-field span {
  color: #52617a;
  font-size: 12px;
  font-weight: 750;
}

.agent-script-card select,
.agent-script-card textarea {
  width: 100%;
}

.agent-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.agent-history-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  padding: 13px 14px;
  border: 1px solid #e2e8f3;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff, #f8faff);
}

.agent-history-list article div {
  min-width: 0;
}

.agent-history-list strong,
.agent-history-list span {
  display: block;
}

.agent-history-list strong {
  overflow: hidden;
  color: #1c2638;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-history-list span {
  margin-top: 5px;
  color: #7b8799;
  font-size: 11px;
}

.agent-history-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: #5c6b82;
  font-size: 12px;
}

.agent-message-list article {
  grid-template-columns: 1fr;
  border-left: 3px solid #aebbd0;
}

.agent-message-list article.is-agent {
  border-left-color: #5c72dc;
  background: linear-gradient(135deg, #fff, #f3f5ff);
}

.agent-message-list article.is-user {
  margin-left: min(8%, 54px);
}

.agent-message-list p {
  margin: 8px 0 0;
  color: #334157;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.agent-message-list ul {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: #52627a;
  font-size: 12px;
}

.agent-message-list small {
  display: block;
  margin-top: 10px;
  color: #78859a;
  font-size: 11px;
}

.agent-source-panel,
.agent-version-content {
  margin-top: 10px;
  color: #64738b;
  font-size: 12px;
}

.agent-source-panel summary,
.agent-version-content summary {
  width: max-content;
  cursor: pointer;
  color: #5269b2;
  font-weight: 700;
}

.agent-source-panel ul {
  margin-top: 8px;
}

.agent-source-panel li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.agent-source-panel li > span:first-child {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-source-panel.is-topic-sources {
  width: min(100%, 620px);
}

.agent-source-panel.is-topic-sources > p {
  margin: 8px 0 0;
  color: #7a879b;
  line-height: 1.5;
}

.agent-source-panel.is-topic-sources > div {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.agent-source-panel.is-topic-sources section {
  padding: 9px 10px;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
  background: #fbfcff;
}

.agent-source-panel.is-topic-sources section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-source-panel.is-topic-sources section > header strong {
  min-width: 0;
  overflow: hidden;
  color: #26354d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-source-panel.is-topic-sources section > header span {
  flex: 0 0 auto;
  color: #7a879b;
  font-size: 10px;
}

.agent-source-panel.is-topic-sources ul {
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
}

.agent-source-panel a {
  color: #405ab4;
  font-weight: 700;
  text-decoration: none;
}

.agent-source-panel a:hover {
  text-decoration: underline;
}

.agent-source-panel li em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #6878b3;
  font-size: 9px;
  font-style: normal;
}

.agent-version-list article {
  grid-template-columns: 1fr;
}

.agent-version-content p {
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f7fc;
  white-space: pre-wrap;
}

.agent-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.agent-run-steps {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.agent-run-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f2f5fa;
  color: #6d7990;
  font-size: 11px;
}

.agent-run-steps i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a9b2c2;
}

.agent-run-steps .is-succeeded i,
.agent-run-steps .is-completed i {
  background: #1b9b69;
}

.agent-run-steps .is-running i {
  background: #5f72d7;
  box-shadow: 0 0 0 4px rgba(95, 114, 215, .12);
  animation: agent-step-pulse 1.6s ease-in-out infinite;
}

@keyframes agent-step-pulse {
  50% { transform: scale(1.35); }
}

.agent-run-status {
  align-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #4267b5;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.project-agent-submit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-agent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  align-items: start;
  gap: 18px;
}

.project-agent-main {
  min-width: 0;
}

.project-agent-host {
  position: sticky;
  top: 18px;
  min-width: 0;
}

.project-agent-rail,
.project-agent-loading {
  overflow: hidden;
  border: 1px solid rgba(170, 188, 222, .7);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0, rgba(104, 91, 214, .12), transparent 35%),
    linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(245, 248, 255, .96));
  box-shadow: 0 18px 44px rgba(59, 77, 118, .12);
}

.project-agent-loading {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 26px;
  text-align: center;
}

.project-agent-loading > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #5f83e4, #7158c8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(91, 102, 207, .25);
}

.project-agent-loading strong {
  margin-top: 12px;
  color: #1b2638;
  font-size: 18px;
}

.project-agent-loading p {
  margin: 4px 0 0;
  color: #748198;
  font-size: 12px;
}

.project-agent-rail {
  padding: 18px;
}

.project-agent-rail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-agent-rail > header h2 {
  margin: 3px 0 0;
  color: #182236;
  font-size: 23px;
}

.project-agent-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff7e7;
  color: #9a6b19;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.project-agent-ready i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d59b2d;
}

.project-agent-ready.is-ready {
  background: #eaf8f1;
  color: #157551;
}

.project-agent-ready.is-ready i {
  background: #1b9b69;
}

.project-agent-context {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #e0e7f3;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}

.project-agent-context strong {
  overflow: hidden;
  color: #273247;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-agent-context span,
.project-agent-context em {
  color: #768399;
  font-size: 11px;
  font-style: normal;
}

.project-agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.project-agent-actions button {
  padding: 7px 10px;
  border: 1px solid #dce5f4;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #52637f;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.project-agent-actions button:hover {
  transform: translateY(-1px);
  border-color: #9eb3e3;
  box-shadow: 0 7px 16px rgba(69, 88, 136, .1);
}

.project-agent-input {
  width: 100%;
  min-height: 116px;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid #d9e2f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: #263248;
  line-height: 1.65;
  resize: vertical;
}

.project-agent-send {
  width: 100%;
  justify-content: center;
  margin-top: 9px;
}

.project-agent-truth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 0 8px;
  border-bottom: 1px solid #e5ebf4;
  color: #718097;
  font-size: 11px;
}

.project-agent-truth strong {
  color: #3e5f9d;
  font-size: 11px;
}

.project-agent-messages {
  display: grid;
  gap: 8px;
  max-height: 280px;
  margin-top: 10px;
  overflow-y: auto;
}

.project-agent-messages article {
  padding: 10px 11px;
  border: 1px solid #e1e8f3;
  border-radius: 12px;
  background: rgba(255, 255, 255, .84);
}

.project-agent-messages article.is-agent {
  border-color: #cfd8f5;
  background: #f4f6ff;
}

.project-agent-messages article strong,
.project-agent-messages article span {
  color: #718098;
  font-size: 10px;
}

.project-agent-messages article p {
  margin: 5px 0;
  color: #334158;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.tenant-storage-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 6%, rgba(91, 111, 216, .12), transparent 28%),
    linear-gradient(145deg, #fff, #f8faff);
}

.tenant-storage-card > header,
.tenant-storage-summary,
.tenant-storage-breakdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tenant-storage-card > header > div {
  display: grid;
  gap: 3px;
}

.tenant-storage-card > header h2 {
  margin: 0;
}

.tenant-storage-card > header > strong {
  color: var(--v3-primary);
  font-size: 22px;
  letter-spacing: -.04em;
}

.tenant-storage-card > header > strong em {
  color: var(--v3-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0;
}

.tenant-storage-track {
  height: 11px;
  margin: 17px 0 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf7;
  box-shadow: inset 0 1px 2px rgba(49, 65, 98, .08);
}

.tenant-storage-track i {
  display: block;
  width: var(--tenant-storage-percent);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3457cf, #6e84e8 65%, #7aa8f4);
  box-shadow: 0 0 18px rgba(77, 101, 211, .24);
  animation: tenantStorageGrow .65s cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes tenantStorageGrow {
  from { width: 0; }
}

.tenant-storage-summary {
  justify-content: flex-start;
  color: var(--v3-muted);
  font-size: 11px;
  gap: 22px;
}

.tenant-storage-summary strong {
  margin-left: 4px;
  color: var(--v3-ink);
}

.tenant-storage-breakdown {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tenant-storage-breakdown button {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  justify-content: flex-start;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tenant-storage-breakdown button:hover,
.tenant-storage-breakdown button:focus-visible {
  border-color: rgba(52, 87, 207, .45);
  box-shadow: 0 8px 20px rgba(42, 62, 120, .09);
  transform: translateY(-1px);
  outline: none;
}

.tenant-storage-breakdown button > i {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5e74d9;
  box-shadow: 0 0 0 4px rgba(94, 116, 217, .1);
}

.tenant-storage-breakdown button:nth-child(2) > i { background: #7c6be8; }
.tenant-storage-breakdown button:nth-child(3) > i { background: #7a98ad; }

.tenant-storage-breakdown button > span {
  display: grid;
  min-width: 0;
  margin-right: auto;
  gap: 2px;
}

.tenant-storage-breakdown button strong {
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-storage-breakdown button em {
  color: var(--v3-muted);
  font-size: 9px;
  font-style: normal;
}

.tenant-storage-breakdown button b {
  color: var(--v3-primary);
  font-size: 11px;
  white-space: nowrap;
}

.tenant-storage-breakdown button > small {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--v3-primary);
  place-items: center;
}

.tenant-storage-breakdown button > small .ui-icon { width: 15px; height: 15px; }

.storage-record-modal {
  width: min(1120px, calc(100vw - 40px));
  max-width: 1120px;
  overflow: hidden;
}

.storage-record-modal .modal-body {
  padding: 0;
  background: #f7f9fd;
}

.storage-record-loading,
.storage-record-error {
  display: grid;
  min-height: 360px;
  color: var(--v3-muted);
  text-align: center;
  place-content: center;
  justify-items: center;
  gap: 9px;
}

.storage-record-loading strong,
.storage-record-error strong { color: var(--v3-ink); font-size: 16px; }
.storage-record-loading small,
.storage-record-error span { font-size: 11px; }

.storage-record-browser {
  display: grid;
  height: min(680px, calc(100dvh - 140px));
  min-height: 560px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.storage-record-overview {
  display: grid;
  padding: 18px 20px;
  border-bottom: 1px solid var(--v3-line);
  background: #fff;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 10px;
}

.storage-record-overview > div {
  display: grid;
  padding: 11px 13px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: var(--v3-surface-soft);
  gap: 2px;
}

.storage-record-overview > div.is-cleanable { border-color: rgba(30, 155, 112, .25); background: #f3fbf7; }
.storage-record-overview span { color: var(--v3-muted); font-size: 10px; }
.storage-record-overview strong { color: var(--v3-ink); font-size: 18px; }
.storage-record-overview small { color: var(--v3-primary); font-size: 11px; }
.storage-record-overview p { align-self: center; margin: 0 0 0 6px; color: var(--v3-muted); font-size: 11px; line-height: 1.65; }

.storage-record-toolbar {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px solid var(--v3-line);
  background: #fff;
  justify-content: space-between;
  gap: 10px;
}

.storage-record-toolbar label {
  display: flex;
  width: min(440px, 65%);
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
}

.storage-record-toolbar input { min-width: 0; flex: 1; padding: 0 12px; border: 0; outline: 0; color: var(--v3-ink); background: transparent; }
.storage-record-toolbar button { padding: 0 14px; border: 0; border-left: 1px solid var(--v3-line); background: #f6f8fc; color: var(--v3-primary); font-weight: 700; cursor: pointer; }
.storage-record-toolbar > button { height: 36px; border: 1px solid var(--v3-line); border-radius: 10px; }
.storage-record-toolbar > button.is-active { border-color: rgba(52, 87, 207, .35); background: #edf2ff; }

.storage-record-table-wrap { min-height: 0; overflow: auto; background: #fff; }
.storage-record-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.storage-record-table th { position: sticky; z-index: 1; top: 0; padding: 10px 12px; border-bottom: 1px solid var(--v3-line); background: #f7f9fd; color: var(--v3-muted); font-size: 10px; text-align: left; }
.storage-record-table th:nth-child(1) { width: 42px; }
.storage-record-table th:nth-child(2) { width: 30%; }
.storage-record-table th:nth-child(3) { width: 16%; }
.storage-record-table th:nth-child(4) { width: 18%; }
.storage-record-table th:nth-child(5) { width: 11%; }
.storage-record-table td { padding: 10px 12px; border-bottom: 1px solid #edf0f6; color: var(--v3-ink); font-size: 11px; vertical-align: middle; }
.storage-record-table tr.is-selected td { background: #f1f5ff; }
.storage-record-table tr.is-deletable:hover td { background: #f8faff; }
.storage-record-table td strong,
.storage-record-table td small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-record-table td strong { font-size: 11px; }
.storage-record-table td small { margin-top: 3px; color: var(--v3-muted); font-size: 9px; }
.storage-record-table td span,
.storage-record-table time { color: #5b6880; font-size: 10px; }
.storage-record-table td b { color: var(--v3-primary); white-space: nowrap; }
.storage-record-table td em { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 700; }
.storage-record-table td em.is-deletable { color: #147856; background: #e9f8f1; }
.storage-record-table td em.is-protected { color: #69768b; background: #eef1f6; }
.storage-record-check { text-align: center !important; }
.storage-record-check input { width: 15px; height: 15px; accent-color: var(--v3-primary); }
.storage-record-empty { display: grid; min-height: 220px; color: var(--v3-muted); place-content: center; text-align: center; gap: 5px; }
.storage-record-empty strong { color: var(--v3-ink); }

.storage-record-footer {
  display: flex;
  min-height: 62px;
  padding: 10px 20px;
  border-top: 1px solid var(--v3-line);
  background: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.storage-record-pagination,
.storage-record-selection { display: flex; align-items: center; gap: 9px; }
.storage-record-pagination button { height: 31px; padding: 0 10px; border: 1px solid var(--v3-line); border-radius: 8px; background: #fff; color: var(--v3-ink); cursor: pointer; }
.storage-record-pagination button:disabled { opacity: .45; cursor: default; }
.storage-record-pagination span,
.storage-record-selection span { color: var(--v3-muted); font-size: 10px; }
.storage-record-selection strong,
.storage-record-selection b { color: var(--v3-ink); }

.storage-delete-confirm {
  display: grid;
  width: min(560px, 100%);
  min-height: 470px;
  margin: auto;
  padding: 44px 36px 34px;
  align-content: center;
  gap: 20px;
}

.storage-delete-icon { display: grid; width: 50px; height: 50px; border-radius: 15px; background: #fff0f0; color: #c83e45; place-items: center; }
.storage-delete-icon .ui-icon { width: 24px; height: 24px; }
.storage-delete-confirm h3 { margin: 4px 0 7px; color: var(--v3-ink); font-size: 23px; }
.storage-delete-confirm p { margin: 0; color: var(--v3-muted); font-size: 12px; line-height: 1.75; }
.storage-delete-confirm dl { display: grid; margin: 0; border: 1px solid var(--v3-line); border-radius: 12px; background: #fff; grid-template-columns: 1fr 1fr; }
.storage-delete-confirm dl div { display: grid; padding: 12px 14px; gap: 4px; }
.storage-delete-confirm dl div + div { border-left: 1px solid var(--v3-line); }
.storage-delete-confirm dt { color: var(--v3-muted); font-size: 10px; }
.storage-delete-confirm dd { margin: 0; color: var(--v3-ink); font-size: 12px; font-weight: 750; }
.storage-delete-confirm > label { display: grid; gap: 7px; color: var(--v3-ink); font-size: 11px; }
.storage-delete-confirm > label input { height: 40px; padding: 0 12px; border: 1px solid var(--v3-line); border-radius: 10px; background: #fff; color: var(--v3-ink); outline: 0; }
.storage-delete-confirm > label input:focus { border-color: rgba(52, 87, 207, .55); box-shadow: 0 0 0 3px rgba(52, 87, 207, .1); }
.storage-delete-confirm footer { display: flex; justify-content: flex-end; gap: 9px; }

.tenant-storage-card > p {
  margin: 13px 0 0;
  color: var(--v3-muted);
  font-size: 10px;
  line-height: 1.65;
}

.tenant-storage-empty {
  display: grid;
  min-height: 90px;
  place-content: center;
  text-align: center;
  gap: 5px;
}

.tenant-storage-empty span { color: var(--v3-muted); font-size: 11px; }
.tenant-storage-empty.is-error strong { color: var(--v3-bad); }

.baidu-quota-card {
  margin-top: 14px;
  padding: 16px 17px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: var(--v3-surface-soft);
}
.baidu-quota-card.is-warning { border-color: #efc879; background: #fff9ec; }
.baidu-quota-card.is-critical,
.baidu-quota-card.is-full { border-color: #ef9b9b; background: #fff2f2; }
.baidu-quota-card.is-warning .baidu-quota-track i { background: #d79a22; }
.baidu-quota-card.is-critical .baidu-quota-track i,
.baidu-quota-card.is-full .baidu-quota-track i { background: #d74747; }
.baidu-quota-head .capacity-warning { color: #9a6700; font-weight: 800; }
.baidu-quota-head .capacity-critical,
.baidu-quota-head .capacity-full { color: #c83232; font-weight: 800; }

.baidu-quota-head,
.baidu-quota-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.baidu-quota-head strong {
  color: var(--v3-ink);
  font-size: 14px;
}

.baidu-quota-head span,
.baidu-quota-empty {
  color: var(--v3-muted);
  font-size: 12px;
}

.baidu-quota-track {
  height: 9px;
  margin: 12px 0 13px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--v3-line);
}

.baidu-quota-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--v3-primary), #79a8f7);
}

.baidu-quota-values span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.baidu-quota-values span:nth-child(2) { text-align: center; }
.baidu-quota-values span:last-child { text-align: right; }

.baidu-quota-values em {
  color: var(--v3-muted);
  font-size: 10px;
  font-style: normal;
}

.baidu-quota-values strong {
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storage-capacity-modal { width: min(500px, calc(100vw - 24px)); }
.storage-capacity-dialog { display: grid; justify-items: center; text-align: center; gap: 12px; }
.storage-capacity-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #ffe5e5;
  color: #c83232;
}
.storage-capacity-dialog-icon .ui-icon { width: 24px; height: 24px; }
.storage-capacity-dialog > strong { color: #8f2525; font-size: 18px; }
.storage-capacity-dialog > p { margin: 0; color: #6f4c4c; font-size: 12px; line-height: 1.7; }
.storage-capacity-countdown { width: 100%; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 10px; background: #fff0f0; }
.storage-capacity-countdown span { color: #9d6262; font-size: 10px; }
.storage-capacity-countdown strong { color: #c83232; font-size: 12px; }
.storage-capacity-dialog .modal-actions { width: 100%; justify-content: center; }

@media (max-width: 520px) {
  .tenant-storage-card > header { align-items: flex-start; }
  .tenant-storage-card > header > strong { font-size: 18px; }
  .tenant-storage-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tenant-storage-summary span { display: grid; gap: 2px; }
  .tenant-storage-summary strong { margin-left: 0; }
  .tenant-storage-breakdown { grid-template-columns: 1fr; }
  .baidu-quota-card { padding: 14px; }
  .baidu-quota-values { align-items: flex-start; }
  .baidu-quota-values strong { font-size: 12px; }
  .storage-record-modal { width: calc(100vw - 16px); }
  .storage-record-browser { height: calc(100dvh - 92px); min-height: 0; }
  .storage-record-overview { padding: 12px; grid-template-columns: 1fr 1fr; }
  .storage-record-overview p { grid-column: 1 / -1; margin: 2px 0 0; }
  .storage-record-toolbar { padding: 10px 12px; flex-wrap: wrap; }
  .storage-record-toolbar label { width: 100%; }
  .storage-record-toolbar > button { width: 100%; }
  .storage-record-table { min-width: 820px; }
  .storage-record-footer { padding: 10px 12px; align-items: stretch; flex-direction: column; }
  .storage-record-pagination,
  .storage-record-selection { justify-content: space-between; }
  .storage-delete-confirm { min-height: calc(100dvh - 92px); padding: 28px 18px; }
  .storage-delete-confirm dl { grid-template-columns: 1fr; }
  .storage-delete-confirm dl div + div { border-top: 1px solid var(--v3-line); border-left: 0; }
  .storage-delete-confirm footer { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tenant-storage-track i { animation: none; }
}

.project-agent-empty {
  margin: 2px 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(239, 244, 253, .85);
  color: #69778e;
  font-size: 11px;
  line-height: 1.6;
}

.project-agent-rail > footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 1280px) {
  .project-agent-layout {
    grid-template-columns: 1fr;
  }

  .project-agent-host {
    position: static;
  }
}

@media (max-width: 900px) {
  .agent-layout,
  .agent-skill-grid {
    grid-template-columns: 1fr;
  }

  .agent-skill-stage {
    grid-template-columns: 1fr;
  }

  .agent-skill-list {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #e6ebf4;
  }

  .agent-skill-list button {
    flex: 0 0 230px;
  }

  .agent-skill-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-chat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: clamp(720px, 88vh, 860px);
    min-height: 0;
    max-height: 860px;
    overflow: hidden;
  }

  .agent-session-collapse {
    display: none;
  }

  .agent-session-rail {
    display: block;
    max-height: 190px;
    overflow: hidden;
    padding: 13px;
    border-right: 0;
    border-bottom: 1px solid #e4e9f3;
  }

  .agent-session-rail > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .agent-session-list {
    display: flex;
    margin: 10px -3px 0;
    padding: 0 3px 3px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .agent-session-entry {
    flex: 0 0 220px;
  }

  .agent-session-rail > footer {
    display: none;
  }

  .agent-chat-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
  }

  .agent-history-card {
    grid-column: auto;
  }

  .project-agent-rail {
    border-radius: 18px;
  }
}

@media (max-width: 720px) {
  .agent-skill-intro {
    align-items: flex-start;
    padding: 17px;
  }

  .agent-skill-intro h2 {
    font-size: 18px;
  }

  .agent-skill-intro p {
    font-size: 12px;
  }

  .agent-skill-ready-count {
    min-width: 74px;
    font-size: 24px;
  }

  .agent-skill-list {
    padding: 11px;
  }

  .agent-skill-list button {
    flex-basis: 205px;
    padding: 11px;
  }

  .agent-skill-runner {
    padding: 17px 13px 22px;
  }

  .agent-skill-runner > header h2 {
    font-size: 17px;
  }

  .agent-skill-flow {
    display: flex;
    gap: 7px;
    overflow-x: auto;
  }

  .agent-skill-flow li {
    flex: 0 0 180px;
  }

  .agent-skill-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-skill-actions .v3-btn {
    width: 100%;
  }

  .agent-chat-shell {
    height: min(860px, 94vh);
    max-height: 860px;
    margin-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .agent-session-rail {
    max-height: 145px;
  }

  .agent-page-intro {
    gap: 12px;
    padding: 16px;
  }

  .agent-page-intro h1 {
    font-size: 20px;
    line-height: 1.25;
  }

  .agent-page-intro p {
    display: none;
  }

  .agent-page-intro .v3-btn {
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
  }

  .agent-page-intro + .review-control-row .operation-scope-lock {
    display: none;
  }

  .agent-view-tabs {
    display: flex;
    width: 100%;
  }

  .agent-view-tabs button {
    flex: 0 0 auto;
  }

  .agent-connector-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 12px;
  }

  .agent-connector-strip span {
    justify-content: center;
    min-width: 0;
    padding: 7px 5px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agent-request,
  .agent-script-content {
    min-height: 150px;
  }

  .agent-message-list article.is-user {
    margin-left: 0;
  }

  .agent-chat-header {
    align-items: flex-start;
    padding: 14px;
  }

  .agent-chat-header h2 {
    font-size: 15px;
  }

  .agent-chat-header p {
    display: none;
  }

  .agent-chat-live {
    padding: 6px 8px;
  }

  .agent-chat-messages {
    gap: 13px;
    padding: 16px 10px 20px;
  }

  .agent-chat-message.is-agent,
  .agent-live-progress {
    width: 100%;
  }

  .agent-chat-message.is-user {
    width: 90%;
  }

  .agent-chat-avatar {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .agent-chat-composer {
    max-height: 230px;
    padding: 9px;
  }

  .agent-chat-input-wrap {
    grid-template-columns: minmax(50px, auto) minmax(62px, auto) minmax(58px, auto) minmax(0, 1fr) minmax(62px, auto);
    grid-template-rows: minmax(48px, auto) 38px;
    gap: 6px;
    padding: 6px;
  }

  .agent-chat-input-wrap textarea {
    grid-row: 1;
    grid-column: 1 / -1;
    height: 48px;
    min-height: 48px;
    max-height: 96px;
    padding: 8px 9px;
  }

  .agent-chat-add,
  .agent-web-toggle,
  .agent-chat-send {
    grid-row: 2;
    align-self: center;
    min-height: 38px;
    padding: 0 9px;
  }

  .agent-chat-add {
    grid-column: 1;
  }

  .agent-web-toggle {
    grid-column: 3;
    min-height: 38px;
    padding: 0 7px;
  }

  .agent-model-select {
    grid-column: 2;
    grid-row: 2;
    min-width: 68px;
    min-height: 38px;
    padding: 0 7px;
  }

  .agent-chat-send {
    grid-column: 5;
  }

  .agent-model-select select {
    padding-right: 11px;
    font-size: 10px;
  }

  .agent-model-chevron {
    right: 6px;
  }

  .agent-chat-composer-meta {
    align-items: center;
    flex-direction: row;
  }

  .agent-chat-composer-meta > span {
    display: none;
  }

  .agent-compose-actions,
  .project-agent-submit {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .agent-compose-actions .v3-btn,
  .project-agent-submit .v3-btn {
    width: 100%;
  }

  .project-agent-rail {
    padding: 15px;
  }

  .project-agent-rail > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-agent-messages {
    max-height: none;
  }
}
/* Dashboard action center */
.dashboard-action-stack { display: grid; gap: 18px; margin-top: 20px; }
.dashboard-setup-card,
.dashboard-action-card { border: 1px solid #dfe7f3; border-radius: 22px; background: #fff; box-shadow: 0 14px 34px rgba(31, 56, 94, .055); padding: 24px; }
.dashboard-setup-card { background: linear-gradient(135deg, #f8fbff 0%, #fff 62%, #f5f8ff 100%); border-color: #d6e2f5; }
.dashboard-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.dashboard-section-head h2 { margin: 5px 0 0; color: #0b1b35; font-size: 22px; line-height: 1.28; }
.dashboard-section-head p { margin: 7px 0 0; color: #738198; font-size: 13px; }
.dashboard-setup-progress { display: flex; align-items: baseline; color: #1d58cc; padding: 6px 2px; }
.dashboard-setup-progress strong { font-size: 30px; line-height: 1; }
.dashboard-setup-progress span { margin-left: 4px; color: #8391a7; font-weight: 700; }
.dashboard-progress-track { height: 7px; border-radius: 999px; overflow: hidden; background: #e8eef8; margin-bottom: 17px; }
.dashboard-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1d5ed6, #6487ed); transition: width .45s ease; }
.dashboard-setup-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dashboard-setup-item { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 70px; padding: 12px 14px; border: 1px solid #e2e9f4; border-radius: 15px; background: rgba(255, 255, 255, .86); }
.dashboard-check { width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid #c8d4e6; border-radius: 50%; color: white; }
.dashboard-check svg { width: 14px; height: 14px; }
.dashboard-setup-item.is-complete .dashboard-check { border-color: #23aa77; background: #23aa77; }
.dashboard-setup-item > div { min-width: 0; }
.dashboard-setup-item strong { display: block; color: #17263e; font-size: 14px; }
.dashboard-setup-item p { margin: 4px 0 0; overflow: hidden; color: #7a879b; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-setup-item > em { color: #26a477; font-size: 12px; font-style: normal; font-weight: 700; }
.dashboard-count-badge,
.dashboard-clear-badge { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; font-size: 13px; font-weight: 800; }
.dashboard-count-badge { background: #e8f0ff; color: #1b58ca; }
.dashboard-clear-badge { padding: 0 12px; background: #eaf8f2; color: #218966; }
.dashboard-todo-list,
.dashboard-work-list { display: grid; gap: 9px; }
.dashboard-todo-item,
.dashboard-work-item { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #e3eaf4; border-radius: 15px; background: #fbfcff; text-align: left; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.dashboard-todo-item:hover,
.dashboard-work-item:hover { border-color: #b9cae8; background: #f6f9ff; transform: translateY(-1px); }
.dashboard-todo-item.is-alert { border-color: #f3d8d8; background: #fffafa; }
.dashboard-action-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #eaf1ff; color: #1b59cc; }
.dashboard-action-icon svg { width: 17px; height: 17px; }
.dashboard-todo-item > span:nth-child(2),
.dashboard-work-item > span:nth-child(2) { min-width: 0; }
.dashboard-todo-item strong,
.dashboard-work-item strong { display: block; overflow: hidden; color: #16243b; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-todo-item em,
.dashboard-work-item em { display: block; margin-top: 4px; overflow: hidden; color: #7c899d; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-todo-item b,
.dashboard-work-item b { display: flex; align-items: center; gap: 5px; color: #1654c7; font-size: 12px; white-space: nowrap; }
.dashboard-todo-item b svg,
.dashboard-work-item b svg { width: 13px; height: 13px; }
.dashboard-calm-state { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 14px 16px; border-radius: 15px; background: #f6fbf8; color: #23906b; }
.dashboard-calm-state > svg { width: 22px; height: 22px; }
.dashboard-calm-state strong { display: block; color: #1b3c31; font-size: 14px; }
.dashboard-calm-state em { display: block; margin-top: 4px; color: #6f877e; font-size: 12px; font-style: normal; }
.dashboard-latest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-latest-grid.is-single { grid-template-columns: 1fr; }
.dashboard-output-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.dashboard-output-counts button { display: flex; align-items: baseline; gap: 6px; padding: 11px 12px; border: 1px solid #e4eaf3; border-radius: 13px; background: #f8faff; text-align: left; }
.dashboard-output-counts strong { color: #1457cf; font-size: 20px; }
.dashboard-output-counts span { color: #718096; font-size: 12px; }
.dashboard-output-list { display: grid; gap: 2px; }
.dashboard-output-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 10px 5px; border-bottom: 1px solid #eef2f7; text-align: left; }
.dashboard-output-list button:last-child { border-bottom: 0; }
.dashboard-output-list button > span { min-width: 0; }
.dashboard-output-list strong { display: block; overflow: hidden; color: #1a2940; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-output-list em { display: block; margin-top: 4px; color: #8390a3; font-size: 11px; font-style: normal; }
.dashboard-output-list svg { width: 14px; color: #2d62c9; }

/* Task-first Linsi dashboard: the active account and the next creative action lead. */
.dashboard-home { width: 100%; max-width: 1480px; margin: 0 auto; color: #14243d; }
.dashboard-select-account { max-width: 760px; padding: 42px; border: 1px solid #dbe6f8; border-radius: 22px; background: linear-gradient(130deg, #fff, #f3f7ff); }
.dashboard-select-account h1 { margin: 11px 0 7px; color: #102344; font-size: clamp(25px, 2.4vw, 34px); }
.dashboard-select-account p { max-width: 500px; margin: 0 0 22px; color: #60738e; font-size: 14px; line-height: 1.7; }
.dashboard-home-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 2px 0 21px; }
.dashboard-home-kicker { color: #526a91; font-size: 12px; font-weight: 700; letter-spacing: .07em; }
.dashboard-home-heading h1 { margin: 9px 0 7px; color: #102344; font-size: clamp(29px, 2.6vw, 39px); font-weight: 800; letter-spacing: -.035em; line-height: 1.18; }
.dashboard-heading-dot { color: #1d61db; }
.dashboard-home-heading p { margin: 0; color: #697b96; font-size: 14px; line-height: 1.6; }
.dashboard-home-task-link { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 10px 13px; border: 1px solid #d8e3f3; border-radius: 10px; background: rgba(255, 255, 255, .9); color: #2459b5; font-size: 13px; font-weight: 700; }
.dashboard-home-task-link svg { width: 15px; height: 15px; }
.dashboard-home-task-link:hover, .dashboard-home-task-link:focus-visible { border-color: #9cb8ee; background: #f4f8ff; }
.dashboard-home-hero { display: grid; grid-template-columns: minmax(0, 1.78fr) minmax(290px, .86fr); gap: 18px; align-items: stretch; }
.dashboard-creation-card, .dashboard-account-context, .dashboard-flow-section { min-width: 0; border: 1px solid #dfe7f5; border-radius: 20px; background: #fff; box-shadow: 0 14px 34px rgba(29, 58, 112, .045); }
.dashboard-creation-card { padding: 27px 29px 23px; border-color: #d5e2f9; background: linear-gradient(126deg, #fff 0%, #fcfdff 58%, #f1f5ff 100%); }
.dashboard-creation-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.dashboard-card-kicker { display: inline-block; color: #3968c6; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.dashboard-creation-card h2 { margin: 8px 0 6px; color: #102344; font-size: clamp(22px, 1.9vw, 28px); font-weight: 800; line-height: 1.25; }
.dashboard-creation-card header p { margin: 0; color: #71809a; font-size: 13px; line-height: 1.55; }
.dashboard-creation-symbol { width: 44px; height: 44px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 14px; background: #ebf1ff; color: #3069d6; }
.dashboard-creation-symbol svg { width: 22px; height: 22px; }
.dashboard-source-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.dashboard-source-tabs button { min-height: 39px; padding: 9px 14px; border: 1px solid #e0e8f5; border-radius: 10px; background: rgba(255, 255, 255, .86); color: #526580; font-size: 13px; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.dashboard-source-tabs button:hover { border-color: #b5c9ef; color: #1c54be; }
.dashboard-source-tabs button.is-active { border-color: #91b2ef; background: #eaf1ff; color: #1453c9; box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08); }
.dashboard-source-tabs button:focus-visible, .dashboard-create-button:focus-visible, .dashboard-context-action:focus-visible, .dashboard-flow-steps button:focus-visible { outline: 3px solid rgba(33, 103, 220, .32); outline-offset: 2px; }
.dashboard-source-guide { display: flex; align-items: center; gap: 13px; min-height: 81px; padding: 16px 17px; border: 1px solid #e3eaf6; border-radius: 12px; background: rgba(246, 249, 255, .92); }
.dashboard-source-guide > svg { width: 22px; height: 22px; flex: 0 0 auto; color: #4576cf; }
.dashboard-source-guide strong { display: block; color: #233a5b; font-size: 14px; }
.dashboard-source-guide small { display: block; margin-top: 4px; color: #71809a; font-size: 12px; line-height: 1.5; }
.dashboard-source-field { display: grid; gap: 7px; min-height: 81px; color: #314461; font-size: 12px; font-weight: 700; }
.dashboard-source-field :is(input, textarea) { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d7e2f3; border-radius: 10px; outline: none; background: #fff; color: #17263f; font: inherit; font-size: 14px; font-weight: 400; }
.dashboard-source-field textarea { min-height: 61px; resize: vertical; }
.dashboard-source-field :is(input, textarea):focus { border-color: #5988dd; box-shadow: 0 0 0 3px rgba(35, 102, 211, .12); }
.dashboard-creation-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; }
.dashboard-creation-card > footer > span { color: #728099; font-size: 12px; line-height: 1.5; }
.dashboard-create-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; min-height: 43px; padding: 10px 17px; border: 1px solid #1554c7; border-radius: 10px; background: #1554c7; box-shadow: 0 8px 17px rgba(21, 84, 199, .16); color: #fff; font-size: 14px; font-weight: 800; }
.dashboard-create-button:hover { background: #0e46b0; box-shadow: 0 10px 18px rgba(21, 84, 199, .23); }
.dashboard-create-button svg { width: 16px; height: 16px; }
.dashboard-account-context { display: flex; flex-direction: column; padding: 22px 22px 18px; }
.dashboard-context-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #6b7b95; font-size: 11px; font-weight: 700; }
.dashboard-context-state { max-width: 56%; padding: 5px 8px; border-radius: 999px; background: #edf5ff; color: #2b64c5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-context-profile { display: flex; align-items: center; gap: 11px; margin: 17px 0 13px; min-width: 0; }
.dashboard-context-profile img { width: 43px; height: 43px; flex: 0 0 auto; object-fit: cover; border: 1px solid #d9e4f5; border-radius: 14px; background: #f4f7fc; }
.dashboard-context-profile div { min-width: 0; }
.dashboard-context-profile strong { display: block; overflow: hidden; color: #1b2b45; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-context-profile span { display: block; margin-top: 3px; color: #71809b; font-size: 12px; }
.dashboard-context-facts { display: grid; gap: 0; }
.dashboard-context-facts > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; min-height: 37px; align-items: center; border-top: 1px solid #edf1f8; font-size: 12px; }
.dashboard-context-facts span { color: #8190a5; }
.dashboard-context-facts strong { overflow: hidden; color: #31445f; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-context-action { display: inline-flex; align-items: center; align-self: flex-start; gap: 5px; margin-top: auto; padding: 12px 0 0; color: #1c58c4; font-size: 12px; font-weight: 800; }
.dashboard-context-action svg { width: 14px; height: 14px; }
.dashboard-home .dashboard-action-stack { gap: 18px; margin-top: 18px; }
.dashboard-home .account-connection-notice { margin: 0; border-radius: 18px; box-shadow: 0 12px 28px rgba(29, 58, 112, .035); }
.dashboard-priority-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dashboard-priority-grid.is-single { grid-template-columns: 1fr; }
.dashboard-home .dashboard-action-card { padding: 22px 24px; border-radius: 18px; box-shadow: 0 12px 28px rgba(29, 58, 112, .035); }
.dashboard-home .dashboard-section-head { align-items: center; margin-bottom: 13px; }
.dashboard-home .dashboard-section-head h2 { font-size: 18px; }
.dashboard-home .dashboard-work-list, .dashboard-home .dashboard-todo-list { gap: 0; }
.dashboard-home .dashboard-work-item, .dashboard-home .dashboard-todo-item { border: 0; border-top: 1px solid #e9eff8; border-radius: 0; padding: 11px 2px; background: transparent; }
.dashboard-home .dashboard-work-item:first-child, .dashboard-home .dashboard-todo-item:first-child { border-top: 0; }
.dashboard-home .dashboard-work-item:hover, .dashboard-home .dashboard-todo-item:hover { background: #f7f9fe; transform: none; }
.dashboard-home .dashboard-todo-item.is-alert { color: #a33f3f; }
.dashboard-home .dashboard-output-counts { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 5px; }
.dashboard-home .dashboard-output-counts button { border: 0; background: #f3f7fe; }
.dashboard-home .dashboard-output-list button { padding: 13px 8px; border-radius: 9px; background: transparent; }
.dashboard-home .dashboard-output-list button:hover { background: #f7f9fe; }
.dashboard-home .dashboard-output-list em { font-size: 12px; }
.dashboard-flow-section { padding: 20px 23px 23px; }
.dashboard-flow-section .dashboard-section-head { margin-bottom: 15px; }
.dashboard-flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dashboard-flow-steps button { display: grid; grid-template-columns: minmax(0, 1fr) 17px; align-content: start; gap: 4px; min-width: 0; min-height: 121px; padding: 13px 12px; border: 1px solid #e2e9f4; border-radius: 13px; background: #f9fbff; text-align: left; transition: background .18s ease, border-color .18s ease; }
.dashboard-flow-steps button:hover { border-color: #a8c0ed; background: #f0f5ff; }
.dashboard-flow-number { grid-column: 1 / -1; color: #3d6fd1; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.dashboard-flow-steps strong { color: #223451; font-size: 15px; line-height: 1.3; }
.dashboard-flow-steps small { grid-column: 1 / -1; color: #77859b; font-size: 11px; line-height: 1.45; }
.dashboard-flow-steps svg { grid-column: 2; grid-row: 2; width: 15px; height: 15px; color: #4574d0; }
.dashboard-account-metrics { border: 1px solid #dfe7f3; border-radius: 16px; background: #fff; overflow: hidden; }
.dashboard-account-metrics > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 22px; color: #253b5d; font-size: 14px; font-weight: 800; list-style: none; }
.dashboard-account-metrics > summary::-webkit-details-marker { display: none; }
.dashboard-account-metrics > summary span { display: inline-flex; align-items: center; gap: 8px; color: #7386a1; font-size: 12px; font-weight: 500; }
.dashboard-account-metrics > summary svg { width: 15px; height: 15px; transition: transform .2s ease; }
.dashboard-account-metrics[open] > summary svg { transform: rotate(180deg); }
.dashboard-account-metrics-content { margin: 0 14px 14px; padding: 2px; border-radius: 15px; background: linear-gradient(125deg, #0d48b1, #2365d5); }
.dashboard-account-metrics .dashboard-data-overview { width: 100%; min-height: 210px; background: rgba(255, 255, 255, .085); }
.v3-sidebar .nav button.nav-script-shortcut { margin-left: 16px; width: calc(100% - 16px); min-height: 39px; color: #365778; }
.v3-sidebar .nav button.nav-script-shortcut .nav-icon { background: #eef3ff; color: #346cd5; }
.v3-sidebar .nav button.nav-script-shortcut.active { color: #1557c7; }
@media (min-width: 821px) {
  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .nav button.nav-script-shortcut { margin-left: 0; width: 100%; }
}
@media (max-width: 1180px) {
  .dashboard-home-hero { grid-template-columns: minmax(0, 1.35fr) minmax(275px, .85fr); }
  .dashboard-creation-card { padding: 23px; }
  .dashboard-flow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dashboard-home-hero, .dashboard-priority-grid { grid-template-columns: 1fr; }
  .dashboard-account-context { min-height: 0; }
  .dashboard-context-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .dashboard-context-facts > div { display: grid; grid-template-columns: 1fr; align-content: start; gap: 5px; }
}
@media (max-width: 620px) {
  .dashboard-home-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 15px; }
  .dashboard-home-heading h1 { font-size: 27px; }
  .dashboard-home-heading p { font-size: 13px; }
  .dashboard-home-task-link { min-height: 38px; }
  .dashboard-creation-card, .dashboard-account-context, .dashboard-flow-section { border-radius: 17px; }
  .dashboard-creation-card, .dashboard-account-context { padding: 18px; }
  .dashboard-creation-card > header { margin-bottom: 16px; }
  .dashboard-creation-card h2 { font-size: 23px; }
  .dashboard-creation-symbol { width: 38px; height: 38px; }
  .dashboard-source-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-source-tabs button { padding: 8px 5px; }
  .dashboard-creation-card > footer { align-items: stretch; flex-direction: column; margin-top: 14px; }
  .dashboard-create-button { justify-content: center; }
  .dashboard-context-facts { grid-template-columns: 1fr; gap: 0; }
  .dashboard-context-facts > div { grid-template-columns: 70px minmax(0, 1fr); align-items: center; }
  .dashboard-home .dashboard-action-card { padding: 17px 16px; }
  .dashboard-flow-section { padding: 18px 16px; }
  .dashboard-flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-flow-steps button { min-height: 105px; }
  .dashboard-account-metrics > summary { padding: 16px; }
  .dashboard-account-metrics > summary span { display: none; }
  .v3-sidebar .nav button.nav-script-shortcut { margin-left: 0; width: 100%; }
}

@media (max-width: 900px) {
  .dashboard-setup-list,
  .dashboard-latest-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .dashboard-action-stack { gap: 13px; margin-top: 14px; }
  .dashboard-setup-card,
  .dashboard-action-card { padding: 17px 14px; border-radius: 18px; }
  .dashboard-section-head { gap: 10px; margin-bottom: 14px; }
  .dashboard-section-head h2 { font-size: 18px; }
  .dashboard-section-head p { font-size: 12px; }
  .dashboard-setup-progress strong { font-size: 25px; }
  .dashboard-setup-item { grid-template-columns: 28px minmax(0, 1fr); min-height: 62px; padding: 10px; }
  .dashboard-setup-item .v3-text-link,
  .dashboard-setup-item > em { grid-column: 2; justify-self: start; }
  .dashboard-setup-item p { white-space: normal; }
  .dashboard-todo-item,
  .dashboard-work-item { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 11px 10px; }
  .dashboard-action-icon { width: 34px; height: 34px; }
  .dashboard-todo-item b,
  .dashboard-work-item b { grid-column: 2; justify-self: start; }
  .dashboard-todo-item em,
  .dashboard-work-item em { white-space: normal; }
  .dashboard-output-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Agent composer: one clear writing surface with contextual tools. */
.agent-chat-composer {
  max-height: 360px;
  padding: 11px 16px 14px;
  background: #f7f9fd;
}

.agent-chat-quick {
  margin: 0 0 8px;
}

.agent-chat-quick button {
  padding: 6px 10px;
  border-color: #e0e6f0;
  background: rgba(255, 255, 255, .78);
  color: #65738a;
}

.agent-chat-input-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 11px 12px 9px;
  border: 1px solid #d9e1ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(54, 72, 108, .07);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.agent-chat-input-wrap:focus-within {
  border-color: #7082dd;
  box-shadow: 0 0 0 3px rgba(91, 111, 216, .09), 0 9px 24px rgba(54, 72, 108, .08);
}

.agent-chat-input-wrap textarea {
  width: 100%;
  min-height: 74px;
  max-height: 220px;
  padding: 6px 5px 2px;
  overflow-y: auto;
  border: 0;
  outline: 0;
  resize: none;
  color: #26344c;
  background: transparent;
  font: inherit;
  line-height: 1.6;
}

.agent-chat-input-wrap textarea::placeholder {
  color: #96a2b6;
}

.agent-selected-attachments {
  margin: 0;
  padding-bottom: 1px;
}

.agent-selected-attachments > span {
  max-width: min(320px, 100%);
  padding: 5px 7px 5px 6px;
  border-color: #d9e1ef;
  border-radius: 9px;
  background: #f7f9fe;
}

.agent-selected-attachments > span > i {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: #e9edff;
  color: #5266c7;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.agent-selected-attachments > span > b {
  color: #52617a;
  font-size: 10px;
}

.agent-selected-attachments > span > em {
  min-width: 0;
  overflow: hidden;
  color: #76839a;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.agent-chat-tools,
.agent-chat-submit-area {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.agent-chat-submit-area {
  justify-content: flex-end;
}

.agent-chat-add,
.agent-web-toggle,
.agent-chat-send {
  grid-column: auto;
  grid-row: auto;
  min-height: 36px;
}

.agent-chat-add {
  width: auto;
  flex: 0 0 auto;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f3f6fa;
  color: #66748a;
}

.agent-chat-add strong {
  color: inherit;
  font-size: 11px;
  font-weight: 760;
}

.agent-chat-add:hover,
.agent-chat-add.is-active {
  border-color: #cbd5eb;
  background: #edf1ff;
  color: #4e63c8;
}

.agent-model-select {
  grid-column: auto;
  grid-row: auto;
  min-width: 96px;
  min-height: 36px;
  padding: 0 9px;
  border-color: transparent;
  border-radius: 10px;
  background: #f3f6fa;
}

.agent-model-select select {
  font-size: 11px;
}

.agent-web-toggle {
  min-height: 36px;
  padding: 0 10px;
  border-color: transparent;
  border-radius: 10px;
  background: #f3f6fa;
}

.agent-web-toggle.is-active {
  border-color: #b9c6ee;
  background: #edf1ff;
}

.agent-chat-draft {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #738097;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}

.agent-chat-draft:hover:not(:disabled) {
  background: #f1f4fa;
  color: #5265bf;
}

.agent-chat-draft:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.agent-chat-keyboard-hint {
  color: #9aa5b6;
  font-size: 9px;
  white-space: nowrap;
}

.agent-chat-send {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 5px 12px rgba(57, 79, 185, .18);
}

.agent-chat-send:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(57, 79, 185, .23);
}

.agent-chat-send .ui-icon {
  width: 18px;
  height: 18px;
}

.agent-chat-service-note {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
  padding: 0 4px;
  color: #8b96a8;
  font-size: 9px;
}

.agent-chat-service-note i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #c1c9d7;
}

.agent-chat-service-note.is-ready i {
  background: #45ad82;
  box-shadow: 0 0 0 3px rgba(69, 173, 130, .1);
}

.agent-chat-service-note.is-blocked {
  color: #a47a3c;
}

.agent-chat-service-note.is-blocked i {
  background: #d2a457;
}

@media (max-width: 760px) {
  .agent-chat-composer {
    padding: 9px;
  }

  .agent-chat-toolbar {
    gap: 8px;
  }

  .agent-chat-tools,
  .agent-chat-submit-area {
    gap: 5px;
  }

  .agent-chat-keyboard-hint {
    display: none;
  }
}

@media (max-width: 520px) {
  .agent-chat-input-wrap {
    display: flex;
    gap: 7px;
    padding: 9px 8px 7px;
    border-radius: 14px;
  }

  .agent-chat-input-wrap textarea {
    height: auto;
    min-height: 62px;
    max-height: 150px;
    padding: 7px 7px 3px;
  }

  .agent-chat-toolbar {
    gap: 6px;
  }

  .agent-chat-tools {
    flex: 1 1 auto;
    overflow: hidden;
  }

  .agent-chat-submit-area {
    flex: 0 0 auto;
  }

  .agent-chat-add {
    width: 34px;
    flex-basis: 34px;
    min-height: 34px;
    padding: 0;
  }

  .agent-chat-add strong {
    display: none;
  }

  .agent-model-select {
    min-width: 82px;
    min-height: 34px;
    padding: 0 7px;
  }

  .agent-web-toggle {
    min-height: 34px;
    padding: 0 8px;
  }

  .agent-chat-draft {
    padding: 0 5px;
  }

  .agent-chat-send {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .agent-chat-service-note {
    padding: 0 3px;
  }
}

/* Keep hot radar 2.0 overrides after the legacy responsive bundle. */
.radar-grid polygon, .radar-grid line { fill: none; stroke: #dbe5f2; stroke-width: .9; }
.radar-grid polygon:last-of-type { stroke: #c8d6e9; stroke-width: 1.2; }
.radar-threshold { fill: rgba(215,154,43,.025); stroke: var(--radar-amber); stroke-width: 1.35; stroke-dasharray: 4 6; }
.radar-current { fill: url(#radar-signal-fill); stroke: var(--radar-blue); stroke-width: 2.8; stroke-linejoin: round; filter: drop-shadow(0 8px 9px rgba(47,107,255,.2)); }
.radar-labels text { fill: #46566d; font-size: 9.5px; font-weight: 760; }
.radar-labels .radar-axis-value { fill: var(--radar-blue); font-size: 10px; }
.radar-labels .radar-axis-value.missing { fill: #a36a12; }
.hot-radar-workspace { grid-template-columns: minmax(0,1.55fr) minmax(320px,.72fr); gap: 12px; }
.hot-radar-list-head { min-height: 58px; padding: 10px 14px; }
.hot-radar-filter button { min-height: 32px; padding: 6px 9px; border-radius: 999px; }
.hot-radar-topic-list { max-height: 620px; }
.hot-radar-topic { min-height: 72px; padding: 11px 15px; grid-template-columns: 32px minmax(0,1fr) 58px; }
.hot-radar-detail { top: 10px; min-height: 0; padding: 18px; }

@media (max-width: 1100px) {
  .hot-radar-workspace { grid-template-columns: 1fr; }
  .hot-radar-detail { position: static; }
}

@media (max-width: 760px) {
  .hot-radar-decision-stage .hot-radar-chart { display: none; }
  .hot-radar-decision-stage .hot-radar-compact-bars { width: 100%; margin: 4px 0 0; display: grid; gap: 10px; }
  .hot-radar-workspace { grid-template-columns: 1fr; }
  .hot-radar-list-head { padding: 12px; }
  .hot-radar-topic-list { max-height: none; }
  .hot-radar-topic { min-height: 74px; padding: 11px 12px; grid-template-columns: 28px minmax(0,1fr) 46px; gap: 8px; }
  .hot-radar-detail { display: none; }
  body.mobile-hot-radar-detail-open .hot-radar-detail { display: block; position: fixed; }
}

/* Mobile task-first refinement: Agent chat and material data views. */
.library-import-toggle,
.library-import-backdrop,
.library-import-sheet,
.library-filter-toggle,
.agent-mobile-session-toggle,
.agent-session-mobile-close,
.agent-session-backdrop,
.agent-chat-to-latest {
  display: none;
}

.route-library .library-view-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.route-library .library-search-row {
  display: flex;
  align-items: end;
  gap: 8px;
}

.route-library .library-search-row .library-search-label {
  min-width: 0;
  flex: 1 1 auto;
}

.route-library .library-layout-switch {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid #e0e7f1;
  border-radius: 12px;
  background: #f4f7fb;
  gap: 3px;
}

.route-library .library-layout-switch .mini {
  min-height: 36px;
  padding: 0 14px;
  border-color: transparent;
  background: transparent;
}

.route-library .library-layout-switch .mini.is-active {
  border-color: #cfddf3;
  background: #fff;
  color: var(--v3-primary);
  box-shadow: 0 4px 12px rgba(38, 76, 135, .08);
}

.route-library .library-shelf-toolbar {
  grid-template-columns: repeat(2, minmax(145px, 190px));
  justify-content: start;
}

.route-library .library-compact-list {
  display: grid;
  overflow: hidden;
  border: 1px solid #e0e7f1;
  border-radius: 16px;
  background: #fff;
}

.route-library .library-compact-row {
  display: grid;
  min-width: 0;
  min-height: 88px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
  cursor: pointer;
  grid-template-columns: 64px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
}

.route-library .library-compact-row:last-child { border-bottom: 0; }
.route-library .library-compact-row:hover { background: #f8faff; }
.route-library .library-compact-row.is-selected { background: #edf4ff; box-shadow: inset 3px 0 var(--v3-primary); }
.route-library .library-compact-row:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: -3px; }

.route-library .library-compact-thumb {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 64px;
  height: 68px;
  border-radius: 11px;
  background: #e8edf5;
  place-items: center;
}

.route-library .library-compact-thumb video,
.route-library .library-compact-thumb img { width: 100%; height: 100%; object-fit: cover; }
.route-library .library-compact-thumb .library-audio-mark { min-height: 100%; font-size: 9px; text-align: center; }

.route-library .library-compact-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.route-library .library-compact-copy strong,
.route-library .library-compact-copy span,
.route-library .library-compact-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-library .library-compact-copy strong { color: #1d2b40; font-size: 14px; }
.route-library .library-compact-copy span { color: #758298; font-size: 11px; }
.route-library .library-compact-copy em { color: #5270a5; font-size: 10px; font-style: normal; }
.route-library .library-compact-arrow { color: #5d71a0; font-size: 10px; font-weight: 800; white-space: nowrap; }

.agent-chat-panel { position: relative; }
.agent-chat-to-latest {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 132px;
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d4def0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #4e63bd;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(49, 72, 128, .14);
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.agent-chat-to-latest .ui-icon { width: 18px; height: 18px; }
.agent-chat-to-latest:hover,
.agent-chat-to-latest:focus-visible { border-color: #aebee0; background: #f7f9ff; color: #245fc6; }
.agent-chat-to-latest:active { transform: translateY(1px); }
.agent-chat-to-latest:not([hidden]) { display: inline-grid; place-items: center; }

@media (max-width: 767px) {
  body.agent-session-drawer-open { overflow: hidden; }

  .v3-shell .content.route-review {
    display: flex;
    width: 100%;
    height: calc(var(--linsi-visual-viewport, 100dvh) - 58px - env(safe-area-inset-top));
    min-height: 0;
    padding: 8px 8px calc(var(--mobile-nav-height) + 8px + env(safe-area-inset-bottom));
    overflow: hidden;
    flex-direction: column;
    gap: 8px;
  }

  .route-review .agent-page-intro,
  .route-review .agent-connector-strip {
    display: none;
  }

  .route-review .review-control-row {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .route-review .agent-view-tabs {
    display: flex;
    width: 100%;
    padding: 3px;
    overflow-x: auto;
    border: 1px solid #e0e6f1;
    border-radius: 14px;
    background: #f2f5fa;
    gap: 2px;
    scrollbar-width: none;
  }

  .route-review .agent-view-tabs button {
    min-height: 40px;
    padding: 0 13px;
    flex: 0 0 auto;
    border-radius: 11px;
    font-size: 12px;
  }

  .route-review .agent-chat-shell {
    display: grid;
    min-height: 0;
    max-height: none;
    height: auto;
    margin: 0;
    overflow: hidden;
    border-radius: 17px;
    flex: 1 1 auto;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .route-review .agent-chat-panel {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .route-review .agent-session-rail {
    position: fixed;
    z-index: 82;
    top: calc(58px + env(safe-area-inset-top));
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    left: 0;
    display: grid;
    width: min(88vw, 360px);
    max-height: none;
    padding: 16px;
    overflow: hidden;
    border-right: 1px solid #dce4f0;
    border-bottom: 0;
    background: #f7f9fd;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 18px 0 44px rgba(26, 42, 70, .18);
  }

  .route-review .agent-chat-shell.is-mobile-session-open .agent-session-rail { transform: translateX(0); }

  .route-review .agent-session-backdrop {
    position: fixed;
    z-index: 81;
    top: calc(58px + env(safe-area-inset-top));
    right: 0;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    left: 0;
    border: 0;
    background: rgba(17, 28, 47, .34);
  }

  .route-review .agent-chat-shell.is-mobile-session-open .agent-session-backdrop { display: block; }

  .route-review .agent-session-mobile-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    width: auto;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dce3ef;
    border-radius: 11px;
    background: #fff;
    color: #55647b;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }

  .route-review .agent-session-rail > header { padding-right: 44px; }
  .route-review .agent-session-list { display: grid; margin: 12px -4px; padding: 0 4px; overflow-x: hidden; overflow-y: auto; }
  .route-review .agent-session-entry { width: 100%; flex: none; }
  .route-review .agent-session-more { opacity: 1; }
  .route-review .agent-session-rail > footer { display: grid; }

  .route-review .agent-chat-header {
    min-height: 58px;
    padding: 8px 10px;
    align-items: center;
    gap: 8px;
  }

  .route-review .agent-chat-header .v3-eyebrow,
  .route-review .agent-chat-header p,

  .route-review .agent-chat-header h2 { margin: 0; font-size: 14px; }
  .route-review .agent-chat-header-actions { gap: 5px; }
  .route-review .agent-mobile-session-toggle { display: inline-flex; min-height: 36px; align-items: center; }
  .route-review .agent-chat-live { min-height: 34px; padding: 5px 8px; font-size: 10px; }

  .route-review .agent-chat-messages {
    gap: 11px;
    padding: 12px 8px 16px;
  }

  .route-review .agent-chat-message.is-agent { width: 100%; }
  .route-review .agent-chat-message.is-user { width: 86%; }
  .route-review .agent-chat-avatar { width: 28px; height: 28px; flex-basis: 28px; }
  .route-review .agent-chat-bubble { padding: 10px 11px; border-radius: 6px 15px 15px 15px; }
  .route-review .agent-chat-message.is-user .agent-chat-bubble { border-radius: 15px 6px 15px 15px; }
  .route-review .agent-rich-content { font-size: 15px; line-height: 1.56; }
  .route-review .agent-rich-content p { margin: 0; }
  .route-review .agent-rich-list { gap: 7px; }
  .route-review .agent-rich-list > li { padding: 9px 10px 9px 31px; font-size: 14px; line-height: 1.5; }

  .route-review .agent-chat-composer {
    position: relative;
    max-height: 220px;
    padding: 7px;
    overflow-y: auto;
  }

  .route-review .agent-chat-input-wrap { gap: 6px; padding: 8px 8px 6px; }
  .route-review .agent-chat-input-wrap textarea { min-height: 44px; max-height: 112px; padding: 5px 6px 2px; font-size: 15px; line-height: 1.5; }
  .route-review .agent-chat-service-note { display: none; }
  .route-review .agent-chat-to-latest { right: 12px; bottom: 108px; }

  body.agent-composer-focused .mobile-bottom-nav { display: none; }
  body.agent-composer-focused .v3-shell .content.route-review { padding-bottom: 8px; }
  body.agent-composer-focused .route-review .agent-session-rail,
  body.agent-composer-focused .route-review .agent-session-backdrop { bottom: 0; }

  .route-library .library-intro {
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  .route-library .library-intro > div:first-child,
  .route-library .library-import-direct { display: none; }

  .route-library .library-intro .v3-card-actions { display: block; width: 100%; }
  .route-library .library-intro .library-import-toggle { display: inline-flex; width: 100%; min-height: 46px; justify-content: center; }

  .route-library .library-center-panel { border-radius: 17px; }
  .route-library .library-center-title {
    position: sticky;
    z-index: 34;
    top: calc(58px + env(safe-area-inset-top));
    min-height: 54px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
  }

  .route-library .library-center-title .actions { gap: 7px; }
  .route-library .library-center-title .actions > span { font-size: 10px; }
  .route-library .library-workspace { min-height: 0; }
  .route-library .library-navigation { position: sticky; z-index: 33; top: calc(112px + env(safe-area-inset-top)); padding: 8px 10px; background: #fff; }
  .route-library .library-nav-title { display: none; }
  .route-library .library-nav-list { margin: 0; gap: 4px; }
  .route-library .library-nav-list button { min-height: 38px; padding: 0 10px; }
  .route-library .library-browser { padding: 9px; }

  .route-library .library-view-toolbar {
    position: sticky;
    z-index: 32;
    top: calc(160px + env(safe-area-inset-top));
    margin: 0 -1px 10px;
    padding: 8px 1px 9px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(16px);
  }

  .route-library .library-layout-switch {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .route-library .library-layout-switch .mini { min-width: 0; min-height: 40px; padding: 0 5px; }
  .route-library .library-search-row { align-items: stretch; }
  .route-library .library-search-row .library-search-label { flex: 1 1 auto; }
  .route-library .library-filter-toggle { display: inline-flex; min-width: 76px; min-height: 44px; align-items: center; justify-content: center; }
  .route-library .library-filter-toggle.is-active { border-color: #b9cae7; background: #eef4ff; color: var(--v3-primary); }

  .route-library .library-shelf-toolbar {
    display: none;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 10px;
    padding: 10px;
  }

  .route-library .library-shelf-toolbar.is-open { display: grid; }
  .route-library .library-compact-row { min-height: 82px; padding: 8px; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 9px; }
  .route-library .library-compact-thumb { width: 56px; height: 62px; border-radius: 10px; }
  .route-library .library-compact-copy strong { font-size: 13px; }
  .route-library .library-compact-copy span { font-size: 10px; }
  .route-library .library-compact-copy em { font-size: 9px; }
  .route-library .library-compact-row > .library-stage-badge { align-self: start; margin-top: 3px; font-size: 8px; white-space: nowrap; }
  .route-library .library-compact-arrow { display: none; }
  .route-library .library-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-library .library-package-table { border-radius: 12px; }
  .route-library .library-package-table table { min-width: 820px; }
  .route-library .library-package-table thead th { position: sticky; z-index: 1; top: 0; background: #f5f8fc; }
  .route-library .library-workspace.is-graph-mode .library-browser { padding: 0; }
  .route-library .library-workspace.is-graph-mode .graph-workbench { min-height: calc(100dvh - 260px); border-radius: 0 0 16px 16px; }
  .route-library .library-workspace.is-graph-mode .graph-canvas { min-height: calc(100dvh - 330px); }

  .route-library .library-import-backdrop {
    position: fixed;
    z-index: 74;
    inset: 0;
    border: 0;
    background: rgba(15, 24, 40, .4);
  }

  .route-library .library-import-backdrop.is-open { display: block; }
  .route-library .library-import-sheet {
    position: fixed;
    z-index: 75;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    max-height: min(72dvh, 520px);
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #fff;
    gap: 10px;
    transform: translateY(105%);
    transition: transform .22s ease;
    box-shadow: 0 -18px 48px rgba(25, 40, 68, .18);
  }

  .route-library .library-import-sheet.is-open { transform: translateY(0); }
  .route-library .library-import-sheet > header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; }
  .route-library .library-import-sheet > header div { display: grid; gap: 3px; }
  .route-library .library-import-sheet > header span { color: #7a879a; font-size: 11px; }
  .route-library .library-import-sheet > header strong { color: #1c2b40; font-size: 18px; }
  .route-library .library-import-sheet > header button { min-width: 48px; height: 40px; padding: 0 10px; border: 1px solid #dfe6f0; border-radius: 12px; background: #f7f9fc; color: #55647a; font-size: 11px; font-weight: 800; }
  .route-library .library-import-sheet > button { display: grid; min-height: 76px; padding: 14px; border: 1px solid #dce5f2; border-radius: 16px; background: #f8faff; text-align: left; gap: 5px; }
  .route-library .library-import-sheet > button strong { color: #1e3150; font-size: 15px; }
  .route-library .library-import-sheet > button span { color: #75839a; font-size: 11px; line-height: 1.5; }
}

@media (max-width: 380px) {
  .route-review .agent-view-tabs button { padding: 0 10px; }
  .route-review .agent-chat-live { max-width: 92px; overflow: hidden; white-space: nowrap; }
  .route-library .library-layout-switch .mini { font-size: 10px; }
  .route-library .library-package-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-session-rail,
  .route-library .library-import-sheet { transition: none; }
}

/* Desktop conversation + artifact workspace v59. */
.route-review.is-agent-workspace .agent-page-intro,
.route-review.is-agent-workspace .agent-connector-strip { display: none; }

.route-review.is-agent-workspace .review-control-row {
  margin: 0;
  padding: 0 0 8px;
  border: 0;
  background: transparent;
}

.route-review.is-agent-workspace .review-control-row .operation-scope-lock { display: none; }

.route-review.is-agent-workspace .agent-view-tabs {
  width: max-content;
  padding: 3px;
  border: 1px solid #e3e8f1;
  border-radius: 12px;
  background: #f5f7fb;
  gap: 2px;
}

.route-review.is-agent-workspace .agent-view-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
}

.route-review.is-agent-workspace .agent-chat-shell {
  width: 100%;
  height: max(720px, calc(100vh - 150px));
  max-height: none;
  border: 1px solid #dde4ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(39, 57, 91, .07);
}

.agent-session-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-session-meta em {
  overflow: hidden;
  color: #8995a8;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-session-meta small {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f8;
  color: #68758b;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.agent-session-meta small.is-running,
.agent-session-meta small.is-queued { background: #eaf2ff; color: #1f5ecb; }
.agent-session-meta small.is-awaiting_user_selection,
.agent-session-meta small.is-awaiting_script_approval { background: #f0edff; color: #6a52bd; }
.agent-session-meta small.is-completed,
.agent-session-meta small.is-succeeded { background: #e9f7f1; color: #17845b; }
.agent-session-meta small.is-failed,
.agent-session-meta small.is-retry_wait { background: #fff4dc; color: #9b6812; }

.agent-workbench-brand { display: none; }

.agent-message-task-card {
  display: grid;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dce4f0;
  border-radius: 12px;
  background: #f8faff;
  gap: 10px;
}

.agent-message-task-card.is-warning {
  border-color: #edc47e;
  background: #fffaf0;
}

.agent-message-task-card > header {
  display: grid;
  align-items: center;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 9px;
}

.agent-message-task-card > header > div:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.agent-message-task-card > header strong { color: #26354c; font-size: 12px; line-height: 1.4; }
.agent-message-task-card > header span { color: #78869a; font-size: 10px; line-height: 1.45; }
.agent-message-task-card > header em { color: #6f7d92; font-size: 9px; font-style: normal; font-weight: 800; }
.agent-message-task-card.is-warning > header strong { color: #704b11; }

.agent-task-state-icon {
  display: grid;
  width: 22px;
  height: 22px;
  border: 1px solid #9ab3e3;
  border-radius: 50%;
  place-items: center;
}

.agent-task-state-icon i { width: 6px; height: 6px; border-radius: 50%; background: #2863ce; }
.agent-message-task-card.is-warning .agent-task-state-icon { border-color: #d79522; }
.agent-message-task-card.is-warning .agent-task-state-icon i { background: #d79522; }

.agent-task-attempt {
  padding-top: 8px;
  border-top: 1px solid rgba(123, 143, 177, .2);
  color: #68768b;
  font-size: 10px;
}

.agent-task-details > summary {
  width: max-content;
  color: #536681;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  list-style: none;
}

.agent-task-details > summary::-webkit-details-marker { display: none; }
.agent-task-details > summary::after { content: " ›"; }
.agent-task-details[open] > summary::after { content: " ⌄"; }
.agent-task-details .agent-message-task-steps { margin-top: 9px; }

.agent-message-task-card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.agent-message-task-card > footer .mini { min-height: 32px; padding: 0 11px; }
.agent-message-task-card > footer .mini.primary { border-color: #1658c9; background: #1658c9; color: #fff; }

.agent-model-select.is-attention {
  outline: 3px solid rgba(35, 99, 210, .18);
  outline-offset: 2px;
}

.agent-artifact-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fbfcfe;
  grid-template-rows: auto minmax(0, 1fr);
}

.agent-artifact-panel > header {
  display: flex;
  min-height: 80px;
  padding: 16px 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5eaf2;
  background: #fff;
  gap: 12px;
}

.agent-artifact-panel > header > div { display: flex; align-items: center; gap: 8px; }
.agent-artifact-panel > header > div:first-child { display: grid; gap: 3px; }
.agent-artifact-panel > header span { color: #738197; font-size: 10px; }
.agent-artifact-panel > header h2 { margin: 0; color: #18263b; font-size: 19px; line-height: 1.2; }
.agent-artifact-panel > header .v3-btn { min-height: 36px; padding: 0 13px; }

.agent-artifact-version {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #dce3ee;
  border-radius: 9px;
  background: #fff;
  color: #526078;
  font-size: 11px;
  font-weight: 800;
}

.agent-artifact-list {
  display: grid;
  min-height: 0;
  padding: 16px 18px 24px;
  overflow-y: auto;
  align-content: start;
  gap: 14px;
}

.agent-artifact-topic {
  display: grid;
  padding: 16px;
  border: 1px solid #dde4ee;
  border-radius: 12px;
  background: #fff;
  gap: 11px;
}

.agent-artifact-topic.is-selected { border-color: #2e6bd2; box-shadow: inset 0 0 0 1px #2e6bd2; }
.agent-artifact-topic > header { display: grid; align-items: start; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 9px; }
.agent-artifact-topic > header > span { display: grid; width: 22px; height: 22px; border-radius: 6px; background: #e8eef8; color: #49617f; font-size: 11px; font-weight: 900; place-items: center; }
.agent-artifact-topic.is-selected > header > span { background: #155acb; color: #fff; }
.agent-artifact-topic > header strong { color: #1f2d42; font-size: 14px; line-height: 1.45; }
.agent-artifact-topic > header em { color: #607089; font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.agent-artifact-hook { margin: 0; color: #45546b; font-size: 12px; line-height: 1.6; }
.agent-artifact-fit { display: grid; gap: 3px; }
.agent-artifact-fit > span,
.agent-artifact-sources > span { color: #77869a; font-size: 9px; font-weight: 800; }
.agent-artifact-fit p { margin: 0; color: #4f5f76; font-size: 11px; line-height: 1.55; }
.agent-artifact-sources { display: grid; gap: 6px; }
.agent-artifact-sources > div { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-artifact-sources i { padding: 4px 8px; border: 1px solid #dfe5ef; border-radius: 999px; background: #f8fafd; color: #64748a; font-size: 9px; font-style: normal; }
.agent-artifact-topic > footer { display: grid; margin-top: 2px; grid-template-columns: 1fr 1fr; gap: 8px; }
.agent-artifact-topic > footer .v3-btn { min-height: 36px; }

.agent-artifact-script {
  min-height: 0;
  margin: 16px 18px 24px;
  padding: 22px;
  overflow-y: auto;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  background: #fff;
}

.agent-artifact-script pre { margin: 0; color: #2c3a50; font: inherit; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.agent-artifact-script > footer { display: flex; margin-top: 18px; padding-top: 14px; border-top: 1px solid #e6ebf2; gap: 8px; }

/* Agent script canvas version workspace. Scoped to the result canvas only. */
.agent-script-canvas {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
}

.agent-script-canvas > header > div:first-child { min-width: 0; }
.agent-script-canvas > header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-script-canvas > header p { display: flex; margin: 2px 0 0; align-items: center; gap: 7px; }
.agent-script-canvas > header p b { color: #175cca; font-size: 10px; }
.agent-script-canvas > header p em { padding: 3px 7px; border-radius: 999px; background: #eef3fb; color: #617089; font-size: 9px; font-style: normal; font-weight: 800; }
.agent-script-canvas > header p em.is-accepted { background: #e7f7f0; color: #16835d; }
.agent-script-canvas > header p em.is-draft { background: #eef4ff; color: #2462cb; }
.agent-script-canvas > header p em.is-rejected { background: #fff1f0; color: #b84b48; }
.agent-script-canvas .agent-artifact-header-actions { flex-wrap: wrap; justify-content: flex-end; }
.agent-script-compact-action { display: inline-flex; min-height: 30px; padding: 0 9px; align-items: center; border: 1px solid #dce4ef; border-radius: 9px; background: #fff; color: #50617a; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; gap: 5px; }
.agent-script-compact-action:hover { border-color: #9ab6e7; background: #f4f7fc; color: #175cca; }
.agent-script-compact-action:focus-visible { outline: 2px solid #8eb3f5; outline-offset: 2px; }
.agent-script-compact-action.is-active { border-color: #98b5e9; background: #edf4ff; color: #175cca; }
.agent-script-compact-action .ui-icon { width: 13px; height: 13px; }
.agent-script-compact-action b { display: grid; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #eaf0f9; color: #516782; font-size: 8px; place-items: center; }

.agent-script-canvas-body {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
}

.agent-script-reading {
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 16px 18px 20px;
  overflow-y: auto;
  background: #fff;
}

.agent-script-meta { display: flex; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid #e7ecf3; gap: 7px 14px; }
.agent-script-meta span { color: #8290a4; font-size: 9px; }
.agent-script-meta strong { margin-left: 3px; color: #506078; font-size: 10px; }
.agent-script-meta .agent-script-meta-note { margin-left: auto; padding: 3px 7px; border-radius: 999px; background: #eef5ff; color: #4771a8; font-weight: 700; }
.agent-script-meta .agent-script-meta-note.is-warning { background: #fff3df; color: #a86416; }

.agent-script-change-summary { display: grid; margin: 12px 0; padding: 10px 12px; border-radius: 9px; background: #f5f8fd; gap: 4px; }
.agent-script-change-summary span { color: #718099; font-size: 9px; font-weight: 800; }
.agent-script-change-summary p { margin: 0; color: #4b5b72; font-size: 11px; line-height: 1.6; }

.agent-draft-notice {
  display: grid;
  margin: 12px 0 16px;
  padding: 11px 12px;
  border: 1px solid #eed9b7;
  border-radius: 10px;
  background: #fffaf1;
  gap: 5px;
}

.agent-draft-notice strong { color: #75511d; font-size: 10px; line-height: 1.55; }
.agent-draft-notice p { margin: 0; color: #806b4c; font-size: 10px; line-height: 1.6; }
.agent-script-draft-canvas .agent-script-meta { gap: 7px 12px; }
.agent-script-draft-canvas .agent-script-meta span { padding-right: 8px; border-right: 1px solid #edf0f5; }
.agent-script-draft-canvas .agent-script-meta span:last-child { border-right: 0; }

.agent-artifact-script-body pre {
  margin: 0;
  color: #29384e;
  font: inherit;
  font-size: 13px;
  line-height: 1.88;
  white-space: pre-wrap;
}

.agent-script-timeline { display: grid; min-width: 0; min-height: 0; border-left: 1px solid #e5eaf2; background: #fbfcfe; grid-template-rows: auto minmax(0, 1fr); }
.agent-script-timeline > header { display: flex; min-height: 43px; padding: 0 11px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8edf4; }
.agent-script-timeline > header span { color: #68778d; font-size: 10px; font-weight: 800; }
.agent-script-timeline > header strong { display: grid; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #e9eff9; color: #4f6381; font-size: 9px; place-items: center; }
.agent-script-timeline > div { min-height: 0; padding: 8px; overflow-y: auto; }
.agent-script-version-item { display: grid; width: 100%; min-height: 52px; padding: 8px 7px; border: 0; border-left: 2px solid #dbe3ee; background: transparent; cursor: pointer; text-align: left; grid-template-columns: minmax(0, 1fr); }
.agent-script-version-item:hover { border-left-color: #91afe4; background: #f2f6fd; }
.agent-script-version-item.is-active { border-left-color: #1760d0; background: #edf4ff; }
.agent-script-version-item > i { display: none; }
.agent-script-version-item span { display: grid; min-width: 0; gap: 4px; }
.agent-script-version-item strong { color: #2e3c52; font-size: 11px; }
.agent-script-version-item strong em { margin-left: 3px; color: #1760d0; font-size: 8px; font-style: normal; }
.agent-script-version-item small { overflow: hidden; color: #8a97a9; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.agent-script-history-backdrop { position: absolute; z-index: 2; inset: 0; border: 0; background: rgba(26, 43, 69, .1); cursor: pointer; }
.agent-script-history-drawer { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; display: grid; width: min(300px, 82%); border-left: 1px solid #dfe6f0; background: #fbfcfe; box-shadow: -14px 0 30px rgba(40, 58, 84, .13); grid-template-rows: auto minmax(0, 1fr) auto; }
.agent-script-history-drawer > header { display: flex; min-height: 58px; padding: 10px 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5eaf2; gap: 10px; }
.agent-script-history-drawer > header > div { display: grid; gap: 3px; }
.agent-script-history-drawer > header span { color: #2e3d53; font-size: 12px; font-weight: 850; }
.agent-script-history-drawer > header strong { color: #8491a3; font-size: 9px; }
.agent-script-history-drawer > header button { min-height: 30px; padding: 0 9px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; color: #61728a; cursor: pointer; font: inherit; font-size: 9px; font-weight: 800; }
.agent-script-history-list { min-height: 0; padding: 9px; overflow-y: auto; }
.agent-script-history-drawer > footer { display: flex; min-height: 58px; padding: 9px 12px; align-items: center; border-top: 1px solid #e5eaf2; background: #fff; }
.agent-script-history-drawer > footer .v3-btn { width: 100%; }
.agent-script-history-drawer > footer span { color: #8290a4; font-size: 9px; }

.agent-script-compare { display: grid; gap: 10px; }
.agent-script-compare > header { display: flex; padding-bottom: 9px; align-items: end; justify-content: space-between; border-bottom: 1px solid #e6ebf2; gap: 10px; }
.agent-script-compare > header > div:first-child { display: grid; gap: 2px; }
.agent-script-compare > header span { color: #7c899c; font-size: 9px; }
.agent-script-compare > header strong { color: #2e3d53; font-size: 11px; }
.agent-script-compare > header > div:last-child { display: flex; align-items: center; color: #748196; font-size: 8px; gap: 4px; }
.agent-script-compare > header i { width: 8px; height: 8px; border-radius: 2px; background: #dff5e9; }
.agent-script-compare > header i.is-removed { margin-left: 4px; background: #ffe6e3; }
.agent-script-compare > div { display: grid; gap: 6px; }
.agent-script-compare p { margin: 0; padding: 5px 7px; border-radius: 5px; color: #44536a; font-size: 11px; line-height: 1.65; }
.agent-script-compare p.is-added { background: #e8f8ef; color: #286e50; }
.agent-script-compare p.is-removed { background: #fff0ee; color: #9c514c; text-decoration: line-through; }

.agent-script-canvas-actions { display: flex; min-height: 66px; padding: 11px 14px; align-items: center; flex-wrap: wrap; border-top: 1px solid #e3e9f1; background: #fff; gap: 7px; }
.agent-script-canvas-actions .v3-btn { min-height: 40px; padding: 0 11px; white-space: nowrap; }
.agent-script-canvas-actions .v3-btn.primary { flex: 1 1 180px; }
.agent-script-canvas-actions .v3-btn:not(.primary) { flex: 0 1 130px; }
.agent-script-canvas-actions .v3-btn:disabled { cursor: default; opacity: .7; }
.agent-script-canvas-actions .v3-btn.agent-script-edit-action {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
.agent-script-edit-action .ui-icon { width: 17px; height: 17px; stroke-width: 2.1; }
.agent-script-edit-action > span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.agent-artifact-empty {
  display: grid;
  width: min(360px, 80%);
  margin: auto;
  justify-items: center;
  color: #74839a;
  text-align: center;
  gap: 10px;
}

.agent-artifact-empty > span { width: 38px; height: 38px; color: #2e67c8; }
.agent-artifact-empty strong { color: #34435a; font-size: 15px; }
.agent-artifact-empty p { margin: 0; font-size: 11px; line-height: 1.7; }

@media (min-width: 1181px) {
  body.agent-workspace-open { overflow: hidden; }
  body.agent-workspace-open .v3-sidebar,
  body.agent-workspace-open .v3-topbar { display: none; }
  body.agent-workspace-open .v3-main {
    position: fixed;
    z-index: 119;
    inset: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
  }
  body.agent-workspace-open .v3-scroll-region {
    width: 100vw;
    height: 100vh;
    padding: 0;
    overflow: hidden;
  }
  .route-review.is-agent-workspace {
    position: fixed;
    z-index: 120;
    inset: 0;
    width: 100vw;
    max-width: none !important;
    height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
  }
  .route-review.is-agent-workspace .review-control-row { display: none; }
  .route-review.is-agent-workspace .agent-chat-shell {
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: 290px minmax(500px, 600px) minmax(500px, 1fr);
  }
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed { grid-template-columns: 72px minmax(500px, 600px) minmax(500px, 1fr); }
  .route-review.is-agent-workspace .agent-session-rail {
    padding: 0 24px 16px;
    background: #f8faff;
    grid-template-rows: 96px auto auto minmax(0, 1fr) auto;
  }
  .route-review.is-agent-workspace .agent-workbench-brand {
    display: flex;
    min-height: 96px;
    align-items: center;
    gap: 10px;
  }
  .route-review.is-agent-workspace .agent-workbench-brand img { width: 30px; height: 30px; object-fit: contain; }
  .route-review.is-agent-workspace .agent-workbench-brand > div { display: flex; align-items: baseline; gap: 7px; }
  .route-review.is-agent-workspace .agent-workbench-brand strong { color: #16243a; font-size: 21px; }
  .route-review.is-agent-workspace .agent-workbench-brand span { color: #42638f; font-size: 9px; font-weight: 800; }
  .route-review.is-agent-workspace .agent-workbench-brand > button {
    display: grid;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 1px solid #dce4ef;
    border-radius: 9px;
    background: #fff;
    color: #55667f;
    cursor: pointer;
    place-items: center;
  }
  .route-review.is-agent-workspace .agent-workbench-brand > button svg { width: 16px; height: 16px; }
  .route-review.is-agent-workspace .agent-session-collapse { display: none; }
  .route-review.is-agent-workspace .agent-session-rail > header { display: grid; gap: 16px; }
  .route-review.is-agent-workspace .agent-session-rail > header .v3-eyebrow { display: none; }
  .route-review.is-agent-workspace .agent-session-rail > header h2 { font-size: 18px; }
  .route-review.is-agent-workspace .agent-session-rail > header .v3-btn { width: 100%; min-height: 46px; }
  .route-review.is-agent-workspace .agent-session-tools { margin-top: 16px; }
  .route-review.is-agent-workspace .agent-session-open { padding: 15px 38px 15px 12px; }
  .route-review.is-agent-workspace .agent-session-open strong { font-size: 13px; }
  .route-review.is-agent-workspace .agent-session-open > span { font-size: 11px; }
  .route-review.is-agent-workspace .agent-session-rail > footer { padding: 14px; border: 1px solid #dce4ef; border-radius: 12px; background: #fff; }
  .route-review.is-agent-workspace .agent-chat-panel { border-right: 1px solid #e3e8f0; }
  .route-review.is-agent-workspace .agent-chat-header { min-height: 100px; padding: 20px 26px; }
  .route-review.is-agent-workspace .agent-chat-header h2 { font-size: 19px; }
  .route-review.is-agent-workspace .agent-chat-header p { font-size: 11px; }
  .route-review.is-agent-workspace .agent-chat-header-actions { gap: 5px; }
  .route-review.is-agent-workspace .agent-chat-live { min-height: 30px; padding: 5px 9px; font-size: 10px; }
  .route-review.is-agent-workspace .agent-chat-messages { padding: 28px 24px 32px; background: #fbfcfe; gap: 18px; }
  .route-review.is-agent-workspace .agent-chat-message.is-agent { width: 100%; }
  .route-review.is-agent-workspace .agent-chat-message.is-user { width: min(72%, 330px); }
  .route-review.is-agent-workspace .agent-chat-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .route-review.is-agent-workspace .agent-chat-bubble { padding: 14px 16px; border-radius: 5px 13px 13px 13px; box-shadow: none; }
  .route-review.is-agent-workspace .agent-chat-message.is-user .agent-chat-bubble { border-radius: 13px 5px 13px 13px; }
  .route-review.is-agent-workspace .agent-rich-content { font-size: 13px; line-height: 1.7; }
  .route-review.is-agent-workspace .agent-rich-content h3 { font-size: 14px; }
  .route-review.is-agent-workspace .agent-rich-list > li { padding: 7px 8px 7px 27px; font-size: 11px; }
  .route-review.is-agent-workspace .agent-chat-composer { padding: 12px 20px 14px; }
  .route-review.is-agent-workspace .agent-chat-input-wrap { padding: 11px; border-radius: 12px; }
  .route-review.is-agent-workspace .agent-chat-input-wrap textarea { min-height: 62px; max-height: 132px; font-size: 13px; }
  .route-review.is-agent-workspace .agent-chat-service-note { display: none; }
  .route-review.is-agent-workspace .agent-artifact-panel > header { min-height: 100px; padding: 20px 22px; }
  .route-review.is-agent-workspace .agent-artifact-panel > header h2 { font-size: 21px; }
  .route-review.is-agent-workspace .agent-artifact-list { padding: 20px 22px 28px; gap: 16px; }
  .route-review.is-agent-workspace .agent-artifact-topic { padding: 18px; gap: 12px; }
  .route-review.is-agent-workspace .agent-artifact-topic > header strong { font-size: 15px; }
  .route-review.is-agent-workspace .agent-artifact-hook { font-size: 13px; }
  .route-review.is-agent-workspace .agent-artifact-fit p { font-size: 12px; }
  .route-review.is-agent-workspace .agent-artifact-topic > footer .v3-btn { min-height: 42px; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-panel .agent-message-topic-cards,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-panel .agent-message-topic-script,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-panel .agent-message-script-card { display: none; }
}

/* Embedded Agent workspace v65: keep the global product navigation and reveal
   the result canvas only when the active conversation has a real artifact. */
.agent-artifact-toggle,
.agent-artifact-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #d9e1ee;
  border-radius: 10px;
  background: #fff;
  color: #596980;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(52, 72, 112, .07);
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.agent-artifact-toggle { display: inline-flex; width: auto; min-width: 34px; padding: 0 9px; align-items: center; justify-content: center; gap: 6px; }
.agent-artifact-toggle span { font-size: 10px; font-weight: 800; }
.agent-artifact-toggle .ui-icon,
.agent-artifact-close .ui-icon { width: 15px; height: 15px; }
.agent-artifact-toggle:hover,
.agent-artifact-toggle.is-active,
.agent-artifact-close:hover { border-color: #b9ccef; background: #eef5ff; color: #1759c7; }
.agent-artifact-toggle:active,
.agent-artifact-close:active { transform: translateY(1px); }
.agent-artifact-close .ui-icon { width: 16px; height: 16px; transform: none; }

.agent-artifact-header-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.agent-artifact-stage { padding: 5px 8px; border-radius: 999px; background: #eef4ff; color: #245fc7 !important; font-size: 9px !important; font-weight: 800; white-space: nowrap; }

.agent-workspace-resizer { display: none; }

body.is-resizing-agent-workspace {
  cursor: col-resize;
  user-select: none;
}

@media (min-width: 1181px) {
  .v3-shell .content.route-review.is-agent-workspace {
    position: relative;
    z-index: auto;
    inset: auto;
    width: min(calc(100% - 32px), 1560px) !important;
    max-width: 1560px !important;
    height: auto;
    margin: 0 auto !important;
    padding: 0 0 56px !important;
    overflow: visible;
    background: transparent;
  }

  .route-review.is-agent-workspace .review-control-row {
    display: flex;
    min-height: 48px;
    padding: 2px 0 6px;
    align-items: center;
  }

  .route-review.is-agent-workspace .agent-view-tabs {
    width: max-content;
    max-width: 100%;
  }

  .route-review.is-agent-workspace .agent-chat-shell {
    height: clamp(520px, calc(100dvh - 194px), 900px);
    border: 1px solid #dde4ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(39, 57, 91, .08);
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    transition: grid-template-columns .22s ease, box-shadow .22s ease;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact {
    grid-template-columns: 190px minmax(360px, 1fr) 10px minmax(330px, min(var(--agent-artifact-width, 520px), 52vw));
  }

  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact.is-session-collapsed {
    grid-template-columns: 58px minmax(400px, 1fr) 10px minmax(340px, min(var(--agent-artifact-width, 520px), 52vw));
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer {
    position: relative;
    z-index: 5;
    display: block;
    width: 10px;
    min-width: 10px;
    height: 100%;
    touch-action: none;
    cursor: col-resize;
    outline: 0;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 1px;
    border-radius: 999px;
    background: #dfe6f1;
    content: "";
    transition: width .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer::after {
    position: absolute;
    top: 50%;
    left: 1px;
    width: 8px;
    height: 42px;
    border: 1px solid #c8d5e9;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(48, 72, 112, .12);
    content: "";
    transform: translateY(-50%);
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer:hover::before,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer:focus-visible::before,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer.is-dragging::before {
    width: 2px;
    background: #2f6fe4;
    box-shadow: 0 0 0 4px rgba(47, 111, 228, .1);
    transform: translateX(-.5px);
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer:hover::after,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer:focus-visible::after,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-workspace-resizer.is-dragging::after {
    border-color: #7da4ea;
    background: #f4f8ff;
    box-shadow: 0 7px 18px rgba(47, 111, 228, .2);
  }

  .route-review.is-agent-workspace .agent-session-rail {
    padding: 16px;
    background: linear-gradient(180deg, #f8faff, #f3f6fc);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .route-review.is-agent-workspace .agent-workbench-brand { display: none; }
  .route-review.is-agent-workspace .agent-session-collapse { display: grid; }
  .route-review.is-agent-workspace .agent-session-rail > header { display: grid; gap: 12px; padding-right: 34px; }
  .route-review.is-agent-workspace .agent-session-rail > header .v3-eyebrow { display: inline; }
  .route-review.is-agent-workspace .agent-session-rail > header h2 { font-size: 16px; }
  .route-review.is-agent-workspace .agent-session-rail > header .v3-btn { width: auto; min-height: 40px; }
  .route-review.is-agent-workspace .agent-session-tools { margin-top: 12px; }
  .route-review.is-agent-workspace .agent-session-open { padding: 12px 38px 12px 12px; }
  .route-review.is-agent-workspace .agent-session-open strong { font-size: 13px; }
  .route-review.is-agent-workspace .agent-session-open > span { font-size: 11px; }
  .route-review.is-agent-workspace .agent-session-rail > footer { padding: 12px; border: 1px solid #dfe6f3; border-radius: 13px; background: rgba(255, 255, 255, .8); }
  .route-review.is-agent-workspace .agent-chat-header { min-height: 64px; padding: 6px 14px; box-sizing: border-box; }
  .route-review.is-agent-workspace .agent-chat-header .v3-eyebrow { display: none; }
  .route-review.is-agent-workspace .agent-chat-header h2 { margin: 0; font-size: 16px; line-height: 1.3; }
  .route-review.is-agent-workspace .agent-chat-header p { margin: 2px 0 0; font-size: 11px; line-height: 1.35; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-header > div:first-child { overflow: hidden; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-header p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-keyboard-hint { display: none; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-toolbar { gap: 8px; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-submit-area { gap: 5px; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-web-toggle strong { display: none; }
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-draft { min-width: 42px; padding: 0 5px; font-size: 9px; white-space: nowrap; }
  .route-review.is-agent-workspace .agent-chat-messages { padding: 22px 20px 28px; gap: 16px; }
  .route-review.is-agent-workspace .agent-chat-message.is-agent { width: min(90%, 820px); }
  .route-review.is-agent-workspace .agent-chat-message.is-user { width: min(78%, 420px); }
  .route-review.is-agent-workspace .agent-chat-composer { padding: 12px 16px 14px; }
  .route-review.is-agent-workspace .agent-artifact-panel { animation: agent-artifact-reveal .2s ease both; }
  .route-review.is-agent-workspace .agent-artifact-panel > header { min-height: 72px; padding: 10px 18px; box-sizing: border-box; }
  .route-review.is-agent-workspace .agent-artifact-panel > header h2 { font-size: 18px; }
  .route-review.is-agent-workspace .agent-artifact-list { padding: 16px 18px 24px; gap: 14px; }
  .route-review.is-agent-workspace .agent-artifact-topic { padding: 16px; gap: 11px; }
  .route-review.is-agent-workspace .agent-artifact-topic > header strong { font-size: 14px; }
  .route-review.is-agent-workspace .agent-artifact-hook { font-size: 12px; }
  .route-review.is-agent-workspace .agent-artifact-fit p { font-size: 11px; }

  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-rail {
    display: block;
    padding: 12px 8px;
    overflow: hidden;
  }

  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-collapse {
    position: static;
    display: grid;
    margin: 0 auto;
  }

  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-mobile-close,
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-workbench-brand,
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-rail > header,
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-tools,
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-list,
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-context-menu,
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed .agent-session-rail > footer {
    display: none;
  }
}

@keyframes agent-artifact-reveal {
  from { opacity: .4; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1180px) {
  .agent-artifact-panel { display: none; }
  .agent-artifact-toggle { display: none; }
  .route-review.is-agent-workspace .agent-chat-shell { grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); }
  .route-review.is-agent-workspace .agent-chat-shell.is-session-collapsed { grid-template-columns: 58px minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .route-review.is-agent-workspace .agent-view-tabs { width: 100%; }
  .route-review.is-agent-workspace .agent-chat-shell { height: auto; min-height: 0; }
  .route-review .agent-message-task-card { padding: 9px; gap: 7px; }
  .route-review .agent-message-task-card > header { grid-template-columns: 20px minmax(0, 1fr); }
  .route-review .agent-message-task-card > header > em { display: none; }
  .route-review .agent-task-state-icon { width: 18px; height: 18px; }
}

/* Mobile conversation and material workspace refinement v58. */
.agent-message-preview { display: none; }
.agent-message-collapsible > details > summary { display: none; }
.agent-message-collapsible .when-open { display: none; }
.agent-message-collapsible > details[open] .when-open { display: inline; }
.agent-message-collapsible > details[open] .when-closed { display: none; }

.agent-message-script-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.agent-message-script-card > summary::-webkit-details-marker { display: none; }
.agent-message-script-card > summary div { display: grid; gap: 3px; }
.agent-message-script-card > summary span,
.agent-message-script-card > summary em { color: #75829a; font-size: 9px; font-style: normal; }
.agent-message-script-card > summary strong { color: #34435e; font-size: 11px; }
.agent-message-script-body > p {
  max-height: 240px;
  margin: 10px 0;
  overflow: auto;
  color: #3b4960;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.agent-message-script-body > footer { display: flex; gap: 7px; }

@media (max-width: 767px) {
  .v3-shell .content.route-library {
    width: 100%;
    max-width: 100%;
    padding: 12px 10px calc(var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    gap: 12px;
  }

  /* Chat reads like a conversation; long work products stay one tap away. */
  .route-review .agent-chat-header { min-height: 46px; padding: 6px 9px; }
  .route-review .agent-chat-header h2 { max-width: 45vw; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .route-review .agent-chat-live { min-height: 30px; padding: 4px 7px; }
  .route-review .agent-mobile-session-toggle { min-height: 32px; padding: 0 9px; }
  .route-review .agent-chat-messages { gap: 10px; padding: 10px 9px 14px; background: #f7f9fc; }
  .route-review .agent-chat-avatar { display: none; }
  .route-review .agent-chat-message,
  .route-review .agent-chat-message.is-agent { width: 100%; gap: 0; }
  .route-review .agent-chat-message.is-user { width: min(84%, 330px); }
  .route-review .agent-chat-bubble {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(39, 54, 83, .08);
  }
  .route-review .agent-chat-message.is-agent .agent-chat-bubble { border-radius: 4px 14px 14px 14px; }
  .route-review .agent-chat-message.is-user .agent-chat-bubble {
    padding: 8px 10px;
    border: 0;
    border-radius: 14px 4px 14px 14px;
    background: #e9f1ff;
    box-shadow: none;
  }
  .route-review .agent-chat-bubble > header { gap: 7px; }
  .route-review .agent-chat-bubble > header strong { font-size: 10px; }
  .route-review .agent-chat-bubble > header span { font-size: 9px; }
  .route-review .agent-rich-content { margin-top: 5px; gap: 7px; font-size: 13px; line-height: 1.56; }
  .route-review .agent-rich-content h3 { margin-top: 2px; padding-left: 8px; border-left-width: 2px; font-size: 14px; line-height: 1.42; }
  .route-review .agent-rich-list { gap: 4px; }
  .route-review .agent-rich-list > li {
    padding: 5px 6px 5px 22px;
    border: 0;
    border-radius: 8px;
    background: #f6f8fc;
    font-size: 12px;
    line-height: 1.48;
  }
  .route-review ol.agent-rich-list > li::before { top: 6px; left: 5px; width: 14px; height: 14px; border-radius: 5px; font-size: 8px; box-shadow: none; }
  .route-review ul.agent-rich-list > li::before { top: 11px; left: 8px; width: 5px; height: 5px; box-shadow: none; }
  .route-review .agent-rich-callout,
  .route-review .agent-rich-metric { padding: 8px 9px; border-radius: 9px; }
  .route-review .agent-rich-callout::after { display: none; }
  .route-review .agent-rich-callout > strong { font-size: 12px; line-height: 1.48; }
  .route-review .agent-rich-metric { font-size: 12px; }
  .route-review .agent-chat-bubble > footer { margin-top: 6px; gap: 6px; font-size: 9px; }
  .route-review .agent-message-task-card { margin-top: 6px; border-radius: 9px; }
  .route-review .agent-message-task-card > summary { padding: 7px 8px; }
  .route-review .agent-message-tool-card,
  .route-review .agent-message-script-card,
  .route-review .agent-message-topic-cards,
  .route-review .agent-message-topic-script { margin-top: 7px; border-radius: 10px; }
  .route-review .agent-message-script-card { padding: 9px; }
  .route-review .agent-message-script-card > summary { min-height: 34px; }
  .route-review .agent-message-script-card:not([open]) > summary::after { color: #5368c7; content: "展开"; font-size: 9px; font-weight: 800; }
  .route-review .agent-message-script-card[open] > summary::after { color: #5368c7; content: "收起"; font-size: 9px; font-weight: 800; }
  .route-review .agent-message-script-body > p { max-height: 44dvh; margin: 8px 0; font-size: 12px; line-height: 1.58; }
  .route-review .agent-message-collapsible { margin-top: 5px; }
  .route-review .agent-message-preview { display: block; margin: 0; color: #334159; font-size: 13px; line-height: 1.56; }
  .route-review .agent-message-collapsible:has(> details[open]) > .agent-message-preview { display: none; }
  .route-review .agent-message-collapsible > details > summary {
    display: inline-flex;
    min-height: 28px;
    margin-top: 5px;
    align-items: center;
    color: #4c63c2;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    list-style: none;
  }
  .route-review .agent-message-collapsible > details > summary::-webkit-details-marker { display: none; }
  .route-review .agent-message-full > .agent-rich-content { margin-top: 6px; }
  .route-review .agent-chat-composer { max-height: 184px; padding: 5px; }
  .route-review .agent-chat-input-wrap { padding: 6px; }
  .route-review .agent-chat-input-wrap textarea { min-height: 40px; max-height: 92px; font-size: 13px; }
  .route-review .agent-chat-to-latest { bottom: 94px; min-height: 32px; }

  /* Material controls and content remain inside one phone-width column. */
  .route-library #task-monitor-slot:empty { display: none; }
  .route-library .library-intro { width: 100%; }
  .route-library .library-intro .library-import-toggle {
    display: flex !important;
    width: 100%;
    min-height: 44px;
    padding: 0 16px !important;
    border-radius: 13px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }
  .route-library .library-center-panel { width: 100%; max-width: 100%; overflow: hidden; border-radius: 15px; }
  .route-library .library-center-title { position: static; min-height: 50px; padding: 0 11px; }
  .route-library .library-center-title .actions > span { display: none; }
  .route-library .library-workspace,
  .route-library .library-workspace.is-table-mode,
  .route-library .library-workspace.is-graph-mode {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .route-library .library-navigation { position: static; width: 100%; padding: 7px 8px; overflow: hidden; }
  .route-library .library-nav-title { padding: 3px 4px 0; }
  .route-library .library-nav-list { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .route-library .library-nav-list::-webkit-scrollbar { display: none; }
  .route-library .library-nav-list button { min-height: 34px; padding: 0 9px; border-radius: 9px; font-size: 11px; }
  .route-library .library-nav-utility { margin: 0; padding-top: 6px; border-top: 0; }
  .route-library .library-browser,
  .route-library .library-workspace.is-graph-mode .library-browser { width: 100%; max-width: 100%; min-width: 0; padding: 8px; overflow: hidden; }
  .route-library .library-section-content,
  .route-library .library-view-toolbar,
  .route-library .library-search-row { width: 100%; max-width: 100%; min-width: 0; }
  .route-library .library-view-toolbar { position: static; margin: 0 0 8px; padding: 0; background: transparent; }
  .route-library .library-facets { margin-bottom: 9px; padding: 9px; border-radius: 12px; gap: 8px; }
  .route-library .library-facets-mobile-head {
    display: flex;
    min-height: 28px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .route-library .library-facets-mobile-head strong { color: #526176; font-size: 11px; }
  .route-library .library-facets-mobile-head button {
    min-height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: #edf3fd;
    color: #2e63b7;
    font-size: 10px;
    font-weight: 760;
  }
  .route-library .library-facets:not(.is-open) .library-facet-row.is-secondary { display: none; }
  .route-library .library-facet-row { grid-template-columns: 1fr; gap: 5px; }
  .route-library .library-facet-row > strong { padding-left: 2px; font-size: 10px; }
  .route-library .library-facet-row > div { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .route-library .library-facet-row > div::-webkit-scrollbar { display: none; }
  .route-library .library-facet-row button { min-height: 31px; flex: 0 0 auto; padding: 0 9px; font-size: 10px; }
  .route-library .library-active-filters { padding-top: 7px; }
  .route-library .library-active-filters > button { margin-left: 0; }
  .route-library .library-review-summary { grid-template-columns: 1fr 1fr; }
  .route-library .library-review-summary > div { min-height: 62px; padding: 10px; }
  .route-library .library-review-summary strong { font-size: 20px; }
  .route-library .library-layout-switch { padding: 3px; border: 1px solid #dfe6f1; border-radius: 12px; background: #f2f5fa; gap: 2px; }
  .route-library .library-layout-switch .mini { min-height: 34px; border: 0; border-radius: 9px; background: transparent; color: #6d7a8f; font-size: 10px; box-shadow: none; }
  .route-library .library-layout-switch .mini.is-active { background: #fff; color: #1857c9; box-shadow: 0 2px 8px rgba(35, 67, 119, .1); }
  .route-library .library-search-row { gap: 6px; }
  .route-library .library-search-row .library-search-label { font-size: 0; }
  .route-library .library-search-row .library-search-label input { width: 100%; min-width: 0; min-height: 40px; font-size: 12px; }
  .route-library .library-filter-toggle { min-width: 62px; min-height: 40px; font-size: 10px; }
  .route-library .library-shelf-toolbar { grid-template-columns: 1fr; padding: 8px; }
  .route-library .library-result-head { margin: 7px 1px; }
  .route-library .library-result-head strong { font-size: 18px; }

  .route-library .library-package-grid { grid-template-columns: 1fr; gap: 8px; }
  .route-library .library-package-grid .library-package-card {
    display: grid;
    min-height: 112px;
    grid-template-columns: 86px minmax(0, 1fr);
  }
  .route-library .library-package-grid .library-package-cover { width: 86px; height: 112px; min-height: 112px; aspect-ratio: auto; }
  .route-library .library-package-grid .library-package-body { padding: 9px; gap: 5px; }
  .route-library .library-package-grid .library-package-title { min-height: 0; font-size: 12px; }
  .route-library .library-package-grid .library-package-origin:first-of-type { display: flex; }
  .route-library .library-package-grid .library-flow { margin-top: auto; }

  .route-library .library-compact-list { width: 100%; }
  .route-library .library-compact-row { min-height: 68px; padding: 6px; grid-template-columns: 48px minmax(0, 1fr) auto; }
  .route-library .library-compact-thumb { width: 48px; height: 54px; border-radius: 8px; }
  .route-library .library-compact-copy strong { font-size: 12px; }

  .route-library .library-package-table { width: 100%; max-width: 100%; max-height: none; overflow: visible; border: 0; }
  .route-library .library-package-table table,
  .route-library .library-package-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .route-library .library-package-table colgroup,
  .route-library .library-package-table thead { display: none; }
  .route-library .library-package-table tbody { display: grid; gap: 7px; }
  .route-library .library-table-row {
    display: grid;
    width: 100%;
    min-height: 68px;
    padding: 7px;
    overflow: hidden;
    border: 1px solid #e0e6ef;
    border-radius: 11px;
    background: #fff;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "preview title status" "preview account status" "preview date status";
    gap: 2px 8px;
  }
  .route-library .library-table-row:nth-child(even) { background: #fff; }
  .route-library .library-table-row td { display: none; width: auto; height: auto; padding: 0; border: 0; }
  .route-library .library-table-row td:nth-child(1),
  .route-library .library-table-row td:nth-child(2),
  .route-library .library-table-row td:nth-child(3),
  .route-library .library-table-row td:nth-child(4),
  .route-library .library-table-row td:nth-child(6) { display: block; }
  .route-library .library-table-row td:nth-child(1) { grid-area: preview; }
  .route-library .library-table-row td:nth-child(2) { grid-area: title; align-self: end; }
  .route-library .library-table-row td:nth-child(3) { grid-area: account; }
  .route-library .library-table-row td:nth-child(4) { grid-area: status; align-self: start; }
  .route-library .library-table-row td:nth-child(6) { grid-area: date; color: #8a96a8; font-size: 9px; }
  .route-library .library-table-preview { width: 48px; height: 54px; border-radius: 8px; }
  .route-library .library-table-title strong { font-size: 12px; }
  .route-library .library-table-title span,
  .route-library .library-table-account strong { font-size: 9px; }
  .route-library .library-table-account span { display: none; }
  .route-library .library-table-row .library-stage-badge { font-size: 8px; white-space: nowrap; }

  .route-library .graph-workbench,
  .route-library .graph-workbench-head,
  .route-library .graph-stage,
  .route-library .graph-canvas { width: 100%; max-width: 100%; min-width: 0; }
  .route-library .graph-workbench { overflow: hidden; border-radius: 12px; }
  .route-library .graph-workbench-head { padding: 10px; }
  .route-library .graph-tools { grid-template-columns: 1fr 1fr; width: 100%; }
  .route-library .graph-tools label { min-width: 0; }
  .route-library .graph-stage { display: grid; min-height: 0; grid-template-columns: 1fr; }
  .route-library .library-workspace.is-graph-mode .graph-canvas { width: 100%; height: 430px; min-height: 430px; }
  .route-library .graph-detail { max-height: none; padding: 11px; border-top: 1px solid var(--v3-line); border-left: 0; }
  .route-library .graph-detail-empty { min-height: 120px; }

  .route-library .library-inspector,
  .route-library .library-inspector.has-selection { width: 100%; max-width: 100%; }
}

/* Agent interaction refinement v66 final cascade. */
.route-review.is-agent-workspace .review-control-row { gap: 10px; }
.route-review.is-agent-workspace .review-fullscreen-button {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 1px solid #d9e1ee;
  border-radius: 10px;
  background: #fff;
  color: #596980;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(52, 72, 112, .07);
}
.route-review.is-agent-workspace .review-fullscreen-button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.route-review.is-agent-workspace .review-fullscreen-button .ui-icon { width: 16px; height: 16px; }
.route-review .agent-message-task-card {
  width: min(100%, 276px);
  margin-top: 8px;
  margin-left: auto;
  padding: 9px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  border-radius: 10px;
  gap: 6px 8px;
}
.route-review .agent-message-task-card > header {
  grid-column: 1 / -1;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 7px;
}
.route-review .agent-message-task-card > header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-review .agent-task-state-icon { width: 18px; height: 18px; }
.route-review .agent-task-details { min-width: 0; align-self: center; }
.route-review .agent-task-details[open] { grid-column: 1 / -1; }
.route-review .agent-message-task-card > footer { gap: 5px; }
.route-review .agent-message-task-card > footer .mini {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 10px;
}
.agent-chat-send.is-stop {
  border-color: #d54a55;
  background: #d54a55;
  color: #fff;
  box-shadow: 0 8px 18px rgba(213, 74, 85, .22);
}
.agent-chat-send.is-stop:not(:disabled):hover { border-color: #c73e49; background: #c73e49; }
.agent-chat-send.is-stop.is-cancelling { opacity: .7; }
#view.route-review.is-agent-workspace:fullscreen,
#view.route-review.is-agent-workspace:-webkit-full-screen,
#view.route-review.is-agent-workspace.is-review-fullscreen-fallback {
  padding: 14px 18px 18px;
  overflow: hidden;
  background: #f4f7fb;
}
#view.route-review.is-agent-workspace:fullscreen .agent-chat-shell,
#view.route-review.is-agent-workspace:-webkit-full-screen .agent-chat-shell,
#view.route-review.is-agent-workspace.is-review-fullscreen-fallback .agent-chat-shell {
  height: calc(100dvh - 72px);
  max-height: none;
  border-radius: 14px;
}
@media (max-width: 767px) {
  .route-review.is-agent-workspace .review-fullscreen-button { width: 36px; min-width: 36px; height: 36px; }
  .route-review .agent-message-task-card { width: min(100%, 250px); padding: 8px 9px; }
}

/* Agent composer and attachment modal v67. */
.route-review .agent-chat-message.is-progress {
  width: min(100%, 560px);
}

.route-review .agent-chat-message.is-progress .agent-chat-bubble {
  width: min(100%, 390px);
  padding: 11px 12px;
}

.route-review .agent-chat-message.is-progress .agent-message-task-card {
  width: 100%;
  margin: 8px 0 0;
  animation: agent-task-card-breathe 1.8s ease-in-out infinite;
}

.route-review .agent-chat-message.is-progress .agent-task-state-icon {
  animation: agent-task-orb-breathe 1.2s ease-in-out infinite;
}

.route-review .agent-chat-message.is-progress .agent-task-state-icon i {
  animation: agent-task-dot-pulse 1.2s ease-in-out infinite;
}

@keyframes agent-task-card-breathe {
  0%, 100% {
    border-color: #dce4f0;
    box-shadow: 0 0 0 0 rgba(47, 103, 209, 0);
  }
  50% {
    border-color: #9fb9eb;
    box-shadow: 0 0 0 3px rgba(47, 103, 209, .08);
  }
}

@keyframes agent-task-orb-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(40, 99, 206, 0); }
  50% { box-shadow: 0 0 0 5px rgba(40, 99, 206, .1); }
}

@keyframes agent-task-dot-pulse {
  0%, 100% { opacity: .5; transform: scale(.78); }
  50% { opacity: 1; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-chat-message.is-progress .agent-message-task-card,
  .route-review .agent-chat-message.is-progress .agent-task-state-icon,
  .route-review .agent-chat-message.is-progress .agent-task-state-icon i {
    animation: none;
  }
}

.route-review .agent-chat-submit-area {
  flex: 0 0 auto;
  margin-left: auto;
}

.agent-material-modal {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.agent-material-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(20, 30, 48, .48);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.agent-material-dialog {
  position: relative;
  display: grid;
  width: min(620px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid rgba(216, 226, 241, .95);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(23, 37, 62, .24);
  animation: agent-material-dialog-in .2s ease both;
}

@keyframes agent-material-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.agent-material-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e6ebf3;
}

.agent-material-dialog > header > div { display: grid; gap: 3px; }
.agent-material-dialog > header span { color: #3166c8; font-size: 10px; font-weight: 850; }
.agent-material-dialog > header h3 { margin: 0; color: #15233a; font-size: 21px; }
.agent-material-dialog > header p { margin: 2px 0 0; color: #78859a; font-size: 11px; line-height: 1.55; }

.agent-material-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f7f9fc;
  color: #5d6d84;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.agent-material-dialog .agent-attachment-picker {
  max-height: min(480px, 54dvh);
  margin: 0;
  padding: 18px 22px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.agent-material-dialog .agent-attachment-picker > div {
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}

.agent-material-dialog .agent-attachment-picker > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.agent-material-dialog .agent-attachment-picker > div > span {
  margin-bottom: 2px;
  color: #53637a;
  font-size: 11px;
  font-weight: 820;
}

.agent-material-dialog .agent-attachment-picker > div > button {
  max-width: min(100%, 270px);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
}

.agent-material-dialog > footer {
  display: flex;
  min-height: 64px;
  padding: 11px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e6ebf3;
  background: #f8faff;
}

.agent-material-dialog > footer > span { color: #748197; font-size: 11px; }
.agent-material-dialog > footer > span strong { color: #1859c7; }
.agent-material-dialog > footer .v3-btn { min-width: 92px; }

@media (prefers-reduced-motion: reduce) {
  .agent-material-dialog { animation: none; }
}

@media (max-width: 600px) {
  .agent-material-modal { padding: 0; place-items: end center; }
  .agent-material-dialog {
    width: 100%;
    max-height: min(82dvh, 720px);
    border-radius: 20px 20px 0 0;
  }
  .agent-material-dialog > header { padding: 17px 18px 14px; }
  .agent-material-dialog > header h3 { font-size: 19px; }
  .agent-material-dialog .agent-attachment-picker { max-height: 56dvh; padding: 15px 18px; }
  .agent-material-dialog .agent-attachment-picker > div > button { max-width: 100%; }
  .agent-material-dialog > footer { padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); }
  .route-review .agent-chat-message.is-progress .agent-chat-bubble { width: calc(100% - 6px); }
}

/* Topic selection continuation states v68. */
.agent-artifact-progress {
  display: flex;
  padding: 13px 14px;
  border: 1px solid #d9e4f4;
  border-radius: 13px;
  background: #f7faff;
}

.agent-artifact-progress > div { display: grid; min-width: 0; gap: 4px; }
.agent-artifact-progress span { color: #2a65c8; font-size: 9px; font-weight: 850; }
.agent-artifact-progress strong { overflow: hidden; color: #1b2a42; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agent-artifact-progress p { margin: 0; color: #68778d; font-size: 10px; line-height: 1.55; }

.agent-artifact-progress.is-running {
  border-color: #bfd2f2;
  background: #f1f6ff;
}

.agent-artifact-progress.is-error {
  border-color: #efcf9d;
  background: #fff9ef;
}

.agent-artifact-progress.is-error span,
.agent-artifact-stage.is-error { color: #98621a !important; }

.agent-artifact-stage.is-error { background: #fff1dc; }
.agent-artifact-stage.is-running { background: #edf4ff; color: #1f60c5 !important; }

.agent-artifact-topic:not(.is-selected) > footer .v3-btn:disabled {
  border-color: #e2e7ef;
  background: #f7f9fc;
  color: #96a1b2;
}

.agent-message-topic-cards article.is-selected {
  border-color: #2e6bd2;
  box-shadow: inset 0 0 0 1px #2e6bd2;
}

@media (max-width: 600px) {
  .agent-artifact-progress { padding: 11px 12px; }
  .agent-artifact-progress strong { white-space: normal; }
}

/* Agent source ownership, material gallery and composer controls v71. */
.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  border-color: #d7e0ee;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 12px 34px rgba(39, 61, 105, .11), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.route-review .agent-chat-input-wrap:focus-within {
  border-color: #d7e0ee;
  box-shadow: 0 12px 34px rgba(39, 61, 105, .11), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.route-review .agent-chat-input-wrap textarea:focus {
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e8f1;
}

.route-review .agent-chat-toolbar { padding-top: 2px; }

.route-review .agent-chat-tools {
  gap: 6px;
  padding: 4px;
  border: 1px solid #e5eaf3;
  border-radius: 14px;
  background: rgba(244, 247, 252, .9);
  box-shadow: inset 0 1px 0 #fff;
}

.route-review .agent-chat-add,
.route-review .agent-model-select,
.route-review .agent-web-toggle {
  position: relative;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #5c6c84;
  box-shadow: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.route-review .agent-chat-add::before,
.route-review .agent-model-select::before,
.route-review .agent-web-toggle::before,
.route-review .agent-chat-send::before {
  position: absolute;
  z-index: 0;
  top: -70%;
  left: -45%;
  width: 28%;
  height: 240%;
  content: "";
  pointer-events: none;
  background: rgba(255, 255, 255, .52);
  transform: rotate(24deg) translateX(-230%);
  transition: transform .55s cubic-bezier(.2, .75, .25, 1);
}

.route-review .agent-chat-add:hover::before,
.route-review .agent-model-select:hover::before,
.route-review .agent-web-toggle:hover::before,
.route-review .agent-chat-send:not(:disabled):hover::before { transform: rotate(24deg) translateX(720%); }

.route-review .agent-chat-add > *,
.route-review .agent-model-select > *,
.route-review .agent-web-toggle > *,
.route-review .agent-chat-send > * { position: relative; z-index: 1; }

.route-review .agent-chat-add:hover,
.route-review .agent-model-select:hover,
.route-review .agent-model-select:focus-within,
.route-review .agent-web-toggle:hover:not(:disabled) {
  border-color: #c9d7ef;
  background: #fff;
  color: #245fc6;
  box-shadow: 0 7px 18px rgba(44, 75, 132, .1);
  transform: translateY(-1px);
}

.route-review .agent-chat-add:active,
.route-review .agent-web-toggle:active:not(:disabled),
.route-review .agent-chat-send:active:not(:disabled) { transform: translateY(0) scale(.96); }

.route-review .agent-chat-add.is-active,
.route-review .agent-web-toggle.is-active {
  border-color: #b9cdf3;
  background: linear-gradient(145deg, #eef4ff, #f7f9ff);
  color: #185bc8;
  box-shadow: 0 6px 16px rgba(38, 96, 193, .1);
}

.route-review .agent-tool-icon,
.route-review .agent-model-spark {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #4272cf;
}

.route-review .agent-tool-icon .ui-icon,
.route-review .agent-model-spark .ui-icon { width: 15px; height: 15px; }

.route-review .agent-model-spark .ui-icon { animation: agent-composer-spark 3.2s ease-in-out infinite; }

.route-review .agent-chat-add em {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 1px;
  padding: 0 5px;
  place-items: center;
  border-radius: 9px;
  background: #2765cf;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}

.route-review .agent-model-select { min-width: 106px; padding-inline: 10px 30px; }
.route-review .agent-model-chevron { right: 9px; display: inline-grid; width: 16px; place-items: center; }
.route-review .agent-model-chevron .ui-icon { width: 13px; height: 13px; }

.route-review .agent-web-toggle { padding-inline: 9px 12px; }
.route-review .agent-web-toggle > i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #a8b2c2;
  box-shadow: 0 0 0 0 rgba(42, 176, 124, 0);
}
.route-review .agent-web-toggle.is-active > i {
  background: #2ab07c;
  animation: agent-web-status 1.8s ease-out infinite;
}

.route-review .agent-chat-send {
  position: relative;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  background: linear-gradient(145deg, #3473df 0%, #1855c2 70%, #1248a9 100%);
  box-shadow: 0 10px 24px rgba(25, 82, 183, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.route-review .agent-chat-send:not(:disabled):hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 14px 28px rgba(25, 82, 183, .34), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.route-review .agent-chat-send:not(:disabled) .ui-icon { animation: agent-send-float 2.3s ease-in-out infinite; }
.route-review .agent-chat-send:disabled { border-color: #e0e5ee; background: #c8d0df; filter: none; }
.route-review .agent-chat-send.is-stop { background: linear-gradient(145deg, #e65d68, #c93847); animation: agent-stop-breathe 1.6s ease-in-out infinite; }

@keyframes agent-composer-spark {
  0%, 100% { opacity: .72; transform: rotate(0deg) scale(.92); }
  50% { opacity: 1; transform: rotate(90deg) scale(1.06); }
}
@keyframes agent-web-status {
  0% { box-shadow: 0 0 0 0 rgba(42, 176, 124, .34); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(42, 176, 124, 0); }
}
@keyframes agent-send-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
}
@keyframes agent-stop-breathe {
  0%, 100% { box-shadow: 0 9px 22px rgba(201, 56, 71, .24); }
  50% { box-shadow: 0 11px 30px rgba(201, 56, 71, .4); }
}

.agent-material-dialog { width: min(760px, calc(100vw - 32px)); }
.agent-material-dialog .agent-attachment-picker {
  gap: 20px;
  max-height: min(540px, 62dvh);
  padding: 20px 22px 24px;
  background: #f8faff;
}

.agent-material-group { display: grid; gap: 10px; }
.agent-material-group + .agent-material-group { padding-top: 18px; border-top: 1px solid #e7ecf4; }
.agent-material-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-material-group > header span { color: #33435d; font-size: 12px; font-weight: 850; }
.agent-material-group > header em { color: #8a97aa; font-size: 10px; font-style: normal; }
.agent-material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agent-material-grid > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed #d9e1ed;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: #929daf;
  font-size: 11px;
  text-align: center;
}

.agent-material-card {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 26px;
  min-width: 0;
  min-height: 82px;
  padding: 8px;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid #e0e7f1;
  border-radius: 14px;
  background: #fff;
  color: #34435c;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 5px 16px rgba(42, 61, 96, .045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.agent-material-card:hover {
  border-color: #afc6ed;
  box-shadow: 0 12px 26px rgba(39, 76, 139, .12);
  transform: translateY(-2px);
}
.agent-material-card:active { transform: scale(.985); }
.agent-material-card.is-selected {
  border-color: #3471d7;
  background: linear-gradient(145deg, #f3f7ff, #fff);
  box-shadow: 0 0 0 2px rgba(52, 113, 215, .1), 0 10px 24px rgba(39, 82, 154, .11);
}
.agent-material-card.is-transcribable:not(.is-selected) { border-style: dashed; border-color: #dec38f; }

.agent-material-thumb {
  position: relative;
  display: grid;
  width: 86px;
  height: 64px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background: #e9eef7;
}
.agent-material-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.agent-material-card:hover .agent-material-thumb img { transform: scale(1.045); }
.agent-material-thumb.is-fallback img { opacity: .7; }
.agent-material-thumb.is-script { background: linear-gradient(145deg, #edf3ff, #e3ebfa); color: #3269c8; }
.agent-material-thumb.is-script .ui-icon { width: 25px; height: 25px; }
.agent-material-play {
  position: absolute;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(17, 31, 55, .66);
  color: #fff;
  backdrop-filter: blur(4px);
}
.agent-material-play .ui-icon { width: 12px; height: 12px; margin-left: 1px; }
.agent-material-copy { display: grid; min-width: 0; gap: 4px; }
.agent-material-copy em { color: #4774c5; font-size: 9px; font-style: normal; font-weight: 850; }
.agent-material-copy strong { overflow: hidden; color: #26364f; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.agent-material-copy small { overflow: hidden; color: #8b97a9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.agent-material-select-indicator {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f7f9fc;
  color: #7c899c;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.agent-material-select-indicator .ui-icon { width: 13px; height: 13px; }
.agent-material-card.is-selected .agent-material-select-indicator { border-color: #2f6dd3; background: #2f6dd3; color: #fff; transform: rotate(360deg); }

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-model-spark .ui-icon,
  .route-review .agent-web-toggle.is-active > i,
  .route-review .agent-chat-send:not(:disabled) .ui-icon,
  .route-review .agent-chat-send.is-stop { animation: none; }
  .route-review .agent-chat-add::before,
  .route-review .agent-model-select::before,
  .route-review .agent-web-toggle::before,
  .route-review .agent-chat-send::before { display: none; }
}

@media (max-width: 700px) {
  .route-review .agent-chat-tools { max-width: calc(100% - 52px); overflow-x: auto; scrollbar-width: none; }
  .route-review .agent-chat-add strong,
  .route-review .agent-web-toggle strong { display: inline; }
  .route-review .agent-model-select { min-width: 90px; }
  .agent-material-grid { grid-template-columns: minmax(0, 1fr); }
  .agent-material-dialog .agent-attachment-picker { max-height: 58dvh; padding: 16px 16px 20px; }
}

/* Stable review navigation and custom Agent model picker v78. */
.v3-scroll-region { scrollbar-gutter: stable; }
.route-review .agent-page-intro { display: none; }

.route-review .review-control-row,
.route-review.is-agent-workspace .review-control-row {
  min-height: 52px;
  margin: 0;
  padding: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
}

.route-review .agent-view-tabs,
.route-review.is-agent-workspace .agent-view-tabs {
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 3px;
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  border: 1px solid #e1e7f0;
  border-radius: 13px;
  background: #f5f7fb;
  scrollbar-width: none;
}

.route-review .agent-view-tabs button,
.route-review.is-agent-workspace .agent-view-tabs button {
  min-width: max-content;
  min-height: 36px;
  padding: 0 14px;
  flex: 0 0 auto;
  border-radius: 9px;
  font-size: 12px;
}

.review-control-actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.review-account-context {
  min-width: 0;
  min-height: 38px;
  padding: 5px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e1e7f0;
  border-radius: 11px;
  background: #fff;
  color: #718096;
  white-space: nowrap;
}

.review-account-context span { font-size: 10px; font-weight: 750; }
.review-account-context strong {
  overflow: hidden;
  max-width: 160px;
  color: #23456f;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
}

.agent-model-picker {
  position: relative;
  flex: 0 0 auto;
}

.route-review .agent-model-select {
  width: auto;
  min-width: 104px;
  min-height: 36px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f3f6fa;
  color: #42536c;
  cursor: pointer;
  box-shadow: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.route-review .agent-model-select:hover,
.route-review .agent-model-picker.is-open .agent-model-select {
  border-color: #cbd8ed;
  background: #fff;
  box-shadow: 0 6px 16px rgba(47, 73, 118, .1);
}

.route-review .agent-model-select:focus-visible {
  outline: 0;
  border-color: #6e96e1;
  box-shadow: 0 0 0 3px rgba(42, 105, 210, .13);
}

.route-review .agent-model-select:disabled {
  cursor: not-allowed;
  opacity: .56;
  box-shadow: none;
}

.route-review .agent-model-select > strong {
  overflow: hidden;
  color: #2f4361;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-review .agent-model-spark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #eaf2ff;
  color: #2869cf;
}

.route-review .agent-model-spark .ui-icon { width: 13px; height: 13px; }
.route-review .agent-model-chevron {
  position: static;
  margin-left: auto;
  display: inline-flex;
  color: #8190a6;
  transform: none;
  transition: transform .16s ease;
}
.route-review .agent-model-chevron .ui-icon { width: 13px; height: 13px; }
.route-review .agent-model-picker.is-open .agent-model-chevron { transform: rotate(180deg); }

.agent-model-menu {
  position: fixed;
  z-index: 360;
  width: min(256px, calc(100vw - 24px));
  padding: 7px;
  display: grid;
  gap: 4px;
  border: 1px solid #dce4f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(30, 48, 84, .2), 0 2px 10px rgba(30, 48, 84, .08);
}

.agent-model-menu[hidden] { display: none; }
.agent-model-menu-head {
  padding: 7px 8px 8px;
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #edf1f6;
}
.agent-model-menu-head span { color: #233653; font-size: 12px; font-weight: 850; }
.agent-model-menu-head small { color: #8491a4; font-size: 10px; }

.agent-model-option {
  width: 100%;
  min-height: 54px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #344861;
  cursor: pointer;
  text-align: left;
}

.agent-model-option:hover { background: #f4f7fb; }
.agent-model-option:focus-visible {
  outline: 0;
  border-color: #8eafe8;
  box-shadow: 0 0 0 3px rgba(42, 105, 210, .11);
}
.agent-model-option.is-selected {
  border-color: #d6e4fb;
  background: #edf4ff;
}
.agent-model-option.is-unavailable {
  border-color: #e3e8f0;
  background: #fafbfd;
}
.agent-model-option.is-unavailable:hover { border-color: #c9d8ee; background: #f4f7fb; }
.agent-model-option.is-unavailable .agent-model-option-icon { background: #f0f2f6; color: #8a96a8; }
.agent-model-option.is-unavailable .agent-model-option-copy small { color: #a06b2d; }
.agent-model-option-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef2f7;
  color: #63748d;
}
.agent-model-option.is-selected .agent-model-option-icon { background: #dceaff; color: #2563c7; }
.agent-model-option-icon .ui-icon { width: 16px; height: 16px; }
.agent-model-option-copy { min-width: 0; display: grid; gap: 2px; }
.agent-model-option-copy strong { color: #263b58; font-size: 12px; font-weight: 850; }
.agent-model-option-copy small {
  overflow: hidden;
  color: #7b889c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-model-option-check { display: inline-flex; color: #2563c7; opacity: 0; }
.agent-model-option-check .ui-icon { width: 15px; height: 15px; stroke-width: 2.4; }
.agent-model-option.is-selected .agent-model-option-check { opacity: 1; }

@media (max-width: 767px) {
  .route-review .review-control-row,
  .route-review.is-agent-workspace .review-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  .route-review .agent-view-tabs,
  .route-review.is-agent-workspace .agent-view-tabs { width: 100%; }
  .review-control-actions { width: 100%; margin-left: 0; justify-content: space-between; }
  .review-account-context { max-width: calc(100% - 46px); }
  .route-review .agent-model-select { min-width: 94px; min-height: 34px; padding: 0 7px; }
}

@media (max-width: 380px) {
  .route-review .agent-view-tabs button,
  .route-review.is-agent-workspace .agent-view-tabs button { padding: 0 10px; }
  .review-account-context strong { max-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-model-select,
  .route-review .agent-model-chevron { transition: none; }
}

@media (max-width: 420px) {
  .route-review .agent-chat-add { padding-inline: 8px; }
  .route-review .agent-chat-add strong,
  .route-review .agent-web-toggle strong { display: none; }
  .route-review .agent-model-select { min-width: 84px; }
  .agent-material-card { grid-template-columns: 76px minmax(0, 1fr) 24px; }
  .agent-material-thumb { width: 76px; height: 58px; }
}

/* System account relocation and simplified review navigation v72. */
.system-center-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.system-center-entry-grid .system-settings-entry {
  min-height: 138px;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
}

.system-center-entry-grid .system-settings-entry-meta {
  grid-column: 2;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  justify-items: start;
}

.system-account-entry {
  background: linear-gradient(135deg, #fff 0%, #f4f7ff 100%);
}

.system-account-avatar {
  background: linear-gradient(145deg, #1759d1, #5474df);
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(26, 83, 204, .2);
}

.system-account-entry .system-settings-entry-meta b {
  background: #edf2ff;
  color: #4963bb;
}

@media (max-width: 820px) {
  .system-center-entry-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .system-center-entry-grid .system-settings-entry {
    min-height: 0;
    grid-template-columns: 44px minmax(0, 1fr);
  }
}

/* Compact and unified system center v101. */
@media (min-width: 901px) {
  .v3-shell .content.route-system {
    width: min(calc(100% - 48px), 960px);
  }
}

.route-system {
  --system-compact-radius: 14px;
  gap: 14px !important;
}

.route-system .system-center-intro {
  min-height: 88px;
  padding: 8px 0 14px;
}

.route-system .system-center-intro h1 {
  font-size: clamp(27px, 2.5vw, 32px);
}

.system-center-intro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.system-center-ready-status {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d8e8de;
  border-radius: 999px;
  background: var(--v3-success-soft);
  color: var(--v3-good);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.system-center-ready-status svg,
.system-center-intro-actions .v3-btn svg {
  width: 16px;
  height: 16px;
}

.route-system .system-center-summary {
  min-height: 64px;
  padding: 10px 14px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 11px;
  border-radius: var(--system-compact-radius);
}

.route-system .system-center-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.route-system .system-center-summary-icon svg {
  width: 18px;
  height: 18px;
}

.route-system .system-center-summary strong { font-size: 14px; }
.route-system .system-center-summary span { font-size: 11px; }
.route-system .system-center-card {
  gap: 13px;
  padding: 18px 20px;
  border-radius: var(--system-compact-radius);
}

.route-system .system-center-card > header {
  margin-bottom: 0;
  align-items: center;
}

.system-compact-header {
  width: 100%;
}

.system-profile-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.route-system .system-account-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: none;
}

.system-profile-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.system-profile-copy em {
  color: var(--v3-primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.system-profile-copy strong {
  overflow: hidden;
  color: var(--v3-ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-profile-copy small {
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-compact-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.system-feedback-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px !important;
  background: linear-gradient(135deg, var(--v3-surface) 0%, #f5f8ff 100%);
}

.system-feedback-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--v3-primary);
  background: var(--v3-primary-soft);
}

.system-feedback-icon svg { width: 20px; height: 20px; }
.system-feedback-card > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.system-feedback-card > div:nth-child(2) > strong { color: var(--v3-ink); font-size: 15px; }
.system-feedback-card > div:nth-child(2) > p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.55; }

.product-feedback-modal { width: min(720px, calc(100vw - 28px)); border-radius: 22px; }
.product-feedback-modal .modal-body { padding: 0; background: #f6f8fc; }
.product-feedback-form { display: grid; padding: 18px; color: #1d2939; gap: 14px; }
.product-feedback-intro {
  display: grid;
  padding: 16px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #dce7fb;
  border-radius: 15px;
  background: linear-gradient(135deg, #eef5ff, #f8faff);
}
.product-feedback-intro > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #1759d1; background: #fff; box-shadow: 0 8px 20px rgba(31, 89, 194, .1); }
.product-feedback-intro svg { width: 21px; height: 21px; }
.product-feedback-intro div { display: grid; gap: 3px; }
.product-feedback-intro strong { color: #203451; font-size: 14px; }
.product-feedback-intro p { margin: 0; color: #6d7c91; font-size: 11px; line-height: 1.6; }
.product-feedback-fields { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.product-feedback-fields label { display: grid; align-content: start; gap: 7px; color: #334155; font-size: 11px; font-weight: 800; }
.product-feedback-fields select,
.product-feedback-fields textarea { width: 100%; border: 1px solid #d8e0eb; border-radius: 11px; color: #203451; background: #fff; outline: 0; font: inherit; transition: border-color .16s ease, box-shadow .16s ease; }
.product-feedback-fields select { height: 42px; padding: 0 11px; }
.product-feedback-fields textarea { min-height: 142px; padding: 11px 12px 25px; resize: vertical; line-height: 1.65; }
.product-feedback-fields select:focus,
.product-feedback-fields textarea:focus { border-color: #7aa4ed; box-shadow: 0 0 0 3px rgba(39, 107, 211, .1); }
.product-feedback-content { position: relative; }
.product-feedback-content em { position: absolute; right: 10px; bottom: 8px; color: #98a2b3; font-size: 9px; font-style: normal; font-weight: 600; }
.product-feedback-content em b { font: inherit; }
.product-feedback-upload { display: grid; padding: 14px; border: 1px solid #dfe6f0; border-radius: 14px; background: #fff; gap: 11px; }
.product-feedback-upload > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-feedback-upload > header > div { display: grid; gap: 3px; }
.product-feedback-upload strong { color: #263a58; font-size: 12px; }
.product-feedback-upload span { color: #7b8799; font-size: 10px; }
.product-feedback-upload label { cursor: pointer; }
.product-feedback-upload label svg { width: 15px; height: 15px; }
.product-feedback-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.product-feedback-previews > span { grid-column: 1 / -1; padding: 18px; border: 1px dashed #d7dfeb; border-radius: 11px; color: #98a2b3; text-align: center; background: #fafbfc; }
.product-feedback-previews article { position: relative; min-width: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 28px 6px 6px; border: 1px solid #e0e6ef; border-radius: 11px; background: #fbfcfe; }
.product-feedback-previews img { width: 58px; height: 50px; border-radius: 8px; object-fit: cover; background: #eef1f5; }
.product-feedback-previews article > span { min-width: 0; display: grid; gap: 3px; }
.product-feedback-previews article strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-feedback-previews article small { color: #98a2b3; font-size: 9px; }
.product-feedback-previews article button { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; color: #77859a; background: #edf1f6; cursor: pointer; }
.product-feedback-privacy { display: flex; margin: 0; align-items: center; gap: 6px; color: #7b8799; font-size: 10px; line-height: 1.5; }
.product-feedback-privacy svg { width: 14px; height: 14px; flex: none; color: #4d74bd; }
.product-feedback-form > footer { display: flex; justify-content: flex-end; gap: 9px; }

.system-role-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf2ff;
  color: #4963bb;
  font-size: 10px;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .system-feedback-card { grid-template-columns: 38px minmax(0, 1fr); }
  .system-feedback-card > button { grid-column: 1 / -1; width: 100%; }
  .product-feedback-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 17px; }
  .product-feedback-modal .modal-body { max-height: calc(100dvh - 76px); overflow-y: auto; }
  .product-feedback-form { padding: 12px; }
  .product-feedback-fields { grid-template-columns: 1fr; }
  .product-feedback-previews { grid-template-columns: 1fr; }
  .product-feedback-upload > header { align-items: flex-start; flex-direction: column; }
  .product-feedback-upload > header label { width: 100%; justify-content: center; }
}

.route-system .v3-text-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.route-system .v3-text-link svg {
  width: 14px;
  height: 14px;
}

.system-service-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.system-service-tile {
  min-height: 68px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: var(--v3-surface-soft);
}

.system-service-tile.is-pending {
  border-color: #eadcc6;
  background: var(--v3-warning-soft);
}

.system-service-tile-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--v3-primary-soft);
  color: var(--v3-primary);
}

.system-service-tile.is-pending .system-service-tile-icon {
  background: #f7e9d4;
  color: var(--v3-warn);
}

.system-service-tile-icon svg {
  width: 17px;
  height: 17px;
}

.system-service-tile-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.system-service-tile-copy strong {
  color: var(--v3-ink);
  font-size: 12px;
}

.system-service-tile-copy em {
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-service-tile-state {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--v3-success-soft);
  color: var(--v3-good);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.system-service-tile.is-pending .system-service-tile-state {
  background: #f7e9d4;
  color: var(--v3-warn);
}

.system-connections-note {
  margin: 0;
  color: var(--v3-muted);
  font-size: 10px;
}

/* On-demand subscription offers v115 */
.system-plan-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--v3-success-soft);
  color: var(--v3-good);
  font-size: 10px;
  font-weight: 800;
}

.system-plan-status.is-warning {
  background: var(--v3-warning-soft);
  color: var(--v3-warn);
}

.system-plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: var(--v3-surface-soft);
}

.system-plan-metrics article {
  min-height: 62px;
  padding: 11px 14px;
  display: grid;
  gap: 7px;
  border-right: 1px solid var(--v3-line);
}

.system-plan-metrics article:last-child { border-right: 0; }
.system-plan-metrics span { color: var(--v3-muted); font-size: 10px; }
.system-plan-metrics strong { color: var(--v3-ink); font-size: 18px; }
.system-plan-metrics strong em { margin-left: 4px; color: var(--v3-muted); font-size: 11px; font-style: normal; font-weight: 600; }
.system-ai-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.system-agent-usage { min-width: 0; display: grid; gap: 9px; padding: 14px 15px; border: 1px solid var(--v3-line); border-radius: 12px; background: var(--v3-surface-soft); }
.system-agent-usage header, .system-agent-usage footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.system-agent-usage header > div { display: grid; gap: 3px; }
.system-agent-usage header strong { color: var(--v3-ink); font-size: 12px; }
.system-agent-usage header span, .system-agent-usage footer { color: var(--v3-muted); font-size: 10px; }
.system-agent-usage header .system-agent-usage-state { padding: 5px 9px; border-radius: 999px; background: #eaf8f1; color: #12805c; font-size: 10px; font-weight: 800; }
.system-agent-usage header .system-agent-usage-state.is-warning { background: #fff3dc; color: #9a6200; }
.system-agent-usage header .system-agent-usage-state.is-critical { background: #ffebe8; color: #b83d32; }
.system-agent-usage-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e4e9f2; }
.system-agent-usage-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1c68e8 0%, #6f88f7 100%); transition: width .25s ease; }
.system-agent-usage.is-image-usage .system-agent-usage-track i { background: linear-gradient(90deg, #7656df 0%, #af78ee 100%); }
.system-plan-note { margin: 0; color: var(--v3-muted); font-size: 10px; }
.system-plan-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: var(--v3-surface-soft);
}
.system-plan-actions.is-warning { border-color: #f1d18f; background: #fffaf0; }
.system-plan-actions.is-critical { border-color: #efb5af; background: #fff7f5; }
.system-plan-action-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.system-plan-action-copy > span:last-child { min-width: 0; display: grid; gap: 3px; }
.system-plan-action-copy strong { color: var(--v3-ink); font-size: 12px; }
.system-plan-action-copy small { color: var(--v3-muted); font-size: 10px; line-height: 1.45; }
.system-plan-action-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eaf2ff;
  color: var(--v3-blue);
}
.system-plan-action-icon .ui-icon { width: 15px; height: 15px; }
.system-plan-actions.is-warning .system-plan-action-icon { background: #fff0cd; color: #a66700; }
.system-plan-actions.is-critical .system-plan-action-icon { background: #ffe5e1; color: #b83d32; }
.system-plan-action-buttons { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

.system-plan-modal { width: min(800px, calc(100vw - 32px)); }
.system-plan-modal .modal-body { padding: 0; background: #f6f8fc; }
.system-plan-modal-content { display: grid; gap: 18px; padding: 22px; }
.system-plan-modal-intro { display: grid; gap: 5px; }
.system-plan-modal-intro > span { color: var(--v3-blue); font-size: 10px; font-weight: 850; }
.system-plan-modal-intro h3 { margin: 0; color: var(--v3-ink); font-size: 20px; line-height: 1.25; }
.system-plan-modal-intro { padding: 6px 2px 10px; }
.system-plan-modal-intro > span { color: var(--v3-primary); letter-spacing: 1.2px; }
.system-plan-modal-offers article > div > .system-plan-card-action { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 11px 12px; border: 1px solid #d8e3f5; border-radius: 9px; color: #2860ac; background: #f8fbff; font-size: 12px; font-weight: 700; }
.system-plan-modal-offers article.is-recommended .system-plan-card-action { background: var(--v3-primary); border-color: var(--v3-primary); color: #fff; }
.system-plan-modal-intro p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.system-plan-modal-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.system-plan-modal-offers:has(article:only-child) { grid-template-columns: 1fr; }
.system-plan-modal-offers article {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 16px;
  border: 1px solid #cfdcf2;
  border-radius: 13px;
  background: #fff;
}
.system-plan-modal-offers article > div { width: 100%; min-width: 0; display: grid; grid-template-rows: auto auto auto auto 1fr; gap: 10px; }
.system-plan-card-hit { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; background: transparent; cursor: pointer; z-index: 1; }
.system-plan-card-hit:hover { box-shadow: inset 0 0 0 2px rgba(11,79,196,.28); }
.system-plan-card-hit:focus-visible, .system-plan-card-hit[aria-pressed="true"] { outline: 2px solid var(--v3-primary); outline-offset: 3px; }
.system-plan-card-hit:disabled { cursor: not-allowed; background: rgba(255,255,255,.25); }
.system-plan-payment[hidden], .system-plan-payment [hidden] { display: none !important; }
.system-plan-payment { display: grid; justify-items: center; gap: 14px; padding: 22px; border: 1px solid #cfdcf2; border-radius: 16px; background: #fff; text-align: center; }
.system-plan-payment header h3 { margin: 0 0 6px; font-size: 21px; color: var(--v3-ink); }
.system-plan-payment > header { display: grid; justify-items: center; gap: 4px; border: 0; padding: 0; }
.system-plan-payment header span, .system-plan-payment small { color: var(--v3-muted); font-size: 11px; line-height: 1.7; }
.system-plan-payment p { margin: 0; font-size: 12px; line-height: 1.8; }
.system-plan-payment-switch, .system-plan-payment-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.system-plan-payment-switch button { min-height: 36px; font-size: 12px; }
@media (max-width: 600px) {
  .system-plan-payment { padding: 18px 14px; }
  .system-plan-payment-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 5px; }
  .system-plan-payment-switch button { padding-inline: 4px; font-size: 11px; }
  .system-plan-payment .system-plan-qr-frame img { width: 200px; }
}
.system-plan-payment-switch button[aria-pressed="true"] { border-color: var(--v3-primary); color: var(--v3-primary); background: #edf4ff; }
.system-plan-qr-frame { background: #fff; padding: 20px; max-width: 100%; box-sizing: border-box; border: 1px solid #e5eaf2; border-radius: 12px; }
.system-plan-qr-frame img { display: block; width: 300px; max-width: 100%; height: auto; image-rendering: pixelated; }
.system-plan-modal-offers article > div > .system-plan-offer-badge { justify-self: start; padding: 4px 8px; border-radius: 6px; background: #edf2f9; color: #53657d; font-size: 10px; line-height: 1.4; font-weight: 750; }
.system-plan-modal-offers article strong { color: var(--v3-ink); font-size: 16px; }
.system-plan-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.system-plan-benefits article { padding: 12px; border-radius: 10px; background: #edf3ff; }
.system-plan-benefits strong { font-size: 12px; color: var(--v3-ink); }
.system-plan-benefits p { margin: 6px 0 0; font-size: 11px; line-height: 1.6; color: var(--v3-muted); }
.system-plan-modal-offers article.is-recommended { border-color: var(--v3-primary); background: linear-gradient(150deg, #edf4ff, #fff); box-shadow: 0 5px 18px rgba(11, 79, 196, .08); }
.system-plan-modal-offers article.is-recommended .system-plan-offer-badge { background: var(--v3-primary); color: #fff; }
.system-plan-offer-price { display: grid; gap: 5px; margin: 5px 0; }
.system-plan-modal-offers article .system-plan-offer-saving { color: var(--v3-primary); font-weight: 700; }
.system-plan-quota-disclosure, .system-plan-context-note { margin: 0; font-size: 11px; line-height: 1.65; color: var(--v3-muted); }
.system-plan-context-note { padding: 10px 12px; border-radius: 9px; background: #fff6e5; color: #80591a; }
@media (max-width: 600px) { .system-plan-benefits { grid-template-columns: 1fr; } }
.system-plan-modal-offers article small { color: var(--v3-muted); font-size: 10px; line-height: 1.45; }
.system-plan-modal-offers article > p { margin: 0; flex: 0 0 auto; white-space: nowrap; }
.system-plan-modal-offers article b { color: var(--v3-ink); font-size: 34px; line-height: 1.15; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.system-plan-offer-price b > span { margin-right: 3px; font-size: 18px; letter-spacing: 0; }
.system-plan-modal-offers article em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.system-plan-modal-redeem { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--v3-line); border-radius: 13px; background: #fff; }
.system-plan-modal-redeem > div { display: grid; gap: 3px; }
.system-plan-modal-redeem > div strong { color: var(--v3-ink); font-size: 12px; }
.system-plan-modal-redeem small, .system-plan-modal-redeem > p { color: var(--v3-muted); font-size: 10px; line-height: 1.45; }
.system-plan-modal-redeem > p { margin: 0; }
.system-plan-purchase { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--v3-line); border-radius: 13px; background: #edf3ff; }
.system-plan-purchase-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: start; text-decoration: none; }
.system-plan-purchase-link .ui-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.system-plan-confirm { width: min(460px, calc(100vw - 40px)); box-sizing: border-box; padding: 22px; border: 1px solid var(--v3-line); border-radius: 16px; background: #fff; color: var(--v3-ink); }
.system-plan-confirm::backdrop { background: rgba(15, 23, 42, .4); }
.system-plan-confirm h3 { margin: 0 0 12px; font-size: 18px; }
.system-plan-confirm p { font-size: 13px; line-height: 1.8; }
.system-plan-confirm a { color: var(--v3-primary); }
.system-plan-confirm form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.system-plan-purchase p { margin: 0; color: var(--v3-ink); font-size: 12px; line-height: 1.7; }
.system-plan-purchase small { color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.system-plan-redeem-account { overflow-wrap: anywhere; }
.system-plan-modal-redeem > p .v3-text-link { margin-left: 5px; }
.system-plan-modal .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.system-plan-modal-redeem form { display: grid; gap: 9px; }
.system-plan-redeem-row { display: flex; gap: 8px; }
.system-plan-modal-redeem input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid var(--v3-line-strong); border-radius: 9px; outline: none; }
.system-plan-modal-redeem input:focus-visible { border-color: var(--v3-blue); box-shadow: 0 0 0 3px rgba(24, 89, 199, .13); }
.system-plan-activation-ack { display: grid; grid-template-columns: 16px 1fr; gap: 7px; align-items: start; padding: 9px; border: 1px solid #ecd68c; border-radius: 9px; background: #fff9e8; color: #65501e; font-size: 10px; line-height: 1.5; }.system-plan-activation-ack input{width:15px;height:15px;min-height:15px;margin:1px 0 0;padding:0;accent-color:var(--v3-blue)}.system-plan-activation-ack a{color:#775300;font-weight:750}

.route-system .system-task-metrics {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 12px;
  background: var(--v3-surface-soft);
}

.route-system .system-task-metrics article {
  min-height: 58px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-right: 1px solid var(--v3-line);
  border-radius: 0;
  background: transparent;
}

.route-system .system-task-metrics article:last-child { border-right: 0; }
.route-system .system-task-metrics strong { font-size: 20px; }
.route-system .system-task-note {
  padding: 0;
  background: transparent;
  color: var(--v3-muted);
}

.route-system .system-center-advanced {
  border-radius: var(--system-compact-radius);
}

.route-system .system-center-advanced summary {
  min-height: 54px;
  padding: 10px 16px;
}

@media (max-width: 820px) {
  .system-center-intro-actions { justify-content: flex-start; }
  .system-service-tiles { grid-template-columns: 1fr; }
  .system-compact-header { align-items: flex-start !important; }
  .system-plan-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .system-plan-metrics article:nth-child(2) { border-right: 1px solid var(--v3-line); }
  .system-plan-metrics article:nth-child(-n+2) { border-bottom: 0; }
  .system-ai-usage-grid { grid-template-columns: 1fr; }
  .system-plan-actions { align-items: flex-start; flex-direction: column; }
  .system-plan-action-buttons { width: 100%; }
}

@media (max-width: 620px) {
  .system-plan-metrics { grid-template-columns: 1fr; }
  .system-plan-metrics article, .system-plan-metrics article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--v3-line); }
  .system-plan-metrics article:last-child { border-bottom: 0; }
  .system-agent-usage header, .system-agent-usage footer { align-items: flex-start; }
  .system-plan-action-buttons { align-items: stretch; flex-direction: column; }
  .system-plan-action-buttons .v3-btn { width: 100%; }
  .system-plan-modal-offers { grid-template-columns: 1fr; }
  .system-plan-modal-offers article { align-items: flex-start; }
  .system-plan-redeem-row { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .route-system .system-center-card { padding: 15px; }
  .system-compact-header,
  .system-compact-actions { align-items: stretch; flex-direction: column; }
  .system-compact-actions { gap: 6px; }
  .system-role-badge { align-self: flex-start; }
  .route-system .system-task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-system .system-task-metrics article:nth-child(2) { border-right: 0; }
  .route-system .system-task-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--v3-line); }
}

/* Account positioning workspace: one primary task, details on demand. */
.route-mine .mine-command-hero {
  min-height: 74px;
  margin-bottom: 14px;
  padding: 16px 18px;
}

.route-mine .mine-command-hero .section-title { font-size: 16px; }
.route-mine .mine-command-hero p { margin-top: 3px; font-size: 13px; }

.route-mine .ops-account-card {
  padding: 18px;
  border-color: #dbe5f1;
  background: #fff;
  box-shadow: 0 12px 32px rgba(35, 64, 105, .07);
}

.route-mine .ops-account-card::before { display: none; }
.route-mine .ops-account-top { grid-template-columns: 54px minmax(0, 1fr) auto; }
.route-mine .ops-account-main .user-line strong { font-size: 18px; }
.route-mine .ops-account-actions { max-width: none; }

.positioning-focus-card {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #cfdcf0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7fbff 0%, #fff 56%, #f8f7ff 100%);
}

.positioning-focus-card > header,
.positioning-suggestion-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.positioning-focus-card > header > div { display: grid; gap: 4px; }
.positioning-focus-card > header strong { color: #10213a; font-size: 17px; }
.positioning-eyebrow { color: #1458d4; font-size: 12px; font-weight: 800; }
.positioning-completeness,
.positioning-confidence {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3fb;
  color: #52647f;
  font-size: 12px;
  font-weight: 700;
}
.positioning-completeness.complete { background: #e8f7ef; color: #18734c; }

.positioning-simple-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.positioning-simple-list > div {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e2e9f3;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
}

.positioning-simple-list span,
.account-metric-card span,
.account-assets-summary span {
  display: block;
  margin-bottom: 5px;
  color: #607089;
  font-size: 12px;
}

.positioning-simple-list strong {
  display: -webkit-box;
  overflow: hidden;
  color: #17263c;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.positioning-actions { display: flex; gap: 10px; margin-top: 14px; }
.positioning-agent-button { min-width: 174px; }

.route-mine .next-action {
  margin: 12px 0;
  border-color: #d7e3f2;
  background: #f7f9fc;
}
.route-mine .next-action span { color: #1458d4; }
.route-mine .next-action strong { color: #26364c; font-size: 14px; }

.account-metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.account-metric-card {
  padding: 12px 14px;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #fff;
}
.account-metric-card strong { display: block; color: #12233d; font-size: 20px; }
.account-metric-card small { display: block; margin-top: 3px; color: #75849a; }

.account-detail-section {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  border: 1px solid #e0e7f1;
  border-radius: 12px;
  background: #fff;
}

.account-detail-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: #1d2c42;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.account-detail-section > summary::-webkit-details-marker { display: none; }
.account-detail-section > summary::after { content: "＋"; color: #53657e; font-size: 18px; }
.account-detail-section[open] > summary::after { content: "－"; }
.account-detail-section > summary small { margin-left: auto; color: #6e7d92; font-weight: 500; }
.account-detail-section[open] > summary { border-bottom: 1px solid #e7edf5; }

.route-mine .benchmark-pool {
  padding: 4px 14px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.route-mine .profile-details { padding: 0; background: #fff; }
.route-mine .profile-details summary { min-height: 48px; padding: 0 14px; }

.account-assets-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
}
.account-assets-summary > div:not(.actions) { padding: 10px; border-radius: 10px; background: #f7f9fc; }
.account-assets-summary strong { color: #17263c; }

.positioning-pending,
.positioning-pending-error {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 18px;
  color: #20314a;
  text-align: center;
}
.positioning-pending p,
.positioning-pending-error p { margin: 0; color: #5f7088; }
.positioning-pending small { color: #7d8ba0; }
.positioning-pending-icon {
  width: 34px;
  height: 34px;
  border: 3px solid #dce6f5;
  border-top-color: #1458d4;
  border-radius: 50%;
  animation: positioningSpin .8s linear infinite;
}
@keyframes positioningSpin { to { transform: rotate(360deg); } }

.positioning-suggestion-modal {
  width: min(980px, calc(100vw - 44px));
  height: min(860px, calc(100vh - 44px));
  height: min(860px, calc(100dvh - 44px));
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.positioning-suggestion-modal .modal-body {
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: hidden;
  background: #f5f7fb;
}
.positioning-suggestion {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.positioning-suggestion-scroll {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
}
.positioning-suggestion-scroll:focus-visible {
  outline: 3px solid rgba(20, 88, 212, .14);
  outline-offset: -3px;
}
.positioning-suggestion-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #dfe6f0;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -10px 24px rgba(30, 55, 90, .06);
}
.positioning-suggestion-footer > p {
  min-width: 0;
  margin: 0;
  color: #68788e;
  font-size: 11px;
  line-height: 1.55;
}
.positioning-suggestion-footer .modal-actions {
  flex: 0 0 auto;
  margin-top: 0;
  justify-content: flex-end;
}
.positioning-suggestion-footer .btn { min-height: 42px; }
.positioning-suggestion-summary {
  padding: 14px;
  border-radius: 12px;
  background: #f4f7fc;
}
.positioning-suggestion-summary > div { display: grid; gap: 5px; }
.positioning-suggestion-summary span { color: #5f7088; font-size: 12px; }
.positioning-suggestion-summary strong { color: #17263c; line-height: 1.55; }
.positioning-diff-list { display: grid; gap: 10px; }
.positioning-diff-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 13px;
  border: 1px solid #e0e7f1;
  border-radius: 12px;
  background: #fff;
}
.positioning-diff-row.changed { border-color: #bcd0ef; background: #fbfdff; }
.positioning-diff-row > input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1458d4; }
.positioning-diff-main { display: grid; gap: 8px; min-width: 0; }
.positioning-diff-main > strong { color: #192a42; }
.positioning-current,
.positioning-proposed { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: start; }
.positioning-current span,
.positioning-proposed span { color: #697990; font-size: 12px; line-height: 30px; }
.positioning-current p { margin: 4px 0 0; color: #6c7b90; line-height: 1.55; }
.positioning-proposed textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #cbd8e9;
  border-radius: 9px;
  color: #14243c;
  background: #fff;
  font: inherit;
  line-height: 1.5;
}
.positioning-proposed textarea:focus { border-color: #1458d4; outline: 3px solid rgba(20, 88, 212, .12); }
.positioning-diff-main > small { color: #5f7088; line-height: 1.5; }
.positioning-questions { padding: 12px 14px; border-radius: 12px; background: #fff8e8; color: #5f4818; }
.positioning-questions p { margin: 6px 0 0; }
.positioning-evidence { border: 1px solid #e2e8f1; border-radius: 10px; }
.positioning-evidence summary { padding: 11px 13px; color: #34465f; cursor: pointer; font-weight: 700; }
.positioning-evidence p { display: grid; gap: 3px; margin: 0; padding: 10px 13px; border-top: 1px solid #edf1f6; }
.positioning-evidence p span { color: #68788e; font-size: 12px; }

@media (max-width: 900px) {
  .positioning-simple-list { grid-template-columns: 1fr; }
  .account-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-assets-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-assets-summary .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 620px) {
  .route-mine .ops-account-top { grid-template-columns: 48px minmax(0, 1fr); }
  .route-mine .ops-account-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .positioning-focus-card > header,
  .positioning-suggestion-summary { align-items: stretch; flex-direction: column; }
  .positioning-completeness,
  .positioning-confidence { align-self: flex-start; }
  .positioning-actions { flex-direction: column; }
  .account-metric-grid { grid-template-columns: 1fr 1fr; }
  .positioning-current,
  .positioning-proposed { grid-template-columns: 1fr; gap: 2px; }
  .positioning-current span,
  .positioning-proposed span { line-height: 1.4; }
  .positioning-suggestion-footer { align-items: stretch; flex-direction: column; gap: 9px; }
  .positioning-suggestion-footer .modal-actions { width: 100%; display: grid; grid-template-columns: 1fr; gap: 8px; }
  .positioning-suggestion-footer .btn { width: 100%; justify-content: center; }
}

@media (max-height: 620px) {
  .positioning-suggestion-modal > header { min-height: 50px; padding: 9px 13px; }
  .positioning-suggestion-scroll { gap: 10px; padding: 12px; scroll-padding-block: 12px; }
  .positioning-suggestion-footer { padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
}

/* Direct own-account search and binding modal v103. */
.own-account-search-modal {
  width: min(640px, calc(100vw - 28px));
  border-radius: 18px;
}
.own-account-search-modal > header {
  min-height: 58px;
  padding: 14px 18px;
}
.own-account-search-modal .modal-body { padding: 0; }
.own-account-search-dialog {
  display: grid;
  gap: 16px;
  padding: 18px;
  color: #17263c;
}
.own-account-search-dialog > p {
  margin: 0;
  color: #66758a;
  font-size: 13px;
  line-height: 1.6;
}
.own-account-search-box {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 6px 7px 6px 14px;
  border: 1px solid #cfd9e8;
  border-radius: 13px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.own-account-search-box:focus-within {
  border-color: #7fa7ed;
  box-shadow: 0 0 0 3px rgba(20, 88, 212, .08);
}
.own-account-search-box > .ui-icon { width: 18px; height: 18px; color: #6c7c91; }
.own-account-search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #17263c;
  background: transparent;
  font: inherit;
}
.own-account-search-box input::placeholder { color: #98a4b5; }
.own-account-search-box .v3-btn { min-width: 74px; min-height: 38px; }
.own-account-search-results {
  display: grid;
  gap: 10px;
  max-height: min(420px, 48vh);
  overflow-y: auto;
}
.own-account-search-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e0e7f0;
  border-radius: 13px;
  background: #fff;
}
.own-account-search-result > img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef3f9;
}
.own-account-search-result > div { display: grid; gap: 3px; min-width: 0; }
.own-account-search-result strong,
.own-account-search-result span,
.own-account-search-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.own-account-search-result strong { color: #16263d; font-size: 14px; }
.own-account-search-result span { color: #5f7087; font-size: 12px; }
.own-account-search-result small { color: #8794a7; font-size: 11px; }
.own-account-search-result .v3-btn { min-width: 82px; }
.own-account-search-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 126px;
  align-content: center;
  padding: 18px;
  border: 1px dashed #d5deeb;
  border-radius: 13px;
  color: #718096;
  text-align: center;
  background: #f8fafc;
}
.own-account-search-empty strong { color: #34455e; }
.own-account-search-empty span { font-size: 12px; line-height: 1.55; }
.own-account-search-empty .v3-btn { margin-top: 4px; }

@media (max-width: 560px) {
  .own-account-search-modal { width: calc(100vw - 18px); border-radius: 16px; }
  .own-account-search-dialog { gap: 13px; padding: 14px; }
  .own-account-search-box {
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 10px 12px;
  }
  .own-account-search-box .v3-btn { grid-column: 1 / -1; width: 100%; }
  .own-account-search-result { grid-template-columns: 44px minmax(0, 1fr); }
  .own-account-search-result > img { width: 44px; height: 44px; }
  .own-account-search-result .v3-btn { grid-column: 1 / -1; width: 100%; min-height: 42px; }
}

/* Own-account performance workspace v104: conclusion first, details on demand. */
.route-account .account-head.is-own-analysis {
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 90px;
  padding: 15px 18px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(31, 52, 82, .045);
}
.route-account .account-head.is-own-analysis .avatar.large { width: 56px; height: 56px; }
.route-account .account-head.is-own-analysis .user-line.big { gap: 9px; }
.route-account .account-head.is-own-analysis .user-line.big strong { font-size: 22px; }
.route-account .account-head.is-own-analysis .account-info > .muted {
  max-width: 760px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-account .account-head.is-own-analysis .tag-row { margin-top: 7px; gap: 6px; }
.route-account .account-head.is-own-analysis .tag { min-height: 27px; padding: 0 9px; font-size: 11px; }
.route-account .account-head.is-own-analysis > .actions { justify-content: flex-end; }
.route-account .account-head.is-own-analysis > .actions .btn { min-height: 38px; }

.route-account .account-workbench-tabs {
  position: sticky;
  z-index: 8;
  top: 0;
  margin: 12px 0 16px;
  padding: 4px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--v3-surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.route-account .account-workbench-tabs button { border-radius: 10px; }
.route-account .account-workbench-tabs button.active {
  background: var(--v3-primary-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v3-primary) 14%, transparent);
}

.route-account .account-performance-overview {
  gap: 15px;
  padding: 20px;
  border-radius: 20px;
  background: var(--v3-surface);
  box-shadow: 0 12px 32px rgba(38, 61, 92, .055);
}
.route-account .account-performance-head,
.route-account .account-ai-review-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.route-account .account-performance-head h2,
.route-account .account-ai-review-panel h2 {
  margin: 3px 0 2px;
  color: var(--v3-ink);
  font-size: 21px;
}
.route-account .account-performance-head p,
.route-account .account-ai-review-panel header p {
  margin: 0;
  color: var(--v3-muted);
  font-size: 12px;
}
.route-account .account-performance-conclusion {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid #dce6f3;
  border-radius: 17px;
  background: linear-gradient(135deg, #f5f9ff 0%, #fff 62%);
}
.route-account .account-performance-copy { min-width: 0; }
.route-account .account-performance-status,
.route-account .account-performance-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1557b8;
  font-size: 11px;
  font-weight: 800;
}
.route-account .account-performance-copy h3 {
  margin: 10px 0 13px;
  color: #172a45;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.35;
}
.route-account .account-performance-findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.route-account .account-performance-findings > div {
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .78);
}
.route-account .account-performance-findings span { color: #64748b; font-size: 10px; font-weight: 800; }
.route-account .account-performance-findings p { margin: 5px 0 0; color: #34445b; font-size: 12px; line-height: 1.55; }
.route-account .account-top-work {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce6f3;
  border-radius: 14px;
  background: #fff;
  color: #1f3552;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.route-account button.account-top-work:hover { transform: translateY(-2px); border-color: #9bb8e7; box-shadow: 0 10px 24px rgba(29, 76, 148, .09); }
.route-account .account-top-work > span { color: #6d7d93; font-size: 10px; font-weight: 800; }
.route-account .account-top-work > strong { display: -webkit-box; margin: 7px 0; overflow: hidden; font-size: 14px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.route-account .account-top-work > em { color: #1557b8; font-size: 10px; font-style: normal; }
.route-account .account-top-work.is-empty { cursor: default; }

.route-account .account-core-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.route-account .account-core-kpis article {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--v3-line);
  border-radius: 13px;
  background: #fff;
}
.route-account .account-core-kpis span,
.route-account .account-core-kpis strong,
.route-account .account-core-kpis em { display: block; }
.route-account .account-core-kpis span { color: var(--v3-muted); font-size: 11px; }
.route-account .account-core-kpis strong { margin: 7px 0 5px; overflow: hidden; color: var(--v3-ink); font-size: 23px; text-overflow: ellipsis; white-space: nowrap; }
.route-account .account-core-kpis em { color: #8794a7; font-size: 9px; font-style: normal; }
.route-account .account-secondary-metrics { border-top: 1px solid #edf1f6; }
.route-account .account-secondary-metrics > summary {
  width: fit-content;
  padding: 12px 0 2px;
  color: #53657c;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.route-account .account-secondary-metrics .douyin-account-data-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 11px; }

.route-account .account-traffic-panel {
  margin: 16px 0;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(38, 61, 92, .045);
}
.route-account .traffic-context-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -4px 0 13px;
}
.route-account .traffic-context-line span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #6d7d92;
  font-size: 10px;
}
.route-account .traffic-context-line b { color: #263b58; font-size: 12px; }

.route-account .account-ai-review-panel {
  display: grid;
  gap: 15px;
  margin: 16px 0;
  padding: 20px;
  border: 1px solid var(--v3-line);
  border-radius: 20px;
  background: var(--v3-surface);
  box-shadow: 0 10px 28px rgba(38, 61, 92, .045);
}
.route-account .account-ai-review-panel > header .v3-btn { flex: 0 0 auto; }
.route-account .account-ai-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.route-account .account-ai-review-grid article { padding: 15px; border: 1px solid var(--v3-line); border-radius: 14px; background: #fafcff; }
.route-account .account-ai-review-grid article > span { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.route-account .account-ai-review-grid .is-good > span { background: #e9f7ef; color: #167046; }
.route-account .account-ai-review-grid .is-risk > span { background: #fff3e4; color: #9a6110; }
.route-account .account-ai-review-grid .is-next > span { background: #e8f1ff; color: #1557b8; }
.route-account .account-ai-review-grid :is(ul, ol) { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 18px; color: #42536a; font-size: 12px; line-height: 1.55; }
.route-account .account-ai-review-note { margin: 0; padding-top: 12px; border-top: 1px solid #edf1f6; color: #748399; font-size: 11px; }

.route-account .account-list-title { grid-template-columns: minmax(220px, 1fr) auto minmax(0, auto) auto; align-items: center; }
.route-account .account-pool-sort { display: flex; align-items: center; gap: 7px; color: var(--v3-muted); font-size: 11px; }
.route-account .account-pool-sort select { min-height: 38px; padding: 0 31px 0 10px; border: 1px solid var(--v3-line); border-radius: 9px; background: #fff; color: #34455d; }
.route-account .account-ranking-row,
:root[data-theme="light"] .route-account .account-ranking-row,
:root[data-theme="dark"] .route-account .account-ranking-row {
  grid-template-columns: 42px 28px 108px minmax(0, 1fr);
  grid-template-areas: "rank check thumb body";
}
.route-account .account-rank-number { grid-area: rank; color: #90a0b4; font: 850 15px/1.2 "SFMono-Regular", Consolas, monospace; text-align: center; }
.route-account .account-ranking-title { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.route-account .account-ranking-title .video-title { min-width: 0; }
.route-account .account-performance-label { flex: 0 0 auto; min-height: 23px; padding: 0 7px; }
.route-account .account-performance-label.is-leading { background: #e9f7ef; color: #167046; }
.route-account .account-performance-label.is-normal { background: #eef3f9; color: #56677e; }
.route-account .account-performance-label.is-improve { background: #fff3e4; color: #9a6110; }
.route-account .video-stats .stat-rate { color: #1557b8; }

@media (max-width: 1100px) {
  .route-account .account-performance-conclusion { grid-template-columns: 1fr; }
  .route-account .account-core-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-account .account-secondary-metrics .douyin-account-data-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-account .account-ai-review-grid { grid-template-columns: 1fr; }
  .route-account .account-list-title { grid-template-columns: 1fr auto; }
  .route-account .account-list-title > :is(.account-pool-sort, .account-pool-filters, .check-control) { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .route-account .account-head.is-own-analysis { grid-template-columns: 50px minmax(0, 1fr); padding: 13px; }
  .route-account .account-head.is-own-analysis .avatar.large { width: 50px; height: 50px; }
  .route-account .account-head.is-own-analysis .account-info > .muted { white-space: normal; }
  .route-account .account-head.is-own-analysis > .actions { grid-column: 1 / -1; display: block; }
  .route-account .account-head.is-own-analysis > .actions .btn { width: 100%; justify-content: center; }
  .route-account .account-performance-overview,
  .route-account .account-ai-review-panel,
  .route-account .account-traffic-panel { padding: 14px; border-radius: 16px; }
  .route-account .account-performance-head,
  .route-account .account-ai-review-panel > header { align-items: stretch; flex-direction: column; }
  .route-account .account-performance-head .btn,
  .route-account .account-ai-review-panel > header .v3-btn { width: 100%; justify-content: center; }
  .route-account .account-performance-conclusion { padding: 13px; }
  .route-account .account-performance-findings { grid-template-columns: 1fr; }
  .route-account .account-core-kpis { gap: 7px; }
  .route-account .account-core-kpis article { padding: 12px; }
  .route-account .account-core-kpis strong { font-size: 19px; }
  .route-account .account-secondary-metrics .douyin-account-data-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-account .account-pool-sort { width: 100%; }
  .route-account .account-pool-sort select { flex: 1; }
  .route-account .account-ranking-row,
  :root[data-theme="light"] .route-account .account-ranking-row,
  :root[data-theme="dark"] .route-account .account-ranking-row {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-areas: "thumb body";
  }
  .route-account .account-rank-number { position: absolute; z-index: 3; top: 10px; right: 10px; padding: 4px 6px; border-radius: 7px; background: rgba(255,255,255,.9); }
  .route-account .account-ranking-title { align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (max-width: 460px) {
  .route-account .account-core-kpis { grid-template-columns: 1fr; }
  .route-account .account-secondary-metrics .douyin-account-data-kpis { grid-template-columns: 1fr; }
}

/* Customer-facing copy and progressive disclosure v116 */
.system-plan-management {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 2px;
}

.settings-advanced-panel {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: var(--v3-surface-soft);
}

.settings-advanced-panel > summary {
  min-height: 50px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.settings-advanced-panel > summary::-webkit-details-marker { display: none; }
.settings-advanced-panel > summary > span { display: grid; gap: 2px; }
.settings-advanced-panel > summary strong { color: var(--v3-ink); font-size: 12px; }
.settings-advanced-panel > summary small { color: var(--v3-muted); font-size: 10px; }
.settings-advanced-panel > summary .ui-icon { width: 15px; height: 15px; color: var(--v3-muted); transition: transform .2s ease; }
.settings-advanced-panel[open] > summary .ui-icon { transform: rotate(180deg); }
.settings-advanced-body { padding: 0 14px 14px; }
.ai-settings-advanced .settings-advanced-body { padding-top: 4px; }

/* Douyin data: status-first layout with progressive disclosure. */
.route-settingsDouyin { gap: 14px; }
.douyin-connection-overview {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-color: color-mix(in srgb, var(--v3-primary) 20%, var(--v3-line));
  background: linear-gradient(135deg, var(--v3-surface) 0%, color-mix(in srgb, var(--v3-primary) 4%, var(--v3-surface)) 100%);
}
.douyin-account-summary { min-width: 0; display: flex; align-items: center; gap: 14px; }
.douyin-account-summary > img { width: 58px; height: 58px; flex: 0 0 auto; border: 3px solid var(--v3-surface); border-radius: 18px; background: var(--v3-surface-soft); box-shadow: 0 0 0 1px var(--v3-line), 0 8px 20px rgba(38, 74, 126, .1); object-fit: cover; }
.douyin-account-summary > div { min-width: 0; }
.douyin-account-summary h2 { margin: 4px 0 6px; font-size: 22px; }
.douyin-account-summary p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; color: var(--v3-muted); font-size: 11px; }
.douyin-connection-state { min-height: 27px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-weight: 850; }
.douyin-connection-state svg { width: 14px; height: 14px; }
.douyin-connection-state.is-ready { background: color-mix(in srgb, var(--v3-good) 12%, var(--v3-surface)); color: var(--v3-good); }
.douyin-connection-state.is-warning { background: color-mix(in srgb, var(--v3-warn) 12%, var(--v3-surface)); color: var(--v3-warn); }
.douyin-connection-state.is-offline { background: color-mix(in srgb, var(--v3-bad) 9%, var(--v3-surface)); color: var(--v3-bad); }
.douyin-overview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.douyin-overview-actions .v3-btn { min-height: 44px; }
.douyin-account-mismatch { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--v3-warn) 30%, var(--v3-line)); border-radius: 12px; background: color-mix(in srgb, var(--v3-warn) 7%, var(--v3-surface)); color: var(--v3-muted); font-size: 12px; }
.douyin-account-mismatch > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--v3-warn); }
.douyin-account-mismatch span { flex: 1 1 auto; }
.douyin-account-mismatch strong { color: var(--v3-ink); }
.douyin-account-mismatch-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.douyin-account-mismatch button { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--v3-line); border-radius: 9px; background: var(--v3-surface); color: var(--v3-primary); font-weight: 700; cursor: pointer; }
.douyin-account-mismatch button.is-primary { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }
.douyin-overview-foot { grid-column: 1 / -1; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--v3-line); color: var(--v3-muted); font-size: 11px; }
.douyin-overview-foot strong { color: var(--v3-ink); }
.douyin-overview-foot .v3-text-link { display: inline-flex; align-items: center; gap: 6px; }
.douyin-overview-foot svg { width: 14px; height: 14px; }

.douyin-settings-tabs { width: fit-content; max-width: 100%; padding: 4px; display: flex; gap: 4px; overflow-x: auto; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface); }
.douyin-settings-tabs button { min-width: 106px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--v3-muted); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; }
.douyin-settings-tabs button[aria-selected="true"] { background: var(--v3-primary); color: #fff; box-shadow: 0 5px 14px color-mix(in srgb, var(--v3-primary) 24%, transparent); }
.douyin-settings-tabs button:focus-visible { outline: 3px solid color-mix(in srgb, var(--v3-primary) 22%, transparent); outline-offset: 2px; }
.douyin-settings-panel[hidden] { display: none; }

.douyin-recommended-connect { display: grid; gap: 18px; }
.douyin-connect-intro { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 13px; }
.douyin-connect-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--v3-primary-soft); color: var(--v3-primary); }
.douyin-connect-icon svg { width: 21px; height: 21px; }
.douyin-connect-intro h2 { margin: 4px 0 5px; }
.douyin-connect-intro p, .douyin-permission-card header p, .douyin-advanced-card header p { margin: 0; color: var(--v3-muted); font-size: 11px; line-height: 1.65; }
.douyin-connect-steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; list-style: none; }
.douyin-connect-steps[hidden] { display: none; }
.douyin-connect-steps li { min-width: 0; min-height: 66px; padding: 12px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid var(--v3-line); border-radius: 12px; background: var(--v3-surface-soft); transition: border-color .18s ease, background .18s ease; }
.douyin-connect-steps li > b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--v3-surface); color: var(--v3-muted); font-size: 11px; box-shadow: 0 0 0 1px var(--v3-line); }
.douyin-connect-steps li > span { min-width: 0; display: grid; gap: 3px; }
.douyin-connect-steps strong { color: var(--v3-ink); font-size: 11px; }
.douyin-connect-steps em { color: var(--v3-muted); font-size: 9px; font-style: normal; line-height: 1.45; }
.douyin-connect-steps li.is-active { border-color: color-mix(in srgb, var(--v3-primary) 38%, var(--v3-line)); background: color-mix(in srgb, var(--v3-primary) 5%, var(--v3-surface)); }
.douyin-connect-steps li.is-active > b { background: var(--v3-primary); color: #fff; box-shadow: none; }
.douyin-connect-steps li.is-complete > b { background: var(--v3-good); color: #fff; box-shadow: none; }
.douyin-status-message { min-height: 44px; padding: 11px 13px; display: flex; align-items: center; border: 1px solid color-mix(in srgb, var(--v3-good) 22%, var(--v3-line)); border-radius: 11px; background: color-mix(in srgb, var(--v3-good) 4%, var(--v3-surface)); color: #436253; font-size: 11px; line-height: 1.55; }
.douyin-status-message.danger { border-color: color-mix(in srgb, var(--v3-bad) 28%, var(--v3-line)); background: color-mix(in srgb, var(--v3-bad) 4%, var(--v3-surface)); color: var(--v3-bad); }

.douyin-permission-card header, .douyin-advanced-card header { align-items: center; }
.douyin-mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.douyin-mode-options button { min-height: 86px; padding: 14px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 3px 10px; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface); color: inherit; cursor: pointer; text-align: left; }
.douyin-mode-options button > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--v3-surface-soft); color: var(--v3-muted); }
.douyin-mode-options button svg { width: 17px; height: 17px; }
.douyin-mode-options button strong { color: var(--v3-ink); font-size: 12px; }
.douyin-mode-options button em { color: var(--v3-muted); font-size: 10px; font-style: normal; }
.douyin-mode-options button > b { grid-column: 3; grid-row: 1 / 3; padding: 5px 8px; border-radius: 999px; color: var(--v3-primary); font-size: 10px; }
.douyin-mode-options button.is-selected { border-color: color-mix(in srgb, var(--v3-primary) 42%, var(--v3-line)); background: color-mix(in srgb, var(--v3-primary) 4%, var(--v3-surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v3-primary) 8%, transparent); }
.douyin-mode-options button.is-selected > span { background: var(--v3-primary-soft); color: var(--v3-primary); }
.douyin-mode-options button.is-selected > b { background: var(--v3-primary); color: #fff; }
.douyin-permission-list { margin: 16px 0; display: grid; gap: 0; border: 1px solid var(--v3-line); border-radius: 13px; overflow: hidden; }
.douyin-permission-list > div { min-height: 62px; padding: 10px 13px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--v3-line); background: var(--v3-surface); }
.douyin-permission-list > div:first-child { border-top: 0; }
.douyin-permission-list > div > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.douyin-permission-list > div > span svg { width: 15px; height: 15px; }
.douyin-permission-list > div > span.is-ready { background: color-mix(in srgb, var(--v3-good) 10%, var(--v3-surface)); color: var(--v3-good); }
.douyin-permission-list > div > span.is-pending { background: var(--v3-surface-soft); color: #8b98aa; }
.douyin-permission-list p { margin: 0; display: grid; gap: 3px; }
.douyin-permission-list p strong { color: var(--v3-ink); font-size: 11px; }
.douyin-permission-list p em { color: var(--v3-muted); font-size: 10px; font-style: normal; line-height: 1.45; }
.douyin-permission-list > div > b { padding: 5px 8px; border-radius: 999px; font-size: 9px; white-space: nowrap; }
.douyin-permission-list > div > b.is-ready { background: color-mix(in srgb, var(--v3-good) 10%, var(--v3-surface)); color: var(--v3-good); }
.douyin-permission-list > div > b.is-pending { background: var(--v3-surface-soft); color: var(--v3-muted); }

.douyin-duration-field { max-width: 360px; padding: 14px; border: 1px solid var(--v3-line); border-radius: 13px; background: var(--v3-surface-soft); }
.douyin-duration-field small { color: var(--v3-muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.douyin-manual-connect, .douyin-security-note { margin-top: 12px; background: var(--v3-surface); }
.douyin-connection-times { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.douyin-connection-times span { padding: 8px 10px; border-radius: 9px; background: var(--v3-surface-soft); color: var(--v3-muted); font-size: 10px; }
.douyin-connection-times strong { color: var(--v3-ink); }

.douyin-danger-zone { margin-top: 0; padding: 0; overflow: hidden; border-color: color-mix(in srgb, var(--v3-bad) 16%, var(--v3-line)); box-shadow: none; }
.douyin-danger-zone > summary { min-height: 56px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.douyin-danger-zone > summary::-webkit-details-marker { display: none; }
.douyin-danger-zone > summary > span { display: flex; align-items: center; gap: 10px; }
.douyin-danger-zone > summary > span > svg { width: 18px; color: var(--v3-bad); }
.douyin-danger-zone > summary > span > span { display: grid; gap: 2px; }
.douyin-danger-zone summary strong { color: var(--v3-ink); font-size: 12px; }
.douyin-danger-zone summary small { color: var(--v3-muted); font-size: 10px; }
.douyin-danger-zone > summary > svg { width: 16px; color: var(--v3-muted); transition: transform .18s ease; }
.douyin-danger-zone[open] > summary > svg { transform: rotate(180deg); }
.douyin-danger-body { padding: 0 16px 16px; border-top: 1px solid var(--v3-line); }
.douyin-danger-body p { margin: 14px 0 0; color: var(--v3-muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 820px) {
  .douyin-connection-overview { grid-template-columns: 1fr; }
  .douyin-overview-actions { justify-content: flex-start; }
  .douyin-connect-steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .douyin-connection-overview { padding: 17px; gap: 16px; }
  .douyin-account-summary { align-items: flex-start; }
  .douyin-account-summary > img { width: 50px; height: 50px; border-radius: 15px; }
  .douyin-account-summary h2 { font-size: 19px; }
  .douyin-account-summary p { display: grid; gap: 6px; }
  .douyin-overview-actions { display: grid; grid-template-columns: 1fr; }
  .douyin-overview-actions .v3-btn { width: 100%; }
  .douyin-account-mismatch { align-items: flex-start; flex-wrap: wrap; }
  .douyin-account-mismatch-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .douyin-account-mismatch button { width: 100%; }
  .douyin-overview-foot { align-items: flex-start; flex-direction: column; }
  .douyin-settings-tabs { width: 100%; }
  .douyin-settings-tabs button { min-width: 92px; flex: 1 0 auto; padding: 0 12px; }
  .douyin-mode-options { grid-template-columns: 1fr; }
  .douyin-permission-list > div { grid-template-columns: 30px minmax(0, 1fr); }
  .douyin-permission-list > div > b { grid-column: 2; justify-self: start; }
  .douyin-danger-body .v3-card-actions { display: grid; }
  .douyin-danger-body .v3-btn { width: 100%; }
}

.cloud-qr-test-card {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--v3-primary) 22%, var(--v3-line));
  border-radius: 13px;
  background: var(--v3-surface);
}
.cloud-qr-test-card > div { min-width: 0; display: grid; gap: 4px; }
.cloud-qr-test-card strong { color: var(--v3-ink); font-size: 13px; }
.cloud-qr-test-card span { color: var(--v3-muted); font-size: 11px; line-height: 1.6; }
.cloud-qr-test-card > button { flex: 0 0 auto; }
.cloud-qr-test-stage {
  margin-top: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--v3-line);
  border-radius: 13px;
  background: var(--v3-surface);
}
.cloud-qr-test-stage[hidden] { display: none; }
.cloud-qr-test-viewport {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 11px;
  background: #f8fafc;
  color: var(--v3-muted);
  font-size: 11px;
}
.cloud-qr-test-image-frame { position: relative; width: 100%; display: grid; place-items: center; }
.cloud-qr-test-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 900;
  max-height: 720px;
  overflow: hidden;
  background: #f8fafc;
  outline: 2px solid color-mix(in srgb, var(--v3-primary) 45%, transparent);
  outline-offset: -2px;
  touch-action: none;
}
.cloud-qr-test-screen[hidden] { display: none; }
.cloud-qr-test-screen[data-interaction-mode="page"] {
  pointer-events: none;
  touch-action: pan-y;
}
.cloud-qr-test-screen[data-interaction-mode="remote"] {
  pointer-events: auto;
  touch-action: none;
}
.cloud-qr-test-screen canvas { max-width: 100%; max-height: 100%; }
.cloud-qr-test-screen[data-connection="connected"] { cursor: default; }
.cloud-qr-test-screen[data-connection="failed"] { outline-color: color-mix(in srgb, var(--v3-bad) 55%, transparent); }
.cloud-qr-test-viewport img { width: 100%; height: auto; max-height: 620px; display: block; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.cloud-qr-test-viewport img[data-clickable="true"] {
  cursor: pointer;
  outline: 2px solid color-mix(in srgb, var(--v3-primary) 55%, transparent);
  outline-offset: -2px;
}
.cloud-qr-test-viewport > span[hidden] { display: none; }
.cloud-qr-test-viewport > span {
  max-width: 360px;
  padding: 22px 26px;
  border: 1px solid color-mix(in srgb, var(--v3-primary) 16%, var(--v3-line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--v3-primary) 4%, #fff);
  color: var(--v3-ink);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.65;
  text-align: center;
}
.cloud-qr-test-viewport > span[data-status="success"] {
  border-color: color-mix(in srgb, var(--v3-good) 28%, var(--v3-line));
  color: var(--v3-good);
}
.cloud-qr-test-viewport > span[data-status="error"],
.cloud-qr-test-viewport > span[data-status="timeout"] {
  border-color: color-mix(in srgb, var(--v3-bad) 28%, var(--v3-line));
  color: var(--v3-bad);
}
.cloud-qr-interaction-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--v3-primary) 35%, var(--v3-line));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--v3-primary);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.cloud-qr-interaction-toggle[hidden] { display: none; }
.cloud-qr-interaction-toggle[data-mode="remote"] {
  border-color: color-mix(in srgb, var(--v3-bad) 32%, var(--v3-line));
  color: var(--v3-bad);
}
.cloud-qr-interaction-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--v3-primary) 22%, transparent);
  outline-offset: 2px;
}
.cloud-qr-test-copy { display: grid; gap: 10px; }
.cloud-qr-test-copy .notice { margin: 0; }
.cloud-qr-test-copy .notice[data-status="success"] { border-color: color-mix(in srgb, var(--v3-good) 32%, var(--v3-line)); color: var(--v3-good); }
.cloud-qr-test-copy .notice[data-status="error"],
.cloud-qr-test-copy .notice[data-status="timeout"] { border-color: color-mix(in srgb, var(--v3-bad) 32%, var(--v3-line)); color: var(--v3-bad); }
.cloud-qr-test-copy .notice[data-status="verification_required"] { border-color: color-mix(in srgb, var(--v3-warn) 38%, var(--v3-line)); color: var(--v3-warn); }
.cloud-qr-test-inputs { margin: 0; }
.cloud-qr-test-inputs[hidden] { display: none; }
.cloud-qr-test-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cloud-qr-test-controls p { margin: 0; }
.cloud-qr-test-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cloud-qr-test-input-row input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
  color: var(--v3-ink);
  font: inherit;
}
.cloud-qr-test-input-row input:focus { border-color: var(--v3-primary); outline: 3px solid color-mix(in srgb, var(--v3-primary) 14%, transparent); }

@media (max-width: 620px) {
  .system-plan-management { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cloud-qr-test-card { align-items: stretch; flex-direction: column; }
  .cloud-qr-test-card > button { align-self: flex-start; }
  .cloud-qr-test-controls { align-items: flex-start; flex-direction: column; }
}

/* Centered floating Agent composer v117 */
.route-review .agent-chat-composer {
  max-height: 360px;
  padding: 18px clamp(18px, 3vw, 42px) 22px;
  overflow-y: auto;
  border-top: 0;
  background: transparent;
}

.route-review .agent-chat-quick {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto 10px;
}

.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto;
  padding: 14px 14px 11px;
  gap: 10px;
  box-sizing: border-box;
  border: 1px solid #e1e5ec;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(28, 42, 68, .13), 0 3px 10px rgba(28, 42, 68, .05);
  transform: translateY(0);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.route-review .agent-chat-input-wrap:focus-within {
  border-color: #b9c9e8;
  box-shadow: 0 22px 54px rgba(28, 52, 98, .16), 0 0 0 3px rgba(49, 102, 207, .07);
  transform: translateY(-1px);
}

.route-review .agent-chat-input-wrap textarea,
.route-review.is-agent-workspace .agent-chat-input-wrap textarea {
  min-height: 46px;
  max-height: 180px;
  padding: 3px 0 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #26344c;
  font-size: 14px;
  line-height: 1.55;
}

.route-review .agent-chat-input-wrap textarea:focus {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.route-review .agent-chat-input-wrap textarea::placeholder {
  color: #a0a8b5;
}

.route-review .agent-chat-toolbar {
  min-height: 38px;
  padding-top: 0;
  gap: 14px;
}

.route-review .agent-chat-tools {
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.route-review .agent-chat-add,
.route-review .agent-model-select,
.route-review .agent-web-toggle {
  min-height: 34px;
  border-radius: 10px;
  color: #5f6c7e;
}

.route-review .agent-chat-add { padding-inline: 7px 9px; }
.route-review .agent-model-select { min-width: 92px; padding-inline: 7px 26px; }
.route-review .agent-web-toggle { padding-inline: 7px 9px; }

.route-review .agent-chat-add:hover,
.route-review .agent-model-select:hover,
.route-review .agent-model-select:focus-within,
.route-review .agent-web-toggle:hover:not(:disabled) {
  border-color: transparent;
  background: #f4f6fa;
  box-shadow: none;
  transform: none;
}

.route-review .agent-chat-send {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 50%;
  background: #2162cc;
  box-shadow: 0 8px 20px rgba(33, 98, 204, .22);
}

.route-review .agent-chat-send:not(:disabled):hover {
  transform: translateY(-2px);
  filter: none;
  background: #1758c2;
  box-shadow: 0 12px 24px rgba(33, 98, 204, .28);
}

.route-review .agent-chat-send:disabled {
  border: 0;
  background: #a7abb2;
  box-shadow: none;
  opacity: .8;
}

.route-review .agent-chat-service-note.is-ready { display: none; }

@media (min-width: 1181px) {
  .route-review.is-agent-workspace .agent-chat-composer {
    padding: 18px 20px 22px;
  }

  .route-review.is-agent-workspace .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-quick {
    width: min(780px, calc(100% - 36px));
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-quick {
    width: calc(100% - 12px);
  }
}

@media (max-width: 760px) {
  .route-review.is-agent-workspace .agent-chat-shell,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact.is-session-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .route-review .agent-chat-composer {
    max-height: 250px;
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
  }

  .route-review .agent-chat-input-wrap,
  .route-review .agent-chat-quick,
  .route-review.is-agent-workspace .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-quick {
    width: 100%;
  }

  .route-review .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-input-wrap {
    padding: 11px 10px 8px;
    border-radius: 17px;
    box-shadow: 0 13px 34px rgba(28, 42, 68, .14), 0 2px 8px rgba(28, 42, 68, .05);
  }

  .route-review .agent-chat-input-wrap textarea,
  .route-review.is-agent-workspace .agent-chat-input-wrap textarea {
    min-height: 44px;
    max-height: 120px;
    padding: 2px 2px 0;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .route-review .agent-chat-toolbar { gap: 6px; }
  .route-review .agent-chat-tools { gap: 1px; }
  .route-review .agent-web-toggle strong { display: none; }
  .route-review .agent-chat-send { width: 38px; min-width: 38px; min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-chat-input-wrap,
  .route-review .agent-chat-send { transition: none; }
  .route-review .agent-chat-input-wrap:focus-within,
  .route-review .agent-chat-send:not(:disabled):hover { transform: none; }
}

/* Semi-floating Agent composer v118 */
.route-review .agent-chat-messages {
  scroll-padding-bottom: 20px;
}

.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  max-height: 320px;
  padding: 12px clamp(18px, 2.2vw, 34px) 15px;
  background: linear-gradient(180deg, rgba(251, 252, 254, 0) 0%, rgba(251, 252, 254, .88) 28%, #fbfcfe 100%);
}

.route-review .agent-chat-quick,
.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-quick,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  width: min(900px, calc(100% - 64px));
}

.route-review .agent-chat-quick {
  margin-bottom: 8px;
}

.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  min-height: 98px;
  padding: 10px 13px 8px;
  gap: 7px;
  border-color: #e2e7ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(28, 42, 68, .08), 0 1px 4px rgba(28, 42, 68, .04);
}

.route-review .agent-chat-input-wrap:focus-within {
  border-color: #c8d4e8;
  box-shadow: 0 10px 28px rgba(28, 52, 98, .10), 0 0 0 3px rgba(49, 102, 207, .055);
  transform: translateY(-1px);
}

.route-review .agent-chat-input-wrap textarea,
.route-review.is-agent-workspace .agent-chat-input-wrap textarea {
  min-height: 36px;
  padding: 2px 1px 0;
}

.route-review .agent-chat-toolbar {
  min-height: 36px;
  gap: 10px;
}

.route-review .agent-chat-add,
.route-review .agent-model-select,
.route-review .agent-web-toggle {
  min-height: 32px;
}

.route-review .agent-chat-send {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  box-shadow: 0 6px 16px rgba(33, 98, 204, .18);
}

.route-review .agent-chat-to-latest {
  bottom: 112px;
}

@media (min-width: 1181px) {
  .route-review.is-agent-workspace .agent-chat-composer {
    padding: 12px 20px 15px;
  }

  .route-review.is-agent-workspace .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-quick {
    width: min(900px, calc(100% - 52px));
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-quick {
    width: calc(100% - 12px);
  }
}

@media (max-width: 760px) {
  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    max-height: 240px;
    padding: 8px 9px calc(10px + env(safe-area-inset-bottom));
  }

  .route-review .agent-chat-quick,
  .route-review .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-quick,
  .route-review.is-agent-workspace .agent-chat-input-wrap {
    width: 100%;
  }

  .route-review .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-input-wrap {
    min-height: 92px;
    padding: 9px 9px 7px;
    border-radius: 15px;
    box-shadow: 0 7px 20px rgba(28, 42, 68, .09), 0 1px 3px rgba(28, 42, 68, .04);
  }

  .route-review .agent-chat-to-latest {
    right: 12px;
    bottom: 102px;
  }
}

/* Transparent floating Agent composer and concise web status v119 */
.route-review .agent-chat-panel {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
}

.route-review .agent-chat-messages,
.route-review.is-agent-workspace .agent-chat-messages {
  padding-bottom: calc(var(--agent-composer-clearance, 126px) + 18px);
  scroll-padding-bottom: calc(var(--agent-composer-clearance, 126px) + 18px);
}

.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  border-top: 0;
  background: transparent;
  pointer-events: none;
}

.route-review .agent-chat-quick,
.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-quick,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  pointer-events: auto;
}

.route-review .agent-web-toggle.is-active {
  border-color: #adc8ee;
  background: #f3f7ff;
  color: #185fbd;
  box-shadow: 0 4px 13px rgba(38, 96, 193, .09);
  animation: agent-web-ready-breathe 2.8s ease-in-out infinite;
}

.route-review .agent-web-toggle.is-active .agent-tool-icon {
  color: #1aa06f;
  animation: agent-web-link-float 1.9s ease-in-out infinite;
}

@keyframes agent-web-ready-breathe {
  0%, 100% { box-shadow: 0 4px 13px rgba(38, 96, 193, .07); }
  50% { box-shadow: 0 5px 17px rgba(38, 96, 193, .14); }
}

@keyframes agent-web-link-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@media (max-width: 760px) {
  .route-review .agent-chat-messages,
  .route-review.is-agent-workspace .agent-chat-messages {
    padding-bottom: calc(var(--agent-composer-clearance, 116px) + 14px);
    scroll-padding-bottom: calc(var(--agent-composer-clearance, 116px) + 14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-web-toggle.is-active,
  .route-review .agent-web-toggle.is-active .agent-tool-icon {
    animation: none;
  }
}

/* Anchored model menu and persistent web label v120 */
.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap,
.route-review .agent-chat-input-wrap:focus-within,
.route-review.is-agent-workspace .agent-chat-input-wrap:focus-within {
  transform: none;
}

.route-review .agent-web-toggle strong,
.route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-web-toggle strong {
  display: inline;
  white-space: nowrap;
}

.route-review .agent-web-toggle.is-active {
  border-color: #9fd9c2;
  background: #effaf5;
  color: #137a55;
  box-shadow: 0 4px 13px rgba(24, 143, 98, .10);
  animation-name: agent-web-ready-green;
}

.route-review .agent-web-toggle.is-active .agent-tool-icon {
  color: #159568;
}

@keyframes agent-web-ready-green {
  0%, 100% { box-shadow: 0 4px 13px rgba(24, 143, 98, .08); }
  50% { box-shadow: 0 5px 18px rgba(24, 143, 98, .17); }
}

/* Reliable Agent submit feedback and real usage details v121 */
.route-review .agent-chat-send.is-submitting,
.route-review .agent-chat-send.is-submitting:disabled {
  position: relative;
  border-color: #b9cff3;
  background: #edf4ff;
  color: #2367cf;
  opacity: 1;
  box-shadow: 0 5px 16px rgba(35, 103, 207, .12);
}

.route-review .agent-chat-send.is-submitting::before { display: none; }

.route-review .agent-chat-send.is-submitting::after {
  position: absolute;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 2px solid rgba(35, 103, 207, .16);
  border-top-color: #2367cf;
  border-radius: 50%;
  content: "";
  animation: agent-submit-orbit .9s linear infinite;
}

.route-review .agent-chat-send.is-submitting .ui-icon {
  width: 14px;
  height: 14px;
  animation: agent-submit-pulse 1.15s ease-in-out infinite;
}

.project-agent-send.is-submitting,
.project-agent-send.is-submitting:disabled {
  opacity: .78;
  cursor: wait;
  box-shadow: 0 0 0 4px rgba(33, 96, 214, .09);
  animation: agent-project-submit-pulse 1.15s ease-in-out infinite;
}

.route-review .agent-chat-message.is-client-pending .agent-chat-bubble {
  border-color: #cbdaf4;
  background: #f1f6ff;
}

.agent-client-pending-state {
  display: inline-flex;
  min-width: 26px;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.agent-client-pending-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4e7fd2;
  animation: agent-submit-dot 1.05s ease-in-out infinite;
}

.agent-client-pending-state i:nth-child(2) { animation-delay: .14s; }
.agent-client-pending-state i:nth-child(3) { animation-delay: .28s; }

@keyframes agent-submit-orbit { to { transform: rotate(360deg); } }
@keyframes agent-submit-pulse { 0%, 100% { opacity: .65; transform: translateX(0); } 50% { opacity: 1; transform: translateX(1px); } }
@keyframes agent-submit-dot { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
@keyframes agent-project-submit-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }

.system-agent-usage-facts {
  display: grid;
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #fff;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-agent-usage-facts > span {
  display: grid;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid #e5eaf2;
  gap: 4px;
}

.system-agent-usage-facts > span:last-child { border-right: 0; }
.system-agent-usage-facts small { color: var(--v3-muted); font-size: 9px; }
.system-agent-usage-facts strong { overflow: hidden; color: var(--v3-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .system-agent-usage-facts { grid-template-columns: 1fr; }
  .system-agent-usage-facts > span { border-right: 0; border-bottom: 1px solid #e5eaf2; }
  .system-agent-usage-facts > span:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-chat-send.is-submitting::after,
  .route-review .agent-chat-send.is-submitting .ui-icon,
  .project-agent-send.is-submitting,
  .agent-client-pending-state i { animation: none; }
}

/* Calm composer focus and softly feathered bottom glass v124 */
.route-review .agent-chat-input-wrap:focus-within,
.route-review.is-agent-workspace .agent-chat-input-wrap:focus-within {
  border-color: #e2e7ef;
  box-shadow: 0 8px 24px rgba(28, 42, 68, .08), 0 1px 4px rgba(28, 42, 68, .04);
  transform: none;
}

.route-review .agent-chat-input-wrap textarea:focus,
.route-review .agent-chat-input-wrap textarea:focus-visible,
.route-review.is-agent-workspace .agent-chat-input-wrap textarea:focus,
.route-review.is-agent-workspace .agent-chat-input-wrap textarea:focus-visible {
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.route-review .agent-chat-composer::before,
.route-review.is-agent-workspace .agent-chat-composer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -48px;
  right: -24px;
  bottom: -4px;
  left: -24px;
  pointer-events: none;
  background: rgba(248, 250, 253, .28);
  box-shadow: 0 -12px 30px rgba(248, 250, 253, .42);
  -webkit-backdrop-filter: blur(9px) saturate(106%);
  backdrop-filter: blur(9px) saturate(106%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .14) 24%, rgba(0, 0, 0, .72) 58%, #000 82%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .14) 24%, rgba(0, 0, 0, .72) 58%, #000 82%);
}

.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  z-index: 2;
  overflow: visible;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .route-review .agent-chat-composer::before,
  .route-review.is-agent-workspace .agent-chat-composer::before {
    background: rgba(248, 250, 253, .76);
  }
}

@media (max-width: 760px) {
  .route-review .agent-chat-composer::before,
  .route-review.is-agent-workspace .agent-chat-composer::before {
    top: -34px;
    right: -14px;
    left: -14px;
    -webkit-backdrop-filter: blur(7px) saturate(104%);
    backdrop-filter: blur(7px) saturate(104%);
  }
}

/* Knowledge tree v157: one Obsidian-style tree and one reading surface. */
.v3-shell .knowledge-manager-grid.is-tree-layout {
  min-height: 680px;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  overflow: clip;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  background: var(--v3-surface);
  box-shadow: var(--v3-shadow);
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
  position: sticky;
  top: 18px;
  width: auto;
  height: min(760px, calc(100vh - 36px));
  min-height: 520px;
  grid-column: auto;
  padding: 12px 10px;
  overflow: hidden auto;
  border: 0;
  border-right: 1px solid #e5e9ef;
  border-radius: 0;
  background: #f7f8fa;
  box-shadow: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bcc8d8 transparent;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.can-scroll-up {
  box-shadow: inset 0 13px 12px -15px rgba(47, 65, 89, .46);
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.can-scroll-down {
  box-shadow: inset 0 -13px 12px -15px rgba(47, 65, 89, .46);
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.can-scroll-up.can-scroll-down {
  box-shadow: inset 0 13px 12px -15px rgba(47, 65, 89, .46), inset 0 -13px 12px -15px rgba(47, 65, 89, .46);
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.is-scrolling-up {
  background-color: #f6f8fb;
  box-shadow: inset 0 17px 15px -17px rgba(37, 99, 235, .48), inset 0 -13px 12px -15px rgba(47, 65, 89, .38);
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.is-scrolling-down {
  background-color: #f6f8fb;
  box-shadow: inset 0 13px 12px -15px rgba(47, 65, 89, .38), inset 0 -17px 15px -17px rgba(37, 99, 235, .48);
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel::-webkit-scrollbar {
  width: 8px;
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel::-webkit-scrollbar-track {
  background: transparent;
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel::-webkit-scrollbar-thumb {
  border: 2px solid #f7f8fa;
  border-radius: 999px;
  background: transparent;
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel:hover::-webkit-scrollbar-thumb,
.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel:focus-within::-webkit-scrollbar-thumb,
.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.is-scrolling::-webkit-scrollbar-thumb {
  background: #7798c3;
}

.v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-editor-panel {
  min-width: 0;
  min-height: 680px;
  padding: 22px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.v3-shell .knowledge-tree-head {
  min-height: 52px;
  padding: 5px 7px 11px;
  gap: 9px;
}

.v3-shell .knowledge-tree-head > span {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.v3-shell .knowledge-tree-head strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-shell .knowledge-tree-head em {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-shell .knowledge-tree-search {
  height: 34px;
  margin: 9px 3px 6px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  background: #fff;
  color: #8b96a5;
}

.v3-shell .knowledge-tree-search:focus-within {
  border-color: #a9bdd6;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .08);
}

.v3-shell .knowledge-tree-search svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.v3-shell .knowledge-tree-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 10px;
}

.v3-shell .knowledge-tree-groups {
  padding: 5px 0 7px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.v3-shell .knowledge-tree-panel.is-scrolling-up .knowledge-tree-groups {
  animation: knowledge-tree-scroll-up .18s ease-out;
}

.v3-shell .knowledge-tree-panel.is-scrolling-down .knowledge-tree-groups {
  animation: knowledge-tree-scroll-down .18s ease-out;
}

@keyframes knowledge-tree-scroll-up {
  from { transform: translateY(-1px); }
  to { transform: translateY(0); }
}

@keyframes knowledge-tree-scroll-down {
  from { transform: translateY(1px); }
  to { transform: translateY(0); }
}

.v3-shell .knowledge-tree-group {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.v3-shell .knowledge-tree-group .knowledge-tree-branch,
.v3-shell .knowledge-tree-group .knowledge-tree-owner-row,
.v3-shell .knowledge-tree-group .knowledge-tree-toggle,
.v3-shell .knowledge-tree-group .knowledge-tree-node,
.v3-shell .knowledge-tree-group .knowledge-tree-document,
.v3-shell .knowledge-tree-group .knowledge-tree-more {
  width: 100%;
  border: 0;
  background: transparent;
  color: #526071;
  cursor: pointer;
  text-align: left;
}

.v3-shell .knowledge-tree-group .knowledge-tree-branch {
  min-height: 32px;
  padding: 5px 7px 5px 3px;
  display: grid;
  grid-template-columns: 14px 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.v3-shell .knowledge-tree-group .knowledge-tree-branch:hover,
.v3-shell .knowledge-tree-group .knowledge-tree-owner-row:hover,
.v3-shell .knowledge-tree-folder-row:hover,
.v3-shell .knowledge-tree-group .knowledge-tree-document:hover {
  background: #eef1f5;
  color: #27364a;
}

.v3-shell .knowledge-tree-group .knowledge-tree-branch > i {
  display: grid;
  place-items: center;
  transition: transform .16s ease;
}

.v3-shell .knowledge-tree-group:not(.is-open) .knowledge-tree-branch > i {
  transform: rotate(-90deg);
}

.v3-shell .knowledge-tree-group .knowledge-tree-branch svg,
.v3-shell .knowledge-tree-group .knowledge-tree-owner-row svg,
.v3-shell .knowledge-tree-group .knowledge-tree-toggle svg,
.v3-shell .knowledge-tree-group .knowledge-tree-node svg,
.v3-shell .knowledge-tree-group .knowledge-tree-document svg {
  width: 13px;
  height: 13px;
}

.v3-shell .knowledge-tree-group .knowledge-tree-branch b,
.v3-shell .knowledge-tree-group .knowledge-tree-owner-row b,
.v3-shell .knowledge-tree-group .knowledge-tree-node b {
  min-width: 18px;
  color: #95a0af;
  font-size: 9px;
  text-align: right;
}

.v3-shell .knowledge-tree-branch-body {
  display: none;
}

.v3-shell .knowledge-tree-group.is-open > .knowledge-tree-branch-body {
  display: block;
}

.v3-shell .knowledge-tree-owner-row {
  min-height: 31px;
  padding: 4px 7px 4px 10px;
  display: grid;
  grid-template-columns: 13px 13px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 720;
}

.v3-shell .knowledge-tree-owner-row > i {
  display: grid;
  place-items: center;
  transition: transform .16s ease;
}

.v3-shell .knowledge-tree-owner:not(.is-open) > .knowledge-tree-owner-row > i {
  transform: rotate(-90deg);
}

.v3-shell .knowledge-tree-owner-body {
  max-height: 0;
  margin-left: 16px;
  padding-left: 7px;
  overflow: hidden;
  border-left: 1px solid #d9dee7;
  opacity: 0;
  transition: max-height .17s ease, opacity .13s ease;
}

.v3-shell .knowledge-tree-owner.is-open > .knowledge-tree-owner-body {
  max-height: 2400px;
  opacity: 1;
}

.v3-shell .knowledge-tree-folder-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px;
  align-items: center;
  border-radius: 7px;
  transition: background-color .14s ease, color .14s ease;
}

.v3-shell .knowledge-tree-create {
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7b90;
  cursor: pointer;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .14s ease, transform .14s ease, background-color .14s ease, color .14s ease;
}

.v3-shell .knowledge-tree-create svg { width: 14px; height: 14px; }
.v3-shell .knowledge-tree-folder-row:hover .knowledge-tree-create,
.v3-shell .knowledge-tree-folder-row.active .knowledge-tree-create,
.v3-shell .knowledge-tree-create:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.v3-shell .knowledge-tree-create:hover,
.v3-shell .knowledge-tree-create:focus-visible {
  background: #dbe7f7;
  color: #225caa;
  outline: none;
}

.v3-shell .knowledge-tree-group .knowledge-tree-toggle {
  width: 28px;
  height: 30px;
  padding: 0 2px 0 13px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #97a2b0;
}

.v3-shell .knowledge-tree-group .knowledge-tree-toggle > i {
  display: grid;
  place-items: center;
  transition: transform .16s ease;
}

.v3-shell .knowledge-tree-category:not(.is-open) > .knowledge-tree-folder-row .knowledge-tree-toggle > i,
.v3-shell .knowledge-tree-account:not(.is-open) > .knowledge-tree-folder-row .knowledge-tree-toggle > i {
  transform: rotate(-90deg);
}

.v3-shell .knowledge-tree-group .knowledge-tree-node {
  min-height: 30px;
  padding: 4px 7px 4px 1px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: 0 7px 7px 0;
  font-size: 10px;
}

.v3-shell .knowledge-tree-group .knowledge-tree-folder-row.active {
  background: #e7eef8;
  color: #225caa;
  font-weight: 800;
}

.v3-shell .knowledge-tree-group .knowledge-tree-node.active {
  background: transparent;
  color: #225caa;
  font-weight: 800;
}

.v3-shell .knowledge-tree-accounts {
  margin: 0;
  padding: 0;
  border: 0;
}

.v3-shell .knowledge-tree-documents-shell {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .17s ease, opacity .13s ease;
}

.v3-shell .knowledge-tree-category.is-open > .knowledge-tree-documents-shell,
.v3-shell .knowledge-tree-account.is-open > .knowledge-tree-documents-shell {
  grid-template-rows: 1fr;
  opacity: 1;
}

.v3-shell .knowledge-tree-documents {
  min-height: 0;
  margin-left: 23px;
  padding: 2px 0 3px 9px;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-left: 1px solid #d9dee7;
}

.v3-shell .knowledge-tree-document-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  border-radius: 6px;
}

.v3-shell .knowledge-tree-document-row:hover,
.v3-shell .knowledge-tree-document-row:focus-within {
  background: #eef1f5;
}

.v3-shell .knowledge-tree-group .knowledge-tree-document {
  min-height: 28px;
  padding: 4px 7px;
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 550;
}

.v3-shell .knowledge-tree-group .knowledge-tree-document em {
  padding: 2px 4px;
  border-radius: 999px;
  background: #fff1cf;
  color: #8a5b00;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.v3-shell .knowledge-tree-document-row.is-excluded .knowledge-tree-document {
  color: #7a8492;
}

.v3-shell .knowledge-tree-document-menu-toggle,
.v3-shell .knowledge-tree-document-protected {
  width: 23px;
  height: 23px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8b97a6;
}

.v3-shell .knowledge-tree-document-menu-toggle {
  cursor: pointer;
  opacity: 0;
}

.v3-shell .knowledge-tree-document-row:hover .knowledge-tree-document-menu-toggle,
.v3-shell .knowledge-tree-document-row:focus-within .knowledge-tree-document-menu-toggle,
.v3-shell .knowledge-tree-document-menu-toggle[aria-expanded="true"] {
  opacity: 1;
}

.v3-shell .knowledge-tree-document-menu-toggle:hover,
.v3-shell .knowledge-tree-document-menu-toggle:focus-visible {
  background: #dbe7f7;
  color: #225caa;
  outline: none;
}

.v3-shell .knowledge-tree-document-menu-toggle svg,
.v3-shell .knowledge-tree-document-protected svg {
  width: 13px;
  height: 13px;
}

.v3-shell .knowledge-tree-document-menu {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 1px 2px 5px 19px;
  padding: 5px;
  display: none;
  gap: 2px;
  border: 1px solid #dde3eb;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}

.v3-shell .knowledge-tree-document-menu.is-open { display: grid; }
.v3-shell .knowledge-tree-document-menu button {
  min-height: 29px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #445166;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}
.v3-shell .knowledge-tree-document-menu button:hover { background: #f0f4f8; }
.v3-shell .knowledge-tree-document-menu button.is-danger { color: #b33a3a; }
.v3-shell .knowledge-tree-document-menu button.is-danger:hover { background: #fff0f0; }

.v3-shell .knowledge-tree-group .knowledge-tree-document span,
.v3-shell .knowledge-tree-group .knowledge-tree-node span,
.v3-shell .knowledge-tree-group .knowledge-tree-owner-row span,
.v3-shell .knowledge-tree-group .knowledge-tree-branch span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-shell .knowledge-tree-group .knowledge-tree-document.active {
  background: #dce8f7;
  color: #174f99;
  font-weight: 800;
  animation: knowledge-tree-file-open .22s ease-out;
}

.v3-shell .knowledge-tree-group .knowledge-tree-document.is-opening {
  background: #e7eef8;
  color: #225caa;
}

@keyframes knowledge-tree-file-open {
  from { transform: translateX(2px); opacity: .78; }
  to { transform: translateX(0); opacity: 1; }
}

.v3-shell .knowledge-document-loading .knowledge-editor-panel {
  opacity: .72;
  transition: opacity .16s ease;
}

.v3-shell .knowledge-tree-group .knowledge-tree-more {
  min-height: 26px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #708095;
  font-size: 9px;
}

.v3-shell .knowledge-tree-empty {
  min-height: 27px;
  padding: 6px 8px 6px 31px;
  display: block;
  color: #9aa4b2;
  font-size: 9px;
}

.v3-shell .knowledge-tree-empty.is-error {
  color: #a15c35;
}

@media (min-width: 1101px) {
  .v3-shell.is-knowledge-route .v3-scroll-region {
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .v3-shell.is-knowledge-route .content.route-production {
    height: auto;
    min-height: 100%;
    padding-bottom: 64px;
    overflow: visible;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout {
    min-height: 680px;
    height: auto;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
    position: sticky;
    top: 18px;
    height: min(760px, calc(100dvh - 36px));
    min-height: 520px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel:hover,
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel:focus-within,
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel.is-scrolling {
    scrollbar-color: #7798c3 transparent;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-editor-panel {
    height: auto;
    min-height: 680px;
    overflow: visible;
    overscroll-behavior: auto;
    touch-action: pan-y;
  }
}

.v3-shell .knowledge-tree-trash {
  margin: 7px 3px 0;
  padding-top: 7px;
  border-top: 1px solid #e2e6ec;
}

.v3-shell .knowledge-tree-trash summary {
  min-height: 31px;
  padding: 5px 6px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  color: #667386;
  cursor: pointer;
  font-size: 10px;
  list-style: none;
}

.v3-shell .knowledge-tree-trash summary::-webkit-details-marker { display: none; }
.v3-shell .knowledge-tree-trash summary svg { width: 13px; height: 13px; }
.v3-shell .knowledge-tree-trash summary b { font-size: 9px; }
.v3-shell .knowledge-tree-trash > div { padding: 5px; display: grid; gap: 5px; }
.v3-shell .knowledge-tree-trash article { padding: 7px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-radius: 7px; background: #fff; }
.v3-shell .knowledge-tree-trash article span { min-width: 0; display: grid; gap: 2px; }
.v3-shell .knowledge-tree-trash article strong,
.v3-shell .knowledge-tree-trash article em { overflow: hidden; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.v3-shell .knowledge-tree-trash article em { color: #94a3b8; }

.v3-shell .knowledge-folder-view {
  width: min(100%, 980px);
  margin: 0 auto;
}

.v3-shell .knowledge-folder-view > header {
  padding: 4px 4px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e9edf2;
}

.v3-shell .knowledge-folder-view > header > div:first-child { min-width: 0; }
.v3-shell .knowledge-folder-view > header .v3-card-actions { flex: 0 0 auto; }

.v3-shell .knowledge-folder-view > header span {
  color: #718096;
  font-size: 10px;
  font-weight: 750;
}

.v3-shell .knowledge-folder-view > header h2 {
  margin: 5px 0 4px;
  color: #1f2937;
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.22;
}

.v3-shell .knowledge-folder-view > header p {
  margin: 0;
  color: #8490a0;
  font-size: 10px;
}

.v3-shell .knowledge-folder-list {
  display: grid;
}

.v3-shell .knowledge-folder-row {
  width: 100%;
  min-height: 58px;
  padding: 9px 6px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  color: #334155;
  cursor: pointer;
  text-align: left;
}

.v3-shell .knowledge-folder-row:hover {
  background: #f7f9fb;
}

.v3-shell .knowledge-folder-row.is-excluded {
  background: #fffaf0;
}

.v3-shell .knowledge-folder-row.is-excluded strong { color: #6e7580; }
.v3-shell .knowledge-folder-row.is-excluded em { color: #8a5b00; }

.v3-shell .knowledge-folder-row > svg {
  width: 16px;
  height: 16px;
  color: #728197;
}

.v3-shell .knowledge-folder-row > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.v3-shell .knowledge-folder-row strong,
.v3-shell .knowledge-folder-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-shell .knowledge-folder-row strong { font-size: 12px; }
.v3-shell .knowledge-folder-row em { color: #8692a3; font-size: 9px; font-style: normal; }
.v3-shell .knowledge-folder-row small { display: flex; align-items: center; gap: 10px; color: #8d98a7; font-size: 9px; }
.v3-shell .knowledge-folder-row time { white-space: nowrap; }

.v3-shell .knowledge-folder-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 5px;
  color: #8b97a6;
  text-align: center;
}

.v3-shell .knowledge-folder-empty strong { color: #4b5563; font-size: 14px; }
.v3-shell .knowledge-folder-empty span { font-size: 10px; }
.v3-shell .knowledge-folder-empty .v3-btn { margin: 12px auto 0; }

.knowledge-safety-dialog { display: grid; gap: 16px; }
.knowledge-safety-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 12px; }
.knowledge-safety-summary > svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: #fff3d8; color: #a56500; }
.knowledge-safety-summary > div { display: grid; gap: 5px; }
.knowledge-safety-summary strong { color: #172033; font-size: 15px; line-height: 1.45; }
.knowledge-safety-summary span { color: #6c7889; font-size: 11px; line-height: 1.6; }
.knowledge-safety-impact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.knowledge-safety-impact article { padding: 11px; display: grid; gap: 5px; border: 1px solid #e7ebf0; border-radius: 10px; background: #f8fafc; }
.knowledge-safety-impact span { color: #7b8798; font-size: 10px; }
.knowledge-safety-impact strong { color: #263449; font-size: 12px; line-height: 1.45; }
.knowledge-safety-warning { margin: 0; padding: 10px 12px; border-radius: 9px; background: #fff8e7; color: #805b16; font-size: 10px; line-height: 1.6; }
.knowledge-safety-check { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid #e3e8ef; border-radius: 9px; color: #475569; font-size: 11px; }
.knowledge-safety-actions { display: flex; justify-content: flex-end; gap: 8px; }
.v3-shell .knowledge-mobile-tree-toggle { display: none; }
.v3-shell .knowledge-compact-toolbar { display: none; }

@media (max-width: 1180px) and (min-width: 901px) {
  .v3-shell .knowledge-manager-grid.is-tree-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
    position: sticky;
    width: auto;
    height: min(760px, calc(100vh - 36px));
    min-height: 520px;
    grid-column: auto;
    overflow: hidden auto;
  }
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-groups { grid-template-columns: 1fr; }
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-group { padding: 0; border: 0; border-radius: 0; }
}

@media (max-width: 900px) {
  .v3-shell .knowledge-tree-document-menu-toggle { opacity: 1; }
  .v3-shell .knowledge-folder-view > header { flex-direction: column; }
  .v3-shell .knowledge-folder-view > header .v3-card-actions { width: 100%; }
  .v3-shell .knowledge-mobile-tree-toggle { display: inline-flex; }
  .v3-shell .knowledge-compact-toolbar {
    margin: -6px 0 10px;
    display: flex;
    justify-content: flex-end;
  }
  .v3-shell .knowledge-manager-grid.is-tree-layout {
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
    display: none;
    position: fixed;
    top: 72px;
    bottom: 12px;
    left: 12px;
    z-index: 80;
    width: min(330px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
    padding: 12px 10px;
    overflow: hidden auto;
    border: 1px solid #dfe4eb;
    border-radius: 15px;
    box-shadow: 0 22px 52px rgba(35, 48, 68, .22);
  }
  .v3-shell .knowledge-manager-grid.is-tree-layout.is-mobile-tree-open .knowledge-tree-panel { display: block; }
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-editor-panel {
    min-height: 0;
    padding: 16px 13px;
    border: 1px solid var(--v3-line);
    border-radius: 14px;
    box-shadow: var(--v3-shadow);
  }
  .v3-shell .knowledge-folder-row {
    grid-template-columns: 17px minmax(0, 1fr);
  }
  .v3-shell .knowledge-folder-row small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel,
  .v3-shell .knowledge-tree-group .knowledge-tree-branch > i,
  .v3-shell .knowledge-tree-group .knowledge-tree-toggle > i,
  .v3-shell .knowledge-tree-documents-shell,
  .v3-shell .knowledge-document-loading .knowledge-editor-panel { transition: none; }
  .v3-shell .knowledge-tree-panel.is-scrolling-up .knowledge-tree-groups,
  .v3-shell .knowledge-tree-panel.is-scrolling-down .knowledge-tree-groups,
  .v3-shell .knowledge-tree-group .knowledge-tree-document.active { animation: none; }
}

/* Knowledge workspace v206: compact header, tall adaptive workbench and optional immersive reading. */
.v3-shell .knowledge-workspace-shell {
  min-width: 0;
  min-height: 0;
}

.v3-shell .knowledge-workspace-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v3-shell .knowledge-workspace-toolbar .knowledge-view-switch {
  margin: 0;
}

.v3-shell .knowledge-workspace-actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.v3-shell .knowledge-fullscreen-button {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: #fff;
  color: #49617f;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.v3-shell .knowledge-fullscreen-button:hover,
.v3-shell .knowledge-fullscreen-button.is-active {
  border-color: #9db9df;
  background: #f3f7fd;
  color: #1f5eaf;
}

.v3-shell .knowledge-fullscreen-button svg {
  width: 15px;
  height: 15px;
}

@media (min-width: 1101px) {
  .v3-shell.is-knowledge-route .v3-main .v3-topbar {
    min-height: 82px;
    padding: 10px 0;
    align-items: center;
  }

  .v3-shell.is-knowledge-route .v3-main .v3-topbar-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
  }

  .v3-shell.is-knowledge-route .v3-main .v3-back-button {
    min-height: 36px;
    margin: 0;
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .v3-shell.is-knowledge-route .v3-main .page-crumbs {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
  }

  .v3-shell.is-knowledge-route .v3-main .page-title {
    margin-top: 2px;
    grid-column: 2;
    grid-row: 2;
    font-size: 25px;
    line-height: 1.08;
  }

  .v3-shell.is-knowledge-route .v3-main .page-sub {
    display: none;
  }

  .v3-shell.is-knowledge-route .v3-main .v3-top-actions {
    align-self: center;
    margin-top: 0;
  }

  .v3-shell.is-knowledge-route .v3-scroll-region {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .v3-shell.is-knowledge-route .v3-scroll-region > .v3-icp-footer {
    display: none;
  }

  .v3-shell.is-knowledge-route .content.route-production {
    height: auto;
    min-height: 100%;
    padding: 0 0 64px;
    grid-template-rows: auto;
    gap: 0;
    overflow: visible;
  }

  .v3-shell .knowledge-workspace-shell {
    height: auto;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 10px;
  }

  .v3-shell .knowledge-workspace-shell > .knowledge-growth-panel {
    min-height: 0;
    margin: 0;
  }

  .v3-shell .knowledge-workspace-shell > .knowledge-growth-panel .knowledge-growth-summary {
    min-height: 48px;
    padding: 7px 12px;
  }

  .v3-shell .knowledge-workspace-shell > .knowledge-growth-panel .knowledge-growth-primary {
    min-width: 230px;
  }

  .v3-shell .knowledge-workspace-shell > .knowledge-growth-panel .knowledge-growth-primary > strong {
    font-size: 13px;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout {
    min-height: 680px;
    height: auto;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
    height: min(760px, calc(100dvh - 36px));
    min-height: 520px;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-editor-panel {
    height: auto;
    min-height: 680px;
  }
}

.v3-shell .knowledge-workspace-shell:fullscreen,
.v3-shell .knowledge-workspace-shell:-webkit-full-screen,
.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback {
  height: 100dvh;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  background: #f4f7fb;
}

.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback {
  position: fixed;
  z-index: 120;
  inset: 0;
}

.v3-shell .knowledge-workspace-shell:fullscreen > .knowledge-growth-panel,
.v3-shell .knowledge-workspace-shell:-webkit-full-screen > .knowledge-growth-panel,
.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback > .knowledge-growth-panel,
.v3-shell .knowledge-workspace-shell:fullscreen > .knowledge-compact-toolbar,
.v3-shell .knowledge-workspace-shell:-webkit-full-screen > .knowledge-compact-toolbar,
.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback > .knowledge-compact-toolbar {
  display: none;
}

.v3-shell .knowledge-workspace-shell:fullscreen .knowledge-manager-grid.is-tree-layout,
.v3-shell .knowledge-workspace-shell:-webkit-full-screen .knowledge-manager-grid.is-tree-layout,
.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback .knowledge-manager-grid.is-tree-layout {
  height: auto;
  min-height: 0;
}

.v3-shell .knowledge-workspace-shell:fullscreen .knowledge-tree-panel,
.v3-shell .knowledge-workspace-shell:fullscreen .knowledge-editor-panel,
.v3-shell .knowledge-workspace-shell:-webkit-full-screen .knowledge-tree-panel,
.v3-shell .knowledge-workspace-shell:-webkit-full-screen .knowledge-editor-panel,
.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback .knowledge-tree-panel,
.v3-shell .knowledge-workspace-shell.is-fullscreen-fallback .knowledge-editor-panel {
  height: 100%;
  min-height: 0;
}

@media (max-width: 1100px) {
  .v3-shell .knowledge-workspace-shell {
    display: grid;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .v3-shell .knowledge-fullscreen-button { display: none; }
  .v3-shell .knowledge-workspace-toolbar { justify-content: flex-start; flex-wrap: wrap; }
}

/* Knowledge reading focus v208: collapse the directory after the reader starts scrolling. */
@media (min-width: 901px) {
  .v3-shell .knowledge-manager-grid.is-tree-layout {
    position: relative;
    transition: grid-template-columns .24s ease;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
    grid-column: 1;
    transition: opacity .18s ease, transform .24s ease, visibility .18s ease;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-editor-panel {
    grid-column: 2;
  }

  .v3-shell .knowledge-directory-collapse-button {
    position: absolute;
    top: 14px;
    left: 260px;
    z-index: 7;
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid #d4dfed;
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    color: #49617f;
    box-shadow: 0 7px 18px rgba(42, 62, 91, .12);
    cursor: pointer;
    transition: left .24s ease, color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
  }

  .v3-shell .knowledge-directory-collapse-button:hover {
    border-color: #9db9df;
    background: #f3f7fd;
    color: #1f5eaf;
    transform: translateY(-1px);
  }

  .v3-shell .knowledge-directory-collapse-button .ui-icon {
    width: 16px;
    height: 16px;
    transform: rotate(180deg);
    transition: transform .24s ease;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout.is-reading-collapsed {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout.is-reading-collapsed .knowledge-tree-panel {
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    border-right: 0;
    transform: translateX(-14px);
    pointer-events: none;
  }

  .v3-shell .knowledge-directory-collapse-button.is-collapsed {
    left: 4px;
  }

  .v3-shell .knowledge-directory-collapse-button.is-collapsed .ui-icon {
    transform: none;
  }
}

@media (max-width: 900px) {
  .v3-shell .knowledge-directory-collapse-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-shell .knowledge-manager-grid.is-tree-layout,
  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel,
  .v3-shell .knowledge-directory-collapse-button,
  .v3-shell .knowledge-directory-collapse-button .ui-icon { transition: none; }
}

/* Agent dual-state workspace v76: topic choices stay conversational; scripts
   become the primary editable artifact without duplicating the full draft. */
.agent-result-message-summary {
  display: grid;
  margin-top: 8px;
  gap: 7px;
}

.agent-result-message-summary > p {
  margin: 0;
  color: #52627a;
  font-size: 11px;
  line-height: 1.6;
}

.agent-result-message-summary > details > summary {
  width: max-content;
  color: #3266c5;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  list-style: none;
}

.agent-result-message-summary > details > summary::-webkit-details-marker { display: none; }
.agent-result-message-summary > details > summary::after { margin-left: 4px; content: "›"; }
.agent-result-message-summary > details[open] > summary::after { content: "⌄"; }
.agent-result-message-summary .agent-message-full { margin-top: 9px; }

.agent-message-script-card {
  display: grid;
  gap: 10px;
}

.agent-message-script-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-message-script-meta > span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff;
  color: #6c7a91;
  font-size: 9px;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px #dfe6f2;
}

.agent-message-script-card > footer { padding: 0; }
.agent-message-script-card > footer .v3-btn { width: 100%; }
.agent-message-topic-script > footer { flex-wrap: wrap; }
.agent-message-topic-script > footer .v3-btn { flex: 1 1 120px; }

.agent-message-topic-card-actions {
  display: grid;
  margin-top: auto;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 6px;
}

.agent-message-topic-cards article .agent-message-topic-card-actions .v3-btn {
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding-inline: 10px;
  white-space: nowrap;
}

.agent-message-topic-card-actions .v3-btn:last-child {
  min-width: 72px;
  padding-inline: 6px;
}

.agent-topic-detail-canvas .agent-artifact-list { align-content: start; }
.agent-topic-detail-canvas .agent-artifact-topic { min-height: 0; }

@media (min-width: 1181px) {
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact {
    grid-template-columns: 190px minmax(360px, 1fr) 10px minmax(560px, min(var(--agent-artifact-width, 800px), 60vw));
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact.is-session-collapsed {
    grid-template-columns: 58px minmax(400px, 1fr) 10px minmax(560px, min(var(--agent-artifact-width, 800px), 60vw));
  }

  .route-review.is-agent-workspace .agent-chat-shell.artifact-topic.has-artifact {
    grid-template-columns: 190px minmax(430px, 1fr) 10px minmax(420px, min(var(--agent-artifact-width, 800px), 48vw));
  }

  .route-review.is-agent-workspace .agent-chat-shell.artifact-topic.has-artifact.is-session-collapsed {
    grid-template-columns: 58px minmax(470px, 1fr) 10px minmax(420px, min(var(--agent-artifact-width, 800px), 48vw));
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-panel .agent-message-topic-cards,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-panel .agent-message-topic-script,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-chat-panel .agent-message-script-card {
    display: grid;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact .agent-message-topic-cards > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact > .agent-session-rail,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact > .agent-chat-panel,
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact > .agent-workspace-resizer {
    display: none;
  }

  .route-review.is-agent-workspace .agent-chat-shell.has-artifact > .agent-artifact-panel {
    display: grid;
    min-width: 0;
    grid-column: 1 / -1;
  }

  .agent-artifact-toggle { display: inline-flex; }
}

@media (max-width: 767px) {
  .route-review.is-agent-workspace .agent-chat-shell.has-artifact {
    height: calc(100dvh - var(--mobile-nav-height, 66px) - 28px);
    min-height: 520px;
  }

  .agent-message-topic-card-actions { grid-template-columns: 1fr; }
  .agent-message-topic-cards article .agent-message-topic-card-actions .v3-btn { width: 100%; }
}


/* Competitor first research workbench: isolated from existing routes and page layouts. */
.competitor-research-page { min-width: 0; padding-bottom: 76px; display: grid; gap: 16px; color: var(--v3-ink); }
.competitor-research-header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.competitor-research-account { min-width: 0; display: flex; align-items: center; gap: 14px; }
.competitor-research-account > img { width: 66px; height: 66px; flex: 0 0 66px; border-radius: 50%; border: 1px solid var(--v3-line); object-fit: cover; background: var(--v3-surface-soft); }
.competitor-research-account > div { min-width: 0; }
.competitor-research-account h1 { margin: 3px 0 4px; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.12; letter-spacing: -.025em; }
.competitor-research-account p { margin: 0; color: var(--v3-muted); font-size: 12px; }
.competitor-research-status { padding: 6px 10px; border-radius: 999px; background: #fff7e8; color: var(--v3-warn); font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.competitor-research-status.is-success { background: #eaf8f2; color: var(--v3-good); }
.competitor-research-status.is-warning { background: #fff1f1; color: var(--v3-bad); }

.competitor-research-steps { padding: 16px 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface); }
.competitor-research-steps > div { min-width: 0; position: relative; padding-left: 40px; display: grid; align-content: center; min-height: 38px; }
.competitor-research-steps > div:not(:last-child) { border-right: 1px dashed #cbd5e1; }
.competitor-research-steps span { position: absolute; left: 0; top: 2px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; color: #94a3b8; font-size: 11px; font-weight: 850; }
.competitor-research-steps strong { overflow: hidden; color: #475569; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.competitor-research-steps em { color: #94a3b8; font-size: 9px; font-style: normal; }
.competitor-research-steps .is-complete span { border-color: var(--v3-primary); background: var(--v3-primary); color: #fff; }
.competitor-research-steps .is-complete strong, .competitor-research-steps .is-active strong { color: var(--v3-ink); }
.competitor-research-steps .is-complete em, .competitor-research-steps .is-active em { color: var(--v3-primary); }
.competitor-research-steps .is-active span { border: 2px solid var(--v3-primary); color: var(--v3-primary); }

.competitor-research-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 224px; gap: 16px; align-items: stretch; }
.competitor-research-layout.agent-collapsed { grid-template-columns: minmax(0, 1fr) 48px; }
.competitor-research-main { min-width: 0; padding: 14px; display: grid; align-content: start; gap: 12px; border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface); }
.competitor-research-summary { min-width: 0; padding: 13px 15px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-radius: 12px; background: var(--v3-primary-soft); }
.competitor-research-agent-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #dbeafe; color: var(--v3-primary); }
.competitor-research-agent-mark svg { width: 19px; height: 19px; }
.competitor-research-summary > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.competitor-research-summary span { color: var(--v3-muted); font-size: 10px; }
.competitor-research-summary strong { overflow: hidden; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.competitor-research-running { padding: 7px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; background: #fff; color: var(--v3-primary) !important; font-weight: 800; white-space: nowrap; }

@keyframes competitor-research-spin {
  to { transform: rotate(360deg); }
}
.competitor-research-spinner { width: 15px; height: 15px; flex: 0 0 15px; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: competitor-research-spin .72s linear infinite; }
.v3-btn.is-research-running { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.v3-btn.is-research-running .competitor-research-spinner { width: 13px; height: 13px; flex-basis: 13px; }
.v3-btn.is-research-running:disabled { opacity: .78; cursor: wait; }

.competitor-research-starting { position: fixed; right: 24px; bottom: 24px; z-index: 120; width: min(360px, calc(100vw - 32px)); padding: 15px 16px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 12px; border: 1px solid #bfd3ff; border-radius: 15px; background: rgba(255,255,255,.98); color: var(--v3-primary); box-shadow: 0 18px 48px rgba(15,23,42,.18); backdrop-filter: blur(14px); }
.competitor-research-starting .competitor-research-spinner { margin-top: 2px; width: 18px; height: 18px; flex-basis: 18px; }
.competitor-research-starting > div { min-width: 0; display: grid; gap: 3px; }
.competitor-research-starting strong { color: var(--v3-ink); font-size: 12px; line-height: 1.4; }
.competitor-research-starting p { margin: 0; overflow: hidden; color: #475569; font-size: 10px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.competitor-research-starting em { color: var(--v3-muted); font-size: 9px; font-style: normal; }

.benchmark-research-progress { margin-top: 10px; display: grid; gap: 6px; }
.benchmark-research-progress > div { height: 5px; overflow: hidden; border-radius: 999px; background: #e7edf7; }
.benchmark-research-progress > div > span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--v3-primary), #6d8fff); transition: width .28s ease; }
.benchmark-research-progress.is-running > div > span { position: relative; overflow: hidden; }
.benchmark-research-progress.is-running > div > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); transform: translateX(-100%); animation: competitor-research-progress 1.45s ease-in-out infinite; }
@keyframes competitor-research-progress {
  to { transform: translateX(100%); }
}
.benchmark-research-progress p { margin: 0; color: var(--v3-muted); font-size: 9px; line-height: 1.45; }

.competitor-account-research-state { margin: 0 0 16px; padding: 14px 16px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #d9e5fb; border-radius: 14px; background: linear-gradient(135deg, #f7faff, #fff); }
.competitor-account-research-state.is-running { border-color: #bfd3ff; background: linear-gradient(135deg, #f2f7ff, #fff); }
.competitor-account-research-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e8f0ff; color: var(--v3-primary); }
.competitor-account-research-icon svg { width: 18px; height: 18px; }
.competitor-account-research-icon .competitor-research-spinner { width: 17px; height: 17px; flex-basis: 17px; }
.competitor-account-research-state > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.competitor-account-research-state > div:nth-child(2) > span { color: var(--v3-primary); font-size: 9px; font-weight: 800; }
.competitor-account-research-state strong { overflow: hidden; color: var(--v3-ink); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.competitor-account-research-state p { margin: 0; color: var(--v3-muted); font-size: 9px; line-height: 1.45; }
.competitor-account-research-bar { margin-top: 4px; height: 5px; overflow: hidden; border-radius: 999px; background: #e7edf7; }
.competitor-account-research-bar > span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--v3-primary), #6d8fff); transition: width .28s ease; }
.competitor-account-research-state.is-running .competitor-account-research-bar > span { position: relative; overflow: hidden; }
.competitor-account-research-state.is-running .competitor-account-research-bar > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); transform: translateX(-100%); animation: competitor-research-progress 1.45s ease-in-out infinite; }

.competitor-research-table { min-width: 0; overflow: hidden; border: 1px solid var(--v3-line); border-radius: 12px; }
.competitor-research-table > header, .competitor-research-row { min-width: 920px; display: grid; grid-template-columns: minmax(280px, 1.55fr) 86px minmax(142px, .8fr) 70px minmax(155px, .85fr) 142px; align-items: center; gap: 12px; }
.competitor-research-table > header { min-height: 38px; padding: 0 12px; background: #f8fafc; color: var(--v3-muted); font-size: 9px; font-weight: 750; }
.competitor-research-table > header label { display: flex; align-items: center; gap: 10px; }
.competitor-research-table input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--v3-primary); }
.competitor-research-rows { min-width: 0; overflow-x: auto; }
.competitor-research-row { min-height: 72px; padding: 8px 12px; border-top: 1px solid #edf1f7; transition: background .18s ease; }
.competitor-research-row:first-child { border-top: 0; }
.competitor-research-row.is-selected { background: #fbfdff; }
.competitor-research-row:hover { background: #f8faff; }
.competitor-research-work { min-width: 0; display: grid; grid-template-columns: 16px 74px minmax(0, 1fr); align-items: center; gap: 10px; }
.competitor-research-work > img { width: 74px; height: 48px; border-radius: 8px; object-fit: cover; background: #eef2f7; }
.competitor-research-work > span { min-width: 0; display: grid; gap: 2px; }
.competitor-research-work strong { overflow: hidden; font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.competitor-research-work em { color: var(--v3-muted); font-size: 9px; font-style: normal; }
.competitor-research-work a { width: max-content; color: var(--v3-primary); font-size: 9px; font-weight: 700; text-decoration: none; }
.competitor-research-row time { color: var(--v3-muted); font-size: 9px; }
.competitor-research-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; color: #475569; font-size: 9px; }
.competitor-research-score { width: 36px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #edf4ff; color: var(--v3-primary); font-size: 11px; }
.competitor-research-score.grade-s { background: #eaf8f2; color: var(--v3-good); }
.competitor-research-score.grade-b { background: #fff7e8; color: var(--v3-warn); }
.competitor-research-score.grade-c { background: #f1f5f9; color: #64748b; }
.competitor-research-reasons { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.competitor-research-reasons span { max-width: 100%; overflow: hidden; padding: 4px 7px; border-radius: 999px; background: #f1f5f9; color: #536176; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.competitor-research-row select { width: 100%; min-height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--v3-line); border-radius: 9px; background: #fff; color: var(--v3-ink); font-size: 10px; font-weight: 700; }

.competitor-research-agent { min-width: 0; overflow: hidden; border: 1px solid var(--v3-line); border-radius: 16px; background: #f8fafc; }
.competitor-research-agent > header { min-height: 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--v3-line); }
.competitor-research-agent > header strong { font-size: 11px; }
.competitor-research-agent > header button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--v3-muted); cursor: pointer; }
.competitor-research-agent > header button .ui-icon { transition: transform 180ms ease; }
.competitor-research-agent > header button.is-collapsed .ui-icon { transform: rotate(180deg); }
.competitor-research-agent > header svg { width: 16px; }
.competitor-research-agent-events { padding: 14px 12px; display: grid; gap: 16px; }
.competitor-research-agent-events article { position: relative; padding-left: 18px; display: grid; grid-template-columns: 1fr; }
.competitor-research-agent-events article i { position: absolute; left: 0; top: 3px; width: 9px; height: 9px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.competitor-research-agent-events article.is-completed i { border-color: var(--v3-good); background: var(--v3-good); }
.competitor-research-agent-events article.is-current i { border-color: var(--v3-primary); box-shadow: 0 0 0 3px #dbeafe; }
.competitor-research-agent-events article strong { font-size: 10px; line-height: 1.4; }
.competitor-research-agent-events article p, .competitor-research-agent-next p { margin: 3px 0 0; color: var(--v3-muted); font-size: 9px; line-height: 1.5; }
.competitor-research-agent-next { padding: 12px 0 0 18px; display: grid; gap: 3px; border-top: 1px solid var(--v3-line); }
.competitor-research-agent-next span { margin-bottom: 5px; color: #94a3b8; font-size: 9px; }
.competitor-research-agent-next strong { margin-top: 5px; font-size: 10px; color: #64748b; }
.competitor-research-layout.agent-collapsed .competitor-research-agent > header { padding: 0 8px; border-bottom: 0; }
.competitor-research-layout.agent-collapsed .competitor-research-agent > header strong,
.competitor-research-layout.agent-collapsed .competitor-research-agent-events { display: none; }

.competitor-research-batchbar { position: sticky; bottom: 12px; z-index: 8; min-height: 66px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--v3-line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 12px 32px rgba(15,23,42,.09); backdrop-filter: blur(12px); }
.competitor-research-batchbar > strong { font-size: 12px; }
.competitor-research-batchbar > div { display: flex; gap: 10px; }
.competitor-research-empty { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; }
.competitor-research-empty strong { font-size: 20px; }
.competitor-research-empty p { margin: 0; color: var(--v3-muted); font-size: 12px; }
.competitor-research-source-wait { min-height: 360px; padding: 36px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 20px; border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff 0%, #fff 68%); }
.competitor-research-source-wait-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #dbeafe; color: var(--v3-primary); }
.competitor-research-source-wait-icon .competitor-research-spinner { width: 22px; height: 22px; flex-basis: 22px; }
.competitor-research-source-wait > div:nth-child(2) { min-width: 0; display: grid; gap: 8px; }
.competitor-research-source-wait h2 { margin: 0; font-size: 22px; line-height: 1.35; }
.competitor-research-source-wait p { margin: 0; color: #475569; font-size: 13px; line-height: 1.65; }
.competitor-research-source-wait strong { color: #1e3a8a; font-size: 12px; line-height: 1.55; }
.competitor-research-source-wait em { color: var(--v3-muted); font-size: 11px; font-style: normal; }
.competitor-research-recovery-actions { display: grid; gap: 10px; max-width: 210px; }

@media (max-width: 1180px) {
  .competitor-research-layout, .competitor-research-layout.agent-collapsed { grid-template-columns: minmax(0, 1fr); }
  .competitor-research-agent { max-height: 260px; }
  .competitor-research-layout.agent-collapsed .competitor-research-agent { display: none; }
}
@media (max-width: 820px) {
  .competitor-research-starting { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .competitor-account-research-state { grid-template-columns: 32px minmax(0, 1fr); padding: 12px; }
  .competitor-account-research-icon { width: 32px; height: 32px; }
  .competitor-account-research-state > .v3-btn { grid-column: 1 / -1; width: 100%; }
  .competitor-research-page { gap: 12px; padding-bottom: 86px; }
  .competitor-research-source-wait { min-height: 300px; padding: 24px 18px; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 14px; }
  .competitor-research-source-wait-icon { width: 42px; height: 42px; }
  .competitor-research-source-wait h2 { font-size: 18px; }
  .competitor-research-source-wait > .v3-btn { grid-column: 1 / -1; width: 100%; }
  .competitor-research-recovery-actions { grid-column: 1 / -1; max-width: none; }
  .competitor-research-header { align-items: flex-start; }
  .competitor-research-account > img { width: 48px; height: 48px; flex-basis: 48px; }
  .competitor-research-account h1 { font-size: 22px; }
  .competitor-research-status { display: none; }
  .competitor-research-steps { padding: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .competitor-research-steps > div:nth-child(3) { border-right: 0; }
  .competitor-research-summary { grid-template-columns: 32px minmax(0, 1fr); }
  .competitor-research-summary > .v3-btn, .competitor-research-running { grid-column: 1 / -1; width: 100%; }
  .competitor-research-main { padding: 10px; }
  .competitor-research-table > header { display: none; }
  .competitor-research-row { min-width: 0; grid-template-columns: minmax(0, 1fr) 58px; gap: 8px; }
  .competitor-research-work { grid-column: 1 / -1; }
  .competitor-research-row time, .competitor-research-metrics { display: none; }
  .competitor-research-score { grid-column: 2; grid-row: 2; }
  .competitor-research-reasons { grid-column: 1; grid-row: 2; }
  .competitor-research-row select { grid-column: 1 / -1; }
  .competitor-research-batchbar { bottom: 8px; align-items: stretch; flex-direction: column; }
  .competitor-research-batchbar > div, .competitor-research-batchbar .v3-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .competitor-research-spinner,
  .benchmark-research-progress.is-running > div > span::after,
  .competitor-account-research-state.is-running .competitor-account-research-bar > span::after { animation-duration: 1.8s; }
}

/* Account works layout refinement v190: preserve the existing page, improve rhythm and scan density. */
.route-account {
  gap: 12px;
}

.route-account .account-head.is-own-analysis {
  min-height: 82px;
  padding: 13px 16px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(31, 52, 82, .035);
}

.route-account .account-workbench-tabs {
  margin: 8px 0 10px;
  padding: 3px;
  border-radius: 12px;
}

.route-account .account-workbench-tabs button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
}

.route-account .account-work-pool {
  padding: 0;
  overflow: visible;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.route-account .account-work-pool > .account-list-title {
  min-height: 64px;
  margin: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(390px, auto) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--v3-line);
  border-radius: 15px;
  background: var(--v3-surface);
  box-shadow: 0 5px 16px rgba(31, 52, 82, .025);
}

.route-account .account-list-title > span:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  font-size: 15px;
  font-weight: 850;
}

.route-account .account-list-title #video-count {
  color: #728198;
  font-size: 11px;
  font-weight: 550;
}

.route-account .account-list-title #load-videos-pool {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
}

.route-account .account-pool-filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 7px;
}

.route-account .account-pool-filters button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.route-account .account-pool-filters button.active {
  border-color: #8ab2f7;
  background: #edf4ff;
  box-shadow: inset 0 0 0 1px rgba(20, 88, 212, .04);
}

.route-account .account-work-pool .check-control {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
  font-size: 12px;
}

.route-account .account-work-pool .selection-toolbar {
  min-height: 54px;
  margin: 10px 0;
  padding: 9px 12px;
  border-radius: 13px;
  box-shadow: none;
}

.route-account .selection-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.route-account .selection-toolbar > div:first-child strong {
  font-size: 13px;
}

.route-account .selection-toolbar > div:first-child span {
  max-width: 380px;
  overflow: hidden;
  color: #7b899d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-account .selection-toolbar .actions.compact {
  gap: 8px;
}

.route-account .selection-toolbar .btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.route-account .video-list {
  gap: 10px;
}

.route-account .video-row,
:root[data-theme="light"] .route-account .video-row,
:root[data-theme="dark"] .route-account .video-row {
  min-height: 142px;
  grid-template-columns: 34px 24px 88px minmax(0, 1fr);
  grid-template-areas: "rank check thumb body";
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: none;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.route-account .video-row:hover {
  border-color: #c5d4ea;
  box-shadow: 0 6px 18px rgba(31, 52, 82, .035);
}

.route-account .video-row.is-selected {
  border-color: #8eb4f2;
  background: #f8fbff;
  box-shadow: 0 0 0 2px rgba(20, 88, 212, .06);
}

.route-account .account-rank-number {
  color: #9aa8ba;
  font-size: 13px;
  font-weight: 800;
}

.route-account .thumb-btn,
:root[data-theme="light"] .route-account .thumb-btn,
:root[data-theme="dark"] .route-account .thumb-btn {
  width: 82px;
  height: 110px;
  border-radius: 10px;
}

.route-account .video-card-body {
  gap: 8px;
  align-self: stretch;
  align-content: center;
}

.route-account .account-ranking-title {
  align-items: center;
  gap: 8px;
}

.route-account .account-performance-label {
  min-height: 22px;
  padding: 0 7px;
  font-size: 10px;
}

.route-account .video-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.route-account .video-main .tag-row,
.route-account .video-main .video-value-badges {
  margin-top: 5px;
}

.route-account .video-stats.upgraded {
  gap: 6px;
}

.route-account .video-stats.upgraded span {
  min-height: 29px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.route-account .video-stats.upgraded .ui-icon {
  width: 14px;
  height: 14px;
}

.route-account .video-card-foot {
  align-items: center;
}

.route-account .video-time {
  color: #718096;
  font-size: 11px;
}

.route-account .video-row .actions.compact {
  width: min(100%, 310px);
  grid-template-columns: minmax(128px, 1fr) 38px 0;
  gap: 7px;
}

.route-account .video-row .actions.compact .mini,
.route-account .video-action-select {
  min-height: 38px;
  border-radius: 9px;
  font-size: 12px;
}

.route-account .video-row .actions.compact [data-copy] {
  display: none;
}

@media (max-width: 1260px) {
  .route-account .account-work-pool > .account-list-title {
    grid-template-columns: minmax(190px, 1fr) auto;
  }
  .route-account .account-list-title > :is(.account-pool-filters, .check-control) {
    grid-column: 1 / -1;
  }
  .route-account .account-pool-filters { justify-content: flex-start; }
  .route-account .account-work-pool .check-control { justify-self: end; margin-top: -43px; }
}

@media (max-width: 820px) {
  .route-account .account-work-pool > .account-list-title {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .route-account .account-list-title > :is(.account-pool-filters, .check-control) { grid-column: 1; }
  .route-account .account-pool-filters {
    padding-bottom: 3px;
    overflow-x: auto;
  }
  .route-account .account-work-pool .check-control { justify-self: start; margin-top: 0; }
  .route-account .selection-toolbar { align-items: stretch; flex-direction: column; }
  .route-account .selection-toolbar > div:first-child span { display: none; }
  .route-account .selection-toolbar .actions.compact,
  .route-account .selection-toolbar .btn { width: 100%; }
  .route-account .video-row,
  :root[data-theme="light"] .route-account .video-row,
  :root[data-theme="dark"] .route-account .video-row {
    grid-template-columns: 24px 82px minmax(0, 1fr);
    grid-template-areas: "check thumb body";
  }
  .route-account .account-rank-number {
    position: absolute;
    z-index: 3;
    top: 9px;
    right: 9px;
    padding: 3px 6px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .9);
  }
}

@media (max-width: 560px) {
  .route-account .video-row,
  :root[data-theme="light"] .route-account .video-row,
  :root[data-theme="dark"] .route-account .video-row {
    min-height: 0;
    grid-template-columns: 22px 72px minmax(0, 1fr);
    gap: 9px;
    padding: 11px;
  }
  .route-account .thumb-btn,
  :root[data-theme="light"] .route-account .thumb-btn,
  :root[data-theme="dark"] .route-account .thumb-btn {
    width: 70px;
    height: 94px;
  }
  .route-account .account-ranking-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .route-account .video-card-foot { align-items: stretch; flex-direction: column; }
  .route-account .video-time { order: 1; text-align: left; }
  .route-account .video-row .actions.compact { order: 2; width: 100%; }
}

/* Loading feedback v191: visible progress for data-heavy routes without blocking navigation. */
.v3-loading-card {
  min-height: 176px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px 16px;
  align-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  color: var(--v3-muted);
  text-align: left;
}

.v3-loading-card::after {
  content: "";
  width: 46%;
  height: 180%;
  position: absolute;
  top: -40%;
  left: -55%;
  transform: rotate(11deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  animation: v3-loading-sweep 1.65s ease-in-out infinite;
  pointer-events: none;
}

.v3-loading-card.is-compact {
  min-height: 118px;
  padding: 18px 20px;
}

.v3-loading-spinner {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #edf4ff;
  box-shadow: inset 0 0 0 1px rgba(20, 88, 212, .08);
}

.v3-loading-spinner i,
.v3-button-spinner,
.knowledge-tree-empty.is-loading > i {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid rgba(20, 88, 212, .2);
  border-top-color: var(--v3-primary);
  border-radius: 50%;
  animation: v3-loading-spin .72s linear infinite;
}

.v3-loading-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.v3-loading-copy strong {
  color: var(--v3-ink);
  font-size: 15px;
  font-weight: 820;
}

.v3-loading-copy small {
  color: #7b899d;
  font-size: 11px;
  line-height: 1.55;
}

.v3-loading-skeleton {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.v3-loading-skeleton i {
  width: calc(100% - var(--skeleton-index) * 13%);
  max-width: 760px;
  height: 9px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8eef7 0%, #f6f9fd 48%, #e8eef7 100%);
  background-size: 210% 100%;
  animation: v3-loading-shimmer 1.2s ease-in-out infinite;
  animation-delay: calc(var(--skeleton-index) * 80ms);
}

.route-account #account-videos > .v3-loading-card {
  margin-top: 10px;
  min-height: 246px;
}

.v3-button-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.knowledge-tree-empty.is-loading {
  padding-left: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.knowledge-tree-empty.is-loading > i {
  width: 12px;
  height: 12px;
}

@keyframes v3-loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes v3-loading-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -110% 0; }
}

@keyframes v3-loading-sweep {
  0% { left: -55%; opacity: 0; }
  20% { opacity: 1; }
  72%, 100% { left: 120%; opacity: 0; }
}

@media (max-width: 620px) {
  .v3-loading-card {
    min-height: 156px;
    padding: 18px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }
  .v3-loading-spinner { width: 36px; height: 36px; border-radius: 11px; }
  .route-account #account-videos > .v3-loading-card { min-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-loading-card::after,
  .v3-loading-spinner i,
  .v3-button-spinner,
  .knowledge-tree-empty.is-loading > i,
  .v3-loading-skeleton i {
    animation: none;
  }
}

/* Material library layout refinement v221: give the shelf priority, open details on demand. */
.route-library .library-workspace.without-selection,
.route-library .library-workspace.without-selection.is-table-mode,
.route-library .library-workspace.without-selection.is-graph-mode {
  grid-template-columns: 190px minmax(0, 1fr);
}

@media (min-width: 768px) {
  .route-library .library-view-toolbar {
    grid-template-columns: auto minmax(260px, 1fr);
    align-items: end;
    gap: 12px;
  }

  .route-library .library-facets {
    padding: 13px 16px;
    gap: 7px;
  }

  .route-library .library-facet-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1360px) {
  .route-library .library-workspace.has-selection,
  .route-library .library-workspace.has-selection.is-table-mode {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .route-library .library-inspector.has-selection {
    position: fixed;
    z-index: 68;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: min(380px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 1px solid #dce4ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(31, 48, 78, .22);
  }

  .route-library .library-inspector.has-selection .library-inspector-head {
    position: sticky;
    z-index: 2;
    top: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
  }

  .route-library .library-inspector.has-selection .mobile-library-inspector-close {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--v3-line);
    border-radius: 10px;
    background: #fff;
    color: var(--v3-ink);
    cursor: pointer;
    place-items: center;
  }

  .route-library .library-inspector.has-selection .mobile-library-inspector-close .ui-icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 767px) {
  .route-library .library-view-toolbar { grid-template-columns: minmax(0, 1fr); }
}

/* My-account positioning dialog v225 */
.account-positioning-modal {
  width: min(1080px, calc(100vw - 44px));
  height: min(880px, calc(100vh - 44px));
  height: min(880px, calc(100dvh - 44px));
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-color: #d9e2ef;
  background: #fff;
}

.account-positioning-modal > header {
  min-height: 58px;
  padding: 14px 18px;
  background: #fff;
}

.account-positioning-modal > header strong {
  color: var(--v3-ink);
  font-size: 16px;
  font-weight: 820;
}

.account-positioning-modal > header .mini {
  min-width: 58px;
  min-height: 34px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: #fff;
  color: var(--v3-ink);
}

.account-positioning-modal .modal-body {
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: hidden;
  background: #f5f7fb;
}

.account-positioning-modal .account-positioning-workspace {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--v3-surface);
  box-shadow: none;
}

.account-positioning-modal .account-positioning-workspace:focus { outline: none; }

.account-positioning-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.account-positioning-header > div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-positioning-header h2 {
  margin: 0;
  color: var(--v3-ink);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.25;
}

.account-positioning-header p {
  margin: 0;
  color: var(--v3-muted);
  font-size: 13px;
  line-height: 1.65;
}

.account-positioning-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.account-positioning-header-actions .v3-btn { white-space: nowrap; }

.account-positioning-form {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
}

.account-positioning-scroll {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 22px;
}

.account-positioning-scroll:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--v3-primary) 13%, transparent);
  outline-offset: -3px;
}

.account-positioning-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--v3-line);
}

.account-positioning-section-heading strong { color: var(--v3-ink); font-size: 15px; }
.account-positioning-section-heading span { color: var(--v3-muted); font-size: 12px; }

.account-positioning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-positioning-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--v3-ink);
  font-size: 13px;
  font-weight: 760;
}

.account-positioning-grid label.is-wide { grid-column: 1 / -1; }
.account-positioning-grid label.is-required > span::after { content: " · 核心"; color: var(--v3-primary); font-size: 11px; font-weight: 760; }

.account-positioning-grid input,
.account-positioning-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--v3-line);
  border-radius: 11px;
  background: #fff;
  color: var(--v3-ink);
  font: inherit;
  font-weight: 500;
  line-height: 1.55;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.account-positioning-grid input { min-height: 43px; padding: 0 12px; }
.account-positioning-grid textarea { min-height: 84px; padding: 10px 12px; resize: vertical; }

.account-positioning-grid input:hover,
.account-positioning-grid textarea:hover { border-color: #b8c7db; }

.account-positioning-grid input:focus,
.account-positioning-grid textarea:focus {
  border-color: var(--v3-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v3-primary) 12%, transparent);
}

.account-positioning-more {
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: var(--v3-soft);
}

.account-positioning-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 15px;
  color: var(--v3-ink);
  cursor: pointer;
  list-style: none;
}

.account-positioning-more > summary::-webkit-details-marker { display: none; }
.account-positioning-more > summary small { color: var(--v3-muted); font-size: 12px; font-weight: 500; }
.account-positioning-more[open] > summary { border-bottom: 1px solid var(--v3-line); }
.account-positioning-more > .account-positioning-grid { padding: 15px; }

.account-positioning-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--v3-line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -10px 24px rgba(30, 55, 90, .06);
}

.account-positioning-savebar > span { color: var(--v3-muted); font-size: 12px; }

@media (max-width: 840px) {
  .account-positioning-scroll { padding: 16px; scroll-padding-block: 16px; }
  .account-positioning-header,
  .account-positioning-section-heading,
  .account-positioning-savebar { align-items: stretch; flex-direction: column; }
  .account-positioning-header-actions { align-items: stretch; flex-direction: column; }
  .account-positioning-grid { grid-template-columns: minmax(0, 1fr); }
  .account-positioning-grid label.is-wide { grid-column: auto; }
  .account-positioning-savebar { gap: 9px; padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); }
  .account-positioning-savebar .v3-btn { width: 100%; justify-content: center; }
}

@media (max-height: 620px) {
  .account-positioning-modal > header { min-height: 50px; padding: 9px 13px; }
  .account-positioning-scroll { gap: 12px; padding: 14px; scroll-padding-block: 14px; }
  .account-positioning-header { gap: 14px; }
  .account-positioning-header h2 { font-size: 19px; }
  .account-positioning-grid textarea { min-height: 72px; }
  .account-positioning-savebar { padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); }
}

/* Research and reading flow safety v226: no implicit overlays or sticky section tabs. */
.route-review .agent-chat-panel,
.route-review.is-agent-workspace .agent-chat-panel {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.route-review .agent-chat-messages,
.route-review.is-agent-workspace .agent-chat-messages {
  padding-bottom: 18px;
  scroll-padding-bottom: 18px;
}

.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid #e6eaf1;
  background: #fbfcfe;
  pointer-events: auto;
}

.route-review .agent-chat-composer::before,
.route-review.is-agent-workspace .agent-chat-composer::before {
  content: none;
  display: none;
}

.route-account .account-workbench-tabs {
  position: static;
  z-index: auto;
  top: auto;
  background: var(--v3-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@media (min-width: 1181px) and (max-height: 700px) {
  .route-review.is-agent-workspace .agent-chat-shell {
    height: max(360px, calc(100dvh - 168px));
    min-height: 360px;
  }

  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    max-height: 180px;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .route-review .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-input-wrap {
    min-height: 88px;
  }
}

/* Composer visible mist region v235: a real blurred field around a crisp input. */
.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  isolation: isolate;
  overflow: visible;
  padding-top: 30px;
  border-top-color: transparent;
  background: transparent;
}

.route-review .agent-chat-composer-backdrop,
.route-review.is-agent-workspace .agent-chat-composer-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  contain: paint;
  pointer-events: none;
  opacity: 1;
  background: rgba(248, 250, 254, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  backdrop-filter: blur(18px) saturate(110%);
}

.route-review .agent-chat-composer-mist,
.route-review.is-agent-workspace .agent-chat-composer-mist {
  position: absolute;
  inset: 14px 4% -22px;
  border-radius: 36px;
  pointer-events: none;
  opacity: .76;
  background: rgba(202, 220, 245, .54);
  box-shadow: 0 -12px 32px rgba(213, 228, 248, .48), 0 16px 38px rgba(181, 204, 238, .26);
  filter: blur(24px);
  transform: scale(1.04);
  animation: agent-composer-mist-breathe 8s ease-in-out infinite alternate;
}

@supports (overflow: clip) {
  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop {
    overflow: clip;
  }
}

.route-review .agent-chat-composer > :not(.agent-chat-composer-backdrop):not(.agent-chat-composer-glass),
.route-review.is-agent-workspace .agent-chat-composer > :not(.agent-chat-composer-backdrop):not(.agent-chat-composer-glass) {
  position: relative;
  z-index: 1;
}

.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  overflow: visible;
  border-color: rgba(216, 224, 235, .96);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 9px 28px rgba(28, 42, 68, .1), 0 2px 6px rgba(28, 42, 68, .04);
}

@keyframes agent-composer-mist-breathe {
  from { opacity: .66; transform: scale(1.02); }
  to { opacity: .82; transform: scale(1.06); }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop {
    background: rgba(244, 248, 253, .7);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-height: 700px) {
  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    padding-top: 24px;
  }

  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop {
    -webkit-backdrop-filter: blur(10px) saturate(106%);
    backdrop-filter: blur(10px) saturate(106%);
  }

  .route-review .agent-chat-composer-mist,
  .route-review.is-agent-workspace .agent-chat-composer-mist {
    filter: blur(18px);
    animation: none;
  }
}

@media (max-width: 760px) {
  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    padding-top: 16px;
  }

  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop {
    -webkit-backdrop-filter: blur(8px) saturate(104%);
    backdrop-filter: blur(8px) saturate(104%);
  }

  .route-review .agent-chat-composer-mist,
  .route-review.is-agent-workspace .agent-chat-composer-mist {
    inset: 12px 2% -16px;
    filter: blur(14px);
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-review .agent-chat-composer-mist,
  .route-review.is-agent-workspace .agent-chat-composer-mist {
    animation: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    background: #f8fafc;
  }

  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop,
  .route-review .agent-chat-composer-mist,
  .route-review.is-agent-workspace .agent-chat-composer-mist {
    display: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .route-review .agent-chat-input-wrap,
  .route-review.is-agent-workspace .agent-chat-input-wrap {
    border-color: #8794a8;
    background: #fff;
  }

  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop,
  .route-review .agent-chat-composer-mist,
  .route-review.is-agent-workspace .agent-chat-composer-mist {
    display: none;
  }
}

@media (forced-colors: active) {
  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    border-top-color: CanvasText;
    background: Canvas;
  }

  .route-review .agent-chat-composer-backdrop,
  .route-review.is-agent-workspace .agent-chat-composer-backdrop,
  .route-review .agent-chat-composer-mist,
  .route-review.is-agent-workspace .agent-chat-composer-mist {
    display: none;
  }
}

/* Message-edge glass fade v236: blur only scrolling chat content, never the composer. */
.route-review .agent-chat-panel,
.route-review.is-agent-workspace .agent-chat-panel {
  isolation: isolate;
}

.route-review .agent-chat-messages,
.route-review.is-agent-workspace .agent-chat-messages {
  grid-column: 1;
  grid-row: 2;
  padding-bottom: 22px;
  scroll-padding-bottom: 22px;
}

.route-review .agent-chat-scroll-fade,
.route-review.is-agent-workspace .agent-chat-scroll-fade {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  justify-self: stretch;
  z-index: 4;
  width: 100%;
  height: 52px;
  overflow: hidden;
  contain: strict;
  clip-path: inset(0);
  pointer-events: none;
  background: rgba(248, 250, 254, .08);
  -webkit-backdrop-filter: blur(8px) saturate(106%);
  backdrop-filter: blur(8px) saturate(106%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .32) 38%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .32) 38%, #000 100%);
}

.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  grid-column: 1;
  grid-row: 3;
  isolation: auto;
  overflow-y: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, .86);
  background: #fbfcfe;
}

.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  background: #fff;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .route-review .agent-chat-scroll-fade,
  .route-review.is-agent-workspace .agent-chat-scroll-fade {
    display: none;
  }
}

@media (max-height: 700px) {
  .route-review .agent-chat-scroll-fade,
  .route-review.is-agent-workspace .agent-chat-scroll-fade {
    height: 42px;
    -webkit-backdrop-filter: blur(7px) saturate(104%);
    backdrop-filter: blur(7px) saturate(104%);
  }

  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    padding-top: 8px;
  }
}

@media (max-width: 760px) {
  .route-review .agent-chat-scroll-fade,
  .route-review.is-agent-workspace .agent-chat-scroll-fade {
    height: 38px;
    -webkit-backdrop-filter: blur(6px) saturate(103%);
    backdrop-filter: blur(6px) saturate(103%);
  }

  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    padding-top: 8px;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  .route-review .agent-chat-scroll-fade,
  .route-review.is-agent-workspace .agent-chat-scroll-fade {
    display: none;
  }
}

/* Composer-bounded scroll glass v237: records blur behind the composer, never above its input edge. */
.route-review .agent-chat-panel,
.route-review.is-agent-workspace .agent-chat-panel {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
}

.route-review .agent-chat-messages,
.route-review.is-agent-workspace .agent-chat-messages {
  grid-column: 1;
  grid-row: 2;
  padding-bottom: calc(var(--agent-composer-clearance, 126px) + 18px);
  scroll-padding-bottom: calc(var(--agent-composer-clearance, 126px) + 18px);
}

.route-review .agent-chat-composer,
.route-review.is-agent-workspace .agent-chat-composer {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  grid-row: auto;
  width: 100%;
  max-height: 320px;
  overflow: visible;
  padding-top: 12px;
  border-top: 0;
  background: transparent;
  pointer-events: none;
}

.route-review .agent-chat-composer-glass,
.route-review.is-agent-workspace .agent-chat-composer-glass {
  display: block;
  position: absolute;
  z-index: 0;
  top: var(--agent-composer-glass-top, 12px);
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  contain: paint;
  clip-path: inset(0);
  pointer-events: none;
  background: rgba(248, 250, 254, .16);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 100%);
}

.route-review .agent-chat-composer > :not(.agent-chat-composer-glass),
.route-review.is-agent-workspace .agent-chat-composer > :not(.agent-chat-composer-glass) {
  position: relative;
  z-index: 1;
}

.route-review .agent-chat-quick,
.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-quick,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  pointer-events: auto;
}

.route-review .agent-chat-input-wrap,
.route-review.is-agent-workspace .agent-chat-input-wrap {
  background: rgba(255, 255, 255, .96);
}

.route-review .agent-chat-to-latest,
.route-review.is-agent-workspace .agent-chat-to-latest {
  bottom: calc(var(--agent-composer-clearance, 126px) + 12px);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .route-review .agent-chat-composer-glass,
  .route-review.is-agent-workspace .agent-chat-composer-glass {
    background: rgba(248, 250, 254, .9);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-height: 700px) {
  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    --agent-composer-glass-top: 8px;
    padding-top: 8px;
  }

  .route-review .agent-chat-composer-glass,
  .route-review.is-agent-workspace .agent-chat-composer-glass {
    -webkit-backdrop-filter: blur(11px) saturate(106%);
    backdrop-filter: blur(11px) saturate(106%);
  }
}

@media (max-width: 760px) {
  .route-review .agent-chat-messages,
  .route-review.is-agent-workspace .agent-chat-messages {
    padding-bottom: calc(var(--agent-composer-clearance, 116px) + 14px);
    scroll-padding-bottom: calc(var(--agent-composer-clearance, 116px) + 14px);
  }

  .route-review .agent-chat-composer,
  .route-review.is-agent-workspace .agent-chat-composer {
    --agent-composer-glass-top: 8px;
    padding-top: 8px;
  }

  .route-review .agent-chat-composer-glass,
  .route-review.is-agent-workspace .agent-chat-composer-glass {
    -webkit-backdrop-filter: blur(10px) saturate(104%);
    backdrop-filter: blur(10px) saturate(104%);
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  .route-review .agent-chat-composer-glass,
  .route-review.is-agent-workspace .agent-chat-composer-glass {
    background: #fbfcfe;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* First research opt-in after competitor binding v228. */
.benchmark-first-research-prompt {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 620px;
}

.benchmark-first-research-prompt-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: var(--v3-primary);
  background: #edf4ff;
}

.benchmark-first-research-prompt h3 {
  margin: 5px 0 8px;
  color: var(--v3-text);
  font-size: 20px;
}

.benchmark-first-research-prompt p {
  margin: 0;
  color: var(--v3-muted);
  line-height: 1.7;
}

.benchmark-first-research-actions {
  grid-column: 1 / -1;
  margin-top: 8px;
}

/* Cross-platform scroll contract v255: one scroll owner, reachable actions, Win/macOS parity. */
body.modal-open { overflow: hidden !important; }

.modal-backdrop {
  overflow: hidden;
  padding: clamp(8px, 2.5vh, 22px);
}

.modal-card {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.modal-card > header { flex: 0 0 auto; }

.modal-body {
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
  -webkit-overflow-scrolling: touch;
}

.modal-body:focus-visible,
.v3-scroll-region:focus-visible,
.v3-account-menu:focus-visible {
  outline: 3px solid rgba(20, 88, 212, .14);
  outline-offset: -3px;
}

.storage-record-modal .modal-body { overflow: hidden; }
.storage-record-browser {
  height: min(680px, calc(100vh - 140px));
  height: min(680px, calc(100dvh - 140px));
  min-height: 0;
  max-height: 100%;
}
.storage-record-table-wrap {
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

/* Search results follow the modal's single vertical scroll owner. */
.own-account-search-results {
  max-height: none;
  overflow-y: visible;
}

.v3-account-menu {
  max-height: min(620px, calc(100vh - 32px));
  max-height: min(620px, calc(100dvh - 32px));
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* Desktop browsers keep one predictable page scroller regardless of window width. */
@media (min-width: 821px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .v3-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .v3-shell > .main {
    height: 100%;
    min-height: 0;
  }

  .v3-shell .v3-scroll-region {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 820px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  .v3-shell {
    min-height: 100vh;
    min-height: 100dvh;
  }
}

/* A 12px track with a 8px visible thumb remains practical with a Windows mouse. */
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-thumb {
  min-width: 48px;
  min-height: 48px;
  border-width: 2px;
}

:is(.v3-scroll-region, .modal-body, .v3-account-menu, .storage-record-table-wrap) {
  scrollbar-width: auto;
}

@media (max-height: 560px) {
  .modal-backdrop { padding: 8px; }
  .modal-card {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .storage-record-overview { padding: 10px 12px; }
  .storage-record-toolbar,
  .storage-record-footer { padding-block: 8px; }
}

/* Keep the script-editing context visible without letting it overrun the composer. */
.route-review .agent-composer-script-context {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 520px);
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(67, 111, 202, 0.2);
  border-radius: 10px;
  background: rgba(232, 240, 255, 0.78);
  color: #27426f;
}

.route-review .agent-composer-script-context > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #2458be;
}

.route-review .agent-composer-script-context > span svg {
  width: 15px;
  height: 15px;
}

.route-review .agent-composer-script-context > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px 8px;
}

.route-review .agent-composer-script-context small {
  grid-column: 1 / -1;
  color: #687fa7;
  font-size: 10px;
  line-height: 1.2;
}

.route-review .agent-composer-script-context strong {
  overflow: hidden;
  min-width: 0;
  color: #18345f;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-review .agent-composer-script-context em {
  align-self: center;
  color: #2458be;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.route-review .agent-composer-script-context button {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6f82a3;
  cursor: pointer;
}

.route-review .agent-composer-script-context button:hover,
.route-review .agent-composer-script-context button:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  color: #173f87;
  outline: none;
}

.route-review .agent-composer-script-context .agent-script-abandon {
  display: inline-flex;
  width: auto;
  min-width: 72px;
  padding: 0 10px;
  border-color: rgba(185, 92, 73, 0.2);
  color: #9a4939;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.route-review .agent-composer-script-context.is-locked {
  border-color: rgba(62, 111, 207, 0.28);
  box-shadow: inset 3px 0 0 #316bd1;
}

@media (max-width: 640px) {
  .route-review .agent-composer-script-context {
    width: 100%;
  }
}

/* New-user activation: choice, identity confirmation, and persistent progress. */
.modal-card.onboarding-modal {
  width: min(720px, calc(100vw - 32px));
  border: 1px solid #d9e4f2;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(20, 43, 78, 0.24);
}

.modal-card.onboarding-modal > header {
  padding: 16px 20px;
  border-bottom: 1px solid #e6edf6;
}

.modal-card.onboarding-modal .modal-body { padding: 0; }

.onboarding-welcome,
.onboarding-identity-confirm { padding: 26px; }

.onboarding-welcome-copy h2,
.onboarding-confirm-heading h2 {
  margin: 7px 0 8px;
  color: #102847;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.18;
}

.onboarding-welcome-copy p,
.onboarding-confirm-heading p {
  max-width: 600px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.onboarding-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.onboarding-choice {
  display: grid;
  min-height: 205px;
  padding: 20px;
  text-align: left;
  border: 1px solid #d7e1ee;
  border-radius: 17px;
  background: #fff;
  color: #163252;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.onboarding-choice:hover,
.onboarding-choice:focus-visible {
  border-color: #5b8def;
  box-shadow: 0 12px 28px rgba(49, 107, 209, 0.13);
  outline: none;
  transform: translateY(-2px);
}

.onboarding-choice.is-primary {
  border-color: #83a8ef;
  background: linear-gradient(145deg, #f7faff, #edf4ff);
}

.onboarding-choice i {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 12px;
  background: #e8f0ff;
  color: #2458be;
}

.onboarding-choice i svg { width: 22px; height: 22px; }
.onboarding-choice strong { font-size: 18px; }
.onboarding-choice span { margin-top: 9px; color: #64748b; font-size: 13px; line-height: 1.6; }
.onboarding-choice em { align-self: end; margin-top: 18px; color: #316bd1; font-size: 12px; font-style: normal; font-weight: 750; }

.onboarding-account-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin: 22px 0;
  padding: 17px;
  border: 1px solid #d8e4f3;
  border-radius: 16px;
  background: #f8fbff;
}

.onboarding-account-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(24, 58, 99, 0.12);
}

.onboarding-account-card div { display: grid; gap: 4px; min-width: 0; }
.onboarding-account-card div strong { overflow: hidden; color: #173453; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-account-card div span,
.onboarding-account-card div em { color: #6b7f99; font-size: 12px; font-style: normal; }
.onboarding-account-card > b { padding: 5px 9px; border-radius: 999px; background: #e4f6ed; color: #18734b; font-size: 11px; }

.onboarding-confirm-actions { display: grid; gap: 9px; }
.onboarding-confirm-actions .v3-btn { min-height: 44px; justify-content: center; }
.onboarding-text-button { justify-self: center; padding: 7px 12px; border: 0; background: transparent; color: #9b4b43; cursor: pointer; }
.onboarding-security-note { margin: 12px 0 0; color: #7b8da5; font-size: 11px; line-height: 1.55; text-align: center; }

.onboarding-progress-card {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 286px;
  padding: 16px;
  border: 1px solid #d8e3f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 48px rgba(16, 40, 71, 0.18);
  backdrop-filter: blur(12px);
}

.onboarding-progress-card header { display: flex; align-items: center; justify-content: space-between; color: #173453; }
.onboarding-progress-card header span { font-size: 13px; font-weight: 800; }
.onboarding-progress-card header strong { color: #316bd1; font-size: 12px; }
.onboarding-progress-track { height: 5px; margin: 10px 0 13px; overflow: hidden; border-radius: 999px; background: #e8eef7; }
.onboarding-progress-track i { display: block; height: 100%; border-radius: inherit; background: #316bd1; transition: width 220ms ease; }
.onboarding-progress-card ol { display: grid; gap: 8px; margin: 0 0 13px; padding: 0; list-style: none; }
.onboarding-progress-card li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; color: #8a9aaf; font-size: 12px; }
.onboarding-progress-card li b { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #d7e0ec; border-radius: 50%; background: #fff; font-size: 10px; }
.onboarding-progress-card li.is-current { color: #173f87; font-weight: 750; }
.onboarding-progress-card li.is-current b { border-color: #7da3e8; background: #eaf1ff; color: #2458be; }
.onboarding-progress-card li.is-done { color: #4d647d; }
.onboarding-progress-card li.is-done b { border-color: #8ed2b3; background: #e7f7ef; color: #18734b; }
.onboarding-progress-card .v3-btn { width: 100%; min-height: 38px; justify-content: center; }
.onboarding-progress-actions { display: grid; gap: 5px; }
.onboarding-progress-actions .onboarding-text-button { color: #526b89; font-size: 11px; }
.onboarding-restart-button { min-height: 36px; white-space: nowrap; }

body.onboarding-spotlight-active .onboarding-progress-card { visibility: hidden; }

.onboarding-spotlight {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}

.onboarding-spotlight-mask {
  position: fixed;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: grayscale(0.78) brightness(0.76) saturate(0.46);
  pointer-events: none;
  touch-action: auto;
}

.onboarding-spotlight-ring {
  position: fixed;
  z-index: 1101;
  border: 2px solid #4f86ed;
  box-shadow: 0 0 0 4px rgba(79, 134, 237, 0.2), 0 0 28px rgba(55, 112, 219, 0.58);
  pointer-events: none;
  animation: onboarding-spotlight-pulse 1.8s ease-in-out infinite;
}

.onboarding-spotlight-coach {
  position: fixed;
  z-index: 1102;
  width: min(368px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 17px;
  border: 1px solid #cbd9ed;
  border-radius: 16px;
  background: #fff;
  color: #173453;
  box-shadow: 0 24px 64px rgba(8, 24, 48, 0.3);
  pointer-events: auto;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.onboarding-spotlight-coach.is-reminding {
  transform: scale(1.018);
  box-shadow: 0 28px 72px rgba(8, 24, 48, 0.38), 0 0 0 4px rgba(79, 134, 237, 0.18);
}

.onboarding-spotlight-coach header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.onboarding-spotlight-coach header span {
  color: #316bd1;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.onboarding-spotlight-coach header strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #2458be;
  font-size: 11px;
}

.onboarding-spotlight-coach h3 {
  margin: 0;
  color: #102847;
  font-size: 19px;
  line-height: 1.35;
}

.onboarding-spotlight-coach > p {
  margin: 8px 0 13px;
  color: #62758f;
  font-size: 13px;
  line-height: 1.62;
}

.onboarding-spotlight-warning {
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid #f0d8a8;
  border-radius: 10px;
  background: #fff8e9;
  color: #8a5a13;
  font-size: 11px;
  line-height: 1.5;
}

.onboarding-spotlight-coach footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 11px;
  border-top: 1px solid #e5ecf5;
}

.onboarding-spotlight-coach footer span {
  color: #2458be;
  font-size: 12px;
  font-weight: 780;
}

.onboarding-spotlight-coach footer div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.onboarding-spotlight-coach footer .onboarding-skip-douyin { color: #2458be; font-weight: 750; }

.onboarding-spotlight-coach footer button {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: #71839b;
  font-size: 11px;
  cursor: pointer;
}

.onboarding-spotlight-coach footer button:hover,
.onboarding-spotlight-coach footer button:focus-visible {
  color: #a34a42;
  outline: none;
}

.onboarding-confirm-modal [data-onboarding-confirm-identity] {
  box-shadow: 0 0 0 4px rgba(79, 134, 237, 0.16), 0 10px 28px rgba(49, 107, 209, 0.26);
}

@keyframes onboarding-spotlight-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(79, 134, 237, 0.16), 0 0 22px rgba(55, 112, 219, 0.42); }
  50% { box-shadow: 0 0 0 7px rgba(79, 134, 237, 0.08), 0 0 32px rgba(55, 112, 219, 0.64); }
}

:root[data-theme="dark"] .modal-card.onboarding-modal,
:root[data-theme="dark"] .onboarding-progress-card,
:root[data-theme="dark"] .onboarding-choice { border-color: #31425c; background: #111827; }
:root[data-theme="dark"] .onboarding-choice.is-primary,
:root[data-theme="dark"] .onboarding-account-card { border-color: #355a95; background: #17233a; }
:root[data-theme="dark"] .onboarding-welcome-copy h2,
:root[data-theme="dark"] .onboarding-confirm-heading h2,
:root[data-theme="dark"] .onboarding-account-card div strong,
:root[data-theme="dark"] .onboarding-progress-card header { color: #e5edf8; }
:root[data-theme="dark"] .onboarding-spotlight-coach { border-color: #35506f; background: #111827; color: #e5edf8; }
:root[data-theme="dark"] .onboarding-spotlight-coach h3 { color: #f1f5f9; }
:root[data-theme="dark"] .onboarding-spotlight-coach > p { color: #a9b8cc; }
:root[data-theme="dark"] .onboarding-spotlight-coach footer { border-color: #2c3c53; }

@media (max-width: 720px) {
  .onboarding-restart-button { display: none; }
  .modal-card.onboarding-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .onboarding-welcome,
  .onboarding-identity-confirm { padding: 20px; }
  .onboarding-choice-grid { grid-template-columns: 1fr; }
  .onboarding-choice { min-height: 158px; }
  .onboarding-progress-card {
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    padding: 13px;
  }
  .onboarding-progress-card ol { display: none; }
  .onboarding-account-card { grid-template-columns: 54px minmax(0, 1fr); }
  .onboarding-account-card img { width: 54px; height: 54px; }
  .onboarding-account-card > b { grid-column: 2; justify-self: start; }
  .onboarding-spotlight-coach { width: auto; max-height: 42dvh; overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-spotlight-ring { animation: none; }
  .onboarding-spotlight-coach { transition: none; }
}

/* Desktop navigation rail: compact by default, expands above content on intent. */
@media (min-width: 821px) {
  .v3-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .v3-shell .v3-sidebar {
    width: 72px;
    min-width: 72px;
    padding: 26px 10px 18px;
    overflow: visible;
    box-shadow: 0 0 0 rgba(24, 39, 67, 0);
    transition:
      width .24s cubic-bezier(.2, .75, .2, 1),
      padding .24s cubic-bezier(.2, .75, .2, 1),
      box-shadow .2s ease;
    will-change: width;
  }

  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within),
  .v3-shell.is-onboarding-active .v3-sidebar {
    width: 232px;
    min-width: 232px;
    padding-right: 16px;
    padding-left: 16px;
    box-shadow: 18px 0 38px rgba(24, 39, 67, .12);
  }

  .v3-sidebar .brand {
    min-height: 46px;
    padding-right: 0;
    padding-left: 0;
    justify-content: center;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .brand,
  .v3-shell.is-onboarding-active .v3-sidebar .brand {
    padding-right: 8px;
    padding-left: 8px;
    justify-content: flex-start;
  }

  .v3-brand-copy,
  .v3-account-mini-copy,
  .v3-account-mini-chevron,
  .v3-sidebar .nav-section-title,
  .v3-sidebar .nav-item-text {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-5px);
    transition:
      max-width .2s cubic-bezier(.2, .75, .2, 1),
      opacity .12s ease,
      visibility .12s linear,
      transform .16s ease;
  }

  .v3-brand-copy {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) :is(.v3-brand-copy, .v3-account-mini-copy, .v3-account-mini-chevron, .nav-section-title, .nav-item-text),
  .v3-shell.is-onboarding-active .v3-sidebar :is(.v3-brand-copy, .v3-account-mini-copy, .v3-account-mini-chevron, .nav-section-title, .nav-item-text) {
    max-width: 168px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 55ms;
  }

  .v3-sidebar .v3-account-switcher {
    width: 52px;
    padding: 0;
    align-self: center;
    transition: width .24s cubic-bezier(.2, .75, .2, 1), padding .24s cubic-bezier(.2, .75, .2, 1);
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-switcher,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-switcher {
    width: 100%;
    padding: 0 4px;
    align-self: stretch;
  }

  .v3-sidebar .v3-account-mini {
    width: 52px;
    min-height: 52px;
    height: 52px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    overflow: hidden;
    transition:
      width .24s cubic-bezier(.2, .75, .2, 1),
      height .24s cubic-bezier(.2, .75, .2, 1),
      padding .24s cubic-bezier(.2, .75, .2, 1),
      border-color .18s ease,
      box-shadow .18s ease,
      background .18s ease;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-mini,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-mini {
    width: 100%;
    min-height: 62px;
    height: 62px;
    padding: 10px 48px 10px 12px;
    display: block;
  }

  .v3-account-mini .v3-account-mini-icon {
    position: absolute;
    inset: 0;
    display: grid;
    color: var(--v3-primary);
    opacity: 1;
    pointer-events: none;
    place-items: center;
    transition: opacity .12s ease;
  }

  .v3-account-mini .v3-account-mini-icon svg {
    width: 21px;
    height: 21px;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-mini-icon,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-mini-icon {
    opacity: 0;
  }

  .v3-account-mini-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    text-align: left;
  }

  .v3-account-mini-copy > :is(span, strong, em) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .v3-sidebar .v3-account-mini-chevron {
    pointer-events: none;
  }

  .v3-sidebar .nav {
    gap: 13px;
    overflow-x: hidden;
  }

  .v3-sidebar .nav-section {
    gap: 7px;
  }

  .v3-sidebar .nav-section-title {
    height: 0;
    padding: 0;
    white-space: nowrap;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav,
  .v3-shell.is-onboarding-active .v3-sidebar .nav {
    gap: 20px;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav-section,
  .v3-shell.is-onboarding-active .v3-sidebar .nav-section {
    gap: 4px;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav-section-title,
  .v3-shell.is-onboarding-active .v3-sidebar .nav-section-title {
    height: auto;
    padding: 0 10px 5px;
  }

  .v3-sidebar .nav button,
  .v3-sidebar .nav-item {
    padding-right: 0;
    padding-left: 0;
    justify-content: center;
    gap: 0;
  }

  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav button,
  .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav-item,
  .v3-shell.is-onboarding-active .v3-sidebar :is(.nav button, .nav-item) {
    padding-right: 10px;
    padding-left: 10px;
    justify-content: flex-start;
    gap: 10px;
  }

  .v3-sidebar .nav button:hover,
  .v3-sidebar .nav-item:hover {
    transform: none;
  }
}

@media (min-width: 821px) and (prefers-reduced-motion: reduce) {
  .v3-shell .v3-sidebar,
  .v3-sidebar .v3-account-switcher,
  .v3-sidebar .v3-account-mini,
  .v3-brand-copy,
  .v3-account-mini-copy,
  .v3-account-mini-icon,
  .v3-account-mini-chevron,
  .v3-sidebar .nav-section-title,
  .v3-sidebar .nav-item-text {
    transition: none !important;
  }
}

.v3-sidebar-toggle {
  display: none;
}

/* Global desktop sidebar rail: persistent across routes and synchronized with the content grid. */
@media (min-width: 821px) {
  .v3-shell {
    grid-template-columns: 232px minmax(0, 1fr);
    transition: grid-template-columns .22s cubic-bezier(.2, .72, .2, 1);
  }

  .v3-shell .v3-sidebar,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within),
  .v3-shell.is-onboarding-active .v3-sidebar {
    width: 232px;
    min-width: 232px;
    padding: 26px 16px 18px;
    overflow: visible;
    box-shadow: none;
    transition: width .22s cubic-bezier(.2, .72, .2, 1), min-width .22s cubic-bezier(.2, .72, .2, 1), padding .22s cubic-bezier(.2, .72, .2, 1);
    will-change: auto;
  }

  .v3-shell .v3-sidebar .brand,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .brand,
  .v3-shell.is-onboarding-active .v3-sidebar .brand {
    min-height: 46px;
    padding-right: 8px;
    padding-left: 8px;
    justify-content: flex-start;
  }

  .v3-shell .v3-sidebar :is(.v3-brand-copy, .v3-account-mini-copy, .v3-account-mini-chevron, .nav-section-title, .nav-item-text, .sidebar-toggle-label),
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) :is(.v3-brand-copy, .v3-account-mini-copy, .v3-account-mini-chevron, .nav-section-title, .nav-item-text, .sidebar-toggle-label),
  .v3-shell.is-onboarding-active .v3-sidebar :is(.v3-brand-copy, .v3-account-mini-copy, .v3-account-mini-chevron, .nav-section-title, .nav-item-text, .sidebar-toggle-label) {
    max-width: 168px;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition:
      max-width .18s cubic-bezier(.2, .72, .2, 1) .075s,
      opacity .13s ease .08s,
      visibility 0s linear .075s;
  }

  .v3-shell .v3-sidebar .v3-account-switcher,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-switcher,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-switcher {
    width: 100%;
    padding: 0 4px;
    align-self: stretch;
    transition: width .22s cubic-bezier(.2, .72, .2, 1), padding .22s cubic-bezier(.2, .72, .2, 1);
  }

  .v3-shell .v3-sidebar .v3-account-mini,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-mini,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-mini {
    width: 100%;
    min-height: 82px;
    height: 82px;
    padding: 10px 48px 10px 12px;
    display: block;
    transition: width .22s cubic-bezier(.2, .72, .2, 1), height .22s cubic-bezier(.2, .72, .2, 1), padding .22s cubic-bezier(.2, .72, .2, 1), border-color .16s ease, box-shadow .16s ease, background .16s ease;
  }

  .v3-shell .v3-sidebar .v3-account-mini-copy,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-mini-copy,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-mini-copy {
    height: 100%;
    align-content: center;
  }

  .v3-shell .v3-sidebar .v3-account-mini-icon,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .v3-account-mini-icon,
  .v3-shell.is-onboarding-active .v3-sidebar .v3-account-mini-icon {
    opacity: 0;
  }

  .v3-account-mini-icon img {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    object-fit: cover;
  }

  .v3-shell .v3-sidebar .v3-brand-mark {
    transition: width .2s ease, height .2s ease, border-color .16s ease, border-radius .16s ease, background .16s ease, box-shadow .16s ease;
  }

  .v3-shell .v3-sidebar .v3-brand-mark img {
    transition: width .2s ease, height .2s ease;
  }

  .v3-shell .v3-sidebar .nav,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav,
  .v3-shell.is-onboarding-active .v3-sidebar .nav {
    gap: 20px;
    overflow-x: hidden;
  }

  .v3-shell .v3-sidebar .nav-section,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav-section,
  .v3-shell.is-onboarding-active .v3-sidebar .nav-section {
    gap: 4px;
  }

  .v3-shell .v3-sidebar .nav-section-title,
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) .nav-section-title,
  .v3-shell.is-onboarding-active .v3-sidebar .nav-section-title {
    height: auto;
    max-height: 24px;
    padding: 0 10px 5px;
    white-space: nowrap;
    transition:
      max-height .16s cubic-bezier(.2, .72, .2, 1) .075s,
      padding .16s cubic-bezier(.2, .72, .2, 1) .075s,
      max-width .18s cubic-bezier(.2, .72, .2, 1) .075s,
      opacity .13s ease .08s,
      visibility 0s linear .075s;
  }

  .v3-shell .v3-sidebar :is(.nav button, .nav-item),
  .v3-shell .v3-sidebar:is(.is-sidebar-expanded, .is-account-menu-open, :focus-within) :is(.nav button, .nav-item),
  .v3-shell.is-onboarding-active .v3-sidebar :is(.nav button, .nav-item) {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    flex: 0 0 52px;
    padding-right: 10px;
    padding-left: 10px;
    justify-content: flex-start;
    gap: 10px;
    transition: padding .18s ease, gap .18s ease, background .16s ease, color .16s ease;
  }

  .v3-sidebar-toggle {
    display: flex;
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #60708a;
    font: inherit;
    cursor: pointer;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    transition: width .22s cubic-bezier(.2, .72, .2, 1), color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
  }

  .v3-sidebar-toggle:hover {
    background: #f3f6fb;
    color: var(--v3-primary);
  }

  .v3-sidebar-toggle:focus-visible {
    outline: none;
    background: #edf3fb;
    color: #356ac3;
  }

  .v3-sidebar-toggle .nav-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
  }

  .v3-sidebar-toggle .sidebar-toggle-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .v3-sidebar-toggle .sidebar-expand-icon {
    display: none;
  }

  .v3-sidebar-toggle .sidebar-collapse-icon .ui-icon {
    transform: scaleX(-1);
  }

  .v3-sidebar-toggle .sidebar-expand-icon .ui-icon {
    transform: none;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar {
    width: 72px;
    min-width: 72px;
    padding: 26px 10px 18px;
    box-shadow: none;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .brand {
    padding-right: 0;
    padding-left: 0;
    justify-content: center;
    gap: 0;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .v3-brand-mark {
    width: 44px;
    height: 44px;
    border: 1px solid #d9e6ff;
    border-radius: 14px;
    background: #f4f8ff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .14);
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .v3-brand-mark img {
    width: 38px;
    height: 38px;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar :is(.v3-brand-copy, .v3-account-mini-copy, .v3-account-mini-chevron, .nav-section-title, .nav-item-text, .sidebar-toggle-label) {
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition:
      max-width .15s cubic-bezier(.4, 0, 1, 1),
      opacity .08s ease,
      visibility 0s linear .08s;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .v3-account-switcher {
    width: 52px;
    padding: 0;
    align-self: center;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .v3-account-mini {
    width: 52px;
    min-height: 52px;
    height: 52px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .v3-account-mini-icon {
    opacity: 1;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .nav {
    gap: 13px;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .nav-section {
    gap: 7px;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .nav-section-title {
    height: auto;
    max-height: 0;
    padding: 0;
    transition:
      max-height .12s cubic-bezier(.4, 0, 1, 1),
      padding .12s cubic-bezier(.4, 0, 1, 1),
      max-width .15s cubic-bezier(.4, 0, 1, 1),
      opacity .08s ease,
      visibility 0s linear .08s;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar :is(.nav button, .nav-item) {
    padding-right: 0;
    padding-left: 0;
    justify-content: center;
    gap: 0;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar-toggle {
    width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
    padding: 0;
    align-self: center;
    justify-content: center;
    background: #f1f5fb;
    color: #667085;
    box-shadow: none;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar-toggle:hover {
    background: #e8eef8;
    color: #356ac3;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar-toggle .sidebar-collapse-icon {
    display: none;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar-toggle .sidebar-expand-icon {
    display: inline-flex;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar-toggle .sidebar-toggle-label {
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (min-width: 821px) and (prefers-reduced-motion: reduce) {
  .v3-shell,
  .v3-shell .v3-sidebar,
  .v3-sidebar-toggle,
  .v3-shell .v3-sidebar .v3-brand-mark,
  .v3-shell .v3-sidebar .v3-brand-mark img {
    transition: none !important;
  }
}

/* Global rail rhythm and desktop route motion. */
@media (min-width: 821px) {
  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar .nav-section {
    gap: 19px;
  }

  .v3-shell.is-sidebar-collapsed:not(.is-sidebar-temporary):not(.is-onboarding-active) .v3-sidebar :is(.nav button, .nav-item) {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    flex: 0 0 52px;
  }

  .v3-shell.is-route-entering .v3-topbar-heading {
    animation: route-heading-in .16s cubic-bezier(.2, .72, .2, 1) both;
  }

  .v3-shell.is-route-entering .v3-scroll-region > .content {
    animation: route-content-in .2s cubic-bezier(.2, .72, .2, 1) both;
  }

  .v3-sidebar .nav button.is-route-entering {
    animation: nav-pill-in .18s cubic-bezier(.2, .72, .2, 1) both;
  }
}

@keyframes route-heading-in {
  from { opacity: .72; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes route-content-in {
  from { opacity: .86; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nav-pill-in {
  from { opacity: .82; transform: translateY(1px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 821px) and (prefers-reduced-motion: reduce) {
  .v3-shell.is-route-entering .v3-topbar-heading,
  .v3-shell.is-route-entering .v3-scroll-region > .content,
  .v3-sidebar .nav button.is-route-entering {
    animation: none !important;
  }
}
.membership-expiry-banner {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;padding:18px 22px!important;background:#fff8e9!important;border:1px solid #f3dfb2!important;color:#704a12;}
.membership-expiry-banner p {margin:5px 0 0;font-size:13px;}
@media(max-width:600px){.membership-expiry-banner{align-items:flex-start;flex-direction:column;}}
.referral-reward-action {display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0;color:#e4eeff;}
.referral-reward-action .v3-btn {min-height:44px;background:#fff;color:#124cc7;border:0;font-weight:700;padding:10px 22px;}
.referral-reward-action .v3-btn:disabled {opacity:.6;cursor:not-allowed;}
.referral-reward-action span {font-size:12px;line-height:1.8;}
/* First workspace choice and resumable AI director guide. */
.workspace-entry-screen { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(circle at 15% 15%, #e6efff, transparent 38%), radial-gradient(circle at 88% 80%, #e9f7f3, transparent 34%), #f7f9fd; color: #122c4d; }
.workspace-entry-content { width: min(900px, 100%); padding: clamp(24px, 4vw, 48px); border: 1px solid #e2eaf5; border-radius: 28px; background: rgba(255, 255, 255, .94); box-shadow: 0 24px 70px rgba(30, 58, 94, .1); }
.workspace-entry-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 36px; font-weight: 800; }
.workspace-entry-brand img { width: 38px; height: 38px; object-fit: contain; }
.workspace-entry-content h1 { margin: 9px 0 12px; font-size: clamp(28px, 4vw, 43px); line-height: 1.2; }
.workspace-entry-content > p { max-width: 680px; color: #60748c; line-height: 1.7; }
.workspace-entry-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.workspace-entry-options button { display: flex; min-height: 230px; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid #d8e4f1; border-radius: 20px; background: #fff; color: #183655; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.workspace-entry-options button:first-child { background: linear-gradient(145deg, #fafdff, #edf4ff); }
.workspace-entry-options button:hover, .workspace-entry-options button:focus-visible { border-color: #5b8def; box-shadow: 0 14px 36px rgba(51, 104, 192, .14); outline: none; transform: translateY(-2px); }
.workspace-entry-options button:disabled { cursor: wait; opacity: .7; transform: none; }
.workspace-entry-options i { display: grid; width: 46px; height: 46px; margin-bottom: 20px; place-items: center; border-radius: 14px; background: #e7efff; color: #2b64c5; }
.workspace-entry-options i svg { width: 24px; height: 24px; }
.workspace-entry-options strong { font-size: 21px; }
.workspace-entry-options span { margin: 11px 0 24px; color: #64788f; font-size: 14px; line-height: 1.6; }
.workspace-entry-options em { margin-top: auto; color: #2762c1; font-size: 13px; font-style: normal; font-weight: 800; }
.workspace-entry-content .workspace-entry-error { color: #b33b35; }
.workspace-entry-device-note { font-size: 12px; }
.workspace-guide-slot:not(:empty) { width: min(1200px, calc(100% - 52px)); margin: 12px auto 0; }
.workspace-ai-guide { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 20px; padding: 18px 22px; border: 1px solid #cddff8; border-radius: 18px; background: linear-gradient(110deg, #f4f8ff, #fff); color: #193858; }
.workspace-ai-guide-copy { display: grid; gap: 6px; }
.workspace-ai-guide-copy > span { color: #326aca; font-size: 12px; font-weight: 800; }
.workspace-ai-guide-copy strong { font-size: 17px; }
.workspace-ai-guide-copy p { margin: 0; color: #657a91; font-size: 13px; line-height: 1.6; }
.workspace-ai-guide-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.workspace-ai-guide-later { padding: 8px; border: 0; background: none; color: #60748c; cursor: pointer; }
.workspace-ai-guide.is-paused { padding: 12px 18px; }
.workspace-ai-guide.is-paused div { display: grid; gap: 3px; }
.workspace-ai-guide.is-paused span { color: #64788f; font-size: 12px; }
.workspace-ai-guide.is-paused button { border: 0; background: none; color: #2762c1; font-weight: 800; cursor: pointer; }
.workspace-ai-account-modal { width: min(600px, calc(100vw - 24px)); }
.workspace-ai-account-form { display: grid; gap: 14px; padding: 8px 4px; }
.workspace-ai-account-form > p { margin: 0; color: #64788f; font-size: 13px; line-height: 1.6; }
.workspace-ai-account-form label { display: grid; gap: 6px; color: #26425f; font-size: 13px; font-weight: 700; }
.workspace-ai-account-form input, .workspace-ai-account-form select, .workspace-ai-account-form textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #d5e1ef; border-radius: 9px; background: #fff; color: #173453; font: inherit; font-weight: 400; }
.workspace-ai-account-form textarea { min-height: 76px; resize: vertical; }
.workspace-ai-account-extra { display: grid; gap: 12px; }
.workspace-ai-account-extra[hidden] { display: none; }
.workspace-ai-account-form footer { display: flex; gap: 10px; justify-content: flex-end; }
.workspace-ai-account-form .workspace-ai-account-error { color: #b33b35; }
.workspace-mobile-editor-notice { max-width: 580px; margin: 10vh auto; padding: 32px; border: 1px solid #dce7f4; border-radius: 20px; background: #fff; text-align: center; }
.workspace-mobile-editor-notice p { color: #657a91; line-height: 1.7; }
.workspace-mobile-editor-notice button { margin: 12px auto 0; }
@media (max-width: 720px) {
  .workspace-entry-screen { padding: 12px; }
  .workspace-entry-content { padding: 24px 18px; border-radius: 20px; }
  .workspace-entry-brand { margin-bottom: 24px; }
  .workspace-entry-options { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .workspace-entry-options button { min-height: 174px; padding: 18px; }
  .workspace-entry-options i { margin-bottom: 12px; }
  .workspace-ai-guide { display: grid; padding: 16px; }
  .workspace-ai-guide-actions { justify-content: flex-start; }
}
.v3-shell .content.route-labMontage{width:min(1260px,calc(100% - 48px));padding-top:0}
.route-labMontage .auto-montage-workspace-shell{position:relative;width:100%;min-height:0;background:transparent}
.route-labMontage .auto-montage-workspace-shell:not(.is-studio-takeover){min-height:620px}
.route-labMontage .auto-montage-workspace-shell.is-loading{min-height:620px;background:#f5f7fb}
.route-labMontage #auto-montage-workspace{width:100%;min-height:0}
body.montage-studio-open{overflow:hidden;color-scheme:dark;background:#090d12}
body.montage-studio-open > .v3-shell.is-montage-route{min-height:100dvh;display:block;overflow:hidden;background:#090d12}
body.montage-studio-open > .v3-shell.is-montage-route > .v3-sidebar,
body.montage-studio-open > .v3-shell.is-montage-route > .mobile-appbar,
body.montage-studio-open > .v3-shell.is-montage-route > .mobile-bottom-nav,
body.montage-studio-open > .v3-shell.is-montage-route > .v3-main > .v3-topbar{visibility:hidden;opacity:0;pointer-events:none}
body.montage-studio-open > .v3-shell.is-montage-route > .v3-main,
body.montage-studio-open > .v3-shell.is-montage-route > .v3-main > .v3-scroll-region,
body.montage-studio-open > .v3-shell.is-montage-route .content.route-labMontage{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;min-height:0;margin:0;padding:0;overflow:hidden;background:#090d12}
body.montage-studio-open > .v3-shell.is-montage-route > .v3-main{z-index:90}
body.montage-studio-open > .v3-shell.is-montage-route > .v3-main > .v3-scroll-region{z-index:91}
body.montage-studio-open > .v3-shell.is-montage-route .content.route-labMontage{z-index:92;display:block}
body.montage-studio-open .route-labMontage .auto-montage-workspace-shell.is-studio-takeover{position:fixed;z-index:93;inset:0;width:100vw;height:100dvh;min-height:0;overflow:hidden;border:0;border-radius:0;background:#090d12;box-shadow:none}
body.montage-studio-open .route-labMontage #auto-montage-workspace{width:100%;height:100%;min-height:0}
.v3-shell.is-montage-route .route-labMontage + .v3-icp-footer{display:none}
@media(max-width:760px){.v3-shell .content.route-labMontage{width:100%;padding:0 16px}.route-labMontage .auto-montage-workspace-shell{border-radius:0}}

/* Video creation entry: animated product previews, scoped to the entry route. */
.v3-shell .content.route-lab { width: min(1100px, calc(100% - 64px)); max-width: none; margin-inline: auto; padding: 30px 0 28px; }
.edit-entry { width: 100%; color: #24395f; container: video-entry / inline-size; }
.edit-entry-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.edit-entry-kicker { display: inline-flex; align-items: center; gap: 7px; color: #5268bc; font-size: 11px; font-weight: 650; line-height: 20px; }
.edit-entry-kicker svg { width: 15px; height: 15px; }
.edit-entry-kicker > span { margin-left: 8px; padding-left: 14px; border-left: 1px solid #d6dceb; color: #8995ac; font-size: 9px; font-weight: 500; letter-spacing: .18em; }
.edit-entry h1 { margin: 11px 0 10px; color: #1e2d4d; font-size: clamp(27px, 2.5vw, 34px); font-weight: 730; line-height: 1.3; letter-spacing: -.04em; }
.edit-entry h1 em { color: #5870d7; font: inherit; }
.edit-entry-intro p { margin: 0; color: #68778f; font-size: 13px; line-height: 1.8; }
.edit-entry-motion { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 7px 10px; margin-bottom: 2px; border: 1px solid #e0e5ef; border-radius: 7px; color: #61708a; background: #ffffff8c; font: inherit; font-size: 10px; cursor: pointer; transition: color .2s, border-color .2s; }
.edit-entry-motion:hover { color: #4a64cd; border-color: #bfcbee; }
.edit-entry-motion:focus-visible { outline: 3px solid #879ded; outline-offset: 3px; }
.edit-entry-motion:disabled { cursor: default; }
.edit-entry-motion-indicator { width: 5px; height: 5px; border-radius: 50%; background: #667ddb; box-shadow: 0 0 0 3px #e7ebfa; }
.edit-entry-motion[aria-pressed="false"] .edit-entry-motion-indicator { background: #9aa5b7; box-shadow: 0 0 0 3px #e9ecf1; }
.edit-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 24px; margin-top: 26px; perspective: 1400px; }
.edit-entry-card { --entry-accent: #5269d9; --entry-tint: #edf1ff; --entry-line: #dee5ff; box-sizing: border-box; position: relative; display: flex; min-width: 0; flex-direction: column; padding: 7px; border: 1px solid #dfe5f0; border-radius: 23px; background: #fff; color: #24395f; text-align: left; box-shadow: 0 2px 3px #26355a03, 0 8px 20px #26355a05, 0 24px 45px -28px #364b8d30; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s, border-color .3s; animation: entry-card-reveal .65s cubic-bezier(.2,.8,.2,1) both; }
.edit-entry-card-montage { --entry-accent: #7963c6; --entry-tint: #f3effc; --entry-line: #e9e1fa; animation-delay: .09s; }
.edit-entry-card:hover { transform: translateY(-5px); border-color: #bac7ee; box-shadow: 0 5px 10px #26355a04, 0 20px 42px #3a529316, 0 0 0 4px #e9edfb70; }
.edit-entry-card-montage:hover { border-color: #ccc0e8; box-shadow: 0 5px 10px #26355a04, 0 20px 42px #67508c16, 0 0 0 4px #eeebf970; }
.edit-entry-card:active { transform: translateY(-1px) scale(.994); }
.edit-entry-card:focus-visible { outline: 3px solid #879ded; outline-offset: 4px; }
.edit-entry-card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 21px 21px 13px; }
.edit-entry-title-row { display: flex; align-items: center; gap: 9px; width: 100%; }
.edit-entry-icon { display: grid; width: 27px; height: 27px; place-items: center; flex: none; border-radius: 8px; background: var(--entry-tint); color: var(--entry-accent); }
.edit-entry-icon svg { width: 17px; height: 17px; }
.edit-entry-card .edit-entry-card-title { color: #223251; font-size: 21px; font-weight: 720; line-height: 1.35; letter-spacing: -.035em; }
.edit-entry-badge { flex: none; margin-left: auto; padding: 4px 7px; border: 1px solid #edf0f5; border-radius: 5px; color: #61708a; font-size: 10px; font-weight: 400; line-height: 1.4; }
.edit-entry-description { display: block; max-width: 34em; margin-top: 10px; color: #64738b; font-size: 12px; line-height: 1.85; }
.edit-entry-features { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin: 11px 0 20px; color: #61749b; font-size: 10px; line-height: 1.4; }
.edit-entry-features > span + span::before { content: ''; display: inline-block; height: 8px; margin: 0 10px; border-left: 1px solid #d9e0ee; }
.edit-entry-card-montage .edit-entry-features { color: #77648e; }
.edit-entry-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding-top: 14px; border-top: 1px solid #edf0f6; }
.edit-entry-format { color: #697990; font-size: 10px; line-height: 1.5; }
.edit-entry-action { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 36px; padding: 0 13px; border-radius: 8px; background: var(--entry-accent); color: #fff; font-size: 11px; font-weight: 550; line-height: 1.5; box-shadow: inset 0 1px #ffffff30, 0 3px 7px #4e65c51a; transition: box-shadow .3s, transform .3s; }
.edit-entry-card:is(:hover,:focus-visible) .edit-entry-action { transform: translateX(2px); box-shadow: inset 0 1px #ffffff30, 0 5px 12px #4e65c533; }
.edit-entry-action svg { width: 14px; height: 14px; transition: transform .3s; }
.edit-entry-card:is(:hover,:focus-visible) .edit-entry-action svg { transform: translateX(3px); }
.edit-entry-scene { position: relative; display: block; width: 100%; height: 180px; flex: none; overflow: hidden; border-radius: 17px 17px 9px 9px; background: #edf2fe; isolation: isolate; }
.edit-entry-scene-montage { background: #f0edf9; }
.edit-entry-scene-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .26; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.edit-entry-scene-montage .edit-entry-scene-art { transform: scaleX(-1); filter: hue-rotate(25deg); opacity: .19; }
.edit-entry-card:hover .edit-entry-scene-single .edit-entry-scene-art { transform: scale(1.08); }
.edit-entry-card:hover .edit-entry-scene-montage .edit-entry-scene-art { transform: scaleX(-1) scale(1.08); }
.edit-entry-scene-label,.edit-entry-demo-label { position: absolute; top: 12px; color: #677fb3; font-size: 8px; font-weight: 550; letter-spacing: .13em; }
.edit-entry-scene-label { left: 17px; }
.edit-entry-demo-label { right: 15px; color: #7c8faf; font-size: 9px; letter-spacing: .03em; }
.edit-entry-scene-montage :is(.edit-entry-scene-label,.edit-entry-demo-label) { color: #8e7eaf; }
.edit-entry-demo-editor { position: absolute; left: 50%; top: 31px; display: block; width: 266px; padding: 9px 11px 10px; border: 1px solid #fff; border-radius: 10px; background: #ffffffed; box-shadow: 0 14px 25px -9px #37569c33, 0 1px 3px #29456a0d; transform: translateX(-50%) rotate(-3deg) scale(var(--entry-demo-scale, 1)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.edit-entry-card:is(:hover,:focus-visible) .edit-entry-demo-editor { transform: translateX(-50%) translateY(-3px) rotate(0) scale(var(--entry-demo-scale, 1)); }
.edit-entry-demo-toolbar { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; color: #7084ad; font-size: 8px; }
.edit-entry-demo-toolbar > svg { width: 10px; height: 10px; }
.edit-entry-demo-time { margin-left: auto; color: #a0aac0; font-size: 7px; font-variant-numeric: tabular-nums; }
.edit-entry-demo-content { display: flex; gap: 12px; }
.edit-entry-demo-video { position: relative; display: block; flex: 0 0 107px; height: 65px; overflow: hidden; border-radius: 5px; background: #dce5f5; }
.edit-entry-presenter { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }
.edit-entry-demo-caption { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: max-content; padding: 3px 5px; border-radius: 3px; background: #213149c4; color: #fff; font-size: 7px; letter-spacing: .025em; }
.edit-entry-demo-caption > span { color: #f2dd89; }
.edit-entry-demo-transcript { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 5px; padding-top: 1px; }
.edit-entry-demo-transcript > span:first-child { margin-bottom: 1px; color: #9aa7bf; font-size: 7px; }
.edit-entry-transcript-line { padding: 1px 4px; color: #8b99b0; font-size: 8px; line-height: 1.3; }
.edit-entry-transcript-line.is-highlighted { color: #637bdd; background: #edf2ff; border-radius: 2px; animation: entry-caption-highlight 5.6s ease-in-out infinite; }
.edit-entry-demo-timeline { position: relative; display: block; margin-top: 8px; padding: 4px 0 0; border-top: 1px solid #f0f2f9; }
.edit-entry-demo-track { display: flex; gap: 3px; }
.edit-entry-demo-track > i { flex: 3; padding: 3px 7px; border-radius: 3px; background: #dce5fb; color: #7b93c4; font-size: 6px; font-style: normal; }
.edit-entry-demo-track > i:nth-child(2) { flex: 2; background: #c2d2f6; color: #6881b6; }
.edit-entry-demo-track > i:nth-child(3) { flex: 1; }
.edit-entry-demo-subtitles { display: flex; gap: 4px; margin-top: 3px; }
.edit-entry-demo-subtitles > i { height: 3px; flex: 1; border-radius: 2px; background: #e6dcfb; }
.edit-entry-demo-subtitles > i:nth-child(even) { flex: 2; }
.edit-entry-playhead { position: absolute; top: 1px; bottom: -2px; left: 6%; width: 1px; background: #708deb; box-shadow: 0 0 0 1px #ffffff50; animation: entry-playhead-sweep 6s ease-in-out infinite; }
.edit-entry-playhead::before { content: ''; position: absolute; top: -1px; left: -2px; width: 5px; height: 4px; border-radius: 1px; background: inherit; }
.edit-entry-float-label { position: absolute; right: 22px; bottom: 18px; display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid #ffffffc9; border-radius: 7px; background: #ffffffed; color: #6179ba; font-size: 9px; font-weight: 500; box-shadow: 0 6px 20px #4b69ad16; animation: entry-label-float 5s ease-in-out infinite; }
.edit-entry-float-label svg { width: 11px; height: 11px; }
.edit-entry-scene-montage .edit-entry-float-label { right: 22px; bottom: 58px; color: #8c75b1; animation-delay: -.9s; }
.edit-entry-shot-strip { position: absolute; top: 37px; left: 50%; display: flex; gap: 9px; width: min(283px, calc(100% - 38px)); transform: translateX(-50%); }
.edit-entry-shot { position: relative; display: block; flex: 1; height: 94px; padding: 4px; border: 1px solid #ffffffec; border-radius: 8px; background: #fffffffa; box-shadow: 0 9px 17px -5px #584b812e; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.edit-entry-shot:nth-child(1) { transform: translateY(5px) rotate(-8deg); }
.edit-entry-shot:nth-child(2) { z-index: 1; transform: translateY(-2px); }
.edit-entry-shot:nth-child(3) { transform: translateY(5px) rotate(8deg); }
.edit-entry-card:is(:hover,:focus-visible) .edit-entry-shot:nth-child(1) { transform: translate(-9px,1px) rotate(-12deg); }
.edit-entry-card:is(:hover,:focus-visible) .edit-entry-shot:nth-child(2) { transform: translateY(-8px); }
.edit-entry-card:is(:hover,:focus-visible) .edit-entry-shot:nth-child(3) { transform: translate(9px,1px) rotate(12deg); }
.edit-entry-shot img { display: block; width: 100%; height: 65px; border-radius: 4px; object-fit: cover; }
.edit-entry-shot > span { display: flex; gap: 6px; align-items: center; margin: 5px 1px 0; color: #a59aba; font-size: 7px; }
.edit-entry-shot b { color: #87779c; font-size: 7px; font-weight: 450; }
.edit-entry-montage-timeline { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; width: min(302px, calc(100% - 24px)); height: 28px; padding: 6px 9px; border: 1px solid #ffffffcc; border-radius: 6px; background: #ffffffda; box-shadow: 0 4px 9px #67528c09; }
.edit-entry-montage-timeline > span:first-child { display: inline-flex; align-items: center; gap: 4px; color: #9885b5; font-size: 7px; white-space: nowrap; }
.edit-entry-montage-timeline svg { width: 10px; height: 10px; color: #a18cbd; }
.edit-entry-montage-sequence { position: relative; display: flex; flex: 1; gap: 3px; }
.edit-entry-montage-sequence i { display: block; flex: 1; padding: 2px 4px; background: #e5dff4; border-radius: 2px; color: #a290bf; font-size: 6px; font-style: normal; }
.edit-entry-montage-sequence i:nth-child(2) { flex: 1.35; background: #d7c9ed; }
.edit-entry-montage-sequence .edit-entry-playhead { background: #9e82d1; animation-delay: -2s; }
.edit-entry-note { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; padding: 14px 6px; color: #7b88a0; font-size: 11px; line-height: 1.6; }
.edit-entry-note > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.edit-entry-note-icon { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border: 1px solid #e2e7f0; border-radius: 10px; background: #ffffff8c; color: #8c9ab4; }
.edit-entry-note-icon svg { width: 15px; height: 15px; }
.edit-entry-note strong { color: #657691; font-size: 11px; font-weight: 550; }
.edit-entry-note p { margin: 0; color: #61708a; font-size: 11px; line-height: 1.6; }
.edit-entry-note-meta { margin-left: auto; color: #61708a; font-size: 10px; white-space: nowrap; }
@keyframes entry-card-reveal { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@keyframes entry-playhead-sweep { 0%,12% { transform: translateX(0); opacity: 0; } 18% { opacity: 1; } 80% { opacity: 1; } 94%,100% { transform: translateX(195px); opacity: 0; } }
@keyframes entry-label-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes entry-caption-highlight { 0%,20%,85%,100% { opacity: .5; } 35%,70% { opacity: 1; } }
.edit-entry.is-motion-paused *,.edit-entry.is-motion-paused *::before,.edit-entry.is-motion-paused *::after { animation-play-state: paused !important; }
.edit-entry.is-motion-paused .edit-entry-card { animation: none; }
@media (max-width: 1100px) { .edit-entry-card-body { padding: 19px 16px 12px; } .edit-entry-card .edit-entry-card-title { font-size: 19px; } .edit-entry-note-meta { display: none; } .edit-entry-float-label { right: 11px; } .edit-entry-scene-montage .edit-entry-float-label { right: 11px; } }
@media (max-width: 760px) { .v3-shell .content.route-lab { width: calc(100% - 32px); padding: 25px 0 25px; } .edit-entry-intro { align-items: flex-start; gap: 10px; position: relative; } .edit-entry-intro > div { width: 100%; } .edit-entry h1 { font-size: 26px; margin-top: 13px; letter-spacing: -.055em; } .edit-entry-intro p { max-width: 25em; font-size: 12px; } .edit-entry-motion { position: absolute; top: -1px; right: 0; padding: 5px 7px; font-size: 9px; } .edit-entry-kicker > span { display: none; } .edit-entry-grid { grid-template-columns: 1fr; gap: 19px; margin-top: 22px; } .edit-entry-card { border-radius: 20px; } .edit-entry-card-body { padding: 18px 16px 12px; } .edit-entry-card .edit-entry-card-title { font-size: 20px; } .edit-entry-note { align-items: flex-start; gap: 10px; margin-top: 12px; padding-inline: 3px; } .edit-entry-note > div { display: block; } .edit-entry-note p { margin-top: 4px; } }
@container video-entry (max-width: 700px) { .edit-entry-grid { grid-template-columns: 1fr; gap: 19px; } .edit-entry-scene { height: 168px; } .edit-entry-demo-editor { top: 30px; --entry-demo-scale: .92; } .edit-entry-float-label { display: none; } .edit-entry-shot-strip { top: 30px; } .edit-entry-note > div { display: block; } .edit-entry-note p { margin-top: 4px; } .edit-entry-note-meta { display: none; } }
@media (max-width: 380px) { .edit-entry h1 { font-size: 23px; } .edit-entry-card-body { padding-inline: 12px; } .edit-entry-card .edit-entry-card-title { font-size: 18px; } .edit-entry-icon { width: 24px; height: 24px; } .edit-entry-title-row { gap: 7px; } .edit-entry-badge { font-size: 9px; } .edit-entry-description { font-size: 11px; } .edit-entry-action { gap: 8px; padding-inline: 10px; } .edit-entry-format { font-size: 9px; } .edit-entry-float-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .edit-entry *,.edit-entry *::before,.edit-entry *::after { animation: none !important; transition: none !important; } .edit-entry-card:is(:hover,:active),.edit-entry-card:is(:hover,:focus-visible) .edit-entry-action,.edit-entry-card:is(:hover,:focus-visible) .edit-entry-action svg { transform: none; } .edit-entry-playhead { left: 42%; } .edit-entry-card:is(:hover,:focus-visible) .edit-entry-demo-editor { transform: translateX(-50%) rotate(-3deg) scale(var(--entry-demo-scale, 1)); } .edit-entry-card:is(:hover,:focus-visible) .edit-entry-shot:nth-child(1) { transform: translateY(5px) rotate(-8deg); } .edit-entry-card:is(:hover,:focus-visible) .edit-entry-shot:nth-child(2) { transform: translateY(-2px); } .edit-entry-card:is(:hover,:focus-visible) .edit-entry-shot:nth-child(3) { transform: translateY(5px) rotate(8deg); } .edit-entry-card:hover .edit-entry-scene-single .edit-entry-scene-art { transform: none; } .edit-entry-card:hover .edit-entry-scene-montage .edit-entry-scene-art { transform: scaleX(-1); } }

.knowledge-source-assets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; padding: 10px 12px; border: 1px solid #dce6f3; border-radius: 10px; background: #f7faff; }
.knowledge-source-assets span { margin-right: 4px; color: #536a86; font-size: 12px; font-weight: 700; }
.knowledge-source-assets button { padding: 6px 10px; border: 1px solid #cbdcf4; border-radius: 7px; background: #fff; color: #145ab4; font: inherit; font-size: 12px; cursor: pointer; }
.knowledge-source-assets button:hover, .knowledge-source-assets button:focus-visible { border-color: #2c69c8; outline: none; }
.v3-shell .content-assets-tabs {
  width: min(calc(100% - 64px), 1440px);
  margin: 12px auto 18px;
  padding: 8px 10px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #dce6f3;
  border-radius: 14px;
  background: #fff;
}
.content-assets-tabs-title { color: #1b3555; font-size: 14px; font-weight: 800; }
.content-assets-tabs-list { display: flex; align-items: center; gap: 5px; padding: 3px; border-radius: 10px; background: #f2f5fa; }
.content-assets-tabs-list button { min-width: 92px; min-height: 36px; padding: 7px 13px; border: 0; border-radius: 8px; background: transparent; color: #60738e; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.content-assets-tabs-list button:hover { color: #205db4; }
.content-assets-tabs-list button.is-active { background: #fff; color: #1255b8; box-shadow: 0 1px 5px rgba(40, 68, 112, .11); }
.content-assets-tabs-list button:focus-visible { outline: 2px solid #276bd3; outline-offset: 2px; }
@media (min-width: 901px) {
  .v3-shell .content-assets-tabs { width: min(calc(100% - 32px), 1560px); }
}
@media (max-width: 900px) {
  .v3-shell .content-assets-tabs { width: min(calc(100% - 24px), 1440px); margin: 10px auto 14px; }
  .mobile-bottom-nav:has(> button:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .v3-shell .content-assets-tabs { padding: 7px; }
  .content-assets-tabs-title { padding-left: 5px; font-size: 12px; }
  .content-assets-tabs-list button { min-width: 70px; padding: 7px 9px; }
}

/* Content assets: one clear navigation level, with tools inside each page. */
.v3-shell .content-assets-tabs {
  margin: 0 auto 16px;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  border-bottom: 1px solid #dce6f3;
  border-radius: 0;
  background: transparent;
}
.v3-shell .content-assets-tabs-list {
  width: 100%;
  padding: 0;
  gap: 24px;
  border-radius: 0;
  background: transparent;
}
.v3-shell .content-assets-tabs-list button {
  min-width: 140px;
  min-height: 57px;
  padding: 10px 2px 9px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #50647f;
  font-size: 14px;
  text-align: left;
}
.v3-shell .content-assets-tabs-list button span { color: #8190a4; font-size: 11px; font-weight: 500; }
.v3-shell .content-assets-tabs-list button.is-active {
  border-bottom-color: #2467cd;
  background: transparent;
  color: #174d9b;
  box-shadow: none;
}
.v3-shell .content-assets-tabs-list button.is-active span { color: #557294; }
.v3-shell .content-assets-tabs-list button:focus-visible { outline-offset: -3px; }
.v3-shell .knowledge-workspace-toolbar { align-items: flex-end; padding: 2px 0 8px; }
.v3-shell .knowledge-workspace-heading h2,
.v3-shell .knowledge-graph-page-heading h2 { margin: 0; color: #142b48; font-size: 20px; line-height: 1.35; }
.v3-shell .knowledge-workspace-heading p,
.v3-shell .knowledge-graph-page-heading p { margin: 3px 0 0; color: #71839a; font-size: 12px; line-height: 1.5; }
.v3-shell .knowledge-workspace-actions .v3-btn { min-height: 38px; }
.v3-shell .knowledge-workspace-actions .knowledge-graph-open { display: inline-flex; align-items: center; gap: 6px; }
.v3-shell .knowledge-workspace-actions .knowledge-graph-open svg,
.v3-shell .knowledge-graph-page-heading .v3-btn svg { width: 15px; height: 15px; }
.v3-shell .knowledge-graph-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v3-shell .knowledge-graph-page-heading .v3-btn { display: inline-flex; align-items: center; gap: 6px; }
.v3-shell .knowledge-reader-head .v3-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.v3-shell .knowledge-growth-panel.is-compact { margin: 4px 0 0; border-color: #e3eaf4; box-shadow: none; }
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-summary { min-height: 46px; padding: 7px 12px; gap: 10px; }
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-primary { display: block; min-width: 0; }
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-primary > span,
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-progress,
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-quick { display: none; }
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-primary > strong { color: #53657f; font-size: 12px; font-weight: 650; }
.v3-shell .knowledge-growth-pending { margin-left: auto; color: #9b6205; font-size: 11px; font-weight: 750; }
.v3-shell .knowledge-growth-panel.is-expanded .knowledge-growth-pending { display: none; }
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-toggle { margin-left: auto; min-width: 0; border: 0; background: transparent; }
.v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-pending + .knowledge-growth-toggle { margin-left: 0; }
@media (max-width: 900px) {
  .v3-shell .content-assets-tabs { margin: 0 auto 12px; }
  .v3-shell .content-assets-tabs-list { gap: 14px; }
  .v3-shell .knowledge-workspace-toolbar { align-items: flex-start; flex-direction: column; }
  .v3-shell .knowledge-workspace-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 540px) {
  .v3-shell .content-assets-tabs-list button { flex: 1; min-width: 0; padding: 10px 4px 9px; font-size: 13px; }
  .v3-shell .content-assets-tabs-list button span { font-size: 10px; }
  .v3-shell .knowledge-workspace-actions .v3-btn { flex: 1; }
  .v3-shell .knowledge-growth-panel.is-compact .knowledge-growth-summary { flex-wrap: wrap; }
  .v3-shell .knowledge-growth-pending { margin-left: 0; }
}

/* Material and knowledge share the same page header and vertical rhythm. */
.v3-shell .content-assets-page-header {
  min-height: 0;
  margin: 0 0 12px;
  padding: 2px 0 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.v3-shell .content-assets-page-header h2 {
  max-width: none;
  margin: 0;
  color: #142b48;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.v3-shell .content-assets-page-header p {
  max-width: 760px;
  margin: 3px 0 0;
  color: #71839a;
  font-size: 12px;
  line-height: 1.5;
}
.v3-shell .content-assets-page-header .v3-card-actions,
.v3-shell .content-assets-page-header .knowledge-workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-shell .content-assets-page-header .v3-btn { min-height: 38px; }
.v3-shell .content.route-library { gap: 10px; }
.v3-shell .route-library .library-intro.content-assets-page-header { min-height: 0; margin-bottom: 12px; padding: 2px 0 8px; }
.v3-shell .route-library #task-monitor-slot:empty,
.v3-shell .route-library #library-storage-alert-slot:empty { display: none; }
.v3-shell .route-library .library-center-panel { margin-top: 0; }

@media (max-width: 767px) {
  .v3-shell .content-assets-page-header { align-items: stretch; flex-direction: column; gap: 10px; }
  .v3-shell .route-library .library-intro.content-assets-page-header > div:first-child { display: block; }
  .v3-shell .route-library .library-intro.content-assets-page-header .v3-card-actions { width: 100%; }
}

/* Cover templates: browsing and editing are separate screens. */
.route-review.is-publication-workspace .review-page-intro { display: none; }
.publication-gallery { min-height: 650px; padding: clamp(20px, 2.4vw, 34px); border: 1px solid #e5e5f0; border-radius: 22px; background: linear-gradient(145deg, #f6f5fb, #f2f5fb 55%, #f5f2fc); }
.publication-gallery-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.publication-gallery-header h2 { margin: 0 0 4px; color: #232b3b; font-size: clamp(27px, 2.4vw, 34px); line-height: 1.2; }
.publication-gallery-header p { margin: 0; color: #758094; font-size: 13px; line-height: 1.6; }
.publication-gallery-tools { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.publication-gallery-tools > button { min-height: 42px; padding: 0 18px; border-radius: 12px; white-space: nowrap; }
.publication-gallery-search { position: relative; display: flex; align-items: center; width: min(270px, 25vw); height: 42px; border: 1px solid #e1e5ed; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(31, 42, 72, .04); }
.publication-gallery-search input { width: 100%; height: 100%; padding: 0 38px 0 14px; border: 0; outline: 0; background: transparent; color: #26344b; font: inherit; font-size: 12px; }
.publication-gallery-search:focus-within { border-color: #3975d0; box-shadow: 0 0 0 3px rgba(57, 117, 208, .12); }
.publication-gallery-search span { position: absolute; right: 12px; display: grid; place-items: center; color: #98a4b6; pointer-events: none; }
.publication-gallery-search svg { width: 18px; height: 18px; }
.publication-gallery-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 24px 0 16px; }
.publication-gallery-tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; background: #fff; color: #5e6b80; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.publication-gallery-tabs button.is-active { background: #2f65c7; color: #fff; box-shadow: 0 6px 14px rgba(47, 101, 199, .2); }
.publication-gallery-tabs button:focus-visible, .publication-gallery-card-main:focus-visible, .publication-gallery-card-delete:focus-visible { outline: 3px solid rgba(41, 100, 197, .3); outline-offset: 2px; }
.publication-gallery-tabs button span { font-size: 10px; opacity: .8; }
.publication-gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.publication-gallery-filters button { min-height: 34px; padding: 0 13px; border: 1px solid #dfe6f1; border-radius: 999px; background: #fff; color: #60738c; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.publication-gallery-filters button.is-active { border-color: #aac8fa; background: #e8f1ff; color: #235fb6; }
.publication-gallery-filters button:focus-visible { outline: 3px solid rgba(41, 100, 197, .3); outline-offset: 2px; }
.publication-gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; gap: 22px; }
.publication-gallery-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #e5e8f0; border-radius: 15px; background: #fff; box-shadow: 0 3px 10px rgba(32, 44, 75, .05); transition: transform .18s ease, box-shadow .18s ease; }
.publication-gallery-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(32, 44, 75, .12); }
.publication-gallery-card[hidden] { display: none; }
.publication-gallery-card-main { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.publication-gallery-card-image { position: relative; display: block; width: 100%; overflow: hidden; aspect-ratio: 9 / 16; background: #e7eaf1; container-type: inline-size; }
.publication-gallery-card-image > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.publication-gallery-card.is-legacy .publication-gallery-card-image { background: #09111f; }
.publication-gallery-card.is-legacy .publication-gallery-card-image > img { object-fit: contain; }
.publication-gallery-card.is-account .publication-gallery-card-image { background: #101a2e; }
.publication-gallery-card.is-account .publication-gallery-card-image > img { object-fit: contain; }
.publication-gallery-requirement { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 5px 8px; border-radius: 7px; background: rgba(14, 29, 52, .8); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }
.publication-gallery-preview-line { position: absolute; z-index: 1; display: block; padding: .3cqw .5cqw; font-weight: 900; line-height: 1.12; overflow-wrap: anywhere; paint-order: stroke fill; }
.publication-gallery-preview-line.has-shadow { text-shadow: 0 .7cqw 1.2cqw rgba(0, 0, 0, .75); }
.publication-gallery-card-image > i { position: absolute; z-index: 2; right: 10px; bottom: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(22, 37, 67, .86); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; }
.publication-gallery-card:hover .publication-gallery-card-image > i, .publication-gallery-card:focus-within .publication-gallery-card-image > i { opacity: 1; transform: none; }
.publication-gallery-card-meta { display: grid; gap: 4px; min-height: 61px; padding: 10px 12px 11px; }
.publication-gallery-card-meta strong { overflow: hidden; color: #29364c; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.publication-gallery-card-meta small { overflow: hidden; color: #8a96a7; font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.publication-gallery-card-delete { position: absolute; right: 8px; bottom: 8px; padding: 4px 6px; border: 0; border-radius: 5px; background: #fff; color: #a24343; font: inherit; font-size: 10px; cursor: pointer; }
.publication-gallery-empty { padding: 74px 20px; border: 1px dashed #d8deea; border-radius: 16px; background: rgba(255, 255, 255, .68); color: #6b778a; text-align: center; }
.publication-gallery-empty[hidden] { display: none; }
.publication-gallery-empty strong { color: #344258; font-size: 17px; }
.publication-gallery-empty p { margin: 9px 0 16px; font-size: 12px; }
.publication-gallery-empty button { margin: 0 auto; }
.publication-editor-back { display: block; margin: 0 0 10px; padding: 0; border: 0; background: transparent; color: #326bc2; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.publication-change-template { display: inline-block; margin-left: 8px; padding: 0; border: 0; background: transparent; color: #2564bd; font: inherit; font-weight: 800; cursor: pointer; }
.publication-editor-selected-template { display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; padding: 9px; border: 1px solid #dee6f2; border-radius: 12px; background: #f8fbff; }
.publication-editor-selected-template img { width: 58px; height: 95px; border-radius: 7px; object-fit: cover; }
.publication-editor-selected-template div { min-width: 0; display: grid; gap: 7px; }
.publication-editor-selected-template strong { color: #294262; font-size: 13px; }
.publication-editor-selected-template span { color: #78889d; font-size: 10px; }
.publication-editor-template-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.publication-editor-template-actions button { flex: 1 1 120px; }
.publication-studio.is-hot-template { grid-template-columns: minmax(280px, 330px) minmax(450px, 1fr); }
.publication-studio.is-hot-template.is-editing { grid-template-columns: minmax(240px, 300px) minmax(360px, 1fr) minmax(260px, 300px); }
.publication-publish-details { border: 1px solid #dce5f1; border-radius: 13px; background: #fff; }
.publication-publish-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 18px; color: #284263; cursor: pointer; list-style: none; }
.publication-publish-details > summary::-webkit-details-marker { display: none; }
.publication-publish-details > summary strong { font-size: 13px; }
.publication-publish-details > summary span { color: #8390a1; font-size: 11px; }
.publication-publish-details > .publication-publish-row { padding: 0 12px 12px; }
@media (max-width: 1400px) { .publication-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 1120px) { .publication-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .publication-studio.is-hot-template.is-editing { grid-template-columns: minmax(280px, 330px) minmax(360px, 1fr); } }
@media (max-width: 900px) { .publication-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .publication-studio.is-hot-template, .publication-studio.is-hot-template.is-editing { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .publication-gallery { padding: 16px; border-radius: 14px; } .publication-gallery-header { flex-direction: column; gap: 12px; } .publication-gallery-tools { width: 100%; padding-top: 0; } .publication-gallery-search { flex: 1; width: auto; } .publication-gallery-tools > button { padding: 0 11px; font-size: 11px; } .publication-gallery-tabs { margin: 17px 0 20px; } .publication-gallery-grid { gap: 10px; } .publication-gallery-card-meta { padding: 8px; } .publication-gallery-card-image > i { opacity: 1; transform: none; } .publication-publish-details > summary { align-items: flex-start; flex-direction: column; justify-content: center; padding: 8px 14px; } }

/* Cover editor: make the chosen template and the current title visible together. */
.publication-workbench.is-hot-editor { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 12px; }
.publication-workbench.is-hot-editor .publication-heading { grid-column: 1; align-items: center; padding: 10px 16px; }
.publication-workbench.is-hot-editor .publication-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.publication-workbench.is-hot-editor .publication-heading .v3-eyebrow, .publication-workbench.is-hot-editor .publication-heading p { display: none; }
.publication-workbench.is-hot-editor .publication-heading h2 { margin: 0; font-size: 17px; }
.publication-workbench.is-hot-editor .publication-editor-back { margin: 0; padding-right: 12px; border-right: 1px solid #dbe4ef; }
.publication-workbench.is-hot-editor .publication-script-bar { grid-column: 2; display: flex; align-items: center; padding: 10px 13px; }
.publication-workbench.is-hot-editor .publication-script-bar label { width: 100%; display: flex; align-items: center; gap: 9px; }
.publication-workbench.is-hot-editor .publication-script-bar label > span { flex: 0 0 auto; }
.publication-workbench.is-hot-editor .publication-script-bar select { flex: 1; width: 100%; }
.publication-workbench.is-hot-editor .publication-script-bar > div, .publication-workbench.is-hot-editor .publication-script-bar > em { display: none; }
.publication-workbench.is-hot-editor .publication-studio, .publication-workbench.is-hot-editor .publication-publish-details { grid-column: 1 / -1; }
.publication-studio.is-hot-template { grid-template-columns: minmax(300px, 350px) minmax(0, 1fr); gap: 18px; }
.publication-hot-template-panel { padding: 22px; border-color: #e3e8f2; box-shadow: 0 10px 28px rgba(25, 43, 73, .055); }
.publication-hot-template-panel .publication-panel-heading { margin-bottom: 16px; }
.publication-hot-template-panel .publication-panel-heading h3 { margin-top: 6px; font-size: 19px; line-height: 1.3; }
.publication-editor-selected-template { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; margin: 0 0 20px; padding: 10px; border-color: #e3eaf5; background: #f8faff; }
.publication-editor-selected-template img { width: 58px; height: 80px; }
.publication-editor-selected-template div { gap: 3px; }
.publication-editor-selected-template small { color: #8a98aa; font-size: 10px; font-weight: 750; }
.publication-editor-selected-template strong { font-size: 14px; }
.publication-editor-selected-template span { line-height: 1.4; }
.publication-editor-selected-template > button { align-self: start; padding: 5px 7px; border: 0; background: transparent; color: #2366bf; font-size: 11px; font-weight: 800; cursor: pointer; }
.publication-hot-template-panel .publication-hot-title-block { margin: 0; padding: 0; border: 0; }
.publication-hot-template-panel .publication-hot-title-block label { display: grid; gap: 9px; }
.publication-hot-template-panel .publication-hot-title-block label > span { display: flex; justify-content: space-between; color: #273d5c; font-size: 13px; font-weight: 850; }
.publication-hot-template-panel .publication-hot-title-block label > span em { color: #95a1b0; font-size: 10px; font-style: normal; font-weight: 600; }
.publication-hot-template-panel .publication-hot-title-block textarea { width: 100%; min-height: 102px; padding: 13px; border: 1px solid #cddbf0; border-radius: 11px; background: #fff; color: #1e334f; font-size: 16px; font-weight: 750; line-height: 1.5; resize: vertical; }
.publication-hot-template-panel .publication-hot-title-block textarea:focus { border-color: #3174d0; outline: 3px solid rgba(49, 116, 208, .12); }
.publication-hot-template-panel .publication-hot-title-block p, .publication-editor-hint { margin: 8px 0 0; color: #7a8aa0; font-size: 11px; line-height: 1.55; }
.publication-portrait-choice { margin-top: 18px; padding: 14px; border: 1px solid #e2e9f3; border-radius: 13px; background: #fbfcff; }
.publication-portrait-choice.is-required { border-color: #cddff8; background: #f7faff; }
.publication-portrait-choice > div:first-child { display: grid; gap: 4px; }
.publication-portrait-choice strong { color: #2b405d; font-size: 12px; }
.publication-portrait-choice span { color: #8290a2; font-size: 10px; line-height: 1.5; }
.publication-portrait-choice.is-scene { display: grid; gap: 4px; }
.publication-portrait-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.publication-portrait-actions .v3-btn { flex: 1 1 130px; min-height: 36px; font-size: 11px; }
.publication-portrait-choice.is-required .publication-portrait-actions .v3-btn:last-child { border-color: #2c68c2; background: #2c68c2; color: #fff; }
.publication-portrait-choice .publication-selected-portrait { grid-template-columns: 36px minmax(0, 1fr) auto; margin-top: 12px; padding: 6px; }
.publication-portrait-choice .publication-selected-portrait img { width: 36px; height: 43px; }
.publication-editor-template-actions { margin-top: 18px; }
.publication-editor-template-actions .v3-btn { width: 100%; min-height: 38px; }
.publication-studio.is-hot-template .publication-canvas-panel { border-color: #dce5f2; background: #fff; }
.publication-studio.is-hot-template .publication-canvas-toolbar { padding: 15px 20px; }
.publication-studio.is-hot-template .publication-canvas-toolbar strong { font-size: 15px; }
.publication-studio.is-hot-template .publication-canvas-toolbar span { font-size: 11px; }
.publication-studio.is-hot-template .publication-canvas-toolbar .publication-image-quota-hint { margin-top: 3px; color: #7d8ca1; font-size: 10px; font-weight: 600; }
.publication-studio.is-hot-template .publication-canvas-toolbar button.primary { min-height: 38px; padding: 0 16px; border-radius: 10px; font-size: 11px; }
.publication-studio.is-hot-template .publication-canvas-shell { min-height: 608px; padding: 22px; background: radial-gradient(circle at 50% 45%, #ffffff 0, #f5f7fc 58%, #edf2f9 100%); }
.publication-studio.is-hot-template .publication-canvas-shell .publication-cover-stage { width: min(100%, 342px); border: 0; border-radius: 15px; box-shadow: 0 20px 50px rgba(25, 42, 71, .23); }
.publication-cover-stage.is-template-preview::after { display: none; }
.publication-cover-stage.is-legacy-preview { background: #0d1420; }
.publication-cover-stage.is-legacy-preview > img { object-fit: contain; }
.publication-live-title-line { position: absolute; z-index: 2; display: block; padding: .3cqw .5cqw; font-weight: 900; line-height: 1.12; overflow-wrap: anywhere; paint-order: stroke fill; pointer-events: none; }
.publication-live-title-line.has-shadow { text-shadow: 0 .7cqw 1.2cqw rgba(0, 0, 0, .72); }
.publication-stage-badge.is-preview { top: 9px; right: 9px; bottom: auto; border-color: rgba(255, 255, 255, .25); background: rgba(10, 23, 43, .78); }
.publication-preview-summary { display: flex; align-items: baseline; gap: 9px; padding: 14px 20px 2px; }
.publication-preview-summary > span { flex: 0 0 auto; color: #7a8ba2; font-size: 10px; }
.publication-preview-summary > strong { color: #243c5c; font-size: 12px; line-height: 1.4; }
.publication-preview-summary > em { margin-left: auto; color: #8b98aa; font-size: 10px; font-style: normal; text-align: right; }
@media (max-width: 1120px) { .publication-studio.is-hot-template { grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); } }
@media (max-width: 900px) { .publication-workbench.is-hot-editor { grid-template-columns: 1fr; } .publication-workbench.is-hot-editor .publication-heading, .publication-workbench.is-hot-editor .publication-script-bar { grid-column: 1; } .publication-studio.is-hot-template { grid-template-columns: 1fr; } .publication-preview-summary { flex-wrap: wrap; } .publication-preview-summary > em { flex-basis: 100%; margin-left: 0; text-align: left; } }
@media (max-width: 600px) { .publication-hot-template-panel { padding: 16px; } .publication-studio.is-hot-template .publication-canvas-toolbar { flex-wrap: wrap; } .publication-studio.is-hot-template .publication-canvas-toolbar > div:last-child { width: 100%; flex-wrap: wrap; } .publication-studio.is-hot-template .publication-canvas-shell { min-height: 0; padding: 18px 12px; } }

/* Cover editor: one clear path on the left, a large cover and status on the right. */
.publication-workbench.is-hot-editor { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 1280px; margin: 0 auto; gap: 16px; }
.publication-workbench.is-hot-editor .publication-heading { grid-column: 1; min-height: 76px; padding: 14px 22px; border-radius: 16px; box-shadow: none; }
.publication-workbench.is-hot-editor .publication-heading > div:first-child { display: grid; grid-template-columns: auto 1fr; gap: 2px 18px; align-items: center; }
.publication-workbench.is-hot-editor .publication-editor-back { grid-row: 1 / 3; align-self: center; margin: 0; padding-right: 18px; border-right: 1px solid #e4e9f1; color: #416586; font-size: 12px; white-space: nowrap; }
.publication-workbench.is-hot-editor .publication-heading h2 { grid-column: 2; margin: 0; font-size: 19px; }
.publication-workbench.is-hot-editor .publication-heading p { display: block; grid-column: 2; font-size: 11px; line-height: 1.3; }
.publication-workbench.is-hot-editor .publication-heading-actions { gap: 14px; }
.publication-workbench.is-hot-editor .publication-heading-actions .v3-btn { min-height: 36px; padding: 0 16px; }
.publication-workbench.is-hot-editor .publication-studio, .publication-workbench.is-hot-editor .publication-publish-details { grid-column: 1; }
.publication-studio.is-hot-template { grid-template-columns: 352px minmax(0, 1fr); gap: 16px; }
.publication-studio.is-hot-template.is-editing { grid-template-columns: 300px minmax(0, 1fr) 280px; }
.publication-hot-template-panel { position: sticky; top: 18px; align-self: start; padding: 21px; border: 1px solid #dfe5ee; border-radius: 17px; box-shadow: 0 8px 20px rgba(21, 40, 72, .045); }
.publication-hot-editor-intro { display: grid; gap: 3px; padding-bottom: 17px; border-bottom: 1px solid #e9edf3; }
.publication-hot-editor-intro > span { color: #316bb7; font-size: 11px; font-weight: 800; }
.publication-hot-editor-intro > strong { color: #1b2c42; font-size: 19px; line-height: 1.35; }
.publication-hot-editor-intro > p { margin: 0; color: #7c899b; font-size: 11px; line-height: 1.5; }
.publication-editor-step { display: inline-grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 7px; background: #eaf2ff; color: #2368c0; font-size: 10px; font-style: normal; font-weight: 900; }
.publication-hot-script-field { display: grid; grid-template-columns: 23px 1fr; gap: 7px 10px; align-items: center; margin-top: 17px; }
.publication-editor-field-label { color: #283b54; font-size: 12px; font-weight: 850; }
.publication-hot-script-field select { grid-column: 1 / -1; width: 100%; height: 39px; padding: 0 12px; border: 1px solid #d9e1eb; border-radius: 9px; background: #fff; color: #263950; font-size: 12px; }
.publication-hot-script-field select:focus-visible { outline: 3px solid rgba(43, 106, 194, .18); border-color: #3b7bc9; }
.publication-editor-data-note { margin: 6px 0 0; color: #ac6a31; font-size: 10px; line-height: 1.45; }
.publication-editor-selected-template { display: grid; grid-template-columns: 23px 45px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 16px 0; padding: 0; border: 0; background: transparent; }
.publication-editor-selected-template img { width: 45px; height: 65px; border-radius: 8px; object-fit: cover; }
.publication-editor-selected-template div { gap: 3px; }
.publication-editor-selected-template small { color: #8b98a7; font-size: 10px; }
.publication-editor-selected-template strong { color: #253b57; font-size: 12px; }
.publication-editor-selected-template > button { align-self: center; border: 1px solid #dce5f0; border-radius: 8px; background: #fff; color: #2b69b8; }
.publication-editor-selected-template > button:hover { background: #edf4ff; }
.publication-hot-template-panel .publication-hot-title-block { margin-top: 0; padding-top: 15px; border-top: 1px solid #e9edf3; }
.publication-hot-template-panel .publication-hot-title-block label > span { justify-content: flex-start; align-items: center; gap: 9px; font-size: 12px; }
.publication-hot-template-panel .publication-hot-title-block label > span em { margin-left: auto; }
.publication-hot-template-panel .publication-hot-title-block textarea { min-height: 96px; padding: 11px 12px; border-color: #ccd8e8; border-radius: 9px; font-size: 17px; line-height: 1.45; }
.publication-hot-template-panel .publication-hot-title-block textarea::placeholder { color: #9ba8b8; font-size: 12px; font-weight: 500; }
.publication-hot-template-panel .publication-hot-title-block p { margin-top: 5px; font-size: 10px; }
.publication-portrait-choice { margin-top: 15px; padding: 13px; border-radius: 11px; background: #f8fafc; }
.publication-portrait-choice > div:first-child { gap: 5px; }
.publication-portrait-choice strong { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.publication-portrait-choice > span, .publication-portrait-choice > div:first-child > span { padding-left: 32px; font-size: 10px; }
.publication-portrait-choice.is-scene > span { padding-left: 32px; }
.publication-portrait-actions { margin-top: 9px; }
.publication-portrait-actions .v3-btn { min-height: 34px; }
.publication-editor-template-actions { display: grid; gap: 9px; margin-top: 17px; }
.publication-editor-generate { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px; border: 1px solid #1457b0; border-radius: 10px; background: #1457b0; color: #fff; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; box-shadow: 0 6px 13px rgba(20, 87, 176, .16); }
.publication-editor-generate:hover { background: #0d4c9d; }
.publication-editor-generate:focus-visible { outline: 3px solid rgba(20, 87, 176, .28); outline-offset: 2px; }
.publication-editor-generate:disabled { cursor: wait; opacity: .64; }
.publication-editor-generate > span { font-size: 17px; font-weight: 500; }
.publication-editor-template-actions .v3-btn { min-height: 35px; background: transparent; border-color: #dce4ed; color: #536b85; font-size: 11px; }
.publication-studio.is-hot-template .publication-canvas-panel { padding-bottom: 0; border-color: #dfe5ed; border-radius: 17px; box-shadow: 0 8px 20px rgba(21, 40, 72, .045); }
.publication-studio.is-hot-template .publication-canvas-toolbar { min-height: 62px; padding: 12px 19px; }
.publication-studio.is-hot-template .publication-canvas-toolbar strong { font-size: 14px; }
.publication-studio.is-hot-template .publication-canvas-toolbar span { font-size: 10px; }
.publication-studio.is-hot-template .publication-canvas-shell { min-height: 682px; padding: 26px 22px; background: #f2f5f9; }
.publication-canvas-preview-layout { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 3vw, 46px); width: 100%; }
.publication-studio.is-hot-template .publication-canvas-shell .publication-cover-stage { width: min(100%, 374px); flex: 0 1 374px; border-radius: 12px; box-shadow: 0 12px 30px rgba(19, 36, 61, .17); }
.publication-stage-badge.is-preview { top: 11px; right: 11px; padding: 6px 9px; border: 0; border-radius: 7px; background: rgba(12, 27, 48, .78); font-size: 9px; }
.publication-preview-guide { flex: 0 1 205px; min-width: 160px; display: grid; gap: 11px; align-content: center; color: #334761; }
.publication-preview-guide-kicker { color: #2b6dc1; font-size: 10px; font-weight: 850; }
.publication-preview-guide h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.publication-preview-guide p { margin: 0; color: #708199; font-size: 11px; line-height: 1.65; }
.publication-preview-guide-title { display: grid; gap: 5px; padding: 13px 0; border-top: 1px solid #dce4ee; border-bottom: 1px solid #dce4ee; }
.publication-preview-guide-title > span { color: #8896a8; font-size: 10px; }
.publication-preview-guide-title > strong { color: #253b58; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.publication-preview-guide-cost { color: #8897aa; font-size: 10px; line-height: 1.55; }
@media (max-width: 1180px) { .publication-studio.is-hot-template, .publication-studio.is-hot-template.is-editing { grid-template-columns: 320px minmax(0, 1fr); } .publication-studio.is-hot-template.is-editing .publication-property-panel { grid-column: 1 / -1; } .publication-canvas-preview-layout { gap: 18px; } .publication-preview-guide { flex-basis: 170px; } .publication-studio.is-hot-template .publication-canvas-shell .publication-cover-stage { flex-basis: 330px; } }
@media (max-width: 950px) { .publication-studio.is-hot-template, .publication-studio.is-hot-template.is-editing { grid-template-columns: 1fr; } .publication-hot-template-panel { position: static; } .publication-studio.is-hot-template .publication-canvas-shell { min-height: 0; } .publication-studio.is-hot-template .publication-canvas-shell .publication-cover-stage { flex-basis: 374px; } }
@media (max-width: 600px) { .publication-workbench.is-hot-editor .publication-heading { align-items: flex-start; gap: 12px; padding: 14px; } .publication-workbench.is-hot-editor .publication-heading > div:first-child { display: block; } .publication-workbench.is-hot-editor .publication-editor-back { display: block; margin-bottom: 8px; padding-right: 0; border: 0; } .publication-workbench.is-hot-editor .publication-heading h2 { font-size: 17px; } .publication-workbench.is-hot-editor .publication-heading p { display: none; } .publication-workbench.is-hot-editor .publication-save-state { display: none; } .publication-canvas-preview-layout { display: grid; justify-items: center; } .publication-studio.is-hot-template .publication-canvas-shell .publication-cover-stage { width: min(100%, 342px); } .publication-preview-guide { min-width: 0; width: 100%; padding: 0 6px; } .publication-preview-guide h3 { font-size: 14px; } .publication-preview-guide-cost { display: none; } }

/* Keep the knowledge directory and reader aligned across desktop heights. */
@media (min-width: 901px) {
  .v3-shell .knowledge-manager-grid.is-tree-layout {
    --knowledge-directory-width: 278px;
    --knowledge-panel-height: max(420px, calc(100dvh - 232px));
    min-height: var(--knowledge-panel-height);
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--knowledge-directory-width);
    border-right: 1px solid #e5e9ef;
    background: #f7f8fa;
    pointer-events: none;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-tree-panel {
    height: var(--knowledge-panel-height);
    min-height: 0;
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout .knowledge-editor-panel {
    min-height: var(--knowledge-panel-height);
  }

  .v3-shell .knowledge-directory-collapse-button {
    left: calc(var(--knowledge-directory-width) - 18px);
  }

  .v3-shell .knowledge-manager-grid.is-tree-layout.is-reading-collapsed {
    --knowledge-directory-width: 44px;
  }

  .v3-shell .knowledge-directory-collapse-button.is-collapsed { left: 4px; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .v3-shell .knowledge-manager-grid.is-tree-layout:not(.is-reading-collapsed) {
    --knowledge-directory-width: 260px;
  }
}

@media (min-width: 901px) {
  .v3-shell .knowledge-workspace-shell:is(:fullscreen, .is-fullscreen-fallback) .knowledge-manager-grid.is-tree-layout {
    min-height: 0;
  }

  .v3-shell .knowledge-workspace-shell:is(:fullscreen, .is-fullscreen-fallback) .knowledge-manager-grid.is-tree-layout :is(.knowledge-tree-panel, .knowledge-editor-panel) {
    height: 100%;
    min-height: 0;
  }
}

/* Own account workspace: identity, one next step, then focused account sections. */
.route-account [data-account-section][hidden],
.route-account .selection-toolbar[hidden] { display: none !important; }
.route-account .account-workbench-section:not([hidden]) { animation: ownAccountSectionIn .24s ease both; }
.route-account .account-head.is-own-analysis {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  min-height: 116px;
  gap: 16px;
  padding: 18px 21px;
  border: 1px solid #dce6f3;
  border-radius: 18px;
  background: linear-gradient(112deg, #fff 0%, #fff 72%, #f3f8ff 100%);
}
.route-account .account-head.is-own-analysis .avatar.large { width: 64px; height: 64px; border: 3px solid #fff; box-shadow: 0 4px 13px rgba(38, 78, 140, .12); }
.route-account .account-head.is-own-analysis .account-info > .muted { font-weight: 500; font-size: 12px; }
.route-account .account-head.is-own-analysis .tag-row { margin-top: 9px; }
.route-account .account-head.is-own-analysis .tag { background: #f2f6fc; border-color: #e7edf6; }
.route-account .own-account-identity-position { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 7px; font-size: 11px; }
.route-account .own-account-identity-position > span { color: #6d86a8; font-weight: 750; }
.route-account .own-account-identity-position > strong { max-width: 560px; overflow: hidden; color: #263d62; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.route-account .own-account-identity-position > em { margin-left: auto; color: #72849b; font-style: normal; }
.route-account:has(.account-head.is-own-analysis) .account-workbench-tabs { display: flex; gap: 4px; width: max-content; min-width: min(100%, 440px); max-width: 100%; margin: 4px 0 9px; padding: 4px; }
.route-account:has(.account-head.is-own-analysis) .account-workbench-tabs button { position: relative; flex: 1 0 auto; justify-content: center; min-width: 98px; min-height: 40px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.route-account:has(.account-head.is-own-analysis) .account-workbench-tabs button:hover { transform: translateY(-1px); }
.route-account:has(.account-head.is-own-analysis) .account-workbench-tabs button.active { background: #eaf2ff; color: #145bd0; box-shadow: inset 0 0 0 1px #c9dbfb; }

.route-account .own-account-overview { display: grid; gap: 16px; padding: 23px; border-radius: 18px; }
.route-account .own-account-overview-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.route-account .own-account-overview-top h2 { margin: 3px 0 4px; color: #14294c; font-size: 22px; line-height: 1.3; }
.route-account .own-account-overview-top p { margin: 0; color: #71839b; font-size: 11px; }
.route-account .own-account-overview-top .v3-btn { flex: 0 0 auto; min-height: 40px; }
.route-account .own-account-next-step { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 14px; padding: 17px 19px; border: 1px solid #d6e6fb; border-radius: 15px; background: linear-gradient(105deg, #f0f6ff, #f9fcff); }
.route-account .own-account-next-step.is-attention { border-color: #f0d7a6; background: linear-gradient(105deg, #fff8e9, #fffdf9); }
.route-account .own-account-step-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: #e5efff; color: #135bce; }
.route-account .own-account-step-icon .ui-icon { width: 21px; height: 21px; }
.route-account .own-account-next-step.is-attention .own-account-step-icon { background: #fff0d0; color: #a66a16; }
.route-account .own-account-next-step > div > span { color: #2f70d1; font-size: 11px; font-weight: 800; }
.route-account .own-account-next-step.is-attention > div > span { color: #966321; }
.route-account .own-account-next-step h3 { margin: 3px 0 4px; color: #172d50; font-size: 19px; line-height: 1.35; }
.route-account .own-account-next-step p { max-width: 920px; margin: 0; color: #58708e; font-size: 12px; line-height: 1.65; }
.route-account .own-account-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .55fr); gap: 12px; }
.route-account .own-account-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
.route-account .own-account-metrics article { min-width: 0; padding: 14px 16px; border: 1px solid #e2eaf5; border-radius: 13px; background: #fff; transition: border-color .2s ease, transform .2s ease; }
.route-account .own-account-metrics article:hover { border-color: #bdd3f5; transform: translateY(-2px); }
.route-account .own-account-metrics article > span, .route-account .own-account-metrics article > em { display: block; color: #7b8da4; font-size: 11px; font-style: normal; }
.route-account .own-account-metrics article > strong { display: block; margin: 6px 0 3px; color: #172c52; font-size: 23px; line-height: 1.2; }
.route-account .own-account-position-brief { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; gap: 12px; padding: 14px 16px; border: 1px solid #dce6f3; border-radius: 13px; background: #f8fbff; }
.route-account .own-account-position-brief strong { display: block; margin: 8px 0 4px; overflow: hidden; color: #203a5f; font-size: 14px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.route-account .own-account-position-brief p { margin: 0; color: #71839b; font-size: 11px; line-height: 1.55; }
.route-account .own-account-text-link { width: fit-content; padding: 0; border: 0; background: transparent; color: #155fd1; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.route-account .own-account-text-link:hover { text-decoration: underline; }
.route-account .own-account-insight-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .4fr); gap: 10px; }
.route-account .own-account-insight-line > div, .route-account .own-account-leading-work { min-width: 0; padding: 13px 15px; border: 1px solid #e1eaf5; border-radius: 12px; background: #fbfdff; }
.route-account .own-account-insight-line span { display: block; color: #6c809b; font-size: 11px; font-weight: 800; }
.route-account .own-account-insight-line p { margin: 5px 0 0; color: #314864; font-size: 12px; line-height: 1.6; }
.route-account .own-account-leading-work { text-align: left; cursor: pointer; }
.route-account .own-account-leading-work strong { display: block; margin: 4px 0; overflow: hidden; color: #213956; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.route-account .own-account-leading-work em { color: #155fd1; font-size: 11px; font-style: normal; }
.route-account .own-account-works-empty { min-height: 215px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 30px; border: 1px dashed #d2dfef; border-radius: 16px; background: #fbfdff; text-align: left; }
.route-account .own-account-works-empty strong { color: #203758; font-size: 16px; }
.route-account .own-account-works-empty p { max-width: 480px; margin: 7px 0 0; color: #72859d; font-size: 12px; line-height: 1.6; }
.route-account .own-account-review-empty { min-height: 260px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: 28px; }
.route-account .own-account-review-empty h2 { margin: 5px 0; }
.route-account .own-account-review-empty p { max-width: 580px; margin: 0; color: #72859d; font-size: 12px; line-height: 1.6; }
.route-account .own-account-positioning-summary { display: grid; gap: 16px; padding: 23px; border: 1px solid #dce6f3; border-radius: 18px; background: #fff; box-shadow: 0 8px 25px rgba(31, 52, 82, .04); }
.route-account .own-account-positioning-summary > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.route-account .own-account-positioning-summary h2 { margin: 4px 0; color: #14294c; font-size: 22px; }
.route-account .own-account-positioning-summary header p { margin: 0; color: #72859d; font-size: 12px; }
.route-account .own-account-positioning-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #71839b; font-size: 11px; }
.route-account .own-account-positioning-progress strong { color: #255dc3; }
.route-account .own-account-positioning-progress i { width: 100%; height: 5px; overflow: hidden; border-radius: 99px; background: #e9f0f9; }
.route-account .own-account-positioning-progress i::before { display: block; width: var(--position-progress); height: 100%; border-radius: inherit; background: #3d78e8; content: ""; }
.route-account .own-account-positioning-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.route-account .own-account-positioning-summary dl > div { min-width: 0; padding: 15px; border: 1px solid #e4ebf5; border-radius: 12px; background: #fafcff; }
.route-account .own-account-positioning-summary dt { margin-bottom: 6px; color: #70849e; font-size: 11px; }
.route-account .own-account-positioning-summary dd { margin: 0; color: #213956; font-size: 13px; font-weight: 650; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.route-account .own-account-positioning-summary dd.is-missing { color: #9aa8ba; font-weight: 500; }
@keyframes ownAccountSectionIn { from { opacity: .35; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .route-account .own-account-overview-grid, .route-account .own-account-insight-line { grid-template-columns: 1fr; }
  .route-account .own-account-identity-position > em { margin-left: 0; }
}
@media (max-width: 720px) {
  .route-account .account-head.is-own-analysis { grid-template-columns: 52px minmax(0, 1fr); padding: 15px; }
  .route-account .account-head.is-own-analysis .avatar.large { width: 52px; height: 52px; }
  .route-account .own-account-identity-position > strong { max-width: 100%; white-space: normal; }
  .route-account .own-account-overview, .route-account .own-account-positioning-summary { padding: 16px; }
  .route-account .own-account-overview-top, .route-account .own-account-positioning-summary > header { align-items: stretch; flex-direction: column; }
  .route-account .own-account-overview-top .v3-btn, .route-account .own-account-positioning-summary > header .v3-btn { width: 100%; justify-content: center; }
  .route-account .own-account-positioning-summary dl { grid-template-columns: 1fr; }
  .route-account .own-account-works-empty { flex-direction: column; align-items: flex-start; min-height: 180px; }
}
@media (max-width: 460px) {
  .route-account:has(.account-head.is-own-analysis) .account-workbench-tabs { width: 100%; }
  .route-account:has(.account-head.is-own-analysis) .account-workbench-tabs button { min-width: 72px; padding-inline: 8px; font-size: 12px; }
  .route-account .own-account-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-account .own-account-next-step { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .route-account .account-workbench-section:not([hidden]) { animation: none; }
  .route-account .own-account-metrics article, .route-account:has(.account-head.is-own-analysis) .account-workbench-tabs button { transition: none; }
}

/* Account discovery: keep search, guidance and identity review in one workspace. */
.v3-shell .content.route-search {
  width: min(calc(100% - 64px), 1180px);
  gap: 16px;
  padding-top: 6px;
}
.route-search .account-search-intro {
  min-height: 94px;
  padding: 12px 0 18px;
}
.route-search .account-search-intro h1 {
  margin: 0;
  font-size: clamp(27px, 2.4vw, 34px);
  letter-spacing: -.04em;
}
.route-search .account-search-intro p { margin-top: 9px; font-size: 14px; }
.v3-shell .route-search .account-search-card {
  max-width: none;
  padding: 0;
  overflow: hidden;
  border-color: #dbe5f2;
  border-radius: 19px;
  box-shadow: 0 14px 36px rgba(36, 66, 116, .055);
}
.route-search .account-search-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
}
.route-search .account-search-main { padding: 30px 32px 27px; }
.route-search .account-search-main > header { margin-bottom: 25px; }
.route-search .account-search-main h2 { margin: 6px 0 4px; font-size: 23px; letter-spacing: -.035em; }
.route-search .account-search-main > header p { margin: 0; color: #73839a; font-size: 13px; line-height: 1.55; }
.route-search .account-search-label {
  display: block;
  margin-bottom: 9px;
  color: #263a59;
  font-size: 12px;
  font-weight: 700;
}
.route-search .account-search-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.route-search .account-search-input { position: relative; min-width: 0; }
.route-search .account-search-input > .ui-icon {
  position: absolute;
  top: 50%;
  left: 17px;
  width: 19px;
  height: 19px;
  color: #8ba0bb;
  transform: translateY(-50%);
  pointer-events: none;
}
.v3-shell .route-search .account-search-input .field {
  width: 100%;
  min-height: 52px;
  padding: 0 17px 0 47px;
  border: 1px solid #d6e1ef;
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
  box-shadow: 0 2px 7px rgba(30, 61, 109, .025);
}
.route-search .account-search-input .field::placeholder { color: #94a3b8; }
.v3-shell .route-search .account-search-input .field:focus {
  border-color: #5a8ee9;
  box-shadow: 0 0 0 4px rgba(59, 113, 221, .10);
}
.v3-shell .route-search .account-search-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 132px;
  min-height: 52px;
  padding: 0 19px;
  border-radius: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.route-search .account-search-row .btn .ui-icon { width: 16px; height: 16px; }
.route-search .account-search-link-hint { margin: 11px 1px 0; color: #8090a7; font-size: 12px; }
.route-search .account-search-guide {
  display: flex;
  flex-direction: column;
  padding: 29px 25px 23px;
  border-left: 1px solid #e3ebf6;
  background: linear-gradient(150deg, #f7faff 0%, #f2f7ff 100%);
}
.route-search .account-search-guide-kicker { color: #2d6bd4; font-size: 11px; font-weight: 750; }
.route-search .account-search-guide > strong { margin-top: 7px; color: #183258; font-size: 17px; line-height: 1.4; }
.route-search .account-search-guide ol { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.route-search .account-search-guide li { display: flex; align-items: center; gap: 10px; color: #506785; font-size: 12px; }
.route-search .account-search-guide li span { color: #2d6bd4; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.route-search .account-search-guide p {
  margin: auto 0 0;
  padding-top: 21px;
  color: #7588a2;
  font-size: 11px;
  line-height: 1.5;
}
.route-search .account-search-guide p b { color: #29446d; font-weight: 750; }
.v3-shell .route-search .account-search-card .result-area {
  min-height: 142px;
  margin: 0;
  padding: 24px 32px 29px;
  border: 0;
  border-top: 1px solid #e8eef7;
  border-radius: 0;
  background: #fff;
}
.route-search .account-search-empty { display: grid; justify-items: center; align-content: center; min-height: 88px; text-align: center; }
.route-search .account-search-empty > .ui-icon { width: 22px; height: 22px; margin-bottom: 8px; color: #8faee5; }
.route-search .account-search-empty strong { color: #3c506e; font-size: 13px; }
.route-search .account-search-empty p { margin: 5px 0 0; color: #93a1b4; font-size: 12px; }
.route-search .account-search-result-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.route-search .account-search-result-heading strong { color: #1e3558; font-size: 15px; }
.route-search .account-search-result-heading span { color: #8494a9; font-size: 12px; }
.route-search .account-search-card .user-card { border: 1px solid #e1e9f4; border-radius: 13px; }
.route-search .account-search-card .user-card + .user-card { margin-top: 9px; }
@media (max-width: 980px) {
  .route-search .account-search-entry { grid-template-columns: 1fr; }
  .route-search .account-search-guide { border-top: 1px solid #e3ebf6; border-left: 0; }
  .route-search .account-search-guide ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
  .route-search .account-search-guide p { padding-top: 14px; }
}
@media (max-width: 760px) {
  .v3-shell .content.route-search { width: 100%; padding: 14px var(--mobile-page-gutter) calc(var(--mobile-nav-height) + 30px + env(safe-area-inset-bottom)); }
  .route-search .account-search-intro { min-height: 0; padding: 5px 0 10px; }
  .route-search .account-search-intro h1 { font-size: 26px; }
  .route-search .account-search-intro p { font-size: 12px; }
  .route-search .account-search-main { padding: 20px 17px; }
  .route-search .account-search-main > header { margin-bottom: 20px; }
  .route-search .account-search-main h2 { font-size: 20px; }
  .route-search .account-search-row { grid-template-columns: 1fr; }
  .route-search .account-search-row .btn { width: 100%; }
  .route-search .account-search-guide { padding: 19px 17px; }
  .route-search .account-search-guide ol { grid-template-columns: 1fr; }
  .v3-shell .route-search .account-search-card .result-area { padding: 22px 17px; }
  .route-search .account-search-result-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
:root[data-theme="dark"] .v3-shell .route-search .account-search-card { border-color: #2b3b56; }
:root[data-theme="dark"] .route-search .account-search-main > header p,
:root[data-theme="dark"] .route-search .account-search-link-hint,
:root[data-theme="dark"] .route-search .account-search-result-heading span,
:root[data-theme="dark"] .route-search .account-search-empty p { color: #94a8c5; }
:root[data-theme="dark"] .route-search .account-search-label,
:root[data-theme="dark"] .route-search .account-search-guide > strong,
:root[data-theme="dark"] .route-search .account-search-result-heading strong,
:root[data-theme="dark"] .route-search .account-search-empty strong { color: #e2ebf9; }
:root[data-theme="dark"] .route-search .account-search-guide {
  border-color: #2b3b56;
  background: linear-gradient(150deg, #15243e, #172c4c);
}
:root[data-theme="dark"] .route-search .account-search-guide li,
:root[data-theme="dark"] .route-search .account-search-guide p { color: #a9bbd4; }
:root[data-theme="dark"] .route-search .account-search-guide p b { color: #dfebfa; }
:root[data-theme="dark"] .v3-shell .route-search .account-search-card .result-area {
  border-color: #2b3b56;
  background: var(--v3-surface);
}
:root[data-theme="dark"] .route-search .account-search-card .user-card { border-color: #2b3b56; }

/* Task center: keep the five filters together and make the empty state useful. */
.v3-shell .route-workflowTasks > .workflow-task-panel {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(18px, 2.2vw, 30px);
}
.route-workflowTasks .workflow-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.route-workflowTasks .workflow-task-heading h2 {
  margin: 0 0 5px;
  color: #172b4b;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.25;
  letter-spacing: -.03em;
}
.route-workflowTasks .workflow-task-heading p {
  margin: 0;
  color: #7587a1;
  font-size: 13px;
  line-height: 1.5;
}
.v3-shell .route-workflowTasks #refresh-workflow-ledger {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding-inline: 13px;
  font-size: 12px;
}
.route-workflowTasks #refresh-workflow-ledger svg { width: 15px; height: 15px; }
.v3-shell .route-workflowTasks .workflow-ledger-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}
.v3-shell .route-workflowTasks .workflow-ledger-summary > button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding: 13px 15px;
  border-radius: 12px;
  background: #f9fbfe;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.v3-shell .route-workflowTasks .workflow-ledger-summary > button:hover {
  transform: translateY(-2px);
  border-color: #adc5ef;
  background: #f3f7ff;
}
.v3-shell .route-workflowTasks .workflow-ledger-summary > button.is-active {
  border-color: #9dbcf4;
  background: #ebf2ff;
  box-shadow: inset 3px 0 #3769df;
}
.route-workflowTasks .workflow-ledger-summary > button span {
  margin: 0;
  color: #5e718e;
  font-size: 13px;
  white-space: nowrap;
}
.route-workflowTasks .workflow-ledger-summary > button strong {
  color: #172b4b;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
}
.route-workflowTasks .workflow-ledger-summary > button.is-active span,
.route-workflowTasks .workflow-ledger-summary > button.is-active strong { color: #1750bd; }
.route-workflowTasks .workflow-ledger-summary > button[data-task-filter="failed"]:not(.is-active) strong { color: #c65b59; }
.route-workflowTasks .workflow-ledger-summary > button[data-task-filter="completed"]:not(.is-active) strong { color: #248568; }
.route-workflowTasks .workflow-task-hint {
  margin: 15px 0 0;
  color: #7a8ba2;
  font-size: 12px;
  line-height: 1.5;
}
.route-workflowTasks .workflow-ledger-list { margin-top: 18px; }
.route-workflowTasks .workflow-task-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 215px;
  padding: 28px 16px;
  border: 1px dashed #d7e2f1;
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  text-align: center;
}
.route-workflowTasks .workflow-task-empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 13px;
  border-radius: 13px;
  background: #e9f1ff;
  color: #3d72d8;
}
.route-workflowTasks .workflow-task-empty-icon svg { width: 21px; height: 21px; }
.route-workflowTasks .workflow-task-empty strong { color: #253958; font-size: 16px; }
.route-workflowTasks .workflow-task-empty p {
  margin: 7px 0 16px;
  color: #8190a6;
  font-size: 12px;
  line-height: 1.6;
}
.v3-shell .route-workflowTasks .workflow-task-empty .btn {
  min-height: 36px;
  padding-inline: 15px;
  border-color: #bed2f4;
  color: #215ac4;
  font-size: 12px;
}
@media (max-width: 900px) {
  .v3-shell .route-workflowTasks .workflow-ledger-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button { grid-column: span 2; }
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 520px) {
  .route-workflowTasks .workflow-task-toolbar { align-items: flex-start; flex-direction: column; }
  .v3-shell .route-workflowTasks .workflow-ledger-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button,
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button:nth-child(n+4) { grid-column: span 1; }
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button:first-child { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button { transition: none; }
  .v3-shell .route-workflowTasks .workflow-ledger-summary > button:hover { transform: none; }
}

/* Shared compute wallet */
.system-compute-wallet .system-agent-usage {background:linear-gradient(135deg,#f7f9ff,#fff);padding:22px;border-radius:16px;}
.compute-balance {display:flex;align-items:baseline;gap:16px;margin:20px 0 16px;color:#77849e;}
.compute-balance>strong {font-size:34px;line-height:1.2;letter-spacing:-1px;color:#192a4d;font-variant-numeric:tabular-nums;}
.compute-balance small {font-size:13px;font-weight:500;margin-left:8px;color:#77849e;}
.system-agent-usage-facts.compute-facts {grid-template-columns:repeat(3,minmax(0,1fr));}
.system-compute-wallet footer {display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;}
@media(max-width:600px){.system-agent-usage-facts.compute-facts{grid-template-columns:1fr;}.compute-balance>strong{font-size:28px;}}

.compute-credit-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:8px 0 20px;}.compute-credit-filter label{display:grid;gap:6px;min-width:120px;flex:1;font-size:12px;color:#6a7895}.compute-credit-filter input,.compute-credit-filter select{width:100%;height:36px;border:1px solid #dde5f3;border-radius:8px;background:#fff;padding:0 8px;color:#253655;}.compute-credit-filter+.data-table td{max-width:200px;overflow-wrap:anywhere;}

/* Compute ledger: scoped bill layout, independent of other dialogs. */
:root .modal-card.compute-ledger-modal{width:min(1060px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 48px);display:flex;flex-direction:column;background:#fff;border:1px solid #e4eaf3;border-radius:20px;box-shadow:0 28px 90px #14274430;color:#25334a;font-family:Inter,"Microsoft YaHei",sans-serif;overflow:hidden;}
:root .compute-ledger-modal>header{padding:20px 28px;border-bottom:1px solid #edf0f6;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:16px;}
:root .compute-ledger-modal>header strong{font-size:16px;color:#172740;font-weight:650;}
:root .compute-ledger-modal>header button{background:#f7f9fc;color:#61718a;border:1px solid #e6ebf3;border-radius:9px;padding:7px 12px;font-size:12px;cursor:pointer;}
:root .compute-ledger-modal .modal-body{padding:24px 28px 20px;background:#fff;overflow:auto;min-height:0;max-height:none;scrollbar-width:thin;}
.compute-ledger-modal *{box-sizing:border-box;}
.cl-ledger{font-size:13px;line-height:1.55;}.cl-intro{display:flex;align-items:center;gap:12px;margin-bottom:16px;}.cl-eyebrow{font-size:12px;font-weight:650;color:#3a61cb;}.cl-intro p{margin:0;color:#8894a7;font-size:12px;}
.cl-overview{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:12px;margin-bottom:28px;}.cl-overview article{padding:20px 22px;background:#f8fafc;border:1px solid #eaf0f6;border-radius:14px;min-width:0;}.cl-overview article>span{font-size:12px;color:#738097;}.cl-overview article>div{display:flex;align-items:baseline;gap:7px;margin:9px 0 8px;}.cl-overview strong{font-size:28px;line-height:1.15;font-weight:650;letter-spacing:-.7px;font-variant-numeric:tabular-nums;color:#253653;}.cl-overview small{color:#8994a6;font-size:12px;}.cl-overview article p{margin:0;color:#8994a6;font-size:11px;}.cl-overview .cl-balance{background:linear-gradient(115deg,#f0f5ff,#f8faff);border-color:#dfe8ff;}.cl-balance strong{color:#315ed7;}.cl-balance>span{color:#6278a6!important;}
.cl-record-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;}.cl-record-heading h3{font-size:14px;font-weight:650;margin:0;color:#253653;display:flex;align-items:center;gap:8px;}.cl-record-heading h3 span{font-size:11px;font-weight:500;line-height:20px;padding:0 7px;border-radius:6px;background:#edf2fc;color:#6175a0;}.cl-record-heading>small{font-size:11px;color:#929dad;}
.cl-filters{display:flex;align-items:end;gap:10px;padding:16px;background:#f8fafc;border:1px solid #edf1f6;border-radius:12px;margin:0 0 18px;flex-wrap:wrap;}.cl-filters label{display:grid;gap:7px;flex:1 1 130px;min-width:0;font-size:11px;color:#7b879b;}.cl-filters input,.cl-filters select{width:100%;min-width:0;height:36px;border:1px solid #e0e6f0;border-radius:8px;background:#fff;color:#42536e;padding:0 10px;font-family:inherit;font-size:12px;outline:none;}.cl-filters input:focus,.cl-filters select:focus{border-color:#7b9bf5;box-shadow:0 0 0 3px #3869f215;}.cl-filters input::-webkit-calendar-picker-indicator{opacity:.45;cursor:pointer;}.cl-filter-error{width:100%;margin:0;color:#bd4e48;font-size:12px;}
.compute-ledger-modal .cl-button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid #dfe6f0;border-radius:8px;min-height:34px;padding:0 13px;background:#fff;color:#51617c;font-size:12px;font-family:inherit;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s;}.compute-ledger-modal .cl-button:hover:not(:disabled){background:#f1f5ff;border-color:#bcccfa;}.compute-ledger-modal .cl-primary{min-height:36px;background:#3767e7;color:#fff;border-color:#3767e7;box-shadow:0 3px 6px #3767e71a;}.compute-ledger-modal .cl-primary:hover:not(:disabled){background:#2857ce;color:#fff;}.compute-ledger-modal .cl-button:disabled{color:#b1bac9;background:#fafbfd;border-color:#eef1f6;cursor:default;}.compute-ledger-modal .cl-clear{padding:0 9px;background:transparent;border-color:transparent;}
.cl-table-wrap{border:1px solid #e9edf4;border-radius:12px;overflow:hidden;}.compute-ledger-modal .cl-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px;margin:0;}.cl-table th{background:#f8fafc;color:#7c889c;font-size:11px;font-weight:500;text-align:left;padding:12px 16px;border:0;white-space:nowrap;}.cl-table th:first-child{width:24%;}.cl-table th:nth-child(2){width:20%;}.cl-table th:nth-child(3){width:17%;}.cl-table th:nth-child(4){width:15%;}.cl-table th:nth-child(n+5){width:12%;text-align:right;}.cl-table td{padding:16px;border:0;border-top:1px solid #edf1f6;vertical-align:middle;color:#65748d;}.cl-table tbody tr{transition:background .15s;}.cl-table tbody tr:hover{background:#fafcff;}.cl-purpose strong{font-size:12px;font-weight:550;color:#30415e;vertical-align:middle;}.cl-row-icon{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:28px;height:28px;margin-right:9px;color:#7792d6;background:#f1f5fd;border:1px solid #e7edfb;border-radius:8px;font-size:18px;}.cl-account{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.cl-time{font-variant-numeric:tabular-nums;}.cl-time span{display:block;color:#66758d;}.cl-time small{display:block;color:#a0aaba;font-size:11px;margin-top:3px;}.cl-status{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;border-radius:6px;padding:4px 7px;font-size:11px;line-height:1.4;}.cl-status i{width:4px;height:4px;flex-shrink:0;border-radius:50%;background:currentColor;}.cl-status.is-success{background:#edf8f3;color:#389170;}.cl-status.is-pending{background:#fff7e8;color:#ae802e;}.cl-status.is-muted{background:#f1f4f8;color:#8894a6;}.cl-table .cl-used,.cl-table .cl-held{text-align:right;font-variant-numeric:tabular-nums;color:#9ba7b8;}.cl-used strong{font-size:14px;font-weight:550;}.cl-table .cl-used.has-usage{color:#334b73;}
.cl-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 22px;}.cl-pagination>span{font-size:11px;color:#909bae;}.cl-pagination>div{display:flex;gap:7px;}.cl-rules{border:1px solid #e9edf5;border-radius:10px;background:#fbfcfe;}.cl-rules summary{padding:13px 16px;display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;color:#566783;font-size:12px;}.cl-rules summary::-webkit-details-marker{display:none;}.cl-rules summary small{color:#9aa5b6;font-size:11px;}.cl-chevron{margin-left:auto;transition:transform .15s;}.cl-rules[open] .cl-chevron{transform:rotate(180deg);}.cl-rate-grid{padding:0 16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}.cl-rate-grid>div{padding:10px 12px;background:#fff;border:1px solid #e9eef6;border-radius:8px;}.cl-rate-grid span{display:block;color:#8995a7;font-size:11px;margin-bottom:4px;}.cl-rate-grid strong{font-size:12px;color:#455977;font-weight:500;}.cl-rules>p{margin:12px 16px 15px;color:#8b97a9;font-size:11px;}.cl-footnote{margin:12px 0 0;color:#939daf;font-size:11px;}.cl-footnote span{color:#8ea1c3;margin-right:4px;}.cl-empty{padding:40px 16px;text-align:center;display:grid;justify-items:center;gap:8px;}.cl-empty strong{font-size:13px;color:#697b97;font-weight:500;}.cl-empty p{margin:0;color:#97a2b4;font-size:12px;}.cl-empty-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#f1f5fc;color:#97abd2;font-size:25px;margin-bottom:4px;}.cl-loading{min-height:200px;display:flex;align-items:center;justify-content:center;gap:10px;color:#8494ac;font-size:13px;}.cl-loading>span{width:16px;height:16px;border:2px solid #e1e9f9;border-top-color:#6286e6;border-radius:50%;animation:cl-spin .8s linear infinite;}@keyframes cl-spin{to{transform:rotate(360deg)}}
.compute-ledger-modal[aria-busy="true"] .cl-ledger{opacity:.6;pointer-events:none;}.compute-ledger-modal button:focus-visible,.cl-rules summary:focus-visible{outline:2px solid #7699f8;outline-offset:3px;}
@media(max-width:680px){:root .modal-card.compute-ledger-modal{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:16px;}:root .compute-ledger-modal>header{padding:16px 18px;}:root .compute-ledger-modal .modal-body{padding:18px 16px;}.cl-intro{gap:8px;}.cl-intro p{font-size:11px;}.cl-overview{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:22px;}.cl-overview .cl-balance{grid-column:1/-1;}.cl-overview article{padding:14px;}.cl-overview .cl-balance>div{margin:6px 0;}.cl-overview strong{font-size:25px;}.cl-overview article p{font-size:10px;}.cl-record-heading>small{font-size:10px;}.cl-filters{padding:12px;gap:10px;}.cl-filters label{flex-basis:calc(50% - 10px);}.cl-filters .cl-primary{flex:1;}.cl-table thead{display:none;}.cl-table,.cl-table tbody{display:block;}.cl-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"purpose used" "account held" "time state";gap:8px 10px;padding:16px;border-top:1px solid #edf1f6;}.cl-table tr:first-child{border-top:0;}.cl-table td{padding:0;border:0;}.cl-purpose{grid-area:purpose;}.cl-row-icon{width:23px;height:23px;margin-right:6px;font-size:16px;}.cl-account{grid-area:account;padding-left:29px!important;font-size:11px;}.cl-time{grid-area:time;font-size:10px;display:flex;align-items:center;gap:6px;}.cl-time small{margin:0;font-size:10px;}.cl-state{grid-area:state;text-align:right;}.cl-used{grid-area:used;}.cl-held{grid-area:held;font-size:11px;}.cl-used:before,.cl-held:before{content:attr(data-label);font-size:10px;color:#9ba7b8;margin-right:6px;}.cl-pagination{align-items:center;}.cl-pagination .cl-button{padding:0 10px;min-height:32px;}.cl-rate-grid{grid-template-columns:1fr 1fr;gap:8px;}.cl-footnote{line-height:1.8;}}
@media(prefers-reduced-motion:reduce){.cl-loading>span{animation:none;}.compute-ledger-modal *{transition:none!important;}}

.modal-backdrop:has(> .compute-ledger-modal){padding:24px;display:flex;align-items:center;justify-content:center;}
@media(max-width:680px){.modal-backdrop:has(> .compute-ledger-modal){padding:12px;}:root .modal-card.compute-ledger-modal{width:100%;max-height:calc(100dvh - 24px);}}

/* Workspace startup: real completed stages, indeterminate transfer progress. */
.video-workspace-loading-copy { flex: 1; min-width: 0; }
.workspace-load-progress { margin-top: 18px; height: 4px; overflow: hidden; border-radius: 9px; background: #e6edfb; }
.workspace-load-progress > span { display: block; width: 34%; height: 100%; border-radius: inherit; background: #5485f4; animation: workspace-load-sweep 1.6s ease-in-out infinite; }
.workspace-load-steps { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: #8192af; font-size: 12px; }
.workspace-load-steps span::before { content: '○'; margin-right: 6px; }
.workspace-load-steps .is-complete { color: #356ccc; }
.workspace-load-steps .is-complete::before { content: '✓'; }
@keyframes workspace-load-sweep { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (prefers-reduced-motion: reduce) { .workspace-load-progress > span { animation: none; width: 100%; opacity: .5; } }

/* Copy-to-video joins the shared video creation entrance. */
.edit-entry-card-copy { --entry-accent: #7457cf; --entry-tint: #f1ecff; --entry-line: #e7dffd; }
.edit-entry-copy-scene { display: flex; justify-content: center; align-items: center; background: radial-gradient(ellipse at 70% 20%, #f5eaff, transparent 65%), #eeeefd; }
.edit-entry-copy-stack { position: relative; display: block; width: 185px; height: 165px; margin-top: 14px; }
.edit-entry-copy-sheet { position: absolute; display: block; inset: 0; border-radius: 12px; background: #fff; border: 1px solid #e1d9f5; box-shadow: 0 12px 25px #6151871a; }
.edit-entry-copy-sheet.is-back { transform: translate(20px, 4px) rotate(10deg); background: #e1d5ff; }
.edit-entry-copy-sheet.is-middle { transform: translate(-14px, 2px) rotate(-8deg); background: #f7f3ff; }
.edit-entry-copy-sheet.is-front { box-sizing: border-box; padding: 18px 21px; transform: rotate(-2deg); text-align: left; }
.edit-entry-copy-sheet small { display: block; color: #8b7ca7; font-size: 9px; letter-spacing: .1em; }
.edit-entry-copy-sheet strong { display: block; margin: 9px 0 7px; color: #30244d; font-size: 25px; line-height: 1.25; font-weight: 750; }
.edit-entry-copy-sheet strong span { color: #8158d4; }
.edit-entry-copy-sheet i { display: block; width: 35px; height: 3px; border-radius: 2px; background: #b89ae5; }
.edit-entry-copy-sheet em { display: block; margin-top: 10px; color: #9b8ab2; font-size: 8px; font-style: normal; }
@container video-entry (min-width: 1100px) { .edit-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } .edit-entry-card-body { padding: 21px 15px 13px; } .edit-entry-card .edit-entry-card-title { font-size: 19px; } }

.motion-window-notice{position:fixed;z-index:1000;top:95px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 18px;border:1px solid #43616b;border-radius:10px;background:#15232e;color:#e8f2f5;box-shadow:0 10px 35px #0004;font-size:13px}.motion-window-notice button,.motion-window-wait button{padding:8px 12px;border:1px solid #537b89;border-radius:6px;background:#223b48;color:#e8f2f5;cursor:pointer}.motion-window-wait{max-width:calc(100vw - 32px);padding:24px;border:1px solid #43616b;border-radius:12px;background:#15232e;color:#e8f2f5}.motion-window-wait::backdrop{background:#07101899}.motion-window-wait p{margin:0 0 18px}

/* Cover the source before its studio frame can paint, through project-list commit. */
.motion-window-covered .v3-shell{visibility:hidden!important}
.motion-window-wait[open]{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;margin:0;padding:24px;border:0;border-radius:0;display:grid;place-items:center;background:#f5f6fb;color:#25334a;box-shadow:none;outline:0}
.motion-window-wait::backdrop{background:#f5f6fb}
.motion-window-wait-content{text-align:center;max-width:400px;font-family:inherit}
.motion-window-wait-mark{display:inline-grid;place-items:center;width:54px;height:54px;margin-bottom:18px;border:1px solid #dedcf9;border-radius:16px;background:#ecebff;color:#645fe6;font-size:27px}
.motion-window-wait-content h2{margin:0 0 10px;font-size:22px;font-weight:700;line-height:1.5}
.motion-window-wait-content p{margin:0 0 24px;font-size:13px;line-height:1.8;color:#7b879c}
.motion-window-wait-content button{background:transparent;color:#63708a;border:1px solid #d9deeb;border-radius:8px;padding:8px 14px;font-size:12px}
.motion-window-wait-content button:hover{background:#eaeef6;color:#334560}
/* New packaging stays inside the platform navigation shell. */
.v3-shell.is-lab-route .content.route-newSmartPackaging {
  display: block;
  width: 100%; max-width: none; height: 100%; min-height: 0;
  margin: 0; padding: 0; overflow: hidden;
}
.new-packaging-frame { display: block; width: 100%; height: 100%; border: 0; background: #f6f8fc; }
