/* ============================================================
   WARNING LAB — restoration / components tail
   ============================================================ */

/* command */

.command-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b0b0d;
  transition: border-color 160ms ease;
}

.command-form:focus-within {
  border-color: rgba(255, 59, 48, 0.42);
}

.command-mark {
  color: var(--red);
}

.command-mark .icon {
  width: 13px;
  height: 13px;
}

.command-form input {
  flex: 1;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 9px;
}

.command-form input:focus {
  outline: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.command-form button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: var(--text);
  color: #101012;
  cursor: pointer;
}

.command-form button:hover {
  background: #fff;
}

.command-form button .icon {
  width: 13px;
  height: 13px;
}

.agent-reply {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 2px solid var(--red);
  border-radius: 0 5px 5px 0;
  background: rgba(255, 59, 48, 0.045);
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.agent-reply.is-visible {
  display: block;
  animation: content-in 280ms ease;
}

.agent-reply b {
  color: var(--text-soft);
  font-weight: 600;
}

/* processing */

.processing {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 6px 0;
}

.processing-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid rgba(255, 59, 48, 0.15);
  border-radius: 12px;
  background:
    radial-gradient(260px 130px at 13% 50%, rgba(255, 59, 48, 0.1), transparent 70%),
    #101012;
}

.radar {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 59, 48, 0.28);
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.035);
}

.radar::before,
.radar::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.radar::before {
  inset: 8px;
  border: 1px solid rgba(255, 59, 48, 0.22);
}

.radar::after {
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  border-radius: 50% 100% 0 0;
  background: linear-gradient(45deg, rgba(255, 59, 48, 0.6), transparent 70%);
  transform-origin: 0 0;
  animation: radar 1.7s linear infinite;
}

.processing-hero h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.processing-hero p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 9px;
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.processing-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.012);
  color: #56565e;
  font-size: 9px;
  transition: 250ms ease;
}

.processing-step i {
  width: 6px;
  height: 6px;
  border: 1px solid #414147;
  border-radius: 50%;
}

.processing-step.active {
  border-color: rgba(255, 59, 48, 0.2);
  background: rgba(255, 59, 48, 0.04);
  color: var(--text-soft);
}

.processing-step.active i {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.7);
  animation: blink 900ms ease-in-out infinite;
}

.processing-step.done {
  color: var(--muted);
}

.processing-step.done i {
  border-color: var(--green);
  background: var(--green);
}

.processing-step b {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 400;
}

.agent-log {
  height: 108px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08080a;
}

.agent-log-line {
  color: #5e5e66;
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.55;
  animation: log-in 260ms ease both;
}

.agent-log-line b {
  color: #ff7168;
  font-weight: 400;
}

/* preview panel */

.preview-panel {
  overflow: hidden;
  align-self: start;
}

.preview-heading {
  align-items: flex-start;
}

.format-badges {
  display: flex;
  gap: 4px;
  padding-top: 3px;
}

.format-badges span {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.03em;
}

.preview-stage {
  position: relative;
  margin: 13px -5px 0;
  padding: 23px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background:
    radial-gradient(300px 300px at 50% 38%, rgba(255, 59, 48, 0.085), transparent 70%),
    #0b0b0d;
  overflow: hidden;
}

.preview-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.65), transparent 74%);
  pointer-events: none;
}

.stage-glow {
  position: absolute;
  top: 13%;
  width: 220px;
  height: 65%;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.065);
  filter: blur(52px);
  pointer-events: none;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 304px);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 33px;
  background: linear-gradient(155deg, #343438, #131315 38%, #060607);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.64),
    0 0 0 1px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.phone-frame::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(255, 59, 48, 0.055);
  border-radius: 43px;
  pointer-events: none;
}

.phone-camera {
  position: absolute;
  z-index: 4;
  top: 13px;
  left: 50%;
  width: 48px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050506;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 27px;
  background: #050506;
  isolation: isolate;
}

#adCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.screen-noise {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.screen-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 27px;
  pointer-events: none;
  box-shadow:
    inset 0 0 45px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.screen-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.07) 2px 3px);
  opacity: 0.42;
}

.stage-label {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5a5a61;
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.stage-label-top {
  top: 8px;
}

.stage-label-bottom {
  bottom: 7px;
  justify-content: flex-end;
}

.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 7px rgba(255, 59, 48, 0.7);
  animation: blink 1.5s ease-in-out infinite;
}

.transport {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.play-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: var(--text);
  color: #0b0b0c;
  cursor: pointer;
  transition: 160ms ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
  background: #fff;
  transform: scale(1.04);
}

.play-button .icon {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.play-button.is-playing .icon {
  margin-left: 0;
}

.timeline-wrap {
  flex: 1;
  min-width: 0;
}

.timeline {
  position: relative;
  height: 19px;
  display: flex;
  align-items: center;
}

.timeline-chapters {
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 4px;
  display: flex;
  gap: 2px;
  overflow: hidden;
  border-radius: 2px;
  pointer-events: none;
}

.timeline-chapter {
  height: 100%;
  background: #303036;
  transition: background 180ms ease;
}

.timeline-chapter.done {
  background: #6d2925;
}

.timeline-chapter.current {
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.4);
}

#seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 19px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

#seek::-webkit-slider-runnable-track {
  height: 19px;
  background: transparent;
}

#seek::-moz-range-track {
  height: 19px;
  background: transparent;
}

#seek::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  appearance: none;
  border: 2px solid #0b0b0d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

#seek::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 2px solid #0b0b0d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  color: #55555c;
  font-family: var(--font-mono);
  font-size: 6.5px;
}

.timeline-meta .now-playing {
  color: var(--muted);
  letter-spacing: 0.035em;
}

.sound-button {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #57575f;
  cursor: pointer;
  transition: 150ms ease;
}

.sound-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.sound-button.is-on {
  color: #aaaab1;
}

.sound-button .icon {
  width: 14px;
  height: 14px;
}

.chapter-pills {
  display: flex;
  gap: 4px;
  margin-top: 11px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chapter-pills::-webkit-scrollbar {
  display: none;
}

.chapter-pill {
  min-width: 0;
  flex: 1;
  padding: 7px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted-2);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.chapter-pill:hover {
  border-color: var(--line-strong);
  color: var(--muted);
}

.chapter-pill.active {
  border-color: rgba(255, 59, 48, 0.28);
  background: rgba(255, 59, 48, 0.055);
  color: #ff8a82;
}

.chapter-pill b {
  display: block;
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 400;
  opacity: 0.75;
}

.chapter-pill span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 7px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 13px;
}

.action-button {
  height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 8.5px;
  cursor: pointer;
  transition: 150ms ease;
  white-space: nowrap;
}

.action-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.action-button .icon {
  width: 12px;
  height: 12px;
}

.action-button-red {
  border-color: rgba(255, 59, 48, 0.22);
  background: rgba(255, 59, 48, 0.075);
  color: #ff8a82;
}

.action-button-red:hover {
  border-color: rgba(255, 59, 48, 0.38);
  background: rgba(255, 59, 48, 0.12);
  color: #ffaaa4;
}

.preview-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: #4e4e55;
  font-size: 6.5px;
}

.preview-footnote > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.preview-footnote .icon {
  width: 10px;
  height: 10px;
}

.preview-footnote button {
  padding: 3px;
  border: 0;
  background: none;
  color: #4e4e55;
  cursor: pointer;
}

.preview-footnote button:hover {
  color: var(--text-soft);
}

.preview-footnote button .icon {
  width: 11px;
  height: 11px;
}

/* footer & toast */

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 18px 2px 0;
  border-top: 1px solid var(--line);
  color: #48484f;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.footer-mark {
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.footer-meta {
  display: flex;
  gap: 16px;
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px 10px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(20, 20, 23, 0.96);
  color: var(--text-soft);
  font-size: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100vw - 32px);
}

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

.toast-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 59, 48, 0.12);
  color: var(--red);
}

.toast-icon .icon {
  width: 13px;
  height: 13px;
}

/* modals */

.modal {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 44px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 20%),
    #111113;
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal::backdrop {
  background: rgba(4, 4, 5, 0.78);
  backdrop-filter: blur(8px);
}

.modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 23px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.modal-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.modal-head p {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.icon-button {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition: 150ms ease;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.icon-button .icon {
  width: 14px;
  height: 14px;
}

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 17px 23px;
  scrollbar-width: thin;
  scrollbar-color: #3b3b41 transparent;
}

.connection-card {
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.012);
}

.connection-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.connection-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
}

.connection-icon .icon {
  width: 15px;
  height: 15px;
}

.connection-icon.text {
  background: rgba(255, 59, 48, 0.1);
  color: #ff796f;
}

.connection-icon.voice {
  background: rgba(255, 196, 77, 0.1);
  color: var(--amber);
}

.connection-icon.video {
  background: rgba(114, 183, 255, 0.1);
  color: var(--blue);
}

.connection-head > div {
  flex: 1;
  min-width: 0;
}

.connection-head h3 {
  margin: 1px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.connection-head h3 span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.connection-head p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.45;
}

.connection-status {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.connection-status.is-live {
  border-color: rgba(102, 217, 146, 0.22);
  background: rgba(102, 217, 146, 0.055);
  color: var(--green);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}

.settings-grid .field {
  gap: 5px;
}

.settings-grid .field label {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.settings-grid input,
.settings-grid select {
  height: 36px;
  font-size: 10px;
}

.field-full {
  grid-column: 1 / -1;
}

.connection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.mini-button {
  height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.mini-button:hover {
  color: var(--text-soft);
  border-color: var(--line-strong);
}

.mini-button .icon {
  width: 11px;
  height: 11px;
}

.connection-note {
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.45;
}

.modal-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 196, 77, 0.13);
  border-radius: 8px;
  background: rgba(255, 196, 77, 0.03);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
}

.modal-tip .icon {
  width: 13px;
  height: 13px;
  color: var(--amber);
}

.modal-tip p {
  margin: 0;
}

.modal-tip b {
  color: #d7b36a;
  font-weight: 500;
}

.modal-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 23px;
  border-top: 1px solid var(--line);
  background: #0d0d0f;
}

.modal-foot .ghost-button {
  height: 40px;
}

.video-modal {
  width: min(690px, calc(100vw - 28px));
}

.video-summary {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.6fr 0.6fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.video-summary > div {
  padding: 10px;
  background: #0d0d0f;
}

.video-summary span {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: 0.06em;
}

.video-summary b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-connection-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
}

.video-connection-row p {
  margin: 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.45;
}

.prompt-preview {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08080a;
  scrollbar-width: thin;
}

.prompt-preview-line {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #66666e;
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.55;
}

.prompt-preview-line:last-child {
  border: 0;
}

.prompt-preview-line b {
  color: #a3a3aa;
  font-weight: 400;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.video-actions .action-button {
  flex: 1;
  min-width: 150px;
}

.video-actions .action-button-red {
  flex: 0 0 auto;
  padding: 0 14px;
}

.video-submit-log {
  display: none;
  margin-top: 11px;
  padding: 9px 10px;
  border-left: 2px solid var(--green);
  border-radius: 0 6px 6px 0;
  background: rgba(102, 217, 146, 0.04);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.video-submit-log.is-visible {
  display: block;
}

/* runtime */

body.modal-open {
  overflow: hidden;
}

.engine-pill.is-live .engine-dot {
  background: var(--green);
  box-shadow: 0 0 10px rgba(102, 217, 146, 0.8);
  animation: blink 2.4s ease-in-out infinite;
}

.engine-pill.is-live {
  border-color: rgba(102, 217, 146, 0.16);
  color: #9cbfa8;
}

button:disabled {
  cursor: wait;
}

.text-button:disabled {
  opacity: 0.4;
  cursor: wait;
}

.phone-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.phone-frame:fullscreen::before,
.phone-frame:fullscreen .phone-camera {
  display: none;
}

.phone-frame:fullscreen .phone-screen {
  width: auto;
  height: 100vh;
  max-width: 100vw;
  border-radius: 0;
  aspect-ratio: 9 / 16;
}

.phone-frame:fullscreen .screen-frame {
  border-radius: 0;
}

/* responsive */

@media (max-width: 1430px) {
  .studio {
    grid-template-columns: 324px minmax(420px, 1fr) 342px;
    gap: 14px;
  }
  .panel {
    padding: 17px;
  }
  .phone-frame {
    width: min(100%, 286px);
  }
  .hero-protocol {
    display: none;
  }
}

@media (max-width: 1180px) {
  .studio {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
    grid-template-areas:
      'brief preview'
      'output output';
  }
  .preview-panel {
    position: relative;
    top: 0;
    max-width: 420px;
    width: 100%;
    justify-self: end;
  }
  .output-panel {
    min-height: 0;
  }
  .hero {
    min-height: 180px;
    padding-top: 30px;
  }
  .output-body {
    min-height: 420px;
  }
  .preview-stage {
    padding-top: 20px;
    padding-bottom: 16px;
  }
  .phone-frame {
    width: min(100%, 292px);
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 18px;
    gap: 12px;
  }
  .topbar-path,
  .brand-sub,
  .engine-pill {
    display: none;
  }
  .page {
    padding: 0 18px 24px;
  }
  .hero {
    min-height: 0;
    padding: 27px 0 24px;
    display: block;
  }
  .hero h1 {
    font-size: clamp(38px, 8.3vw, 52px);
  }
  .hero p {
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.7;
  }
  .desktop-only {
    display: none;
  }
  .eyebrow {
    margin-bottom: 13px;
    font-size: 8px;
  }
  .eyebrow-cn {
    display: none;
  }
  .studio {
    grid-template-columns: 1fr;
    grid-template-areas:
      'brief'
      'preview'
      'output';
    gap: 12px;
  }
  .preview-panel {
    max-width: none;
    justify-self: stretch;
  }
  .brief-panel,
  .preview-panel,
  .output-panel {
    animation-duration: 500ms;
  }
  .preview-stage {
    margin-left: -4px;
    margin-right: -4px;
    padding: 24px 12px 22px;
  }
  .phone-frame {
    width: min(100%, 264px);
  }
  .output-panel {
    min-height: 0;
  }
  .panel-heading p {
    font-size: 9px;
  }
  .field-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(108px, 0.7fr);
  }
  .provider-line {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }
  .footer-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 15px;
  }
  .modal-head {
    padding: 18px 16px 14px;
  }
  .modal-body {
    padding: 14px 16px;
  }
  .modal-foot {
    padding: 12px 16px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .field-full {
    grid-column: auto;
  }
  .video-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .topbar {
    height: 58px;
    padding: 0 14px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .brand-type {
    font-size: 18px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .topbar-actions .ghost-button span {
    display: none;
  }
  .topbar-actions .ghost-button {
    width: 32px;
    padding: 0;
  }
  .user-chip {
    width: 30px;
    height: 30px;
  }
  .page {
    padding: 0 12px 20px;
  }
  .hero {
    padding: 22px 2px 20px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .hero p {
    font-size: 11px;
  }
  .eyebrow-rule {
    width: 17px;
  }
  .panel {
    padding: 15px;
    border-radius: 16px;
  }
  .panel-heading h2 {
    font-size: 14px;
  }
  .output-panel {
    min-height: 0;
  }
  .output-body {
    min-height: 360px;
    padding-top: 14px;
  }
  .agent-path {
    gap: 3px;
    padding: 7px 8px;
  }
  .agent-path-item {
    font-size: 6.5px;
  }
  .agent-path-line {
    min-width: 3px;
  }
  .path-status {
    display: none;
  }
  .tabbar {
    gap: 13px;
  }
  .tab {
    font-size: 9px;
  }
  .insight-card h3 {
    font-size: 17px;
  }
  .sellpoint {
    grid-template-columns: 27px minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 10px;
  }
  .sellpoint p {
    font-size: 8px;
  }
  .quality-grid {
    grid-template-columns: 1fr;
  }
  .warning-quote {
    font-size: 15px;
  }
  .shot-card {
    grid-template-columns: 20px 61px minmax(0, 1fr);
    gap: 7px;
    padding-right: 8px;
  }
  .shot-thumb {
    width: 61px;
  }
  .shot-prompt {
    font-size: 6px;
  }
  .command-head small {
    display: none;
  }
  .phone-frame {
    width: min(100%, 250px);
  }
  .preview-stage {
    padding-top: 22px;
    padding-bottom: 18px;
  }
  .stage-label {
    font-size: 5.5px;
  }
  .chapter-pills {
    gap: 3px;
  }
  .chapter-pill {
    padding: 6px 3px;
  }
  .chapter-pill span {
    font-size: 6.5px;
  }
  .preview-actions {
    gap: 5px;
  }
  .action-button {
    font-size: 8px;
    padding: 0 5px;
  }
  .modal-head h2 {
    font-size: 19px;
  }
  .video-actions .action-button {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-height: 700px) {
  .modal {
    max-height: calc(100vh - 16px);
  }
  .modal-body {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .connection-card {
    padding: 12px;
  }
}

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

/* keyframes */

@keyframes reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.988); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes underline-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

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

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

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


/* ============================================================
   enterprise workspace additions
   ============================================================ */

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 28px 2px 22px;
}

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

.workspace-title .eyebrow {
  margin-bottom: 11px;
}

.workspace-title h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.workspace-title p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  align-items: stretch;
  margin: 0;
  flex: 0 0 auto;
}

.project-meta > div {
  min-width: 92px;
  padding: 1px 18px;
  border-left: 1px solid var(--line);
}

.project-meta > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.project-meta dt {
  margin: 0 0 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.09em;
}

.project-meta dd {
  margin: 0;
  max-width: 180px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta .status-draft {
  color: var(--amber);
}

.project-meta .status-ready {
  color: var(--green);
}

.summary-card {
  padding: 14px 15px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #101012;
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.summary-head span:first-child {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
}

.summary-head span:last-child {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.07em;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
}

.summary-item {
  min-width: 0;
  padding: 10px 11px;
  background: #0c0c0e;
}

.summary-item > span {
  display: block;
  color: #ff7a71;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.summary-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.summary-card .audience-line {
  margin-top: 11px;
}

.empty-state {
  padding: 8px 0;
}

.empty-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    radial-gradient(280px 150px at 0% 0%, rgba(255, 59, 48, 0.055), transparent 68%),
    #101012;
}

.empty-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 59, 48, 0.22);
  border-radius: 8px;
  background: rgba(255, 59, 48, 0.06);
  color: var(--red);
}

.empty-icon .icon {
  width: 17px;
  height: 17px;
}

.empty-banner h3 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.empty-banner p {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.empty-actions button {
  height: 31px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 8.5px;
  cursor: pointer;
}

.empty-actions button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.empty-actions button.primary {
  border-color: rgba(255, 59, 48, 0.22);
  background: rgba(255, 59, 48, 0.075);
  color: #ff8a82;
}

.empty-actions .icon {
  width: 12px;
  height: 12px;
}

.empty-section {
  margin-top: 14px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.empty-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.empty-list div {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted-2);
  font-size: 8px;
}

.empty-list .icon {
  width: 12px;
  height: 12px;
  color: #54545b;
}

.tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tab:disabled:hover {
  color: var(--muted-2);
}

.action-button:disabled,
.play-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.command-form input:disabled {
  color: #54545b;
  cursor: not-allowed;
}

.command-chips button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
    padding-top: 24px;
  }
  .project-meta {
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .project-meta > div {
    flex: 1;
    min-width: 0;
    padding-left: 15px;
  }
  .project-meta > div:first-child {
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .workspace-title h1 {
    font-size: 31px;
  }
  .workspace-title p {
    max-width: 520px;
    font-size: 10px;
  }
  .project-meta {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 0.7fr;
    gap: 10px;
    border-top: 1px solid var(--line);
  }
  .project-meta > div {
    padding: 0;
    border-left: 0;
  }
  .project-meta dd {
    max-width: none;
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  .workspace-head {
    padding: 20px 2px 18px;
    gap: 14px;
  }
  .workspace-title h1 {
    font-size: 27px;
  }
  .workspace-title p {
    margin-top: 7px;
  }
  .project-meta {
    grid-template-columns: 1.4fr 1fr;
    gap: 11px 12px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .empty-list {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   material analysis + vision
   ============================================================ */

.provider-line {
  flex-wrap: wrap;
  row-gap: 5px;
}

.provider-dot.vision.is-live {
  background: var(--green);
  box-shadow: 0 0 7px rgba(102, 217, 146, 0.7);
}

.material-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.material-analyze-btn {
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 5px;
  background: rgba(255, 59, 48, 0.055);
  color: #ff8a82;
  font-size: 7.5px;
  cursor: pointer;
  transition: 150ms ease;
}

.material-analyze-btn:hover {
  border-color: rgba(255, 59, 48, 0.38);
  background: rgba(255, 59, 48, 0.1);
}

.material-analyze-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.material-analyze-btn .icon {
  width: 10px;
  height: 10px;
}

.material-panel {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.012);
  overflow: hidden;
}

.material-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.material-panel-head b {
  color: var(--green);
  font-weight: 400;
}

.material-panel-head.is-analyzing b {
  color: var(--amber);
}

.material-list {
  display: flex;
  flex-direction: column;
}

.material-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

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

.material-thumb {
  position: relative;
  width: 38px;
  height: 50px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #080809;
}

.material-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.material-thumb span {
  position: absolute;
  left: 2px;
  bottom: 2px;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 4.5px;
  letter-spacing: 0.03em;
}

.material-copy {
  min-width: 0;
}

.material-name {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 8.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-meta {
  margin-top: 2px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6px;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.material-tags span {
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.035);
  color: #73737b;
  font-size: 6px;
  line-height: 1.2;
}

.material-tags span.ai {
  background: rgba(255, 59, 48, 0.06);
  color: #ff8a82;
}

.material-note {
  margin-top: 4px;
  color: #64646b;
  font-size: 6.8px;
  line-height: 1.4;
}

.material-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.material-controls select {
  width: 74px;
  height: 23px;
  padding: 0 16px 0 5px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0b0b0d;
  color: var(--muted);
  font-size: 6.5px;
  cursor: pointer;
}

.material-controls .remove-material {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #53535a;
  cursor: pointer;
}

.material-controls .remove-material:hover {
  background: rgba(255, 59, 48, 0.08);
  color: var(--red);
}

.material-controls .remove-material .icon {
  width: 9px;
  height: 9px;
}

.connection-icon.vision {
  background: rgba(102, 217, 146, 0.09);
  color: var(--green);
}

.modal-foot-spacer {
  flex: 1;
}

.modal-foot {
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .material-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 6px;
  }
  .material-thumb {
    width: 34px;
    height: 45px;
  }
  .material-controls select {
    width: 68px;
  }
  .modal-foot .ghost-button {
    height: 34px;
    font-size: 9px;
  }
  .modal-foot .primary-button.compact {
    height: 36px;
  }
  .modal-foot-spacer {
    display: none;
  }
}


.tab.is-unavailable,
.action-button.is-unavailable,
.play-button.is-unavailable,
.command-chips button.is-unavailable,
.material-analyze-btn.is-unavailable {
  opacity: 0.42;
  cursor: pointer;
}

.command-chips button.is-unavailable:hover,
.tab.is-unavailable:hover {
  color: var(--muted-2);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.018);
}


#genre {
  min-height: 96px;
}


/* ============================================================
   final production render
   ============================================================ */

.render-button {
  width: 100%;
  min-height: 62px;
  margin-top: 13px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 59, 48, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 55%),
    linear-gradient(135deg, #e62f24, #b9150f);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(197, 22, 15, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: 160ms ease;
}

.render-button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.render-button.is-unavailable {
  opacity: 0.55;
  cursor: pointer;
  filter: saturate(0.6);
}

.render-button-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.13);
}

.render-button-icon .icon {
  width: 16px;
  height: 16px;
}

.render-button-copy {
  flex: 1;
  min-width: 0;
}

.render-button-copy b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.render-button-copy small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.render-button-arrow {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
}

.render-button-arrow .icon {
  width: 12px;
  height: 12px;
}

.render-modal {
  width: min(680px, calc(100vw - 28px));
}

.render-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 10px;
}

.render-status-row b {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.render-progress {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #26262c;
}

.render-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b9150f, #ff4b3e);
  transition: width 200ms linear;
}

.render-pipeline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.render-pipeline span {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  text-align: center;
  transition: 160ms ease;
}

.render-pipeline span.active {
  border-color: rgba(255, 59, 48, 0.3);
  background: rgba(255, 59, 48, 0.06);
  color: #ff8a82;
}

.render-pipeline span.done {
  border-color: rgba(102, 217, 146, 0.2);
  background: rgba(102, 217, 146, 0.04);
  color: var(--green);
}

.render-log {
  height: 118px;
  margin-top: 12px;
  padding: 9px 11px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08080a;
  color: #65656d;
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.7;
  scrollbar-width: thin;
}

.render-log-empty {
  color: #44444b;
}

.render-log-line {
  color: #72727a;
}

.render-log-line b {
  color: #ff7168;
  font-weight: 400;
}

.output-video {
  width: min(100%, 300px);
  margin: 14px auto 0;
  display: block;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #000;
  aspect-ratio: 9 / 16;
}

.render-result-actions {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 11px;
}

.render-result-actions .action-button {
  flex: 0 0 auto;
  min-width: 120px;
  text-decoration: none;
}

.render-note {
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.5;
  text-align: center;
}

.render-modal .modal-body {
  padding-bottom: 18px;
}


[hidden] {
  display: none !important;
}


.page {
  padding-top: 20px;
}

@media (max-width: 900px) {
  .page {
    padding-top: 14px;
  }
}


/* Align preview with the brief/output panels; no sticky offset. */
.preview-panel {
  position: relative;
  top: 0;
}


/* custom focus tags */

.tag-add {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-style: dashed;
  border-color: rgba(255, 59, 48, 0.2);
  color: #9a6a66;
  background: rgba(255, 59, 48, 0.025);
}

.tag-add .icon {
  width: 9px;
  height: 9px;
}

.tag-add:hover {
  border-color: rgba(255, 59, 48, 0.4);
  color: #ff8a82;
  background: rgba(255, 59, 48, 0.06);
}

.tag.tag-custom {
  border-color: rgba(255, 196, 77, 0.22);
  background: rgba(255, 196, 77, 0.04);
  color: #b7a27b;
}

.tag.tag-custom.active {
  border-color: rgba(255, 196, 77, 0.4);
  background: rgba(255, 196, 77, 0.09);
  color: var(--amber);
}

.tag-custom-form {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.tag-custom-form input {
  flex: 1;
  min-width: 0;
  height: 29px;
  padding: 0 8px;
  font-size: 9px;
}

.tag-custom-save,
.tag-custom-cancel {
  height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 8px;
  cursor: pointer;
}

.tag-custom-save {
  border-color: rgba(255, 59, 48, 0.28);
  background: rgba(255, 59, 48, 0.08);
  color: #ff8a82;
}

.tag-custom-save:hover {
  background: rgba(255, 59, 48, 0.14);
}

.tag-custom-cancel {
  color: var(--muted-2);
}

.tag-custom-cancel:hover {
  color: var(--text-soft);
  border-color: var(--line-strong);
}
