:root {
  --bg: #f4f0e8;
  --surface: #fcfaf5;
  --surface-strong: #fffefb;
  --ink: #20231f;
  --muted: #75756e;
  --line: rgba(32, 35, 31, 0.12);
  --line-strong: rgba(32, 35, 31, 0.23);
  --coral: #d36550;
  --coral-deep: #a74737;
  --sage: #647f73;
  --sage-soft: #dfe8e2;
  --gold: #cda45b;
  --gold-soft: #f4e8cc;
  --dark: #1f2825;
  --red-soft: #f5dfda;
  --shadow: 0 22px 60px rgba(52, 42, 28, 0.09);
  --shadow-sm: 0 10px 28px rgba(52, 42, 28, 0.07);
  --font-sans: "Aptos", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(211, 101, 80, 0.25);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.sidebar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: var(--dark);
  color: #f8f3e9;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 12px;
  background: #f7f0e3;
}

.brand-ear {
  position: absolute;
  top: 8px;
  width: 8px;
  height: 9px;
  background: var(--dark);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.brand-ear.left {
  left: 9px;
  transform: rotate(-20deg);
}

.brand-ear.right {
  right: 9px;
  transform: rotate(20deg);
}

.brand-face {
  position: absolute;
  top: 15px;
  width: 16px;
  height: 13px;
  border-radius: 50% 50% 46% 46%;
  background: var(--dark);
}

.brand-face::before,
.brand-face::after {
  position: absolute;
  top: 5px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #f7f0e3;
  content: "";
}

.brand-face::before {
  left: 4px;
}

.brand-face::after {
  right: 4px;
}

.brand-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.03em;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.mobile-close {
  display: none;
}

.new-video-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fffaf0;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.new-video-button:hover {
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

.new-video-button > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--coral);
}

.new-video-button > span:last-child {
  display: grid;
  gap: 2px;
}

.new-video-button strong {
  font-size: 11px;
}

.new-video-button small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
}

.side-nav {
  display: grid;
  gap: 3px;
  margin-top: 19px;
}

.nav-link {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.nav-link.active {
  background: #f7f0e3;
  color: var(--dark);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.17);
}

.nav-link i {
  display: grid;
  min-width: 23px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 8px;
  font-style: normal;
}

.nav-link.active i {
  background: rgba(31, 40, 37, 0.1);
}

.side-cast {
  margin-top: 28px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 9px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.side-heading em {
  color: #93b2a4;
  font-size: 7px;
  font-style: normal;
}

.side-cast-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 5px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.side-cast-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.side-cast-row img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  background: #eee2ce;
}

.side-cast-row span {
  font-size: 10px;
  font-weight: 600;
}

.side-cast-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #88a898;
  box-shadow: 0 0 0 3px rgba(136, 168, 152, 0.12);
}

.side-footer {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 7px;
}

.avatar-small {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #f4e7d2;
  color: #513c2c;
  font-family: var(--font-display);
}

.side-footer > div:nth-child(2) {
  display: grid;
}

.side-footer strong {
  font-size: 9px;
}

.side-footer small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 7px;
}

.side-footer button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 232, 0.86);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b887f;
  font-size: 9px;
  font-weight: 700;
}

.breadcrumb strong {
  color: var(--ink);
}

.breadcrumb i {
  font-style: normal;
  opacity: 0.43;
}

.mode-pill,
.readonly-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--sage-soft);
  color: #4d695d;
  font-size: 7px;
  font-weight: 700;
}

.readonly-pill .icon {
  width: 12px;
  height: 12px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.68);
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.icon-button.dark {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
}

.notify-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--bg);
  border-radius: 50%;
  background: var(--coral);
}

.avatar-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--coral);
  color: #fff9f0;
  font-family: var(--font-display);
  cursor: pointer;
}

.mobile-menu {
  display: none;
}

.main-content {
  padding: 32px;
}

.view {
  display: none;
  max-width: 1460px;
  margin: 0 auto;
}

.view.active {
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: #89867e;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.dashboard-heading,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.dashboard-heading h1,
.page-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(33px, 3.5vw, 54px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.dashboard-heading > div > p:last-child,
.page-heading > div > p:last-child {
  max-width: 650px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.page-heading.compact h1 {
  font-size: clamp(30px, 3vw, 44px);
}

.back-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.back-action:hover {
  color: var(--coral);
}

.back-action.square {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.primary-button,
.dark-button,
.quiet-button,
.glass-button,
.generate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button {
  background: var(--coral);
  color: #fff9ef;
  box-shadow: 0 10px 22px rgba(174, 67, 50, 0.18);
}

.primary-button:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.dark-button {
  background: var(--dark);
  color: #fff9ef;
}

.dark-button:hover {
  background: #0f1512;
}

.quiet-button {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.quiet-button:hover {
  background: var(--surface);
  color: var(--ink);
}

.glass-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: #fffaf0;
  backdrop-filter: blur(10px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--red-soft);
  color: #934938;
  font-size: 7px;
  font-weight: 800;
}

.status-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 2.1s ease-in-out infinite;
}

.section-title-row h2,
.panel-heading h2,
.wizard-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

.generation-track,
.player-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 40, 37, 0.11);
}

.generation-track span,
.player-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 200ms ease;
}

.source-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
}

.source-icon.coral {
  background: var(--red-soft);
  color: var(--coral-deep);
}

.source-icon.gold {
  background: var(--gold-soft);
  color: #906b2a;
}

.source-icon.sage {
  background: var(--sage-soft);
  color: #47685b;
}

.dashboard-section {
  margin-top: 30px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.section-title-row h2 {
  font-size: 23px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  color: var(--coral);
}

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

.cast-card {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  min-height: 124px;
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 250, 245, 0.76);
}

.cast-card img {
  align-self: end;
  width: 92px;
  height: 92px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.cast-card-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.cast-card-info h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.cast-card-info p {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 8px;
}

.cast-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cast-tags span {
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(31, 40, 37, 0.05);
  color: #706d65;
  font-size: 7px;
}

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

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 250, 245, 0.76);
  text-align: left;
  cursor: pointer;
  transition: 170ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.project-cover {
  position: relative;
  height: 145px;
  overflow: hidden;
  background: linear-gradient(150deg, #a8c3bc, #e2c491);
}

.project-cover img {
  position: absolute;
  bottom: -9%;
  width: 44%;
  mix-blend-mode: multiply;
}

.project-cover img:nth-child(1) {
  left: 5%;
}

.project-cover img:nth-child(2) {
  right: 5%;
}

.project-cover span {
  position: absolute;
  z-index: 3;
  top: 11px;
  right: 11px;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(255, 250, 238, 0.84);
  font-size: 7px;
  font-weight: 800;
}

.project-card-body {
  padding: 14px;
}

.project-card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.project-card-body p {
  margin: 6px 0 11px;
  color: var(--muted);
  font-size: 8px;
}

.project-card-meta {
  display: flex;
  gap: 10px;
  color: #8d8a81;
  font-size: 7px;
}

.wizard-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.wizard-steps {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  gap: 6px;
  padding: 26px 20px;
  border-right: 1px solid var(--line);
  background: #ebe4d8;
}

.wizard-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  color: #77746c;
}

.wizard-step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(31, 40, 37, 0.14);
  border-radius: 9px;
  font-size: 8px;
  font-weight: 800;
}

.wizard-step div {
  display: grid;
  gap: 2px;
}

.wizard-step strong {
  font-size: 10px;
}

.wizard-step small {
  font-size: 7px;
}

.wizard-step.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.wizard-step.active > span {
  border-color: var(--dark);
  background: var(--dark);
  color: white;
}

.wizard-step.done > span {
  border-color: var(--sage);
  background: var(--sage);
  color: white;
}

.wizard-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: auto;
  padding: 12px;
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.55);
  color: #77746c;
}

.wizard-note .icon {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
}

.wizard-note p {
  margin: 0;
  font-size: 8px;
  line-height: 1.6;
}

.wizard-panel {
  padding: 34px;
}

.wizard-page {
  display: none;
}

.wizard-page.active {
  display: block;
  animation: page-in 200ms ease-out;
}

.wizard-title > span {
  color: var(--coral);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wizard-title h2 {
  margin-top: 7px;
  font-size: 29px;
}

.wizard-title p {
  margin: 7px 0 24px;
  color: var(--muted);
  font-size: 9px;
}

.source-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.source-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.source-tab.active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(55, 44, 31, 0.08);
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.field > span,
.field-label {
  color: #65635d;
  font-size: 8px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 10px;
}

.field input,
.field select {
  height: 44px;
  padding: 0 12px;
}

.field textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.7;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(211, 101, 80, 0.52);
  box-shadow: 0 0 0 3px rgba(211, 101, 80, 0.08);
}

.source-pane {
  display: none;
}

.source-pane.active {
  display: block;
}

.drop-zone {
  display: grid;
  min-height: 183px;
  margin-top: 17px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed rgba(31, 40, 37, 0.23);
  border-radius: 14px;
  background: rgba(244, 240, 232, 0.45);
  text-align: center;
  cursor: pointer;
}

.drop-zone:hover {
  border-color: var(--coral);
  background: rgba(252, 250, 245, 0.8);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: var(--red-soft);
  color: var(--coral-deep);
}

.drop-zone strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.drop-zone small {
  color: var(--muted);
  font-size: 8px;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.file-list span {
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--sage-soft);
  color: #45685a;
  font-size: 7px;
}

.url-input {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-strong);
}

.url-input input {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.url-input .icon {
  color: #8f8b82;
}

.inline-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #8c887f;
  font-size: 8px;
}

.inline-tip .icon {
  width: 12px;
  height: 12px;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

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

.wizard-cast-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 170px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  text-align: left;
  cursor: pointer;
}

.wizard-cast-card.selected {
  border-color: var(--dark);
  box-shadow: inset 0 0 0 1px var(--dark);
}

.wizard-cast-card img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.wizard-cast-card strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.wizard-cast-card small {
  color: var(--muted);
  font-size: 7px;
}

.select-check {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
}

.wizard-cast-card.selected .select-check {
  border-color: var(--sage);
  background: var(--sage);
  color: white;
}

.select-check .icon {
  width: 10px;
  height: 10px;
}

.wizard-option-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 22px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control button.active {
  background: var(--dark);
  color: white;
}

.field-value {
  color: var(--accent);
  font-weight: 700;
}

.field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.duration-control {
  margin-top: 8px;
}

.duration-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.duration-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.voice-preview {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 12px;
  border-radius: 11px;
  background: rgba(100, 127, 115, 0.08);
}

.voice-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5c675f;
  font-size: 8px;
}

.voice-preview-row .icon {
  width: 13px;
  height: 13px;
}

.review-summary {
  display: grid;
  gap: 10px;
}

.summary-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
}

.summary-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 11px;
  background: var(--sage-soft);
  color: #4b6b5e;
}

.summary-card div:nth-child(2) {
  display: grid;
  gap: 3px;
}

.summary-card strong {
  font-size: 10px;
}

.summary-card small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.summary-card > span {
  color: #8d897f;
  font-size: 8px;
  font-weight: 700;
}

.project-list-large {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.project-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1.5fr) minmax(110px, 0.5fr) minmax(90px, 0.4fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row:hover {
  background: var(--surface-strong);
}

.project-row-thumb {
  width: 58px;
  height: 48px;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(140deg, #a9c4bd, #e3c58f);
}

.project-row img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.project-row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.project-row p,
.project-row span {
  color: var(--muted);
  font-size: 8px;
}

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

.studio-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}

.studio-title .eyebrow {
  margin: 0 0 3px;
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phase-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(252, 250, 245, 0.6);
}

.phase {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: #959188;
}

.phase span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 7px;
}

.phase span .icon {
  width: 10px;
  height: 10px;
}

.phase b {
  font-size: 8px;
}

.phase.done {
  color: var(--sage);
}

.phase.done span {
  border-color: var(--sage);
  background: var(--sage);
  color: white;
}

.phase.active {
  color: var(--ink);
}

.phase.active span {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.phase-strip > i {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.studio-grid {
  display: grid;
  grid-template-columns: 242px minmax(420px, 1fr) 334px;
  align-items: start;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 250, 245, 0.82);
}

.shotboard,
.director-panel {
  padding: 15px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-heading .eyebrow {
  margin-bottom: 3px;
}

.panel-heading h2 {
  font-size: 18px;
}

.count-pill {
  display: grid;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  place-items: center;
  border-radius: 7px;
  background: #ede5d8;
  font-size: 7px;
  font-weight: 800;
}

.shot-list {
  display: grid;
  gap: 5px;
}

.shot-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 65px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.shot-item:hover {
  background: rgba(31, 40, 37, 0.04);
}

.shot-item.active {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.shot-item img,
.shot-stack {
  width: 66px;
  height: 51px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(145deg, #b2c8c1, #dfc58f);
}

.shot-item > img {
  object-fit: contain;
  mix-blend-mode: multiply;
}

.shot-stack {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.shot-stack img {
  width: 54%;
  height: 84%;
  margin-left: -16%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.shot-stack img:first-child {
  margin-left: 0;
}

.shot-item > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.shot-item b {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-item small {
  color: var(--muted);
  font-size: 7px;
}

.shot-item.accepted small {
  color: var(--sage);
}

.add-shot-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 35px;
  margin-top: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.preview-panel {
  overflow: hidden;
  background: var(--dark);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
}

.preview-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
}

.preview-head i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.style-chip {
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff8ec;
  font-size: 7px;
  font-weight: 800;
}

.preview-canvas {
  display: grid;
  min-height: 560px;
  padding: 18px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(125, 157, 143, 0.08), transparent 53%),
    #151d1a;
}

.video-frame {
  position: relative;
  width: min(58%, 303px);
  min-width: 250px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #87a7a4 0 55%, #d3ac73 55% 100%);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.video-sky {
  position: absolute;
  inset: 0 0 44%;
  background: linear-gradient(180deg, #789b9b, #e6c587);
}

.video-sea {
  position: absolute;
  right: -10%;
  bottom: 27%;
  left: -10%;
  height: 24%;
  border-radius: 50% 50% 0 0;
  background: #5f8581;
  transform: rotate(-2deg);
}

.video-sun {
  position: absolute;
  z-index: 1;
  top: 10%;
  right: 9%;
  width: 27%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e8b75f;
  box-shadow: 0 0 0 16px rgba(232, 183, 95, 0.09);
}

.video-pet {
  position: absolute;
  z-index: 2;
  bottom: -8%;
  width: 49%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 12px 13px rgba(67, 43, 20, 0.17));
}

.video-pet.cat-a {
  left: -3%;
}

.video-pet.dog {
  z-index: 3;
  right: 17%;
  bottom: -7%;
  width: 56%;
}

.video-pet.cat-b {
  right: -9%;
  bottom: -10%;
  width: 44%;
}

.video-topline {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.86);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.video-caption {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 18px;
  left: 16px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(26, 34, 31, 0.72);
  color: #fff8ec;
  font-size: 9px;
  text-align: center;
  backdrop-filter: blur(7px);
}

#generatedVideo {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #111;
  object-fit: contain;
}

#generatedPreview {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #111;
  object-fit: cover;
}

#generatedVideo[hidden] {
  display: none;
}

#generatedPreview[hidden] {
  display: none;
}

.generation-layer,
.review-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: none;
}

.video-frame.generating .generation-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(19, 27, 24, 0.83);
  color: #fff8ec;
  backdrop-filter: blur(8px);
}

.video-frame.ready .review-layer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-direction: column;
  padding: 18px;
  background: linear-gradient(180deg, transparent 50%, rgba(13, 20, 17, 0.84));
}

.spinner {
  width: 43px;
  height: 43px;
  margin-bottom: 15px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.generation-layer strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.generation-layer p {
  margin: 6px 0 15px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
}

.generation-track {
  width: 138px;
  background: rgba(255, 255, 255, 0.13);
}

.generation-track span {
  background: var(--gold);
}

.ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  background: rgba(22, 31, 27, 0.68);
  color: #fff8ec;
  font-size: 7px;
  font-weight: 700;
}

.ready-pill .icon {
  width: 11px;
  height: 11px;
}

.review-layer > div {
  display: flex;
  gap: 7px;
  width: 100%;
}

.review-layer .primary-button,
.review-layer .glass-button {
  flex: 1;
  min-height: 37px;
  padding: 0 8px;
  font-size: 8px;
}

.player-controls {
  display: grid;
  grid-template-columns: auto auto minmax(80px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 49px;
  padding: 0 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #131a17;
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
}

.play-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff9ed;
  color: var(--dark);
  cursor: pointer;
}

.play-button .icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.player-track {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
}

.player-track span {
  width: 48%;
  background: var(--gold);
}

.player-track i {
  position: absolute;
  top: 50%;
  left: 48%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff8eb;
  transform: translate(-50%, -50%);
}

.settings-block {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.shot-edit-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.shot-edit-actions .quiet-button {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 7px;
}

.shot-edit-actions .quiet-button.danger {
  margin-left: auto;
  color: #a15548;
}

.shots-empty {
  display: grid;
  min-height: 190px;
  padding: 22px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
}

.shots-empty strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.shots-empty p {
  max-width: 190px;
  margin: 0;
  font-size: 8px;
  line-height: 1.6;
}

.settings-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.settings-title span {
  font-size: 9px;
  font-weight: 800;
}

.settings-title small {
  color: #969189;
  font-size: 7px;
}

.settings-hint {
  margin: 6px 0 0;
  color: #969189;
  font-size: 8px;
  line-height: 1.5;
}

.cast-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.studio-cast-button {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.36);
  color: var(--muted);
  font-size: 7px;
  cursor: pointer;
}

.studio-cast-button.selected {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.studio-cast-button img {
  width: 39px;
  height: 39px;
  object-fit: contain;
  border-radius: 50%;
  background: #f2e7d5;
  mix-blend-mode: multiply;
}

.style-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.style-picker button {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
  text-align: left;
  cursor: pointer;
}

.style-picker button.active {
  border-color: var(--dark);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--dark);
}

.style-thumb {
  display: grid;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  color: white;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.style-thumb.deep {
  background: linear-gradient(140deg, #617a78, #ac7a5e);
}

.style-picker button > span:last-child {
  display: grid;
  gap: 2px;
}

.style-picker b {
  font-size: 8px;
}

.style-picker small {
  color: var(--muted);
  font-size: 6px;
}

#studioPrompt {
  width: 100%;
  min-height: 98px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  font-size: 8px;
  line-height: 1.7;
}

.voice-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(100, 127, 115, 0.08);
}

.voice-row + .voice-row {
  margin-top: 4px;
}

.voice-row img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  background: #f2e7d5;
  mix-blend-mode: multiply;
}

.voice-row div {
  display: grid;
  gap: 2px;
}

.voice-row strong {
  font-size: 8px;
}

.voice-row small {
  color: #817d74;
  font-size: 6px;
}

.voice-audition {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--sage);
  font: inherit;
  font-size: 7px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.voice-audition:hover {
  background: rgba(100, 127, 115, 0.12);
}

.voice-audition:disabled {
  opacity: 0.6;
  cursor: default;
}

.voice-row .icon {
  width: 12px;
  height: 12px;
  color: var(--sage);
}

.advanced-settings {
  border-bottom: 1px solid var(--line);
}

.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 8px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.advanced-settings summary::-webkit-details-marker {
  display: none;
}

.advanced-settings summary .icon {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}

.advanced-settings[open] summary .icon {
  transform: rotate(90deg);
}

.advanced-settings > p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.6;
}

.director-footer {
  padding-top: 13px;
}

.delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 7px;
}

.delivery-row strong {
  color: var(--ink);
  font-size: 8px;
}

.delivery-row small {
  color: #9a958c;
  font-weight: 500;
}

.frame-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 7px;
}

.frame-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.frame-chip input {
  margin: 0;
}

.frame-row > span {
  margin-left: auto;
  color: #9a958c;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 7px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
  cursor: pointer;
  transition: 150ms ease;
}

.mode-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.mode-chip.active {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff9ef;
}

.mode-hint {
  color: #9a958c;
  font-size: 7px;
  line-height: 1.6;
}

.frame-clear {
  padding: 4px 9px;
  border: 1px solid rgba(211, 101, 80, 0.4);
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--coral-deep);
  font-size: 7px;
  font-weight: 600;
  cursor: pointer;
}

.frame-clear:hover {
  border-color: var(--coral);
  background: #f0cfc8;
}

.frame-clear[hidden] {
  display: none;
}

.retry-upscale {
  width: 100%;
  margin-bottom: 9px;
}

.pipeline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 7px;
  line-height: 1.6;
}

.pipeline-stage {
  color: var(--ink);
  font-weight: 600;
}

.pipeline-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pipeline-error {
  flex-basis: 100%;
  color: #b4552f;
}

.generate-button {
  width: 100%;
  min-height: 45px;
  border: 0;
  background: var(--dark);
  color: #fff9ef;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 11px 20px rgba(31, 40, 37, 0.15);
}

.generate-button:hover {
  background: #101613;
}

.generate-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.director-footer > p {
  margin: 7px 0 0;
  color: #99948b;
  font-size: 6px;
  text-align: center;
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: 14px;
}

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

.character-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.character-card:hover,
.character-card.selected {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.character-card.selected {
  border-color: var(--line-strong);
}

.character-photo {
  position: relative;
  display: grid;
  height: 180px;
  place-items: end center;
  overflow: hidden;
  background: linear-gradient(150deg, #eadcc4, #c4d3cb);
}

.character-photo img {
  width: 82%;
  height: 95%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.character-photo span {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(255, 251, 241, 0.82);
  font-size: 7px;
  font-weight: 700;
}

.character-body {
  padding: 13px;
}

.character-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.character-body p {
  margin: 4px 0 9px;
  color: var(--muted);
  font-size: 8px;
}

.character-meta {
  display: flex;
  gap: 5px;
}

.character-meta span {
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(31, 40, 37, 0.05);
  color: #706d65;
  font-size: 7px;
}

.asset-inspector {
  min-height: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.empty-inspector {
  display: grid;
  min-height: 390px;
  place-items: center;
  color: #9b978e;
  font-size: 9px;
}

.asset-detail-head {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.asset-detail-head img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 14px;
  background: #efe3cf;
  mix-blend-mode: multiply;
}

.asset-detail-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
}

.asset-detail-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.asset-section {
  margin-top: 19px;
}

.asset-section h3 {
  margin: 0 0 8px;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.trait-list {
  display: grid;
  gap: 6px;
}

.trait-list p {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: #6f6c64;
  font-size: 8px;
  line-height: 1.6;
}

.trait-list p::before {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--sage);
  content: "";
}

.reference-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.reference-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eee6d8;
  mix-blend-mode: multiply;
}

.empty-state {
  display: grid;
  min-height: 460px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(252, 250, 245, 0.7);
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 57px;
  height: 57px;
  place-items: center;
  border-radius: 18px;
  background: var(--sage-soft);
  color: #4f6d60;
}

.empty-state > span .icon {
  width: 24px;
  height: 24px;
}

.empty-state h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 9px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 13px 9px 9px;
  border-radius: 12px;
  background: var(--dark);
  color: #fff9ed;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

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

.toast > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: var(--sage);
}

.toast .icon {
  width: 12px;
  height: 12px;
}

.toast p {
  margin: 0;
  font-size: 8px;
}

.mobile-scrim {
  display: none;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(211, 101, 80, 0.12);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(211, 101, 80, 0.02);
  }
}

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

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }

  .main-content {
    padding: 25px;
  }

  .studio-grid {
    grid-template-columns: 218px minmax(360px, 1fr) 306px;
  }

  .preview-canvas {
    min-height: 515px;
  }
}

@media (max-width: 1020px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    width: 240px;
    transform: translateX(-102%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-close,
  .mobile-menu {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  .mobile-close {
    border-color: rgba(255, 255, 255, 0.12);
    color: white;
  }

  .mobile-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    background: rgba(19, 26, 23, 0.42);
    backdrop-filter: blur(3px);
  }

  .mobile-scrim.show {
    display: block;
  }

  .topbar {
    padding: 0 22px;
  }

  .studio-grid {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .director-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }

  .director-panel .panel-heading,
  .director-footer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 58px;
    padding: 0 15px;
  }

  .mode-pill {
    display: none;
  }

  .main-content {
    padding: 20px 15px 30px;
  }

  .dashboard-heading,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .dashboard-heading h1,
  .page-heading h1 {
    font-size: 36px;
  }

  .dashboard-heading > .primary-button,
  .page-heading > .primary-button {
    width: 100%;
  }

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

  .home-cast-grid,
  .project-grid,
  .character-grid {
    grid-template-columns: 1fr;
  }

  .wizard-shell {
    grid-template-columns: 1fr;
  }

  .wizard-steps {
    min-height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wizard-step {
    min-width: 170px;
  }

  .wizard-note {
    display: none;
  }

  .wizard-panel {
    padding: 24px 18px;
  }

  .wizard-cast {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .wizard-option-row {
    grid-template-columns: 1fr;
  }

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

  .studio-actions {
    width: 100%;
    justify-content: space-between;
  }

  .phase-strip {
    overflow-x: auto;
  }

  .phase {
    white-space: nowrap;
  }

  .studio-grid {
    display: flex;
    flex-direction: column;
  }

  .shotboard,
  .preview-panel,
  .director-panel {
    width: 100%;
  }

  .preview-canvas {
    min-height: 500px;
  }

  .video-frame {
    width: min(70%, 280px);
  }

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

  .director-panel {
    display: block;
  }

  .project-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .project-row > span {
    display: none;
  }
}

@media (max-width: 480px) {
  .dashboard-heading h1,
  .page-heading h1 {
    font-size: 31px;
  }

  .source-tabs {
    grid-template-columns: 1fr;
  }

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

  .preview-canvas {
    min-height: 450px;
    padding: 12px;
  }

  .video-frame {
    width: min(78%, 260px);
  }

  .reference-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Customer story-production redesign */

.story-heading {
  align-items: flex-start;
  margin-bottom: 28px;
}

.story-heading h1 {
  max-width: 760px;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.04;
}

.story-heading h1 em {
  color: var(--coral);
  font-style: normal;
}

.story-heading > div > p:last-child {
  max-width: 620px;
  font-size: 12px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  flex: 0 0 auto;
}

.heading-actions .primary-button,
.heading-actions .quiet-button {
  min-height: 44px;
  padding-inline: 17px;
  background-color: var(--surface-strong);
}

.heading-actions .primary-button {
  background: var(--coral);
}

.production-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(310px, 0.68fr);
  gap: 15px;
}

.production-hero {
  position: relative;
  display: grid;
  min-height: 466px;
  grid-template-columns: minmax(350px, 0.92fr) minmax(340px, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(78, 58, 37, 0.13);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.88), transparent 33%),
    linear-gradient(135deg, #e8ddc9 0%, #d9c19e 100%);
  box-shadow: 0 28px 70px rgba(62, 45, 26, 0.11);
}

.production-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  content: "";
}

.production-hero-copy {
  position: relative;
  z-index: 4;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px 28px 27px 31px;
}

.production-status-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 30px;
}

.production-id {
  color: #796c5b;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.production-hero-copy > .eyebrow {
  margin-bottom: 8px;
  color: #766a59;
}

.production-hero-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(35px, 3.5vw, 51px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.production-summary {
  max-width: 430px;
  margin: 13px 0 23px;
  color: #665e52;
  font-size: 10px;
  line-height: 1.75;
}

.production-pipeline {
  display: flex;
  align-items: flex-start;
  max-width: 460px;
  margin-top: auto;
}

.production-pipeline > span {
  display: grid;
  min-width: 39px;
  justify-items: center;
  gap: 6px;
  color: #8b806f;
  font-size: 6px;
  font-weight: 800;
  white-space: nowrap;
}

.production-pipeline > span i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(56, 45, 31, 0.15);
  border-radius: 50%;
  background: rgba(255, 252, 244, 0.52);
  color: #877b69;
  font-size: 7px;
  font-style: normal;
}

.production-pipeline > b {
  width: 28px;
  height: 1px;
  margin-top: 12px;
  flex: 1 0 14px;
  background: rgba(60, 48, 33, 0.18);
}

.production-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
}

.production-hero-actions .dark-button {
  min-height: 43px;
  padding: 0 17px;
}

.production-hero-actions .dark-button .icon {
  width: 13px;
  height: 13px;
}

.production-hero-actions > span {
  color: #817563;
  font-size: 7px;
}

.production-hero-actions > span b {
  color: var(--ink);
}

.production-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 22px 0 0 22px;
  background: #91afa9;
}

.production-sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(106, 148, 145, 0.92), rgba(226, 194, 137, 0.8) 66%),
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.14) 49%, transparent 50%);
  background-size: auto, 72px 72px;
}

.production-sun {
  position: absolute;
  z-index: 1;
  top: 12%;
  right: 13%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #ebc26d;
  box-shadow:
    0 0 0 25px rgba(235, 194, 109, 0.08),
    0 0 70px rgba(255, 224, 146, 0.28);
}

.production-shore {
  position: absolute;
  right: -10%;
  bottom: -11%;
  left: -13%;
  height: 42%;
  border-radius: 50% 55% 0 0;
  background:
    linear-gradient(180deg, rgba(87, 128, 124, 0.75) 0 17%, transparent 18%),
    linear-gradient(180deg, #d8bd91, #c7a375);
  transform: rotate(-3deg);
}

.hero-pet {
  position: absolute;
  z-index: 2;
  bottom: -4%;
  width: 49%;
  max-height: 80%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 18px 17px rgba(55, 38, 19, 0.2));
}

.hero-pet-a {
  left: -7%;
}

.hero-pet-b {
  z-index: 3;
  right: 19%;
  bottom: -3%;
  width: 56%;
}

.hero-pet-c {
  right: -12%;
  bottom: -6%;
  width: 46%;
}

.production-scene-label {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 17px;
  left: 16px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(31, 40, 37, 0.76);
  color: #fff9ed;
  backdrop-filter: blur(12px);
}

.production-scene-label span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.production-scene-label strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.assistant-panel {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 96% 5%, rgba(205, 164, 91, 0.21), transparent 28%),
    var(--dark);
  color: #fff9ed;
  box-shadow: 0 24px 55px rgba(23, 31, 28, 0.16);
}

.assistant-panel::after {
  position: absolute;
  right: -36px;
  bottom: -60px;
  width: 175px;
  height: 175px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.025);
  content: "";
}

.assistant-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.assistant-orb {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}

.assistant-head .eyebrow {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.4);
}

.assistant-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
}

.assistant-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 6px;
  font-weight: 700;
}

.assistant-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #90b49f;
  box-shadow: 0 0 0 3px rgba(144, 180, 159, 0.12);
}

.assistant-intro {
  position: relative;
  z-index: 1;
  margin: 21px 0 13px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  line-height: 1.7;
}

.assistant-intro strong {
  color: #fff9ed;
}

.assistant-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.assistant-list > div {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
}

.assistant-list > div > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: rgba(205, 164, 91, 0.14);
  color: var(--gold);
  font-size: 7px;
  font-weight: 800;
}

.assistant-list p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.assistant-list b {
  font-size: 8px;
}

.assistant-list small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 7px;
  line-height: 1.4;
}

.assistant-list > div > .icon {
  width: 13px;
  height: 13px;
  color: #88ac98;
}

.assistant-decision {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 14px 0 12px;
}

.assistant-decision span {
  color: var(--gold);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.assistant-decision strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
}

.assistant-decision p {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 7px;
}

.assistant-action {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.14);
  background: #fff9ed;
  color: var(--dark);
}

.assistant-action:hover {
  background: #f3eadb;
}

.section-note {
  color: var(--muted);
  font-size: 8px;
}

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

.source-launch {
  display: grid;
  min-height: 84px;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 250, 245, 0.78);
  text-align: left;
  cursor: pointer;
  transition: 170ms ease;
}

.source-launch:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.source-launch .source-icon {
  width: 44px;
  height: 44px;
}

.source-launch > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.source-launch strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.source-launch small {
  color: var(--muted);
  font-size: 8px;
}

.source-launch > .icon {
  width: 13px;
  height: 13px;
  color: #aaa39a;
}

.cast-section {
  padding-bottom: 12px;
}

.assistant-brief {
  margin: 2px 0 13px;
  padding: 12px;
  border: 1px solid rgba(100, 127, 115, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(223, 232, 226, 0.78), rgba(244, 232, 204, 0.36));
}

.assistant-brief-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-brief-head > span {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 9px;
  background: var(--sage);
  color: #fff9ed;
}

.assistant-brief-head > span .icon {
  width: 14px;
  height: 14px;
}

.assistant-brief-head > div {
  display: grid;
  gap: 2px;
}

.assistant-brief-head small {
  color: #738078;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.assistant-brief-head strong {
  font-size: 8px;
}

.assistant-brief > p {
  margin: 9px 0;
  color: #666b65;
  font-size: 8px;
  line-height: 1.65;
}

.assistant-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.assistant-facts span {
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.55);
  color: #7b7e76;
  font-size: 6px;
}

.assistant-facts b {
  color: var(--ink);
}

.delivery-flow {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 250, 245, 0.75);
}

.delivery-flow > span {
  display: grid;
  min-width: 112px;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  color: #8b887f;
}

.delivery-flow > span > i {
  grid-row: span 2;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 7px;
  font-style: normal;
}

.delivery-flow > span.done > i {
  border-color: var(--sage);
  background: var(--sage);
  color: #fff;
}

.delivery-flow > span.done .icon {
  width: 11px;
  height: 11px;
}

.delivery-flow > span.active {
  color: var(--ink);
}

.delivery-flow > span.active > i {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.delivery-flow > span b {
  font-size: 8px;
}

.delivery-flow > span small {
  color: var(--muted);
  font-size: 6px;
  line-height: 1.4;
}

.delivery-flow > em {
  height: 1px;
  margin-top: 13px;
  background: var(--line);
}

.delivery-list {
  display: grid;
  gap: 14px;
}

.delivery-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.delivery-preview {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, rgba(222, 190, 116, 0.17), transparent 35%),
    #151d1a;
}

.delivery-preview img {
  width: min(76%, 230px);
  height: 290px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.delivery-preview > span {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(21, 29, 26, 0.72);
  color: #f3dfb1;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}

.delivery-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
}

.delivery-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
}

.delivery-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.delivery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.delivery-meta span {
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(31, 40, 37, 0.055);
  color: #77756d;
  font-size: 7px;
}

.delivery-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.delivery-actions a {
  text-decoration: none;
}

@media (max-width: 1240px) {
  .production-hero {
    grid-template-columns: minmax(320px, 0.95fr) minmax(290px, 1.05fr);
  }

  .production-hero-copy {
    padding-left: 24px;
    padding-right: 22px;
  }

  .production-pipeline > b {
    width: 16px;
    margin-inline: 1px;
  }
}

@media (max-width: 1120px) {
  .production-overview {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .production-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .production-hero-copy {
    min-height: 365px;
  }

  .production-visual {
    min-height: 318px;
    margin: 0 18px 18px;
    border-radius: 18px;
  }

  .source-strip {
    grid-template-columns: 1fr;
  }

  .delivery-flow {
    overflow-x: auto;
  }
}

@media (max-width: 1020px) {
  .production-overview {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.55fr);
  }

  .assistant-panel {
    padding: 20px;
  }

  .assistant-head {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .assistant-state {
    display: none;
  }
}

@media (max-width: 900px) {
  .production-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .assistant-panel {
    min-height: 440px;
  }

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

  .assistant-list > div {
    grid-template-columns: 27px minmax(0, 1fr);
    align-items: start;
  }

  .assistant-list > div > .icon {
    display: none;
  }

  .assistant-decision {
    margin-top: 20px;
  }
}

@media (max-width: 760px) {
  .story-heading {
    gap: 20px;
  }

  .story-heading h1 {
    font-size: 43px;
  }

  .heading-actions {
    width: 100%;
    margin-top: 0;
  }

  .heading-actions > button {
    flex: 1;
  }

  .production-hero-copy {
    min-height: auto;
    padding: 24px 20px 22px;
  }

  .production-status-row {
    margin-bottom: 23px;
  }

  .production-hero-copy h2 {
    font-size: 39px;
  }

  .production-pipeline {
    width: 100%;
    margin-top: 24px;
  }

  .production-pipeline > b {
    min-width: 8px;
  }

  .production-visual {
    min-height: 300px;
  }

  .production-hero-actions {
    justify-content: space-between;
  }

  .assistant-panel {
    min-height: auto;
  }

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

  .assistant-list > div {
    grid-template-columns: 27px minmax(0, 1fr) 16px;
  }

  .assistant-list > div > .icon {
    display: block;
  }

  .assistant-decision {
    margin-top: 20px;
  }

  .section-note {
    display: none;
  }

  .delivery-flow {
    grid-template-columns: auto minmax(24px, 0.4fr) auto minmax(24px, 0.4fr) auto;
  }

  .delivery-flow > span:nth-of-type(n + 3) {
    display: none;
  }

  .delivery-card {
    grid-template-columns: 1fr;
  }

  .delivery-preview {
    min-height: 285px;
  }

  .delivery-copy {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .story-heading h1 {
    font-size: 36px;
  }

  .heading-actions {
    flex-direction: column;
  }

  .heading-actions > button {
    width: 100%;
  }

  .production-pipeline {
    justify-content: space-between;
  }

  .production-pipeline > span {
    min-width: 35px;
  }

  .production-pipeline > b {
    flex-basis: 6px;
  }

  .production-visual {
    min-height: 270px;
  }

  .production-scene-label strong {
    font-size: 14px;
  }

  .assistant-panel {
    padding: 18px;
    border-radius: 20px;
  }
}

/* Local token access */
.auth-chip.ok {
  border-color: rgba(100, 127, 115, 0.4);
  background: var(--sage-soft);
  color: #4d695d;
}

.modal-scrim {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(24, 29, 26, 0.46);
  backdrop-filter: blur(4px);
}

.modal-scrim[hidden] {
  display: none;
}

.modal-card {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.modal-card .panel-heading {
  align-items: flex-start;
}

.modal-card h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.modal-copy code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--gold-soft);
  color: #7c5a24;
  font-size: 10px;
}

.modal-hint {
  margin: 0;
  min-height: 14px;
  color: var(--coral-deep);
  font-size: 10px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Batch queue */
.batch-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.batch-panel .panel-heading {
  align-items: center;
}

.batch-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(32, 35, 31, 0.06);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.batch-status.running {
  background: var(--gold-soft);
  color: #7c5a24;
}

.batch-status.completed {
  background: var(--sage-soft);
  color: #4d695d;
}

.batch-status.failed,
.batch-status.cancelled {
  background: var(--red-soft);
  color: var(--coral-deep);
}

.batch-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.batch-controls [hidden] {
  display: none;
}

.batch-controls .quiet-button.danger {
  border-color: rgba(211, 101, 80, 0.35);
  color: var(--coral-deep);
}

.batch-hint {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.batch-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 35, 31, 0.08);
}

.batch-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  transition: width 320ms ease;
}

.batch-items {
  display: grid;
  gap: 6px;
}

/* Sound & timeline */
.timeline-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.timeline-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}

.timeline-field input,
.timeline-field select {
  min-width: 96px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font: inherit;
  font-size: 12px;
  color: var(--ink);
}

.timeline-field input[type="range"] {
  padding: 0;
  min-width: 110px;
}

.timeline-clips {
  display: grid;
  gap: 10px;
}

.timeline-clip {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.timeline-clip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.timeline-clip-head small {
  color: var(--muted);
  font-size: 10px;
}

.timeline-clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.timeline-voice {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 8px;
}

.timeline-voice textarea,
.timeline-voice select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  resize: vertical;
}

.timeline-voice audio {
  height: 30px;
}

.timeline-voice small {
  color: var(--muted);
  font-size: 10px;
}

.batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.batch-item > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.batch-item b {
  font-size: 11px;
}

.batch-item small {
  color: var(--muted);
  font-size: 9px;
}

.batch-item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.batch-item-actions .quiet-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 8px;
}

.batch-empty {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

/* Admin asset review */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.admin-upload,
.admin-review {
  display: grid;
  gap: 12px;
}

.admin-drop {
  margin: 0;
}

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

.admin-asset-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.admin-asset-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.admin-asset-row > img {
  width: 84px;
  height: 84px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(32, 35, 31, 0.05);
}

.admin-asset-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-asset-body strong {
  font-size: 11px;
}

.admin-asset-body small {
  color: var(--muted);
  font-size: 9px;
  word-break: break-all;
}

.admin-asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.admin-asset-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 8px;
}

.admin-asset-actions .quiet-button.danger {
  border-color: rgba(211, 101, 80, 0.35);
  color: var(--coral-deep);
}

.admin-asset-empty {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 1020px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .batch-controls .batch-hint {
    flex-basis: 100%;
  }

  .auth-chip {
    padding: 0 9px;
    font-size: 8px;
  }
}

/* 成片质检 */
.qc-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.qc-summary > span {
  display: grid;
  gap: 2px;
  min-width: 108px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.qc-summary strong {
  font-size: 18px;
  line-height: 1.1;
}

.qc-summary small {
  color: var(--muted);
  font-size: 9px;
}

.qc-list {
  display: grid;
  gap: 14px;
}

.qc-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.qc-preview {
  position: relative;
  display: grid;
  gap: 6px;
}

.qc-preview img {
  width: 200px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--ink);
}

.qc-preview span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qc-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.qc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.qc-head h2 {
  margin: 2px 0 0;
  font-size: 15px;
}

.qc-status {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(32, 35, 31, 0.07);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.qc-status.approved {
  background: rgba(94, 140, 92, 0.16);
  color: #3f6b3f;
}

.qc-status.rejected {
  background: rgba(211, 101, 80, 0.16);
  color: var(--coral-deep);
}

.qc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qc-meta span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
}

.qc-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.qc-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  line-height: 1.4;
}

.qc-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  flex: none;
}

.qc-notes {
  margin-top: 0;
}

.qc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qc-actions .quiet-button,
.qc-actions .primary-button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 9px;
}

@media (max-width: 900px) {
  .qc-card {
    grid-template-columns: 1fr;
  }

  .qc-preview img {
    width: 100%;
    height: 180px;
  }

  .qc-checklist {
    grid-template-columns: 1fr;
  }
}
