:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-deep: #050b16;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(7, 13, 25, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --ink: #f8fbff;
  --muted: #97a4bb;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --lime: #deff9a;
  --cyan: #06b6d4;
  --violet: #6d28d9;
  --blue: #2563eb;
  --danger: #f87171;
  --soft-blue: rgba(37, 99, 235, 0.12);
  --soft-cyan: rgba(6, 182, 212, 0.12);
  --soft-lime: rgba(222, 255, 154, 0.1);
  --soft-danger: rgba(248, 113, 113, 0.14);
  --shadow: 0 34px 120px rgba(0, 0, 0, 0.48);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(109, 40, 217, 0.24), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(6, 182, 212, 0.16), transparent 24%),
    radial-gradient(circle at 50% -8%, rgba(222, 255, 154, 0.08), transparent 30%),
    linear-gradient(180deg, #030712 0%, #040916 42%, #020611 100%);
}

body.auth-pending .shell {
  visibility: hidden;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 40, 217, 0.24), transparent 26%),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.18), transparent 24%),
    #030712;
  font-family: Inter, system-ui, sans-serif;
}

.loading-card {
  min-width: min(320px, calc(100vw - 32px));
  padding: 30px 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(8, 14, 26, 0.88);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
  text-align: center;
  backdrop-filter: blur(20px);
}

.loading-card h2 {
  margin: 0 0 8px;
  color: #f8fbff;
  font-size: 1.2rem;
}

.loading-card p {
  margin: 0;
  color: #91a4c3;
  font-size: 0.9rem;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #deff9a;
  border-radius: 999px;
  animation: studio-spin 0.8s linear infinite;
}

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

.account-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.78);
  color: #d7e3f4;
  font-size: 0.85rem;
  flex-wrap: wrap;
  backdrop-filter: blur(20px);
}

.account-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #deff9a, #06b6d4);
  box-shadow: 0 0 24px rgba(222, 255, 154, 0.45);
}

.account-brand strong {
  display: block;
  font-size: 0.92rem;
}

.account-brand p {
  margin: 2px 0 0;
  color: #8ca3c4;
  font-size: 0.75rem;
}

.account-metrics,
.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-chip {
  display: grid;
  gap: 3px;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.account-chip label {
  color: #7e94b3;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.account-chip strong {
  color: #f8fbff;
  font-size: 0.92rem;
}

.account-button {
  padding: 8px 12px;
  font-size: 0.78rem;
}

html,
body {
  top: 0 !important;
}

iframe.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate:first-child,
iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

body > .skiptranslate:first-child {
  height: 0 !important;
  overflow: hidden !important;
}

.goog-text-highlight {
  background: transparent !important;
  box-shadow: none !important;
}

#wcGoogleTranslate {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.wc-language-switcher {
  position: fixed;
  top: auto;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10050;
  color: #f9fafb;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wc-language-trigger {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(3, 7, 18, 0.88);
  color: #f9fafb;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font: 800 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(16px);
}

.wc-language-trigger:hover,
.wc-language-trigger[aria-expanded="true"] {
  border-color: rgba(222, 255, 154, 0.55);
  background: rgba(18, 27, 43, 0.96);
  transform: translateY(-1px);
}

.wc-language-menu {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 52px;
  display: none;
  width: min(280px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 96px));
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(5, 9, 18, 0.97);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(24px);
}

.wc-language-menu.is-open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.wc-language-heading {
  grid-column: 1 / -1;
  padding: 7px 8px 9px;
  color: #8fa2bd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wc-language-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font: 650 12px/1.25 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-align: left;
}

.wc-language-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.wc-language-option.is-active {
  border-color: rgba(222, 255, 154, 0.24);
  background: rgba(222, 255, 154, 0.09);
  color: #deff9a;
}

.wc-language-code {
  flex: 0 0 auto;
  min-width: 26px;
  color: inherit;
  font-size: 10px;
  font-weight: 900;
}

.wc-language-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.shell {
  position: relative;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 420px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 72%),
    linear-gradient(90deg, rgba(109, 40, 217, 0.14), rgba(6, 182, 212, 0.1), rgba(222, 255, 154, 0.04));
  pointer-events: none;
}

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px 18px;
}

.workspace-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1;
}

.workspace-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.workspace-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 760px) {
  .account-bar {
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
  }

  .account-brand {
    flex: 1 1 160px;
    min-width: 0;
  }

  .account-brand p {
    display: none;
  }

  .account-brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-metrics {
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .account-chip {
    min-width: 0;
    padding: 7px 9px;
  }

  .account-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-actions {
    width: auto;
    gap: 6px;
    justify-content: flex-end;
  }

  .account-actions .button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .account-actions #adminLink:not(.hidden) {
    display: none;
  }
}

@media (max-width: 480px) {
  .account-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .wc-language-switcher {
    right: auto;
    left: 10px;
    bottom: 10px;
  }

  .wc-language-trigger {
    width: 38px;
    height: 38px;
  }

  .wc-language-menu {
    right: auto;
    left: 0;
    bottom: 46px;
  }
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 360px;
  gap: 28px;
  align-items: stretch;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 18% 14%, rgba(222, 255, 154, 0.08), transparent 22%),
    linear-gradient(140deg, rgba(109, 40, 217, 0.14), rgba(6, 182, 212, 0.07) 42%, rgba(222, 255, 154, 0.03)),
    rgba(7, 12, 23, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 82%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  align-content: center;
}

.hero-title {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 0.96;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 24px;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 780px;
  margin-top: 20px;
}

.hero-strip article {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
}

.hero-strip strong {
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-strip span {
  color: #dbe7f5;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-top: 22px;
}

.hero-metrics article {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sample-carousel {
  width: 100%;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top, rgba(6, 182, 212, 0.16), transparent 42%),
    rgba(3, 10, 20, 0.68);
}

.sample-head,
.sample-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sample-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sample-viewport {
  overflow: hidden;
  margin-top: 12px;
  border-radius: 18px;
}

.sample-track {
  display: flex;
  transition: transform 360ms ease;
}

.sample-offset-0 { transform: translateX(0%); }
.sample-offset-1 { transform: translateX(-100%); }
.sample-offset-2 { transform: translateX(-200%); }
.sample-offset-3 { transform: translateX(-300%); }
.sample-offset-4 { transform: translateX(-400%); }
.sample-offset-5 { transform: translateX(-500%); }

.sample-slide {
  flex: 0 0 100%;
  display: grid;
  gap: 12px;
}

.sample-slide video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #101828;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sample-slide strong {
  display: block;
  font-size: 15px;
}

.sample-slide span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sample-controls {
  justify-content: center;
  margin-top: 14px;
}

.sample-controls button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.sample-controls button.active {
  width: 28px;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.button.primary {
  color: #020611;
  background: linear-gradient(135deg, #ffffff, var(--lime) 92%);
  box-shadow: 0 16px 42px rgba(222, 255, 154, 0.18);
}

.button.secondary {
  color: #edf4ff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.button.secondary.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.16);
}

.button.ghost {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.16);
}

.panel {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.section-head h2 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.05;
}

.section-head p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

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

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

.form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
}

.form-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.form-section-head p {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
}

.form-section-head span {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  text-align: right;
}

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

.workflow-picker {
  border-color: rgba(222, 255, 154, 0.16);
  background:
    radial-gradient(circle at 8% 0%, rgba(222, 255, 154, 0.09), transparent 34%),
    rgba(255, 255, 255, 0.03);
}

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

.workflow-card {
  display: grid;
  min-height: 164px;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(3, 7, 18, 0.38);
  color: #dbe7f5;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.workflow-card:hover {
  transform: translateY(-1px);
  border-color: rgba(6, 182, 212, 0.34);
}

.workflow-card.active {
  border-color: rgba(222, 255, 154, 0.42);
  background:
    radial-gradient(circle at top right, rgba(222, 255, 154, 0.18), transparent 44%),
    rgba(222, 255, 154, 0.055);
  box-shadow: 0 18px 50px rgba(222, 255, 154, 0.08);
}

.workflow-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workflow-card strong {
  color: #f8fbff;
  font-size: 18px;
  line-height: 1.25;
}

.workflow-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
}

.clone-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(210px, 0.55fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 0%, rgba(6, 182, 212, 0.13), transparent 42%),
    radial-gradient(circle at 100% 16%, rgba(222, 255, 154, 0.1), transparent 38%),
    rgba(3, 7, 18, 0.42);
}

.clone-showcase-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.clone-showcase-copy h3 {
  max-width: 460px;
  margin: 0;
  color: #f8fbff;
  font-size: 24px;
  line-height: 1.08;
}

.clone-showcase-copy span {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.65;
}

.clone-showcase-stage {
  min-width: 0;
  overflow: hidden;
}

.clone-sample-track {
  display: flex;
  transition: transform 360ms ease;
}

.clone-sample-track.is-0 { transform: translateX(0%); }
.clone-sample-track.is-1 { transform: translateX(-100%); }

.clone-sample-slide {
  flex: 0 0 100%;
  display: grid;
  gap: 8px;
}

.clone-sample-slide video {
  width: 100%;
  max-height: 280px;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #020611;
  object-fit: cover;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.clone-sample-slide strong {
  color: #eef6ff;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.clone-sample-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.clone-sample-controls button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.clone-sample-controls button.active {
  width: 26px;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
}

.routing-field {
  display: none;
}

label {
  display: grid;
  gap: 7px;
  color: #dbe7f5;
  font-size: 14px;
  font-weight: 700;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.clone-duration-hint {
  display: block;
  margin-top: 1px;
  color: var(--muted);
}

.clone-duration-hint.is-warning {
  color: #deff9a;
}

.clone-duration-hint.is-good {
  color: #9fd7ff;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px transparent;
}

select {
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.045);
}

select option,
select optgroup {
  background-color: #111827;
  color: #f8fbff;
}

select option:checked,
select option:hover,
select option:focus {
  background-color: #2563eb;
  color: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: #6f84a2;
}

input:focus,
select:focus,
textarea:focus,
.button:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

textarea {
  resize: vertical;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  color: rgba(226, 232, 240, 0.46);
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: none;
}

.field-disabled {
  color: rgba(203, 213, 225, 0.46);
}

.upload-field {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

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

.upload-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

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

.file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

.advanced-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.advanced-panel summary {
  min-height: 48px;
  padding: 14px 16px;
  color: #dbe7f5;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  list-style-position: inside;
}

.advanced-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

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

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.preview-grid:empty {
  display: none;
}

.remake-upload-field {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.025);
}

.reference-video-preview {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.58);
}

.reference-video-preview video {
  display: block;
  width: 100%;
  max-height: 180px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  background: #000;
  object-fit: cover;
}

.reference-video-meta {
  min-width: 0;
}

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

.reference-video-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-video-meta span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.reference-url-field {
  padding: 14px;
  border: 1px solid rgba(222, 255, 154, 0.12);
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.34);
}

.remake-upload-field .reference-url-field {
  min-width: 0;
}

.rights-confirmation {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.rights-confirmation input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  padding: 0;
  accent-color: #deff9a;
}

.rights-confirmation.field-invalid {
  color: #fecaca;
}

.rights-confirmation.field-invalid input {
  outline: 2px solid rgba(248, 113, 113, 0.7);
  outline-offset: 2px;
}

.field-error {
  margin-top: -4px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.preview-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.preview-item span {
  display: block;
  overflow: hidden;
  padding: 8px 8px 38px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-remove {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  min-height: 28px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  background: rgba(8, 17, 31, 0.88);
  color: #fecaca;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.estimate-stack {
  display: grid;
  gap: 16px;
}

.estimate-panel,
.guide-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.estimate-panel {
  position: sticky;
  top: 16px;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(6, 182, 212, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    rgba(8, 14, 26, 0.92);
}

.estimate-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.estimate-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 14px;
}

.estimate-total strong {
  color: #ffffff;
  font-size: 56px;
  line-height: 1;
}

.estimate-total span {
  color: var(--muted);
  font-weight: 800;
}

.estimate-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.estimate-list div,
.price-table div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.estimate-list dt,
.price-table span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.estimate-list dd,
.price-table strong {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.price-table {
  margin-top: 14px;
}

.guide-card {
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(109, 40, 217, 0.14), transparent 35%),
    rgba(8, 14, 26, 0.86);
}

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

.guide-list article {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.guide-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.guide-list strong {
  font-size: 14px;
}

.guide-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

#progressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan), var(--violet));
  transition: width 240ms ease;
}

.progress-width-0 { width: 0% !important; }
.progress-width-5 { width: 5% !important; }
.progress-width-10 { width: 10% !important; }
.progress-width-15 { width: 15% !important; }
.progress-width-20 { width: 20% !important; }
.progress-width-25 { width: 25% !important; }
.progress-width-30 { width: 30% !important; }
.progress-width-35 { width: 35% !important; }
.progress-width-40 { width: 40% !important; }
.progress-width-45 { width: 45% !important; }
.progress-width-50 { width: 50% !important; }
.progress-width-55 { width: 55% !important; }
.progress-width-60 { width: 60% !important; }
.progress-width-65 { width: 65% !important; }
.progress-width-70 { width: 70% !important; }
.progress-width-75 { width: 75% !important; }
.progress-width-80 { width: 80% !important; }
.progress-width-85 { width: 85% !important; }
.progress-width-90 { width: 90% !important; }
.progress-width-95 { width: 95% !important; }
.progress-width-100 { width: 100% !important; }

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

.status-metric {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.status-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-metric strong {
  font-size: 21px;
  line-height: 1.1;
}

.status-inline-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.status-inline-badge.tone-completed {
  color: var(--lime);
  background: var(--soft-lime);
  border-color: rgba(222, 255, 154, 0.16);
}

.status-inline-badge.tone-active {
  color: #93c5fd;
  background: var(--soft-blue);
  border-color: rgba(37, 99, 235, 0.16);
}

.status-inline-badge.tone-failed {
  color: #fca5a5;
  background: var(--soft-danger);
  border-color: rgba(248, 113, 113, 0.18);
}

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

.status-rail-step {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.status-rail-step strong {
  font-size: 13px;
}

.status-rail-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-rail-step.is-complete {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.08);
}

.status-rail-step.is-active {
  border-color: rgba(6, 182, 212, 0.28);
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-1px);
}

.status-rail-step.is-failed {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(127, 29, 29, 0.16);
}

.status-note {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.65;
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
  margin-top: 16px;
}

.status-copy {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.result {
  max-height: 460px;
  overflow: auto;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  color: #dbe7f5;
  white-space: pre-wrap;
}

.result-summary {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-height: none;
  overflow: visible;
  white-space: normal;
}

.status-copy > .button {
  width: fit-content;
}

.delivery-hero,
.delivery-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.delivery-hero {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.03);
}

.delivery-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.delivery-hero-head,
.delivery-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-card h3,
.delivery-hero h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.delivery-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.delivery-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.delivery-status.tone-completed {
  color: var(--lime);
  background: var(--soft-lime);
  border-color: rgba(222, 255, 154, 0.16);
}

.delivery-status.tone-active {
  color: #93c5fd;
  background: var(--soft-blue);
  border-color: rgba(37, 99, 235, 0.16);
}

.delivery-status.tone-failed {
  color: #fca5a5;
  background: var(--soft-danger);
  border-color: rgba(248, 113, 113, 0.18);
}

.delivery-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.delivery-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 750;
}

.delivery-copy {
  margin: 14px 0 0;
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.7;
}

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

.delivery-process-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.delivery-process-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

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

.delivery-script {
  display: grid;
  gap: 10px;
}

.delivery-script-block {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
}

.delivery-script-block pre,
.delivery-json pre {
  margin: 0;
  color: #dbe7f5;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.delivery-kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.delivery-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.delivery-kv-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.delivery-kv-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.delivery-kv-row dd {
  margin: 0;
  max-width: 58%;
  color: #f8fbff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  text-align: right;
  word-break: break-word;
}

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

.delivery-checklist li {
  position: relative;
  padding: 0 0 0 22px;
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.7;
}

.delivery-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  box-shadow: 0 0 16px rgba(222, 255, 154, 0.24);
}

.delivery-checklist-compact {
  gap: 8px;
}

.delivery-checklist-compact li {
  font-size: 12px;
}

.delivery-outcome-card {
  background:
    radial-gradient(circle at top right, rgba(222, 255, 154, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.delivery-outcome-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delivery-client-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.delivery-client-banner strong {
  color: #f8fbff;
  font-size: 15px;
  line-height: 1.3;
}

.delivery-client-banner span {
  color: #dbe7f5;
  font-size: 12px;
  line-height: 1.65;
}

.delivery-client-banner.tone-completed {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.08);
}

.delivery-client-banner.tone-active {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(37, 99, 235, 0.08);
}

.delivery-flag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  font-weight: 800;
}

.delivery-flag.tone-completed {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.1);
  color: var(--lime);
}

.delivery-flag.tone-active {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(37, 99, 235, 0.08);
  color: #93c5fd;
}

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

.delivery-outcome-item {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.delivery-outcome-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-outcome-item strong {
  color: #f8fbff;
  font-size: 15px;
  line-height: 1.4;
}

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

.delivery-record-item {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.delivery-record-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-record-item strong {
  color: #eaf2ff;
  font-size: 13px;
  line-height: 1.5;
}

.delivery-foldout {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.delivery-foldout summary {
  min-height: 54px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.delivery-foldout summary::-webkit-details-marker {
  display: none;
}

.delivery-foldout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-foldout-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.delivery-foldout-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-foldout[open] .delivery-foldout-head span {
  color: #dbe7f5;
}

.delivery-foldout-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.delivery-json {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.delivery-json summary {
  min-height: 44px;
  padding: 12px 14px;
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.delivery-json[open] summary {
  border-bottom: 1px solid var(--line);
}

.delivery-json pre {
  padding: 14px;
}

.dna-overview,
.dna-section {
  display: grid;
  gap: 14px;
}

.dna-overview > div:first-child {
  display: grid;
  gap: 10px;
}

.dna-overview p,
.dna-remake-plan p,
.dna-empty {
  margin: 0;
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.7;
}

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

.dna-fact-grid article {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.dna-fact-grid span,
.dna-section-head span,
.dna-shot-head span,
.dna-shot dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dna-fact-grid strong {
  color: #f8fbff;
  font-size: 13px;
  line-height: 1.5;
}

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

.dna-section-head,
.dna-shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dna-section-head strong,
.dna-shot-head strong {
  color: #f8fbff;
  font-size: 12px;
}

.dna-sequence,
.dna-risk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dna-sequence span,
.dna-risk-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 750;
}

.dna-sequence b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: #07101d;
  font-size: 10px;
}

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

.dna-shot {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.025);
}

.dna-shot p {
  margin: 0;
  color: #f8fbff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.dna-shot dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.dna-shot dl > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
}

.dna-shot dd {
  margin: 0;
  color: #b8c7da;
  font-size: 11px;
  line-height: 1.55;
}

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

.dna-list {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.dna-list-wide {
  grid-column: 1 / -1;
}

.dna-list > strong {
  color: var(--lime);
  font-size: 12px;
}

.dna-list ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 17px;
  color: #dbe7f5;
  font-size: 12px;
  line-height: 1.55;
}

.dna-risk-list span {
  border-color: rgba(248, 113, 113, 0.16);
  background: rgba(127, 29, 29, 0.12);
  color: #fecaca;
}

.video-panel {
  position: sticky;
  top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
}

.video-panel video,
.video-placeholder {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #101828;
}

.video-placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  color: #b6c7de;
  font-weight: 700;
  text-align: center;
}

.video-panel .button {
  width: 100%;
  margin-top: 10px;
}

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

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

#videoLibrary.is-preview {
  padding-bottom: 24px;
}

#videoLibrary.is-preview .library-head {
  align-items: center;
}

#videoLibrary.is-preview .library-toolbar {
  display: none;
}

#videoLibrary.is-preview .library-controls {
  align-items: center;
}

#videoLibrary.is-preview .library-only-action {
  display: none;
}

#videoLibrary.is-preview .library-stats span:not(.library-stat-ready) {
  display: none;
}

.library-page .hero,
.library-page .shell > .panel:not(#videoLibrary),
.library-page #statusPanel {
  display: none;
}

.library-toolbar {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-filter {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.library-filter:hover {
  transform: translateY(-1px);
}

.library-filter.active {
  color: #020611;
  border-color: rgba(222, 255, 154, 0.22);
  background: linear-gradient(135deg, #ffffff, var(--lime) 92%);
}

.library-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.library-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.library-view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.library-view-button {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.library-view-button.active {
  background: rgba(255, 255, 255, 0.09);
  color: #f8fbff;
}

.library-select,
.library-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 750;
}

.library-select span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}

.library-select select {
  width: auto;
  min-width: 132px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.library-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--lime);
}

.library-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.library-head .button {
  flex: 0 0 auto;
}

.button[data-tooltip] {
  position: relative;
}

#clearFailedHistory.danger-tool {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.16);
}

.tool-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.22);
  color: #fff5f5;
  font-size: 11px;
  font-weight: 900;
}

.library-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 750;
}

.library-stats span.library-stat-ready {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.1);
  color: var(--lime);
}

.video-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.library-more-card {
  min-height: 260px;
  align-content: center;
  justify-items: start;
  background:
    radial-gradient(circle at 18% 18%, rgba(222, 255, 154, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.library-more-card h3 {
  margin: 0;
  font-size: 26px;
}

.library-more-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.library-more-card .button {
  margin-top: 6px;
}

.video-history.is-list {
  grid-template-columns: 1fr;
}

.history-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.history-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.history-card.is-completed {
  border-color: rgba(222, 255, 154, 0.12);
  box-shadow: inset 0 1px 0 rgba(222, 255, 154, 0.04), 0 18px 46px rgba(6, 182, 212, 0.06);
}

.history-card.is-completed::before {
  background: linear-gradient(90deg, rgba(222, 255, 154, 0.92), rgba(6, 182, 212, 0.84));
}

.history-card.is-failed {
  border-color: rgba(248, 113, 113, 0.14);
  box-shadow: inset 0 1px 0 rgba(248, 113, 113, 0.05), 0 18px 46px rgba(127, 29, 29, 0.1);
}

.history-card.is-failed::before {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.92), rgba(251, 191, 36, 0.6));
}

.history-card.is-active-card {
  border-color: rgba(96, 165, 250, 0.12);
  box-shadow: inset 0 1px 0 rgba(96, 165, 250, 0.04), 0 18px 46px rgba(37, 99, 235, 0.07);
}

.history-card.is-active-card::before {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.92), rgba(109, 40, 217, 0.76));
}

.video-history.is-list .history-card {
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 16px 18px;
  align-items: start;
}

.history-cover {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(109, 40, 217, 0.16), rgba(6, 182, 212, 0.08), rgba(255, 255, 255, 0.02)),
    #07101d;
}

.history-cover.tone-completed {
  background:
    radial-gradient(circle at top right, rgba(222, 255, 154, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(6, 182, 212, 0.12), rgba(222, 255, 154, 0.08), rgba(255, 255, 255, 0.02)),
    #07101d;
}

.history-cover.tone-failed {
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(127, 29, 29, 0.18), rgba(248, 113, 113, 0.05), rgba(255, 255, 255, 0.02)),
    #07101d;
}

.history-cover-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}

.history-cover-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.history-cover-status.tone-completed {
  color: var(--lime);
  background: var(--soft-lime);
  border-color: rgba(222, 255, 154, 0.16);
}

.history-cover-status.tone-active {
  color: #93c5fd;
  background: var(--soft-blue);
  border-color: rgba(37, 99, 235, 0.16);
}

.history-cover-status.tone-failed {
  color: #fca5a5;
  background: var(--soft-danger);
  border-color: rgba(248, 113, 113, 0.18);
}

.history-cover-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.history-cover-meta strong {
  display: block;
  font-size: 22px;
  line-height: 1.08;
}

.history-cover-meta span {
  color: #dbe7f5;
  font-size: 13px;
  line-height: 1.6;
}

.history-cover-hint {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-cover-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}

.history-cover-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 9, 22, 0.12), rgba(4, 9, 22, 0.56) 72%, rgba(4, 9, 22, 0.76)),
    linear-gradient(0deg, rgba(4, 9, 22, 0.24), transparent 38%);
  transition: opacity 180ms ease;
}

.history-cover.preview-visible .history-cover-media::after {
  opacity: 0.82;
}

.history-cover-video {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.history-cover.preview-visible .history-cover-video {
  opacity: 1;
}

.history-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.history-title {
  min-width: 0;
}

.history-title h3 {
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-title time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e3f4;
  font-size: 11px;
  font-weight: 850;
}

.status-completed {
  background: var(--soft-lime);
  color: var(--lime);
}

.status-failed {
  background: var(--soft-danger);
  color: #fca5a5;
}

.status-generating_script,
.status-creating_avatar_video,
.status-creating_broll,
.status-archiving_video,
.status-packaging,
.status-queued {
  background: var(--soft-blue);
  color: #93c5fd;
}

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

.history-meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe7f5;
  font-size: 11px;
  font-weight: 750;
}

.history-meta span.history-meta-state {
  font-weight: 850;
}

.history-meta-state.tone-completed {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.1);
  color: var(--lime);
}

.history-meta-state.tone-failed {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.history-meta-state.tone-active {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(37, 99, 235, 0.1);
  color: #93c5fd;
}

.history-conclusion {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.history-conclusion strong {
  color: #f8fbff;
  font-size: 14px;
  line-height: 1.35;
}

.history-conclusion span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.history-conclusion.tone-completed {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.08);
}

.history-conclusion.tone-completed strong {
  color: var(--lime);
}

.history-conclusion.tone-failed {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(127, 29, 29, 0.12);
}

.history-conclusion.tone-failed strong {
  color: #fca5a5;
}

.history-conclusion.tone-active {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(37, 99, 235, 0.08);
}

.history-conclusion.tone-active strong {
  color: #bfdbfe;
}

.history-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.history-progress div {
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan), var(--violet));
}

.balance-negative {
  color: #b42318;
}

.clipboard-proxy {
  position: absolute;
  left: -9999px;
}

.history-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -2px;
}

.history-progress-meta span,
.history-progress-meta strong {
  font-size: 11px;
  line-height: 1.4;
}

.history-progress-meta span {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-progress-meta strong {
  color: #edf4ff;
  font-weight: 850;
}

.history-step {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: #dbe7f5;
  font-size: 12px;
  line-height: 1.6;
}

.history-step-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.history-card.is-completed .history-step-hint {
  color: rgba(222, 255, 154, 0.82);
}

.history-card.is-failed .history-step-hint {
  color: #f3b0b0;
}

.history-card.is-active-card .history-step-hint {
  color: #9cb8da;
}

.history-card.is-completed .history-step {
  border-color: rgba(222, 255, 154, 0.14);
  background: rgba(222, 255, 154, 0.05);
}

.history-card.is-failed .history-step {
  border-color: rgba(248, 113, 113, 0.16);
  background: rgba(127, 29, 29, 0.12);
}

.history-card.is-active-card .history-step {
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.08);
}

.history-delivery-note {
  margin: -2px 0 0;
  color: #dbe7f5;
  font-size: 12px;
  line-height: 1.6;
}

.history-media video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #101828;
  object-fit: contain;
}

.history-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 8px;
}

.history-actions .button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}

.history-actions .button.action-main {
  font-weight: 850;
}

.history-actions .button.action-download {
  box-shadow: 0 14px 34px rgba(222, 255, 154, 0.16);
}

.history-actions .button.action-quiet {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.history-actions .button.action-danger-subtle {
  color: #fda4af;
  border-color: rgba(248, 113, 113, 0.18);
  background: rgba(127, 29, 29, 0.08);
}

.history-card.is-terminal .history-cover {
  min-height: 204px;
}

.history-card.is-terminal .history-actions {
  margin-top: 2px;
}

.video-history.is-list .history-cover {
  grid-row: 1 / span 6;
  min-height: 100%;
}

.video-history.is-list .history-card-head,
.video-history.is-list .history-meta,
.video-history.is-list .history-progress,
.video-history.is-list .history-step,
.video-history.is-list .history-media,
.video-history.is-list .history-actions {
  grid-column: 2;
}

@media (hover: hover) {
  .button[data-tooltip]:hover::after,
  .button[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    min-width: 180px;
    max-width: 240px;
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(8, 12, 24, 0.96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    color: #edf4ff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
    z-index: 5;
    pointer-events: none;
  }
}

.history-empty {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 17, 0.76);
  backdrop-filter: blur(16px);
}

.modal-card {
  width: min(100%, 460px);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 32%),
    rgba(8, 12, 24, 0.96);
  box-shadow: var(--shadow);
}

.modal-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.modal-copy {
  margin: 14px 0 0;
  color: #dbe7f5;
  font-size: 14px;
  line-height: 1.75;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 110;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(8, 12, 24, 0.94);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
  color: #edf4ff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.toast.toast-success {
  border-color: rgba(222, 255, 154, 0.18);
  background:
    radial-gradient(circle at top right, rgba(222, 255, 154, 0.1), transparent 32%),
    rgba(8, 12, 24, 0.94);
}

.toast.toast-error {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.14), transparent 34%),
    rgba(20, 10, 18, 0.96);
  color: #fee2e2;
}

body.drawer-open {
  overflow: hidden;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  background: rgba(2, 6, 17, 0.68);
  backdrop-filter: blur(12px);
}

.drawer-panel {
  width: min(720px, 100%);
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 22%),
    radial-gradient(circle at top left, rgba(109, 40, 217, 0.14), transparent 24%),
    rgba(8, 12, 24, 0.97);
  box-shadow: var(--shadow);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.drawer-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.drawer-head-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.drawer-body {
  overflow: auto;
  padding: 22px 24px 24px;
}

.drawer-grid,
.drawer-delivery-stack {
  display: grid;
  gap: 16px;
}

.drawer-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  margin-bottom: 16px;
}

.drawer-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.drawer-guidance-card {
  margin-bottom: 16px;
  border-color: rgba(255, 124, 124, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 92, 92, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
}

.drawer-action-card {
  margin-bottom: 16px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.drawer-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.drawer-action-badge.tone-completed {
  border-color: rgba(222, 255, 154, 0.18);
  background: rgba(222, 255, 154, 0.1);
  color: var(--lime);
}

.drawer-action-badge.tone-failed {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.drawer-action-badge.tone-active {
  border-color: rgba(96, 165, 250, 0.18);
  background: rgba(37, 99, 235, 0.1);
  color: #93c5fd;
}

.drawer-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 750;
}

.drawer-action-copy {
  margin: 0;
  color: #e6eef9;
  font-size: 13px;
  line-height: 1.7;
}

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

.drawer-fact {
  display: grid;
  gap: 6px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.drawer-fact span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-fact strong {
  color: #f8fbff;
  font-size: 15px;
  line-height: 1.4;
}

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

.drawer-primary-actions .button {
  min-height: 42px;
  padding: 9px 10px;
  font-size: 12px;
}

.drawer-guidance-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 124, 124, 0.28);
  border-radius: 999px;
  background: rgba(255, 124, 124, 0.14);
  color: #ffd1d1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-guidance-copy,
.drawer-guidance-footnote {
  margin: 0;
}

.drawer-guidance-copy {
  color: #f6fbff;
  font-size: 14px;
  line-height: 1.7;
}

.drawer-guidance-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #dbe6f5;
  font-size: 13px;
  line-height: 1.7;
}

.drawer-guidance-footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.drawer-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-card-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.drawer-preview-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #101828;
}

.drawer-preview-placeholder,
.drawer-preview-video {
  width: 100%;
  aspect-ratio: 9 / 16;
}

.drawer-preview-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  color: #c9d7ea;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}

.drawer-preview-video {
  display: block;
  background: #101828;
  object-fit: contain;
}

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

.drawer-action-row .button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.drawer-kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.drawer-meta-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.drawer-meta-actions .button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.drawer-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.drawer-kv-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.drawer-kv-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.drawer-kv-row dd {
  margin: 0;
  max-width: 58%;
  color: #f8fbff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
  word-break: break-word;
}

@media (max-width: 1050px) {
  .workspace-head,
  .hero {
    grid-template-columns: 1fr;
  }

  .workspace-head {
    align-items: flex-start;
  }

  .library-toolbar {
    justify-items: start;
  }

  .workspace-head-actions {
    justify-content: flex-start;
  }

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

  .workflow-cards {
    grid-template-columns: 1fr;
  }

  .clone-showcase {
    grid-template-columns: 1fr;
  }

  .clone-sample-slide video {
    max-height: 360px;
  }

  .estimate-panel,
  .video-panel {
    position: static;
  }

  .sample-carousel {
    max-width: 360px;
    justify-self: center;
  }

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

  .status-summary,
  .status-rail {
    grid-template-columns: 1fr;
  }

  .delivery-card-head,
  .delivery-hero-head,
  .delivery-kv-row,
  .delivery-foldout-head {
    flex-direction: column;
  }

  .delivery-kv-row dd {
    max-width: none;
    text-align: left;
  }

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

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

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

  .video-history.is-list .history-card {
    grid-template-columns: 1fr;
  }

  .video-history.is-list .history-cover,
  .video-history.is-list .history-card-head,
  .video-history.is-list .history-meta,
  .video-history.is-list .history-progress,
  .video-history.is-list .history-step,
  .video-history.is-list .history-media,
  .video-history.is-list .history-actions {
    grid-column: auto;
    grid-row: auto;
  }

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

  .drawer-kv-row {
    flex-direction: column;
  }

  .drawer-kv-row dd {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 800px) {
  .shell {
    width: min(100% - 24px, 100%);
    padding-top: 14px;
  }

  .studio-page .hero {
    display: none;
  }

  .studio-page .workspace-head {
    padding-bottom: 10px;
  }

  .studio-page .workspace-title {
    margin-bottom: 4px;
    font-size: 30px;
  }

  .studio-page .workspace-copy {
    font-size: 13px;
  }

  .reference-video-preview {
    grid-template-columns: 1fr;
  }

  .reference-video-preview video {
    max-width: 180px;
  }

  .dna-fact-grid,
  .dna-shot-grid,
  .dna-plan-grid {
    grid-template-columns: 1fr;
  }

  .dna-section-head,
  .dna-shot-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-head,
  .hero {
    gap: 18px;
  }

  .hero {
    padding: 22px;
  }

  .panel {
    padding: 18px;
  }

  .hero-metrics,
  .form,
  .form-section-grid,
  .workflow-cards,
  .hero-strip,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .form-section-head {
    display: grid;
  }

  .form-section-head span {
    text-align: left;
  }

  .upload-head,
  .library-head {
    flex-direction: column;
    align-items: stretch;
  }

  .library-options {
    width: 100%;
    justify-content: flex-start;
  }

  .library-toolbar {
    width: 100%;
  }

  .library-filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .library-filter {
    flex: 0 0 auto;
  }

  .library-select,
  .library-toggle {
    flex: 1 1 190px;
    justify-content: space-between;
  }

  .upload-actions {
    justify-content: flex-start;
  }

  .library-controls {
    justify-content: flex-start;
  }

  .sample-carousel {
    max-width: none;
  }

  .video-history {
    grid-template-columns: 1fr;
  }

  .workspace-head-actions {
    width: 100%;
  }

  .workspace-head-actions .button {
    flex: 1 1 160px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .drawer-backdrop {
    padding: 0;
  }

  .drawer-panel {
    width: 100%;
    border-radius: 0;
  }

  .drawer-head,
  .drawer-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .drawer-head {
    grid-template-columns: 1fr;
  }

  .drawer-head,
  .drawer-card-head {
    flex-direction: column;
  }

  .drawer-head-actions {
    width: 100%;
    justify-items: stretch;
  }

  .drawer-head-actions .button {
    width: 100%;
  }

  .drawer-fact-grid,
  .drawer-primary-actions,
  .drawer-action-row {
    grid-template-columns: 1fr;
  }

  .drawer-meta-actions {
    grid-template-columns: 1fr;
  }
}
