:root {
  --ink: #15211f;
  --ink-soft: #34413e;
  --paper: #f3efe6;
  --paper-deep: #e9e1d4;
  --card: rgba(255, 253, 248, 0.82);
  --accent: #ef6b4a;
  --accent-deep: #c94d30;
  --mint: #a7cbbf;
  --line: rgba(21, 33, 31, 0.14);
  --muted: #7a817d;
  --success: #2d735f;
  --danger: #a53d2d;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 70px rgba(37, 43, 40, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(21, 33, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 33, 31, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
}

.ambient-a {
  width: 38rem;
  height: 38rem;
  right: -17rem;
  top: 11rem;
  background: radial-gradient(circle, rgba(167, 203, 191, 0.42), transparent 68%);
}

.ambient-b {
  width: 30rem;
  height: 30rem;
  left: -14rem;
  top: 46rem;
  background: radial-gradient(circle, rgba(239, 107, 74, 0.12), transparent 70%);
}

.site-header {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 25px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  padding: 7px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  border-radius: 50%;
  background: var(--ink);
}

.brand-mark span {
  flex: 1;
  border-radius: 4px;
  background: var(--paper);
}

.brand-mark span:nth-child(1) { height: 42%; }
.brand-mark span:nth-child(2) { height: 92%; background: var(--accent); }
.brand-mark span:nth-child(3) { height: 65%; }

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-pill,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
  color: var(--ink-soft);
  backdrop-filter: blur(12px);
}

.health-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d09b37;
  box-shadow: 0 0 0 4px rgba(208, 155, 55, 0.12);
}

.health-pill.online .health-dot {
  background: #3b9077;
  box-shadow: 0 0 0 4px rgba(59, 144, 119, 0.13);
}

.health-pill.offline .health-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(165, 61, 45, 0.12);
}

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.page-shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 440px;
  padding: 66px 64px 62px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 26%, rgba(119, 170, 154, 0.28), transparent 32%),
    linear-gradient(132deg, #162421, #20332e 58%, #1b2a27);
  color: #f7f1e7;
  box-shadow: 0 32px 80px rgba(21, 33, 31, 0.18);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255,255,255,0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.13) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(90deg, transparent, black);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(44px, 5.5vw, 78px);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: #b8d9cc;
  font-style: normal;
}

.hero-intro {
  max-width: 600px;
  margin: 24px 0 0;
  color: rgba(247, 241, 231, 0.68);
  font-size: 15px;
  line-height: 1.85;
}

.hero-meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  color: rgba(247, 241, 231, 0.7);
  font-size: 11px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-meta i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.portrait-frame {
  position: relative;
  width: 280px;
  height: 300px;
}

.portrait-card {
  position: absolute;
  inset: 26px 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 120px 120px 26px 26px;
  background:
    linear-gradient(180deg, rgba(167, 203, 191, 0.14), rgba(255,255,255,0.05)),
    rgba(255,255,255,0.035);
  box-shadow: inset 0 0 70px rgba(167, 203, 191, 0.11);
}

.portrait-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(255,255,255,0.035) 8px 9px);
}

.portrait-index,
.portrait-status {
  position: absolute;
  z-index: 2;
  color: rgba(255,255,255,0.52);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.portrait-index {
  top: 22px;
  left: 24px;
}

.portrait-status {
  right: 20px;
  bottom: 18px;
  color: #a8d5c4;
}

.face-glyph {
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 140px;
  height: 210px;
  transform: translateX(-50%);
}

.face-head {
  position: absolute;
  top: 8px;
  left: 43px;
  width: 58px;
  height: 72px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50% 50% 46% 46%;
}

.face-body {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 122px;
  height: 142px;
  border: 1px solid rgba(255,255,255,0.24);
  border-bottom: 0;
  border-radius: 70px 70px 0 0;
}

.tracking-line {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  border-color: var(--accent);
  border-style: solid;
}

.line-one {
  top: 44%;
  left: 12%;
  border-width: 1px 0 0 1px;
}

.line-two {
  top: 44%;
  right: 12%;
  border-width: 1px 1px 0 0;
}

.portrait-orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
}

.orbit-one {
  inset: 0;
  animation: orbit 24s linear infinite;
}

.orbit-one::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.orbit-two {
  inset: 24px -18px;
  transform: rotate(45deg);
  border-style: dashed;
}

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

.studio-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 26px;
  align-items: start;
}

.panel {
  border: 1px solid rgba(21, 33, 31, 0.1);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.creator-panel {
  padding: 34px;
}

.idea-composer {
  margin-bottom: 28px;
  padding: 21px;
  border: 1px solid rgba(21, 33, 31, 0.12);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(167, 203, 191, 0.32), transparent 38%),
    rgba(255, 255, 255, 0.44);
}

.composer-heading,
.script-result-head,
.shot-card-head,
.shot-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.composer-heading {
  margin-bottom: 13px;
}

.composer-index,
.composer-note,
.script-result-head > div > span,
.audio-required {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.composer-index {
  color: var(--accent-deep);
}

.composer-heading h3 {
  margin: 5px 0 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.idea-composer > textarea {
  min-height: 78px;
  background: rgba(255, 253, 248, 0.74);
}

.composer-controls {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto;
  gap: 9px;
  align-items: end;
}

.composer-controls label {
  min-width: 0;
}

.composer-controls label > span {
  margin-bottom: 6px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.composer-controls select {
  min-height: 40px;
  font-size: 11px;
}

.expand-button {
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.script-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.script-result-head {
  align-items: flex-start;
}

.script-result-head > div {
  min-width: 0;
}

.script-result-head strong,
.script-result-head small {
  display: block;
}

.script-result-head strong {
  margin-top: 5px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.script-result-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.audio-required {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(239, 107, 74, 0.1);
  color: var(--accent-deep);
}

.script-notice,
.audio-policy {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(208, 155, 55, 0.1);
  color: #725a2e;
  font-size: 9px;
  line-height: 1.6;
}

.script-edit {
  margin-top: 13px;
  display: block;
}

.script-edit > span {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.script-edit small {
  color: var(--muted);
  font-weight: 400;
}

.shot-list {
  margin-top: 13px;
  display: grid;
  gap: 10px;
}

.shot-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.58);
}

.shot-card-head {
  margin-bottom: 10px;
}

.shot-card-head > span {
  color: var(--accent-deep);
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
}

.shot-card-head > strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-card-head label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.shot-card-head input {
  width: 45px;
  min-height: 30px;
  padding: 0 6px;
  font-size: 10px;
}

.shot-card > label {
  margin-top: 8px;
  display: block;
}

.shot-card > label > span {
  margin-bottom: 5px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.shot-card textarea {
  min-height: 62px;
  padding: 10px 11px;
  font-size: 10px;
}

.shot-card-footer {
  margin-top: 9px;
  align-items: flex-end;
}

.shot-card-footer small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.shot-card-footer button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.audio-policy {
  margin: 10px 0 0;
}

.workbench-panel {
  position: sticky;
  top: 20px;
  min-height: 685px;
  padding: 30px 26px;
}

.panel-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2,
.library-heading h2,
.how-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.section-kicker {
  margin-bottom: 9px;
  color: #8c7865;
}

.step-badge {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.field-block {
  margin-bottom: 22px;
}

.field-title {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field-title label,
.field-title > span {
  font-size: 13px;
  font-weight: 700;
}

.field-title > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.field-title small {
  color: var(--muted);
  font-weight: 400;
}

select,
textarea,
input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255,255,255,0.58);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  min-height: 44px;
  padding: 0 38px 0 13px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6d7773 50%), linear-gradient(135deg, #6d7773 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea {
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.65;
}

select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
  border-color: rgba(239, 107, 74, 0.7);
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 0 4px rgba(239, 107, 74, 0.08);
}

.dropzone {
  position: relative;
  min-height: 132px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px dashed rgba(21, 33, 31, 0.24);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.34);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragging,
.compact-drop:hover,
.compact-drop:focus-visible,
.compact-drop.dragging {
  border-color: rgba(239, 107, 74, 0.7);
  background: rgba(239, 107, 74, 0.045);
  outline: none;
}

.dropzone.disabled {
  pointer-events: none;
  opacity: 0.48;
}

.upload-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
}

.upload-icon::before,
.upload-icon::after {
  content: "";
  position: absolute;
  background: var(--paper);
}

.upload-icon::before {
  width: 13px;
  height: 1px;
}

.upload-icon::after {
  width: 1px;
  height: 13px;
}

.drop-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.drop-copy strong,
.drop-copy span,
.compact-drop-copy strong,
.compact-drop-copy span {
  display: block;
}

.drop-copy strong {
  font-size: 14px;
}

.drop-copy span,
.compact-drop-copy span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.file-preview {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 86px;
  height: calc(100% - 16px);
  border-radius: 13px;
  object-fit: cover;
}

.dropzone.has-file .file-preview {
  display: block;
}

.template-selection {
  margin-bottom: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 13px;
  background: rgba(167, 203, 191, 0.2);
}

.template-selection img {
  width: 45px;
  height: 45px;
  border-radius: 9px;
  object-fit: cover;
}

.template-selection strong,
.template-selection span {
  display: block;
}

.template-selection strong {
  font-size: 12px;
}

.template-selection span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.template-save {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.template-save input {
  min-height: 39px;
  padding: 0 12px;
  font-size: 11px;
}

.text-button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,0.65);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.two-column-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.compact-drop {
  position: relative;
  min-height: 94px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px dashed rgba(21, 33, 31, 0.22);
  border-radius: 16px;
  background: rgba(255,255,255,0.32);
}

.compact-drop > img {
  flex: 0 0 48px;
  width: 48px;
  height: 58px;
  border-radius: 9px;
  object-fit: cover;
}

.compact-drop.has-file > img {
  display: block;
}

.compact-drop-copy {
  min-width: 0;
}

.compact-drop-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-drop-copy span {
  line-height: 1.4;
}

.reference-drop {
  min-height: 108px;
}

.reference-drop.has-file {
  border-style: solid;
  border-color: rgba(45, 115, 95, 0.45);
  background: rgba(45, 115, 95, 0.055);
}

.video-badge {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--ink);
}

.video-badge::before,
.video-badge::after {
  content: "";
  position: absolute;
  background: rgba(246, 242, 234, 0.55);
}

.video-badge::before {
  width: 12px;
  height: 1px;
  left: 5px;
}

.video-badge::after {
  width: 1px;
  height: 12px;
  top: 5px;
}

.video-badge i {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--paper);
  transform: translateX(2px);
}

.audio-bars {
  flex: 0 0 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  background: var(--ink);
}

.audio-bars i {
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: var(--paper);
}

.audio-bars i:nth-child(2) { height: 22px; }
.audio-bars i:nth-child(3) { height: 16px; }
.audio-bars i:nth-child(4) { height: 8px; }

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

.seed-control {
  margin-top: 15px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,0.42);
}

.seed-control label {
  font-size: 10px;
  font-weight: 700;
}

.seed-control label small {
  color: var(--muted);
  font-weight: 400;
}

.seed-control p {
  max-width: 390px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.seed-control input {
  flex: 0 0 132px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 10px;
}

.select-field,
.range-field {
  min-width: 0;
  display: block;
}

.select-field > span,
.range-field > span {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.range-field {
  grid-column: span 2;
  padding: 11px 13px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,0.48);
}

.range-field output {
  color: var(--accent-deep);
}

.range-field input {
  width: 100%;
  height: 3px;
  margin: 7px 0;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 30%, rgba(21,33,31,0.14) 30%);
  outline: none;
}

.range-field input::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  appearance: none;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.range-scale {
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 8px !important;
  font-weight: 400 !important;
}

.range-scale i {
  font-style: normal;
}

.consent-row {
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  cursor: pointer;
}

.consent-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,0.7);
}

.consent-row input:checked + .custom-check {
  border-color: var(--ink);
  background: var(--ink);
}

.consent-row input:checked + .custom-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--paper);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.primary-button {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 15px;
  background: var(--accent);
  color: #fff9f0;
  box-shadow: 0 12px 28px rgba(201, 77, 48, 0.2);
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  background: var(--accent-deep);
  box-shadow: 0 15px 32px rgba(201, 77, 48, 0.26);
  transform: translateY(-1px);
}

.button-arrow,
.primary-button > span:last-child {
  font-size: 17px;
  font-weight: 400;
}

.form-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.refresh-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  color: var(--ink);
  font-size: 17px;
}

.refresh-button.loading span {
  display: inline-block;
  animation: spin 700ms linear infinite;
}

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

.stats-strip {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,0.3);
}

.stats-strip > div {
  padding: 13px 15px;
  border-right: 1px solid var(--line);
}

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

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}

.stats-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.job-list {
  max-height: 655px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.empty-state {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-rings {
  width: 86px;
  height: 86px;
  position: relative;
  margin-bottom: 18px;
}

.empty-rings i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(21,33,31,0.13);
  border-radius: 50%;
}

.empty-rings i:nth-child(2) { inset: 12px; }
.empty-rings i:nth-child(3) { inset: 28px; background: rgba(167,203,191,0.24); }

.empty-state strong {
  font-family: "Songti SC", serif;
  font-size: 16px;
  font-weight: 500;
}

.empty-state span {
  max-width: 240px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.job-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,0.46);
  animation: rise 280ms ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(5px); }
}

.job-card-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.job-thumb {
  width: 45px;
  height: 54px;
  flex: 0 0 45px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--paper-deep);
}

.job-summary {
  min-width: 0;
  flex: 1;
}

.job-summary strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-summary span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-summary .reference-state {
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.job-summary .reference-state.used {
  background: rgba(45, 115, 95, 0.1);
  color: var(--success);
}

.job-summary .reference-state.missing {
  background: rgba(165, 61, 45, 0.08);
  color: var(--danger);
}

.status-chip {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(21,33,31,0.07);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
}

.status-chip.completed {
  background: rgba(45, 115, 95, 0.1);
  color: var(--success);
}

.status-chip.failed {
  background: rgba(165, 61, 45, 0.1);
  color: var(--danger);
}

.status-chip.active {
  background: rgba(239, 107, 74, 0.12);
  color: var(--accent-deep);
}

.progress-row {
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  height: 3px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(21,33,31,0.09);
}

.progress-track i {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #d9954a);
  transition: width 400ms ease;
}

.progress-row > span {
  min-width: 46px;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.job-video {
  width: 100%;
  margin-top: 13px;
  display: block;
  border-radius: 12px;
  background: #111;
  aspect-ratio: 9 / 12;
  object-fit: contain;
}

.job-error {
  margin-top: 11px;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.55;
}

.job-error summary {
  cursor: pointer;
  font-weight: 700;
}

.job-error p {
  margin: 6px 0 0;
  word-break: break-word;
}

.job-actions {
  margin-top: 12px;
  display: flex;
  gap: 7px;
}

.small-button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.small-button.accent {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
}

.library-section,
.how-it-works {
  margin-top: 66px;
}

.library-heading,
.how-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.library-heading > p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: right;
}

.sample-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.25fr) minmax(0, 1.25fr);
  gap: 14px;
}

.sample-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--card);
  box-shadow: 0 14px 38px rgba(21,33,31,0.09);
}

.sample-media {
  height: 530px;
  position: relative;
  display: grid;
  place-items: center;
  background: #111815;
}

.sample-media img,
.sample-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.sample-empty-wide {
  grid-column: 1 / -1;
}

.reference-missing > div {
  max-width: 250px;
  padding: 24px;
  text-align: center;
}

.reference-missing strong,
.reference-missing span {
  display: block;
}

.reference-missing strong {
  color: var(--paper);
  font-family: "Songti SC", serif;
  font-size: 19px;
  font-weight: 500;
}

.reference-missing span {
  margin-top: 8px;
  color: rgba(246, 242, 234, 0.62);
  font-size: 10px;
  line-height: 1.65;
}

.media-error {
  max-width: 250px;
  padding: 22px;
  color: rgba(246, 242, 234, 0.72);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.sample-card figcaption {
  min-height: 82px;
  padding: 15px 18px 17px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.sample-card figcaption span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.sample-card figcaption strong {
  font-family: "Songti SC", serif;
  font-size: 19px;
  font-weight: 500;
}

.sample-card figcaption small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.sample-empty {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
}

.sample-empty strong {
  color: var(--ink);
  font-family: "Songti SC", serif;
  font-size: 18px;
  font-weight: 500;
}

.sample-empty span {
  font-size: 10px;
}

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

.template-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 14px 38px rgba(21,33,31,0.09);
}

.template-card img {
  width: 100%;
  height: 230px;
  display: block;
  object-fit: cover;
  opacity: 0.86;
  transition: transform 350ms ease, opacity 350ms ease;
}

.template-card:hover img {
  opacity: 1;
  transform: scale(1.025);
}

.template-card::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(transparent, rgba(14, 24, 22, 0.88));
  pointer-events: none;
}

.template-card-info {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.template-card-info > div:first-child {
  min-width: 0;
}

.template-card-info strong,
.template-card-info span {
  display: block;
}

.template-card-info strong {
  font-family: "Songti SC", serif;
  font-size: 16px;
  font-weight: 500;
}

.template-card-info span {
  margin-top: 4px;
  color: rgba(255,255,255,0.6);
  font-size: 8px;
}

.template-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.template-actions button {
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: var(--paper);
  font-size: 8px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.template-actions button:hover {
  background: rgba(255,255,255,0.22);
}

.template-actions button.danger {
  color: #ffc9be;
}

.template-actions .use-template-button {
  width: 29px;
  min-height: 29px;
  padding: 0;
  border-radius: 50%;
}

.default-badge {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(239, 107, 74, 0.88);
  color: white;
  font-size: 8px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.template-count {
  margin-left: 5px;
  color: var(--accent-deep);
  font-weight: 800;
}

.template-count.at-limit {
  color: var(--danger);
}

.use-template-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: white;
}

.library-empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  font-size: 11px;
}

.pipeline-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pipeline-cards article {
  padding: 28px 30px 30px 0;
  border-right: 1px solid var(--line);
}

.pipeline-cards article + article {
  padding-left: 30px;
}

.pipeline-cards article:last-child {
  border-right: 0;
}

.pipeline-cards article > span {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 11px;
}

.pipeline-cards h3 {
  margin: 15px 0 8px;
  font-family: "Songti SC", serif;
  font-size: 19px;
  font-weight: 500;
}

.pipeline-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

footer {
  margin-top: 60px;
  padding: 24px 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

footer > span {
  font-weight: 800;
  letter-spacing: 0.16em;
}

footer p {
  margin: 0;
}

.auth-gate {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(18, 28, 26, 0.75);
  backdrop-filter: blur(18px);
}

.auth-card {
  width: min(420px, 100%);
  padding: 36px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0,0,0,0.25);
}

.auth-card h2 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 30px;
  font-weight: 500;
}

.auth-card > p:not(.section-kicker):not(.auth-error) {
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.auth-card input {
  min-height: 50px;
  margin-bottom: 12px;
  padding: 0 14px;
}

.auth-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 25px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .hero {
    padding: 56px 42px;
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .workbench-panel {
    position: static;
    min-height: 0;
  }

  .job-list {
    max-height: 680px;
  }

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

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

  .sample-output {
    grid-column: 1 / -1;
  }

  .sample-media {
    height: 460px;
  }
}

@media (max-width: 760px) {
  .site-header,
  .page-shell {
    width: min(calc(100% - 24px), 1280px);
  }

  .site-header {
    padding: 16px 0;
  }

  .health-pill {
    padding: 0 10px;
  }

  .health-pill span:last-child {
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: 0;
    padding: 42px 24px 36px;
    display: block;
    border-radius: 25px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-intro {
    font-size: 13px;
  }

  .hero-visual {
    display: none;
  }

  .hero-meta {
    gap: 10px 16px;
  }

  .studio-grid {
    margin-top: 12px;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  .panel,
  .creator-panel,
  .workbench-panel {
    min-width: 0;
  }

  .panel {
    border-radius: 22px;
  }

  .creator-panel,
  .workbench-panel {
    padding: 22px 17px;
  }

  .panel-heading h2,
  .library-heading h2,
  .how-heading h2 {
    font-size: 25px;
  }

  .two-column-fields,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .idea-composer {
    padding: 16px;
  }

  .composer-controls {
    grid-template-columns: 1fr 1fr;
  }

  .expand-button {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .shot-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .shot-card-head > strong {
    flex-basis: calc(100% - 82px);
  }

  .shot-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .shot-card-footer button {
    min-height: 36px;
  }

  .seed-control {
    align-items: stretch;
    flex-direction: column;
  }

  .seed-control input {
    flex-basis: auto;
    width: 100%;
  }

  .range-field {
    grid-column: auto;
  }

  .dropzone {
    min-height: 118px;
  }

  .file-preview {
    width: 70px;
  }

  .job-list {
    max-height: none;
  }

  .empty-state {
    min-height: 250px;
  }

  .job-video {
    max-height: 430px;
  }

  .library-section,
  .how-it-works {
    margin-top: 42px;
  }

  .library-heading,
  .how-heading {
    display: block;
  }

  .library-heading > p {
    margin-top: 10px;
    text-align: left;
  }

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

  .sample-grid {
    grid-template-columns: 1fr;
  }

  .sample-media {
    height: min(74vh, 560px);
  }

  .template-card,
  .template-card img {
    min-height: 190px;
    height: 190px;
  }

  .template-card-info {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .template-card-info strong {
    font-size: 14px;
  }

  .pipeline-cards {
    display: block;
  }

  .pipeline-cards article,
  .pipeline-cards article + article {
    padding: 23px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pipeline-cards article:last-child {
    border-bottom: 0;
  }

  footer {
    display: block;
    line-height: 1.7;
  }

  footer p {
    margin-top: 8px;
  }
}

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

