:root {
  --bg: #fffaf2;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #fffdf9;
  --surface-2: #fff8ec;
  --text: #2a2118;
  --muted: #7a6549;
  --soft: #a48b63;
  --line: rgba(176, 126, 44, .16);
  --line-strong: rgba(176, 126, 44, .28);
  --primary: #cc8c1d;
  --primary-2: #9a6209;
  --accent: #e8bb58;
  --danger: #b54b45;
  --success: #8f6a1a;
  --warning: #9b650b;
  --shadow: 0 16px 42px rgba(105, 70, 17, .08);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background: linear-gradient(135deg, #fffdf9, #fff8ec 48%, #f7ecd9);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(204, 140, 29, .28);
  outline-offset: 2px;
}
img, video { display: block; max-width: 100%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 16px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,249,239,.56));
  border-right: 1px solid rgba(204, 140, 29, .14);
  backdrop-filter: blur(24px);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #dba348, #b97714);
  font-weight: 800;
}
.brand-title { font-size: 17px; font-weight: 780; letter-spacing: 0; }
.brand-sub { margin-top: 1px; color: var(--soft); font-size: 12px; }
.nav { padding: 14px 0; display: grid; gap: 4px; }
.nav-label {
  padding: 14px 8px 6px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
}
.nav-item {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(42, 33, 24, .72);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}
.nav-item span {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(204, 140, 29, .08);
  font-size: 12px;
  font-weight: 800;
}
.nav-item:hover { background: rgba(255,255,255,.48); }
.nav-item.active {
  color: var(--primary-2);
  background: linear-gradient(135deg, rgba(204,140,29,.14), rgba(255,255,255,.44));
}
.plan-card {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
  box-shadow: var(--shadow);
}
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-card strong { font-size: 14px; }
.plan-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 760;
}
.plan-card p { margin: 8px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.plan-bar { height: 6px; border-radius: 999px; overflow: hidden; background: rgba(204,140,29,.12); margin-bottom: 10px; }
.plan-bar i { display: block; width: 58%; height: 100%; border-radius: inherit; background: var(--primary); }

.main { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(204,140,29,.12);
  background: rgba(255,250,242,.78);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  gap: 12px;
}
.search {
  flex: 1;
  max-width: 420px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.68);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--soft);
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.workspace-chip {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  white-space: nowrap;
}
.workspace-chip b { font-size: 13px; }
.workspace-chip span { color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#fff,#f4dfb5);
  border: 1px solid rgba(204,140,29,.16);
  color: var(--primary-2);
  font-weight: 800;
}

.content { flex: 1; overflow: visible; padding: 24px; }
.page { display: none; animation: fade .18s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 18px;
}
.kicker {
  margin-bottom: 6px;
  color: #a36a0a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.page-head h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: 0; }
.page-head p { max-width: 820px; margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}
.btn:hover { border-color: rgba(176,126,44,.36); background: rgba(255,255,255,.82); }
.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 22px rgba(204, 140, 29, .18);
}
.btn.primary:hover { background: #b97714; }
.btn.full { width: 100%; }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.panel,
.card {
  border: 1px solid rgba(255,255,255,.85);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.58));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(20px);
}
.panel { padding: 16px; }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; font-size: 16px; line-height: 1.3; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin: 22px 0 12px;
}
.section-title h2 { margin: 0; font-size: 18px; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { padding: 14px; }
.stat small { color: var(--muted); font-size: 12px; font-weight: 680; }
.stat strong { display: block; margin: 4px 0; font-size: 24px; line-height: 1.15; }
.stat span { color: var(--success); font-size: 12px; }
.stat-grid.compact .stat { min-height: 94px; }

.home-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) 360px; gap: 14px; margin-bottom: 14px; }
.home-layout.secondary { grid-template-columns: minmax(0, 1fr) 360px; }
.queue-list { display: grid; gap: 8px; }
.queue-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.queue-item:last-child { border-bottom: 0; }
.queue-item .type { color: var(--primary); font-size: 12px; font-weight: 760; }
.queue-item b { display: block; font-size: 14px; line-height: 1.35; }
.queue-item p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.status,
.pill {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff8ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status.ok,
.status.done,
.pill.ok { color: var(--success); background: #fff4dc; border-color: #ead3ae; }
.status.wait { color: var(--warning); background: #fff3df; border-color: #ead3ae; }
.status.fail,
.pill.fail { color: var(--danger); background: #faecea; border-color: #edcbc7; }
.quick-list { display: grid; gap: 8px; }
.quick-action {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
}
.quick-action:hover { background: rgba(255,255,255,.82); border-color: rgba(204,140,29,.24); }
.quick-action i {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-style: normal;
  color: white;
  background: linear-gradient(145deg, #dba348, #b97714);
  font-size: 12px;
  font-weight: 800;
}
.quick-action b { display: block; font-size: 14px; }
.quick-action em { display: block; margin-top: 2px; color: var(--muted); font-style: normal; font-size: 12px; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.work-card {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffaf2, #f7e5c2);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.work-card b { font-size: 14px; line-height: 1.35; }
.work-card p { margin: 7px 0; color: var(--muted); font-size: 12px; }
.work-card span { color: var(--primary); font-size: 12px; font-weight: 760; }
.calendar-list { display: grid; gap: 8px; }
.calendar-list div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
}
.calendar-list b { color: var(--primary-2); font-size: 13px; }
.calendar-list span { color: var(--text); font-size: 13px; }
.calendar-list i { color: var(--muted); font-style: normal; font-size: 12px; }

.workspace-grid,
.video-layout,
.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
}
.form-panel { min-width: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { margin-bottom: 13px; }
.field label { display: block; margin-bottom: 6px; color: #4c3927; font-size: 13px; font-weight: 720; }
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: 0;
  font-size: 14px;
}
.input,
.select { height: 38px; padding: 0 10px; }
.textarea { min-height: 116px; padding: 10px; line-height: 1.65; resize: vertical; }
.small-textarea { min-height: 78px; }
.spaced { margin-top: 12px; }

.upload {
  min-height: 118px;
  border: 1px dashed rgba(176,126,44,.30);
  border-radius: var(--radius);
  background: rgba(255,255,255,.46);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  cursor: pointer;
}
.upload:hover { border-color: rgba(204,140,29,.42); background: rgba(255,248,236,.72); }
.upload input { display: none; }
.upload strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 14px; }
.upload span { color: var(--muted); font-size: 12px; }
.compact-upload { min-height: 82px; }

.rewrite-workspace {
  display: grid;
  gap: 14px;
}

.rewrite-input-panel,
.rewrite-result-panel {
  width: 100%;
}

.rewrite-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: end;
}

.rewrite-textarea {
  min-height: 150px;
}

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

.segment { display: flex; flex-wrap: wrap; gap: 7px; }
.seg,
.tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.seg.active,
.tab.active { color: var(--primary-2); background: rgba(204,140,29,.12); border-color: rgba(204,140,29,.28); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.subpanel { display: none; }
.subpanel.active { display: block; }

.persona-preview { display: grid; gap: 12px; }
.media-preview {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(204,140,29,.08), rgba(201,123,49,.10)),
    repeating-linear-gradient(45deg, #fffdf9 0, #fffdf9 10px, #f7ead6 10px, #f7ead6 20px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.media-preview img,
.media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview.portrait { aspect-ratio: 4 / 5; }
.media-preview.poster { aspect-ratio: 4 / 5; min-height: 280px; }
.media-preview.product { aspect-ratio: 1 / 1; min-height: 160px; }
.media-preview.video-placeholder { aspect-ratio: 16 / 9; min-height: 240px; }
.media-preview.ops-persona-preview { min-height: 220px; aspect-ratio: 16 / 10; }
.persona-copy { display: grid; gap: 5px; }
.persona-copy b { font-size: 17px; }
.persona-copy span,
.persona-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.persona-copy em {
  justify-self: start;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff1df;
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
}
.asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-asset {
  min-height: 126px;
  padding: 13px;
  display: grid;
  gap: 7px;
  align-content: start;
}
.mini-asset b { font-size: 15px; }
.mini-asset span { justify-self: start; color: var(--primary); font-size: 12px; font-weight: 760; }
.mini-asset p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mini-asset .asset-actions { display: flex; gap: 7px; margin-top: 4px; }

.generated-copy {
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  color: #4c3927;
  line-height: 1.7;
  white-space: pre-wrap;
}

.copy-structure,
.copy-script,
.copy-evaluation {
  padding: 11px;
  border: 1px solid rgba(204, 140, 29, .2);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 246, .78);
  white-space: pre-wrap;
}

.copy-script {
  margin-top: 10px;
  border-color: rgba(136, 89, 23, .2);
  background: rgba(255,255,255,.78);
  color: #332414;
  font-weight: 650;
}

.copy-evaluation {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.copy-structure {
  color: #735018;
  font-size: 13px;
}

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

.rewrite-compare > div {
  min-width: 0;
}

.rewrite-compare b {
  display: block;
  margin-bottom: 8px;
  color: #5a3a14;
  font-size: 13px;
}

.compact-copy {
  min-height: 420px;
  max-height: 560px;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.result-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.result-summary span { color: var(--muted); font-size: 12px; }
.generated-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  white-space: normal;
}
.generated-asset-grid article {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.58);
}
.generated-asset-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
}
.generated-asset-grid b { color: var(--text); font-size: 13px; }
.generated-asset-grid span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.radar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; margin-bottom: 14px; }
.radar-filter {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 150px auto;
  gap: 12px;
  align-items: end;
}
.radar-filter .field { margin-bottom: 0; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.rule-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rule-list button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  color: var(--muted);
  font-size: 12px;
}
.hot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hot-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.hot-cover {
  height: 86px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7deb1, #e8bb58 48%, #fff8df);
  color: #9b6208;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font-weight: 800;
  margin-bottom: 10px;
  overflow: hidden;
}
.hot-cover img { width: calc(100% + 20px); height: calc(100% + 20px); margin: -10px; object-fit: cover; }
.hot-cover span { display: flex; align-items: flex-end; width: 100%; height: 100%; }
.hot-card h4 { margin: 0; min-height: 42px; font-size: 15px; line-height: 1.4; }
.hot-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; color: var(--soft); font-size: 12px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.55; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.hot-tags em {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(204, 140, 29, .1);
  color: var(--primary-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}
.source-link {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}
.btn.small.active {
  border-color: rgba(204, 140, 29, .4);
  background: rgba(204, 140, 29, .14);
  color: var(--primary-2);
}
.empty-state {
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, .72);
  color: var(--muted);
  text-align: center;
}
.empty-state.wide { grid-column: 1 / -1; }
.empty-state b { color: var(--text); }
.empty-inline {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, .72);
  color: var(--muted);
  font-size: 12px;
}
.empty-inline.full {
  grid-column: 1 / -1;
  width: 100%;
}

.voice-mode-tabs {
  width: fit-content;
  height: 40px;
  margin-bottom: 14px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.56);
  display: grid;
  grid-template-columns: repeat(2, 120px);
  gap: 3px;
}
.voice-mode-tabs button {
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}
.voice-mode-tabs button.active { background: #fff; color: var(--primary-2); box-shadow: 0 6px 18px rgba(105,70,17,.08); }
.voice-feature-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.voice-feature-card {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.66);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
}
.voice-feature-card:hover { background: #fff; border-color: var(--line-strong); }
.voice-feature-card i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4dc;
  color: var(--primary-2);
  font-style: normal;
  font-size: 12px;
  font-weight: 820;
}
.voice-feature-card b { display: block; font-size: 14px; }
.voice-feature-card em { color: var(--muted); font-size: 12px; font-style: normal; }
.voice-library-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 14px; align-items: start; }
.voice-library-layout.compact { display: block; }
.voice-category-panel { position: sticky; top: 84px; display: grid; gap: 14px; }
.compact-head { margin-bottom: 0; }
.voice-library-toolbar {
  margin: 8px 0 12px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.voice-library-toolbar > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.voice-filter-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(176,126,44,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
}
.voice-filter-inline b {
  margin: 0 6px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}
.voice-filter-inline button {
  min-width: 38px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}
.voice-filter-inline button.active {
  border-color: rgba(204,140,29,.22);
  background: #fff;
  color: var(--primary-2);
  box-shadow: 0 4px 12px rgba(105,70,17,.07);
}
.voice-filter-block { display: grid; gap: 7px; }
.voice-filter-block b { color: var(--text); font-size: 13px; }
.voice-filter-block button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}
.voice-filter-block button:hover { background: rgba(255,255,255,.58); }
.voice-filter-block button.active {
  border-color: rgba(204,140,29,.24);
  background: rgba(204,140,29,.12);
  color: var(--primary-2);
  font-weight: 760;
}
.voice-workbench { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 14px; align-items: start; }
.voice-library-panel,
.voice-compose-panel { min-height: 560px; }
.voice-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; }
.voice-tabs {
  height: 38px;
  padding: 3px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.46);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.voice-tabs button {
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}
.voice-tabs button.active {
  background: #fff;
  color: var(--primary-2);
  box-shadow: 0 6px 18px rgba(105,70,17,.08);
}
.voice-tabs span {
  margin-left: 5px;
  color: var(--soft);
  font-size: 12px;
}
.voice-list-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.voice-list-head b { font-size: 15px; }
.voice-list-head span { color: var(--muted); font-size: 12px; }
.voice-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 10px; }
.voice-list { display: grid; gap: 8px; }
.voice-item,
.voice-card {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  display: grid;
  gap: 9px;
  text-align: left;
}
.voice-card {
  min-height: 158px;
  padding: 12px;
  align-content: start;
  position: relative;
}
.voice-card:hover,
.voice-item:hover { background: rgba(255,255,255,.82); }
.voice-card.active,
.voice-item.active { border-color: rgba(204,140,29,.28); background: rgba(204,140,29,.12); }
.voice-card.disabled { opacity: .62; }
.voice-card button:disabled,
.btn:disabled { cursor: not-allowed; opacity: .55; }
.voice-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.voice-play,
.voice-favorite {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--primary-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}
.voice-favorite { color: var(--soft); }
.voice-favorite.active { color: var(--primary-2); background: #fff4dc; }
.voice-play.disabled { opacity: .4; }
.voice-card-main {
  width: 100%;
  padding: 0;
  display: grid;
  gap: 7px;
  background: transparent;
  text-align: left;
}
.voice-card-main i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#fff,#f4deaa);
  color: #9b650b;
  font-style: normal;
  font-weight: 800;
}
.voice-card-main b { font-size: 14px; }
.voice-card-main span { min-height: 20px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.voice-select-area {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: transparent;
  padding: 0;
  text-align: left;
}
.voice-item i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#fff,#f4deaa);
  color: #9b650b;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.voice-item b { display: block; font-size: 14px; }
.voice-item span { color: var(--muted); font-size: 12px; }
.voice-item audio { width: 100%; height: 32px; }
.voice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}
.voice-tags em {
  min-height: 19px;
  padding: 0 6px;
  border: 1px solid rgba(176,126,44,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}
.voice-license {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.voice-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; }
.selected-voice-card {
  min-height: 72px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  display: grid;
  gap: 9px;
}
.selected-voice-card > b { font-size: 14px; }
.selected-voice-card > span { color: var(--muted); font-size: 12px; }
.selected-voice-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.selected-voice-main i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#fff,#f4deaa);
  color: #9b650b;
  font-style: normal;
  font-weight: 800;
}
.selected-voice-main b { display: block; font-size: 15px; }
.selected-voice-main em { color: var(--muted); font-size: 12px; font-style: normal; }
.voice-empty {
  min-height: 220px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255,255,255,.46);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}
.voice-empty b { font-size: 16px; }
.voice-empty span { max-width: 280px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.voice-clone-modal {
  width: min(820px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
}
.voice-clone-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}
.voice-clone-grid .form-panel,
.voice-clone-grid .preview-panel {
  padding: 14px;
}
.voice-clone-grid .small-textarea {
  min-height: 76px;
}
.voice-clone-hint {
  margin: -2px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(176,126,44,.16);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.48);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.voice-flow-note { display: grid; gap: 10px; }
.voice-flow-note div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.56);
}
.voice-flow-note i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4dc;
  color: var(--primary-2);
  font-style: normal;
  font-weight: 800;
}
.voice-flow-note b { display: block; font-size: 13px; }
.voice-flow-note em { color: var(--muted); font-size: 12px; font-style: normal; line-height: 1.5; }
.voice-progress {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.66);
}
.voice-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 760;
}
.voice-progress-head span { color: var(--primary-2); }
.voice-progress-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(204,140,29,.12);
}
.voice-progress-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .28s ease;
}
.voice-progress p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.audio-preview audio { width: 100%; height: 36px; margin-top: 8px; }
.result-block { margin-top: 14px; }
.result-block b { display: block; margin-bottom: 8px; }
.muted-box {
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  color: var(--muted);
}

.api-status {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, .74);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.api-status.ok {
  border-color: rgba(204, 140, 29, .24);
  background: rgba(255, 244, 220, .82);
  color: var(--success);
}

.api-status.warn,
.api-status.loading {
  border-color: rgba(204, 140, 29, .28);
  background: rgba(255, 243, 223, .82);
  color: var(--warning);
}

.api-status.fail {
  border-color: rgba(181, 75, 69, .25);
  background: rgba(250, 236, 234, .86);
  color: var(--danger);
}

.api-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.api-note.subtle { color: var(--soft); }

.phone-preview {
  width: min(260px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0 auto 14px;
  padding: 8px;
  border-radius: 24px;
  background: #2a2118;
  box-shadow: 0 14px 34px rgba(105, 70, 17, .18);
}
.phone-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #f5ead8;
}
.phone-inner img,
.phone-inner video { width: 100%; height: 100%; object-fit: cover; }
.empty-video {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.empty-video b { color: var(--text); }
.phone-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 18px;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: rgba(42, 33, 24, .72);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
}

.phone-edit-badges {
  position: absolute;
  left: 12px;
  top: 14px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.phone-edit-badges i {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #7b571e;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.avatar-studio-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.avatar-side-panel,
.avatar-preview-panel {
  position: sticky;
  top: 86px;
  align-self: start;
}

.avatar-side-actions {
  display: grid;
  gap: 8px;
}

.avatar-production-note {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(204,140,29,.16);
  border-radius: var(--radius);
  background: rgba(255,248,236,.68);
  display: grid;
  gap: 7px;
}

.avatar-production-note b {
  font-size: 13px;
}

.avatar-production-note span {
  position: relative;
  padding-left: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.avatar-production-note span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.avatar-editor-panel {
  min-width: 0;
  padding: 18px;
}

.avatar-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.avatar-editor-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.avatar-editor-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.avatar-editor-header.compact {
  margin-bottom: 12px;
}

.avatar-script-box {
  min-height: 190px;
}

.avatar-script-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -3px 0 14px;
}

.avatar-section-divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, rgba(204,140,29,.22), transparent);
}

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

.avatar-tool-block {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
}

.avatar-tool-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.avatar-tool-title b {
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: #2f261e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 850;
}

.avatar-tool-title span {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.toggle-row {
  min-height: 34px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,250,242,.74);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 730;
}

.toggle-row input {
  accent-color: var(--primary);
}

.range-card.slim {
  margin-bottom: 13px;
  align-self: end;
}

.avatar-output-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.avatar-output-grid .field,
.avatar-tool-block .field {
  margin-bottom: 0;
}

.avatar-generate-btn {
  min-height: 46px;
  margin-top: 12px;
  font-size: 15px;
}

.avatar-preview-summary {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.avatar-preview-summary span {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.58);
  color: var(--muted);
  display: flex;
  align-items: center;
  font-size: 12px;
  line-height: 1.35;
}

.avatar-step-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar-step-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.avatar-step-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.avatar-persona-toolbar {
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.avatar-searchbox {
  width: min(300px, 36vw);
}

.avatar-persona-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.avatar-persona-card {
  position: relative;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  color: var(--text);
  display: grid;
  gap: 7px;
  text-align: left;
}

.avatar-persona-card:hover,
.avatar-persona-card.active {
  border-color: rgba(204,140,29,.36);
  background: rgba(255,248,236,.82);
}

.avatar-persona-card.active {
  box-shadow: inset 0 0 0 1px rgba(204,140,29,.24);
}

.avatar-persona-thumb {
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius) - 4px);
}

.avatar-persona-thumb .persona-source {
  left: 7px;
  bottom: 7px;
  min-height: 21px;
  padding: 0 7px;
  font-size: 11px;
}

.avatar-persona-check {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(42,33,24,.62);
  color: #fff;
  font-size: 11px;
  font-weight: 760;
}

.avatar-persona-card.active .avatar-persona-check {
  background: var(--primary);
}

.avatar-persona-card b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.avatar-persona-card em {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.avatar-persona-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.avatar-persona-tags i {
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(204,140,29,.13);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(204,140,29,.08);
  color: var(--primary-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 740;
}

.avatar-selected-card {
  min-height: 74px;
  margin: 13px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.avatar-selected-card > b,
.avatar-selected-card > span {
  grid-column: 1 / -1;
}

.avatar-selected-card b {
  display: block;
  font-size: 14px;
}

.avatar-selected-card span,
.avatar-selected-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.avatar-selected-card.studio {
  min-height: 0;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  grid-template-columns: 1fr;
}

.avatar-selected-card.studio .selected-avatar-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
}

.avatar-selected-card.studio > b,
.avatar-selected-card.studio > span {
  padding: 10px;
  border: 1px dashed rgba(176,126,44,.28);
  border-radius: var(--radius);
  background: rgba(255,255,255,.5);
}

.avatar-selected-card.studio > div {
  padding: 10px 2px 0;
}

.selected-avatar-thumb {
  width: 58px;
  aspect-ratio: 1;
  border-radius: 12px;
}

.selected-avatar-thumb .persona-source {
  display: none;
}

.phone-persona-thumb {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.phone-persona-thumb::after {
  inset: auto 9% 0;
}

.avatar-drive-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.avatar-drive-section {
  display: none;
}

.avatar-drive-section.active {
  display: block;
}

.avatar-dual-panel {
  display: grid;
  gap: 12px;
}

.avatar-dual-note {
  padding: 9px 11px;
  border: 1px solid rgba(204,140,29,.18);
  border-radius: var(--radius-sm);
  background: rgba(204,140,29,.08);
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 760;
}

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

.avatar-speaker-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.56);
}

.avatar-speaker-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.3;
}

.avatar-audio-history {
  min-height: 82px;
  display: grid;
  gap: 8px;
}

.avatar-audio-history button {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
  text-align: left;
}

.avatar-audio-history button.active {
  border-color: rgba(204,140,29,.34);
  background: rgba(204,140,29,.12);
}

.avatar-audio-history b {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.avatar-audio-history span {
  color: var(--muted);
  font-size: 12px;
}

.range-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.range-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
}
.range-card span { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 760; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.task-status { margin-top: 10px; color: var(--muted); font-size: 13px; }
.log-list { display: grid; gap: 7px; margin-top: 10px; }
.log-list div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  color: var(--muted);
  font-size: 12px;
}
.commerce-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.table { width: 100%; border-collapse: collapse; }
.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}
.table th { color: var(--muted); font-weight: 760; }
.table td { color: var(--muted); }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.platforms button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  color: var(--muted);
  font-weight: 700;
}
.platforms button.active { color: var(--primary-2); background: rgba(204,140,29,.12); border-color: rgba(204,140,29,.28); }
.data-panel { margin-top: 14px; }
.bar-list { display: grid; gap: 12px; }
.bar-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.bar-list span { color: var(--text); font-size: 13px; }
.bar-list i { height: 10px; border-radius: 999px; background: #f3e5cd; overflow: hidden; position: relative; }
.bar-list i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--primary); }
.bar-list b { color: var(--muted); font-size: 12px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(42, 33, 24, .32);
}
.modal-backdrop.active { display: grid; }
.modal {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(105, 70, 17, .24);
  padding: 18px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(204,140,29,.10);
  color: var(--text);
  font-size: 20px;
}
.modal p { margin: 10px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.modal-field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: #4c3927;
  font-size: 13px;
  font-weight: 720;
}
.modal-field input {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 10px;
  outline: 0;
}
.settings-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.api-status.inline {
  margin-top: 0;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.settings-row,
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.modal-actions { justify-content: flex-end; margin-top: 14px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 200;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 13px;
  border-radius: var(--radius);
  background: rgba(42, 33, 24, .94);
  color: white;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
  transition: .18s ease;
  font-size: 13px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

	@media (max-width: 1240px) {
	  .workspace-chip { display: none; }
	  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	  .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	  .workflow-strip,
	  .creative-capability-grid,
	  .platform-account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	  .persona-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	  .persona-gallery { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
	}

@media (max-width: 980px) {
  body { overflow: auto; }
  .app-shell { display: block; height: auto; }
  .sidebar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 60;
    height: auto;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(204,140,29,.14);
  }
  .sidebar .brand,
  .sidebar .plan-card,
  .nav-label {
    display: none;
  }
  .nav {
    display: flex;
    gap: 6px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    height: 36px;
    padding: 0 10px;
    white-space: nowrap;
  }
  .topbar { height: auto; flex-wrap: wrap; padding: 12px; }
  .search { max-width: none; order: 2; width: 100%; flex-basis: 100%; }
  .content { padding: 16px; }
	  .page-head,
		  .persona-library-head,
		  .avatar-step-head,
		  .avatar-editor-header,
		  .avatar-studio-layout,
		  .home-layout,
		  .home-layout.secondary,
		  .workspace-grid,
	  .video-layout,
  .publish-layout,
  .voice-workbench,
  .voice-library-layout,
  .voice-clone-grid,
  .voice-grid,
  .radar-layout { display: block; }
  .page-head .btn { margin-top: 12px; }
  .stat-grid,
  .form-row,
  .settings-auth-grid,
  .range-grid,
  .avatar-edit-grid,
  .avatar-output-grid,
  .generated-asset-grid,
	  .radar-filter,
	  .asset-grid,
	  .hot-grid,
		  .work-grid,
		  .voice-feature-row,
		  .voice-card-grid,
		  .workflow-strip,
		  .creative-capability-grid,
		  .platform-account-grid,
		  .rewrite-input-grid,
		  .rewrite-compare,
		  .persona-hero-grid,
		  .persona-gallery,
		  .persona-create-grid { grid-template-columns: 1fr; }
		  .rewrite-actions { grid-template-columns: 1fr; }
	  .persona-library-actions { justify-content: flex-start; margin-top: 12px; }
	  .persona-searchbox { width: 100%; }
		  .persona-toolbar { align-items: flex-start; flex-direction: column; }
		  .avatar-persona-toolbar { align-items: flex-start; }
		  .avatar-searchbox { width: 100%; }
		  .avatar-persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
		  .panel { margin-bottom: 14px; }
	  .persona-capability-card {
	    min-height: 86px;
	  }
	  .avatar-side-panel,
	  .avatar-preview-panel {
	    position: static;
	  }
	  .avatar-editor-header {
	    display: block;
	  }
	  .avatar-editor-header .tabs {
	    margin-top: 12px;
	  }
	  .persona-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: stretch;
  }
  .persona-portrait {
    aspect-ratio: auto;
    min-height: 156px;
  }
  .persona-head {
    font-size: 26px;
  }
  .persona-card-body {
    display: grid;
    align-content: center;
    padding: 12px;
  }
  .persona-card-body p {
    min-height: 0;
  }
  .persona-card-actions {
    flex-wrap: wrap;
  }
	}

/* Warm prototype theme overrides: keep the commercial interactions, restore the original visual language. */
body {
  background: linear-gradient(135deg, #fffdf9, #fff8ec 48%, #f7ecd9);
}

.sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,249,239,.56));
  border-right-color: rgba(204,140,29,.14);
}

.brand-mark,
.quick-action i {
  background: linear-gradient(145deg, #dba348, #b97714);
  color: #fff;
}

.topbar {
  background: rgba(255,250,242,.78);
  border-bottom-color: rgba(204,140,29,.12);
  backdrop-filter: blur(22px);
}

	.search,
	.workspace-chip,
	.btn,
	.status,
	.pill,
	.quick-action,
	.workflow-chip,
	.creative-capability-card,
	.platform-account,
	.calendar-list div,
	.voice-item,
.range-card,
.log-list div,
.platforms button,
.rule-list button,
.generated-copy,
.muted-box {
  background: rgba(255,255,255,.62);
  border-color: var(--line);
}

.panel,
.card {
  border-color: rgba(255,255,255,.85);
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.58));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(20px);
}

.nav-item {
  color: rgba(42,33,24,.72);
}

.nav-item span {
  color: #b5760e;
  background: rgba(204,140,29,.08);
}

.nav-item:hover,
.voice-item:hover,
.quick-action:hover {
  background: rgba(255,255,255,.82);
  border-color: rgba(204,140,29,.24);
}

.nav-item.active {
  color: #9a6209;
  background: linear-gradient(135deg, rgba(204,140,29,.14), rgba(255,255,255,.44));
}

.kicker,
.queue-item .type,
.mini-asset span,
.work-card span,
.plan-card span {
  color: #a36a0a;
}

.btn.primary {
  border-color: #cc8c1d;
  background: #cc8c1d;
  color: #fff;
  box-shadow: 0 10px 22px rgba(204,140,29,.18);
}

.btn.primary:hover {
  background: #b97714;
}

.avatar-badge {
  background: linear-gradient(145deg,#fff,#f4dfb5);
  border: 1px solid rgba(204,140,29,.16);
  color: #9a6209;
}

.plan-card {
  background: rgba(255,255,255,.58);
  border-color: rgba(255,255,255,.76);
  box-shadow: var(--shadow);
}

.plan-bar {
  background: rgba(204,140,29,.12);
}

.plan-bar i,
.bar-list i::before {
  background: #cc8c1d;
}

.field label,
.modal-field {
  color: #4c3927;
}

.input,
.textarea,
.select,
.modal-field input {
  background: rgba(255,255,255,.70);
  border-color: var(--line-strong);
}

.upload {
  border: 1.5px dashed rgba(176,126,44,.30);
  background: rgba(255,255,255,.46);
}

.upload:hover {
  border-color: rgba(204,140,29,.42);
  background: rgba(255,248,236,.72);
}

.seg.active,
.tab.active,
.voice-item.active,
.platforms button.active {
  color: #9a6209;
  background: rgba(204,140,29,.12);
  border-color: rgba(204,140,29,.28);
}

.media-preview {
  background:
    linear-gradient(135deg, rgba(204,140,29,.08), rgba(232,187,88,.12)),
    repeating-linear-gradient(45deg, #fffdf9 0, #fffdf9 10px, #fff5e4 10px, #fff5e4 20px);
}

.persona-copy em,
.tag {
  color: #9b650b;
  background: rgba(204,140,29,.09);
  border-color: rgba(204,140,29,.12);
}

/* Persona center: gallery-first commercial workflow. */
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.persona-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.persona-capability-card {
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(204,140,29,.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,248,236,.62));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.72);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.persona-capability-card:hover,
.persona-capability-card.active {
  border-color: rgba(204,140,29,.30);
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,244,220,.76));
}

.persona-capability-card i {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #dba348, #b97714);
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 820;
}

.persona-capability-card b {
  display: block;
  margin-top: 1px;
  font-size: 15px;
  line-height: 1.35;
}

.persona-capability-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.persona-library-panel {
  padding: 18px;
}

.persona-library-head,
.persona-toolbar,
.persona-title-row,
.persona-card-actions,
.persona-library-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.persona-library-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.persona-library-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.persona-library-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.persona-library-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.persona-searchbox {
  width: min(340px, 36vw);
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.70);
  color: var(--soft);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
}

.persona-searchbox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.persona-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.persona-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.persona-tabs button.active {
  color: #9a6209;
  background: rgba(204,140,29,.12);
  border-color: rgba(204,140,29,.30);
}

.persona-sort {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.persona-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
}

.persona-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(204,140,29,.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,248,236,.54));
  box-shadow: 0 14px 34px rgba(105,70,17,.07);
}

.persona-card:hover {
  transform: translateY(-1px);
  border-color: rgba(204,140,29,.30);
  box-shadow: 0 18px 40px rgba(105,70,17,.10);
}

.persona-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.76), transparent 22%),
    linear-gradient(145deg, #f9e6bf, #e6b04f);
}

.persona-portrait::after {
  content: "";
  position: absolute;
  inset: auto 12% 0;
  height: 34%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(120,79,18,.16));
}

.persona-portrait.has-media::after {
  content: none;
}

.persona-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.persona-tone-amber { background: linear-gradient(145deg, #fff0ca, #d8982e); }
.persona-tone-cream { background: linear-gradient(145deg, #fff8e8, #d7b77b); }
.persona-tone-rose { background: linear-gradient(145deg, #fff1e7, #d98d66); }
.persona-tone-ivory { background: linear-gradient(145deg, #fffdf7, #c9ae80); }
.persona-tone-brown { background: linear-gradient(145deg, #f6dfbd, #9f6c31); }
.persona-tone-custom { background: linear-gradient(145deg, #fff5de, #c98925); }

.persona-figure {
  position: relative;
  z-index: 1;
  width: 72%;
  height: 78%;
  display: grid;
  place-items: center;
}

.persona-head {
  position: absolute;
  top: 10%;
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,242,214,.80));
  color: #9a6209;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 840;
  box-shadow: 0 18px 38px rgba(105,70,17,.13);
}

.persona-neck {
  position: absolute;
  top: 45%;
  width: 16%;
  height: 18%;
  border-radius: 999px;
  background: rgba(255,245,224,.82);
}

.persona-body {
  position: absolute;
  bottom: 0;
  width: 74%;
  height: 44%;
  border-radius: 46% 46% 0 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.52), rgba(150,96,18,.18)),
    linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36);
}

.persona-fav {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.66);
  background: rgba(255,255,255,.70);
  color: rgba(99,65,14,.56);
  font-size: 17px;
  box-shadow: 0 8px 18px rgba(105,70,17,.10);
}

.persona-fav.active {
  color: #b97714;
  background: rgba(255,246,222,.92);
}

.persona-source {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(42,33,24,.48);
  color: #fff;
  font-size: 12px;
  font-weight: 720;
}

.persona-card-body {
  padding: 11px;
}

.persona-title-row {
  justify-content: space-between;
  gap: 8px;
}

.persona-title-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.persona-title-row span {
  color: var(--soft);
  font-size: 12px;
}

.persona-card-body p {
  min-height: 38px;
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.persona-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 10px;
}

.persona-meta-row em {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(204,140,29,.12);
  background: rgba(204,140,29,.08);
  color: #9a6209;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.persona-card-actions {
  justify-content: space-between;
}

.persona-card-actions .btn {
  flex: 1;
}

.persona-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  border: 1px dashed rgba(176,126,44,.26);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: rgba(255,255,255,.42);
  color: var(--muted);
  text-align: center;
}

.persona-empty b {
  color: var(--text);
  font-size: 16px;
}

.persona-create-modal {
  align-items: start;
  overflow: auto;
}

.persona-modal {
  width: min(1040px, calc(100vw - 28px));
  margin: 18px auto;
}

.persona-modal .modal-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.persona-modal .modal-head p {
  margin: 4px 0 0;
}

.persona-create-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
}

/* Operations admin. */
.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ops-page-head {
  align-items: flex-start;
}

.ops-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ops-side-panel {
  position: sticky;
  top: 86px;
}

.ops-tabs {
  display: grid;
  gap: 8px;
}

.ops-tabs button {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.52);
  color: var(--text);
  text-align: left;
}

.ops-tabs button.active {
  border-color: rgba(204,140,29,.34);
  background: rgba(204,140,29,.12);
  box-shadow: inset 3px 0 0 var(--primary);
}

.ops-tabs b {
  display: block;
  font-size: 14px;
}

.ops-tabs span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ops-main {
  min-width: 0;
}

.ops-section {
  display: none;
}

.ops-section.active {
  display: block;
}

.ops-editor-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ops-list {
  max-height: 680px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.ops-list-item {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.56);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.ops-list-item.active {
  border-color: rgba(204,140,29,.36);
  background: rgba(204,140,29,.12);
}

.ops-list-item i {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #dba348, #b97714);
  color: #fff;
  font-style: normal;
  font-size: 14px;
  font-weight: 820;
}

.ops-list-item span {
  min-width: 0;
}

.ops-list-item b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.ops-list-item em {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ops-form {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.50);
}

.ops-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ops-switch-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ops-switch-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.ops-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.ops-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Commercial SaaS workflow widgets shared across modules. */
.workflow-strip,
.creative-capability-grid,
.platform-account-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.workflow-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-chip,
.creative-capability-card,
.platform-account {
  min-width: 0;
  border: 1px solid rgba(204,140,29,.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,248,236,.52));
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}

.workflow-chip {
  min-height: 76px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.workflow-chip:hover,
.workflow-chip.active,
.creative-capability-card:hover,
.creative-capability-card.active,
.platform-account.active {
  border-color: rgba(204,140,29,.30);
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,244,220,.76));
}

.workflow-chip i {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #dba348, #b97714);
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 820;
}

.workflow-chip b,
.creative-capability-card b,
.platform-account b {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.workflow-chip em,
.creative-capability-card span,
.platform-account span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.mini-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mini-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-section-head b {
  font-size: 13px;
}

.mini-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.compact-history {
  display: grid;
  gap: 7px;
}

.compact-history button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
  color: var(--text);
  text-align: left;
}

.compact-history b,
.compact-history span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-history span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.rewrite-score-grid,
.asset-health {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

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

.rewrite-score-grid div,
.asset-health div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.55);
}

.rewrite-score-grid b,
.asset-health b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rewrite-score-grid span,
.asset-health span {
  display: block;
  margin-top: 4px;
  color: #9a6209;
  font-size: 18px;
  font-weight: 820;
}

.template-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-pills button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.template-pills button:hover {
  color: #9a6209;
  border-color: rgba(204,140,29,.28);
}

.creative-capability-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.creative-capability-card {
  min-height: 92px;
  padding: 13px;
}

.creative-capability-card em {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  margin-top: 10px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(204,140,29,.10);
  color: #9a6209;
  font-style: normal;
  font-size: 12px;
  font-weight: 760;
}

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

.platform-account {
  min-height: 64px;
  padding: 10px;
}

.generated-copy {
  color: #4c3927;
}

.hot-cover {
  background: linear-gradient(135deg, #f7deb1, #e8bb58 48%, #fff8df);
  color: #9b6208;
}

.voice-item i {
  background: linear-gradient(145deg,#fff,#f4deaa);
  color: #9b650b;
}

.phone-preview {
  background: #1e1710;
  box-shadow: 0 22px 52px rgba(55,35,10,.22);
}

.phone-inner {
  background: #f5ead8;
}

.phone-caption {
  background: rgba(0,0,0,.42);
}

.table td {
  color: var(--muted);
}

.bar-list i {
  background: rgba(204,140,29,.12);
}

.modal-backdrop {
  background: rgba(42,33,24,.22);
}

.modal {
  background: #fffaf2;
  box-shadow: 0 24px 70px rgba(42,33,24,.22);
}

.icon-btn {
  background: rgba(204,140,29,.10);
  color: #9a6209;
}

.toast {
  background: rgba(42,33,24,.92);
}

.work-card {
  background: linear-gradient(135deg, rgba(255,255,255,.76), rgba(255,248,236,.72));
}

.work-card span {
  color: #9a6209;
}

.stat span,
.status.ok,
.pill.ok {
  color: #8f6a1a;
}

.quick-action i {
  color: #fff;
}

.empty-video {
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,248,236,.1));
}

.media-preview.product,
.media-preview.video-placeholder,
.media-preview.portrait,
.media-preview.poster {
  background:
    linear-gradient(135deg, rgba(204,140,29,.08), rgba(232,187,88,.12)),
    repeating-linear-gradient(45deg, #fffdf9 0, #fffdf9 10px, #fff5e4 10px, #fff5e4 20px);
}

@supports (backdrop-filter: blur(1px)) {
  .sidebar,
  .topbar,
  .panel,
  .card {
    backdrop-filter: blur(20px);
  }
}

/* Final responsive pass for components defined after the first media block. */
@media (max-width: 1240px) {
  .workflow-strip,
  .creative-capability-grid,
  .platform-account-grid,
  .persona-hero-grid,
  .avatar-studio-layout,
  .avatar-persona-grid,
  .voice-feature-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avatar-editor-panel {
    grid-column: 1 / -1;
  }

  .persona-gallery {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .ops-layout,
  .ops-editor-grid {
    grid-template-columns: 1fr;
  }

  .ops-side-panel {
    position: static;
  }

  .avatar-dual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .persona-library-head,
  .avatar-step-head,
  .avatar-editor-header {
    display: block;
  }

  .persona-library-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .persona-searchbox,
  .avatar-searchbox {
    width: 100%;
  }

  .persona-toolbar,
  .avatar-persona-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .avatar-studio-layout {
    display: block;
  }

  .avatar-side-panel,
  .avatar-preview-panel {
    position: static;
  }

  .avatar-edit-grid,
  .avatar-output-grid {
    grid-template-columns: 1fr;
  }

  .avatar-editor-header .tabs {
    margin-top: 12px;
  }

  .voice-library-layout {
    display: block;
  }

  .voice-category-panel {
    position: static;
    margin-bottom: 14px;
  }

  .voice-feature-row,
  .voice-card-grid {
    grid-template-columns: 1fr;
  }

  .voice-mode-tabs {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow-strip,
  .creative-capability-grid,
  .platform-account-grid,
  .persona-hero-grid,
  .persona-gallery,
  .persona-create-grid,
  .avatar-persona-grid,
    .avatar-dual-grid,
    .rewrite-score-grid,
  .asset-health,
  .ops-two-col {
    grid-template-columns: 1fr;
  }

  .ops-form-actions {
    justify-content: stretch;
  }

  .ops-form-actions .btn {
    flex: 1;
  }
}
