:root {
  --yk-color-primary: #2563EB;
  --yk-color-primary-hover: #1D4ED8;
  --yk-color-primary-strong: #1E40AF;
  --yk-color-nav: #07111F;
  --yk-color-page: #F6F8FB;
  --yk-color-card: #FFFFFF;
  --yk-color-text: #0F172A;
  --yk-color-muted: #64748B;
  --yk-color-border: #E2E8F0;
  --yk-color-blue-soft: #EFF6FF;
  --yk-color-danger: #DC2626;
  --yk-color-danger-hover: #B91C1C;
  --yk-color-danger-soft: #FEF2F2;
  --yk-color-warning: #F59E0B;
  --yk-color-warning-soft: #FFFBEB;
  --yk-color-disabled-bg: #F1F5F9;
  --yk-color-disabled-text: #94A3B8;
  --yk-color-success-soft: #F0FDF4;
  --yk-color-success-text: #166534;

  --yk-font-cn: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --yk-font-number: "Inter", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --yk-font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --yk-font-size-xs: 12px;
  --yk-font-size-sm: 13px;
  --yk-font-size-base: 14px;
  --yk-font-size-md: 16px;
  --yk-font-size-lg: 20px;
  --yk-font-size-xl: 26px;
  --yk-font-size-display: 34px;
  --yk-line-height-tight: 1.18;
  --yk-line-height-base: 1.55;

  --yk-radius-control: 8px;
  --yk-radius-card: 12px;
  --yk-radius-panel: 16px;
  --yk-space-1: 4px;
  --yk-space-2: 8px;
  --yk-space-3: 12px;
  --yk-space-4: 16px;
  --yk-space-5: 20px;
  --yk-space-6: 24px;
  --yk-button-height: 40px;
  --yk-input-height: 42px;
  --yk-shadow-card: 0 16px 42px rgba(15, 23, 42, 0.08);
  --yk-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --yk-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --program-design-width: 1080;
  --program-design-height: 1920;

  --yk-status-idle-bg: #F8FAFC;
  --yk-status-idle-text: #475569;
  --yk-status-playing-bg: #EFF6FF;
  --yk-status-playing-text: #1D4ED8;
  --yk-status-paused-bg: #FFFBEB;
  --yk-status-paused-text: #92400E;
  --yk-status-error-bg: #FEF2F2;
  --yk-status-error-text: #B91C1C;
  --yk-status-ready-bg: #EFF6FF;
  --yk-status-ready-text: #1D4ED8;
  --yk-status-missing-bg: #FFFBEB;
  --yk-status-missing-text: #92400E;
  --yk-status-blocked-bg: #FEF2F2;
  --yk-status-blocked-text: #B91C1C;
  --yk-status-pending-bg: #F1F5F9;
  --yk-status-pending-text: #475569;

  --ds-color-primary: var(--yk-color-primary);
  --ds-color-nav: var(--yk-color-nav);
  --ds-color-page: var(--yk-color-page);
  --ds-color-card: var(--yk-color-card);
  --ds-color-text: var(--yk-color-text);
  --ds-color-muted: var(--yk-color-muted);
  --ds-color-border: var(--yk-color-border);
  --ds-color-blue-soft: var(--yk-color-blue-soft);
  --ds-color-danger: var(--yk-color-danger);
  --ds-color-warning: var(--yk-color-warning);

  --bg: var(--yk-color-page);
  --ink: var(--yk-color-text);
  --muted: var(--yk-color-muted);
  --panel: var(--yk-color-card);
  --panel-strong: var(--yk-color-card);
  --surface: var(--yk-color-card);
  --surface-soft: var(--yk-color-blue-soft);
  --line: var(--yk-color-border);
  --line-dark: rgba(7, 17, 31, 0.38);
  --dark: var(--yk-color-nav);
  --dark-2: #0B1628;
  --dark-3: #10213A;
  --gold: var(--yk-color-primary);
  --gold-soft: var(--yk-color-blue-soft);
  --teal: var(--yk-color-primary);
  --teal-soft: var(--yk-color-blue-soft);
  --red: var(--yk-color-danger);
  --red-soft: var(--yk-color-danger-soft);
  --green: var(--yk-color-primary);
  --mint: var(--yk-color-primary);
  --shadow: var(--yk-shadow-card);
  --shadow-sm: var(--yk-shadow-soft);
  --radius: var(--yk-radius-card);
  --radius-sm: var(--yk-radius-control);
  --mono: var(--yk-font-mono);
  --sans: var(--yk-font-cn);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--yk-color-page);
  font-family: var(--sans);
  font-size: var(--yk-font-size-base);
  line-height: var(--yk-line-height-base);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
  color: var(--yk-color-disabled-text);
  background: var(--yk-color-disabled-bg);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--yk-color-primary);
  outline-offset: 2px;
  box-shadow: var(--yk-focus-ring);
}

.yk-btn,
.primary-btn,
.secondary-btn,
.danger-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--yk-space-2);
  min-height: var(--yk-button-height);
  border-radius: var(--yk-radius-control);
  padding: 10px 14px;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1.1;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.yk-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.yk-btn:active,
.primary-btn:active,
.secondary-btn:active,
.danger-btn:active,
.text-btn:active {
  transform: translateY(0);
}

.yk-btn--primary,
.primary-btn {
  color: var(--yk-color-card);
  background: var(--yk-color-primary);
  border-color: var(--yk-color-primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.yk-btn--primary:hover,
.primary-btn:hover {
  color: var(--yk-color-card);
  background: var(--yk-color-primary-hover);
  border-color: var(--yk-color-primary-hover);
}

.yk-btn--secondary,
.secondary-btn {
  color: var(--yk-color-primary);
  background: var(--yk-color-card);
  border-color: rgba(37, 99, 235, 0.34);
}

.yk-btn--secondary:hover,
.secondary-btn:hover {
  color: var(--yk-color-primary-hover);
  background: var(--yk-color-blue-soft);
  border-color: var(--yk-color-primary);
}

.yk-btn--danger,
.danger-btn {
  color: var(--yk-color-card);
  background: var(--yk-color-danger);
  border-color: var(--yk-color-danger);
}

.yk-btn--danger:hover,
.danger-btn:hover {
  color: var(--yk-color-card);
  background: var(--yk-color-danger-hover);
  border-color: var(--yk-color-danger-hover);
}

.yk-btn--ghost,
.text-btn {
  color: var(--yk-color-primary);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.yk-btn--ghost:hover,
.text-btn:hover {
  background: var(--yk-color-blue-soft);
}

.yk-btn:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled,
.text-btn:disabled {
  color: var(--yk-color-disabled-text);
  background: var(--yk-color-disabled-bg);
  border-color: var(--yk-color-border);
  box-shadow: none;
}

.yk-card,
.panel,
.metric-panel,
.auth-card,
.auth-note {
  background: var(--yk-color-card);
  border: 1px solid var(--yk-color-border);
  border-radius: var(--yk-radius-card);
  box-shadow: var(--yk-shadow-card);
}

.yk-card {
  padding: var(--yk-space-6);
}

.yk-form-field {
  display: grid;
  gap: var(--yk-space-2);
}

.yk-form-field label,
.stack-form label,
.inline-form label,
.form-grid label {
  color: var(--yk-color-text);
  font-size: var(--yk-font-size-sm);
  font-weight: 800;
}

.yk-status,
.status-pill,
.state-badge,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--yk-radius-control);
  font-size: var(--yk-font-size-sm);
  font-weight: 800;
  line-height: 1.1;
}

.yk-status--idle,
.status-pill.idle {
  color: var(--yk-status-idle-text);
  background: var(--yk-status-idle-bg);
}

.yk-status--playing,
.status-pill.playing,
.status-pill.live {
  color: var(--yk-status-playing-text);
  background: var(--yk-status-playing-bg);
}

.yk-status--paused,
.status-pill.paused {
  color: var(--yk-status-paused-text);
  background: var(--yk-status-paused-bg);
}

.yk-status--error,
.status-pill.error,
.status-pill.danger {
  color: var(--yk-status-error-text);
  background: var(--yk-status-error-bg);
}

.yk-status--ready,
.state-badge.ready,
.state-badge.normal {
  color: var(--yk-status-ready-text);
  background: var(--yk-status-ready-bg);
}

.yk-status--missing,
.state-badge.missing,
.state-badge.warning {
  color: var(--yk-status-missing-text);
  background: var(--yk-status-missing-bg);
}

.yk-status--blocked,
.state-badge.blocked,
.state-badge.error {
  color: var(--yk-status-blocked-text);
  background: var(--yk-status-blocked-bg);
}

.yk-status--pending,
.state-badge.pending,
.state-badge.neutral {
  color: var(--yk-status-pending-text);
  background: var(--yk-status-pending-bg);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -44px;
  z-index: 10;
  background: var(--yk-color-primary);
  color: var(--yk-color-card);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 18px;
  color: rgba(255, 255, 255, 0.9);
  background: var(--yk-color-nav);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 68px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  color: var(--yk-color-card);
  background: var(--yk-color-primary);
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.brand-block h1 {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

.eyebrow {
  margin: 0;
  color: var(--yk-color-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #94a6ab;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: #dce6e1;
  background: transparent;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--yk-color-card);
  background: var(--yk-color-primary);
  border-color: rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.sidebar-status {
  margin-top: auto;
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-status strong {
  font-size: 14px;
}

.sidebar-status span {
  color: #aebcbd;
  font-size: 12px;
  line-height: 1.6;
}

.workspace {
  min-width: 0;
  padding: 24px 28px 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -28px 22px;
  padding: 22px 28px 18px;
  background: rgba(246, 248, 251, 0.92);
  border-bottom: 1px solid var(--yk-color-border);
  backdrop-filter: blur(14px);
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.top-actions,
.control-row,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.display-mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
  background: var(--yk-color-blue-soft);
}

.display-mode-option {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--yk-color-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.display-mode-option.active {
  color: #ffffff;
  background: var(--yk-color-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

body[data-display-mode="simple"] [data-display-min-mode="advanced"],
body[data-display-mode="simple"] [data-display-mode-only="debug"],
body[data-display-mode="advanced"] [data-display-mode-only="debug"] {
  display: none !important;
}

body[data-display-mode="debug"] .display-mode-switcher {
  border-color: rgba(220, 38, 38, 0.24);
}

.v417-global-debug-entry {
  margin: 0 0 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.v417-global-debug-entry summary {
  cursor: pointer;
  padding: 12px 16px;
  color: var(--yk-color-primary-strong);
  font-size: 13px;
  font-weight: 900;
}

.v417-global-debug-hint {
  margin: 0 16px 14px;
  padding: 12px;
  border-radius: 10px;
  color: var(--yk-color-muted);
  background: var(--yk-color-blue-soft);
}

.v417-global-debug-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.v417-global-debug-grid section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--yk-color-border);
  border-radius: 12px;
  background: #ffffff;
}

#displayModeStateJson {
  max-height: 240px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 10px;
  color: #dbeafe;
  background: #07111f;
  font-family: var(--yk-font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.compact {
  min-height: 32px;
  padding: 7px 11px;
  font-size: 13px;
}

.page {
  display: none;
  animation: enter 0.22s ease both;
}

.page.active {
  display: block;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(260px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.auth-card,
.auth-note {
  padding: 24px;
}

.auth-card {
  display: grid;
  gap: 12px;
}

.auth-card h3,
.auth-note strong {
  margin: 0;
  font-size: 22px;
}

.auth-note {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  color: var(--muted);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.role-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.role-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

.role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.permission-list {
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.permission-list label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
}

.permission-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.audit-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.subsection-title {
  margin: 18px 0 10px;
  font-size: 16px;
}

@keyframes enter {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.metric-grid,
.dashboard-grid,
.brain-grid,
.compliance-layout,
.settings-grid,
.avatar-workbench {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.metric-grid {
  margin-bottom: 16px;
}

.metric-panel,
.panel {
  background: var(--panel);
  border: 1px solid rgba(23, 33, 38, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-panel {
  grid-column: span 3;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.metric-panel span {
  color: var(--muted);
  font-size: 13px;
}

.metric-panel strong {
  font-family: var(--mono);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}

.metric-panel small {
  color: var(--yk-color-primary);
}

.metric-panel.warning small {
  color: var(--red);
}

.panel {
  padding: 18px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel h3 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

.state-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.state-strip div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--yk-color-blue-soft);
  border-right: 1px solid var(--line);
}

.state-strip div:last-child {
  border-right: 0;
}

.state-strip span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.state-strip strong {
  line-height: 1.45;
}

.timeline,
.risk-list,
.script-list,
.comment-stream,
.adapter-list,
.avatar-list,
.asset-list,
.setting-list,
.guide-steps,
.plain-list {
  display: grid;
  gap: 10px;
}

.timeline {
  margin-top: 16px;
}

.timeline-item,
.risk-list li,
.script-card,
.comment-card,
.adapter-card,
.avatar-card,
.asset-card,
.locked-rule,
.review-box,
.inline-result,
.brain-result {
  border-radius: var(--radius-sm);
  background: var(--yk-color-card);
  border: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px;
}

.timeline-item time {
  color: var(--yk-color-primary);
  font-family: var(--mono);
  font-size: 12px;
}

.risk-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li {
  padding: 12px;
  line-height: 1.5;
}

.risk-list b {
  color: var(--red);
}

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

.bar-item {
  display: grid;
  gap: 7px;
}

.bar-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--yk-color-border);
}

.bar-fill {
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yk-color-primary), var(--yk-color-primary-strong));
}

.review-box {
  padding: 14px;
  color: var(--yk-color-text);
  line-height: 1.75;
  white-space: pre-line;
}

.review-box.large {
  min-height: 430px;
}

.live-console-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.15fr) minmax(380px, 1fr);
  gap: 16px;
  align-items: start;
}

.live-preview,
.live-control-panel,
.live-ops-panel {
  min-height: 720px;
}

.live-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 248, 245, 0.98)),
    var(--panel);
}

.phone-frame {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 14px;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(33, 36, 38, 0.92), rgba(33, 36, 38, 0.48)),
    radial-gradient(circle at 50% 36%, #f6efe6, #e1e0d8 55%, #22272a 56%);
  border: 8px solid #161a1d;
  box-shadow: 0 22px 46px rgba(17, 25, 29, 0.32);
  color: #fff;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
}

.ai-badge {
  color: var(--yk-color-card);
  background: var(--yk-color-primary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-weight: 900;
}

.avatar-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 62%;
  margin: 0 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #F8FAFC, #EFF6FF),
    var(--yk-color-blue-soft);
  border: 2px solid rgba(37, 99, 235, 0.22);
  color: var(--ink);
}

.avatar-head {
  width: 148px;
  height: 190px;
  border-radius: 76px 76px 52px 52px;
  background: #262e31;
  padding-top: 58px;
}

.avatar-face {
  position: relative;
  width: 132px;
  height: 126px;
  margin: 0 auto;
  border-radius: 50% 50% 45% 45%;
  background: #f0c3a8;
}

.eye {
  position: absolute;
  top: 48px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #10181c;
}

.eye.left {
  left: 38px;
}

.eye.right {
  right: 38px;
}

.mouth {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 38px;
  height: 7px;
  border-radius: 999px;
  background: var(--yk-color-danger);
  transform: translateX(-50%);
  transition: height 0.18s ease;
}

.mouth.speaking {
  height: 18px;
}

.caption-line {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: rgba(17, 25, 29, 0.72);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.product-card-preview {
  margin: 14px 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.product-card-preview strong,
.product-card-preview span {
  display: block;
}

.product-card-preview span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.current-script {
  display: grid;
  gap: 8px;
  padding: 14px;
  margin-bottom: 14px;
  border-left: 5px solid var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
}

.current-script span {
  color: var(--yk-color-primary-strong);
  font-size: 12px;
}

.queue-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.queue-list li,
.queue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--yk-color-card);
  line-height: 1.5;
}

.queue-item strong,
.queue-item span {
  display: block;
}

.queue-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.queue-item.spoken {
  border-left: 4px solid var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
}

.queue-item.blocked {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
}

.queue-item.empty {
  display: block;
  color: var(--muted);
}

.comment-stream {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
  margin-top: 12px;
}

.realtime-status-strip,
.event-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.realtime-status-strip div,
.event-metric-grid div {
  min-height: 64px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f7faf7;
}

.realtime-status-strip span,
.event-metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.realtime-status-strip strong,
.event-metric-grid strong {
  display: block;
  margin-top: 5px;
  line-height: 1.25;
}

.status-text.connected {
  color: var(--yk-status-ready-text);
}

.status-text.reconnecting,
.status-text.connecting {
  color: var(--yk-status-paused-text);
}

.status-text.disconnected,
.status-text.unsupported {
  color: var(--red);
}

.event-control-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--yk-color-blue-soft);
}

.event-toggle-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.switch-line input {
  width: 18px;
  height: 18px;
}

.compact-row {
  margin: 0;
}

.event-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.live-event-feed {
  display: grid;
  gap: 9px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
  margin-bottom: 14px;
}

.live-event-card {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: var(--radius-sm);
  background: var(--yk-color-card);
  line-height: 1.45;
}

.live-event-card.high {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.live-event-card.medium {
  border-left-color: var(--yk-color-warning);
  background: var(--yk-color-warning-soft);
}

.live-event-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.live-event-card strong,
.live-event-card span {
  display: block;
}

.live-event-card p {
  margin: 0;
}

.live-event-card span {
  color: var(--muted);
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.comment-card {
  padding: 12px;
  line-height: 1.55;
}

.comment-card strong {
  display: block;
}

.comment-card span {
  color: var(--muted);
  font-size: 12px;
}

.ai-suggestion {
  margin-top: 14px;
}

.live-session-card,
.queue-composer {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.live-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.live-status-strip div {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  background: var(--yk-color-blue-soft);
  border-right: 1px solid var(--line);
}

.live-status-strip div:last-child {
  border-right: 0;
}

.live-status-strip span {
  color: var(--muted);
  font-size: 12px;
}

.live-status-strip strong {
  line-height: 1.35;
}

.live-bind-grid,
.live-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.full-btn {
  width: 100%;
  margin-top: 8px;
}

.live-output-note {
  padding: 12px;
  border-radius: var(--radius-sm);
  color: var(--yk-color-muted);
  background: var(--yk-color-blue-soft);
  line-height: 1.55;
  font-size: 13px;
}

.v417-live-console {
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.08fr) minmax(380px, 1fr);
  gap: 16px;
}

.v417-live-console .panel,
.v417-live-preview-column,
.v417-live-control-column,
.v417-live-interaction-column {
  min-height: 0;
}

.v417-output-preview-card,
.v417-live-core-card,
.v417-live-interaction-column {
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.v417-live-phone-frame {
  width: min(100%, 300px);
  margin-bottom: 12px;
  border-width: 7px;
  border-radius: 24px;
}

.v417-preview-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v417-live-current-grid,
.v417-queue-composer,
.v417-drawer-body {
  display: grid;
  gap: 12px;
}

.v417-live-status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.v417-live-status-strip div {
  min-height: 64px;
  background: linear-gradient(180deg, #f8fbff, var(--yk-color-blue-soft));
}

.v417-current-script {
  margin: 14px 0;
  border-left-color: var(--v416-blue);
}

.v417-queue-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v417-queue-list {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.v417-session-settings-drawer,
.v417-simulator-drawer,
.v417-log-drawer-live {
  margin-top: 14px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.v417-session-settings-drawer summary,
.v417-simulator-drawer summary,
.v417-log-drawer-live summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  color: var(--v416-blue);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.v417-session-settings-drawer summary::-webkit-details-marker,
.v417-simulator-drawer summary::-webkit-details-marker,
.v417-log-drawer-live summary::-webkit-details-marker {
  display: none;
}

.v417-session-settings-drawer summary::after,
.v417-simulator-drawer summary::after,
.v417-log-drawer-live summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--v416-blue);
  font-weight: 900;
}

.v417-session-settings-drawer[open] summary::after,
.v417-simulator-drawer[open] summary::after,
.v417-log-drawer-live[open] summary::after {
  content: "-";
}

.v417-drawer-body {
  padding: 0 14px 14px;
}

.v417-technical-strip {
  margin-bottom: 0;
}

.v417-live-interaction-column {
  display: grid;
  gap: 12px;
}

.v417-event-metric-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.v417-event-metric-strip div {
  min-height: 46px;
  padding: 7px 8px;
  border-color: rgba(37, 99, 235, 0.16);
  background: var(--yk-color-blue-soft);
}

.v417-event-metric-strip span {
  font-size: 10px;
}

.v417-event-metric-strip strong {
  margin-top: 2px;
  color: var(--v416-blue);
  font-size: 16px;
}

.v417-interaction-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: #f8fbff;
}

.v417-interaction-tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--yk-color-muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.v417-interaction-tab:hover {
  color: var(--v416-blue);
  background: #ffffff;
}

.v417-interaction-tab.active {
  border-color: rgba(37, 99, 235, 0.26);
  color: var(--v416-blue);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.v417-live-tab-panel {
  min-height: 360px;
}

.v417-live-tab-panel[hidden] {
  display: none !important;
}

.live-ai-suggestion-pool {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.live-ai-suggestion-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--yk-color-border);
  border-left: 4px solid var(--v416-blue);
  border-radius: 12px;
  background: #ffffff;
  line-height: 1.5;
}

.live-ai-suggestion-card p {
  margin: 0;
}

.live-ai-suggestion-card span {
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v417-live-interaction-column .comment-stream,
.v417-live-interaction-column .live-event-feed {
  max-height: 420px;
  margin-top: 8px;
}

.subhead {
  margin: 8px 0;
  color: var(--yk-color-text);
  font-weight: 900;
}

.live-log-list {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
}

.log-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--yk-color-card);
}

.log-row strong {
  color: var(--yk-color-text);
}

.log-row span,
.log-row time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.split-layout,
.script-layout,
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--yk-color-text);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--yk-input-height);
  border: 1px solid var(--yk-color-border);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  color: var(--ink);
  background: var(--yk-color-card);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--yk-color-disabled-text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--yk-color-primary);
  box-shadow: var(--yk-focus-ring);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-grid,
.setting-list {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--yk-color-card);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--yk-color-muted);
  background: var(--yk-color-blue-soft);
  font-size: 13px;
}

td {
  line-height: 1.55;
}

tr:last-child td {
  border-bottom: 0;
}

.maintenance-summary,
.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.maintenance-summary {
  margin-bottom: 12px;
}

.maintenance-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--yk-radius-card);
  background: var(--yk-color-card);
}

.maintenance-card span,
.maintenance-card small {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.maintenance-card strong {
  overflow-wrap: anywhere;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
}

.state-badge.normal {
  color: var(--yk-status-ready-text);
  background: var(--yk-status-ready-bg);
}

.state-badge.warning {
  color: var(--yk-status-missing-text);
  background: var(--yk-status-missing-bg);
}

.state-badge.error {
  color: var(--yk-status-blocked-text);
  background: var(--yk-status-blocked-bg);
}

.state-badge.neutral {
  color: var(--yk-status-pending-text);
  background: var(--yk-status-pending-bg);
}

.sensitive-warning {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius-sm);
  color: var(--yk-status-blocked-text);
  background: var(--red-soft);
  line-height: 1.55;
}

.compact-table table {
  min-width: 420px;
}

.info-list strong {
  max-width: 70%;
  overflow-wrap: anywhere;
  text-align: right;
}

.table-actions {
  display: flex;
  gap: 7px;
}

.mini-btn {
  border: 1px solid transparent;
  border-radius: var(--yk-radius-control);
  padding: 6px 8px;
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
}

.mini-btn.danger {
  color: var(--yk-color-card);
  background: var(--red);
}

.script-card {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.script-card.active {
  border-color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
}

.script-card h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.script-card p {
  margin: 0;
  line-height: 1.65;
}

.script-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.script-meta span,
.tag {
  display: inline-flex;
  border-radius: var(--yk-radius-control);
  padding: 4px 7px;
  background: var(--yk-status-pending-bg);
  color: var(--yk-status-pending-text);
  font-size: 12px;
}

.script-meta .risk-high,
.risk-high {
  color: var(--yk-status-blocked-text);
  background: var(--red-soft);
}

.script-audit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.inline-result,
.brain-result {
  min-height: 54px;
  margin-top: 12px;
  padding: 12px;
  line-height: 1.65;
  white-space: pre-line;
}

.brain-grid .panel {
  grid-column: span 6;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.pipeline div {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #172327;
  color: #e9f0eb;
  text-align: center;
  line-height: 1.4;
}

.adapter-card {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.adapter-card strong {
  font-size: 16px;
}

.notice-box {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius-sm);
  color: var(--yk-status-blocked-text);
  background: var(--red-soft);
  line-height: 1.6;
}

.avatar-card,
.asset-card {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.avatar-card.active {
  border-color: var(--yk-color-primary);
  box-shadow: inset 3px 0 0 var(--yk-color-primary);
}

.avatar-card-header,
.asset-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.avatar-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--yk-color-blue-soft);
}

.avatar-meta,
.asset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.upload-box {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: auto;
  padding: 0;
  font-size: 13px;
}

.check-line input {
  width: auto;
}

.compact-strip {
  margin-bottom: 12px;
}

.avatar-preview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1fr);
  gap: 14px;
}

.avatar-preview-stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(20, 122, 112, 0.22), transparent 42%),
    #142025;
}

.avatar-preview-media {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 42px 18px 74px;
  color: #dfe8e3;
  text-align: center;
}

.avatar-preview-media img,
.avatar-preview-media video {
  width: min(100%, 330px);
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.avatar-preview-stage .ai-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
}

.avatar-preview-stage .caption-line {
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.mock-console pre {
  min-height: 190px;
  overflow: auto;
  padding: 12px;
  border-radius: var(--radius-sm);
  color: #e9f0eb;
  background: #10181c;
  font-family: var(--mono);
  line-height: 1.6;
}

.compliance-layout .panel,
.settings-grid .panel {
  grid-column: span 6;
}

.locked-rule {
  padding: 14px;
}

.locked-rule p {
  color: var(--muted);
  line-height: 1.65;
}

.compliance-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-cell {
  min-height: 76px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #f4f7f2;
  border: 1px solid #dde8df;
}

.summary-cell span,
.config-row small,
.compliance-rule span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.summary-cell strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.compact-row {
  grid-template-columns: minmax(180px, 1fr) 150px;
  margin-bottom: 12px;
}

.rule-editor {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 150px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.compliance-rule-list,
.compliance-task-list,
.compliance-config-list {
  display: grid;
  gap: 10px;
}

.compliance-rule,
.review-task,
.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #fbfcf9;
  border: 1px solid #dfe7df;
}

.compliance-rule.disabled {
  opacity: 0.52;
}

.review-task {
  display: grid;
  align-items: start;
}

.review-task p {
  margin: 4px 0 0;
  color: var(--ink);
  line-height: 1.65;
}

.config-row select {
  width: 110px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag-cloud button {
  border: 0;
  border-radius: 4px;
  padding: 7px 9px;
  color: #842d26;
  background: var(--red-soft);
}

.guide-steps,
.plain-list {
  padding-left: 22px;
  line-height: 1.8;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: #fff;
  background: #11191d;
  box-shadow: 0 18px 44px rgba(17, 25, 29, 0.24);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .live-console-grid,
  .split-layout,
  .script-layout,
  .guide-layout,
  .avatar-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .metric-panel,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12,
  .brain-grid .panel,
  .compliance-layout .panel,
  .settings-grid .panel {
    grid-column: span 12;
  }

  .state-strip,
  .pipeline {
    grid-template-columns: 1fr;
  }

  .live-bind-grid,
  .live-log-grid,
  .script-audit-grid,
  .live-status-strip,
  .inline-form,
  .compliance-summary,
  .compact-row,
  .rule-editor {
    grid-template-columns: 1fr;
  }

  .live-status-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .live-status-strip div:last-child {
    border-bottom: 0;
  }

  .compliance-rule,
  .config-row {
    align-items: stretch;
    flex-direction: column;
  }

  .config-row select {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 18px 14px 30px;
  }

  .topbar {
    margin: -18px -14px 18px;
    padding: 18px 14px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .dashboard-grid,
  .brain-grid,
  .compliance-layout,
  .settings-grid,
  .avatar-workbench {
    gap: 12px;
  }

  .panel,
  .metric-panel {
    padding: 14px;
  }
}

.nav-external {
  display: block;
  width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.34);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--yk-color-card);
  background: var(--yk-color-primary);
  font-weight: 900;
  text-decoration: none;
}

.v4-control-body {
  color: var(--ink);
  background: var(--yk-color-page);
}

.broadcast-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.broadcast-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.broadcast-status-grid div {
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.broadcast-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.broadcast-status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.broadcast-avatar-panel,
.broadcast-action-panel,
.broadcast-commerce-panel {
  min-height: 560px;
}

.broadcast-avatar-panel label,
.broadcast-action-panel label,
.broadcast-commerce-panel label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 800;
}

.broadcast-avatar-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--yk-color-card);
}

.broadcast-avatar-card img,
.broadcast-avatar-placeholder {
  width: 84px;
  height: 84px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--dark);
}

.broadcast-avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--yk-color-primary);
  font-weight: 900;
}

.broadcast-avatar-card strong,
.broadcast-avatar-card span,
.broadcast-avatar-card small {
  display: block;
}

.broadcast-avatar-card span,
.broadcast-avatar-card small {
  margin-top: 5px;
  color: var(--muted);
}

.broadcast-warning {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--yk-status-blocked-text);
  background: var(--red-soft);
  font-weight: 800;
}

.broadcast-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 10px;
  margin-top: 10px;
}

.broadcast-upload-row input[type="text"],
.broadcast-upload-row input[type="file"] {
  min-width: 0;
}

.broadcast-button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.broadcast-toggle-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

#page-broadcast-control {
  margin: -4px -4px 0;
}

.broadcast-control-surface {
  position: relative;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr) minmax(380px, 1.12fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--yk-color-border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, var(--yk-color-page), #FFFFFF);
  box-shadow: var(--yk-shadow-card);
}

.broadcast-command-center {
  grid-column: 1 / -1;
  min-height: 0;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--yk-color-card);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.24), transparent 32%),
    linear-gradient(180deg, var(--yk-color-nav) 0%, #10213A 100%);
  box-shadow: 0 18px 42px rgba(7, 17, 31, 0.26);
}

.broadcast-command-center .panel-header {
  align-items: flex-start;
  gap: 18px;
}

.broadcast-hero-copy {
  max-width: 760px;
}

.broadcast-hero-copy h3 {
  margin-top: 8px;
  color: var(--yk-color-card);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  text-wrap: balance;
}

.broadcast-hero-copy p:not(.eyebrow) {
  max-width: 62ch;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.broadcast-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 280px;
}

.broadcast-command-center .secondary-btn {
  color: var(--yk-color-card);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.broadcast-command-center .primary-btn {
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.broadcast-timeline-strip {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
  color: var(--yk-color-blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.broadcast-timeline-strip i {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.72), rgba(239, 246, 255, 0.08));
}

.broadcast-command-center .broadcast-status-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.broadcast-command-center .broadcast-status-grid div {
  min-height: 88px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.broadcast-command-center .broadcast-status-grid span {
  color: #9fb0b2;
}

.broadcast-command-center .broadcast-status-grid strong {
  color: #fff;
  font-size: 16px;
}

.broadcast-board-panel {
  position: relative;
  min-height: 610px;
  border-color: var(--yk-color-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.98)),
    var(--panel-strong);
  box-shadow: var(--yk-shadow-card);
}

.broadcast-board-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--yk-color-primary), rgba(30, 64, 175, 0.72), rgba(15, 23, 42, 0.18));
}

.broadcast-board-panel .panel-header {
  padding-top: 4px;
}

.broadcast-board-panel h3 {
  font-size: 22px;
}

.broadcast-board-panel label {
  color: var(--yk-color-text);
  font-size: 13px;
}

.broadcast-board-panel select,
.broadcast-board-panel input,
.broadcast-board-panel textarea {
  border-color: var(--yk-color-border);
  background: var(--yk-color-card);
}

.broadcast-avatar-card {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.96));
}

.broadcast-avatar-card img,
.broadcast-avatar-placeholder {
  box-shadow: 0 14px 30px rgba(17, 25, 29, 0.14);
}

.broadcast-warning {
  border-color: rgba(220, 38, 38, 0.26);
  background: linear-gradient(135deg, #FEF2F2, #FFFFFF);
}

.broadcast-button-grid button {
  min-height: 48px;
  font-weight: 900;
}

.broadcast-button-grid button[data-bc-play] {
  color: var(--yk-color-card);
  background: linear-gradient(180deg, #10213A, var(--yk-color-nav));
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 30px rgba(17, 25, 29, 0.14);
}

.broadcast-button-grid button[data-bc-play]:hover {
  background: linear-gradient(180deg, var(--yk-color-primary-strong), var(--yk-color-nav));
}

.broadcast-commerce-panel textarea {
  min-height: 138px;
  resize: vertical;
}

.broadcast-toggle-row .secondary-btn {
  min-height: 44px;
  background: var(--yk-color-card);
}

.broadcast-console-shell {
  grid-template-areas:
    "top top top"
    "preview transport content"
    "log log log";
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr) minmax(360px, 1fr);
  align-items: stretch;
  min-height: calc(100vh - 128px);
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(145deg, #0d1518 0%, #152428 48%, #f5f7f0 48.2%, #f9faf4 100%);
}

.broadcast-console-topbar {
  grid-area: top;
  display: grid;
  grid-template-columns: minmax(190px, 0.65fr) minmax(0, 1.7fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(231, 196, 111, 0.22);
  border-radius: 8px;
  color: #f8f2dc;
  background:
    linear-gradient(135deg, rgba(231, 196, 111, 0.12), transparent 34%),
    linear-gradient(180deg, #10181c 0%, #17272b 100%);
  box-shadow: 0 18px 44px rgba(12, 18, 20, 0.24);
}

.broadcast-console-topbar .broadcast-hero-copy h3 {
  margin: 4px 0 0;
  color: #fff7dc;
  font-size: 30px;
  line-height: 1;
}

.broadcast-console-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.broadcast-console-status div,
.broadcast-preview-meta div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.broadcast-console-status span,
.broadcast-preview-meta span,
.broadcast-log-header span {
  display: block;
  color: #9fb0b2;
  font-size: 12px;
  font-weight: 800;
}

.broadcast-console-status strong,
.broadcast-preview-meta strong {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #fff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-console-topbar .broadcast-quick-actions {
  min-width: 0;
}

.broadcast-console-topbar .broadcast-timeline-strip,
.broadcast-console-topbar .broadcast-status-hidden {
  display: none;
}

.broadcast-output-preview-panel {
  grid-area: preview;
  min-height: 0;
  background: linear-gradient(180deg, #11191d, #18272b);
  color: #eef4ee;
}

.broadcast-output-preview-panel .panel-header h3,
.broadcast-transport-panel .panel-header h3 {
  color: #10181c;
}

.broadcast-output-preview-panel .panel-header h3 {
  color: #fff7dc;
}

.broadcast-output-preview {
  position: relative;
  width: min(100%, 310px);
  aspect-ratio: 9 / 16;
  margin: 12px auto 14px;
  overflow: hidden;
  border: 1px solid rgba(231, 196, 111, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 20%),
    linear-gradient(158deg, #0b1517 0%, #10181c 45%, #071112 100%);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

.broadcast-preview-bg,
.broadcast-preview-person,
.broadcast-output-preview::after {
  position: absolute;
  inset: 0;
  content: "";
}

.broadcast-preview-bg {
  background:
    linear-gradient(145deg, rgba(231, 196, 111, 0.12), transparent 38%, rgba(99, 213, 188, 0.1)),
    linear-gradient(180deg, #152428, #0c1315);
}

.broadcast-preview-person {
  top: 23%;
  left: 22%;
  right: 22%;
  bottom: 22%;
  border-radius: 48% 48% 10% 10%;
  background:
    radial-gradient(circle at 50% 18%, #f5d9c4 0 16%, transparent 16.5%),
    linear-gradient(180deg, transparent 0 24%, rgba(238, 244, 238, 0.42) 24.4% 100%);
  opacity: 0.92;
}

.broadcast-output-preview::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 28%, rgba(0, 0, 0, 0.42)),
    linear-gradient(90deg, rgba(231, 196, 111, 0.07), transparent 34%, rgba(99, 213, 188, 0.06));
  pointer-events: none;
}

.broadcast-preview-logo,
.broadcast-preview-ai,
.broadcast-preview-caption,
.broadcast-preview-product-card,
.broadcast-preview-empty {
  position: absolute;
  z-index: 2;
}

.broadcast-preview-logo {
  top: 18px;
  left: 18px;
  font-size: 16px;
  font-weight: 900;
}

.broadcast-preview-ai {
  top: 18px;
  right: 18px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(241, 209, 126, 0.94);
  color: #10181c;
  font-size: 11px;
  font-weight: 900;
}

.broadcast-preview-empty {
  top: 42%;
  left: 26px;
  right: 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.broadcast-preview-product-card {
  right: 18px;
  bottom: 64px;
  max-width: 72%;
  padding: 9px 10px;
  border-radius: 8px;
  color: #10181c;
  background: rgba(249, 251, 247, 0.94);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.broadcast-preview-product-card span {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-preview-caption {
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: -webkit-box;
  overflow: hidden;
  padding: 10px 11px;
  border-radius: 8px;
  background: rgba(6, 11, 13, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.28;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.broadcast-preview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.broadcast-content-panel {
  grid-area: content;
  min-height: 0;
}

.broadcast-content-panel textarea {
  min-height: 108px;
}

.broadcast-transport-panel {
  grid-area: transport;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 246, 239, 0.98)),
    #f8faf4;
}

.broadcast-current-action {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #10181c;
  background: rgba(231, 196, 111, 0.74);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.broadcast-control-pad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.broadcast-command-button {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(17, 25, 29, 0.12);
  border-radius: 8px;
  color: #eef4ee;
  background:
    linear-gradient(180deg, #24363b, #11191d);
  box-shadow: 0 18px 40px rgba(17, 25, 29, 0.18);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.broadcast-command-button span,
.broadcast-command-button strong {
  display: block;
}

.broadcast-command-button span {
  font-size: 21px;
  font-weight: 900;
}

.broadcast-command-button strong {
  margin-top: 9px;
  color: #b8c8c7;
  font-family: var(--mono);
  font-size: 13px;
}

.broadcast-command-button:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 24px 48px rgba(17, 25, 29, 0.22);
}

.broadcast-command-button:active {
  transform: translateY(0) scale(0.99);
}

.broadcast-command-button.is-active {
  border-color: rgba(37, 99, 235, 0.9);
  background:
    linear-gradient(180deg, var(--yk-color-primary), var(--yk-color-primary-strong));
  color: var(--yk-color-card);
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.28);
}

.broadcast-command-button.is-active strong {
  color: rgba(255, 255, 255, 0.78);
}

.broadcast-command-button.primary-command {
  min-height: 128px;
  grid-column: span 2;
  background:
    linear-gradient(135deg, var(--yk-color-primary), var(--yk-color-nav) 72%);
}

.broadcast-command-button.utility-command {
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
  box-shadow: none;
}

.broadcast-command-button.utility-command strong {
  color: #667679;
}

.broadcast-command-button.danger-command {
  color: var(--yk-color-card);
  background: linear-gradient(180deg, var(--yk-color-danger), var(--yk-color-danger-hover));
}

.broadcast-command-button.output-command {
  color: var(--yk-color-card);
  background: linear-gradient(180deg, var(--yk-color-primary), var(--yk-color-primary-strong));
}

.broadcast-log-dock {
  grid-area: log;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 25, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(17, 25, 29, 0.08);
}

.broadcast-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
}

.broadcast-log-header strong {
  color: #10181c;
  font-size: 16px;
}

.broadcast-setup-advice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.broadcast-setup-advice[hidden] {
  display: none;
}

.broadcast-setup-advice span {
  padding: 8px 10px;
  border: 1px solid rgba(217, 93, 84, 0.26);
  border-radius: 8px;
  color: #6f221d;
  background: #fff4ef;
  font-size: 12px;
  font-weight: 800;
}

.broadcast-recent-logs {
  display: grid;
  gap: 7px;
}

.broadcast-log-item,
.broadcast-log-empty {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f6f0;
}

.broadcast-log-item strong {
  color: #102224;
  font-family: var(--mono);
  font-size: 12px;
}

.broadcast-log-item span,
.broadcast-log-empty {
  overflow: hidden;
  color: #59686b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-log-empty {
  grid-template-columns: 1fr;
}

@media (max-width: 1280px) {
  .broadcast-console-shell {
    grid-template-areas:
      "top"
      "preview"
      "content"
      "transport"
      "log";
    grid-template-columns: 1fr;
  }

  .broadcast-console-topbar {
    grid-template-columns: 1fr;
  }

  .broadcast-console-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .broadcast-log-dock {
    grid-template-columns: 1fr;
  }

  .broadcast-layout {
    grid-template-columns: 1fr;
  }

  .broadcast-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.v4-control-shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.v4-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.v4-control-header h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: 0;
}

.v4-control-actions,
.v4-status-bar,
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v4-status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.v4-status-bar > div {
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.v4-status-bar span,
.v4-live-card-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.v4-status-bar strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.v4-control-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(340px, 0.95fr) minmax(320px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.v4-panel {
  min-height: 560px;
}

.v4-panel label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 800;
}

.v4-panel input[type="file"] {
  min-width: 0;
}

.switch-row {
  margin-top: 16px;
}

.switch-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-weight: 700;
}

.v4-live-card-preview {
  min-height: 140px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.v4-live-card-preview strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.v4-live-card-preview small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.v4-preview-panel {
  min-height: 560px;
}

.v4-mini-output {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.38);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(37, 99, 235, 0.84), rgba(7, 17, 31, 0.96)),
    var(--yk-color-nav);
  color: #fff;
}

.v4-mini-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--yk-color-primary);
  color: var(--yk-color-card);
  font-size: 12px;
  font-weight: 900;
}

.v4-mini-video {
  position: absolute;
  inset: 58px 18px 132px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13px;
}

.v4-mini-caption,
.v4-mini-card {
  position: absolute;
  left: 18px;
  right: 18px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.45;
}

.v4-mini-caption {
  bottom: 78px;
  background: rgba(0, 0, 0, 0.58);
}

.v4-mini-card {
  bottom: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 900;
}

.v4-output-url {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  word-break: break-all;
}

.program-output-body,
body.program-output-active {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #05070c;
  cursor: none;
}

body.program-output-active .app-shell,
body.program-output-active .toast {
  display: none;
}

.program-output-route {
  display: none;
}

body.program-output-active .program-output-route {
  display: block;
}

.program-output-stage {
  position: relative;
  aspect-ratio: 9 / 16;
  width: min(100vw, calc(100vh * 9 / 16));
  max-width: 100vw;
  height: min(100vh, calc(100vw * 16 / 9));
  max-height: 100vh;
  margin: auto;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 18%, rgba(231, 196, 111, 0.18), transparent 26%),
    linear-gradient(160deg, #092824 0%, #091014 48%, #11191d 100%);
  container-name: program-output;
  container-type: size;
  isolation: isolate;
  cursor: none;
}

.program-background-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 12, 15, 0.06), rgba(6, 12, 15, 0.42)),
    linear-gradient(145deg, rgba(20, 122, 112, 0.36), transparent 46%),
    #081014;
  background-position: center;
  background-size: cover;
}

.program-background-layer::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent 34%, rgba(0, 0, 0, 0.42)),
    radial-gradient(circle at 50% 52%, transparent 0 34%, rgba(0, 0, 0, 0.16) 68%);
}

.program-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.program-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 32px;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 50% 34%, rgba(231, 196, 111, 0.14), transparent 24%),
    linear-gradient(160deg, #092824, #081014 58%, #11191d);
  font-size: 32px;
  font-weight: 900;
  text-align: center;
}

.program-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 84px;
  color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 50% 38%, rgba(231, 196, 111, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(7, 13, 16, 0.74), rgba(7, 13, 16, 0.9)),
    linear-gradient(145deg, rgba(20, 122, 112, 0.22), transparent 56%, rgba(231, 196, 111, 0.12));
  text-align: center;
}

.program-loading[hidden] {
  display: none !important;
}

.program-loading::before {
  width: 86px;
  height: 86px;
  border: 1px solid rgba(231, 196, 111, 0.48);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  content: "";
  animation: program-loading-spin 1.2s linear infinite;
}

.program-loading-mark,
.program-loading-text {
  display: block;
}

.program-loading-mark {
  margin-top: 34px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  font-weight: 900;
}

.program-loading-text {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  line-height: 1.24;
}

.program-ai-badge {
  position: absolute;
  top: 44px;
  right: 38px;
  z-index: 6;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(231, 196, 111, 0.95);
  color: #10181c;
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.program-product-card {
  position: absolute;
  left: 38px;
  right: 38px;
  bottom: 76px;
  z-index: 3;
  display: grid;
  grid-template-columns: 164px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: #10181c;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.program-product-image {
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  border-radius: var(--radius);
  color: var(--yk-color-primary-strong);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96)),
    var(--yk-color-blue-soft);
  background-position: center;
  background-size: cover;
  font-size: 42px;
  font-weight: 900;
}

.program-product-card span {
  display: block;
  color: var(--yk-color-primary);
  font-size: 22px;
  font-weight: 900;
}

.program-product-card strong {
  display: block;
  margin-top: 8px;
  font-size: 40px;
  line-height: 1.15;
}

.program-product-card small {
  display: block;
  margin-top: 10px;
  color: #4a565b;
  font-size: 22px;
}

.program-product-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.program-product-card li {
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  color: #0c403a;
  background: rgba(20, 122, 112, 0.12);
  font-size: 18px;
  font-weight: 800;
}

.program-caption {
  position: absolute;
  left: 38px;
  right: 38px;
  bottom: 302px;
  z-index: 4;
  max-height: 190px;
  overflow: hidden;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 30px;
  line-height: 1.45;
  text-align: center;
}

.program-logo {
  position: absolute;
  top: 44px;
  left: 38px;
  z-index: 5;
  color: #fff;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.live-room-template {
  background:
    linear-gradient(180deg, #081012 0%, #11191d 58%, #081012 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 32px 80px rgba(0, 0, 0, 0.55);
}

.live-room-template::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 54px 54px;
  mix-blend-mode: screen;
}

.live-room-template .program-background-layer {
  background:
    linear-gradient(180deg, rgba(6, 12, 15, 0.08), rgba(6, 12, 15, 0.54)),
    linear-gradient(145deg, rgba(231, 196, 111, 0.12) 0 18%, transparent 18.2% 68%, rgba(20, 122, 112, 0.22) 68.4%),
    linear-gradient(180deg, #0c1719 0%, #11191d 52%, #071012 100%);
}

.program-frame-overlay,
.program-safe-zone {
  position: absolute;
  inset: 28px;
  z-index: 2;
  pointer-events: none;
}

.program-frame-overlay {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(231, 196, 111, 0.06), inset 0 -220px 160px rgba(0, 0, 0, 0.34);
}

.program-safe-zone {
  inset: 118px 34px 58px;
  border-top: 1px solid rgba(231, 196, 111, 0.16);
  border-bottom: 1px solid rgba(231, 196, 111, 0.12);
  opacity: 0.28;
}

.program-live-chip {
  position: absolute;
  top: 102px;
  left: 38px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #eef4ee;
  background: rgba(9, 16, 20, 0.62);
  backdrop-filter: blur(16px);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.program-live-chip::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: var(--yk-color-primary);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.72);
}

.live-room-template .program-ai-badge {
  top: 42px;
  right: 38px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.96);
  font-size: 22px;
}

.live-room-template .program-logo {
  top: 38px;
  left: 38px;
  font-size: 38px;
}

.live-room-template .program-product-card {
  left: 34px;
  right: 34px;
  bottom: 54px;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(248, 250, 244, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

.live-room-template .program-product-image {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-sm);
  font-size: 38px;
}

.live-room-template .program-product-card span {
  color: #0b645b;
  font-size: 20px;
}

.live-room-template .program-product-card strong {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  font-size: 34px;
  line-height: 1.1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.live-room-template .program-product-card small {
  margin-top: 8px;
  font-size: 20px;
}

.live-room-template .program-product-card li {
  padding: 6px 10px;
  border: 1px solid rgba(20, 122, 112, 0.14);
  background: rgba(20, 122, 112, 0.1);
  font-size: 17px;
}

.live-room-template .program-caption {
  left: 34px;
  right: 34px;
  bottom: 244px;
  max-height: 178px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(8, 15, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.36;
  text-wrap: balance;
}

.live-room-template .program-empty {
  z-index: 3;
  align-content: center;
  padding: 80px;
  background:
    linear-gradient(180deg, rgba(8, 16, 18, 0.94), rgba(17, 25, 29, 0.9)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), transparent 42%, rgba(239, 246, 255, 0.08));
  font-size: 36px;
  line-height: 1.28;
}

.program-state-idle .program-live-chip::before {
  background: var(--yk-color-primary);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.72);
}

.program-state-playing .program-live-chip::before {
  background: var(--yk-color-primary);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.72);
}

.program-state-paused .program-live-chip::before,
.program-state-fallback .program-live-chip::before {
  background: var(--red);
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.62);
}

.program-state-fallback .program-frame-overlay {
  border-color: rgba(220, 38, 38, 0.28);
}

.program-state-loading .program-frame-overlay {
  box-shadow:
    inset 0 0 0 1px rgba(231, 196, 111, 0.08),
    inset 0 -420px 220px rgba(0, 0, 0, 0.38),
    inset 0 80px 96px rgba(0, 0, 0, 0.1);
}

@keyframes program-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

body.program-output-active,
.program-output-body {
  overscroll-behavior: none;
}

body.program-output-active::-webkit-scrollbar,
.program-output-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.live-room-template {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 16%),
    linear-gradient(158deg, #0b1517 0%, #10181c 42%, #071112 100%);
  box-shadow: none;
}

.live-room-template::before {
  z-index: 1;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.055) 0 14%, transparent 14.2% 66%, rgba(255, 255, 255, 0.035) 66.4% 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0 58%, rgba(0, 0, 0, 0.26) 100%);
  mix-blend-mode: normal;
}

.live-room-template .program-background-layer {
  background:
    linear-gradient(180deg, rgba(4, 12, 13, 0.1), rgba(4, 12, 13, 0.62)),
    linear-gradient(145deg, #132725 0%, #0d1518 54%, #151a20 100%);
  background-position: center;
  background-size: cover;
  transform: scale(1.002);
}

.live-room-template .program-background-layer::after {
  background:
    linear-gradient(180deg, rgba(5, 11, 13, 0.18) 0%, transparent 28%, rgba(5, 11, 13, 0.5) 100%),
    linear-gradient(90deg, rgba(231, 196, 111, 0.06), transparent 26%, transparent 74%, rgba(99, 213, 188, 0.05));
}

.live-room-template .program-background-layer[data-has-image="true"]::after {
  backdrop-filter: blur(20px) saturate(1.08);
  background:
    linear-gradient(180deg, rgba(8, 14, 16, 0.18), rgba(8, 14, 16, 0.62)),
    linear-gradient(90deg, rgba(8, 14, 16, 0.7), transparent 42%, rgba(8, 14, 16, 0.74));
}

.program-frame-overlay {
  inset: 0;
  z-index: 3;
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 -420px 220px rgba(0, 0, 0, 0.36),
    inset 0 80px 96px rgba(0, 0, 0, 0.08);
}

.program-safe-zone,
.program-live-chip,
.program-live-chip[hidden] {
  display: none !important;
}

.program-video {
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  background: transparent;
  filter: saturate(1.02) contrast(1.02);
  transition: opacity 180ms ease;
}

.program-video.is-loading {
  opacity: 0.08;
}

.live-room-template .program-logo {
  top: 52px;
  left: 52px;
  z-index: 8;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f8fbf8;
  background: rgba(7, 13, 16, 0.32);
  backdrop-filter: blur(16px);
  font-size: 34px;
  line-height: 1;
  text-shadow: none;
}

.live-room-template .program-ai-badge {
  top: 52px;
  right: 52px;
  z-index: 8;
  padding: 12px 16px;
  border: 1px solid rgba(231, 196, 111, 0.72);
  border-radius: 8px;
  color: #10181c;
  background: rgba(241, 209, 126, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  font-size: 24px;
  line-height: 1;
}

.live-room-template .program-empty {
  z-index: 5;
  align-content: center;
  padding: 88px;
  background:
    linear-gradient(180deg, rgba(13, 21, 24, 0.92), rgba(8, 13, 15, 0.86)),
    linear-gradient(145deg, rgba(231, 196, 111, 0.16), transparent 36%, rgba(99, 213, 188, 0.12));
  color: rgba(255, 255, 255, 0.88);
  font-size: 46px;
  line-height: 1.18;
}

.program-fallback-card {
  grid-template-rows: auto auto auto auto;
  gap: 18px;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(231, 196, 111, 0.2), transparent 26%),
    linear-gradient(180deg, rgba(9, 16, 19, 0.92), rgba(7, 12, 14, 0.96)),
    linear-gradient(145deg, rgba(20, 122, 112, 0.22), transparent 46%, rgba(231, 196, 111, 0.12));
}

.program-fallback-card[hidden] {
  display: none !important;
}

.program-fallback-logo {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #f8fbf8;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.program-fallback-badge {
  padding: 10px 14px;
  border-radius: 8px;
  color: #10181c;
  background: rgba(241, 209, 126, 0.94);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.program-fallback-title {
  margin-top: 36px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 54px;
  font-weight: 900;
  line-height: 1.16;
  text-wrap: balance;
}

.program-fallback-subtitle {
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 900;
}

.live-room-template .program-product-card {
  left: auto;
  right: 48px;
  bottom: 130px;
  width: min(560px, 56%);
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background: rgba(249, 251, 247, 0.92);
  backdrop-filter: blur(20px) saturate(1.14);
  color: #10181c;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.34);
}

.live-room-template .program-product-image {
  width: 126px;
  height: 126px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(241, 209, 126, 0.86), rgba(220, 238, 233, 0.98)),
    #f4f1df;
  background-position: center;
  background-size: cover;
  font-size: 34px;
}

.live-room-template .program-product-card span,
.live-room-template .program-product-card strong,
.live-room-template .program-product-card small {
  min-width: 0;
}

.live-room-template .program-product-card span {
  overflow: hidden;
  color: #0d6a61;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-room-template .program-product-card strong {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  font-size: 32px;
  line-height: 1.14;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.live-room-template .program-product-card small {
  overflow: hidden;
  margin-top: 8px;
  color: #445158;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-room-template .program-product-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.live-room-template .program-product-card li {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(13, 106, 97, 0.16);
  border-radius: 8px;
  background: rgba(13, 106, 97, 0.1);
  color: #0d514a;
  font-size: 16px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-room-template .program-caption {
  left: 66px;
  right: 66px;
  bottom: 136px;
  z-index: 7;
  display: -webkit-box;
  max-height: 142px;
  overflow: hidden;
  padding: 20px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(6, 11, 13, 0.72);
  backdrop-filter: blur(18px);
  color: #fff;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.26;
  text-align: center;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.live-room-template .program-caption[hidden],
.live-room-template .program-product-card[hidden] {
  display: none !important;
}

.live-room-template.program-product-visible .program-caption {
  bottom: 324px;
}

.program-template-clean-brand .program-video {
  height: 100%;
  object-position: center bottom;
}

.program-template-product-focus .program-background-layer {
  background:
    linear-gradient(180deg, rgba(7, 13, 16, 0.06), rgba(7, 13, 16, 0.58)),
    linear-gradient(155deg, #172421 0%, #10181c 45%, #071012 100%);
}

.program-template-product-focus .program-video {
  height: 100%;
  object-position: 46% bottom;
}

.program-template-product-focus .program-product-card {
  left: 50px;
  right: 50px;
  bottom: 84px;
  width: auto;
  grid-template-columns: 166px minmax(0, 1fr);
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
}

.program-template-product-focus .program-product-image {
  width: 166px;
  height: 166px;
}

.program-template-product-focus .program-caption {
  bottom: 304px;
}

.program-template-product-focus.program-product-visible .program-caption {
  bottom: 328px;
}

.program-template-fashion-style {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(160deg, #192225 0%, #273634 44%, #10181c 100%);
}

.program-template-fashion-style .program-background-layer {
  background:
    linear-gradient(180deg, rgba(12, 17, 19, 0.04), rgba(12, 17, 19, 0.46)),
    linear-gradient(145deg, rgba(214, 187, 198, 0.38) 0%, rgba(158, 214, 202, 0.28) 42%, #11191d 100%);
}

.program-template-fashion-style .program-video {
  height: 100%;
  object-position: center bottom;
}

.program-template-fashion-style .program-product-card {
  right: 44px;
  bottom: 118px;
  width: min(520px, 52%);
  background: rgba(255, 250, 250, 0.9);
}

.program-template-fashion-style .program-ai-badge {
  color: #f7f6f2;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(12, 18, 20, 0.72);
}

.program-template-fashion-style .program-caption {
  background: rgba(29, 24, 28, 0.66);
}

.program-product-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
}

.live-room-template .program-product-card {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.96), rgba(237, 245, 241, 0.94)),
    rgba(250, 251, 247, 0.94);
  box-shadow:
    0 26px 68px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.live-room-template .program-product-image {
  width: 132px;
  height: 132px;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 28, 0.08);
  background:
    linear-gradient(150deg, rgba(243, 226, 177, 0.74), rgba(218, 234, 228, 0.96)),
    #f6f4ea;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.live-room-template .program-product-image.is-placeholder {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(145deg, #f3ead7, #dcebe5 62%, #c7d5cf);
}

.live-room-template .program-product-image .program-product-brand-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(16, 24, 28, 0.08);
  border-radius: 7px;
  color: rgba(16, 24, 28, 0.76);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.live-room-template .program-product-kicker {
  overflow: hidden;
  color: #52635f;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-room-template .program-product-card strong {
  display: -webkit-box;
  margin-top: 0;
  overflow: hidden;
  color: #10181c;
  font-size: 31px;
  line-height: 1.13;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.program-product-price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid rgba(18, 87, 80, 0.14);
  border-radius: 7px;
  color: #123d38;
  background: rgba(218, 238, 232, 0.72);
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-product-price[hidden] {
  display: none !important;
}

.program-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}

.live-room-template .program-product-tags li {
  max-width: min(160px, 100%);
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(82, 99, 95, 0.14);
  border-radius: 7px;
  color: #384a47;
  background: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-template-product-focus .program-product-card {
  grid-template-columns: 154px minmax(0, 1fr);
  padding: 20px;
}

.program-template-product-focus .program-product-image {
  width: 154px;
  height: 154px;
}

.program-template-fashion-style .program-product-card {
  background:
    linear-gradient(135deg, rgba(255, 250, 250, 0.94), rgba(238, 246, 242, 0.9)),
    rgba(252, 248, 246, 0.92);
}

@media (max-width: 1120px) {
  .v4-control-grid,
  .v4-status-bar {
    grid-template-columns: 1fr;
  }

  .v4-control-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

:root {
  --v416-blue: var(--yk-color-primary);
  --v416-blue-strong: var(--yk-color-primary-strong);
  --v416-black: var(--yk-color-nav);
  --v416-white: var(--yk-color-card);
  --v416-ink: var(--yk-color-text);
  --v416-line: var(--yk-color-border);
  --v416-muted: var(--yk-color-muted);
  --v416-panel: var(--yk-color-card);
  --v416-soft: var(--yk-color-blue-soft);
  --v416-shadow: var(--yk-shadow-card);
}

.v416-app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 245, 255, 0.96)),
    #f5f8ff;
  color: var(--v416-ink);
}

.v416-sidebar {
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(13, 21, 36, 0.98), rgba(5, 7, 12, 0.98)),
    var(--v416-black);
  color: var(--v416-white);
}

.v416-sidebar .brand-block {
  align-items: center;
  padding: 0 0 22px;
}

.v416-sidebar .brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--v416-white);
  background: linear-gradient(145deg, var(--v416-blue), var(--v416-blue-strong));
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.32);
}

.v416-sidebar .brand-block h1 {
  color: var(--v416-white);
  font-size: 20px;
  line-height: 1.2;
}

.v416-sidebar .eyebrow {
  color: rgba(248, 251, 255, 0.62);
}

.v416-nav {
  gap: 18px;
}

.v416-nav .nav-item {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(248, 251, 255, 0.78);
  background: transparent;
  font-weight: 800;
  text-decoration: none;
}

.v416-nav .nav-item small {
  display: block;
  color: rgba(248, 251, 255, 0.48);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.v416-nav .nav-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--v416-white);
  background: rgba(255, 255, 255, 0.06);
}

.v416-nav .nav-item:hover small {
  color: rgba(248, 251, 255, 0.72);
}

.v416-nav .nav-item.active {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--v416-white);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.v416-nav .nav-item.active small {
  color: rgba(248, 251, 255, 0.86);
}

.v417-product-nav {
  gap: 8px;
}

.v417-product-nav .nav-item {
  min-height: 56px;
  border-radius: 12px;
  padding: 10px 12px;
}

.v417-product-nav .nav-item span {
  font-size: 14px;
  line-height: 1.1;
}

.v417-product-nav .nav-item small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v417-product-nav .nav-item.active {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--v416-white);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
}

.v417-product-nav .nav-item.active small {
  color: rgba(248, 251, 255, 0.88);
}

.v417-center-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid var(--v416-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  overflow-x: auto;
}

.v417-center-tabs[hidden] {
  display: none !important;
}

.v417-center-tab {
  display: grid;
  gap: 2px;
  min-width: 118px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--v416-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.v417-center-tab span {
  color: var(--v416-ink);
  font-size: 14px;
  font-weight: 900;
}

.v417-center-tab small {
  color: var(--v416-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.v417-center-tab:hover {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--yk-color-blue-soft);
}

.v417-center-tab.active {
  border-color: rgba(37, 99, 235, 0.32);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: inset 0 -2px 0 var(--v416-blue), 0 10px 24px rgba(37, 99, 235, 0.12);
}

.v417-center-tab:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.v416-sidebar .sidebar-status {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.v416-sidebar .sidebar-status strong {
  color: var(--v416-white);
}

.v416-workspace {
  min-width: 0;
  padding: 22px 28px 28px;
  background:
    linear-gradient(180deg, var(--v416-white), #edf4ff 52%, #f7faff);
}

.v416-topbar {
  border: 1px solid var(--v416-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--v416-shadow);
}

.v416-topbar h2 {
  color: var(--v416-ink);
}

.v416-topbar .status-pill.live {
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--v416-blue-strong);
  background: rgba(37, 99, 235, 0.1);
}

.v416-topbar .primary-btn {
  color: var(--v416-white);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.v416-topbar .primary-btn:hover {
  color: var(--v416-white);
  background: linear-gradient(135deg, #1d4ed8, var(--v416-blue-strong));
}

.v416-topbar .secondary-btn {
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--v416-blue-strong);
  background: var(--v416-white);
}

.v416-broadcast-console {
  grid-template-areas:
    "top top top"
    "preview transport content"
    "log log log";
  grid-template-columns: minmax(310px, 0.92fr) minmax(360px, 1.08fr) minmax(330px, 0.92fr);
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.v416-control-statusbar {
  grid-column: 1 / -1;
  grid-area: top;
  display: grid;
  grid-template-columns: minmax(210px, 0.74fr) minmax(520px, 2fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(13, 21, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #eef5ff),
    var(--v416-panel);
  box-shadow: var(--v416-shadow);
}

.v416-control-statusbar .broadcast-hero-copy h3 {
  color: var(--v416-ink);
  font-size: 26px;
}

.v416-control-statusbar .broadcast-hero-copy p:not(.eyebrow) {
  max-width: 38ch;
  margin: 8px 0 0;
  color: var(--v416-muted);
  font-size: 13px;
  line-height: 1.5;
}

.v416-control-statusbar .broadcast-console-status {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.v416-control-statusbar .broadcast-console-status div {
  min-height: 64px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.v416-control-statusbar .broadcast-console-status span {
  color: var(--v416-muted);
}

.v416-control-statusbar .broadcast-console-status strong {
  color: var(--v416-ink);
}

.v416-control-statusbar .broadcast-mode-pill {
  border-color: rgba(37, 99, 235, 0.22);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(239, 246, 255, 0.92)),
    #ffffff;
}

.v416-control-statusbar .broadcast-mode-pill strong {
  color: var(--v416-blue-strong);
}

.v416-control-statusbar .broadcast-quick-actions {
  display: flex;
  gap: 10px;
}

.v416-live-sequence {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.06);
}

.v416-live-sequence span {
  color: var(--v416-blue-strong);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.v416-live-sequence i {
  flex: 1;
  min-width: 12px;
  height: 1px;
  background: rgba(37, 99, 235, 0.24);
}

.v416-preview-column,
.v416-content-column,
.v416-transport-column {
  border: 1px solid rgba(13, 21, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--v416-shadow);
}

.v416-broadcast-console .broadcast-board-panel::before {
  height: 3px;
  background: linear-gradient(90deg, var(--v416-blue), rgba(15, 47, 134, 0.72), rgba(13, 21, 36, 0.18));
}

.v416-broadcast-console .panel-header h3,
.v416-broadcast-console .broadcast-board-panel h3 {
  color: var(--v416-ink);
}

.v416-broadcast-console .eyebrow {
  color: var(--v416-muted);
}

.v416-preview-column {
  order: 1;
  padding: 16px;
  background:
    linear-gradient(180deg, #ffffff, #eef5ff),
    var(--v416-panel);
}

.v416-content-column {
  order: 3;
  padding: 16px;
  max-height: none;
  overflow: visible;
}

.v416-transport-column {
  order: 2;
  padding: 16px;
  background:
    linear-gradient(180deg, #ffffff, #f4f8ff),
    var(--v416-panel);
}

.broadcast-preview-shell {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.74), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.broadcast-preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--v416-muted);
  font-size: 12px;
  font-weight: 800;
}

.broadcast-preview-topline strong {
  color: var(--v416-blue-strong);
  font-family: var(--mono);
  font-weight: 900;
}

.v416-preview-column .broadcast-output-preview {
  width: min(100%, 292px);
  margin-top: 0;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.34), rgba(5, 7, 12, 0.62)),
    linear-gradient(145deg, #142850, #0a1020 58%, #05070c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.v416-preview-column .broadcast-preview-logo,
.v416-preview-column .broadcast-preview-ai {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--v416-blue-strong);
}

.v416-preview-column .broadcast-preview-ai {
  color: var(--v416-white);
  background: rgba(37, 99, 235, 0.9);
}

.v416-preview-column .broadcast-preview-product-card,
.v416-preview-column .broadcast-preview-caption {
  border-radius: 8px;
}

.v416-preview-column .broadcast-empty-state {
  top: 37%;
  left: 24px;
  right: 24px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: rgba(248, 251, 255, 0.92);
  background: rgba(7, 17, 31, 0.56);
  backdrop-filter: blur(12px);
}

.v416-preview-column .broadcast-preview-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v416-content-column label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.v416-content-column select,
.v416-content-column textarea,
.v416-content-column input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: #fbfdff;
}

.v416-content-column textarea {
  min-height: 64px;
}

.v416-content-column .broadcast-avatar-card {
  grid-template-columns: 58px 1fr;
  min-height: 64px;
  margin-top: 4px;
  padding: 8px;
}

.v416-content-column .broadcast-avatar-card img,
.v416-content-column .broadcast-avatar-placeholder {
  width: 58px;
  height: 58px;
}

.v416-content-column .broadcast-avatar-card small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.v416-content-column select:focus,
.v416-content-column textarea:focus,
.v416-content-column input:focus {
  border-color: rgba(37, 99, 235, 0.52);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.broadcast-step-list {
  display: grid;
  gap: 0;
}

.broadcast-step {
  display: grid;
  gap: 6px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.broadcast-step:first-child {
  padding-top: 0;
}

.broadcast-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.broadcast-step-heading {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
}

.broadcast-step-heading > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--v416-white);
  background: var(--v416-blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.broadcast-step-heading strong {
  display: block;
  color: var(--v416-ink);
  font-size: 14px;
  line-height: 1.2;
}

.broadcast-step-heading small {
  display: block;
  margin-top: 2px;
  color: var(--v416-muted);
  font-size: 12px;
  line-height: 1.35;
}

.broadcast-sync-hidden {
  display: none;
}

.action-clips-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(420px, 1.2fr) minmax(340px, 0.95fr);
  gap: 18px;
}

.action-clips-hero {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, #ffffff, #eef5ff),
    #ffffff;
  box-shadow: var(--v416-shadow);
}

.action-clips-hero h3 {
  margin: 4px 0 0;
  color: var(--v416-ink);
  font-size: 30px;
  line-height: 1.1;
}

.action-clips-hero p:not(.eyebrow) {
  max-width: 68ch;
  margin: 8px 0 0;
  color: var(--v416-muted);
  line-height: 1.6;
}

.action-clips-avatar-panel,
.action-clips-list-panel,
.action-clips-editor-panel {
  border: 1px solid rgba(13, 21, 36, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--v416-shadow);
}

.action-clips-workbench label {
  display: block;
  margin: 12px 0 7px;
  color: var(--v416-muted);
  font-size: 12px;
  font-weight: 900;
}

.action-clips-workbench select,
.action-clips-workbench input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: #fbfdff;
}

.action-clips-avatar-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.72);
}

.action-clips-avatar-card img,
.action-clips-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.action-clips-avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--v416-white);
  background: var(--v416-blue);
  font-weight: 900;
}

.action-clips-avatar-card strong,
.action-clips-avatar-card span,
.action-clips-avatar-card small {
  display: block;
}

.action-clips-avatar-card span,
.action-clips-avatar-card small {
  margin-top: 4px;
  color: var(--v416-muted);
  font-size: 12px;
}

.action-clips-missing {
  margin-top: 16px;
}

.compact-header {
  margin-bottom: 8px;
}

.action-clips-missing-list {
  display: grid;
  gap: 8px;
}

.action-clips-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.action-clips-check.is-ready {
  color: var(--v416-blue-strong);
  background: rgba(37, 99, 235, 0.08);
}

.action-clips-check.is-missing {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
}

.action-clips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-clip-card {
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  color: var(--v416-ink);
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.action-clip-card:hover,
.action-clip-card.is-selected {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.54);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
}

.action-clip-card span,
.action-clip-card strong,
.action-clip-card small {
  display: block;
}

.action-clip-card span {
  color: var(--v416-blue-strong);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.action-clip-card strong {
  overflow: hidden;
  margin-top: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-clip-card small {
  margin-top: 8px;
  color: var(--v416-muted);
  font-size: 12px;
}

.action-clips-upload {
  display: grid;
  gap: 8px;
}

.action-clips-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.action-clips-preview-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.22), rgba(5, 7, 12, 0.62)),
    linear-gradient(145deg, #142850, #0a1020 58%, #05070c);
}

.action-clips-preview-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.action-clips-preview-screen video[hidden] {
  display: none;
}

.action-clips-preview-empty,
.action-clips-empty {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 16px;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 12px;
  color: var(--v416-muted);
  background: rgba(239, 246, 255, 0.72);
  font-weight: 800;
  text-align: center;
}

.action-clips-preview-empty {
  position: absolute;
  inset: 18px;
  color: rgba(248, 251, 255, 0.92);
  background: rgba(7, 17, 31, 0.56);
}

.action-clips-selected {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  color: var(--v416-muted);
  background: rgba(239, 246, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.action-clips-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-clips-actions .danger-btn {
  grid-column: 1 / -1;
}

@media (max-width: 1240px) {
  .action-clips-workbench {
    grid-template-columns: 1fr;
  }
}

.v416-transport-column .panel-header {
  align-items: center;
}

.v416-action-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v416-broadcast-console .broadcast-current-action {
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--v416-blue-strong);
  background: rgba(37, 99, 235, 0.08);
}

.v416-action-stack .broadcast-command-button {
  min-height: 96px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  color: var(--v416-ink);
  background:
    linear-gradient(180deg, #ffffff, #eef5ff),
    #ffffff;
  box-shadow: 0 14px 32px rgba(13, 21, 36, 0.08);
}

.v416-action-stack .broadcast-command-button:hover,
.v416-action-stack .broadcast-command-button.is-active {
  border-color: rgba(37, 99, 235, 0.54);
  color: var(--v416-blue-strong);
  background:
    linear-gradient(180deg, #ffffff, #dfeaff),
    #ffffff;
}

.v416-action-stack .primary-command {
  color: var(--v416-white);
  background:
    linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong)),
    var(--v416-blue);
}

.v416-action-stack .primary-command:hover,
.v416-action-stack .primary-command.is-active {
  color: var(--v416-white);
}

.v416-action-stack .danger-command {
  border-color: rgba(5, 7, 12, 0.16);
  color: var(--v416-white);
  background:
    linear-gradient(135deg, #111827, var(--v416-black)),
    var(--v416-black);
}

.broadcast-command-note {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 10px;
  color: var(--v416-muted);
  background: rgba(239, 246, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.v416-broadcast-console .primary-btn,
.v416-broadcast-console .secondary-btn,
.v416-broadcast-console .danger-btn {
  border-radius: 8px;
}

.v416-broadcast-console .primary-btn {
  border-color: var(--v416-blue);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
}

.v416-broadcast-console .secondary-btn {
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--v416-blue-strong);
  background: #ffffff;
}

.v416-broadcast-console .broadcast-warning {
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--v416-blue-strong);
  background: rgba(37, 99, 235, 0.08);
}

.v416-broadcast-console .broadcast-log-dock {
  grid-column: 1 / -1;
  max-height: 150px;
  border: 1px solid rgba(13, 21, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--v416-shadow);
}

/* V4-1.7: minimal playout information architecture */
.v417-minimal-console {
  display: grid;
  grid-template-areas:
    "top"
    "main"
    "log";
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.v417-live-summary {
  grid-template-columns: minmax(220px, 0.72fr) minmax(520px, 1.75fr) auto;
  gap: 12px;
  padding: 16px;
}

.v417-live-summary .broadcast-hero-copy h3 {
  font-size: 28px;
}

.v417-live-summary .broadcast-hero-copy p:not(.eyebrow) {
  max-width: 42ch;
}

.v417-live-summary .broadcast-console-status {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.v417-live-summary .broadcast-console-status div {
  min-height: 58px;
  padding: 10px 12px;
}

.v417-live-summary .broadcast-console-status span {
  font-size: 11px;
}

.v417-live-summary .broadcast-console-status strong {
  font-size: 14px;
}

.v417-step-rail {
  padding: 8px 10px;
}

.v417-step-rail span {
  font-size: 12px;
}

.v417-main-flow {
  grid-area: main;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1fr) minmax(320px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}

.v417-main-flow > .broadcast-output-preview-panel,
.v417-main-flow > .broadcast-transport-panel,
.v417-main-flow > .broadcast-content-panel {
  grid-area: auto;
  order: initial;
  width: auto;
}

.v417-focus-panel,
.v417-run-card {
  min-height: 0;
  border-radius: 14px;
}

.v417-focus-panel .panel-header,
.v417-run-card .panel-header {
  padding-bottom: 10px;
}

.v417-focus-panel .panel-header h3,
.v417-run-card .panel-header h3 {
  font-size: 22px;
}

.v417-focus-panel .broadcast-preview-shell {
  min-height: 0;
}

.v417-focus-panel .broadcast-output-preview {
  width: min(100%, 280px);
}

.v417-primary-controls {
  grid-template-columns: 1fr;
  gap: 10px;
}

.v417-primary-controls .broadcast-command-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 82px;
  padding: 18px;
  text-align: left;
}

.v417-primary-controls .broadcast-command-button span {
  font-size: 24px;
  line-height: 1.05;
}

.v417-primary-controls .broadcast-command-button strong {
  justify-self: end;
  color: inherit;
  opacity: 0.66;
}

.v417-secondary-actions,
.v417-advanced-drawer,
.v417-log-drawer {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.72)),
    var(--v416-white);
}

.v417-secondary-actions {
  margin-top: 12px;
}

.v417-secondary-actions summary,
.v417-advanced-drawer summary,
.v417-log-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--v416-blue-strong);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.v417-secondary-actions summary::-webkit-details-marker,
.v417-advanced-drawer summary::-webkit-details-marker,
.v417-log-drawer summary::-webkit-details-marker {
  display: none;
}

.v417-secondary-actions summary::after,
.v417-advanced-drawer summary::after,
.v417-log-drawer summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: var(--v416-white);
  background: var(--v416-blue);
  font-family: var(--mono);
  line-height: 1;
}

.v417-secondary-actions[open] summary::after,
.v417-advanced-drawer[open] summary::after,
.v417-log-drawer[open] summary::after {
  content: "-";
}

.broadcast-secondary-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.broadcast-secondary-action-grid .broadcast-command-button {
  min-height: 66px;
  border-radius: 10px;
  box-shadow: none;
}

.broadcast-secondary-action-grid .broadcast-command-button span {
  font-size: 15px;
}

.v417-run-list {
  gap: 10px;
}

.v417-run-list .broadcast-step {
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.72);
}

.v417-run-list .broadcast-step-sync .primary-btn {
  width: 100%;
  min-height: 46px;
}

.v417-advanced-drawer {
  margin-top: 12px;
}

.broadcast-advanced-grid {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.broadcast-advanced-grid .broadcast-step {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.broadcast-advanced-grid .broadcast-step:last-child {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.v417-log-drawer {
  grid-area: log;
  grid-column: 1 / -1;
  max-height: none;
  overflow: hidden;
}

.v417-log-drawer .broadcast-log-header,
.v417-log-drawer .broadcast-setup-advice,
.v417-log-drawer .broadcast-recent-logs {
  margin-inline: 14px;
}

.v417-log-drawer .broadcast-recent-logs {
  margin-bottom: 14px;
}

.v417-minimal-console .broadcast-command-note {
  margin-top: 12px;
  text-align: left;
}

.v417-minimal-console .broadcast-status-hidden,
.v417-minimal-console .broadcast-sync-hidden {
  display: none !important;
}

.v417-minimal-console .broadcast-avatar-card span {
  color: var(--v416-blue-strong);
  font-weight: 900;
}

@media (max-width: 1280px) {
  .v417-live-summary,
  .v417-main-flow {
    grid-template-columns: 1fr;
  }

  .v417-live-summary .broadcast-console-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.program-v416-live-room {
  overflow: hidden;
  cursor: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
    linear-gradient(155deg, #10234a 0%, #071326 44%, #05070c 100%);
  color: var(--v416-white);
}

.program-v416-live-room::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%, rgba(0, 0, 0, 0.3) 100%),
    linear-gradient(140deg, rgba(37, 99, 235, 0.16) 0 18%, transparent 18.2% 68%, rgba(255, 255, 255, 0.05) 68.4%);
}

.program-v416-live-room .program-background-layer {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.08), rgba(5, 7, 12, 0.6)),
    linear-gradient(145deg, #1f4aa8 0%, #0b1f45 42%, #05070c 100%);
  background-position: center;
  background-size: cover;
}

.program-v416-live-room .program-background-layer::after {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.16), transparent 34%, rgba(5, 7, 12, 0.48)),
    linear-gradient(90deg, rgba(5, 7, 12, 0.72), transparent 45%, rgba(5, 7, 12, 0.7));
}

.program-v416-live-room .program-frame-overlay {
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 -460px 240px rgba(5, 7, 12, 0.45),
    inset 0 80px 96px rgba(5, 7, 12, 0.1);
}

.program-v416-live-room .program-video {
  height: 100%;
  object-position: center bottom;
  background: transparent;
  filter: saturate(1.02) contrast(1.02);
  transition: opacity 180ms ease;
}

.program-v416-live-room .program-video.is-loading {
  opacity: 0.08;
}

.program-v416-live-room .program-detail-asset-layer {
  position: absolute;
  z-index: 6;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.92);
  box-shadow: 0 24px 68px rgba(5, 7, 12, 0.36);
  backdrop-filter: blur(16px);
}

.program-v416-live-room .program-detail-asset-layer[hidden] {
  display: none;
}

.program-v416-live-room .program-detail-asset-layer.is-window {
  right: 50px;
  top: 310px;
  width: 360px;
  height: 520px;
}

.program-v416-live-room .program-detail-asset-layer.is-half {
  right: 42px;
  top: 286px;
  width: 500px;
  height: 820px;
}

.program-v416-live-room .program-detail-asset-layer.is-fullscreen {
  inset: 150px 46px 220px;
  z-index: 7;
}

.program-v416-live-room .program-detail-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07111f;
}

.program-v416-live-room .program-detail-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 17, 31, 0.72);
  color: #ffffff;
}

.program-v416-live-room .program-detail-copy small {
  color: #bfdbfe;
  font-size: 16px;
  font-weight: 900;
}

.program-v416-live-room .program-detail-copy strong {
  overflow: hidden;
  font-size: 24px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-v416-live-room .program-logo {
  top: 52px;
  left: 52px;
  z-index: 8;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--v416-white);
  background: rgba(5, 7, 12, 0.38);
  backdrop-filter: blur(16px);
  font-size: 34px;
  line-height: 1;
  text-shadow: none;
}

.program-v416-live-room .program-ai-badge {
  top: 52px;
  right: 52px;
  z-index: 8;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  color: var(--v416-white);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
  box-shadow: 0 18px 42px rgba(5, 7, 12, 0.28);
  font-size: 24px;
  line-height: 1;
}

.program-v416-live-room .program-product-card {
  left: auto;
  right: 50px;
  bottom: 128px;
  width: min(560px, 56%);
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 244, 255, 0.94)),
    var(--v416-white);
  backdrop-filter: blur(20px) saturate(1.12);
  color: var(--v416-ink);
  box-shadow: 0 28px 70px rgba(5, 7, 12, 0.34);
}

.program-v416-live-room .program-product-image {
  width: 132px;
  height: 132px;
  overflow: hidden;
  border: 1px solid rgba(13, 21, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(145deg, #ffffff, #d9e7ff),
    #f5f8ff;
  background-position: center;
  background-size: cover;
  color: var(--v416-blue-strong);
  font-size: 34px;
}

.program-v416-live-room .program-product-kicker,
.program-v416-live-room .program-product-card span {
  overflow: hidden;
  color: var(--v416-muted);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-v416-live-room .program-product-card strong {
  display: -webkit-box;
  margin-top: 0;
  overflow: hidden;
  color: var(--v416-ink);
  font-size: 31px;
  line-height: 1.13;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.program-v416-live-room .program-product-price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  color: var(--v416-blue-strong);
  background: rgba(37, 99, 235, 0.08);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-v416-live-room .program-product-tags li,
.program-v416-live-room .program-product-card li {
  max-width: min(160px, 100%);
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 8px;
  color: var(--v416-blue-strong);
  background: rgba(37, 99, 235, 0.08);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-v416-live-room .program-caption {
  left: 66px;
  right: 66px;
  bottom: 138px;
  z-index: 7;
  display: -webkit-box;
  max-height: 142px;
  overflow: hidden;
  padding: 20px 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(18px);
  color: var(--v416-white);
  box-shadow: 0 22px 54px rgba(5, 7, 12, 0.34);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.26;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.program-v416-live-room.program-product-visible .program-caption {
  bottom: 326px;
}

.program-v416-live-room .program-caption[hidden],
.program-v416-live-room .program-product-card[hidden],
.program-v416-live-room .program-live-chip,
.program-v416-live-room .program-safe-zone {
  display: none !important;
}

.program-v416-live-room .program-empty,
.program-v416-live-room .program-fallback-card {
  position: absolute;
  inset: 0;
  z-index: 5;
  align-content: center;
  justify-items: center;
  padding: 88px;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.9), rgba(7, 19, 38, 0.88)),
    linear-gradient(145deg, rgba(37, 99, 235, 0.28), transparent 46%, rgba(255, 255, 255, 0.08));
  color: rgba(248, 251, 255, 0.92);
  font-size: 46px;
  line-height: 1.18;
}

.program-v416-live-room .program-fallback-card::before,
.program-v416-live-room .program-fallback-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.program-v416-live-room .program-fallback-card::before {
  right: 9%;
  bottom: 9%;
  width: 33%;
  height: 22%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(37, 99, 235, 0.08));
  opacity: 0.38;
}

.program-v416-live-room .program-fallback-card::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.08));
  opacity: 0.72;
}

.program-v416-live-room.program-template-product-focus .program-fallback-card {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.86), rgba(7, 19, 38, 0.88)),
    linear-gradient(120deg, rgba(37, 99, 235, 0.38) 0 28%, transparent 28.2% 100%),
    linear-gradient(155deg, #163a85 0%, #071326 48%, #05070c 100%);
}

.program-v416-live-room.program-template-product-focus .program-fallback-card::before {
  right: 8%;
  bottom: 11%;
  width: 42%;
  height: 18%;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow: 0 30px 90px rgba(37, 99, 235, 0.18);
  opacity: 0.76;
}

.program-v416-live-room.program-template-fashion-style .program-fallback-card {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.78), rgba(7, 19, 38, 0.9)),
    linear-gradient(140deg, rgba(239, 246, 255, 0.12) 0 21%, transparent 21.2% 100%),
    linear-gradient(160deg, #0b1730 0%, #183469 48%, #05070c 100%);
}

.program-v416-live-room.program-template-fashion-style .program-fallback-card::before {
  left: 7%;
  right: auto;
  bottom: 8%;
  width: 22%;
  height: 48%;
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(37, 99, 235, 0.08));
  box-shadow: 0 40px 110px rgba(15, 23, 42, 0.28);
  opacity: 0.68;
}

.program-v416-live-room .program-fallback-logo {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--v416-white);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.program-v416-live-room .program-fallback-badge {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--v416-white);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.program-v416-live-room .program-fallback-title {
  margin-top: 36px;
  max-width: 680px;
  color: rgba(248, 251, 255, 0.94);
  font-size: 54px;
  font-weight: 900;
  line-height: 1.16;
}

.program-v416-live-room .program-fallback-subtitle {
  color: rgba(248, 251, 255, 0.54);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 900;
}

.program-v416-live-room.program-template-clean-brand .program-video {
  height: 100%;
  object-position: center bottom;
}

.program-v416-live-room.program-template-product-focus .program-background-layer {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.06), rgba(5, 7, 12, 0.58)),
    linear-gradient(155deg, #1f4aa8 0%, #0d2a62 45%, #05070c 100%);
}

.program-v416-live-room.program-template-product-focus .program-video {
  height: 100%;
  object-position: 46% bottom;
}

.program-v416-live-room.program-template-product-focus .program-product-card {
  left: 50px;
  right: 50px;
  bottom: 84px;
  width: auto;
  grid-template-columns: 154px minmax(0, 1fr);
  padding: 20px;
}

.program-v416-live-room.program-template-product-focus .program-product-image {
  width: 154px;
  height: 154px;
}

.program-v416-live-room.program-template-product-focus .program-caption,
.program-v416-live-room.program-template-product-focus.program-product-visible .program-caption {
  bottom: 328px;
}

.program-v416-live-room.program-template-fashion-style {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 18%),
    linear-gradient(160deg, #0f2144 0%, #1b2f55 44%, #05070c 100%);
}

.program-v416-live-room.program-template-fashion-style .program-background-layer {
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.05), rgba(5, 7, 12, 0.48)),
    linear-gradient(145deg, #244d9f 0%, #0d2a62 42%, #05070c 100%);
}

.program-v416-live-room.program-template-fashion-style .program-video {
  height: 100%;
  object-position: center bottom;
}

.program-v416-live-room.program-template-fashion-style .program-product-card {
  right: 44px;
  bottom: 118px;
  width: min(520px, 52%);
}

.program-v416-live-room .program-logo {
  top: 2.7cqh;
  left: 4.8cqw;
  padding: 0.68cqh 1.48cqw;
  border-radius: 0.74cqw;
  font-size: 3.15cqw;
}

.program-v416-live-room .program-ai-badge {
  top: 1.4cqh;
  right: 1.8cqw;
  padding: 0.3cqh 0.7cqw;
  border: 1px solid rgba(248, 251, 255, 0.12);
  border-radius: 0.46cqw;
  color: rgba(248, 251, 255, 0.62);
  background: rgba(7, 17, 31, 0.22);
  box-shadow: none;
  font-size: 1.55cqw;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0.42;
}

.program-v416-live-room .program-product-card {
  right: 4.6cqw;
  bottom: 6.7cqh;
  width: min(51.9cqw, 560px);
  grid-template-columns: 12.2cqw minmax(0, 1fr);
  gap: 1.67cqw;
  padding: 1.67cqw;
  border-radius: 0.74cqw;
}

.program-v416-live-room .program-product-image {
  width: 12.2cqw;
  height: 12.2cqw;
  border-radius: 0.74cqw;
  font-size: 3.15cqw;
}

.program-v416-live-room .program-product-kicker,
.program-v416-live-room .program-product-card span {
  font-size: 1.57cqw;
}

.program-v416-live-room .program-product-card strong {
  font-size: 2.87cqw;
}

.program-v416-live-room .program-product-price {
  padding: 0.26cqh 0.93cqw;
  border-radius: 0.65cqw;
  font-size: 1.76cqw;
}

.program-v416-live-room .program-product-tags {
  gap: 0.65cqw;
}

.program-v416-live-room .program-product-tags li,
.program-v416-live-room .program-product-card li {
  padding: 0.31cqh 0.83cqw;
  border-radius: 0.65cqw;
  font-size: 1.39cqw;
}

.program-v416-live-room .program-caption {
  left: 6.1cqw;
  right: 6.1cqw;
  bottom: 7.2cqh;
  max-height: 7.4cqh;
  padding: 1.04cqh 2.59cqw;
  border-radius: 0.74cqw;
  font-size: 3.7cqw;
}

.program-v416-live-room.program-product-visible .program-caption {
  bottom: 24cqh;
}

.program-v416-live-room .program-empty,
.program-v416-live-room .program-fallback-card {
  padding: 8.15cqw;
  font-size: 4.26cqw;
}

.program-v416-live-room .program-fallback-logo {
  padding: 0.72cqh 1.67cqw;
  border-radius: 0.74cqw;
  font-size: 3.9cqw;
}

.program-v416-live-room .program-fallback-badge {
  padding: 0.52cqh 1.3cqw;
  border-radius: 0.74cqw;
  font-size: 2.22cqw;
}

.program-v416-live-room .program-fallback-title {
  margin-top: 1.88cqh;
  max-width: 63cqw;
  font-size: 5cqw;
}

.program-v416-live-room .program-fallback-subtitle {
  font-size: 2.04cqw;
}

.program-v416-live-room.program-template-product-focus .program-product-card {
  left: 4.6cqw;
  right: 4.6cqw;
  bottom: 4.4cqh;
  grid-template-columns: 14.26cqw minmax(0, 1fr);
  padding: 1.85cqw;
}

.program-v416-live-room.program-template-product-focus .program-product-image {
  width: 14.26cqw;
  height: 14.26cqw;
}

.program-v416-live-room.program-template-product-focus .program-caption,
.program-v416-live-room.program-template-product-focus.program-product-visible .program-caption {
  bottom: 24cqh;
}

.program-v416-live-room.program-template-fashion-style .program-product-card {
  right: 4.1cqw;
  bottom: 6.15cqh;
  width: min(48.1cqw, 520px);
}

@media (max-width: 1240px) {
  .v416-broadcast-console {
    grid-template-columns: 1fr;
  }

  .v416-control-statusbar {
    grid-template-columns: 1fr;
  }

  .v416-control-statusbar .broadcast-console-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .v416-app-shell {
    grid-template-columns: 1fr;
  }

  .v416-sidebar {
    position: static;
  }

  .v416-action-stack {
    grid-template-columns: 1fr;
  }
}

/* V4-1.6 standard backoffice pages */
:root {
  --v416-page-gap: 18px;
  --v416-card-radius: 12px;
  --v416-input-height: 42px;
}

#page-dashboard,
#page-products,
#page-scripts,
#page-brain,
#page-avatar,
#page-compliance,
#page-users,
#page-roles,
#page-audit,
#page-system-health {
  max-width: 1480px;
  margin: 0 auto;
  color: var(--v416-ink);
}

#page-dashboard .metric-grid,
#page-dashboard .dashboard-grid,
#page-products .split-layout,
#page-scripts .script-layout,
#page-brain .brain-grid,
#page-avatar .avatar-workbench,
#page-compliance .compliance-layout,
#page-users .dashboard-grid,
#page-roles .dashboard-grid,
#page-audit .dashboard-grid,
#page-system-health .dashboard-grid {
  gap: var(--v416-page-gap);
  align-items: start;
}

#page-dashboard .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--v416-page-gap);
}

#page-dashboard .metric-panel,
.v416-standard-pages .metric-panel {
  grid-column: auto;
}

#page-products .split-layout,
#page-scripts .script-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

#page-dashboard .panel,
#page-products .panel,
#page-scripts .panel,
#page-brain .panel,
#page-avatar .panel,
#page-compliance .panel,
#page-users .panel,
#page-roles .panel,
#page-audit .panel,
#page-system-health .panel,
#page-dashboard .metric-panel,
.v416-standard-pages .panel,
.v416-standard-pages .metric-panel {
  border: 1px solid var(--v416-line);
  border-radius: var(--v416-card-radius);
  background: var(--v416-white);
  box-shadow: var(--v416-shadow);
}

#page-dashboard .panel,
#page-products .panel,
#page-scripts .panel,
#page-brain .panel,
#page-avatar .panel,
#page-compliance .panel,
#page-users .panel,
#page-roles .panel,
#page-audit .panel,
#page-system-health .panel,
.v416-standard-pages .panel {
  padding: 18px;
}

#page-dashboard .metric-panel,
.v416-standard-pages .metric-panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.98)),
    var(--v416-white);
}

#page-dashboard .metric-panel span,
.v416-standard-pages .metric-panel span {
  color: var(--v416-muted);
  font-size: 13px;
  font-weight: 800;
}

#page-dashboard .metric-panel strong,
.v416-standard-pages .metric-panel strong {
  color: var(--v416-black);
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1;
}

#page-dashboard .metric-panel small,
.v416-standard-pages .metric-panel small {
  color: var(--v416-blue);
  font-weight: 800;
}

#page-dashboard .panel-header,
#page-products .panel-header,
#page-scripts .panel-header,
#page-brain .panel-header,
#page-avatar .panel-header,
#page-compliance .panel-header,
#page-users .panel-header,
#page-roles .panel-header,
#page-audit .panel-header,
#page-system-health .panel-header,
.v416-standard-pages .panel-header {
  align-items: flex-start;
  margin: -2px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

#page-dashboard .panel h3,
#page-products .panel h3,
#page-scripts .panel h3,
#page-brain .panel h3,
#page-avatar .panel h3,
#page-compliance .panel h3,
#page-users .panel h3,
#page-roles .panel h3,
#page-audit .panel h3,
#page-system-health .panel h3 {
  color: var(--v416-black);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
}

#page-dashboard .eyebrow,
#page-products .eyebrow,
#page-scripts .eyebrow,
#page-brain .eyebrow,
#page-avatar .eyebrow,
#page-compliance .eyebrow,
#page-users .eyebrow,
#page-roles .eyebrow,
#page-audit .eyebrow,
#page-system-health .eyebrow {
  color: var(--v416-blue);
  font-size: 11px;
  letter-spacing: 0.05em;
}

#page-dashboard label,
#page-products label,
#page-scripts label,
#page-brain label,
#page-avatar label,
#page-compliance label,
#page-users label,
#page-roles label,
#page-audit label,
#page-system-health label,
.v416-standard-pages label {
  gap: 8px;
  color: var(--v416-black);
  font-size: 13px;
  font-weight: 800;
}

#page-dashboard input,
#page-dashboard select,
#page-dashboard textarea,
#page-products input,
#page-products select,
#page-products textarea,
#page-scripts input,
#page-scripts select,
#page-scripts textarea,
#page-brain input,
#page-brain select,
#page-brain textarea,
#page-avatar input,
#page-avatar select,
#page-avatar textarea,
#page-compliance input,
#page-compliance select,
#page-compliance textarea,
#page-users input,
#page-users select,
#page-users textarea,
#page-roles input,
#page-roles select,
#page-roles textarea,
#page-audit input,
#page-audit select,
#page-audit textarea,
#page-system-health input,
#page-system-health select,
#page-system-health textarea,
.v416-standard-pages input,
.v416-standard-pages select,
.v416-standard-pages textarea {
  min-height: var(--v416-input-height);
  border: 1px solid var(--v416-line);
  border-radius: 10px;
  color: var(--v416-black);
  background: #ffffff;
}

#page-dashboard input:focus,
#page-dashboard select:focus,
#page-dashboard textarea:focus,
#page-products input:focus,
#page-products select:focus,
#page-products textarea:focus,
#page-scripts input:focus,
#page-scripts select:focus,
#page-scripts textarea:focus,
#page-brain input:focus,
#page-brain select:focus,
#page-brain textarea:focus,
#page-avatar input:focus,
#page-avatar select:focus,
#page-avatar textarea:focus,
#page-compliance input:focus,
#page-compliance select:focus,
#page-compliance textarea:focus,
#page-users input:focus,
#page-users select:focus,
#page-users textarea:focus,
#page-roles input:focus,
#page-roles select:focus,
#page-roles textarea:focus,
#page-audit input:focus,
#page-audit select:focus,
#page-audit textarea:focus,
#page-system-health input:focus,
#page-system-health select:focus,
#page-system-health textarea:focus,
.v416-standard-pages input:focus,
.v416-standard-pages select:focus,
.v416-standard-pages textarea:focus {
  border-color: var(--v416-blue);
  box-shadow: var(--yk-focus-ring);
}

#page-dashboard .filter-row,
#page-products .filter-row,
#page-scripts .filter-row,
#page-audit .audit-filters,
#page-compliance .compact-row,
#page-compliance .rule-editor {
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--v416-card-radius);
  background: rgba(239, 246, 255, 0.72);
}

#page-dashboard .control-row,
#page-products .control-row,
#page-scripts .control-row,
#page-brain .control-row,
#page-avatar .control-row,
#page-compliance .control-row,
#page-users .control-row,
#page-roles .control-row,
#page-audit .control-row,
#page-system-health .control-row {
  gap: 10px;
}

#page-dashboard .primary-btn,
#page-products .primary-btn,
#page-scripts .primary-btn,
#page-brain .primary-btn,
#page-avatar .primary-btn,
#page-compliance .primary-btn,
#page-users .primary-btn,
#page-roles .primary-btn,
#page-audit .primary-btn,
#page-system-health .primary-btn {
  color: var(--v416-white);
  border-color: var(--v416-blue);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-blue-strong));
}

#page-dashboard .secondary-btn,
#page-products .secondary-btn,
#page-scripts .secondary-btn,
#page-brain .secondary-btn,
#page-avatar .secondary-btn,
#page-compliance .secondary-btn,
#page-users .secondary-btn,
#page-roles .secondary-btn,
#page-audit .secondary-btn,
#page-system-health .secondary-btn,
#page-dashboard .text-btn,
#page-products .text-btn,
#page-scripts .text-btn,
#page-brain .text-btn,
#page-avatar .text-btn,
#page-compliance .text-btn,
#page-users .text-btn,
#page-roles .text-btn,
#page-audit .text-btn,
#page-system-health .text-btn {
  color: var(--v416-blue-strong);
  border-color: rgba(37, 99, 235, 0.24);
  background: var(--v416-white);
}

#page-dashboard .danger-btn,
#page-products .danger-btn,
#page-scripts .danger-btn,
#page-brain .danger-btn,
#page-avatar .danger-btn,
#page-compliance .danger-btn,
#page-users .danger-btn,
#page-roles .danger-btn,
#page-audit .danger-btn,
#page-system-health .danger-btn {
  color: var(--v416-white);
  border-color: var(--yk-color-danger);
  background: var(--yk-color-danger);
}

#page-dashboard .table-wrap,
#page-products .table-wrap,
#page-scripts .table-wrap,
#page-brain .table-wrap,
#page-avatar .table-wrap,
#page-compliance .table-wrap,
#page-users .table-wrap,
#page-roles .table-wrap,
#page-audit .table-wrap,
#page-system-health .table-wrap,
.v416-standard-pages .table-wrap {
  overflow: auto;
  border: 1px solid var(--v416-line);
  border-radius: var(--v416-card-radius);
  background: var(--v416-white);
}

#page-dashboard table,
#page-products table,
#page-scripts table,
#page-brain table,
#page-avatar table,
#page-compliance table,
#page-users table,
#page-roles table,
#page-audit table,
#page-system-health table,
.v416-standard-pages table {
  background: var(--v416-white);
}

#page-dashboard th,
#page-products th,
#page-scripts th,
#page-brain th,
#page-avatar th,
#page-compliance th,
#page-users th,
#page-roles th,
#page-audit th,
#page-system-health th,
.v416-standard-pages th {
  color: var(--v416-muted);
  background: rgba(239, 246, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

#page-dashboard td,
#page-products td,
#page-scripts td,
#page-brain td,
#page-avatar td,
#page-compliance td,
#page-users td,
#page-roles td,
#page-audit td,
#page-system-health td,
.v416-standard-pages td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  color: var(--v416-black);
}

#page-dashboard .state-strip,
#page-dashboard .timeline,
#page-dashboard .bar-list,
#page-dashboard .review-box,
#page-products .form-grid,
#page-scripts .script-list,
#page-scripts .inline-result,
#page-brain .adapter-list,
#page-brain .brain-result,
#page-brain .live-log-list,
#page-avatar .avatar-list,
#page-avatar .asset-list,
#page-avatar .voice-list,
#page-avatar .training-list,
#page-compliance .locked-rule,
#page-compliance .compliance-rule-list,
#page-compliance .compliance-task-list,
#page-compliance .compliance-config-list,
#page-system-health .maintenance-summary,
#page-system-health .maintenance-grid,
#page-system-health .info-list {
  gap: 10px;
}

#page-dashboard .state-strip div,
#page-dashboard .risk-list li,
#page-products .product-row,
#page-scripts .script-card,
#page-brain .adapter-card,
#page-brain .review-task,
#page-avatar .avatar-card,
#page-avatar .asset-card,
#page-compliance .locked-rule,
#page-compliance .summary-cell,
#page-compliance .compliance-rule,
#page-compliance .review-task,
#page-compliance .config-row,
#page-system-health .health-card,
#page-system-health .maintenance-card,
#page-system-health .info-list div {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: var(--v416-white);
}

#page-brain .pipeline div {
  min-height: 70px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--v416-white);
  background: linear-gradient(135deg, var(--v416-blue), var(--v416-black));
}

#page-avatar .avatar-preview-stage {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(239, 246, 255, 0.32)),
    var(--v416-black);
}

#page-avatar .avatar-preview-media {
  color: rgba(255, 255, 255, 0.86);
}

#page-compliance .compliance-summary,
#page-brain .compliance-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

#page-compliance .summary-cell strong,
#page-brain .summary-cell strong {
  color: var(--v416-black);
}

#page-compliance .notice-box,
#page-avatar .notice-box,
#page-system-health .sensitive-warning,
#page-dashboard .metric-panel.warning small,
#page-compliance [data-risk="high"],
#page-compliance .risk-high {
  color: var(--yk-color-danger);
}

#page-avatar .notice-box,
#page-system-health .sensitive-warning {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(254, 242, 242, 0.88);
}

#page-users .span-7 {
  grid-column: span 7;
}

#page-users .span-5 {
  grid-column: span 5;
}

#page-roles .role-matrix {
  overflow: auto;
  border: 1px solid var(--v416-line);
  border-radius: var(--v416-card-radius);
  background: var(--v416-white);
}

@media (max-width: 1180px) {
  #page-products .split-layout,
  #page-scripts .script-layout {
    grid-template-columns: 1fr;
  }

  #page-dashboard .span-4,
  #page-dashboard .span-5,
  #page-dashboard .span-6,
  #page-dashboard .span-7,
  #page-dashboard .span-8,
  #page-dashboard .span-12,
  #page-brain .span-4,
  #page-brain .span-5,
  #page-brain .span-6,
  #page-brain .span-7,
  #page-brain .span-8,
  #page-brain .span-12,
  #page-avatar .span-4,
  #page-avatar .span-5,
  #page-avatar .span-6,
  #page-avatar .span-7,
  #page-avatar .span-8,
  #page-avatar .span-12,
  #page-compliance .span-4,
  #page-compliance .span-5,
  #page-compliance .span-6,
  #page-compliance .span-7,
  #page-compliance .span-8,
  #page-compliance .span-12,
  #page-users .span-5,
  #page-users .span-7,
  #page-system-health .span-4,
  #page-system-health .span-5,
  #page-system-health .span-6,
  #page-system-health .span-7,
  #page-system-health .span-8,
  #page-system-health .span-12 {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  #page-dashboard,
  #page-products,
  #page-scripts,
  #page-brain,
  #page-avatar,
  #page-compliance,
  #page-users,
  #page-roles,
  #page-audit,
  #page-system-health {
    max-width: 100%;
  }

  #page-dashboard .panel,
  #page-products .panel,
  #page-scripts .panel,
  #page-brain .panel,
  #page-avatar .panel,
  #page-compliance .panel,
  #page-users .panel,
  #page-roles .panel,
  #page-audit .panel,
  #page-system-health .panel,
  #page-dashboard .metric-panel {
    padding: 14px;
  }
}

/* V4-1.7 avatar center: list + progressive detail */
#page-avatar .v417-avatar-center {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#page-avatar .v417-avatar-list-pane,
#page-avatar .v417-avatar-detail-pane {
  min-width: 0;
  border-color: rgba(226, 232, 240, 0.94);
  border-radius: 18px;
  background: var(--yk-color-card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

#page-avatar .v417-avatar-list-pane {
  position: sticky;
  top: 18px;
}

#page-avatar .v417-avatar-detail-pane {
  display: grid;
  gap: 14px;
}

#page-avatar .v417-avatar-notice,
#page-avatar .v417-avatar-empty-state {
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: var(--yk-color-primary-strong);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

#page-avatar .v417-avatar-notice {
  margin-bottom: 14px;
}

#page-avatar .v417-avatar-list {
  max-height: calc(100dvh - 260px);
  overflow: auto;
  padding-right: 4px;
}

#page-avatar .v417-avatar-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#page-avatar .v417-avatar-card:hover,
#page-avatar .v417-avatar-card.active {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.44);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.1);
}

#page-avatar .v417-avatar-card-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

#page-avatar .v417-avatar-card .avatar-thumb {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  color: #ffffff;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.38), transparent 30%),
    linear-gradient(135deg, var(--yk-color-primary), var(--yk-color-nav));
}

#page-avatar .v417-avatar-card-copy {
  min-width: 0;
}

#page-avatar .v417-avatar-card-copy strong {
  display: block;
  overflow: hidden;
  color: var(--yk-color-text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-avatar .v417-avatar-card-copy span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#page-avatar .v417-avatar-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-avatar .v417-avatar-card-meta span {
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  color: var(--yk-color-text);
  background: var(--yk-color-blue-soft);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-avatar .v417-avatar-card-meta small {
  display: block;
  margin-bottom: 2px;
  color: var(--yk-color-muted);
  font-size: 11px;
  font-weight: 800;
}

#page-avatar .v417-avatar-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-avatar .v417-avatar-card-actions .mini-btn {
  justify-content: center;
}

#page-avatar .v417-avatar-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

#page-avatar .v417-avatar-summary {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

#page-avatar .v417-avatar-summary span {
  display: block;
  overflow: hidden;
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-avatar .v417-avatar-summary strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--yk-color-text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-avatar .v417-avatar-empty-state {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
}

#page-avatar .v417-avatar-empty-state[hidden] {
  display: none !important;
}

#page-avatar .v417-avatar-empty-state strong {
  color: var(--yk-color-text);
  font-size: 15px;
}

#page-avatar .v417-avatar-empty-state span {
  color: var(--yk-color-muted);
  font-size: 13px;
}

#page-avatar .v417-avatar-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #f8fbff;
}

#page-avatar .v417-avatar-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--yk-color-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

#page-avatar .v417-avatar-tab:hover {
  color: var(--yk-color-primary-strong);
  background: #ffffff;
}

#page-avatar .v417-avatar-tab.active {
  color: #ffffff;
  border-color: var(--yk-color-primary);
  background: var(--yk-color-primary);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

#page-avatar .v417-avatar-tab-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

#page-avatar .v417-avatar-tab-panel[hidden] {
  display: none !important;
}

#page-avatar .v417-avatar-basic-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#page-avatar .v417-avatar-basic-form .span-2 {
  grid-column: 1 / -1;
}

#page-avatar .v417-tab-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

#page-avatar .v417-tab-heading strong {
  color: var(--yk-color-text);
  font-size: 16px;
  font-weight: 900;
}

#page-avatar .v417-tab-heading span {
  max-width: 72ch;
  color: var(--yk-color-muted);
  font-size: 13px;
  line-height: 1.65;
}

#page-avatar .v417-avatar-upload {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

#page-avatar .v417-avatar-asset-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
}

#page-avatar .v417-avatar-state-strip {
  margin-bottom: 14px;
  border-radius: 14px;
}

#page-avatar .v417-avatar-state-strip div {
  background: #f8fbff;
}

#page-avatar .v417-provider-advanced {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

#page-avatar .v417-provider-advanced[hidden] {
  display: none !important;
}

#page-avatar .v417-provider-advanced summary {
  cursor: pointer;
  color: var(--yk-color-primary-strong);
  font-size: 13px;
  font-weight: 900;
}

#page-avatar .v417-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

#page-avatar .avatar-preview-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(300px, 1fr);
  gap: 16px;
}

#page-avatar .mock-console {
  min-width: 0;
}

#page-avatar #avatarPreviewResult,
#page-avatar #mockLog {
  max-height: 180px;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 12px;
  background: #f8fafc;
}

#page-avatar [data-admin-only-technical][hidden] {
  display: none !important;
}

@media (max-width: 1280px) {
  #page-avatar .v417-avatar-center {
    grid-template-columns: 1fr;
  }

  #page-avatar .v417-avatar-list-pane {
    position: static;
  }

  #page-avatar .v417-avatar-list {
    max-height: none;
  }
}

@media (max-width: 860px) {
  #page-avatar .v417-avatar-detail-head,
  #page-avatar .v417-avatar-basic-form,
  #page-avatar .v417-avatar-upload,
  #page-avatar .v417-provider-grid,
  #page-avatar .avatar-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* V4-1.7 authorization ledger: distinct from avatar profile */
.v417-consent-ledger {
  display: grid;
  grid-template-columns: minmax(320px, 0.62fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.v417-consent-overview-pane,
.v417-consent-files-pane {
  border-color: rgba(226, 232, 240, 0.94);
  border-radius: 18px;
  background: var(--yk-color-card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.v417-consent-summary,
.v417-consent-selected {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.v417-consent-summary div,
.v417-consent-selected div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

.v417-consent-summary span,
.v417-consent-selected span {
  display: block;
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v417-consent-summary strong,
.v417-consent-selected strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--yk-color-text);
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v417-consent-avatar-list {
  display: grid;
  gap: 10px;
}

.v417-consent-avatar-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.v417-consent-avatar-card.active,
.v417-consent-avatar-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.44);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.1);
}

.v417-consent-avatar-card strong {
  display: block;
  overflow: hidden;
  color: var(--yk-color-text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v417-consent-avatar-card span {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 700;
}

.v417-consent-status {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.v417-consent-upload {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

.v417-consent-file-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 1180px) {
  .v417-consent-ledger,
  .v417-consent-summary,
  .v417-consent-selected,
  .v417-consent-upload {
    grid-template-columns: 1fr;
  }
}

/* V4-1.7 content center: list + detail + drawer editors */
.v417-content-workbench {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.v417-product-center,
.v417-script-center {
  max-width: 1480px;
  margin: 0 auto;
}

.v417-content-list-pane,
.v417-content-detail-pane {
  min-width: 0;
  border-color: rgba(226, 232, 240, 0.94);
  border-radius: 18px;
  background: var(--yk-color-card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.v417-content-list-pane {
  position: sticky;
  top: 18px;
}

.v417-product-list,
.v417-script-list-pane .script-list {
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - 278px);
  overflow: auto;
  padding-right: 4px;
}

.v417-product-card,
.v417-script-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.v417-product-card:hover,
.v417-product-card.active,
.v417-script-card:hover,
.v417-script-card.active {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.44);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.1);
}

.v417-product-card-main,
.v417-script-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.v417-product-card strong,
.v417-script-card strong {
  display: block;
  overflow: hidden;
  color: var(--yk-color-text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v417-product-card span,
.v417-script-card span,
.v417-script-card p {
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v417-script-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v417-product-card-meta,
.v417-script-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v417-product-card-meta span,
.v417-script-card-meta span {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 9px;
  background: var(--yk-color-blue-soft);
  font-weight: 800;
}

.v417-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.v417-more-actions {
  position: relative;
}

.v417-more-actions summary {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  color: var(--yk-color-primary-strong);
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.v417-more-actions summary::-webkit-details-marker {
  display: none;
}

.v417-more-actions[open] {
  z-index: 4;
}

.v417-more-actions[open] .danger {
  position: absolute;
  right: 0;
  top: 36px;
  min-width: 108px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.v417-product-detail,
.v417-script-detail {
  display: grid;
  gap: 14px;
}

.v417-empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  color: var(--yk-color-primary-strong);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.v417-empty-state strong {
  color: var(--yk-color-text);
  font-size: 16px;
}

.v417-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background: var(--yk-color-blue-soft);
}

.v417-detail-hero h4 {
  margin: 10px 0 4px;
  color: var(--yk-color-text);
  font-size: 26px;
  line-height: 1.15;
}

.v417-detail-hero p,
.v417-detail-section p {
  margin: 0;
  color: var(--yk-color-muted);
  line-height: 1.7;
}

.v417-price,
.v417-detail-hero > strong {
  color: var(--yk-color-primary-strong);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

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

.v417-detail-grid div,
.v417-detail-section {
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #ffffff;
}

.v417-detail-grid span {
  display: block;
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v417-detail-grid strong,
.v417-detail-section strong {
  display: block;
  margin-top: 4px;
  color: var(--yk-color-text);
  font-size: 15px;
  font-weight: 900;
}

.v417-detail-section.danger {
  border-color: rgba(220, 38, 38, 0.18);
  background: var(--yk-color-danger-soft);
}

.v417-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.v417-tag-row span {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 10px;
  color: var(--yk-color-primary-strong);
  background: var(--yk-color-blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.v5-product-material-note {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  color: var(--yk-color-primary-strong);
  background: var(--yk-color-blue-soft);
}

.v5-product-material-note strong {
  color: var(--yk-color-text);
  font-size: 14px;
}

.v5-product-material-note span {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v5-product-material-section {
  display: grid;
  gap: 12px;
}

.v5-product-material-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.v5-product-material-overview article,
.v5-product-script-list article,
.v5-product-material-asset {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 14px;
  background: #f8fafc;
}

.v5-product-material-overview span,
.v5-product-script-list span,
.v5-product-material-asset small {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 900;
}

.v5-product-material-overview b,
.v5-product-script-list strong,
.v5-product-material-asset strong {
  color: var(--yk-color-text);
  font-size: 14px;
  font-weight: 900;
}

.v5-product-material-overview small,
.v5-product-script-list p,
.v5-product-material-asset span {
  margin: 0;
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.55;
}

.v5-product-script-list,
.v5-product-material-assets,
.v5-product-display-modes {
  display: grid;
  gap: 10px;
}

.v5-product-material-assets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v5-product-material-asset {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.v5-product-material-asset b {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--yk-color-primary-strong);
  background: #ffffff;
  font-size: 12px;
  white-space: nowrap;
}

.v5-product-material-asset.is-placeholder {
  border-style: dashed;
}

.v5-product-display-modes span {
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  color: var(--yk-color-primary-strong);
  background: var(--yk-color-blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.v417-risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.v417-risk-badge.is-low {
  color: var(--yk-status-ready-text);
  background: var(--yk-status-ready-bg);
}

.v417-risk-badge.is-medium {
  color: var(--yk-status-paused-text);
  background: var(--yk-status-paused-bg);
}

.v417-risk-badge.is-high {
  color: var(--yk-status-error-text);
  background: var(--yk-status-error-bg);
}

.v417-script-review-actions,
.v417-script-history {
  margin-top: 14px;
}

.v417-script-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #ffffff;
}

.v417-script-history {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #ffffff;
}

.v417-script-history summary {
  cursor: pointer;
  color: var(--yk-color-primary-strong);
  font-size: 13px;
  font-weight: 900;
}

.v417-editor-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  background: rgba(7, 17, 31, 0.28);
  backdrop-filter: blur(3px);
}

.v417-editor-drawer[hidden] {
  display: none !important;
}

.v417-drawer-panel {
  width: min(560px, 100vw);
  height: 100dvh;
  overflow: auto;
  padding: 22px;
  border-left: 1px solid rgba(226, 232, 240, 0.94);
  background: #ffffff;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.22);
}

.v417-drawer-form,
.v417-script-drawer .v417-drawer-panel {
  display: grid;
  gap: 12px;
}

.v417-drawer-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v417-drawer-form label:nth-of-type(n + 5),
.v417-drawer-form .control-row {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .v417-content-workbench,
  .v417-detail-grid {
    grid-template-columns: 1fr;
  }

  .v417-content-list-pane {
    position: static;
  }

  .v417-product-list,
  .v417-script-list-pane .script-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .v417-drawer-form,
  .v417-detail-hero {
    grid-template-columns: 1fr;
  }
}

/* V4-1.7 smart risk: operator-first AI and compliance surfaces */
.v417-smart-workbench {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  max-width: 1480px;
  margin: 0 auto;
}

.v417-ai-brain,
.v417-compliance-center {
  align-items: start;
}

.v417-smart-panel {
  min-width: 0;
  border-color: rgba(226, 232, 240, 0.94);
  border-radius: 18px;
  background: var(--yk-color-card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.v417-ai-current-provider,
.v417-ai-current-persona {
  grid-column: span 6;
}

.v417-ai-test-panel {
  grid-column: span 5;
}

.v417-ai-suggestion-panel {
  grid-column: span 7;
}

.v417-ai-summary-panel,
.v417-ai-advanced {
  grid-column: 1 / -1;
}

.v417-ai-status-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.v417-ai-status-main {
  display: grid;
  gap: 8px;
}

.v417-ai-status-card strong {
  color: var(--yk-color-text);
  font-size: 22px;
  font-weight: 900;
}

.v417-ai-status-card p,
.v417-ai-status-card small {
  margin: 0;
  color: var(--yk-color-muted);
  line-height: 1.65;
}

.v417-ai-advanced {
  padding: 18px;
}

.v417-ai-advanced summary {
  cursor: pointer;
  color: var(--yk-color-primary-strong);
  font-size: 14px;
  font-weight: 900;
}

.v417-ai-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.v417-ai-advanced-grid > section {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #ffffff;
}

.v417-compliance-overview-panel,
.v417-compliance-test-panel,
.v417-compliance-review-panel {
  grid-column: span 4;
}

.v417-compliance-rules-panel {
  grid-column: 1 / -1;
}

.v417-rule-preview-note {
  border-style: dashed;
  color: var(--yk-color-primary-strong);
  background: var(--yk-color-blue-soft);
}

.v417-compliance-log-drawer .v417-drawer-panel {
  width: min(760px, 100vw);
}

.v417-compliance-log-drawer section + section {
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .v417-smart-workbench,
  .v417-ai-advanced-grid {
    grid-template-columns: 1fr;
  }

  .v417-ai-current-provider,
  .v417-ai-current-persona,
  .v417-ai-test-panel,
  .v417-ai-suggestion-panel,
  .v417-ai-summary-panel,
  .v417-ai-advanced,
  .v417-compliance-overview-panel,
  .v417-compliance-test-panel,
  .v417-compliance-review-panel,
  .v417-compliance-rules-panel {
    grid-column: auto;
  }
}

#page-project-status {
  max-width: 1480px;
  margin: 0 auto;
  color: var(--v416-ink);
}

.project-status-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--v416-page-gap);
  align-items: start;
}

#page-project-status .panel {
  border: 1px solid var(--v416-line);
  border-radius: var(--v416-card-radius);
  background: var(--v416-white);
  box-shadow: var(--v416-shadow);
}

.project-status-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98)),
    var(--v416-white);
}

.project-status-hero h3 {
  margin: 4px 0 10px;
  color: var(--v416-black);
  font-size: 28px;
  line-height: 1.12;
}

.project-status-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--v416-muted);
  line-height: 1.75;
}

.project-status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-status-count {
  min-height: 92px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: var(--v416-white);
}

.project-status-count span {
  color: var(--v416-muted);
  font-size: 12px;
  font-weight: 900;
}

.project-status-count strong {
  color: var(--v416-black);
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
}

.project-status-count.complete {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(239, 246, 255, 0.72);
}

.project-status-count.partial,
.project-status-count.mock {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 0.92);
}

.project-status-count.not-started {
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(248, 250, 252, 0.76);
}

.project-status-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-status-list li {
  position: relative;
  padding: 12px 12px 12px 34px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 10px;
  color: var(--v416-black);
  background: var(--v416-white);
  line-height: 1.55;
}

.project-status-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v416-blue);
}

.project-status-list.blocked li::before {
  background: var(--v416-black);
}

.project-status-table table {
  min-width: 1120px;
}

.project-status-table th:nth-child(8),
.project-status-table td:nth-child(8) {
  min-width: 300px;
}

.project-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--v416-muted);
  background: rgba(248, 250, 252, 0.96);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.project-status-badge.complete {
  border-color: rgba(37, 99, 235, 0.24);
  color: var(--v416-blue-strong);
  background: rgba(239, 246, 255, 0.9);
}

.project-status-badge.partial {
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--v416-black);
  background: rgba(239, 246, 255, 0.58);
}

.project-status-badge.mock {
  border-color: rgba(15, 23, 42, 0.18);
  color: var(--v416-white);
  background: var(--v416-black);
}

.project-status-badge.not-started {
  border-color: rgba(100, 116, 139, 0.22);
  color: var(--v416-muted);
  background: rgba(248, 250, 252, 0.92);
}

.project-status-badge.is-overall {
  min-width: 82px;
}

@media (max-width: 1180px) {
  .project-status-hero {
    grid-template-columns: 1fr;
  }

  .project-status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-project-status .span-6,
  #page-project-status .span-12 {
    grid-column: span 12;
  }
}

/* V4-1.7 go-live workbench: broadcast control only keeps the opening flow. */
.v417-go-live-workbench {
  display: grid;
  gap: 16px;
}

body[data-active-page="broadcast-control"] .topbar .top-actions {
  display: none;
}

.is-live-workbench-page .top-actions,
body[data-active-page="live-workbench"] .topbar .top-actions {
  display: none;
}

body[data-active-page="broadcast-control"] .topbar {
  min-height: 76px;
}

.v417-go-live-workbench .v417-broadcast-statusbar {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(520px, 1.7fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  color: #eaf2ff;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.32), transparent 34%),
    linear-gradient(135deg, var(--yk-color-nav) 0%, #0d1b2f 58%, #10213a 100%);
  box-shadow: 0 22px 50px rgba(7, 17, 31, 0.2);
}

.v417-go-live-workbench .broadcast-hero-copy h3 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.05;
}

.v417-go-live-workbench .broadcast-hero-copy p:not(.eyebrow) {
  margin: 7px 0 0;
  max-width: 34ch;
  color: #b9c8dc;
  font-size: 13px;
}

.v417-go-live-workbench .broadcast-console-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.v417-go-live-workbench .broadcast-console-status div {
  min-width: 0;
  min-height: 60px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
}

.v417-go-live-workbench .broadcast-console-status span {
  display: block;
  color: #a9b9ce;
  font-size: 11px;
  font-weight: 800;
}

.v417-go-live-workbench .broadcast-console-status strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: #ffffff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v417-go-live-workbench .broadcast-quick-actions {
  display: flex;
  justify-content: flex-end;
}

.v417-go-live-workbench .v417-flow-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(380px, 1fr) minmax(360px, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.v417-output-preview-column,
.v417-command-column,
.v417-go-live-config {
  min-height: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: var(--yk-color-card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.v417-output-preview-column .panel-header,
.v417-command-column .panel-header,
.v417-go-live-config .panel-header {
  padding-bottom: 12px;
}

.v417-output-preview-column .panel-header h3,
.v417-command-column .panel-header h3,
.v417-go-live-config .panel-header h3 {
  color: var(--yk-color-text);
  font-size: 22px;
}

.v417-preview-shell {
  display: grid;
  gap: 12px;
}

.v417-output-preview-column .broadcast-output-preview {
  width: min(100%, 315px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 18%, rgba(37, 99, 235, 0.2), transparent 34%),
    linear-gradient(180deg, #eff6ff 0%, #dbeafe 46%, #07111f 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 20px 45px rgba(15, 23, 42, 0.14);
}

.v417-output-preview-column .broadcast-preview-person {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(191, 219, 254, 0.74)),
    #ffffff;
}

.v417-output-preview-column .broadcast-empty-state {
  max-width: 72%;
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--yk-color-primary);
  background: rgba(255, 255, 255, 0.82);
}

.v417-output-preview-column .broadcast-preview-caption {
  right: 26px;
  bottom: 28px;
  left: 26px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(7, 17, 31, 0.74);
}

.v417-output-preview-column .broadcast-preview-product-card {
  right: 22px;
  bottom: 88px;
  max-width: 72%;
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--yk-color-text);
  background: rgba(255, 255, 255, 0.9);
}

.v417-command-pad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v417-command-pad .broadcast-command-button {
  display: grid;
  align-content: center;
  min-height: 100px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  color: var(--yk-color-text);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.v417-command-pad .broadcast-command-button span {
  font-size: 24px;
  line-height: 1;
}

.v417-command-pad .broadcast-command-button strong {
  margin-top: 10px;
  color: var(--yk-color-muted);
}

.v417-command-pad .broadcast-command-button:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.14);
}

.v417-command-pad .broadcast-command-button.is-active,
.v417-command-pad .broadcast-command-button.primary-command.is-active {
  border-color: rgba(37, 99, 235, 0.88);
  color: #ffffff;
  background: linear-gradient(135deg, var(--yk-color-primary), var(--yk-color-nav));
}

.v417-command-pad .broadcast-command-button.is-active strong {
  color: rgba(255, 255, 255, 0.75);
}

.v417-command-pad .primary-command {
  grid-column: 1 / -1;
  min-height: 116px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--yk-color-primary), #12346a);
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.2);
}

.v417-command-pad .primary-command strong {
  color: rgba(255, 255, 255, 0.76);
}

.v417-command-pad .utility-command {
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
  box-shadow: none;
}

.v417-command-pad .utility-command strong {
  color: rgba(37, 99, 235, 0.68);
}

.v417-command-pad .danger-command {
  grid-column: 1 / -1;
  color: var(--yk-color-danger);
  border-color: rgba(220, 38, 38, 0.2);
  background: #fff5f5;
  box-shadow: none;
}

.v417-command-pad .danger-command strong {
  color: rgba(220, 38, 38, 0.72);
}

.v417-command-footnote {
  margin-top: 12px;
  color: var(--yk-color-muted);
  font-size: 13px;
}

.v417-go-live-config .broadcast-step-list {
  display: grid;
  gap: 12px;
}

.v417-go-live-config .v417-config-step {
  gap: 8px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--yk-color-border);
}

.v417-go-live-config .v417-config-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.v417-go-live-config .broadcast-step-heading {
  grid-template-columns: 30px 1fr;
}

.v417-go-live-config .v417-step-number {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--yk-color-primary);
}

.v417-go-live-config label {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v417-go-live-config select,
.v417-go-live-config textarea {
  width: 100%;
  border-color: var(--yk-color-border);
  border-radius: 12px;
  background: #ffffff;
}

.v417-go-live-config textarea {
  min-height: 78px;
  resize: vertical;
}

.v417-go-live-config .broadcast-avatar-card {
  border-color: rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

.v417-go-live-config .broadcast-warning {
  border-color: rgba(245, 158, 11, 0.24);
  color: #8a4b00;
  background: #fff7ed;
}

.v417-go-live-config .broadcast-step-sync .primary-btn {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 1320px) {
  .v417-go-live-workbench .v417-flow-grid,
  .v417-go-live-workbench .v417-broadcast-statusbar {
    grid-template-columns: 1fr;
  }

  .v417-go-live-workbench .broadcast-console-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* V5: live room wizard */
.v5-sidebar-wizard-btn {
  width: 100%;
  margin-top: 14px;
}

.v5-wizard-shell {
  display: grid;
  gap: 20px;
}

.v5-wizard-hero,
.v5-wizard-step,
.v5-wizard-side .panel {
  border: 1px solid var(--yk-color-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.v5-wizard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.v5-wizard-hero h3 {
  margin: 6px 0;
  color: var(--yk-color-text);
  font-size: 28px;
}

.v5-wizard-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--yk-color-muted);
}

.v5-wizard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v5-wizard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.v5-wizard-main {
  display: grid;
  gap: 16px;
}

.v5-wizard-step {
  padding: 22px;
}

.v5-step-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.v5-step-head > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--yk-color-primary);
  font-weight: 900;
}

.v5-step-head h4 {
  margin: 0 0 4px;
  color: var(--yk-color-text);
  font-size: 18px;
}

.v5-step-head p {
  margin: 0;
  color: var(--yk-color-muted);
  font-size: 13px;
}

.v5-wizard-step .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.v5-wizard-step label,
.v5-wizard-step .stack-label {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v5-wizard-step input,
.v5-wizard-step select,
.v5-wizard-step textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--yk-color-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--yk-color-text);
}

.v5-wizard-step .span-2 {
  grid-column: span 2;
}

.v5-script-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.v5-detail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.v5-detail-keyword-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.v5-detail-keyword-examples span {
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  color: var(--yk-color-primary-strong);
  background: var(--yk-color-blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.v5-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
  font-size: 12px;
  font-weight: 800;
}

.v5-detail-chip button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--yk-color-primary);
  cursor: pointer;
}

.v5-wizard-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.v5-saved-room-list {
  display: grid;
  gap: 12px;
}

.v5-room-card,
.v5-empty-room {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--yk-color-border);
  border-radius: 16px;
  background: #f8fafc;
}

.v5-room-card h4 {
  margin: 8px 0 2px;
  color: var(--yk-color-text);
  font-size: 16px;
}

.v5-room-card p,
.v5-room-card-meta span,
.v5-empty-room,
.v5-simple-steps {
  color: var(--yk-color-muted);
  font-size: 13px;
}

.v5-room-card-meta {
  display: grid;
  gap: 5px;
}

.v5-simple-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.v5-live-rooms-shell {
  display: grid;
  gap: 18px;
}

.v5-live-rooms-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--yk-color-border);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: var(--yk-shadow-sm);
}

.v5-live-rooms-hero h3 {
  margin: 4px 0;
  color: var(--yk-color-text);
  font-size: 26px;
}

.v5-live-rooms-hero p {
  margin: 0;
  color: var(--yk-color-muted);
}

.v5-live-rooms-actions,
.v5-live-room-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v5-live-room-home-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  color: var(--yk-color-muted);
  background: #ffffff;
  box-shadow: var(--yk-shadow-sm);
}

.v5-live-room-home-strip strong {
  color: var(--yk-color-text);
  font-size: 16px;
  font-weight: 900;
}

.v5-live-room-field-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v5-live-room-field-legend span {
  padding: 6px 10px;
  border: 1px solid var(--yk-color-border);
  border-radius: 999px;
  background: #ffffff;
}

.v5-live-room-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.v5-live-room-card,
.v5-live-room-empty {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--yk-color-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--yk-shadow-sm);
}

.v5-live-room-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.v5-live-room-card h4 {
  margin: 8px 0 4px;
  color: var(--yk-color-text);
  font-size: 18px;
}

.v5-live-room-card p,
.v5-live-room-empty span {
  margin: 0;
  color: var(--yk-color-muted);
}

.v5-live-room-card-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.v5-live-room-card-stats span,
.v5-config-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--yk-color-border);
  border-radius: 12px;
  background: #f8fafc;
}

.v5-live-room-card-stats small,
.v5-config-grid small {
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v5-live-room-card-stats strong,
.v5-config-grid strong {
  overflow: hidden;
  color: var(--yk-color-text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-live-room-config {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-content: end;
  background: rgba(7, 17, 31, 0.28);
}

.v5-live-room-config[hidden] {
  display: none;
}

.v5-live-room-config-panel {
  width: min(460px, 92vw);
  height: 100%;
  padding: 22px;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.16);
}

.v5-live-room-config-body {
  display: grid;
  gap: 14px;
}

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

.v5-config-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: #f8fafc;
}

.v5-config-block strong {
  color: var(--yk-color-text);
}

.v5-config-block p {
  margin: 0;
  color: var(--yk-color-muted);
}

@media (max-width: 1180px) {
  .v5-wizard-grid {
    grid-template-columns: 1fr;
  }

  .v5-wizard-side {
    position: static;
  }

  .v5-live-room-card-grid {
    grid-template-columns: 1fr;
  }

  .v5-live-room-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .v5-wizard-hero,
  .v5-wizard-step .form-grid {
    grid-template-columns: 1fr;
  }

  .v5-wizard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .v5-wizard-step .span-2 {
    grid-column: span 1;
  }

  .v5-live-rooms-hero,
  .v5-live-room-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .v5-live-room-card-stats,
  .v5-config-grid {
    grid-template-columns: 1fr;
  }
}

.v5-live-workbench-shell {
  display: grid;
  gap: 14px;
  height: calc(100dvh - 130px);
  min-height: 720px;
  overflow: hidden;
}

.v5-workbench-runtime-only {
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "runtime"
    "connection";
}

.v5-live-workbench-top,
.v5-workbench-connection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.98) 48%, rgba(15, 23, 42, 0.04)),
    var(--yk-color-card);
  box-shadow: var(--yk-shadow-soft);
}

.v5-live-workbench-top {
  grid-area: header;
}

.v5-workbench-top-status-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(520px, 1.8fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 88px;
}

.v5-workbench-room-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.v5-workbench-room-identity span,
.v5-workbench-status-strip small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.v5-workbench-room-identity strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-workbench-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.v5-workbench-runtime-only .v5-live-workbench-top {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    radial-gradient(circle at 86% 20%, rgba(37, 99, 235, 0.32), transparent 32%),
    linear-gradient(135deg, #07111f, #0b1f3d 58%, #102f68);
  color: #ffffff;
  box-shadow: 0 22px 60px rgba(7, 17, 31, 0.18);
}

.v5-live-workbench-top h3 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: 0;
}

.v5-live-workbench-top p:not(.eyebrow),
.v5-workbench-connection-bar span {
  margin: 0;
  color: var(--yk-color-muted);
}

.v5-workbench-runtime-only .v5-live-workbench-top .eyebrow,
.v5-workbench-runtime-only .v5-live-workbench-top p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
}

.v5-workbench-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 10px;
  min-width: min(720px, 100%);
}

.v5-workbench-status-strip span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v5-workbench-runtime-only .v5-workbench-status-strip span {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.66);
}

.v5-workbench-status-strip strong {
  color: var(--yk-color-text);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-workbench-runtime-only .v5-workbench-status-strip strong {
  color: #ffffff;
}

.v5-live-workbench-grid {
  grid-area: runtime;
  display: grid;
  grid-template-columns: minmax(300px, 0.84fr) minmax(360px, 1.05fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.v5-live-workbench-grid.v5-workbench-three-column-one-footer {
  grid-template-columns: minmax(280px, 0.86fr) minmax(390px, 1.14fr) minmax(300px, 0.9fr);
  grid-template-areas: "preview script interaction";
  gap: 16px;
}

.v5-workbench-preview-column,
.v5-workbench-script-column,
.v5-workbench-interaction-column {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--yk-shadow-soft);
}

.v5-workbench-preview-column {
  grid-area: preview;
}

.v5-workbench-script-column {
  grid-area: script;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 14px;
}

.v5-workbench-interaction-column {
  grid-area: interaction;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.v5-workbench-runtime-only .v5-workbench-preview-column {
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(15, 23, 42, 0.94)),
    #07111f;
  color: #ffffff;
}

.v5-workbench-runtime-only .v5-workbench-preview-column .eyebrow,
.v5-workbench-runtime-only .v5-workbench-preview-column .v5-workbench-panel-head h4 {
  color: #ffffff;
}

.v5-workbench-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.v5-workbench-panel-head h4 {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}

.v5-workbench-panel-head.compact {
  margin-bottom: 10px;
}

.v5-workbench-display-mode-switcher {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
  padding: 6px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #f8fbff;
}

.v5-workbench-display-mode-switcher[hidden] {
  display: none !important;
}

.v5-workbench-display-mode-switcher span {
  padding: 0 6px;
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.v5-workbench-display-mode-switcher button {
  min-height: 32px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 900;
}

.v5-workbench-display-mode-switcher button.active {
  color: #ffffff;
  background: var(--yk-color-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.v5-preview-ratio {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.v5-workbench-phone-preview {
  position: relative;
  overflow: hidden;
  width: auto;
  max-width: 100%;
  height: min(58dvh, 540px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: #07111f;
  color: #ffffff;
  box-shadow: 0 22px 60px rgba(7, 17, 31, 0.24);
}

.v5-workbench-preview-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(155deg, rgba(37, 99, 235, 0.42), transparent 42%),
    linear-gradient(18deg, rgba(255, 255, 255, 0.12), transparent 52%),
    #07111f;
}

.v5-workbench-template-badge,
.v5-workbench-background-badge {
  position: absolute;
  z-index: 3;
  max-width: calc(100% - 36px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 17, 31, 0.58);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(7, 17, 31, 0.2);
  backdrop-filter: blur(12px);
}

.v5-workbench-template-badge {
  left: 18px;
  top: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.v5-workbench-background-badge {
  left: 18px;
  top: 56px;
  padding: 5px 9px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.v5-workbench-avatar-source {
  position: absolute;
  left: 18px;
  top: 92px;
  z-index: 4;
  max-width: calc(100% - 36px);
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.82);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-workbench-avatar-figure {
  position: absolute;
  left: 50%;
  bottom: 18%;
  display: grid;
  place-items: center;
  width: 58%;
  height: 58%;
  transform: translateX(-50%);
  border-radius: 999px 999px 120px 120px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(37, 99, 235, 0.26));
  color: var(--yk-color-nav);
  text-align: center;
  font-weight: 800;
  padding: 20px;
}

.v5-workbench-product-card {
  position: absolute;
  right: 18px;
  bottom: 86px;
  display: grid;
  gap: 3px;
  width: min(72%, 248px);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--yk-color-text);
  box-shadow: 0 14px 36px rgba(7, 17, 31, 0.2);
}

.v5-workbench-product-card small,
.v5-workbench-detail-window small {
  color: var(--yk-color-primary);
  font-weight: 800;
}

.v5-workbench-product-card strong,
.v5-workbench-detail-window strong {
  overflow-wrap: anywhere;
}

.v5-workbench-product-card span,
.v5-workbench-detail-window span {
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.45;
}

.v5-workbench-detail-window {
  position: absolute;
  left: 18px;
  top: 92px;
  display: grid;
  gap: 3px;
  width: 46%;
  min-height: 92px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.9);
  color: var(--yk-color-text);
  box-shadow: 0 12px 34px rgba(7, 17, 31, 0.18);
}

.v5-workbench-detail-window.is-half {
  width: calc(100% - 36px);
  min-height: 180px;
}

.v5-workbench-detail-window.is-full {
  inset: 86px 18px 180px;
  width: auto;
  min-height: auto;
}

.v5-workbench-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 26px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.72);
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}

.v5-workbench-ai-label {
  position: absolute;
  top: 20px;
  right: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.v5-workbench-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.v5-workbench-preview-actions button {
  min-height: 42px;
  white-space: normal;
}

.v5-workbench-script-runner {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.v5-workbench-product-context {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, #ffffff, #eff6ff),
    var(--yk-color-card);
}

.v5-workbench-next-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.96)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

.v5-workbench-next-step span {
  align-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--yk-color-primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.v5-workbench-next-step strong,
.v5-workbench-next-step small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v5-workbench-next-step strong {
  color: var(--yk-color-text);
  font-size: 15px;
  white-space: nowrap;
}

.v5-workbench-next-step small {
  grid-column: 2;
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.45;
}

.v5-workbench-product-thumb {
  display: grid;
  place-items: center;
  width: 74px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(7, 17, 31, 0.08)),
    #ffffff;
  background-position: center;
  background-size: cover;
  color: var(--yk-color-primary);
  font-weight: 900;
}

.v5-workbench-product-copy {
  min-width: 0;
}

.v5-workbench-product-copy span,
.v5-workbench-product-order span {
  color: var(--yk-color-primary);
  font-size: 12px;
  font-weight: 900;
}

.v5-workbench-product-copy strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--yk-color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-workbench-product-copy p {
  margin: 4px 0 0;
  color: var(--yk-color-muted);
  font-size: 13px;
}

.v5-workbench-product-copy b,
.v5-workbench-product-order strong {
  color: var(--yk-color-text);
}

.v5-workbench-product-order {
  display: grid;
  gap: 4px;
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
}

.v5-workbench-script-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--yk-color-border);
  border-radius: 16px;
  background: #ffffff;
}

.v5-workbench-script-card.is-current {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.v5-workbench-script-card span {
  color: var(--yk-color-primary);
  font-size: 12px;
  font-weight: 900;
}

.v5-workbench-script-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v5-workbench-script-card-head small,
.v5-workbench-script-card em {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.v5-workbench-script-card p {
  margin: 0;
  color: var(--yk-color-text);
  font-size: 16px;
  line-height: 1.7;
}

.v5-workbench-detail-runner {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.v5-workbench-active-detail {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

.v5-workbench-active-detail span,
.v5-workbench-section-label,
.v5-workbench-detail-asset-card small {
  color: var(--yk-color-primary);
  font-size: 12px;
  font-weight: 900;
}

.v5-workbench-section-label {
  display: block;
}

.v5-workbench-active-detail strong {
  color: var(--yk-color-text);
}

.v5-workbench-detail-strip {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 2px;
}

.v5-workbench-detail-asset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: #ffffff;
}

.v5-workbench-detail-asset-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.v5-workbench-detail-asset-card strong,
.v5-workbench-detail-asset-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-workbench-detail-asset-card span {
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v5-workbench-command-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0;
}

.v5-workbench-command-row button,
.v5-workbench-manual-line button {
  min-height: 46px;
}

.v5-workbench-manual-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.46fr) auto;
  gap: 10px;
}

.v5-workbench-manual-line input,
.v5-workbench-manual-line select {
  min-width: 0;
}

.v5-workbench-manual-result {
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.45;
}

.v5-workbench-manual-takeover-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: #ffffff;
}

.v5-manual-takeover-head,
.v5-manual-takeover-input,
.v5-manual-takeover-log {
  display: grid;
  gap: 6px;
}

.v5-manual-takeover-head strong {
  color: var(--yk-color-text);
  font-size: 16px;
}

.v5-manual-takeover-head span,
.v5-manual-takeover-input span,
.v5-manual-takeover-log span {
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.v5-manual-takeover-input textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  padding: 12px;
  color: var(--yk-color-text);
  background: #f8fafc;
  font: inherit;
  line-height: 1.55;
}

.v5-manual-takeover-input textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.16);
  border-color: var(--yk-color-primary);
  background: #ffffff;
}

.v5-manual-takeover-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.v5-manual-takeover-actions button {
  min-height: 42px;
  white-space: normal;
}

.v5-manual-takeover-log {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.v5-manual-takeover-log b {
  color: var(--yk-color-text);
  font-size: 12px;
}

.v5-workbench-lowfreq-drawer,
.v5-workbench-script-drawer {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: #f8fafc;
}

.v5-workbench-runtime-only .v5-workbench-lowfreq-drawer,
.v5-workbench-runtime-only .v5-workbench-script-drawer {
  background: rgba(248, 250, 252, 0.72);
}

.v5-workbench-lowfreq-drawer summary,
.v5-workbench-script-drawer summary {
  cursor: pointer;
  color: var(--yk-color-muted);
  font-weight: 800;
}

.v5-workbench-lowfreq-drawer p {
  margin: 10px 0;
  color: var(--yk-color-muted);
}

.v5-workbench-advanced-grid,
.v5-workbench-debug-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.v5-workbench-advanced-grid article,
.v5-workbench-debug-grid article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #ffffff;
}

.v5-workbench-advanced-grid strong,
.v5-workbench-debug-grid strong {
  color: var(--yk-color-text);
  font-size: 13px;
}

.v5-workbench-advanced-grid span,
.v5-workbench-debug-grid span,
.v5-workbench-debug-grid p {
  margin: 0;
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.v5-workbench-debug-grid b {
  color: var(--yk-color-primary);
}

.v5-workbench-edit-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.v5-workbench-edit-links button {
  min-height: 36px;
  white-space: normal;
}

.v5-workbench-all-scripts {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin-top: 10px;
}

.v5-workbench-script-mini {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--yk-color-border);
  border-radius: 12px;
  background: #ffffff;
}

.v5-workbench-script-mini.active {
  border-color: rgba(37, 99, 235, 0.36);
  background: #eff6ff;
}

.v5-workbench-script-mini span {
  color: var(--yk-color-primary);
  font-weight: 900;
}

.v5-workbench-script-mini p {
  overflow: hidden;
  margin: 0;
  color: var(--yk-color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-workbench-interaction-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

.v5-workbench-interaction-tabs button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--yk-color-muted);
  font-weight: 800;
  min-height: 38px;
  cursor: pointer;
}

.v5-workbench-interaction-tabs button.active {
  background: var(--yk-color-primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.v5-workbench-tab-body {
  min-height: 0;
  overflow: auto;
}

.v5-workbench-feed,
.v5-workbench-detail-list,
.v5-workbench-manual-takeover {
  display: grid;
  gap: 10px;
}

.v5-workbench-feed article,
.v5-workbench-detail-list article,
.v5-workbench-manual-takeover {
  padding: 14px;
  border: 1px solid var(--yk-color-border);
  border-radius: 14px;
  background: #ffffff;
}

.v5-workbench-feed strong,
.v5-workbench-detail-list strong,
.v5-workbench-manual-takeover strong {
  color: var(--yk-color-text);
}

.v5-workbench-feed p,
.v5-workbench-manual-takeover p {
  margin: 6px 0 0;
  color: var(--yk-color-muted);
  line-height: 1.6;
}

.v5-workbench-comments-feed {
  align-content: start;
}

.v5-workbench-comment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.v5-comment-main {
  min-width: 0;
}

.v5-comment-nickname,
.v5-comment-content {
  overflow: hidden;
  text-overflow: ellipsis;
}

.v5-comment-content {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v5-comment-meta,
.v5-comment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v5-comment-meta {
  margin-top: 10px;
}

.v5-comment-intent,
.v5-comment-risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.v5-comment-intent {
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
}

.v5-comment-risk.is-low {
  color: #0369a1;
  background: #e0f2fe;
}

.v5-comment-risk.is-medium {
  color: #92400e;
  background: #fef3c7;
}

.v5-comment-risk.is-high {
  color: var(--yk-color-danger);
  background: #fee2e2;
}

.v5-workbench-ai-suggestions {
  align-content: start;
}

.v5-workbench-ai-rule {
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.v5-workbench-ai-suggestion-card {
  display: grid;
  gap: 12px;
}

.v5-ai-comment-source,
.v5-ai-suggestion-reply {
  display: grid;
  gap: 6px;
}

.v5-ai-comment-source span,
.v5-ai-suggestion-reply span {
  color: var(--yk-color-primary);
  font-size: 12px;
  font-weight: 900;
}

.v5-ai-comment-source p,
.v5-ai-suggestion-reply p {
  margin: 0;
}

.v5-ai-suggestion-reply p {
  color: var(--yk-color-text);
  font-weight: 700;
}

.v5-ai-compliance-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.v5-ai-compliance-status.is-low {
  color: #0369a1;
  background: #e0f2fe;
}

.v5-ai-compliance-status.is-medium {
  color: #92400e;
  background: #fef3c7;
}

.v5-ai-compliance-status.is-high {
  color: var(--yk-color-danger);
  background: #fee2e2;
}

.v5-ai-suggestion-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.v5-ai-suggestion-actions button {
  min-height: 38px;
  white-space: normal;
}

.v5-workbench-simulator-drawer,
.v5-workbench-debug-drawer {
  margin-top: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  border-radius: 14px;
  background: #f8fafc;
}

.v5-workbench-simulator-drawer summary,
.v5-workbench-debug-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: var(--yk-color-muted);
  font-weight: 900;
  cursor: pointer;
}

.v5-workbench-simulator-drawer summary::-webkit-details-marker,
.v5-workbench-debug-drawer summary::-webkit-details-marker {
  display: none;
}

.v5-workbench-simulator-drawer summary::after,
.v5-workbench-debug-drawer summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--yk-color-primary);
  background: #ffffff;
  border: 1px solid var(--yk-color-border);
}

.v5-workbench-simulator-drawer[open] summary::after,
.v5-workbench-debug-drawer[open] summary::after {
  content: "-";
}

.v5-workbench-simulator-grid,
.v5-workbench-debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.v5-workbench-detail-control-list {
  align-content: start;
}

.v5-workbench-detail-guide {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: var(--yk-color-blue-soft);
}

.v5-workbench-detail-guide strong {
  color: var(--yk-color-primary);
}

.v5-workbench-detail-guide span {
  color: var(--yk-color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.v5-workbench-detail-card {
  display: grid;
  gap: 12px;
}

.v5-detail-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.v5-detail-asset-type {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--yk-color-primary);
  background: var(--yk-color-blue-soft);
  font-weight: 900;
}

.v5-detail-trigger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.v5-detail-trigger-row b,
.v5-detail-trigger-row span,
.v5-detail-trigger-row em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
}

.v5-detail-trigger-row b {
  color: var(--yk-color-text);
  background: #f8fafc;
}

.v5-detail-trigger-row span {
  color: var(--yk-color-muted);
  border: 1px solid var(--yk-color-border);
  background: #ffffff;
}

.v5-detail-trigger-row em {
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 800;
}

.v5-detail-display-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.v5-detail-display-actions button {
  min-height: 38px;
  white-space: normal;
}

.v5-workbench-detail-list article:not(.v5-workbench-detail-card) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v5-workbench-detail-list article:not(.v5-workbench-detail-card) span {
  display: block;
  margin-top: 4px;
  color: var(--yk-color-muted);
  font-size: 12px;
}

.v5-workbench-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--yk-color-border);
  border-radius: 16px;
  color: var(--yk-color-muted);
  background: #f8fafc;
}

.v5-workbench-empty.compact {
  min-height: 90px;
  padding: 12px;
}

.v5-workbench-connection-bar {
  grid-area: connection;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(150px, 0.55fr) minmax(220px, 0.8fr);
  align-items: center;
  border-color: rgba(37, 99, 235, 0.24);
}

.v5-workbench-runtime-only .v5-workbench-connection-bar {
  padding: 14px 18px;
}

.v5-workbench-connection-copy strong,
.v5-workbench-capture-checklist strong {
  display: block;
  margin-bottom: 4px;
}

.v5-workbench-connection-copy .eyebrow {
  margin-bottom: 4px;
}

.v5-workbench-connection-status {
  display: grid;
  gap: 5px;
  justify-self: stretch;
  padding: 11px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: #ffffff;
}

.v5-workbench-connection-status span {
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v5-workbench-connection-status strong {
  color: var(--yk-color-primary);
  font-size: 16px;
}

.v5-workbench-connection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.v5-workbench-capture-checklist {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.v5-workbench-capture-checklist strong {
  margin: 0 4px 0 0;
  color: var(--yk-color-text);
  font-size: 13px;
}

.v5-workbench-capture-checklist span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid var(--yk-color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--yk-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.v5-workbench-capture-checklist span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yk-color-muted);
}

.v5-workbench-capture-checklist span.is-ok {
  border-color: rgba(37, 99, 235, 0.24);
  background: var(--yk-color-blue-soft);
  color: var(--yk-color-primary);
}

.v5-workbench-capture-checklist span.is-ok::before {
  background: var(--yk-color-primary);
}

.v5-workbench-capture-checklist span.is-pending::before {
  background: var(--yk-color-warning);
}

@media (max-width: 1180px) {
  .v5-live-workbench-shell {
    height: auto;
    overflow: visible;
  }

  .v5-workbench-top-status-bar {
    grid-template-columns: 1fr;
  }

  .v5-workbench-top-actions {
    justify-content: flex-start;
  }

  .v5-live-workbench-grid.v5-workbench-three-column-one-footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "preview"
      "script"
      "interaction";
    overflow: visible;
  }

  .v5-workbench-connection-bar {
    grid-template-columns: 1fr;
  }

  .v5-workbench-connection-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 940px) {
  .v5-live-workbench-top,
  .v5-workbench-connection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .v5-workbench-status-strip,
  .v5-workbench-top-status-bar,
  .v5-live-workbench-grid,
  .v5-workbench-command-row,
  .v5-workbench-manual-line {
    grid-template-columns: 1fr;
  }

  .v5-workbench-phone-preview {
    width: min(100%, 320px);
  }
}
