:root {
  --canvas-bg: #eef2f6;
  --rail: #101820;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --surface: #f4f6f8;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #25756c;
  --accent-dark: #165f57;
  --accent-soft: rgba(37, 117, 108, 0.12);
  --gold: #c9912e;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --shadow: 0 22px 58px rgba(16, 24, 32, 0.10);
  --soft-shadow: 0 14px 30px rgba(16, 24, 32, 0.07);
  --glass-glow: 0 0 40px rgba(37, 117, 108, 0.10);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--canvas-bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

#codex-browser-sidebar-comments-root:empty {
  display: none !important;
  pointer-events: none !important;
}

svg {
  display: block;
}

.app-shell {
  height: 100dvh;
  min-width: 1180px;
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr);
  background: var(--canvas-bg);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(90deg, #10242c 0%, #25756c 58%, #b47b25 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.project-strip,
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.back-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, .27);
}

.back-button:active,
.button:active,
.rail-item:active,
.chip:active,
.tab:active,
.segment:active {
  transform: translateY(1px);
}

.back-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-label {
  font-size: 12px;
  opacity: .86;
}

.project-name {
  width: min(360px, 42vw);
  height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  color: #ffffff;
  background: transparent;
  outline: none;
  font-weight: 700;
}

.project-name:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .36);
}

.service-pill {
  min-height: 32px;
  max-width: 420px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(0, 80, 115, .32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  font-size: 12px;
  white-space: nowrap;
}

.button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: var(--accent);
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.button:disabled {
  opacity: .62;
  cursor: wait;
  transform: none;
}

.button.primary {
  background: #ffffff;
  color: var(--accent);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, .24);
}

.button.dark {
  color: #f8fbff;
  background: #383b47;
  border-color: rgba(255, 255, 255, .09);
}

.button.dark:hover {
  background: #464956;
}

.button.wide {
  width: 100%;
}

.editor-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 64px 344px minmax(520px, 1fr) 408px;
}

.tool-rail {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  padding-top: 18px;
  background: var(--rail);
  color: #8b9bb4;
}

.rail-item {
  min-height: 76px;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px 0;
  transition: background .18s ease, color .18s ease;
}

.rail-item svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-item:first-child svg {
  fill: currentColor;
  stroke: none;
}

.rail-item span {
  font-size: 13px;
  font-weight: 700;
}

.rail-item:hover {
  color: #ffffff;
  background: transparent;
}

.rail-item.active {
  color: #1c1e26;
  background: #f6f8fc;
  border-radius: 12px;
  margin: 0 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.library-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden auto;
  background: #232732;
  color: #ffffff;
  padding: 18px 18px 26px;
  scrollbar-color: #555966 transparent;
}

.panel-collapse {
  position: absolute;
  top: 82px;
  right: -18px;
  z-index: 2;
  width: 36px;
  height: 44px;
  border: 0;
  border-radius: 22px 0 0 22px;
  display: grid;
  place-items: center;
  background: #4c4f5b;
  color: #f6f8fc;
}

.panel-collapse svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-panel {
  display: none;
}

.tool-panel.active {
  display: block;
  animation: panelIn .18s ease both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-heading {
  margin: 0 0 12px;
}

.panel-heading.small {
  margin-top: 20px;
}

.panel-heading span {
  display: block;
  color: #b4bac8;
  font-size: 12px;
  margin-bottom: 2px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

.select-section-heading {
  margin: 12px 0 14px;
}

.select-section-heading.small-heading {
  margin-top: 26px;
}

.select-section-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.chip-row,
.tab-row,
.color-row,
.button-grid,
.audio-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-row {
  margin-bottom: 16px;
}

.chip-row.compact {
  gap: 6px;
}

.chip,
.tab {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  transition: background .18s ease, color .18s ease;
}

.chip.active, .tab.active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 5px 14px rgba(37, 117, 108, 0.24);
  border-color: transparent;
}

.template-list,
.background-list,
.upload-list,
.output-list,
.material-list,
.audio-list {
  display: grid;
  gap: 12px;
}

.template-card {
  position: relative;
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  box-shadow: 0 12px 24px rgba(7, 12, 18, .10);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.template-card:hover,
.template-card.active {
  transform: translateY(-2px);
  border-color: rgba(201, 145, 46, .86);
  box-shadow: 0 16px 34px rgba(7, 12, 18, .18);
}

.template-preview {
  position: absolute;
  inset: 0;
  background: #141c28;
}

.template-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 11, 18, .08) 0%, rgba(7, 11, 18, .12) 42%, rgba(7, 11, 18, .78) 100%);
}

.template-media {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background-position: center;
  background-size: cover;
  object-fit: cover;
}

.template-media-empty {
  background: linear-gradient(135deg, #202d3c, #32445b);
}

.template-info {
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.template-info strong,
.template-info span {
  display: block;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .38);
}

.template-info strong {
  font-size: 16px;
}

.template-info span {
  margin-top: 2px;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
}

.template-info em {
  min-width: 52px;
  min-height: 24px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: #3c2b02;
  background: #f4c15d;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.virtual-scene-head,
.my-human-head,
.voice-training-head {
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.virtual-scene-head strong,
.my-human-head strong,
.voice-training-head strong {
  color: #ffffff;
  font-size: 14px;
}

.virtual-scene-head span,
.my-human-head span,
.voice-training-head span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #14532d;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.virtual-scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.virtual-scene-card {
  min-height: 128px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-rows: 64px auto;
  gap: 7px;
  color: #ffffff;
  background: rgba(255, 255, 255, .04);
  text-align: left;
}

.virtual-scene-card:hover,
.virtual-scene-card.active {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .16);
}

.virtual-scene-thumb {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: var(--virtual-bg);
}

.virtual-scene-thumb::before {
  content: "";
  position: absolute;
  inset: 12px 16px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .74) 0 28%, transparent 29% 100%),
    linear-gradient(135deg, rgba(14, 165, 233, .22), rgba(34, 197, 94, .24));
  box-shadow: 0 8px 18px rgba(15, 23, 42, .15);
}

.virtual-scene-thumb em {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 26px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, .72);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.virtual-scene-card span:last-child {
  min-width: 0;
}

.virtual-scene-card strong,
.virtual-scene-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.virtual-scene-card strong {
  font-size: 13px;
}

.virtual-scene-card small {
  margin-top: 3px;
  color: #c4cad6;
  font-size: 11px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.asset-card,
.bg-card {
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.avatar-card {
  border: none;
  background: transparent;
  color: #ffffff;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: none;
  border-radius: 8px;
  transition: background .18s ease, transform .18s ease;
}

.scene-card {
  border: none;
  background: transparent;
  color: #ffffff;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: none;
}

.avatar-card:hover .avatar-face,
.scene-card:hover .scene-thumb {
  border-color: rgba(255, 255, 255, 0.28);
}

.avatar-card.active .avatar-face,
.scene-card.active .scene-thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 117, 108, 0.32), 0 10px 24px rgba(0, 0, 0, .18);
}

.avatar-card:hover,
.scene-card:hover {
  background: rgba(255, 255, 255, .06);
  transform: translateY(-1px);
}

.bg-card:hover,
.bg-card.active,
.asset-card:hover,
.asset-card.active {
  border-color: #4fc4d2;
  box-shadow: 0 0 0 2px rgba(79, 196, 210, .18);
}

.avatar-face {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4d2c5 0 52%, #1f2634 53% 100%);
  margin-bottom: 8px;
  border: 2px solid transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.avatar-face:after {
  content: "";
  position: absolute;
  left: 21px;
  bottom: 5px;
  width: 30px;
  height: 18px;
  border-radius: 50% 50% 45% 45%;
  background: #fff7ec;
}

.avatar-photo {
  border-radius: 10px;
  background-size: cover;
  background-position: center top;
  box-shadow: inset 0 -18px 24px rgba(0, 0, 0, .18);
}

.avatar-photo:after {
  display: none;
}

.avatar-card strong,
.avatar-card span,
.scene-card strong,
.scene-card span {
  display: block;
}

.avatar-card strong,
.scene-card strong {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  margin-top: 4px;
}

.avatar-card span,
.scene-card span {
  margin-top: 4px;
  color: #c4cad6;
  font-size: 12px;
}

.notice-box,
.status-box {
  margin: 16px 0 4px;
  border-radius: 8px;
  padding: 12px;
  color: #1a4e63;
  background: #f1fbff;
  line-height: 1.55;
  font-size: 13px;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.scene-thumb {
  width: 76px;
  height: 110px;
  border-radius: 7px;
  margin-bottom: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)),
    var(--scene-bg, linear-gradient(135deg, #d5e8f5, #ffffff));
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.scene-thumb .active-badge,
.avatar-face .active-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
  z-index: 2;
}

.scene-thumb .active-badge svg,
.avatar-face .active-badge svg {
  width: 12px;
  height: 12px;
}

.scene-thumb.scene-photo {
  background-size: cover;
  background-position: center;
}

.scene-thumb em {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(18, 22, 35, .72);
  font-size: 11px;
  font-style: normal;
}

.my-human-panel {
  display: grid;
  gap: 12px;
}

.my-human-dock {
  position: fixed;
  left: 8px;
  bottom: 18px;
  z-index: 72;
  width: 48px;
  min-height: 70px;
  border: 1px solid rgba(120, 146, 255, .42);
  border-radius: 12px;
  padding: 8px 5px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(45, 52, 75, .96), rgba(72, 63, 166, .94));
  box-shadow: 0 18px 38px rgba(7, 10, 26, .32);
  text-align: center;
  cursor: pointer;
}

.my-human-dock span {
  color: #bfe7ff;
  font-size: 12px;
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0;
}

.my-human-dock strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.my-human-dock em {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.my-human-overlay {
  position: fixed;
  inset: 0;
  z-index: 78;
  background: rgba(9, 13, 25, .36);
}

.my-human-drawer {
  position: fixed;
  left: 82px;
  bottom: 96px;
  z-index: 79;
  width: min(360px, calc(100vw - 104px));
  max-height: min(690px, calc(100vh - 112px));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  background: #232732;
  box-shadow: 0 28px 72px rgba(7, 10, 26, .38);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.my-human-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.my-human-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
}

.my-human-drawer-head span {
  color: #8bd9ff;
  font-size: 12px;
  font-weight: 900;
}

.my-human-drawer-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.my-human-drawer .my-human-panel {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.account-list,
.my-human-list,
.my-human-actions {
  display: grid;
  gap: 8px;
}

.account-row,
.my-human-row {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, .05);
  color: #ffffff;
}

.account-row strong,
.account-row small,
.my-human-row strong,
.my-human-row span {
  display: block;
}

.account-row small,
.my-human-row span {
  margin-top: 3px;
  color: #c4cad6;
  font-size: 12px;
}

.account-row em {
  min-width: 52px;
  border-radius: 999px;
  padding: 3px 7px;
  color: #075985;
  background: #e0f2fe;
  text-align: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.account-login {
  min-width: 66px;
  height: 30px;
  border: 1px solid rgba(14, 165, 233, .35);
  border-radius: 7px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
}

.account-login:hover {
  background: #bae6fd;
}

.account-login-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.account-admin-link {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(139, 92, 246, .35);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.my-human-list {
  margin-top: 8px;
}

.my-human-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.my-human-row > span,
.my-human-row > span strong,
.my-human-row > span span {
  display: block;
  min-width: 0;
}

.my-human-row .account-login {
  justify-self: end;
}

.my-human-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.my-human-actions .button {
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
}




.upload-card,
.upload-drop {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: #f8fbff;
  color: #1d2633;
  cursor: pointer;
}

.upload-card {
  min-height: 46px;
  margin-bottom: 14px;
}

.upload-drop {
  min-height: 154px;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}

.upload-card input,
.upload-drop input {
  display: none;
}

.background-toolbar {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.background-search {
  display: grid;
  gap: 6px;
}

.background-search span {
  color: #697386;
  font-size: 12px;
  font-weight: 700;
}

.background-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(21, 31, 45, .14);
  border-radius: 8px;
  padding: 0 12px;
  color: #172033;
  background: rgba(255, 255, 255, .88);
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.background-search input::placeholder {
  color: #94a0b2;
}

.background-search input:focus {
  border-color: rgba(201, 145, 46, .78);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(201, 145, 46, .13);
}

.background-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.background-filter {
  min-height: 30px;
  border: 1px solid rgba(21, 31, 45, .10);
  border-radius: 7px;
  padding: 0 10px;
  color: #4b5565;
  background: rgba(255, 255, 255, .66);
  font-size: 12px;
  font-weight: 700;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.background-filter:hover {
  transform: translateY(-1px);
  color: #172033;
  border-color: rgba(21, 31, 45, .18);
  background: #ffffff;
}

.background-filter.active {
  color: #111827;
  border-color: rgba(201, 145, 46, .95);
  background: #f4c15d;
}

.background-count {
  display: flex;
  align-items: center;
  min-height: 24px;
  color: #7a8597;
  font-size: 12px;
}

.upload-drop strong,
.upload-drop span {
  display: block;
}

.upload-drop span {
  margin-top: 5px;
  color: #617084;
  font-size: 12px;
}

.upload-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

#deletedAssetsBtn {
  position: relative;
  color: #263143;
  background: #edf2f7;
  border-color: #d9e2ee;
}

#deletedAssetsBtn.has-deleted {
  color: #ffffff;
  background: #5c6474;
}

#deletedAssetsCount {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  background: rgba(255, 255, 255, .22);
  font-size: 12px;
  font-weight: 900;
}

.restore-all-button {
  margin-bottom: 10px;
}

.restore-all-button[hidden] {
  display: none;
}

.deleted-asset-item {
  border-color: rgba(139, 92, 246, .24);
  background: #f8f6ff;
}

.deleted-asset-item .restore-asset {
  color: #ffffff;
  background: #6d5df6;
}

.empty-deleted {
  color: #42516a;
  background: #f8fbff;
}

.color-row {
  margin-bottom: 14px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  background: var(--swatch);
}

.bg-card {
  position: relative;
  min-height: 118px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #111827;
}

.bg-preview {
  position: absolute;
  inset: 0;
  display: block;
  background-color: #1f2937;
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
  transition: transform .22s ease, filter .22s ease;
}

.bg-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, .08) 0%, rgba(11, 18, 32, .18) 44%, rgba(11, 18, 32, .82) 100%),
    linear-gradient(90deg, rgba(11, 18, 32, .42), transparent 58%);
}

.bg-badges {
  position: absolute;
  top: 9px;
  left: 9px;
  right: 54px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.bg-badge,
.bg-selected-mark {
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  background: rgba(12, 18, 30, .54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.bg-selected-mark {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: none;
  color: #172033;
  border-color: rgba(244, 193, 93, .95);
  background: #f4c15d;
}

.bg-card.active {
  border-color: rgba(244, 193, 93, .95);
  box-shadow: 0 0 0 2px rgba(244, 193, 93, .24), 0 14px 28px rgba(9, 13, 24, .18);
}

.bg-card.active .bg-selected-mark {
  display: inline-flex;
}

.bg-card:hover .bg-preview,
.bg-card.active .bg-preview {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.03);
}

.bg-card strong {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: block;
  padding: 32px 12px 12px;
  color: #ffffff;
  font-size: 13px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.text-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.text-style {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--style-color);
  font-size: 20px;
  font-weight: 900;
  text-shadow: var(--style-shadow);
  animation: artistic-play-anim 2.5s infinite alternate ease-in-out;
}

.quick-stack {
  display: grid;
  gap: 10px;
}

.tab-row {
  margin-bottom: 10px;
}

.asset-section {
  display: none;
}

.asset-section.active {
  display: block;
}

.asset-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.asset-card {
  position: relative;
  min-height: 92px;
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  gap: 6px;
  color: #f8fbff;
  text-align: center;
  cursor: pointer;
}

.asset-card[hidden] {
  display: none;
}

.asset-thumb {
  position: relative;
  height: 68px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f4f6fa;
  overflow: hidden;
  color: #202630;
  font-weight: 900;
}

.image-asset-thumb {
  background-color: #101827;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -28px 36px rgba(9, 15, 28, .28);
}

.image-asset-thumb:before,
.image-asset-thumb:after {
  content: none;
}

.asset-thumb:before,
.asset-thumb:after {
  content: "";
  position: absolute;
}

.asset-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.thumb-laptop:before {
  left: 14px;
  right: 14px;
  top: 14px;
  height: 30px;
  border-radius: 4px;
  background: linear-gradient(180deg, #1f2634, #5f6d84);
}

.thumb-laptop:after {
  left: 9px;
  right: 9px;
  bottom: 16px;
  height: 8px;
  border-radius: 0 0 7px 7px;
  background: #c7cfdb;
}

.thumb-cup:before {
  width: 32px;
  height: 38px;
  border-radius: 6px 6px 15px 15px;
  background: #f6eee7;
  box-shadow: inset 0 10px 0 #c15e4a;
}

.thumb-cup:after {
  right: 17px;
  top: 29px;
  width: 17px;
  height: 17px;
  border: 4px solid #f6eee7;
  border-left: 0;
  border-radius: 0 12px 12px 0;
}

.thumb-arrow:before {
  width: 48px;
  height: 10px;
  border-radius: 99px;
  background: #f4c534;
  transform: rotate(-18deg);
}

.thumb-arrow:after {
  right: 19px;
  top: 18px;
  width: 20px;
  height: 20px;
  border-top: 10px solid #f4c534;
  border-right: 10px solid #f4c534;
  transform: rotate(27deg);
}

.thumb-question {
  color: #2279c9;
  font-size: 36px;
}

.thumb-badge {
  color: #b95110;
  background: #fff0c7;
}

.thumb-badge:before {
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 5px #f4c534 inset;
}

.thumb-badge:after {
  content: "推荐";
  position: absolute;
  font-size: 15px;
}

.audio-item,
.video-item,
.upload-item,
.output-item {
  position: relative;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  padding: 10px 42px 10px 12px;
  background: var(--panel);
  display: grid;
  gap: 4px;
  color: var(--ink);
  text-align: left;
}

.output-item {
  padding: 12px;
  border-color: rgba(37, 117, 108, .16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  box-shadow: 0 10px 24px rgba(18, 28, 38, .08);
}

.audio-item.active {
  border-color: rgba(124, 58, 237, .55);
  background: linear-gradient(180deg, rgba(245, 243, 255, .98), rgba(238, 242, 255, .98));
  box-shadow: 0 12px 26px rgba(79, 70, 229, .14);
}

.output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.output-head strong {
  min-width: 0;
  line-height: 1.35;
}

.status-chip {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 3px 7px;
  color: #115e59;
  background: rgba(20, 184, 166, .12);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.output-task {
  border-color: rgba(201, 145, 46, .30);
  background:
    linear-gradient(180deg, #fffaf0 0%, #fffefd 100%);
}

.output-task .status-chip {
  color: #7c4a03;
  background: rgba(201, 145, 46, .18);
}

.output-rendering {
  border-color: rgba(37, 117, 108, .34);
  background:
    linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
}

.output-rendering .status-chip {
  color: #115e59;
  background: rgba(20, 184, 166, .18);
}

.output-error {
  border-color: rgba(244, 63, 94, .30);
  background:
    linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.output-error .status-chip {
  color: #9f1239;
  background: rgba(244, 63, 94, .16);
}

.output-file .status-chip {
  color: #0f766e;
  background: rgba(20, 184, 166, .16);
}

.output-empty {
  color: #596579;
  background: #f8fafc;
  box-shadow: none;
}

.output-next {
  display: block;
  color: #7a5a18;
  line-height: 1.45;
  font-size: 12px;
}

.output-item .button {
  margin-top: 3px;
}

.asset-card .material-delete,
.audio-item .material-delete,
.video-item .material-delete,
.upload-item .material-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(18, 24, 38, .82);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px) scale(.92);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

.asset-card:hover .material-delete,
.asset-card:focus-within .material-delete,
.audio-item:hover .material-delete,
.audio-item:focus-within .material-delete,
.video-item:hover .material-delete,
.video-item:focus-within .material-delete,
.upload-item:hover .material-delete,
.upload-item:focus-within .material-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.material-delete:hover,
.material-delete:focus-visible {
  background: #e5484d;
  border-color: rgba(255, 255, 255, .72);
  outline: none;
}

.audio-item span,
.video-item span,
.upload-item span,
.output-item span {
  color: #b7bfce;
  font-size: 12px;
}

.upload-item.uploading {
  border-color: rgba(34, 199, 232, .36);
}

.upload-item.error {
  border-color: rgba(216, 52, 74, .42);
}

.upload-use {
  justify-self: start;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  padding: 3px 9px;
  color: #172033;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.stage-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr) 50px;
  background: var(--canvas-bg);
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.segmented {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6deea;
  border-radius: 7px;
  padding: 2px;
  background: #f5f8fc;
}

.segment {
  min-width: 58px;
  height: 31px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #596579;
}

.segment.active {
  color: #0e6592;
  background: #fff;
  box-shadow: 0 1px 6px rgba(30, 51, 80, .12);
}

.stage-area {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 44px 52px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(229, 236, 243, .92)),
    radial-gradient(rgba(16, 24, 32, 0.045) 1.2px, transparent 1.2px);
  background-size: auto, 20px 20px;
}

.canvas-page {
  position: relative;
  width: min(90vw, 1520px);
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 24px 54px -24px rgba(14, 30, 45, 0.34);
  overflow: hidden;
  transition: width .2s ease, aspect-ratio .2s ease;
}

.canvas-page.ratio-vertical {
  width: min(42vw, 760px);
  aspect-ratio: 9 / 16;
}

.canvas-page.ratio-square {
  width: min(62vw, 1200px);
  aspect-ratio: 1 / 1;
}

.canvas-bg {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  will-change: transform;
  transition: background .25s ease, opacity .25s ease;
}

.canvas-page.has-bg .canvas-bg {
  background: var(--active-bg);
}

.canvas-page.template-clean-view {
  border-color: rgba(30, 41, 59, .10);
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .06),
    0 24px 54px -28px rgba(34, 50, 84, .34);
}

.canvas-page.template-clean-view .canvas-bg {
  background-position: center;
  background-size: cover;
}

.canvas-page.template-clean-view .guide-frame,
.canvas-page.template-clean-view .canvas-watermark,
.canvas-page.template-clean-view .template-title,
.canvas-page.template-clean-view .template-ribbon,
.canvas-page.template-clean-view .subtitle-card,
.canvas-page.template-clean-view .digital-human {
  display: none !important;
}

.guide-frame {
  position: absolute;
  inset: 7.2% 6%;
  border: 1px dashed rgba(20, 24, 33, .10);
  pointer-events: none;
}

.canvas-logo {
    position: absolute;
    left: 32px;
    top: 24px;
    height: 44px;
    z-index: 10;
    pointer-events: none;
  }

  .canvas-watermark {
  display: none !important;
  position: absolute;
  right: 34px;
  top: 32px;
  color: rgba(20, 24, 33, .46);
  font-size: 13px;
  font-weight: 700;
  opacity: .7;
}

.template-title,
.template-ribbon,
.subtitle-card {
  position: absolute;
  z-index: 4;
  background: transparent;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.6);
  animation: artistic-play-anim 2.5s infinite alternate ease-in-out;
}

@keyframes artistic-play-anim {
  0% { filter: brightness(1) drop-shadow(0 2px 4px rgba(255,255,255,0.1)); transform: scale(1); }
  100% { filter: brightness(1.15) drop-shadow(0 4px 12px currentColor); transform: scale(1.02); }
}

.template-title {
  left: 25%;
  top: 8%;
  padding: 12px 20px;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
}

.template-ribbon {
  min-width: 154px;
  padding: 9px 16px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(17px, 2.1vw, 24px);
}

.ribbon-one {
  left: 20%;
  top: 39%;
  transform: rotate(3deg);
}

.ribbon-two {
  right: 20%;
  top: 34%;
  transform: rotate(-5deg);
}

.ribbon-three {
  left: 38%;
  bottom: 31%;
  transform: rotate(-1deg);
}

.subtitle-card {
  left: 50%;
  bottom: 6.2%;
  width: min(62%, 360px);
  transform: translateX(-50%);
  padding:  12px 18px 24px;
  text-align: center;
  font-size: clamp(14px, 1.9vw, 18px);
  line-height: 1.52;
  background: rgba(36, 41, 52, .88);
}

.subtitle-card.style-white {
  color: #0f4f7a;
  background: rgba(255, 255, 255, .94);
}

.subtitle-card.style-yellow {
  color: #3e2c00;
  background: rgba(255, 215, 94, .94);
}

.subtitle-card mark {
  border-radius: 4px;
  padding: 1px 4px;
  color: #171b25;
  background: #ffd85d;
}

.digital-human {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 13%;
  width: 96px;
  height: 208px;
  transform: translateX(-50%) scale(1);
  transform-origin: bottom center;
  transition: transform .24s ease, left .24s ease, bottom .24s ease;
}

.digital-human.fit-half {
  bottom: -9%;
  transform: translateX(-50%) scale(1.34);
}

.digital-human.fit-close {
  bottom: -34%;
  transform: translateX(-50%) scale(1.74);
}

.digital-human.scene-right {
  left: 72%;
}

.digital-human.scene-left {
  left: 31%;
}

.digital-human.has-human-media {
  width: 168px;
  height: 248px;
  background-image: var(--human-media);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  filter: drop-shadow(0 18px 22px rgba(35, 41, 54, .26));
}

.digital-human.has-human-media .human-head,
.digital-human.has-human-media .human-neck,
.digital-human.has-human-media .human-body,
.digital-human.has-human-media .human-arm,
.digital-human.has-human-media .human-leg {
  opacity: 0;
}

.human-preview-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.timeline-is-playing .digital-human.has-preview-video .human-preview-video {
  opacity: 1;
}

.human-head,
.human-neck,
.human-body,
.human-arm,
.human-leg {
  position: absolute;
  display: block;
}

.human-head {
  left: 29px;
  top: 0;
  width: 39px;
  height: 48px;
  border-radius: 50%;
  background: var(--skin, #efc6b8);
  box-shadow: inset 11px -9px 0 var(--hair, #1c2330);
}

.human-neck {
  left: 42px;
  top: 44px;
  width: 13px;
  height: 15px;
  background: var(--skin, #efc6b8);
}

.human-body {
  left: 21px;
  top: 55px;
  width: 55px;
  height: 78px;
  border-radius: 22px 22px 9px 9px;
  background: var(--shirt, #fff7ec);
  box-shadow: inset 0 -22px 0 var(--bottom, #9e8051);
}

.human-arm {
  top: 66px;
  width: 17px;
  height: 72px;
  border-radius: 999px;
  background: var(--shirt, #fff7ec);
}

.human-arm.left {
  left: 9px;
  transform: rotate(-12deg);
}

.human-arm.right {
  right: 8px;
  transform: rotate(12deg);
}

.human-leg {
  top: 127px;
  width: 17px;
  height: 72px;
  border-radius: 0 0 10px 10px;
  background: var(--bottom, #9e8051);
}

.human-leg.left {
  left: 31px;
}

.human-leg.right {
  right: 31px;
}

.canvas-assets-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.timeline-out-of-range {
  display: none !important;
}

.canvas-item {
  position: absolute;
  min-width: 78px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #1a1f2b;
  background: #fff;
  font-weight: 900;
  pointer-events: auto;
  box-shadow: 0 10px 24px rgba(12, 18, 28, .18);
  transition: transform .18s ease, outline-color .18s ease;
}

.canvas-item:hover,
.canvas-item.active {
  outline: 2px solid #1f9bb4;
  outline-offset: 3px;
}

.canvas-item.asset-arrow {
  width: 108px;
  height: 34px;
  background: transparent;
  box-shadow: none;
}

.canvas-item.asset-arrow:before {
  content: "";
  width: 86px;
  height: 12px;
  border-radius: 99px;
  background: #f4c534;
}

.canvas-item.asset-arrow:after {
  content: "";
  position: absolute;
  right: 9px;
  width: 25px;
  height: 25px;
  border-top: 12px solid #f4c534;
  border-right: 12px solid #f4c534;
  transform: rotate(45deg);
}

.canvas-item.asset-question,
.canvas-item.asset-badge {
  padding: 0 14px;
}

.canvas-item.asset-badge {
  color: #553800;
  background: #ffd966;
}

.canvas-item.uploaded-image {
  width: 118px;
  height: 74px;
  padding: 0;
  background-color: var(--ink);
  background-repeat: no-repeat;
  border: 2px solid rgba(255, 255, 255, .9);
}

.canvas-item.asset-laptop {
  background: linear-gradient(#202838 0 70%, #cfd7e4 71%);
}

.canvas-item.asset-cup {
  min-width: 44px;
  border-radius: 8px 8px 17px 17px;
  background: #f6eee7;
  box-shadow: inset 0 11px 0 #c15e4a, 0 10px 24px rgba(12, 18, 28, .18);
}

body.render-capture-mode #selectionBox,
body.render-capture-mode .selection-box,
body.render-capture-mode .snap-guide,
body.render-capture-mode .guide-frame,
body.render-capture-mode .focus-handle {
  display: none !important;
}

body.render-capture-mode .canvas-item.active,
body.render-capture-mode .canvas-item:hover {
  outline: none !important;
}

.focus-handle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 70px;
  height: 4px;
  border-radius: 99px;
  background: rgba(20, 24, 33, .12);
}

.timeline-bar {
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.2);
}

.time-readout {
  color: #4f46d8;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.play-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #5b58df;
}

.play-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.timeline-track {
  position: relative;
  height: 34px;
  border-radius: 8px;
  background: #eef2f8;
  overflow: hidden;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(31, 155, 180, .16);
  transition: width .2s ease;
}

.clip {
  position: absolute;
  top: 7px;
  height: 20px;
  border-radius: 5px;
  padding: 2px 9px;
  color: var(--ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.clip-avatar {
  left: 4%;
  width: 28%;
  background: var(--panel);
}

.clip-text {
  left: 36%;
  width: 34%;
  background: #5764c9;
}

.clip-audio {
  left: 74%;
  width: 21%;
  background: #c48824;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2f3543;
  font-size: 13px;
  white-space: nowrap;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle span {
  width: 34px;
  height: 18px;
  border-radius: 99px;
  background: #c7ceda;
  position: relative;
}

.toggle span:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}

.toggle input:checked + span {
  background: var(--panel);
}

.toggle input:checked + span:before {
  transform: translateX(16px);
}

.keyword-button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 11px;
  color: #5140c6;
  background: #eef0ff;
}

.inspector-panel {
  background: var(--panel);
  color: var(--ink);
  border-left: 1px solid var(--line);
}

.inspector-tabs {
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.inspector-tab {
  height: 50px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
}

.inspector-tab.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 900;
}

.inspector-section {
  display: none;
  padding-top: 20px;
}

.inspector-section.active {
  display: block;
  animation: panelIn .18s ease both;
}

.form-grid {
  display: grid;
  gap: 13px;
  margin-bottom: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
textarea,
input[type="text"],
input[type="range"] {
  width: 100%;
}

select,
textarea,
input[type="text"] {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
}

select {
  min-height: 40px;
  padding: 0 10px;
}

textarea {
  min-height: 330px;
  resize: vertical;
  padding: 13px;
  line-height: 1.75;
  font-size: 16px;
}

.helper-text {
  margin: -5px 0 14px;
  color: #7b8798;
  font-size: 12px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.inspector-panel .button.secondary {
  color: var(--ink);
  background: var(--panel-2);
  border-color: var(--line);
}

.inspector-panel .button.primary {
  color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: var(--soft-shadow);
}

.checklist-card {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
}

.checklist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.checklist-head span {
  color: var(--muted);
  font-size: 12px;
}

.checklist {
  display: grid;
  gap: 9px;
}

.check-item {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  background: var(--panel-2);
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c5cfdd;
  margin-top: 2px;
}

.check-item.done .check-dot {
  border-color: var(--success);
  box-shadow: inset 0 0 0 4px #fff;
  background: var(--success);
}

.check-item strong,
.check-item span {
  display: block;
}

.check-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.voice-card {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  background: var(--surface);
}

.voice-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #1f9bb4, #167f95),
    #1f9bb4;
  box-shadow: inset -8px -7px 0 rgba(10, 30, 42, .20);
}

.voice-card strong,
.voice-card small {
  display: block;
}

.voice-card small {
  margin-top: 4px;
  color: var(--muted);
}

.tts-engine-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tts-engine-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tts-engine-tabs button strong,
.tts-engine-tabs button span {
  display: block;
}

.tts-engine-tabs button span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.tts-engine-tabs button.active {
  border-color: rgba(14, 165, 233, .55);
  background: linear-gradient(180deg, rgba(14, 165, 233, .10), #fff);
  box-shadow: 0 8px 18px rgba(14, 165, 233, .12);
}

.voice-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.voice-library-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.voice-library {
  display: grid;
  gap: 8px;
  max-height: 238px;
  margin-bottom: 16px;
  padding-right: 4px;
  overflow: auto;
}

.voice-option {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: #fff;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.voice-option:hover,
.voice-option:focus-visible {
  border-color: rgba(14, 165, 233, .42);
  outline: none;
}

.voice-option.active {
  border-color: var(--accent);
  background: rgba(139, 92, 246, .06);
  box-shadow: inset 3px 0 0 var(--accent);
}

.voice-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0f766e;
  font-weight: 700;
  background: #d7f7ef;
}

.voice-option-copy {
  min-width: 0;
}

.voice-option-copy strong,
.voice-option-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-option-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.voice-preview-btn {
  min-width: 48px;
  height: 30px;
  border: 1px solid rgba(14, 165, 233, .35);
  border-radius: 7px;
  color: #0369a1;
  background: rgba(14, 165, 233, .08);
}

.voice-preview-btn:hover {
  background: rgba(14, 165, 233, .15);
}

.voice-training-card {
  margin: 6px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.voice-training-card .voice-training-head {
  margin: 0 0 10px;
}

.voice-training-card .voice-training-head strong {
  color: var(--ink);
}

.voice-sample-drop {
  min-height: 74px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  place-items: center;
  color: var(--ink);
  background: #ffffff;
  text-align: center;
  cursor: pointer;
}

.voice-sample-drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.voice-sample-drop strong,
.voice-sample-drop span {
  display: block;
}

.voice-sample-drop span {
  color: var(--muted);
  font-size: 12px;
}

.voice-training-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.voice-training-actions .button {
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

.voice-training-status {
  margin-top: 10px;
  border-radius: 8px;
  padding: 9px 10px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 800;
}

.voice-training-status.synced {
  color: #166534;
  background: #dcfce7;
}

.range-row {
  margin-bottom: 18px;
}

.range-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-row b {
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  accent-color: var(--accent);
}

.quick-adjust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -8px 0 16px;
}

.quick-adjust button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.quick-adjust button.active {
  border-color: rgba(139, 92, 246, .45);
  color: var(--accent-dark);
  background: rgba(139, 92, 246, .08);
}

.audio-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.status-box {
  color: var(--accent-dark);
  border: 1px solid var(--accent-soft);
  background: rgba(14, 165, 233, 0.05);
}

.param-list {
  display: grid;
  gap: 10px;
}

.support-suite,
.watermark-proof-card,
.support-proof-grid,
.course-board-style-panel,
.course-board-style-grid,
.license-proof-list {
  display: grid;
  gap: 10px;
}

.support-suite {
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .05);
}

.support-suite-head,
.watermark-proof-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.support-suite-head strong {
  color: #ffffff;
}

.support-suite-head span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #14532d;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.competition-controls {
  margin-top: 12px;
}

.competition-controls label span b {
  float: right;
  color: var(--accent-dark);
}

.watermark-proof-card,
.support-proof-card,
.license-proof-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
}

.watermark-proof-card {
  margin: 12px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.watermark-proof-card strong,
.watermark-proof-card span,
.support-proof-card strong,
.support-proof-card span,
.support-proof-card small,
.license-proof-item strong,
.license-proof-item span {
  display: block;
}

.watermark-proof-card span,
.support-proof-card span,
.support-proof-card small,
.license-proof-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.watermark-proof-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.support-proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.support-proof-card strong {
  color: var(--ink);
  font-size: 13px;
}

.support-proof-card em {
  display: inline-block;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #075985;
  background: #e0f2fe;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.course-board-style-panel {
  margin-bottom: 12px;
}

.mini-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-section-head strong {
  color: var(--ink);
  font-size: 13px;
}

.mini-section-head span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #075985;
  background: #e0f2fe;
  font-size: 11px;
  font-weight: 900;
}

.course-board-style-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-board-style {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.course-board-style:hover,
.course-board-style.active {
  border-color: rgba(36, 139, 232, .55);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.course-board-style strong,
.course-board-style span,
.course-board-style em {
  display: block;
}

.course-board-style strong {
  font-size: 13px;
}

.course-board-style span,
.course-board-style em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.license-proof-list {
  margin-bottom: 12px;
}

.license-proof-item {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.license-proof-item em {
  border-radius: 999px;
  padding: 3px 8px;
  color: #92400e;
  background: #fffbeb;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

@keyframes watermark-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.canvas-watermark.watermark-floating {
  animation: watermark-float 2.4s ease-in-out infinite;
}

.canvas-page.template-clean-view .template-title,
.canvas-page.template-clean-view .template-ribbon,
.canvas-page.template-clean-view .subtitle-card,
.canvas-page.template-clean-view .digital-human,
.canvas-page.template-clean-view .canvas-watermark,
.canvas-page.template-clean-view .guide-frame {
  display: none;
}

.param-list div {
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
}

.param-list strong,
.param-list span {
  display: block;
}

.param-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.video-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 30px;
}

.video-preview-modal.show {
  display: grid;
}

.video-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 13, 24, .64);
  backdrop-filter: blur(10px);
}

.video-preview-dialog {
  --preview-ratio: 16 / 9;
  --preview-ratio-number: 1.77778;
  position: relative;
  width: min(1120px, calc(100vw - 60px), calc((100dvh - 210px) * var(--preview-ratio-number)));
  max-height: calc(100dvh - 60px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
}

.admin-body {
  --admin-primary: hsl(243, 75%, 59%);
  --admin-primary-hover: hsl(243, 75%, 54%);
  --admin-primary-light: hsl(243, 75%, 96%);
  --admin-success: hsl(142, 71%, 45%);
  --admin-success-light: hsl(142, 60%, 95%);
  --admin-danger: hsl(350, 89%, 60%);
  --admin-danger-light: hsl(350, 80%, 96%);
  --admin-warning: hsl(38, 92%, 50%);
  --admin-warning-light: hsl(38, 90%, 96%);
  --admin-slate-50: #f8fafc;
  --admin-slate-100: #f1f5f9;
  --admin-slate-200: #e2e8f0;
  --admin-slate-300: #cbd5e1;
  --admin-slate-400: #94a3b8;
  --admin-slate-500: #64748b;
  --admin-slate-600: #475569;
  --admin-slate-700: #334155;
  --admin-slate-800: #1e293b;
  --admin-slate-900: #0f172a;
  --admin-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 10px 15px -3px rgba(0, 0, 0, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
  --admin-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --admin-border: 1px solid rgba(226, 232, 240, 0.8);

  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  overflow-y: auto;
  background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
              #f8fafc;
  color: var(--admin-slate-800);
}

.admin-shell {
  max-width: 100%;
  padding: 0;
  animation: adminFadeIn 0.5s ease-out;
}

@keyframes adminFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-topbar {
  min-height: 54px;
  border-radius: 0;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--admin-slate-900) 0%, #1e1e38 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.admin-topbar::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 0 0, rgba(99, 102, 241, 0.12), transparent 50%);
  pointer-events: none;
}

.admin-topbar > div:first-child {
  z-index: 1;
}

.admin-topbar span {
  display: inline-block;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.admin-topbar h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0;
}

.admin-actions {
  display: flex;
  gap: 12px;
  z-index: 1;
}

.admin-body .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  gap: 4px;
  text-decoration: none;
}

.admin-body .button.primary {
  background: var(--admin-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.admin-body .button.primary:hover {
  background: var(--admin-primary-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.admin-body .button.primary:active {
  transform: translateY(0);
}

.admin-body .button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-body .button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1.5px);
}

.admin-body .button.secondary:active {
  transform: translateY(0);
}

.admin-panel .button.secondary {
  background: #ffffff;
  color: var(--admin-slate-700);
  border: 1px solid var(--admin-slate-200);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-panel .button.secondary:hover {
  background: var(--admin-slate-50);
  color: var(--admin-slate-900);
  border-color: var(--admin-slate-300);
  transform: translateY(-1.5px);
}

.admin-panel .button.secondary:active {
  transform: translateY(0);
}

.admin-layout {
  padding: 12px 24px;
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(540px, 1.25fr);
  gap: 14px;
  align-items: start;
}

.admin-panel {
  border: var(--admin-border);
  border-radius: 12px;
  padding: 10px 16px;
  background: #ffffff;
  box-shadow: var(--admin-card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-panel:hover {
  box-shadow: var(--admin-hover-shadow);
  transform: translateY(-2px);
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--admin-slate-100);
  padding-bottom: 6px;
}

.admin-panel-head span {
  display: block;
  color: var(--admin-slate-400);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.admin-panel-head h2 {
  color: var(--admin-slate-900);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.admin-panel-head em {
  font-style: normal;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

#publishState.published {
  color: var(--admin-success);
  background: var(--admin-success-light);
  border-color: rgba(34, 197, 94, 0.15);
}

#publishState.draft {
  color: var(--admin-warning);
  background: var(--admin-warning-light);
  border-color: rgba(245, 158, 11, 0.15);
}

#accountCount {
  color: var(--admin-primary);
  background: var(--admin-primary-light);
  border-color: rgba(99, 102, 241, 0.15);
}

.admin-field {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.admin-field span {
  color: var(--admin-slate-600);
  font-size: 13px;
  font-weight: 600;
}

.admin-field input[type="text"],
.admin-field input[type="number"],
.admin-field textarea,
.admin-field select,
.admin-account-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--admin-slate-800);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.admin-field input[type="text"]:hover,
.admin-field input[type="number"]:hover,
.admin-field textarea:hover,
.admin-field select:hover,
.admin-account-row select:hover {
  border-color: var(--admin-slate-300);
}

.admin-field input[type="text"]:focus,
.admin-field input[type="number"]:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.admin-account-row select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Custom styled select with chevron icon */
.admin-field select,
.admin-account-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
}

.admin-switch-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-switch {
  position: relative;
  min-height: 34px;
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.admin-switch:hover {
  border-color: var(--admin-slate-300);
  background: var(--admin-slate-50);
}

.admin-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-switch .switch-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: var(--admin-slate-300);
  border-radius: 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.admin-switch .switch-slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.admin-switch input:checked + .switch-slider {
  background-color: var(--admin-primary);
}

.admin-switch input:checked + .switch-slider::before {
  transform: translateX(16px);
}

.admin-switch .switch-label {
  font-size: 13px;
  color: var(--admin-slate-700);
  transition: color 0.2s ease;
}

.admin-switch input:checked ~ .switch-label {
  color: var(--admin-slate-900);
  font-weight: 700;
}

.admin-switch:has(input:checked) {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--admin-primary-light);
}

.admin-proof-card {
  margin-top: 10px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--admin-primary-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.admin-proof-card::before {
  content: '';
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.admin-proof-card strong {
  color: var(--admin-primary);
  font-size: 14px;
  font-weight: 700;
  display: block;
}

.admin-proof-card span {
  color: var(--admin-slate-600);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 0;
  display: block;
}

.admin-assurance-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-assurance-card > div {
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.admin-assurance-card strong {
  display: block;
  color: var(--admin-primary);
  font-size: 14px;
}

.admin-assurance-card span {
  display: block;
  margin-top: 4px;
  color: var(--admin-slate-500);
  font-size: 11px;
  line-height: 1.4;
}

.assurance-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.assurance-items span {
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 8px;
  background: var(--admin-slate-50);
}

.assurance-items b,
.assurance-items small,
.assurance-items em {
  display: block;
}

.assurance-items b {
  color: var(--admin-slate-800);
  font-size: 12px;
}

.assurance-items small {
  margin-top: 3px;
  color: var(--admin-slate-500);
  font-size: 10px;
  line-height: 1.35;
}

.assurance-items em {
  margin-top: 4px;
  color: var(--admin-success);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.clone-service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.clone-service-row {
  border: 1px solid var(--admin-slate-200);
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
  align-items: center;
}

.clone-service-row strong {
  display: block;
  color: var(--admin-slate-800);
  font-size: 13px;
}

.clone-service-row small {
  display: block;
  margin-top: 5px;
  color: var(--admin-slate-500);
  font-size: 11px;
  line-height: 1.45;
}

.admin-panel-wide {
  grid-column: 1 / -1;
}

.account-admin-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.admin-mini-field {
  display: grid;
  gap: 6px;
  min-width: 128px;
}

.admin-mini-field span {
  color: var(--admin-slate-500);
  font-size: 12px;
  font-weight: 700;
}

.admin-mini-field input {
  height: 30px;
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
}

.template-admin-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.template-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.template-admin-form .admin-field {
  margin-bottom: 0;
}

.template-admin-form .template-script-field {
  grid-column: 1 / -1;
}

.template-admin-form textarea {
  min-height: 88px;
  padding: 9px 10px;
  line-height: 1.45;
  resize: vertical;
}

.template-admin-form .button {
  justify-self: start;
  min-width: 128px;
}

.template-admin-list {
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 6px;
}

.admin-template-row {
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: #ffffff;
}

.admin-template-row strong,
.admin-template-row small {
  display: block;
}

.admin-template-row strong {
  color: var(--admin-slate-800);
  font-size: 13px;
  font-weight: 800;
}

.admin-template-row small {
  margin-top: 4px;
  color: var(--admin-slate-500);
  font-size: 11px;
  line-height: 1.4;
}

.admin-empty-state {
  min-height: 120px;
  border: 1px dashed var(--admin-slate-200);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--admin-slate-400);
  font-size: 13px;
  font-weight: 700;
  background: var(--admin-slate-50);
}

.button.secondary.danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.18);
  background: #fff7f7;
}

.license-admin-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 1400px) {
  .license-admin-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.license-admin-group {
  border: 1px solid var(--admin-slate-200);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.license-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.license-admin-head strong {
  color: var(--admin-slate-800);
  font-size: 14px;
  font-weight: 700;
}

.license-admin-head em {
  color: var(--admin-primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.license-admin-record {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid var(--admin-slate-100);
}

.license-admin-record input[type="text"],
.license-admin-record > input {
  grid-column: 1 / -1;
  height: 32px;
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}

.license-admin-record .button {
  position: relative;
  min-height: 30px;
  height: 30px;
  font-size: 11px;
  padding: 0 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.license-admin-record .button input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.license-record-status {
  grid-column: 1 / -1;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--admin-slate-500);
  background: var(--admin-slate-100);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.license-record-status.is-complete {
  color: var(--admin-success);
  background: var(--admin-success-light);
}

.license-admin-record small {
  grid-column: 1 / -1;
  color: var(--admin-slate-400);
  font-size: 10px;
  word-break: break-all;
  margin-top: 2px;
}

.admin-table {
  display: grid;
  gap: 12px;
}

#accountTable {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
}

.audit-list {
  display: grid;
  gap: 12px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Premium Scrollbar */
#accountTable::-webkit-scrollbar,
.audit-list::-webkit-scrollbar {
  width: 6px;
}
#accountTable::-webkit-scrollbar-track,
.audit-list::-webkit-scrollbar-track {
  background: transparent;
}
#accountTable::-webkit-scrollbar-thumb,
.audit-list::-webkit-scrollbar-thumb {
  background: var(--admin-slate-200);
  border-radius: 4px;
}
#accountTable::-webkit-scrollbar-thumb:hover,
.audit-list::-webkit-scrollbar-thumb:hover {
  background: var(--admin-slate-300);
}

.admin-account-row {
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 92px;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.admin-account-row:hover {
  border-color: var(--admin-slate-300);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transform: translateY(-0.5px);
}

.admin-account-row strong {
  color: var(--admin-slate-800);
  font-size: 13px;
  font-weight: 700;
  display: block;
}

.admin-account-row small {
  display: block;
  margin-top: 3px;
  color: var(--admin-slate-500);
  font-size: 11px;
  line-height: 1.3;
}

.admin-account-row select.status-active,
.admin-account-row select.status-inactive {
  height: 30px;
  font-size: 12px;
  padding: 0 8px;
}

.audit-item {
  border-left: 3px solid var(--admin-primary);
  border-top: 1px solid var(--admin-slate-100);
  border-right: 1px solid var(--admin-slate-100);
  border-bottom: 1px solid var(--admin-slate-100);
  border-radius: 6px;
  padding: 6px 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.2s ease;
}

.audit-item:hover {
  background: var(--admin-slate-50);
}

.audit-item strong {
  font-size: 13px;
  color: var(--admin-slate-800);
  font-weight: 700;
  display: block;
}

.audit-item span {
  font-size: 11px;
  color: var(--admin-slate-500);
  display: block;
  margin-top: 2px;
}

/* 8.1 Software Assurance Card Styles */
#softwareAssuranceCard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#softwareAssuranceCard strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-slate-800);
  display: block;
}
#softwareAssuranceCard span {
  font-size: 11px;
  color: var(--admin-slate-500);
  display: block;
  margin-top: 2px;
}
.assurance-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.assurance-items span {
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--admin-slate-50);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.assurance-items b {
  font-size: 12px;
  color: var(--admin-slate-800);
  font-weight: 700;
  display: block;
}
.assurance-items small {
  font-size: 10px;
  color: var(--admin-slate-500);
  line-height: 1.3;
  display: block;
}
.assurance-items em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: var(--admin-success);
  background: var(--admin-success-light);
  border: 1px solid rgba(34, 197, 94, 0.12);
  padding: 1px 4px;
  border-radius: 4px;
  align-self: start;
  margin-top: 2px;
}

/* 8.3.1 Clone Service List Styles */
.clone-service-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}
.clone-service-list::-webkit-scrollbar {
  width: 6px;
}
.clone-service-list::-webkit-scrollbar-track {
  background: transparent;
}
.clone-service-list::-webkit-scrollbar-thumb {
  background: var(--admin-slate-200);
  border-radius: 4px;
}
.clone-service-list::-webkit-scrollbar-thumb:hover {
  background: var(--admin-slate-300);
}
.clone-service-row {
  border: 1px solid var(--admin-slate-200);
  border-radius: 8px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  transition: all 0.2s ease;
}
.clone-service-row:hover {
  border-color: var(--admin-slate-300);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transform: translateY(-0.5px);
}
.clone-service-row strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-slate-800);
  display: block;
}
.clone-service-row small {
  font-size: 11px;
  color: var(--admin-slate-500);
  display: block;
  margin-top: 3px;
  line-height: 1.3;
}
.clone-service-row select.status-select {
  height: 30px;
  font-size: 12px;
  padding: 0 8px;
  background-color: var(--admin-slate-100);
  color: var(--admin-slate-600);
  border-color: var(--admin-slate-200);
  font-weight: 700;
}
.clone-service-row select.status-active {
  background-color: var(--admin-success-light);
  color: var(--admin-success);
  border-color: rgba(34, 197, 94, 0.2);
}

.capture-portal-line {
  color: var(--admin-slate-700) !important;
}

.capture-portal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.capture-portal-actions em,
.capture-portal-actions a {
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.capture-portal-actions em {
  color: #075985;
  background: #e0f2fe;
}

.capture-portal-actions a {
  color: #155e75;
  text-decoration: none;
  background: #cffafe;
}

.capture-top-button {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(14, 165, 233, .38);
}

.capture-entry-row {
  min-height: 58px;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  background: rgba(8, 47, 73, .68);
}

.capture-entry-row strong,
.capture-entry-row small {
  display: block;
}

.capture-entry-row small {
  margin-top: 4px;
  color: #bae6fd;
  font-size: 12px;
  line-height: 1.35;
}

.capture-modal {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 22px;
}

.capture-modal[hidden] {
  display: none;
}

.capture-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 13, 23, .52);
}

.capture-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  padding: 18px;
  overflow: auto;
  background: #eef5f8;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .28);
}

.capture-dialog-head {
  min-height: 150px;
  border-radius: 8px;
  padding: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(12, 74, 110, .92), rgba(15, 118, 110, .72)),
    url("./assets/backgrounds/bg-studio-blue.jpg") center / cover;
}

.capture-dialog-head span {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 900;
}

.capture-dialog-head h2 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: 0;
}

.capture-dialog-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.capture-dialog-actions em {
  min-width: 72px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 8px;
  padding: 8px 10px;
  color: #e0f2fe;
  background: rgba(8, 47, 73, .46);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.capture-modal[data-state="ready"] .capture-dialog-actions em {
  color: #064e3b;
  background: #a7f3d0;
  border-color: rgba(167, 243, 208, .75);
}

.capture-modal[data-state="done"] .capture-dialog-actions em {
  color: #064e3b;
  background: #a7f3d0;
  border-color: rgba(167, 243, 208, .75);
}

.capture-modal[data-state="busy"] .capture-dialog-actions em {
  color: #713f12;
  background: #fef3c7;
  border-color: rgba(253, 230, 138, .9);
}

.capture-modal[data-state="error"] .capture-dialog-actions em {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: rgba(252, 165, 165, .85);
}

.capture-demo-rail {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.capture-demo-rail span {
  position: relative;
  min-height: 36px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 8px;
  padding: 9px 10px 9px 28px;
  color: #155e75;
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.capture-demo-rail span::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
  transform: translateY(-50%);
}

.capture-demo-rail span[data-state="ready"],
.capture-demo-rail span[data-state="done"] {
  color: #065f46;
  border-color: rgba(20, 184, 166, .32);
  background: #d1fae5;
}

.capture-demo-rail span[data-state="ready"]::before,
.capture-demo-rail span[data-state="done"]::before {
  background: #10b981;
}

.capture-demo-rail span[data-state="busy"] {
  color: #713f12;
  border-color: rgba(245, 158, 11, .35);
  background: #fef3c7;
}

.capture-demo-rail span[data-state="busy"]::before {
  background: #f59e0b;
}

.capture-demo-rail span[data-state="error"] {
  color: #7f1d1d;
  border-color: rgba(248, 113, 113, .34);
  background: #fee2e2;
}

.capture-demo-rail span[data-state="error"]::before {
  background: #ef4444;
}

.background-music-dialog {
  width: min(620px, calc(100vw - 32px));
}

.background-music-head {
  min-height: 118px;
}

.background-music-toolbar {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: stretch;
  margin: 18px 0;
}

.background-music-upload {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(20, 184, 166, .28);
  background: #0f8f83;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.background-music-upload input {
  display: none;
}

.background-music-toolbar .status-box {
  margin: 0;
  display: flex;
  align-items: center;
}

.background-music-list {
  display: grid;
  gap: 10px;
  max-height: min(390px, calc(100vh - 330px));
  overflow: auto;
  padding-right: 6px;
}

.background-music-item {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
}

.background-music-item.active {
  border-color: rgba(124, 58, 237, .58);
  background: linear-gradient(180deg, #f7f5ff, #ffffff);
}

.background-music-meta {
  display: grid;
  gap: 5px;
}

.background-music-meta strong {
  color: #132036;
  font-size: 15px;
}

.background-music-meta small,
.background-music-empty {
  color: #64748b;
  font-size: 13px;
}

.background-music-empty {
  padding: 18px;
  border: 1px dashed rgba(100, 116, 139, .36);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.capture-body {
  min-height: 100vh;
  margin: 0;
  color: #142033;
  background: #eef5f8;
}

.capture-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.capture-hero {
  min-height: 260px;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  align-content: end;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(12, 74, 110, .92), rgba(15, 118, 110, .72)),
    url("./assets/backgrounds/bg-studio-blue.jpg") center / cover;
}

.capture-back-link {
  width: fit-content;
  margin-bottom: 42px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 6px;
  padding: 8px 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.capture-hero span {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 900;
}

.capture-hero h1 {
  max-width: 360px;
  margin: 8px 0;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.capture-hero p {
  max-width: 680px;
  margin: 0;
  color: #e0f2fe;
  line-height: 1.75;
}

.capture-status-card {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.capture-status-card > div,
.capture-task-card {
  border: 1px solid #d8e5ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.capture-status-card > div {
  padding: 16px;
}

.capture-status-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.capture-status-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 20px;
}

.capture-status-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.capture-status-card > div[data-state="ready"],
.capture-status-card > div[data-state="done"],
.capture-task-card[data-state="done"] {
  border-color: rgba(20, 184, 166, .32);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.capture-task-card[data-state="busy"] {
  border-color: rgba(245, 158, 11, .38);
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.capture-task-card[data-state="error"] {
  border-color: rgba(248, 113, 113, .42);
  background: linear-gradient(180deg, #fef2f2, #ffffff);
}

.capture-task-card[data-state="done"] .capture-task-head span {
  color: #ffffff;
  background: #0f766e;
}

.capture-task-card[data-state="busy"] .capture-task-head span {
  color: #713f12;
  background: #fef3c7;
}

.capture-task-card[data-state="error"] .capture-task-head span {
  color: #7f1d1d;
  background: #fee2e2;
}

.capture-proof-strip {
  margin: -2px 0 14px;
  display: grid;
  grid-template-columns: .9fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.capture-proof-strip strong,
.capture-proof-strip span {
  min-height: 38px;
  border: 1px solid rgba(14, 165, 233, .2);
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #155e75;
  background: rgba(236, 254, 255, .78);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.capture-proof-strip strong {
  justify-content: flex-start;
  color: #0f172a;
  background: #ffffff;
}

.capture-modal[data-state="ready"] .capture-proof-strip span {
  color: #065f46;
  border-color: rgba(20, 184, 166, .28);
  background: rgba(209, 250, 229, .85);
}

.capture-modal[data-state="done"] .capture-proof-strip span {
  color: #065f46;
  border-color: rgba(20, 184, 166, .28);
  background: rgba(209, 250, 229, .85);
}

.capture-proof-strip span[data-state="busy"] {
  color: #713f12;
  border-color: rgba(245, 158, 11, .35);
  background: #fef3c7;
}

.capture-proof-strip span[data-state="done"] {
  color: #065f46;
  border-color: rgba(20, 184, 166, .32);
  background: #d1fae5;
}

.capture-proof-strip span[data-state="error"] {
  color: #7f1d1d;
  border-color: rgba(248, 113, 113, .34);
  background: #fee2e2;
}

.capture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.capture-task-card {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.capture-task-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.capture-task-head span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #075985;
  background: #e0f2fe;
  font-weight: 900;
}

.capture-task-head h2 {
  margin: 0;
  font-size: 20px;
}

.capture-task-card p {
  margin: 0;
  min-height: 72px;
  color: #475569;
  line-height: 1.7;
}

.capture-upload,
.capture-primary,
.capture-secondary {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  cursor: pointer;
}

.capture-upload input {
  display: none;
}

.capture-upload,
.capture-primary {
  color: #ffffff;
  background: #0f766e;
}

.capture-secondary {
  color: #0f172a;
  background: #e2e8f0;
}

.capture-primary,
.capture-secondary,
.capture-upload {
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.capture-primary:hover,
.capture-upload:hover {
  background: #0d9488;
  box-shadow: 0 10px 20px rgba(15, 118, 110, .18);
}

.capture-secondary:hover {
  background: #cbd5e1;
}

.capture-primary:active,
.capture-secondary:active,
.capture-upload:active {
  transform: translateY(1px) scale(.99);
}

.capture-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.capture-task-card em {
  min-height: 30px;
  border-radius: 8px;
  padding: 7px 9px;
  color: #155e75;
  background: #ecfeff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.capture-archive-note {
  margin-top: 12px;
  border: 1px dashed rgba(15, 118, 110, .28);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #334155;
  background: rgba(255, 255, 255, .66);
  font-size: 12px;
  font-weight: 800;
}

.capture-archive-note strong {
  color: #0f172a;
}

.capture-archive-note span {
  border-radius: 6px;
  padding: 5px 7px;
  color: #155e75;
  background: #ecfeff;
}

@media (max-width: 820px) {
  .capture-modal {
    padding: 10px;
    align-items: stretch;
  }

  .capture-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 10px;
  }

  .capture-dialog-head {
    min-height: 138px;
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .capture-dialog-head h2 {
    font-size: 24px;
  }

  .background-music-toolbar,
  .background-music-item {
    grid-template-columns: 1fr;
  }

  .background-music-list {
    max-height: calc(100vh - 300px);
  }

  .capture-hero {
    min-height: 220px;
    padding: 22px;
  }

  .capture-hero h1 {
    font-size: 30px;
  }

  .capture-status-card,
  .capture-demo-rail,
  .capture-proof-strip,
  .capture-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }
}

.video-preview-head,
.video-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.video-preview-head {
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.video-preview-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.video-preview-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.preview-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.preview-close:hover {
  color: var(--danger);
  border-color: rgba(244, 63, 94, .35);
}

.video-preview-stage {
  min-height: 0;
  aspect-ratio: var(--preview-ratio);
  display: block;
  overflow: hidden;
  background: #05070d;
}

.video-preview-stage video {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  object-fit: contain;
  border-radius: 0;
  background: #05070d;
  box-shadow: none;
}

.video-preview-foot {
  border-top: 1px solid var(--line);
}

.video-preview-foot strong,
.video-preview-foot span {
  display: block;
}

.video-preview-foot span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.video-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.video-preview-actions .button {
  min-width: 118px;
  text-decoration: none;
}

.video-preview-actions .button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: 430px;
  border-radius: 9px;
  padding: 12px 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(15, 20, 29, .25);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.panel-collapsed .editor-layout {
  grid-template-columns: 64px 0 minmax(520px, 1fr) 408px;
}

body.panel-collapsed .library-panel {
  padding: 0;
  overflow: visible;
}

body.panel-collapsed .tool-panel {
  display: none;
}

body.panel-collapsed .panel-collapse {
  display: none;
}

@media (max-width: 1380px) {
  .editor-layout {
    grid-template-columns: 64px 320px minmax(500px, 1fr) 380px;
  }

  .canvas-page {
    width: min(74vw, 690px);
  }

  .stage-area {
    padding: 32px 36px;
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-width: 0;
    height: auto;
    min-height: 100dvh;
  }

  .topbar {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 10px 12px;
  }

  .editor-layout {
    grid-template-columns: 64px minmax(260px, 340px) minmax(0, 1fr);
  }

  .inspector-panel {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stage-column {
    min-height: 760px;
  }
}



/* Reference editor interaction layer. */
.stage-column {
  grid-template-rows: 50px minmax(0, 1fr) 132px;
  overflow: hidden;
}

.stage-column > .canvas-toolbar,
.stage-column > .stage-area,
.stage-column > .timeline-bar {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.canvas-toolbar {
  justify-content: flex-start;
  gap: 14px;
  padding: 0 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.canvas-toolbar::-webkit-scrollbar {
  display: none;
}

.canvas-toolbar > .segmented {
  order: 1;
}

.canvas-toolbar > .object-toolbar {
  order: 2;
}

.canvas-toolbar > .segmented:last-child {
  display: none;
  order: 3;
}

.object-toolbar {
  min-width: 0;
  max-width: none;
  flex: 0 0 auto;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  color: #182234;
  box-shadow: inset 0 0 0 1px #e4ebf4, 0 7px 18px rgba(26, 37, 56, .08);
}

.history-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.history-group .icon-tool:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.font-select {
  width: 126px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #141b2a;
  font-weight: 800;
}

.toolbar-stepper {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 5px;
  border-radius: 7px;
  background: #f6f8fb;
}

.toolbar-stepper output {
  min-width: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: #e6edf5;
}

.icon-tool {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #182234;
  font-size: 15px;
  font-weight: 900;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.icon-tool:hover,
.icon-tool.active {
  color: #0d7d9a;
  background: #e9f8fb;
}

.icon-tool.danger:hover {
  color: var(--ink);
  background: #fff0f3;
}

.color-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.color-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 1px #ccd6e4, 0 4px 9px rgba(19, 28, 42, .10);
}

.color-dot:hover {
  transform: translateY(-1px);
}

.canvas-page {
  isolation: isolate;
  width: 1250px !important;
  max-width: none !important;
}

.snap-guide {
  position: absolute;
  z-index: 34;
  display: none;
  pointer-events: none;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .75), 0 0 18px rgba(32, 200, 233, .45);
}

.snap-guide.show {
  display: block;
}

.snap-guide-v {
  top: 0;
  bottom: 0;
  width: 2px;
}

.snap-guide-h {
  left: 0;
  right: 0;
  height: 2px;
}

.canvas-page.ratio-vertical {
  width: 700px !important;
  max-width: none !important;
}

.canvas-page.ratio-square {
  width: 980px !important;
  max-width: none !important;
}

.canvas-page.is-dragging,
.canvas-page.is-dragging * {
  cursor: grabbing !important;
}

.editor-object,
.canvas-item {
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.editor-object:focus-visible,
.canvas-item:focus-visible {
  outline: none;
}

.editor-object.is-editing {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
}

.canvas-text,
.template-title,
.template-ribbon,
.subtitle-card {
  position: absolute;
  z-index: 8;
  min-width: 90px;
  min-height: 38px;
  padding: 2px 8px;
  border-radius: 4px;
  color: #ffffff;
  background: transparent;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 900;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.6);
  animation: artistic-play-anim 2.5s infinite alternate ease-in-out;
  white-space: pre-wrap;
  text-align: center;
    -1px -1px 0 #f04457,
    0 7px 16px rgba(14, 21, 33, .25);
}

.canvas-text[data-outline="true"],
.template-title[data-outline="true"],
.template-ribbon[data-outline="true"],
.subtitle-card[data-outline="true"] {
  -webkit-text-stroke: 1px currentColor;
  paint-order: stroke fill;
}

.canvas-text[data-shadow="false"],
.template-title[data-shadow="false"],
.template-ribbon[data-shadow="false"],
.subtitle-card[data-shadow="false"] {
  text-shadow: none !important;
}

.selection-box {
  position: absolute;
  z-index: 35;
  display: none;
  border: 2px solid #20c8e9;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .72);
}

.selection-box.show {
  display: block;
}

.resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #20c8e9;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

.resize-handle[data-handle="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.resize-handle[data-handle="n"] { left: calc(50% - 6px); top: -7px; cursor: ns-resize; }
.resize-handle[data-handle="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.resize-handle[data-handle="e"] { right: -7px; top: calc(50% - 6px); cursor: ew-resize; }
.resize-handle[data-handle="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.resize-handle[data-handle="s"] { left: calc(50% - 6px); bottom: -7px; cursor: ns-resize; }
.resize-handle[data-handle="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.resize-handle[data-handle="w"] { left: -7px; top: calc(50% - 6px); cursor: ew-resize; }

.selection-label {
  position: absolute;
  left: 0;
  top: -26px;
  min-width: 44px;
  height: 20px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #20c8e9;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  box-shadow: 0 2px 6px rgba(32, 200, 233, 0.3);
}

.timeline-bar {
  grid-template-columns: 190px 44px minmax(360px, 1fr) 240px;
  grid-template-rows: 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 9px 16px;
  background: #f8f9fd !important;
}

.timeline-head {
  display: grid;
  align-content: start;
  gap: 8px;
}

.timeline-head .toggle,
.timeline-head .keyword-button {
  justify-self: start;
}

.timeline-track {
  height: auto;
  min-height: 112px;
  border-radius: 9px;
  overflow: visible;
  background: #f0f2f8;
  box-shadow: inset 0 0 0 1px #dfe5ee;
}

.timeline-track > .clip {
  display: none;
}

.timeline-progress {
  z-index: 3;
  width: 2px !important;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(34, 199, 232, .12), 0 0 0 5px rgba(34, 199, 232, .10);
  transform: translateX(-1px);
}

.timeline-playhead {
  position: absolute;
  left: 0;
  top: -8px;
  bottom: -5px;
  z-index: 6;
  width: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translateX(-9px);
  cursor: ew-resize;
  touch-action: none;
}

.timeline-playhead::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 0;
  width: 2px;
  border-radius: 99px;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 0 18px rgba(28, 189, 223, .38);
}

.timeline-playhead-handle {
  position: absolute;
  left: 2px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 5px 5px 9px 9px;
  background: #5f5beb;
  box-shadow: 0 5px 14px rgba(58, 57, 188, .28);
}

.timeline-playhead.is-dragging .timeline-playhead-handle {
  background: var(--panel);
}

.timeline-rows {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  height: 100%;
}

.track-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 27px;
  border-bottom: 1px solid #dfe4ee;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  color: #303949;
  background: #fbfcff;
  font-size: 13px;
  font-weight: 800;
}

.track-lane {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
}

.timeline-clip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border: 0;
  border-radius: 5px;
  padding: 0 18px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: box-shadow .16s ease, transform .16s ease, filter .16s ease;
  touch-action: none;
  cursor: grab;
  overflow: visible;
  user-select: none;
}

.timeline-clip:hover {
  filter: brightness(1.04);
}

.timeline-clip.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #22c7e8, inset 0 1px 0 rgba(255, 255, 255, .25);
}

.timeline-clip.is-dragging {
  cursor: grabbing;
  filter: brightness(1.06);
}

.timeline-clip.is-trimming {
  filter: brightness(1.08);
}

.timeline-clip-label {
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-clip-actions {
  position: absolute;
  left: 4px;
  top: -30px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.timeline-clip:hover .timeline-clip-actions,
.timeline-clip.active .timeline-clip-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-2px);
}

.timeline-clip-action {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #333333;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.timeline-clip-action:hover {
  background: #f0f0f0;
}

.timeline-clip-action:hover {
  transform: translateY(-1px);
}

.timeline-clip-action.danger {
  color: var(--ink);
}

.timeline-trim-handle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  z-index: 2;
  width: 9px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 5px;
  background: rgba(23, 32, 51, .32);
  box-shadow: 0 1px 6px rgba(16, 24, 40, .18);
  opacity: 0;
  transition: opacity .16s ease, background .16s ease;
  cursor: ew-resize;
  touch-action: none;
}

.timeline-trim-handle.left {
  left: -4px;
}

.timeline-trim-handle.right {
  right: -4px;
}

.timeline-clip:hover .timeline-trim-handle,
.timeline-clip.active .timeline-trim-handle,
.timeline-clip.is-trimming .timeline-trim-handle {
  opacity: 1;
}

.timeline-trim-handle:hover,
.timeline-trim-handle.active {
  background: rgba(255, 255, 255, .46);
}

.clip-title {
  min-width: 134px;
  background: #6e7cf1;
}

.timeline-clip.clip-text {
  min-width: 120px;
  background: var(--panel);
}

.timeline-clip.clip-avatar {
  min-width: 176px;
  background: #4c65d9;
}

.timeline-clip.clip-audio {
  min-width: 150px;
  background: #d69a29;
}

.timeline-add {
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  color: #5e5af0;
  background: #e4e3ff;
  font-size: 24px;
  line-height: 1;
}

/* Reference-style editing timeline. */
.stage-column {
  --timeline-height: 202px;
  grid-template-rows: 50px minmax(0, 1fr) var(--timeline-height);
}

body.timeline-collapsed .stage-column {
  grid-template-rows: 50px minmax(0, 1fr) 58px;
}

.timeline-bar {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  border-top: 1px solid #dfe4ef;
  background: #f4f6fb !important;
  box-shadow: 0 -8px 24px rgba(20, 29, 45, .08);
  overflow: visible;
}

.timeline-resize-btn {
  position: absolute;
  left: 18px;
  top: -20px;
  z-index: 12;
  width: 70px;
  height: 32px;
  border: 1px solid rgba(128, 116, 255, .22);
  border-radius: 999px;
  display: inline-grid;
  grid-template-columns: 26px 20px;
  place-items: center;
  gap: 4px;
  color: #6d5dfc;
  background: linear-gradient(135deg, #ffffff 0%, #f7f6ff 100%);
  box-shadow: 0 10px 26px rgba(80, 73, 185, .18), inset 0 1px 0 rgba(255, 255, 255, .95);
  cursor: ns-resize;
  touch-action: none;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease, border-color .16s ease;
}

.timeline-resize-btn:hover,
.timeline-resize-btn:focus-visible {
  color: #4338ca;
  border-color: rgba(109, 93, 252, .42);
  outline: none;
  box-shadow: 0 14px 32px rgba(80, 73, 185, .24), 0 0 0 4px rgba(109, 93, 252, .10);
  transform: translateY(-1px);
}

.timeline-resize-btn:active,
body.timeline-resizing .timeline-resize-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #4f7cff, #8b5cf6);
  border-color: transparent;
  box-shadow: 0 16px 34px rgba(79, 124, 255, .28);
  transform: translateY(1px);
}

.timeline-grip-dots {
  width: 22px;
  height: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  align-items: center;
}

.timeline-grip-dots i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: .72;
}

.timeline-resize-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.timeline-resizing {
  cursor: ns-resize;
  user-select: none;
}

body.timeline-resizing * {
  cursor: ns-resize !important;
}

.timeline-head {
  display: grid;
  grid-template-columns: minmax(210px, auto) 1fr minmax(220px, 300px);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 9px 18px 8px 18px;
  border-bottom: 1px solid #e3e8f3;
  background: rgba(255, 255, 255, .72);
}

.timeline-play-group,
.timeline-tools,
.timeline-zoom {
  display: flex;
  align-items: center;
  min-width: 0;
}

.timeline-play-group {
  gap: 10px;
}

.timeline-tools {
  gap: 14px;
}

.time-readout {
  color: #544df0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  white-space: nowrap;
}

.play-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #4f7cff, #7c4dff);
  box-shadow: 0 9px 18px rgba(93, 88, 223, .24);
}

.timeline-head .toggle {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: #475569;
  white-space: nowrap;
}

.timeline-head .keyword-button {
  min-height: 30px;
  border: 1px solid #dfe5f2;
  border-radius: 7px;
  padding: 0 12px;
  color: #4c3fd9;
  background: #ffffff;
  font-weight: 800;
}

.timeline-zoom {
  justify-content: flex-end;
  gap: 8px;
}

.timeline-zoom button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  color: #6b7280;
  background: transparent;
  font-size: 19px;
  line-height: 1;
}

.timeline-zoom button:hover {
  color: #5b54f0;
  background: #ebeaff;
}

.timeline-zoom input {
  width: min(180px, 100%);
  accent-color: #8b78ff;
}

.timeline-track {
  position: relative;
  height: auto;
  min-height: 0;
  border-radius: 0;
  overflow: auto hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(109, 119, 140, .11) 80px),
    #eef1f8;
  box-shadow: inset 0 1px 0 #ffffff;
}

.timeline-ruler {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-width: 680px;
  height: 24px;
  margin-left: var(--timeline-content-offset, 0px);
  padding-right: 20px;
  color: #8a94a6;
  background: rgba(246, 248, 252, .92);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.timeline-ruler span {
  display: flex;
  align-items: center;
}

.timeline-track > .clip {
  display: none;
}

.timeline-progress {
  z-index: 6;
  top: 24px;
  bottom: 0;
  width: 2px !important;
  background: #25b7ff;
  box-shadow: 0 0 0 1px rgba(37, 183, 255, .16), 0 0 0 5px rgba(37, 183, 255, .10);
  transform: translateX(-1px);
}

.timeline-playhead {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 0;
  z-index: 8;
  width: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translateX(-9px);
  cursor: ew-resize;
  touch-action: none;
}

.timeline-playhead::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 15px;
  bottom: 0;
  width: 2px;
  border-radius: 99px;
  background: #25b7ff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 0 18px rgba(37, 183, 255, .34);
}

.timeline-playhead-handle {
  position: absolute;
  left: 1px;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 999px 999px 999px 4px;
  background: #5e5bf0;
  box-shadow: 0 6px 16px rgba(65, 75, 210, .3);
  transform: rotate(-45deg);
}

.timeline-playhead.is-dragging .timeline-playhead-handle {
  background: #25b7ff;
}

.timeline-end-handle {
  position: absolute;
  top: 24px;
  bottom: 0;
  z-index: 7;
  width: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translateX(-12px);
  cursor: ew-resize;
  touch-action: none;
}

.timeline-end-handle::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 99px;
  background: #ef7d31;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 0 14px rgba(239, 125, 49, .24);
}

.timeline-end-handle-grip {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 28px;
  border-radius: 8px;
  background: #fff7ed;
  box-shadow: inset 0 0 0 2px #ef7d31, 0 8px 18px rgba(153, 84, 28, .18);
}

.timeline-end-handle-grip::before,
.timeline-end-handle-grip::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 99px;
  background: #ef7d31;
}

.timeline-end-handle-grip::before {
  left: 5px;
}

.timeline-end-handle-grip::after {
  right: 5px;
}

.timeline-end-handle:hover .timeline-end-handle-grip,
.timeline-end-handle.is-dragging .timeline-end-handle-grip {
  background: #ffedd5;
  box-shadow: inset 0 0 0 2px #ea580c, 0 10px 22px rgba(153, 84, 28, .24);
}

.object-drag-hint {
  position: absolute;
  z-index: 35;
  min-width: 96px;
  padding: 6px 9px;
  border-radius: 7px;
  color: #ffffff;
  background: rgba(15, 23, 42, .78);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
}

.object-drag-hint.show {
  opacity: 1;
  transform: translate(-50%, -14px);
}

.timeline-rows {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  min-width: 774px;
  height: calc(100% - 24px);
}

.track-row {
  display: grid;
  grid-template-columns: 94px minmax(680px, 1fr);
  min-height: 31px;
  border-bottom: 1px solid #dde3ee;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-name {
  position: sticky;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 18px;
  color: #334155;
  background: #fbfcff;
  border-right: 1px solid #e1e7f1;
  font-size: 13px;
  font-weight: 800;
}

.track-name i {
  width: 18px;
  color: #6b7280;
  font-style: normal;
  text-align: center;
}

.track-lane {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px;
}

.timeline-clip {
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 6px;
  padding: 0 20px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(32, 43, 68, .12), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.timeline-clip.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #22c7e8, 0 10px 22px rgba(32, 43, 68, .16);
}

.timeline-clip.clip-text {
  background: #7a8af7;
}

.clip-title {
  background: #6d78ef;
}

.timeline-clip.clip-avatar {
  background: #6079f2;
}

.timeline-clip.clip-audio {
  background: #d59a28;
}

.timeline-add {
  width: 36px;
  height: 31px;
  border-radius: 8px;
  color: #665af2;
  background: #e6e4ff;
  font-size: 24px;
}

body.timeline-collapsed .timeline-bar {
  grid-template-rows: 58px 0;
  overflow: visible;
}

body.timeline-collapsed .timeline-head {
  border-bottom: 0;
}

body.timeline-collapsed .timeline-track {
  display: none;
}

body.timeline-collapsed .timeline-resize-btn {
  top: -18px;
}

@media (max-width: 1180px) {
  .timeline-head {
    grid-template-columns: 1fr auto;
  }

  .timeline-tools {
    display: none;
  }

  .timeline-zoom {
    min-width: 160px;
  }
}

.selected-object-panel {
  margin: 14px 0 0;
  border: 1px solid #e2e9f3;
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
  box-shadow: 0 10px 22px rgba(29, 40, 58, .045);
}

.selected-object-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.selected-object-head span,
.object-metrics label span,
.object-fields label span {
  color: #6b788c;
  font-size: 12px;
  font-weight: 800;
}

.selected-object-head strong {
  display: block;
  margin-top: 2px;
  color: #172033;
  font-size: 16px;
}

.selected-object-head em {
  min-width: 52px;
  height: 24px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  color: #0d7893;
  background: #e9f8fb;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.object-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.object-metrics label {
  gap: 5px;
}

.object-metrics input {
  width: 100%;
  height: 32px;
  border: 1px solid #dbe5f0;
  border-radius: 7px;
  padding: 0 6px;
  color: #172033;
  background: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.object-type-fields {
  margin-top: 10px;
}

.object-fields {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
}

.object-fields.active {
  display: grid;
}

.object-fields label {
  display: grid;
  gap: 5px;
}

.object-fields input,
.object-fields select {
  width: 100%;
  height: 34px;
  border: 1px solid #dbe5f0;
  border-radius: 7px;
  padding: 0 8px;
  color: #172033;
  background: #ffffff;
  font-weight: 800;
}

.object-fields input[type="range"] {
  padding: 0;
  accent-color: #22c7e8;
}

.selected-object-panel.no-selection .object-type-fields {
  opacity: .48;
  pointer-events: none;
}

.object-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.mini-button {
  height: 32px;
  border: 1px solid #dbe5f0;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  font-weight: 900;
}

.mini-button:hover {
  background: #eef8fb;
}

.mini-button.danger {
  color: var(--ink);
}

.selected-object-panel.no-selection {
  opacity: .72;
}

@media (max-width: 1380px) {
  .object-toolbar {
    gap: 5px;
    padding: 0 7px;
  }

  .font-select {
    width: 104px;
  }

  .icon-tool {
    width: 27px;
  }
}


/* --- Advanced Animations & Effects --- */
@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--canvas-bg);
}

.blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: blob-float 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%; left: -10%;
  width: 50vw; height: 50vw;
  background: rgba(59, 130, 246, 0.2); /* Blue */
  animation-delay: 0s;
}

.blob-2 {
  bottom: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: rgba(139, 92, 246, 0.15); /* Purple */
  animation-delay: -5s;
}

.blob-3 {
  top: 40%; left: 60%;
  width: 40vw; height: 40vw;
  background: rgba(16, 185, 129, 0.1); /* Emerald */
  animation-delay: -10s;
}

/* Ensure app-shell is transparent so blobs show through */
.app-shell {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* Glassmorphism upgrade for stage and inspector panels */
.stage-column, .inspector-panel {
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(16px);
}

/* Larger composition stage: keep the editing canvas as the visual priority. */
@media (min-width: 1181px) {
  .editor-layout {
    height: calc(100dvh - 60px);
    overflow: hidden;
  }

  .library-panel,
  .stage-column,
  .inspector-panel {
    height: 100%;
    min-height: 0;
  }

  .library-panel,
  .inspector-panel {
    overflow-y: auto;
  }

  .stage-area {
    min-height: 0;
    padding: 24px 28px;
    overflow: hidden;
  }

  .canvas-page {
    width: min(960px, calc(100% - 16px));
  }

  .canvas-page.ratio-vertical {
    width: min(430px, calc(100% - 16px));
  }

  .canvas-page.ratio-square {
    width: min(760px, calc(100% - 16px));
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .editor-layout {
    grid-template-columns: 64px minmax(236px, 280px) minmax(0, 1fr);
  }

  .library-panel {
    padding: 14px 12px 20px;
  }

  .stage-column {
    min-height: min(760px, calc(100dvh - 60px));
  }

  .stage-area {
    padding: 10px 8px;
    overflow: hidden;
  }

  .canvas-page {
    width: min(760px, calc(100% - 12px));
  }

  .canvas-page.ratio-vertical {
    width: min(360px, calc(100% - 12px));
  }

  .canvas-page.ratio-square {
    width: min(620px, calc(100% - 12px));
  }
}

.canvas-page.drag-hover {
  box-shadow: 0 0 0 3px #20c8e9, 0 16px 40px -12px rgba(0, 0, 0, 0.12) !important;
  outline: none !important;
}

/* Custom Right-Click Context Menu */
.context-menu {
  position: absolute;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 6px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10000;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.context-menu-item:hover {
  background: #f1f5f9;
  color: #20c8e9;
}

.context-menu-item.danger {
  color: #ef4444;
}

.context-menu-item.danger:hover {
  background: #fef2f2;
  color: #ef4444;
}

.context-menu-item .icon {
  font-size: 14px;
  width: 16px;
  display: inline-block;
}

.context-menu-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 6px;
}

/* Fix digital human dragging transition conflict */
.canvas-page.is-dragging .digital-human {
  transition: none !important;
}

/* Reference sidebar: capped digital-human chooser with scene cards below. */
.editor-layout {
  grid-template-columns: 64px 280px minmax(520px, 1fr) 408px;
}

.tool-rail {
  background: #171920;
  color: #969daa;
}

.rail-item {
  min-height: 74px;
}

.rail-item.active {
  margin: 0 8px 0 0;
  border-radius: 0 12px 12px 0;
  color: #ffffff;
  background: #101218;
}

.library-panel {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 18px 24px;
  background: #282834;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 134, 152, .55) transparent;
}

.panel-collapse {
  top: 154px;
  right: -17px;
  background: #4c4b57;
}

.tool-panel[data-panel="avatar"].active {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.tool-panel[data-panel="avatar"] .select-section-heading {
  flex: 0 0 auto;
  margin: 0 0 14px;
}

.tool-panel[data-panel="avatar"] .select-section-heading.small-heading {
  margin: 16px 0 14px;
  padding-top: 4px;
}

.tool-panel[data-panel="avatar"] .select-section-heading h2 {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.avatar-grid {
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 10px;
  max-height: 246px;
  margin: 0 -2px 0 0;
  padding: 0 2px 8px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.avatar-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.avatar-card {
  min-width: 0;
  gap: 7px;
  padding: 0;
  transition: transform .18s ease;
}

.avatar-card:hover {
  transform: translateY(-1px);
}

.avatar-face {
  width: 72px;
  height: 72px;
  margin-bottom: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  background-color: #494857;
  background-position: center top;
  background-size: cover;
  box-shadow: inset 0 -16px 24px rgba(0, 0, 0, .18);
}

.avatar-photo {
  border-radius: 50%;
  background-color: #494857;
  background-position: center top;
  background-size: cover;
  box-shadow: none;
}

.avatar-card.active .avatar-face {
  border-color: #7b63ff;
  box-shadow:
    0 0 0 2px #24cfe5,
    0 0 0 4px rgba(123, 99, 255, .92),
    inset 0 -16px 24px rgba(0, 0, 0, .16);
}

.avatar-face .active-badge {
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #4b485d;
  border-radius: 6px;
  background: #7568ff;
  box-shadow: 0 3px 10px rgba(35, 31, 73, .35);
}

.avatar-card strong {
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 8px;
  padding: 0 0 28px;
  overflow: visible;
}

.scene-card {
  min-width: 0;
  gap: 8px;
  padding: 0;
}

.scene-thumb {
  width: 100%;
  height: auto;
  min-height: 114px;
  aspect-ratio: 1 / 1;
  margin-bottom: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background-color: #565564;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

.scene-thumb.scene-photo {
  background-color: #565564;
  background-position: center bottom;
  background-size: contain;
}

.scene-card:hover .scene-thumb {
  border-color: rgba(255, 255, 255, .14);
  background-color: #605f70;
}

.scene-card.active .scene-thumb {
  border-color: transparent;
  box-shadow: none;
}

.scene-card strong {
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-thumb .active-badge {
  right: 5px;
  bottom: 5px;
  width: 23px;
  height: 23px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  background: #7568ff;
  box-shadow: 0 3px 10px rgba(35, 31, 73, .35);
}

.scene-thumb em {
  top: 8px;
  right: 8px;
  bottom: auto;
  background: rgba(18, 20, 30, .74);
}

body.panel-collapsed .editor-layout {
  grid-template-columns: 64px 0 minmax(520px, 1fr) 408px;
}

@media (max-width: 1380px) {
  .editor-layout {
    grid-template-columns: 64px 280px minmax(500px, 1fr) 380px;
  }

  .avatar-grid {
    max-height: 242px;
  }
}

@media (max-width: 1180px) {
  .editor-layout {
    grid-template-columns: 64px minmax(252px, 280px) minmax(0, 1fr);
  }

  .library-panel {
    padding: 16px 14px 20px;
  }

  .avatar-grid {
    gap: 14px 8px;
    max-height: 224px;
  }

  .avatar-face {
    width: 64px;
    height: 64px;
  }

  .scene-thumb {
    min-height: 104px;
  }
}

/* ===========================================================
   Timeline visual alignment with editor reference
   =========================================================== */

/* Header tools */
.timeline-head .toggle {
  flex-direction: row;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}

.timeline-head .toggle span {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .2s ease;
}

.timeline-head .toggle span::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .25);
  transition: transform .2s ease;
}

.timeline-head .toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.timeline-head .toggle input:checked + span {
  background: linear-gradient(135deg, #6b6dff 0%, #8b5cff 100%);
}

.timeline-head .toggle input:checked + span::before {
  transform: translateX(16px);
}

.timeline-help {
  width: 18px;
  height: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: help;
  margin-left: -2px;
}

.timeline-head .keyword-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f3f4f6;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.keyword-arrow {
  width: 12px;
  height: 12px;
  color: #94a3b8;
}

/* Zoom controls — circular buttons + slider */
.timeline-zoom {
  gap: 8px;
  align-items: center;
}

.timeline-zoom button {
  width: 22px;
  height: 22px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: #ffffff;
  color: #6b7280;
  font-size: 14px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

.timeline-zoom input {
  width: 110px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #6b46ff 0%, #6b46ff 50%, #e5e7eb 50%, #e5e7eb 100%);
  border-radius: 999px;
  outline: none;
}

.timeline-zoom input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6b46ff;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(107, 70, 255, .4);
  cursor: pointer;
}

.timeline-zoom input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6b46ff;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(107, 70, 255, .4);
  cursor: pointer;
}

/* Side play button (large purple gradient circle) */
.play-button--side {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #4c7bff 0%, #8a4dff 100%);
  box-shadow: 0 8px 22px rgba(94, 84, 230, .35);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.play-button--side:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 10px 26px rgba(94, 84, 230, .45);
}

.play-button--side svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  margin-left: 2px;
}

.play-button--side.is-playing svg {
  margin-left: 0;
}

.play-button--side.is-playing {
  background: linear-gradient(135deg, #5b54f0 0%, #6b46ff 100%);
  box-shadow: 0 8px 22px rgba(94, 84, 230, .55), 0 0 0 4px rgba(94, 84, 230, .18);
}

.timeline-clip.is-playing {
  box-shadow: 0 0 0 2px #6b46ff, 0 0 0 4px rgba(107, 70, 255, .25), 0 4px 10px rgba(15, 23, 42, .22);
  filter: brightness(1.12);
}

/* Digital human / canvas playback animations */
@keyframes dh-breathe {
  0%, 100% { transform: scale(var(--dh-scale, 1)) translateY(0); }
  50% { transform: scale(var(--dh-scale, 1)) translateY(-3px); }
}

@keyframes dh-head-nod {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-1.4deg) translateY(-1px); }
  50% { transform: rotate(0.6deg) translateY(0.5px); }
  75% { transform: rotate(-0.8deg) translateY(-0.5px); }
}

@keyframes dh-arm-sway-left {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.4deg); }
}

@keyframes dh-arm-sway-right {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(2.4deg); }
}

@keyframes subtitle-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(15, 23, 42, .25); }
  50% { box-shadow: 0 4px 22px rgba(107, 70, 255, .55); }
}

body.timeline-is-playing #digitalHuman {
  will-change: transform;
}

body.timeline-is-playing #digitalHuman .human-head {
  animation: dh-head-nod 1.1s ease-in-out infinite;
  transform-origin: 50% 90%;
}

body.timeline-is-playing #digitalHuman .human-arm.left {
  animation: dh-arm-sway-left 1.6s ease-in-out infinite;
  transform-origin: 100% 0%;
}

body.timeline-is-playing #digitalHuman .human-arm.right {
  animation: dh-arm-sway-right 1.6s ease-in-out infinite;
  transform-origin: 0% 0%;
}

body.timeline-is-playing #subtitleCard {
  animation: subtitle-pulse 1.2s ease-in-out infinite;
}

body.timeline-is-playing .canvas-page::before {
  content: "● 正在播放";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 50;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(107, 70, 255, .92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 4px 12px rgba(107, 70, 255, .4);
  pointer-events: none;
  animation: subtitle-pulse 1.4s ease-in-out infinite;
}

/* Track area */
.timeline-track {
  background: #ffffff;
  padding-left: 0;
}

.timeline-ruler {
  display: none;
}

.timeline-rows {
  height: 100%;
  padding-left: 80px;
  background: #ffffff;
  grid-template-rows: repeat(4, minmax(40px, 1fr));
}

.track-row {
  grid-template-columns: 80px minmax(0, 1fr);
  min-height: 40px;
  border-bottom: 1px solid #f1f3f7;
}

.track-name {
  background: transparent;
  border-right: 0;
  gap: 6px;
  padding-left: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #4b5563;
}

/* ===================================================================
   Right Inspector Panel — Refined visual polish
   =================================================================== */

.inspector-panel {
  background: linear-gradient(180deg, #fbfcff 0%, #f5f7fc 100%);
  border-left: 1px solid #e4e8f1;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .6);
  padding: 0 16px 22px;
  scrollbar-width: thin;
  scrollbar-color: #c8cfde transparent;
}

.inspector-panel::-webkit-scrollbar {
  width: 6px;
}

.inspector-panel::-webkit-scrollbar-thumb {
  background: #c8cfde;
  border-radius: 8px;
}

.inspector-panel::-webkit-scrollbar-thumb:hover {
  background: #a8b2c4;
}

.inspector-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: 0 -16px 8px;
  padding: 10px 16px 0;
  background: linear-gradient(180deg, #fbfcff 60%, rgba(251, 252, 255, 0));
  border-bottom: 1px solid #e8ecf4;
}

.inspector-tab {
  position: relative;
  flex: 1;
  height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #7c8699;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.inspector-tab:hover {
  color: #4f5d75;
  background: rgba(139, 92, 246, .04);
}

.inspector-tab.active {
  color: #6d28d9;
  border-bottom-color: #8b5cf6;
  font-weight: 800;
}

.inspector-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
  transform: translateX(-50%);
}

.inspector-section {
  padding-top: 16px;
}

.inspector-section.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspector-section .form-grid {
  margin-bottom: 0;
  background: #ffffff;
  padding: 14px;
  border: 1px solid #ebeff7;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.inspector-section label {
  color: #56627a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}

.inspector-section select,
.inspector-section input[type="text"],
.inspector-section input[type="number"],
.inspector-section textarea {
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.inspector-section select:focus,
.inspector-section input:focus,
.inspector-section textarea:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
  outline: none;
}

.script-field textarea {
  min-height: 96px;
  line-height: 1.55;
  padding: 10px 12px;
  resize: vertical;
}

.helper-text {
  margin: -4px 0 0;
  color: #94a0b6;
  font-size: 12px;
  font-style: italic;
}

.inspector-panel .button.secondary {
  border: 1px solid #dfe4ee;
  background: #ffffff;
  color: #4f5d75;
  font-weight: 700;
  border-radius: 9px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.inspector-panel .button.secondary:hover {
  background: #f3f1ff;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.inspector-panel .button.primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #ec4899 100%);
  border: 0;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: .5px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(139, 92, 246, .28);
  transition: transform .15s ease, box-shadow .2s ease;
}

.inspector-panel .button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(139, 92, 246, .35);
}

.inspector-panel .button.primary:active {
  transform: translateY(0);
}

/* Selected object card */
.selected-object-panel {
  margin: 6px 0 4px;
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
  box-shadow: 0 4px 14px rgba(29, 40, 58, .05);
}

.selected-object-head {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed #e6ebf4;
}

.selected-object-head strong {
  font-size: 14px;
  color: #1e293b;
}

.selected-object-head em {
  padding: 3px 8px;
  background: rgba(139, 92, 246, .1);
  color: #6d28d9;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  border-radius: 999px;
  letter-spacing: .4px;
}

.object-metrics input {
  border-radius: 7px;
  border: 1px solid #dfe4ee;
  background: #ffffff;
}

.object-actions .mini-button {
  border-radius: 7px;
  font-weight: 700;
}

/* Checklist card */
.checklist-card {
  margin-top: 4px;
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #faf8ff 100%);
  padding: 14px;
  box-shadow: 0 4px 14px rgba(29, 40, 58, .04);
}

.checklist-head strong {
  font-size: 13px;
  color: #1e293b;
}

.checklist-head span {
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  color: #6d28d9;
  font-size: 11px;
  font-weight: 800;
}

/* Voice card / voice library */
.voice-card {
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
  box-shadow: 0 4px 14px rgba(29, 40, 58, .05);
}

.voice-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 4px 10px rgba(139, 92, 246, .35);
}

.tts-engine-tabs button {
  border: 1px solid #dfe4ee;
  border-radius: 9px;
  background: #ffffff;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.tts-engine-tabs button:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.tts-engine-tabs button.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  color: #6d28d9;
}

.voice-library-head {
  padding: 0 2px;
}

.voice-library-head strong {
  font-size: 13px;
  color: #1e293b;
}

.voice-library-head span {
  color: #94a0b6;
  font-size: 11px;
}

.voice-option {
  border: 1px solid #e6ebf4;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}

.voice-option:hover {
  border-color: #c4b5fd;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(139, 92, 246, .12);
}

.voice-option.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #f5f3ff, #fdf2f8);
}

.voice-training-card {
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
  box-shadow: 0 4px 14px rgba(29, 40, 58, .04);
}

.voice-sample-drop {
  border: 1.5px dashed #c4b5fd;
  border-radius: 10px;
  background: #faf8ff;
  transition: background .15s ease, border-color .15s ease;
}

.voice-sample-drop:hover {
  border-color: #8b5cf6;
  background: #f3efff;
}

.voice-training-status {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.voice-training-status.synced {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

/* Range sliders */
.range-row {
  background: #ffffff;
  border: 1px solid #ebeff7;
  border-radius: 10px;
  padding: 10px 12px;
}

.range-row span {
  color: #56627a;
  font-size: 12px;
  font-weight: 700;
}

.range-row b {
  color: #6d28d9;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.inspector-section input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  border: 0;
  outline: none;
  padding: 0;
}

.inspector-section input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #8b5cf6;
  box-shadow: 0 2px 6px rgba(139, 92, 246, .35);
  cursor: pointer;
  transition: transform .12s ease;
}

.inspector-section input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.inspector-section input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #8b5cf6;
  box-shadow: 0 2px 6px rgba(139, 92, 246, .35);
  cursor: pointer;
}

.quick-adjust button {
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #4f5d75;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.quick-adjust button:hover {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.quick-adjust button.active {
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  border-color: #8b5cf6;
  color: #6d28d9;
}

.audio-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #e0e7ff;
}

/* Params section */
.watermark-proof-card {
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7fb 100%);
  box-shadow: 0 4px 14px rgba(29, 40, 58, .04);
}

.support-proof-grid {
  display: grid;
  gap: 8px;
}

.support-proof-card {
  border: 1px solid #e6ebf4;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.support-proof-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 4px 10px rgba(139, 92, 246, .12);
}

.support-proof-card strong {
  color: #1e293b;
  font-size: 13px;
}

.support-proof-card em {
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  color: #6d28d9;
  font-style: normal;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
}

.param-list {
  display: grid;
  gap: 8px;
}

.param-list div {
  border: 1px solid #e6ebf4;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  transition: border-color .15s ease, transform .1s ease;
}

.param-list div:hover {
  border-color: #c4b5fd;
  transform: translateX(2px);
}

.param-list strong {
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
}

.param-list span {
  color: #7c8699;
  font-size: 12px;
}

.track-ico {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: #6b7280;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.track-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.track-ico-text {
  font-family: "Times New Roman", serif;
  font-style: italic;
  color: #6b7280;
}

.track-label-text {
  font-size: 12px;
  letter-spacing: .02em;
}

.track-caret {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  color: #94a3b8;
}

.track-lane {
  padding: 4px 8px;
  gap: 6px;
  align-items: center;
}

/* Clips — compact pill with inline badge / duration / menu */
.timeline-clip {
  position: relative;
  height: 30px;
  min-width: 110px;
  padding: 0 10px 0 8px;
  border-radius: 6px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: linear-gradient(135deg, #2a3552 0%, #1a2440 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: visible;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}

.timeline-clip:hover {
  filter: brightness(1.1);
}

.timeline-clip.active {
  box-shadow: 0 0 0 2px #22c7e8, 0 0 0 4px rgba(34, 199, 232, .25), 0 4px 10px rgba(15, 23, 42, .22);
}

.timeline-clip.clip-text,
.timeline-clip.clip-title,
.timeline-clip.clip-avatar {
  background: linear-gradient(135deg, #2c3854 0%, #1a2440 100%);
}

.timeline-clip.clip-audio {
  background: linear-gradient(135deg, #d59a28 0%, #c08416 100%);
  color: #ffffff;
}

.clip-badge {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  background: #6b46ff;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.timeline-clip.clip-audio .clip-badge {
  background: rgba(0, 0, 0, .25);
}

.clip-duration {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-menu {
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  flex: 0 0 auto;
  padding: 0 2px;
  cursor: pointer;
}

.clip-menu:hover {
  color: #ffffff;
}

/* + add button next to clip */
.timeline-add {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px dashed #c7cdd8;
  color: #6b7280;
  background: #f8fafc;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s ease;
}

.timeline-add:hover {
  border-color: #6b46ff;
  border-style: solid;
  color: #6b46ff;
  background: #f3f0ff;
}

.track-lane {
  position: relative;
  display: block;
  min-height: 38px;
}

.timeline-clip {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.timeline-clip:hover,
.timeline-clip.active,
.timeline-clip.is-dragging,
.timeline-clip.is-trimming {
  transform: translateY(-50%);
}

.timeline-add {
  position: absolute;
  right: 8px;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
}

/* Playhead — purple line with diamond head */
.timeline-progress {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 80px;
  width: 1.5px !important;
  background: #6b46ff !important;
  box-shadow: none !important;
  z-index: 9;
  pointer-events: none;
}

.timeline-progress::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #6b46ff;
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(107, 70, 255, .4);
}

.timeline-progress::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 100%;
  background: #6b46ff;
}

/* Time readout color */
.time-readout {
  color: #5b54f0;
  font-weight: 700;
  font-size: 13px;
}

.time-readout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5b54f0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-time-input {
  width: 96px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 6px;
  color: #4f46e5;
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-align: center;
  outline: none;
}

.timeline-time-input.duration {
  width: 106px;
}

.timeline-time-input:hover,
.timeline-time-input:focus {
  border-color: rgba(91, 84, 240, .34);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(91, 84, 240, .12);
}

.timeline-auto-extend {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(91, 84, 240, .22);
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: #4f46e5;
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.selected-object-panel {
  display: none !important;
}

.object-drag-hint {
  position: absolute;
  z-index: 80;
  transform: translate(-50%, -100%);
  padding: 4px 7px;
  border-radius: 6px;
  color: #172033;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(148, 163, 184, .32);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transition: opacity .14s ease;
}

.object-drag-hint.show {
  opacity: 1;
}

.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(99, 102, 241, .18), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(14, 165, 233, .16), transparent 32%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
}

.login-shell {
  width: min(460px, calc(100vw - 32px));
}

.login-panel {
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 14px;
  padding: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .16);
}

.login-brand span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--admin-primary);
  background: var(--admin-primary-light);
  font-size: 12px;
  font-weight: 800;
}

.login-brand h1 {
  margin: 14px 0 8px;
  color: var(--admin-slate-900);
  font-size: 30px;
  line-height: 1.15;
}

.login-brand p {
  margin: 0;
  color: var(--admin-slate-500);
  font-size: 14px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form label span {
  color: var(--admin-slate-700);
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  height: 46px;
  border: 1px solid var(--admin-slate-200);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--admin-slate-900);
  background: #ffffff;
  font: inherit;
}

.login-form input:focus {
  border-color: var(--admin-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}

.login-status {
  min-height: 38px;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--admin-slate-500);
  background: var(--admin-slate-50);
  font-size: 13px;
}

.login-status[data-type="error"] {
  color: var(--admin-danger);
  background: var(--admin-danger-light);
}

.login-status[data-type="success"] {
  color: var(--admin-success);
  background: var(--admin-success-light);
}

.login-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.login-foot a {
  color: var(--admin-primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

/* ===================================================================
   Demo polish: procurement presentation surface
   =================================================================== */

:root {
  --canvas-bg: #edf3ee;
  --rail: #10211d;
  --panel: #ffffff;
  --panel-2: #f7faf8;
  --surface: #eef4ef;
  --ink: #14221d;
  --muted: #64746d;
  --line: #dce7df;
  --accent: #1f6f62;
  --accent-dark: #164f47;
  --accent-soft: rgba(31, 111, 98, .12);
  --gold: #b88636;
  --shadow: 0 18px 42px rgba(20, 34, 29, .11);
  --soft-shadow: 0 10px 24px rgba(20, 34, 29, .08);
  --glass-glow: none;
}

body {
  background:
    linear-gradient(90deg, rgba(20, 34, 29, .025) 1px, transparent 1px),
    linear-gradient(rgba(20, 34, 29, .025) 1px, transparent 1px),
    var(--canvas-bg);
  background-size: 28px 28px, 28px 28px, auto;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

.ambient-bg,
.blob {
  display: none;
}

.app-shell {
  background: rgba(237, 243, 238, .96);
}

.topbar {
  min-height: 64px;
  background: linear-gradient(90deg, #10211d 0%, #1f6f62 64%, #8b6426 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12), 0 12px 30px rgba(16, 33, 29, .12);
}

.project-name {
  border-radius: 8px;
  font-weight: 900;
}

.service-pill {
  border-radius: 8px;
  background: rgba(8, 34, 29, .34);
}

.topbar .button.secondary {
  color: #f6fffb;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .20);
}

.topbar .button.secondary:hover {
  background: rgba(255, 255, 255, .20);
  color: #ffffff;
}

.topbar .button.primary {
  color: #164f47;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(7, 33, 28, .18);
}

.button,
.back-button,
.chip,
.tab,
.segment,
.mini-button,
.icon-tool {
  border-radius: 8px;
}

.button.primary,
.inspector-panel .button.primary {
  color: #ffffff;
  background: #1f6f62;
  border: 1px solid rgba(31, 111, 98, .18);
  box-shadow: 0 10px 22px rgba(31, 111, 98, .20);
}

.button.primary:hover,
.inspector-panel .button.primary:hover {
  background: #164f47;
  box-shadow: 0 12px 24px rgba(31, 111, 98, .22);
}

.button.secondary,
.inspector-panel .button.secondary {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.button.secondary:hover,
.inspector-panel .button.secondary:hover {
  color: var(--accent-dark);
  background: #f3f8f4;
  border-color: rgba(31, 111, 98, .32);
}

.button.dark {
  color: #f9fffc;
  background: #223833;
  border-color: rgba(255, 255, 255, .10);
}

.button.dark:hover {
  background: #2c4942;
}

.editor-layout {
  background: rgba(237, 243, 238, .96);
}

.tool-rail {
  background: #10211d;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.rail-item {
  position: relative;
  color: #9db2aa;
}

.rail-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .06);
}

.rail-item.active {
  color: #ffffff;
  background: rgba(31, 111, 98, .22);
}

.rail-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d4a044;
}

.library-panel {
  background: #fbfdfb;
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .74);
}

.panel-heading span,
.mini-section-head span,
.voice-library-head span {
  color: var(--muted);
}

.panel-heading h2,
.mini-section-head strong {
  color: var(--ink);
}

.chip,
.tab,
.segment {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
}

.chip:hover,
.tab:hover,
.segment:hover {
  color: var(--accent-dark);
  border-color: rgba(31, 111, 98, .28);
  background: #f4f8f4;
}

.chip.active,
.tab.active,
.segment.active {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.canvas-toolbar {
  background: rgba(247, 250, 248, .92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .76);
}

.object-toolbar,
.segmented {
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(20, 34, 29, .04);
}

.stage-area {
  background:
    radial-gradient(circle at 24% 18%, rgba(31, 111, 98, .08), transparent 28%),
    linear-gradient(180deg, #eef4ef 0%, #e7efe9 100%);
}

.canvas-page {
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(20, 34, 29, .16);
}

.template-title,
.template-ribbon,
.subtitle-card {
  letter-spacing: 0;
}

.timeline-bar {
  border-top: 1px solid var(--line);
  background: #f8fbf8;
}

.timeline-head {
  background: transparent;
}

.timeline-track {
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.timeline-progress,
.timeline-progress::before,
.timeline-progress::after {
  background: #1f6f62;
}

.timeline-clip {
  border-radius: 8px;
}

.timeline-clip:hover,
.timeline-clip.active {
  border-color: rgba(31, 111, 98, .55);
  box-shadow: 0 8px 18px rgba(31, 111, 98, .12);
}

.inspector-panel {
  background: linear-gradient(180deg, #fbfdfb 0%, #f2f7f3 100%);
  border-left: 1px solid var(--line);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .70);
  padding: 0 14px 22px;
}

.bid-brief-card {
  display: grid;
  gap: 12px;
  margin: 14px 0 10px;
  border: 1px solid rgba(31, 111, 98, .20);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(20, 34, 29, .07);
}

.bid-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bid-brief-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bid-brief-head strong {
  color: var(--ink);
  font-size: 14px;
}

.bid-brief-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.bid-brief-meta span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--accent-dark);
  background: #f4f8f4;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.bid-proof-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #1f6f62;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}

.bid-proof-link:hover {
  background: #164f47;
  transform: translateY(-1px);
}

.inspector-tabs {
  margin: 0 -14px 8px;
  padding: 9px 14px 0;
  background: linear-gradient(180deg, #fbfdfb 72%, rgba(251, 253, 251, 0));
  border-bottom-color: var(--line);
}

.inspector-tab {
  color: #6c7a73;
  letter-spacing: 0;
}

.inspector-tab:hover {
  color: var(--accent-dark);
  background: rgba(31, 111, 98, .06);
}

.inspector-tab.active {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

.inspector-tab.active::after {
  background: var(--gold);
}

.inspector-section .form-grid,
.selected-object-panel,
.checklist-card,
.voice-card,
.voice-training-card,
.support-suite,
.support-proof-grid,
.license-proof-list,
.course-board-style-panel,
.param-list,
.watermark-proof-card,
.range-row,
.status-box {
  border-color: var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(20, 34, 29, .04);
}

.inspector-section select,
.inspector-section input[type="text"],
.inspector-section input[type="number"],
.inspector-section textarea {
  border-color: var(--line);
  border-radius: 8px;
}

.inspector-section select:focus,
.inspector-section input:focus,
.inspector-section textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 98, .13);
}

.helper-text {
  color: var(--muted);
  font-style: normal;
}

.checklist-head span,
.selected-object-head em,
.tts-engine-tabs button.active,
.quick-adjust button.active {
  color: var(--accent-dark);
  background: #e7f2ed;
  border-color: rgba(31, 111, 98, .24);
}

.voice-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, #1f6f62, #b88636);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
}

.voice-option:hover,
.voice-option.active {
  border-color: rgba(31, 111, 98, .35);
  background: #f5faf6;
  box-shadow: 0 8px 18px rgba(31, 111, 98, .10);
}

.voice-sample-drop {
  border-color: rgba(31, 111, 98, .30);
  background: #f6faf7;
}

.voice-sample-drop:hover {
  border-color: var(--accent);
  background: #edf6f1;
}

.range-row b {
  color: var(--accent-dark);
}

.inspector-section input[type="range"]::-webkit-slider-thumb {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(31, 111, 98, .28);
}

.inspector-section input[type="range"]::-moz-range-thumb {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(31, 111, 98, .28);
}

.support-proof-grid {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.support-proof-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  box-shadow: none;
}

.support-proof-card:hover {
  border-color: rgba(31, 111, 98, .32);
  box-shadow: 0 8px 18px rgba(31, 111, 98, .09);
}

.proof-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.proof-card-head em {
  border-radius: 8px;
  padding: 3px 7px;
  color: #ffffff;
  background: var(--accent);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.proof-card-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.support-proof-card strong {
  color: var(--ink);
  font-size: 13px;
}

.support-proof-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.support-proof-card li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  color: var(--muted);
  background: #f7faf8;
  font-size: 11px;
  font-weight: 800;
}

.course-board-style,
.license-proof-item,
.param-list div {
  border-radius: 8px;
}

.toast {
  border: 1px solid rgba(31, 111, 98, .18);
  border-radius: 8px;
  color: #ffffff;
  background: #183a33;
  box-shadow: 0 16px 34px rgba(20, 34, 29, .24);
}

/* Acceptance polish: unify the editor around the bidding-demo proof flow. */
:root {
  --proof-accent: #25756c;
  --proof-accent-dark: #165f57;
  --proof-accent-soft: rgba(37, 117, 108, .11);
  --proof-gold: #c9912e;
  --proof-gold-soft: rgba(201, 145, 46, .15);
  --proof-panel: #f7f9fb;
  --proof-border: #dbe5e8;
  --proof-ink: #1e293b;
}

.ambient-bg {
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 117, 108, .10), transparent 31%),
    radial-gradient(circle at 82% 82%, rgba(201, 145, 46, .10), transparent 32%),
    #eef2f6;
}

.blob {
  display: none;
}

.stage-column,
.inspector-panel {
  background: var(--proof-panel) !important;
  backdrop-filter: none;
}

.inspector-panel {
  border-left: 1px solid var(--proof-border);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .72);
}

.inspector-tabs {
  background: linear-gradient(180deg, rgba(247, 249, 251, .98) 70%, rgba(247, 249, 251, 0));
  border-bottom-color: var(--proof-border);
}

.inspector-tab {
  letter-spacing: 0;
}

.inspector-tab:hover {
  color: var(--proof-accent-dark);
  background: var(--proof-accent-soft);
}

.inspector-tab.active {
  color: var(--proof-accent-dark);
  border-bottom-color: var(--proof-accent);
}

.inspector-tab.active::after {
  background: var(--proof-gold);
}

.inspector-section .form-grid,
.selected-object-panel,
.checklist-card,
.voice-card,
.voice-training-card,
.watermark-proof-card,
.support-proof-card,
.param-list div,
.range-row {
  border-color: var(--proof-border);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 24, 32, .045);
}

.inspector-section select:focus,
.inspector-section input:focus,
.inspector-section textarea:focus,
.login-form input:focus {
  border-color: var(--proof-accent);
  box-shadow: 0 0 0 3px rgba(37, 117, 108, .14);
}

.inspector-panel .button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--proof-accent-dark), var(--proof-accent));
  box-shadow: 0 10px 22px rgba(22, 95, 87, .22);
}

.inspector-panel .button.primary:hover {
  box-shadow: 0 14px 28px rgba(22, 95, 87, .26);
}

.inspector-panel .button.secondary:hover,
.quick-adjust button:hover,
.tts-engine-tabs button:hover,
.support-proof-card:hover,
.param-list div:hover {
  border-color: rgba(37, 117, 108, .35);
  color: var(--proof-accent-dark);
  background: #f1faf8;
  box-shadow: 0 8px 18px rgba(22, 95, 87, .08);
}

.acceptance-brief {
  border: 1px solid rgba(37, 117, 108, .18);
  border-radius: 8px;
  padding: 13px 14px;
  display: grid;
  gap: 4px;
  background:
    linear-gradient(135deg, rgba(37, 117, 108, .10), rgba(201, 145, 46, .08)),
    #ffffff;
  box-shadow: 0 10px 26px rgba(16, 24, 32, .05);
}

.acceptance-brief span {
  color: var(--proof-accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.acceptance-brief strong {
  color: var(--proof-ink);
  font-size: 15px;
  line-height: 1.28;
}

.acceptance-brief p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.proof-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.proof-card-head em,
.support-proof-card em {
  color: #3f2b05;
  background: #f4dfb8;
}

.proof-card-head span {
  margin: 0;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--proof-accent-dark);
  background: #e5f4f1;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.support-proof-card strong {
  font-size: 14px;
}

.support-proof-card ul {
  margin: 9px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
}

.support-proof-card li {
  position: relative;
  min-width: 0;
  padding-left: 11px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.support-proof-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--proof-accent);
}

.checklist-head span,
.voice-training-head span,
.mini-section-head span,
.support-suite-head span {
  color: var(--proof-accent-dark);
  background: #dff2ee;
}

.voice-mark {
  background: linear-gradient(135deg, var(--proof-accent), var(--proof-gold));
  box-shadow: inset -7px -7px 0 rgba(16, 24, 32, .13), 0 6px 14px rgba(22, 95, 87, .18);
}

.tts-engine-tabs button.active,
.voice-option.active,
.quick-adjust button.active {
  border-color: var(--proof-accent);
  color: var(--proof-accent-dark);
  background: linear-gradient(135deg, #eefaf7, #fff8e8);
}

.voice-option:hover {
  border-color: rgba(37, 117, 108, .35);
  box-shadow: 0 8px 18px rgba(22, 95, 87, .08);
}

.voice-sample-drop {
  border-color: rgba(37, 117, 108, .35);
  background: #f3fbf8;
}

.voice-sample-drop:hover {
  border-color: var(--proof-accent);
  background: #eefaf7;
}

.range-row b {
  color: var(--proof-accent-dark);
}

.inspector-section input[type="range"]::-webkit-slider-thumb {
  border-color: var(--proof-accent);
  box-shadow: 0 2px 7px rgba(22, 95, 87, .26);
}

.inspector-section input[type="range"]::-moz-range-thumb {
  border-color: var(--proof-accent);
  box-shadow: 0 2px 7px rgba(22, 95, 87, .26);
}

.status-box {
  color: var(--proof-accent-dark);
  border-color: rgba(37, 117, 108, .16);
  background: #eefaf7;
}

.watermark-proof-card {
  background: linear-gradient(135deg, #ffffff, #fbf8ef);
}

.support-proof-card {
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.support-proof-card:hover {
  transform: translateY(-1px);
}

.my-human-dock {
  border-color: rgba(37, 117, 108, .35);
  background: linear-gradient(135deg, #15262d, var(--proof-accent-dark));
  box-shadow: 0 18px 38px rgba(7, 18, 24, .28);
}

.avatar-card.active .avatar-face {
  border-color: var(--proof-gold);
  box-shadow:
    0 0 0 2px rgba(37, 117, 108, .80),
    0 0 0 4px rgba(201, 145, 46, .34),
    inset 0 -16px 24px rgba(0, 0, 0, .16);
}

.avatar-face .active-badge,
.scene-thumb .active-badge {
  background: var(--proof-accent);
}

.timeline-head .toggle input:checked + span,
.timeline-clip.active .clip-badge {
  background: var(--proof-accent);
}

.timeline-zoom input {
  background: linear-gradient(to right, var(--proof-accent) 0%, var(--proof-accent) 50%, #e5e7eb 50%, #e5e7eb 100%);
}

.timeline-zoom input::-webkit-slider-thumb,
.timeline-zoom input::-moz-range-thumb {
  background: var(--proof-accent);
  box-shadow: 0 1px 3px rgba(22, 95, 87, .34);
}

.timeline-add:hover {
  border-color: var(--proof-accent);
  color: var(--proof-accent-dark);
  background: #eefaf7;
}

.timeline-progress,
.timeline-progress::before,
.timeline-progress::after {
  background: var(--proof-accent) !important;
}

.timeline-progress::before {
  box-shadow: 0 1px 3px rgba(22, 95, 87, .34);
}

.time-readout,
.timeline-time-input {
  color: var(--proof-accent-dark);
}

.timeline-time-input:hover,
.timeline-time-input:focus {
  border-color: rgba(37, 117, 108, .28);
  box-shadow: 0 4px 14px rgba(22, 95, 87, .10);
}

.timeline-auto-extend {
  border-color: rgba(37, 117, 108, .24);
  color: var(--proof-accent-dark);
}

.clip-badge {
  background: var(--proof-accent);
}

.timeline-clip.active {
  box-shadow: 0 0 0 2px var(--proof-accent), 0 0 0 4px rgba(37, 117, 108, .20), 0 4px 10px rgba(15, 23, 42, .20);
}

body.timeline-is-playing .canvas-page::before {
  background: rgba(22, 95, 87, .92);
  box-shadow: 0 4px 12px rgba(22, 95, 87, .34);
}

@media (max-width: 1380px) {
  .support-proof-card ul {
    grid-template-columns: 1fr;
  }
}

/* Final demo polish: make the proof path readable even when the admin library is empty. */
.topbar {
  background: linear-gradient(90deg, #0f252b 0%, #1d5f57 66%, #8a6628 100%);
}

.topbar .button.secondary {
  color: #18313a;
  background: rgba(255, 255, 255, .88);
  border-color: rgba(255, 255, 255, .36);
}

.topbar .button.primary {
  color: #10564e;
  background: #fffaf0;
}

.template-card {
  min-height: 132px;
  background: #15242d;
}

.template-preview::after {
  background:
    linear-gradient(180deg, rgba(10, 18, 24, .02), rgba(10, 18, 24, .62)),
    linear-gradient(90deg, rgba(10, 18, 24, .45), rgba(10, 18, 24, 0));
}

.template-info {
  align-items: flex-end;
  gap: 10px;
}

.template-info strong {
  font-size: 14px;
  line-height: 1.25;
}

.template-info small {
  max-width: 19ch;
  line-height: 1.35;
  white-space: normal;
}

.template-card.active::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 2;
  border: 2px solid rgba(255, 250, 240, .86);
  border-radius: 6px;
  pointer-events: none;
}

.canvas-page:not(.template-clean-view) .template-title,
.canvas-page:not(.template-clean-view) .template-ribbon,
.canvas-page:not(.template-clean-view) .subtitle-card {
  animation: none;
  text-shadow: none;
}

.canvas-page:not(.template-clean-view) .template-title {
  left: 7%;
  top: 8%;
  max-width: 48%;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  background: rgba(10, 26, 32, .72);
  box-shadow: 0 16px 30px rgba(10, 26, 32, .18);
  font-size: clamp(22px, 2.8vw, 34px);
  text-wrap: balance;
}

.canvas-page:not(.template-clean-view) .template-ribbon {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--proof-accent-dark);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 18px rgba(10, 26, 32, .11);
  font-size: clamp(12px, 1.35vw, 15px);
  line-height: 1.2;
}

.canvas-page:not(.template-clean-view) .ribbon-one {
  left: 7%;
  top: 27%;
  transform: none;
}

.canvas-page:not(.template-clean-view) .ribbon-two {
  left: 7%;
  right: auto;
  top: 35.5%;
  transform: none;
}

.canvas-page:not(.template-clean-view) .ribbon-three {
  left: 7%;
  bottom: auto;
  top: 44%;
  transform: none;
}

.canvas-page:not(.template-clean-view) .subtitle-card {
  bottom: 6%;
  width: min(66%, 520px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  background: rgba(15, 32, 38, .82);
  box-shadow: 0 14px 28px rgba(10, 26, 32, .20);
}

.canvas-page:not(.template-clean-view) .digital-human {
  left: 72%;
  bottom: 8%;
}

.canvas-page:not(.template-clean-view) .digital-human.has-human-media {
  width: 190px;
  height: 280px;
}

.canvas-page:not(.template-clean-view) .canvas-logo {
  width: 42px;
}

.support-proof-grid {
  grid-template-columns: 1fr;
}

.support-proof-card {
  padding: 12px 13px;
}

.support-proof-card ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.play-button,
.timeline-help,
.timeline-resize-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--proof-accent-dark), var(--proof-accent));
  box-shadow: 0 12px 24px rgba(22, 95, 87, .22);
}

.timeline-help:hover,
.timeline-resize-btn:hover,
.timeline-resize-btn:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .52);
  box-shadow: 0 12px 24px rgba(22, 95, 87, .24), 0 0 0 4px rgba(37, 117, 108, .12);
}

.my-human-dock {
  left: 76px;
  bottom: 14px;
  width: 188px;
  min-height: 58px;
  place-items: start;
  align-content: center;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
}

.my-human-dock span {
  color: #dff2ee;
  font-size: 12px;
}

.my-human-dock strong,
.my-human-dock em {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

.my-human-dock strong {
  max-width: 100%;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-human-dock em {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-style: normal;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(37, 117, 108, .46);
  outline-offset: 2px;
}

/* Demo readiness card: turns the tender requirements into a presenter-friendly checklist. */
.demo-readiness-panel {
  border: 1px solid rgba(37, 117, 108, .18);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(246, 251, 249, .96)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(16, 24, 32, .055);
}

.demo-readiness-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.demo-readiness-head span,
.demo-gap-list strong {
  color: var(--proof-accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.demo-readiness-head strong {
  display: block;
  margin-top: 3px;
  color: var(--proof-ink);
  font-size: 15px;
  line-height: 1.25;
}

.demo-readiness-head em {
  flex: 0 0 auto;
  border-radius: 7px;
  padding: 4px 8px;
  color: #3f2b05;
  background: #f4dfb8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.demo-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.demo-coverage-item {
  position: relative;
  min-height: 98px;
  border: 1px solid var(--proof-border);
  border-radius: 8px;
  padding: 10px 10px 10px 12px;
  display: grid;
  align-content: start;
  gap: 5px;
  background: #ffffff;
}

.demo-coverage-item::before {
  content: "";
  position: absolute;
  inset: 10px auto auto 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--proof-accent);
  box-shadow: 0 0 0 4px rgba(37, 117, 108, .10);
}

.demo-coverage-item b {
  margin-left: 12px;
  color: var(--proof-accent-dark);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.demo-coverage-item strong {
  color: var(--proof-ink);
  font-size: 13px;
  line-height: 1.25;
  text-wrap: balance;
}

.demo-coverage-item span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  text-wrap: pretty;
}

.demo-gap-list {
  border: 1px solid rgba(201, 145, 46, .18);
  border-radius: 8px;
  padding: 11px;
  display: grid;
  gap: 7px;
  background: linear-gradient(135deg, #fffaf0 0%, #fbf8ef 100%);
}

.demo-gap-list span {
  position: relative;
  padding-left: 12px;
  color: #5f6673;
  font-size: 12px;
  line-height: 1.35;
}

.demo-gap-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--proof-gold);
}

.acceptance-export-card {
  border: 1px solid rgba(37, 117, 108, .18);
  border-radius: 8px;
  padding: 11px 12px;
  display: grid;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(246, 251, 249, .96)),
    #ffffff;
}

.acceptance-export-card strong {
  color: var(--proof-ink);
  font-size: 13px;
  font-weight: 900;
}

.acceptance-export-card span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.acceptance-package-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.acceptance-package-metrics span {
  min-height: 44px;
  border: 1px solid rgba(31, 111, 98, .14);
  border-radius: 7px;
  padding: 6px 7px;
  display: grid;
  align-content: center;
  gap: 1px;
  color: #5f6673;
  background: rgba(255, 255, 255, .72);
  text-align: center;
}

.acceptance-package-metrics b {
  color: #164f47;
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.acceptance-package-list {
  display: grid;
  gap: 6px;
  max-height: 314px;
  overflow: auto;
  padding-right: 2px;
}

.acceptance-package-row {
  border-top: 1px solid rgba(100, 116, 139, .12);
  border-left: 3px solid #c9912e;
  padding: 7px 8px 7px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 7px;
  background: rgba(255, 249, 237, .72);
}

.acceptance-package-row.is-ready {
  border-left-color: #1f6f62;
  background: rgba(31, 111, 98, .065);
}

.acceptance-package-row.is-pending {
  border-left-color: #b88636;
}

.acceptance-package-row.is-missing {
  border-left-color: #c9912e;
}

.acceptance-package-row > span {
  grid-row: span 2;
  align-self: start;
  border-radius: 6px;
  padding: 2px 5px;
  color: #6b4b12;
  background: #f4dfb8;
  font-size: 10px;
  line-height: 1.2;
}

.acceptance-package-row.is-ready > span {
  color: #164f47;
  background: #dcefe8;
}

.acceptance-package-row strong {
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.acceptance-package-row em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.demo-flow-panel {
  border: 1px solid rgba(22, 95, 87, .20);
  border-radius: 12px;
  padding: 13px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, #10242c 0%, #173941 58%, #1c4c46 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(7, 18, 24, .18);
}

.demo-flow-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.demo-flow-head span {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-weight: 900;
}

.demo-flow-head strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.25;
}

.demo-flow-head em {
  flex: 0 0 auto;
  max-width: 150px;
  border-radius: 7px;
  padding: 4px 8px;
  color: #12312d;
  background: #dff2ee;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.35;
  text-align: right;
}

.demo-flow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-flow-step {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 5px;
  color: #ffffff;
  background: rgba(255, 255, 255, .075);
  text-align: left;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.demo-flow-step:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 242, 238, .42);
  background: rgba(255, 255, 255, .12);
}

.demo-flow-step:active {
  transform: translateY(0);
}

.demo-flow-step b {
  width: max-content;
  border-radius: 6px;
  padding: 2px 6px;
  color: #12312d;
  background: #f4dfb8;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.demo-flow-step strong {
  font-size: 13px;
  line-height: 1.25;
}

.demo-flow-step span {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  line-height: 1.35;
}

.demo-flow-panel[data-state="ready"] .demo-flow-head em {
  color: #0f5132;
  background: #dcfce7;
}

.demo-flow-panel[data-state="done"] .demo-flow-head em {
  color: #3f2b05;
  background: #f4dfb8;
}

@media (max-width: 1380px) {
  .demo-coverage-grid,
  .demo-flow-steps {
    grid-template-columns: 1fr;
  }
}

/* Final demo polish guard: keep the visible surface calm, green-gold, and tender-focused. */
.ambient-bg,
.blob {
  display: none !important;
}

.topbar {
  background: linear-gradient(90deg, #10211d 0%, #1f6f62 64%, #8b6426 100%) !important;
}

.inspector-tab.active {
  color: #164f47 !important;
  border-bottom-color: #1f6f62 !important;
}

.inspector-tab.active::after {
  background: #b88636 !important;
}

.inspector-section select:focus,
.inspector-section input:focus,
.inspector-section textarea:focus {
  border-color: #1f6f62 !important;
  box-shadow: 0 0 0 3px rgba(31, 111, 98, .13) !important;
}

.button.primary,
.inspector-panel .button.primary,
.bid-proof-link {
  color: #ffffff !important;
  background: #1f6f62 !important;
  border-color: rgba(31, 111, 98, .22) !important;
  box-shadow: 0 10px 22px rgba(31, 111, 98, .18) !important;
}

.button.primary:hover,
.inspector-panel .button.primary:hover,
.bid-proof-link:hover {
  background: #164f47 !important;
}

.bid-brief-card {
  display: grid;
  gap: 12px;
  margin: 14px 0 10px;
  border: 1px solid rgba(31, 111, 98, .20);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(20, 34, 29, .07);
}

.bid-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bid-brief-head span {
  color: #64746d;
  font-size: 12px;
  font-weight: 900;
}

.bid-brief-head strong {
  color: #14221d;
  font-size: 14px;
}

.bid-brief-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.bid-brief-meta span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dce7df;
  border-radius: 8px;
  padding: 0 8px;
  color: #164f47;
  background: #f4f8f4;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.bid-proof-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}

.bid-proof-link:hover {
  transform: translateY(-1px);
}

.support-proof-card em,
.proof-card-head em,
.clip-badge {
  background: #1f6f62 !important;
}

.support-proof-card:hover,
.timeline-clip:hover,
.timeline-clip.active {
  border-color: rgba(31, 111, 98, .45) !important;
}

/* Final presenter-view fixes. */
.bid-brief-card .demo-route-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

.bid-brief-card .demo-route-actions button {
  appearance: none;
  min-height: 32px !important;
  border: 1px solid #dce7df !important;
  border-radius: 8px !important;
  padding: 0 8px !important;
  color: #164f47 !important;
  background: #f7faf7 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-align: center !important;
}

.bid-brief-card .demo-route-actions button:hover {
  color: #ffffff !important;
  background: #1f6f62 !important;
}

.acceptance-meter {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf3ef;
  box-shadow: inset 0 1px 2px rgba(20, 34, 29, .08);
}

.acceptance-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--proof-accent-dark), var(--proof-accent), var(--proof-gold));
}

.acceptance-gap-list {
  display: grid;
  gap: 6px;
}

.acceptance-gap-list span {
  position: relative;
  min-height: 28px;
  border: 1px solid #eadfca;
  border-radius: 7px;
  padding: 6px 8px 6px 23px;
  color: #6b4b12;
  background: #fff9ed;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.acceptance-gap-list span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--proof-gold);
}

.bid-proof-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bid-proof-actions .bid-proof-link:first-child {
  grid-column: 1 / -1;
}

.bid-proof-link {
  border: 1px solid rgba(31, 111, 98, .22);
  color: #ffffff;
  background: #1f6f62;
  box-shadow: 0 9px 20px rgba(31, 111, 98, .15);
}

.bid-proof-link.secondary {
  color: #164f47;
  background: #f4f8f4;
  box-shadow: none;
}

.bid-proof-link.secondary:hover {
  color: #ffffff;
}

.timeline-head {
  grid-template-columns: minmax(238px, auto) minmax(118px, 1fr) minmax(94px, 118px);
  gap: 10px;
  padding-inline: 10px;
}

.timeline-tools {
  justify-content: center;
  gap: 8px;
}

.timeline-head .keyword-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  justify-content: center;
}

.timeline-head .keyword-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.keyword-arrow {
  width: 15px;
  height: 15px;
  color: var(--proof-accent-dark);
}

.timeline-zoom {
  min-width: 0;
}

.timeline-zoom input {
  width: 72px;
}

.timeline-time-input {
  width: 88px;
}

.timeline-time-input.duration {
  width: 96px;
}

.stage-area {
  overflow: hidden;
}

.canvas-page {
  width: min(calc(100% - 28px), 1520px);
}

.canvas-page:not(.template-clean-view) .subtitle-card {
  left: 42%;
  width: min(58%, 420px);
  transform: translateX(-50%);
  font-size: clamp(17px, 2.2vw, 27px);
  line-height: 1.24;
  overflow-wrap: anywhere;
}

@media (min-width: 1540px) {
  .timeline-head {
    grid-template-columns: minmax(250px, auto) minmax(190px, 1fr) minmax(128px, 150px);
  }

  .timeline-head .keyword-button {
    width: auto;
    min-width: 0;
    padding: 0 10px;
  }

  .timeline-head .keyword-button span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .timeline-zoom input {
    width: 96px;
  }
}

/* Bid acceptance board: make the right rail read like a proof dashboard. */
.bid-brief-card {
  gap: 10px !important;
  padding: 13px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(250, 253, 250, .96)),
    repeating-linear-gradient(135deg, rgba(31, 111, 98, .045) 0 1px, transparent 1px 9px) !important;
}

.bid-brief-head {
  align-items: flex-start !important;
}

.bid-brief-head span {
  color: #52635d !important;
  font-size: 11px !important;
  letter-spacing: .08em !important;
}

.bid-brief-head strong {
  max-width: 190px;
  color: #10211d !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  text-align: right;
}

.acceptance-meter {
  height: 8px;
  overflow: hidden;
  border: 1px solid #dce7df;
  border-radius: 999px;
  background: #edf3ef;
}

.acceptance-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f6f62, #b88636);
  box-shadow: 0 0 14px rgba(31, 111, 98, .20);
}

.bid-brief-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.bid-brief-meta span {
  min-height: 34px !important;
  padding: 4px 7px !important;
  line-height: 1.25 !important;
}

.acceptance-gap-list {
  display: grid;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid rgba(184, 134, 54, .28);
  border-radius: 8px;
  background: rgba(184, 134, 54, .075);
}

.acceptance-gap-list span {
  position: relative;
  padding-left: 13px;
  color: #5e4a22;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.acceptance-gap-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .56em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b88636;
}

.acceptance-gap-list span.is-ready {
  border-color: rgba(31, 111, 98, .24);
  color: #164f47;
  background: rgba(31, 111, 98, .08);
}

.acceptance-gap-list span.is-ready::before {
  background: #1f6f62;
  box-shadow: 0 0 0 3px rgba(31, 111, 98, .10);
}

.bid-proof-actions {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 8px;
}

.bid-proof-link {
  border: 1px solid rgba(31, 111, 98, .22);
  cursor: pointer;
}

.bid-proof-link.secondary {
  color: #164f47 !important;
  background: #f4f8f4 !important;
  box-shadow: none !important;
}

.bid-proof-link.secondary:hover {
  color: #ffffff !important;
  background: #164f47 !important;
}

.inspector-panel .button.secondary:hover,
.quick-adjust button:hover,
.voice-option:hover,
.support-proof-card:hover {
  background: #f3f8f4 !important;
  border-color: rgba(31, 111, 98, .34) !important;
  color: #164f47 !important;
}

.voice-mark,
.tts-engine-tabs button.active,
.quick-adjust button.active,
.checklist-head span,
.selected-object-head em {
  background: linear-gradient(135deg, rgba(31, 111, 98, .14), rgba(184, 134, 54, .16)) !important;
  color: #164f47 !important;
  box-shadow: none !important;
}

.inspector-section input[type="range"]::-webkit-slider-thumb {
  border-color: #1f6f62 !important;
  box-shadow: 0 2px 8px rgba(31, 111, 98, .25) !important;
}

.inspector-section input[type="range"]::-moz-range-thumb {
  border-color: #1f6f62 !important;
  box-shadow: 0 2px 8px rgba(31, 111, 98, .25) !important;
}

.status-box {
  background: #f4f8f4 !important;
  color: #164f47 !important;
  border-color: #dce7df !important;
}

/* App polish: presenter shortcuts and explicit background-music randomization. */
#demoRouteBtn {
  color: #164f47;
  background: #f4f8f4;
  border-color: rgba(255, 255, 255, .46);
}

#demoRouteBtn:hover {
  color: #10211d;
  background: #ffffff;
}

.demo-route-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.demo-route-actions button {
  min-height: 32px;
  border: 1px solid #dce7df;
  border-radius: 8px;
  padding: 0 8px;
  color: #164f47;
  background: #f7faf7;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.demo-route-actions button:hover {
  border-color: rgba(31, 111, 98, .38);
  color: #ffffff;
  background: #1f6f62;
  transform: translateY(-1px);
}

.demo-route-actions button:active {
  transform: translateY(0);
}

.clone-capture-card {
  border: 1px solid rgba(31, 111, 98, .20);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 11px;
  background:
    linear-gradient(135deg, rgba(239, 248, 244, .92), rgba(255, 249, 237, .90)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88);
}

.clone-capture-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.clone-capture-head span {
  color: #164f47;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.clone-capture-head strong {
  display: block;
  margin-top: 3px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.25;
}

.clone-capture-head em {
  flex: 0 0 auto;
  border-radius: 7px;
  padding: 4px 8px;
  color: #3f2b05;
  background: #f4dfb8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.clone-capture-card[data-state="ready"] .clone-capture-head em,
.clone-capture-card[data-state="done"] .clone-capture-head em {
  color: #0f5132;
  background: #dcfce7;
}

.clone-capture-card[data-state="busy"] .clone-capture-head em {
  color: #5e4a22;
  background: #fff3cf;
}

.clone-capture-card[data-state="error"] .clone-capture-head em {
  color: #7f1d1d;
  background: #fee2e2;
}

.clone-capture-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.clone-capture-points span {
  border: 1px solid rgba(31, 111, 98, .16);
  border-radius: 7px;
  padding: 7px 8px;
  color: #4b5563;
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 1.25;
}

.clone-capture-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#demoStepCaptureBtn {
  grid-column: 1 / -1;
  min-height: 82px;
  border-color: rgba(244, 223, 184, .38);
  background: rgba(244, 223, 184, .12);
}

#randomBgmBtn,
#randomBgmModalBtn {
  border-color: rgba(184, 134, 54, .32) !important;
  color: #5e4a22 !important;
  background: #fff9ed !important;
}

#randomBgmBtn:hover,
#randomBgmModalBtn:hover {
  color: #ffffff !important;
  background: #8b6426 !important;
}

.background-music-toolbar {
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
}

.background-music-toolbar .status-box {
  margin: 0;
}

.demo-route-actions button.is-demo-active,
.demo-route-actions button[aria-current="step"] {
  border-color: rgba(31, 111, 98, .48) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1f6f62, #8b6426) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 18px rgba(31, 111, 98, .16);
}

.demo-flow-step.is-demo-active,
.demo-flow-step[aria-current="step"] {
  border-color: rgba(244, 223, 184, .62) !important;
  background: linear-gradient(135deg, rgba(31, 111, 98, .32), rgba(184, 134, 54, .22)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.demo-focus-pulse {
  position: relative;
  outline: 2px solid rgba(201, 145, 46, .72) !important;
  outline-offset: 3px;
  animation: demoFocusPulse 1.45s cubic-bezier(.16, 1, .3, 1);
}

@keyframes demoFocusPulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(201, 145, 46, .34);
  }

  42% {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 0 0 7px rgba(201, 145, 46, .16), 0 12px 24px rgba(31, 111, 98, .14);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 12px rgba(201, 145, 46, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-focus-pulse {
    animation: none;
  }
}

@media (max-width: 1380px) {
  .top-actions {
    gap: 7px;
  }

  .top-actions .button {
    padding-inline: 11px;
  }

  .demo-route-actions {
    grid-template-columns: 1fr;
  }

  .clone-capture-points,
  .clone-capture-actions {
    grid-template-columns: 1fr;
  }

  .background-music-toolbar {
    grid-template-columns: 1fr;
  }
}

.stage-area {
  padding: 24px 18px 26px !important;
  overflow: auto !important;
}

.canvas-page {
  width: min(100%, 1520px) !important;
}

.canvas-page.ratio-vertical {
  width: min(58%, 760px) !important;
}

.canvas-page.ratio-square {
  width: min(82%, 1200px) !important;
}

.canvas-page:not(.template-clean-view) .subtitle-card {
  left: 50% !important;
  right: auto !important;
  bottom: 5.5% !important;
  width: min(74%, 500px) !important;
  transform: translateX(-50%) !important;
  font-size: clamp(13px, 1.45vw, 16px) !important;
}

/* Proof-frame stability: first screenshots should show title, subtitle and presenter without clipping. */
.canvas-page:not(.template-clean-view) .template-title {
  left: 6.5% !important;
  top: 6.5% !important;
  max-width: 48% !important;
  font-size: clamp(20px, 2.2vw, 30px) !important;
  line-height: 1.18 !important;
}

.canvas-page:not(.template-clean-view) .subtitle-card {
  left: 39% !important;
  width: min(56%, 430px) !important;
  padding: 10px 14px !important;
  line-height: 1.42 !important;
}

.canvas-page:not(.template-clean-view) .digital-human {
  top: 30%;
  bottom: auto;
}

.canvas-page:not(.template-clean-view) .digital-human.scene-left {
  left: 9%;
}

.canvas-page:not(.template-clean-view) .digital-human.scene-right {
  left: 68%;
}

.canvas-page:not(.template-clean-view) .digital-human:not(.scene-left):not(.scene-right) {
  left: 39%;
}

.canvas-page:not(.template-clean-view) .digital-human.has-human-media {
  width: clamp(126px, 23%, 166px);
  height: clamp(188px, 62%, 248px);
}

/* Acceptance refinement: keep proof surfaces useful before real admin data exists. */
.template-empty-proof {
  border: 1px solid rgba(184, 134, 54, .26);
  border-radius: 8px;
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  color: #5e4a22;
  background: #fff9ed;
}

.template-empty-proof strong,
.template-empty-proof span {
  display: block;
}

.template-empty-proof strong {
  font-size: 13px;
  font-weight: 900;
}

.template-empty-proof span {
  color: #72551d;
  font-size: 12px;
  line-height: 1.42;
}

.demo-coverage-item.is-focus {
  border-color: rgba(31, 111, 98, .30);
  background:
    linear-gradient(135deg, rgba(31, 111, 98, .08), rgba(184, 134, 54, .08)),
    #ffffff;
}

.my-human-proof-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.my-human-proof-item {
  min-height: 74px;
  border: 1px solid rgba(223, 242, 238, .14);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  align-content: start;
  gap: 5px;
  background: rgba(255, 255, 255, .06);
}

.my-human-proof-item strong,
.my-human-proof-item span {
  display: block;
}

.my-human-proof-item strong {
  color: #f4dfb8;
  font-size: 12px;
  line-height: 1.25;
}

.my-human-proof-item span {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  line-height: 1.38;
}

.my-human-drawer .account-login-link {
  border-color: rgba(244, 223, 184, .45);
  color: #3f2b05;
  background: #f4dfb8;
}

.license-proof-item em {
  border-radius: 6px !important;
  color: #6b4b12 !important;
  background: #fff9ed !important;
}

@media (max-width: 360px) {
  .my-human-proof-list {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-01: bid audit + audio cockpit refinement */
.bid-brief-card {
  gap: 12px !important;
  padding: 14px !important;
  border: 1px solid rgba(31, 111, 98, .16);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(184, 134, 54, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 247, .98)) !important;
  box-shadow: 0 18px 32px rgba(17, 24, 39, .08);
}

.bid-brief-head strong {
  max-width: 220px;
  line-height: 1.4 !important;
}

.acceptance-priority-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.priority-chip {
  min-height: 34px;
  border: 1px solid rgba(31, 111, 98, .18);
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #164f47;
  background: rgba(244, 248, 244, .96);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.priority-chip.is-critical {
  border-color: rgba(184, 134, 54, .34);
  color: #6a4b12;
  background: rgba(255, 247, 228, .96);
}

.acceptance-gap-list {
  gap: 7px;
  padding: 10px 11px;
  border-radius: 10px;
}

.acceptance-gap-list span {
  padding-left: 15px;
  font-size: 12px;
  line-height: 1.42;
}

.bid-proof-actions {
  grid-template-columns: 1fr 1fr;
}

.bid-proof-actions .bid-proof-link:first-child {
  grid-column: 1 / -1;
}

.audio-overview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 98, .16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(241, 248, 244, .98), rgba(255, 251, 243, .98));
  box-shadow: 0 14px 28px rgba(17, 24, 39, .07);
}

.audio-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.audio-overview-head span {
  color: #557267;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.audio-overview-head strong {
  display: block;
  margin-top: 4px;
  color: #10211d;
  font-size: 14px;
  line-height: 1.35;
}

.audio-overview-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  color: #6a4b12;
  background: rgba(255, 243, 207, .96);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.audio-overview-card[data-state="partial"] .audio-overview-head em {
  color: #164f47;
  background: rgba(220, 252, 231, .96);
}

.audio-overview-card[data-state="ready"] .audio-overview-head em {
  color: #ffffff;
  background: linear-gradient(135deg, #1f6f62, #24534c);
}

.audio-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.audio-overview-item {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 11px;
  border: 1px solid rgba(31, 111, 98, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .82);
}

.audio-overview-item span {
  color: #6c7b75;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}

.audio-overview-item strong {
  color: #142033;
  font-size: 13px;
  line-height: 1.35;
}

.audio-overview-tip {
  margin: 0;
  color: #4d6359;
  font-size: 12px;
  line-height: 1.5;
}

.audio-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audio-actions .button {
  min-height: 42px;
}

#realTtsBtn {
  grid-column: 1 / -1;
}

#backgroundMusicManageBtn {
  background: rgba(255, 255, 255, .96);
}

#randomBgmBtn {
  border-style: dashed;
}

.demo-gap-list {
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(184, 134, 54, .22);
  background: linear-gradient(180deg, rgba(255, 249, 237, .9), rgba(255, 255, 255, .9));
}

.demo-gap-list strong {
  color: #5e4a22;
  font-size: 13px;
}

.demo-gap-list span {
  font-size: 12px;
  line-height: 1.42;
}

.demo-flow-panel {
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(17, 24, 39, .06);
}

.demo-flow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.demo-flow-step {
  min-height: 88px;
}

@media (max-width: 1180px) {
  .acceptance-priority-strip,
  .audio-overview-grid,
  .audio-actions,
  .demo-flow-steps {
    grid-template-columns: 1fr;
  }

  #realTtsBtn {
    grid-column: auto;
  }
}

/* Continuation polish: clearer proof drawer and non-cramped narrow viewport controls. */
.my-human-drawer {
  width: min(440px, calc(100vw - 104px)) !important;
  background: linear-gradient(180deg, #1b2d31 0%, #17262a 100%) !important;
}

.my-human-proof-list {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.my-human-proof-item {
  border-color: rgba(223, 242, 238, .18);
  background: rgba(255, 255, 255, .075);
}

@media (max-width: 360px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden !important;
  }

  .app-shell {
    width: 100%;
    min-width: 0 !important;
    height: auto !important;
    min-height: 100dvh;
    overflow-x: hidden;
    grid-template-rows: auto auto;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .project-strip,
  .service-pill,
  .top-actions {
    width: 100%;
    min-width: 0;
  }

  .top-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .top-actions .button,
  .top-actions a.button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
    word-break: keep-all;
    line-height: 1;
  }

  .editor-layout {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    grid-template-areas:
      "rail library"
      "rail stage"
      "rail inspector";
    align-items: start;
    overflow-x: hidden;
  }

  .tool-rail {
    grid-area: rail;
    min-height: calc(100dvh - 138px);
    padding-top: 10px;
  }

  .rail-item {
    min-height: 64px;
  }

  .library-panel {
    grid-area: library;
    width: 100%;
    min-width: 0;
    max-height: 610px;
    padding: 14px 12px 18px !important;
  }

  .stage-column {
    grid-area: stage;
    width: 100%;
    min-width: 0;
    min-height: auto !important;
    grid-template-rows: auto minmax(300px, auto) auto;
    overflow: hidden;
  }

  .stage-area {
    min-height: 300px;
    padding: 12px 8px !important;
    overflow: auto !important;
  }

  .canvas-toolbar,
  .timeline-bar {
    max-width: 100%;
    overflow-x: auto;
  }

  .canvas-page,
  .canvas-page.ratio-vertical,
  .canvas-page.ratio-square {
    width: min(100%, 664px) !important;
  }

  .inspector-panel {
    grid-area: inspector;
    grid-column: auto !important;
    width: 100%;
    min-width: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }

  .bid-brief-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .demo-route-actions,
  .demo-flow-steps,
  .clone-capture-actions,
  .clone-capture-points {
    grid-template-columns: 1fr !important;
  }

  .my-human-drawer {
    left: 72px;
    bottom: 84px;
    width: min(420px, calc(100vw - 86px)) !important;
  }

  .my-human-proof-list {
    grid-template-columns: 1fr;
  }
}
