/* 3D aesthetic demo */
.scene-aesthetic,
.ref-scene-aesthetic {
  background: linear-gradient(135deg, #1f2d2e 0%, #101313 58%, #f0b55f 180%);
}

.module-icon-aesthetic {
  background: #1f2d2e;
  color: #f3bd6b;
}

.ref-bottom-nav .aesthetic::before {
  transform: rotate(45deg);
  border-radius: 2px;
}

.aesthetic-hero {
  background:
    radial-gradient(circle at 86% 18%, rgba(240, 181, 95, 0.24), transparent 30%),
    linear-gradient(135deg, #172526, #101313 62%, #25251f);
}

.aesthetic-sample-link {
  align-items: center;
  background: #f0b55f;
  border-radius: 8px;
  color: #161613;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

.aesthetic-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.66fr) minmax(560px, 1.34fr);
}

.aesthetic-library-panel,
.aesthetic-preview-panel {
  min-width: 0;
}

.aesthetic-template-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.aesthetic-template-card {
  background: #f7f7f3;
  border: 1px solid rgba(20, 28, 28, 0.1);
  border-radius: 8px;
  color: #161817;
  cursor: pointer;
  display: grid;
  gap: 4px;
  grid-template-columns: 38px 1fr;
  min-height: 74px;
  padding: 13px 14px;
  text-align: left;
}

.aesthetic-template-card span {
  color: #7a817e;
  font-size: 12px;
  font-weight: 800;
  grid-row: 1 / 3;
  line-height: 1.2;
  padding-top: 3px;
}

.aesthetic-template-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.aesthetic-template-card em {
  color: #707673;
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.aesthetic-template-card.active {
  background: #182222;
  border-color: #182222;
  color: #f7f7f3;
}

.aesthetic-template-card.active span,
.aesthetic-template-card.active em {
  color: #f0b55f;
}

.aesthetic-preview-stage {
  background: #101313;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.aesthetic-preview-video {
  aspect-ratio: 9 / 16;
  background: #101313;
  display: block;
  max-height: 520px;
  object-fit: cover;
  width: 100%;
}

.aesthetic-angle-strip {
  bottom: 14px;
  display: flex;
  gap: 8px;
  left: 14px;
  position: absolute;
}

.aesthetic-angle-strip span {
  background: rgba(247, 247, 243, 0.9);
  border-radius: 999px;
  color: #161817;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.aesthetic-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.aesthetic-detail-grid article {
  background: #f7f7f3;
  border-radius: 8px;
  min-height: 118px;
  padding: 16px;
}

.aesthetic-detail-grid span {
  color: #a26b22;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.aesthetic-detail-grid p {
  color: #333735;
  line-height: 1.65;
  margin: 0;
}

.aesthetic-parameter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.aesthetic-parameter-list span {
  background: #e9ece7;
  border-radius: 999px;
  color: #4b5350;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.aesthetic-production-plan {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 0;
}

.aesthetic-production-plan article {
  background: #172222;
  border-radius: 8px;
  min-height: 86px;
  padding: 14px;
}

.aesthetic-production-plan span {
  color: #f0b55f;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.aesthetic-production-plan strong {
  color: #f7f7f3;
  display: block;
  font-size: 14px;
  line-height: 1.55;
}

.aesthetic-actions {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, auto);
  margin-top: 16px;
}

.aesthetic-generate-button,
.aesthetic-secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 44px;
  padding: 0 16px;
}

.aesthetic-generate-button {
  background: #f0b55f;
  color: #161613;
}

.aesthetic-secondary-button {
  background: #182222;
  color: #f7f7f3;
}

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

.aesthetic-actions span {
  color: #626966;
  font-size: 13px;
  grid-column: 1 / -1;
  line-height: 1.5;
}

.aesthetic-inline-link {
  align-items: center;
  background: #eef0ea;
  border-radius: 8px;
  color: #263030;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
}

.aesthetic-workbench {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.58fr) minmax(300px, 0.42fr);
}

.aesthetic-media-column,
.aesthetic-config-column {
  min-width: 0;
}

.aesthetic-config-column {
  display: flex;
  flex-direction: column;
}

.aesthetic-config-column .aesthetic-content-panel {
  order: 2;
}

.aesthetic-config-column .aesthetic-actions {
  order: 3;
}

.aesthetic-config-column .aesthetic-parameter-list {
  margin-top: 12px;
  order: 1;
}

.aesthetic-config-column .aesthetic-production-plan article {
  background: #172222;
  border-color: #172222;
}

.aesthetic-config-column .aesthetic-production-plan span {
  color: #f0b55f;
}

.aesthetic-config-column .aesthetic-production-plan strong {
  color: #f7f7f3;
}

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

.aesthetic-builder-panel {
  min-width: 0;
}

.aesthetic-step-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(360px, 1.12fr) minmax(300px, 0.96fr) minmax(280px, 0.84fr);
}

.aesthetic-step {
  background: #fbfbf8;
  border: 1px solid rgba(20, 28, 28, 0.1);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
}

.aesthetic-step-title {
  align-items: center;
  border-bottom: 1px solid rgba(20, 28, 28, 0.1);
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.aesthetic-step-title b {
  align-items: center;
  background: #182222;
  border-radius: 999px;
  color: #f0b55f;
  display: inline-flex;
  font-size: 12px;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.aesthetic-step-title h3 {
  color: #111817;
  font-size: 16px;
  line-height: 1.25;
  margin: 0;
}

.aesthetic-part-step .aesthetic-template-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aesthetic-part-step .aesthetic-template-card {
  grid-template-columns: 1fr;
  min-height: 84px;
  padding: 12px;
}

.aesthetic-part-step .aesthetic-template-card span {
  grid-row: auto;
  padding-top: 0;
}

.aesthetic-selected-box {
  align-items: stretch;
  background: #f7f7f3;
  border: 1px solid rgba(20, 28, 28, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  min-height: 142px;
  padding: 14px;
}

.aesthetic-selected-box span,
.aesthetic-selected-box em {
  color: #6b7370;
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.aesthetic-selected-box strong {
  color: #111817;
  display: block;
  font-size: 30px;
  line-height: 1.1;
  margin: 12px 0 8px;
}

.aesthetic-selected-box button {
  align-self: end;
  background: #182222;
  border: 0;
  border-radius: 8px;
  color: #f7f7f3;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}

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

body.aesthetic-picker-open {
  overflow: hidden;
}

.aesthetic-picker-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10000;
}

.aesthetic-picker-backdrop {
  background: rgba(10, 16, 16, 0.58);
  inset: 0;
  position: absolute;
}

.aesthetic-picker-dialog {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(10, 16, 16, 0.22);
  max-height: min(760px, calc(100vh - 48px));
  max-width: 780px;
  overflow: auto;
  padding: 18px;
  position: relative;
  width: min(100%, 780px);
}

.aesthetic-picker-head {
  align-items: center;
  border-bottom: 1px solid rgba(20, 28, 28, 0.1);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.aesthetic-picker-head h2 {
  color: #111817;
  font-size: 20px;
  line-height: 1.2;
  margin: 0;
}

.aesthetic-picker-head button {
  align-items: center;
  background: #eef0ea;
  border: 0;
  border-radius: 8px;
  color: #263030;
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

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

.aesthetic-script-step .aesthetic-content-panel {
  margin-top: 0;
}

.aesthetic-script-step .aesthetic-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.aesthetic-current-head {
  margin-bottom: 12px;
}

.aesthetic-current-head h2 {
  color: #111817;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.aesthetic-current-head span {
  background: #e7f2ed;
  border-radius: 999px;
  color: #006b5b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.aesthetic-current-step .aesthetic-detail-grid {
  grid-template-columns: 1fr;
}

.aesthetic-current-step .aesthetic-detail-grid article {
  min-height: 92px;
}

.aesthetic-sample-panel .panel-heading {
  align-items: center;
}

.aesthetic-sample-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
}

.aesthetic-sample-layout .aesthetic-preview-video {
  max-height: 420px;
}

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

.aesthetic-actions span.is-success {
  color: #2f7a4d;
  font-weight: 700;
}

.aesthetic-actions span.is-error {
  color: #b94a3a;
  font-weight: 700;
}

.work-video-audio-field {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  min-width: min(100%, 320px);
}

.work-video-audio-field span {
  color: #4b5350;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.work-video-audio-field input,
.work-video-audio-field select,
.work-video-audio-field textarea {
  border: 1px solid rgba(20, 28, 28, 0.12);
  border-radius: 8px;
  color: #333735;
  flex: 1;
  font-size: 13px;
  min-height: 40px;
  min-width: 0;
  padding: 8px;
}

.work-video-audio-field textarea {
  line-height: 1.5;
  min-height: 82px;
  resize: vertical;
}

.aesthetic-admin-preview.hidden-field {
  display: none !important;
}

.aesthetic-admin-preview {
  background: #ffffff;
  border: 1px solid rgba(20, 28, 28, 0.08);
  color: #171b23;
}

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

.aesthetic-admin-preview-head h2 {
  margin: 0;
}

.aesthetic-admin-preview-head p {
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0 0;
}

.aesthetic-admin-preview-head button {
  background: #111827;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 15px;
}

.aesthetic-admin-preview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.aesthetic-admin-preview-actions button + button {
  background: #eef2f7;
  color: #1f2937;
}

.aesthetic-admin-preview-body {
  background: rgba(248, 250, 252, 0.86);
  border-radius: 8px;
  color: #475467;
  display: grid;
  gap: 12px;
  line-height: 1.55;
  margin-top: 14px;
  max-height: 560px;
  overflow: auto;
  padding: 12px;
}

.aesthetic-admin-preview-summary,
.aesthetic-admin-preview-map {
  display: grid;
  gap: 6px;
}

.aesthetic-admin-preview-summary span,
.aesthetic-admin-preview-map span {
  background: #ffffff;
  border: 1px solid rgba(20, 28, 28, 0.06);
  border-radius: 8px;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 8px 10px;
}

.aesthetic-admin-preview-items {
  display: grid;
  gap: 10px;
}

.aesthetic-admin-preview-item {
  background: #ffffff;
  border: 1px solid rgba(20, 28, 28, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.aesthetic-admin-preview-item header {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.aesthetic-admin-preview-item header strong {
  color: #111827;
  font-size: 13px;
}

.aesthetic-admin-preview-item header span {
  color: #667085;
  font-size: 12px;
  text-align: right;
}

.aesthetic-admin-preview-item p {
  color: #667085;
  font-size: 12px;
  margin: 0;
}

.aesthetic-admin-preview-item pre {
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 980px) {
  .aesthetic-shell {
    grid-template-columns: 1fr;
  }

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

  .aesthetic-workbench {
    grid-template-columns: 1fr;
  }

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

  .aesthetic-preview-video {
    max-height: none;
  }

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

@media (max-width: 620px) {
  .aesthetic-actions {
    grid-template-columns: 1fr;
  }

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

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

  .aesthetic-selected-box {
    grid-template-columns: 1fr;
  }

  .aesthetic-selected-box button {
    width: 100%;
  }

  .aesthetic-picker-modal {
    align-items: flex-end;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .aesthetic-picker-dialog {
    max-height: min(720px, calc(100dvh - 24px));
    padding: 14px;
  }

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

  .aesthetic-script-step .aesthetic-actions {
    grid-template-columns: 1fr;
  }

  .aesthetic-sample-layout .aesthetic-production-plan {
    grid-template-columns: 1fr;
  }

  .aesthetic-detail-grid {
    grid-template-columns: 1fr;
  }

  .aesthetic-production-plan {
    grid-template-columns: 1fr;
  }

  .aesthetic-sample-link {
    width: 100%;
    justify-content: center;
  }

  .aesthetic-admin-preview-head {
    display: grid;
  }

  .aesthetic-admin-preview-actions,
  .aesthetic-admin-preview-head button {
    width: 100%;
  }

  .aesthetic-admin-preview-body {
    max-height: 480px;
  }
}
