:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f6fb;
  color: #172033;
  --sticky-offset: 140px;
  --app-sidebar-default-width: 280px;
  --app-sidebar-width: 280px;
  --app-sidebar-min: 232px;
  --app-sidebar-max: 420px;
  --sidebar-resizer-width: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(74, 110, 241, 0.12), transparent 28%),
    linear-gradient(180deg, #eff4fb 0%, #f5f7fb 45%, #eef2f8 100%);
}

html {
  scroll-padding-top: var(--sticky-offset);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(var(--app-sidebar-min), var(--app-sidebar-width)) var(--sidebar-resizer-width) minmax(0, 1fr);
  min-height: 100vh;
  gap: 16px;
  padding: 24px;
  transition: grid-template-columns 0.18s ease;
}

.app-shell.is-resizing {
  transition: none;
}

.app-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(22, 31, 55, 0.98) 0%, rgba(16, 23, 42, 0.98) 100%);
  color: #f2f6ff;
  box-shadow: 0 22px 60px rgba(12, 21, 41, 0.32);
  overflow: auto;
}

.sidebar-resizer {
  position: sticky;
  top: 24px;
  align-self: start;
  height: calc(100vh - 48px);
  width: var(--sidebar-resizer-width);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8ca2d9;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  z-index: 15;
}

.sidebar-resizer::before {
  content: "";
  width: 4px;
  height: min(120px, 24vh);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(78, 113, 227, 0.26) 0%, rgba(78, 113, 227, 0.72) 50%, rgba(78, 113, 227, 0.26) 100%);
  opacity: 0.5;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  inset: 10px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(109, 143, 255, 0) 0%, rgba(109, 143, 255, 0.12) 50%, rgba(109, 143, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sidebar-resizer:hover::before,
.sidebar-resizer:focus-visible::before,
.sidebar-resizer.is-dragging::before {
  opacity: 0.96;
  transform: scaleX(1.2);
  background: linear-gradient(180deg, rgba(82, 117, 232, 0.4) 0%, rgba(82, 117, 232, 1) 50%, rgba(82, 117, 232, 0.4) 100%);
  box-shadow: 0 0 0 6px rgba(82, 117, 232, 0.14);
}

.sidebar-resizer:hover::after,
.sidebar-resizer:focus-visible::after,
.sidebar-resizer.is-dragging::after {
  opacity: 1;
}

.sidebar-resizer:focus-visible {
  outline: none;
}

body.is-sidebar-resizing,
body.is-sidebar-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.app-shell.sidebar-compact .app-sidebar {
  padding: 22px 16px;
}

.app-shell.sidebar-compact .sidebar-panel {
  padding: 16px;
}

.app-shell.sidebar-compact .system-header-title {
  font-size: 22px;
}

.app-shell.sidebar-compact .system-header-subtitle {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.app-shell.sidebar-compact .system-nav-item {
  align-items: flex-start;
  padding: 12px 12px 12px 14px;
}

.app-shell.sidebar-compact .system-nav-state {
  min-width: 48px;
  padding: 5px 7px;
  font-size: 10px;
}

.sidebar-brand {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.brand-text {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: #6f91ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-header-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.system-header-subtitle {
  margin: 6px 0 0;
  color: rgba(235, 241, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.system-header-text {
  margin: 0;
  color: rgba(235, 241, 255, 0.72);
  line-height: 1.6;
  font-size: 14px;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-panel-muted {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section-title span {
  color: rgba(215, 226, 255, 0.64);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-section-title strong {
  color: #f6f8ff;
  font-size: 16px;
}

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

.sidebar-list-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-list-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.sidebar-list-item p {
  margin: 0;
  color: rgba(231, 238, 255, 0.72);
  line-height: 1.5;
  font-size: 13px;
}

.system-nav {
  display: grid;
  gap: 10px;
}

.system-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #eef3ff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.system-nav-item:hover {
  transform: translateX(2px);
  border-color: rgba(108, 141, 255, 0.48);
  background: rgba(108, 141, 255, 0.1);
}

.system-nav-item.is-active {
  background: linear-gradient(90deg, rgba(71, 111, 255, 0.22), rgba(71, 111, 255, 0.08));
  border-color: rgba(110, 146, 255, 0.9);
  box-shadow: 0 12px 30px rgba(33, 61, 138, 0.28);
}

.system-nav-item.is-pending {
  border-color: rgba(255, 197, 102, 0.26);
  background: rgba(255, 194, 94, 0.08);
}

.system-nav-item strong {
  font-size: 14px;
  line-height: 1.35;
}

.system-nav-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.system-nav-item-content small {
  color: rgba(235, 241, 255, 0.74);
  font-size: 12px;
  line-height: 1.35;
}

.system-nav-item.is-active .system-nav-item-content small {
  color: #f6f8ff;
}

.system-nav-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(242, 246, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.system-nav-item.is-active .system-nav-state {
  background: rgba(130, 159, 255, 0.2);
}

.system-nav-item.is-pending .system-nav-state {
  background: rgba(255, 199, 108, 0.16);
  color: #ffd58a;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dce4f2;
  border-radius: 24px;
  box-shadow: 0 20px 55px rgba(30, 53, 97, 0.08);
}

.topbar {
  position: sticky;
  top: 24px;
  z-index: 20;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
}

.topbar-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.topbar-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.topbar-copy strong {
  font-size: 22px;
  line-height: 1.2;
}

.topbar-copy span:last-child {
  color: #5a6984;
  font-size: 14px;
}

.form-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f8ff;
  border: 1px solid #d9e4fb;
  color: #52627d;
  font-size: 13px;
  line-height: 1.6;
}

.topbar-label {
  color: #6b7da0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
}

.topbar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border-radius: 18px;
  background: #f7faff;
  border: 1px solid #dfe8f7;
}

.topbar-user-copy {
  display: grid;
  gap: 3px;
}

.topbar-user-copy strong {
  color: #24324f;
  font-size: 14px;
}

.topbar-user-copy span,
.topbar-user-copy small {
  color: #61728d;
  font-size: 12px;
}

.sidebar-empty-state {
  background: rgba(255, 255, 255, 0.06);
}

.status-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #e1e9f7;
  color: #5f6f89;
  line-height: 1.6;
  font-size: 13px;
}

.status-banner[data-tone="success"] {
  background: #edf9f1;
  border-color: #ccebd6;
  color: #237f4e;
}

.status-banner[data-tone="error"] {
  background: #fff1f1;
  border-color: #f4d0d0;
  color: #b42318;
}

.auth-body {
  min-height: 100vh;
  padding: 32px 20px;
}

.auth-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(380px, 1.08fr) minmax(340px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.auth-hero-card,
.auth-form-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 228, 244, 0.96);
  box-shadow: 0 24px 60px rgba(24, 43, 80, 0.08);
}

.auth-hero-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at top right, rgba(109, 137, 230, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(242, 246, 255, 0.98) 100%);
}

.auth-hero-card h2,
.auth-form-card h2 {
  margin: 0 0 12px;
  color: #172033;
}

.auth-hero-card .system-header-title,
.auth-form-card .system-header-title {
  color: #172033;
}

.auth-hero-card .system-header-subtitle,
.auth-form-card .system-header-subtitle {
  color: #6c7891;
}

.auth-hero-card .brand-row {
  gap: 14px;
  margin-bottom: 0;
  padding: 2px 4px 0;
}

.auth-hero-card .brand-logo {
  width: 52px;
  height: 52px;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(235, 241, 255, 0.98) 100%);
  box-shadow: 0 14px 28px rgba(66, 94, 168, 0.14);
  filter: none;
}

.auth-hero-card .brand-text {
  display: grid;
  gap: 4px;
}

.auth-hero-card .system-header-title {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.auth-hero-card .system-header-subtitle {
  margin-top: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-carousel {
  display: grid;
  flex: 0 0 auto;
}

.auth-carousel-stage {
  position: relative;
  min-height: 540px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(221, 229, 244, 0.92);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #13203d 0%, #314f8e 58%, #86a2dd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 48px rgba(22, 34, 64, 0.14);
}

.auth-carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
  background-image:
    linear-gradient(180deg, rgba(11, 21, 42, 0.02) 2%, rgba(8, 14, 29, 0.66) 100%),
    var(--slide-image);
  background-size: cover;
  background-position: var(--slide-position, center);
}

.auth-carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.auth-carousel-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 21, 38, 0.02) 0%, rgba(9, 15, 26, 0.42) 74%, rgba(9, 15, 26, 0.72) 100%),
    linear-gradient(90deg, rgba(9, 18, 34, 0.28) 0%, rgba(9, 18, 34, 0.06) 46%, transparent 72%);
}

.auth-carousel-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.22);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(8, 18, 38, 0.12);
}

.auth-carousel-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: none;
  transition: width 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.auth-carousel-dot.is-active {
  width: 28px;
  background: linear-gradient(90deg, #ffffff 0%, #dfe8ff 100%);
  transform: translateY(-1px);
}

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

.auth-hero-metric {
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(218, 228, 245, 0.92);
  box-shadow: 0 8px 18px rgba(26, 45, 82, 0.04);
}

.auth-hero-metric strong {
  display: block;
  margin-bottom: 8px;
  color: #24324f;
  font-size: 15px;
}

.auth-hero-metric p {
  margin: 0;
  color: #61728d;
  line-height: 1.6;
  font-size: 13px;
}

.auth-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px;
  border-radius: 18px;
  background: #f3f7ff;
  border: 1px solid #e0e8f7;
}

.auth-tab {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  color: #5f6f89;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-tab.is-active {
  background: linear-gradient(135deg, #315fe7 0%, #4576ff 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(49, 95, 231, 0.22);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 250, 255, 0.97) 100%);
  align-self: center;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.auth-code-row label {
  margin-bottom: 0;
}

.auth-debug-code {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff5dd;
  border: 1px solid #f2dfac;
  color: #996a10;
  font-size: 13px;
  line-height: 1.6;
}

.permission-user-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid #e3e9f5;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.permission-user-card.is-saved {
  border-color: #bfe4ca;
  box-shadow: 0 16px 36px rgba(35, 127, 78, 0.12);
}

.permission-user-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.permission-user-header strong {
  color: #24324f;
  font-size: 16px;
}

.permission-user-header p,
.permission-user-meta,
.permission-inline-note p {
  margin: 0;
  color: #60718c;
  line-height: 1.6;
  font-size: 13px;
}

.permission-inline-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #eef6ff;
  border: 1px solid #d8e5fb;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.permission-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e1e9f7;
}

.permission-check input {
  margin-top: 2px;
}

.permission-check span {
  display: grid;
  gap: 4px;
}

.permission-check strong {
  color: #24324f;
  font-size: 14px;
}

.permission-check small {
  color: #61728d;
  line-height: 1.5;
  font-size: 12px;
}

.permission-save-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #ccebd6;
  background: linear-gradient(135deg, #f4fcf7 0%, #edf9f1 100%);
  color: #237f4e;
  box-shadow: 0 10px 24px rgba(35, 127, 78, 0.08);
  animation: permissionSaveFeedbackIn 220ms ease;
}

.permission-save-feedback[data-tone="error"] {
  border-color: #f4d0d0;
  background: linear-gradient(135deg, #fff7f7 0%, #fff1f1 100%);
  color: #b42318;
  box-shadow: 0 10px 24px rgba(180, 35, 24, 0.08);
}

.permission-save-feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(35, 127, 78, 0.12);
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
}

.permission-save-feedback[data-tone="error"] .permission-save-feedback-icon {
  background: rgba(180, 35, 24, 0.12);
}

.permission-save-feedback-copy {
  display: grid;
  gap: 4px;
}

.permission-save-feedback-copy strong,
.permission-save-feedback-copy p {
  margin: 0;
}

.permission-save-feedback-copy p {
  color: inherit;
  line-height: 1.5;
  font-size: 13px;
  opacity: 0.92;
}

@keyframes permissionSaveFeedbackIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .auth-shell,
  .workspace-layout,
  .project-board {
    grid-template-columns: 1fr;
  }

  .topbar-main,
  .topbar-meta,
  .permission-user-header {
    align-items: flex-start;
  }

  .auth-carousel-copy {
    max-width: 62%;
  }

  .auth-hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar-resizer,
  .workspace-sidebar {
    display: none;
  }

  .auth-body {
    padding: 16px;
  }

  .auth-hero-card,
  .auth-form-card,
  .workspace-panel,
  .guide-panel,
  .history-panel,
  .operations-panel {
    padding: 20px;
  }

  .topbar-user-card,
  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .auth-carousel-stage {
    min-height: 440px;
  }

  .auth-carousel-slide {
    padding: 20px;
  }

  .auth-carousel-dots {
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
  }
}

.topbar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.ui-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7faff;
  border: 1px solid #e2e9f6;
}

.ui-mode-label {
  color: #3256b3;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ui-switch {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-flex;
  align-items: center;
}

.ui-switch input {
  margin: 0;
  width: 46px;
  height: 26px;
  opacity: 0;
  cursor: pointer;
}

.ui-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dbe6ff;
  transition: background 0.15s ease;
}

.ui-switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(30, 48, 88, 0.2);
  transform: translateX(0);
  transition: transform 0.15s ease;
}

.ui-switch input:checked + .ui-switch-slider {
  background: linear-gradient(135deg, #315fe7 0%, #4576ff 100%);
}

.ui-switch input:checked + .ui-switch-slider::after {
  transform: translateX(20px);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3256b3;
  font-size: 13px;
  font-weight: 700;
}

.status-chip.live {
  background: #eaf8ef;
  color: #1e8a53;
}

.topbar-description {
  margin: 10px 0 0;
  color: #64748d;
  line-height: 1.6;
}

.workspace-panel,
.form-grid,
.project-board,
.project-board-list,
.project-board-detail {
  scroll-margin-top: var(--sticky-offset);
}

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

.workspace-main,
.workspace-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.executive-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 22px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(239, 244, 255, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.executive-copy h2,
.section-title h2,
.block-header h3 {
  margin: 0 0 10px;
}

.hero-text,
.section-title p,
.block-header p,
#status-line,
#script-status-line,
#selection-status {
  margin: 0;
  color: #5f6f89;
  line-height: 1.65;
}

.executive-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #edf3ff;
  color: #3154b1;
  font-size: 13px;
  font-weight: 700;
}

.badge-live {
  background: #eaf7ee;
  color: #1e8a53;
}

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

.dashboard-card {
  padding: 22px;
}

.dashboard-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff4ff;
  color: #3d62bc;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.3;
}

.dashboard-card p {
  margin: 0;
  color: #63738d;
  line-height: 1.6;
}

.guide-panel {
  position: sticky;
  top: 124px;
  padding: 24px;
}

.operations-panel {
  padding: 24px;
}

.history-panel {
  padding: 24px;
}

.history-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-list,
.history-group-list {
  display: grid;
  gap: 12px;
}

.history-group + .history-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8eef8;
}

.history-group-header {
  margin-bottom: 12px;
  color: #465a7f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-item,
.history-empty {
  padding: 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e1e9f7;
}

.history-empty.compact {
  padding: 14px;
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.history-item-header strong,
.history-empty strong {
  color: #24324f;
  font-size: 14px;
}

.history-item-header span {
  color: #7a8aa5;
  font-size: 12px;
  white-space: nowrap;
}

.history-item p,
.history-empty p {
  margin: 0 0 10px;
  color: #5f6f89;
  line-height: 1.6;
  font-size: 13px;
}

.history-actions {
  margin-top: 12px;
}

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

.operations-item {
  padding: 16px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #e1e9f7;
}

.operations-item strong {
  display: block;
  margin-bottom: 8px;
}

.operations-item p {
  margin: 0;
  color: #64748d;
  line-height: 1.6;
}

.workspace-panel {
  padding: 28px;
}

.section-title {
  margin-bottom: 24px;
}

.section-title.compact {
  margin-bottom: 18px;
}

.section-block + .section-block {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #e7edf7;
}

.block-header {
  margin-bottom: 16px;
}

.workflow-grid,
.architecture-grid,
.module-grid,
.video-list {
  display: grid;
  gap: 16px;
}

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

.architecture-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 16px;
}

.project-board {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.5fr);
  gap: 18px;
}

.project-board-list,
.project-board-detail {
  padding: 20px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #e3ebf7;
}

.project-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-board-header strong {
  display: block;
  margin-bottom: 6px;
  color: #24324f;
  font-size: 16px;
}

.project-board-header p {
  margin: 0;
  color: #62738f;
  line-height: 1.6;
  font-size: 13px;
}

.project-list,
.project-detail-section-list {
  display: grid;
  gap: 12px;
}

.project-list-item,
.project-detail-section,
.project-empty {
  border: 1px solid #dfe8f5;
  border-radius: 18px;
  background: #fff;
}

.project-list-item {
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.project-list-item:hover {
  transform: translateY(-1px);
  border-color: #b6c8f0;
  box-shadow: 0 10px 24px rgba(36, 61, 114, 0.08);
}

.project-list-item.is-active {
  border-color: #7397ff;
  box-shadow: 0 12px 28px rgba(64, 99, 181, 0.12);
}

.project-list-item-header,
.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.project-list-item-title {
  color: #22304d;
  font-size: 15px;
  font-weight: 700;
}

.project-list-item-time {
  color: #7a8aa5;
  font-size: 12px;
}

.project-list-item p,
.project-detail-summary p,
.project-empty p,
.project-chain-item p {
  margin: 0;
  color: #5f6f89;
  line-height: 1.6;
  font-size: 13px;
}

.collapsible-text {
  margin: 0;
}

.collapsible-text-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collapsible-text .collapsible-text-full {
  display: none;
}

.collapsible-text.is-expanded .collapsible-text-preview {
  display: none;
}

.collapsible-text.is-expanded .collapsible-text-full {
  display: inline;
}

.collapsible-inline {
  display: block;
  min-width: 0;
  white-space: normal;
}

.collapsible-inline-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.collapsible-inline-full {
  display: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.collapsible-inline.is-expanded .collapsible-inline-preview {
  display: none;
}

.collapsible-inline.is-expanded .collapsible-inline-full {
  display: inline;
}

.text-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 8px;
  color: #2f57c7;
  font-size: 13px;
  cursor: pointer;
}

.collapsible-inline .text-toggle {
  margin-left: 0;
  white-space: nowrap;
}

.text-toggle:hover {
  text-decoration: underline;
}

.project-list-item p {
  margin-top: 10px;
}

.project-list-video-preview {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5edf8;
  background: #f8fbff;
}

.project-list-video-preview video {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.project-detail {
  display: grid;
  gap: 14px;
}

.project-detail-section {
  padding: 18px;
}

.project-detail-summary h4,
.project-detail-section-header strong {
  margin: 0 0 10px;
  color: #24324f;
}

.project-detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.project-chain-item {
  padding: 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e5edf8;
}

.project-video-preview {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5edf8;
  background: #ffffff;
}

.project-video-preview video,
.project-activity-video video {
  width: 100%;
  max-height: 260px;
  display: block;
  object-fit: cover;
  background: #000;
}

.project-video-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fbff;
}

.project-video-preview-actions a {
  color: #2f57c7;
  font-size: 13px;
  text-decoration: none;
}

.project-video-preview-actions a:hover {
  text-decoration: underline;
}

.project-activity-item {
  padding: 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e5edf8;
}

.project-activity-item[data-stage="p1"] {
  border-color: rgba(95, 169, 255, 0.55);
}

.project-activity-item[data-stage="p2"] {
  border-color: rgba(114, 219, 165, 0.55);
}

.project-activity-item[data-stage="p3"] {
  border-color: rgba(150, 121, 255, 0.55);
}

.project-activity-item-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 6px;
  margin-bottom: 10px;
}

.project-activity-item-header strong {
  min-width: 0;
  color: #24324f;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.project-activity-item-header span {
  color: #7b8ba7;
  font-size: 12px;
  justify-self: end;
  white-space: nowrap;
}

.project-activity-list[data-collapsed="true"] .project-activity-item:nth-child(n + 4) {
  display: none;
}

.project-activity-video {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5edf8;
  background: #ffffff;
}

.project-chain-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-chain-item-header strong {
  color: #24324f;
  font-size: 14px;
}

.project-chain-item-header span {
  color: #7b8ba7;
  font-size: 12px;
}

.card,
.video-card,
.workflow-step {
  border: 1px solid #e3e9f5;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.card h3,
.card h4,
.video-card h3 {
  margin: 0 0 12px;
}

.card p,
.workflow-step p {
  margin: 0 0 10px;
  color: #5e6f89;
  line-height: 1.6;
}

.card p:last-child,
.workflow-step p:last-child {
  margin-bottom: 0;
}

.card a {
  word-break: break-all;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3459b8;
  font-size: 12px;
  font-weight: 700;
}

.tag.pending {
  background: #fff3e2;
  color: #bd7d1d;
}

.tag.live {
  background: #eaf8ef;
  color: #218b54;
}

.tag.warning {
  background: #fdecec;
  color: #b42318;
}

.provider-breakdown-list {
  display: grid;
  gap: 8px;
}

.provider-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f7faff;
  border: 1px solid #e2e9f6;
}

.provider-breakdown-item strong {
  color: #24324f;
  font-size: 14px;
}

.provider-breakdown-item span {
  color: #3258b8;
  font-weight: 700;
  white-space: nowrap;
}

.video-costs-summary-shell {
  display: grid;
  gap: 18px;
}

.video-costs-section {
  display: grid;
  gap: 12px;
}

.video-costs-section .section-title {
  margin-bottom: 0;
}

.video-costs-section .section-title h3 {
  margin: 0 0 6px;
  color: #20304d;
  font-size: 16px;
}

.video-costs-section .section-title p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: #64748d;
  font-size: 13px;
}

.video-costs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.video-costs-card {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.video-costs-card.video-costs-card-wide {
  grid-column: span 2;
}

.video-costs-card.video-costs-card-hero {
  grid-column: 1 / -1;
}

.video-costs-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.video-costs-card-header h4 {
  margin: 0;
  font-size: 14px;
}

.video-costs-card .tag-row {
  margin-bottom: 0;
}

.video-costs-metric-value {
  margin: 0 0 10px;
  color: #1f3f90;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cost-metric-value {
  color: #1f3f90;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.video-costs-stat-list {
  display: grid;
  gap: 8px;
}

.video-costs-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  padding: 6px 0;
  border-top: 1px dashed #e1e8f4;
}

.video-costs-stat-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.video-costs-stat-label {
  color: #6b7c96;
  font-size: 12px;
}

.video-costs-stat-value {
  color: #24324f;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.video-costs-budget-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.video-costs-budget-form .button-row {
  align-items: end;
}

.video-costs-trend-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.video-costs-month-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #dbe5f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.video-costs-month-picker span {
  color: #6b7c96;
  font-size: 12px;
  font-weight: 700;
}

.video-costs-month-picker input {
  border: 0;
  background: transparent;
  color: #20304d;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
}

.video-costs-loading-card {
  position: relative;
  overflow: hidden;
}

.video-costs-loading-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-120%);
  animation: video-costs-loading-sweep 2.1s ease-in-out infinite;
  pointer-events: none;
}

.video-costs-skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(229, 236, 248, 0.96) 0%, rgba(245, 248, 255, 1) 50%, rgba(229, 236, 248, 0.96) 100%);
}

.video-costs-skeleton-title {
  width: 42%;
  height: 14px;
  margin-bottom: 12px;
}

.video-costs-skeleton-metric {
  width: 58%;
  height: 26px;
  margin-bottom: 14px;
}

.video-costs-skeleton-list {
  display: grid;
  gap: 8px;
}

.video-costs-skeleton-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-costs-skeleton-label {
  width: 34%;
  height: 10px;
}

.video-costs-skeleton-label.short {
  width: 24%;
}

.video-costs-skeleton-value {
  width: 28%;
  height: 10px;
}

.video-costs-loading-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.video-costs-skeleton-month {
  width: 92px;
  height: 30px;
  border-radius: 999px;
}

.video-costs-loading-trend {
  position: relative;
  min-height: 220px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  border: 1px solid #e2e9f6;
  padding: 16px;
}

.video-costs-skeleton-chart {
  width: 100%;
  height: 100%;
  min-height: 188px;
  border-radius: 14px;
}

.video-costs-loading-wave {
  position: absolute;
  inset: auto 18px 26px 18px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 50%, rgba(72, 112, 255, 0.12) 0%, rgba(72, 112, 255, 0) 48%),
    linear-gradient(90deg, rgba(72, 112, 255, 0.05) 0%, rgba(72, 112, 255, 0.22) 48%, rgba(72, 112, 255, 0.06) 100%);
  filter: blur(16px);
  animation: video-costs-loading-pulse 2.8s ease-in-out infinite;
}

.video-costs-trend-card {
  gap: 14px;
  padding: 18px 20px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(106, 129, 255, 0.14) 0%, rgba(106, 129, 255, 0) 28%),
    radial-gradient(circle at bottom left, rgba(72, 112, 255, 0.12) 0%, rgba(72, 112, 255, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.video-costs-trend-card .video-costs-card-header h4 {
  font-size: 16px;
}

.video-costs-trend-panel {
  display: grid;
  gap: 14px;
}

.video-costs-trend-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.video-costs-trend-chip {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(219, 229, 245, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.video-costs-trend-chip span {
  color: #7183a3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.video-costs-trend-chip strong {
  color: #22314d;
  font-size: 16px;
  font-weight: 800;
}

.video-costs-trend-chip.accent {
  background: linear-gradient(135deg, rgba(239, 244, 255, 0.96) 0%, rgba(245, 241, 255, 0.94) 100%);
  border-color: rgba(187, 201, 255, 0.92);
}

.video-costs-trend-chart {
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(72, 112, 255, 0.08) 0%, rgba(72, 112, 255, 0) 45%),
    linear-gradient(180deg, #fcfdff 0%, #f4f8ff 100%);
  border: 1px solid #dde7f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.video-costs-trend-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.video-costs-trend-grid {
  stroke: rgba(203, 217, 239, 0.82);
  stroke-width: 1;
}

.video-costs-trend-grid.is-vertical {
  stroke-dasharray: 2 8;
}

.video-costs-trend-grid.is-vertical.has-value {
  stroke: rgba(101, 131, 255, 0.22);
}

.video-costs-trend-y-label {
  fill: #7a8ba7;
  font-size: 12px;
  font-weight: 700;
}

.video-costs-trend-line-shadow {
  fill: none;
  stroke: rgba(72, 112, 255, 0.18);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#video-costs-trend-glow);
}

.video-costs-trend-line {
  fill: none;
  stroke: url(#video-costs-trend-line);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-costs-trend-area {
  fill: url(#video-costs-trend-fill);
}

.video-costs-trend-dot {
  fill: rgba(171, 191, 239, 0.88);
}

.video-costs-trend-dot.has-value {
  fill: #4d74ff;
}

.video-costs-trend-peak-ring {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(77, 116, 255, 0.28);
  stroke-width: 4;
}

.video-costs-trend-peak-core {
  fill: #4d74ff;
}

.video-costs-trend-days {
  display: grid;
  gap: 4px;
  align-items: center;
}

.video-costs-trend-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  color: #7a8ba7;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 244, 252, 0.86);
}

.video-costs-trend-day.has-value {
  color: #3558c7;
  background: linear-gradient(180deg, #edf3ff 0%, #dde8ff 100%);
  box-shadow: inset 0 0 0 1px rgba(105, 133, 255, 0.18);
}

.video-costs-table-loading {
  padding: 14px;
}

.video-costs-table-loading-header,
.video-costs-table-loading-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr 1fr 1fr 1fr 1fr 1fr;
  gap: 12px;
}

.video-costs-table-loading-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef7;
}

.video-costs-table-loading-body {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.video-costs-table-loading-row {
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef3fa;
}

.video-costs-table-loading .video-costs-skeleton {
  height: 12px;
}

.video-costs-table-loading .video-costs-skeleton.wide {
  width: 100%;
}

.video-costs-table-loading-header .video-costs-skeleton:not(.wide),
.video-costs-table-loading-row .video-costs-skeleton:not(.wide) {
  width: 74%;
}

.card.warning {
  border-color: #f2d2a6;
  background: linear-gradient(180deg, #fffaf2 0%, #fff4e6 100%);
}

.workflow-step {
  position: relative;
  overflow: hidden;
}

.workflow-step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #4d7bff 0%, #8fafff 100%);
}

.workflow-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.workflow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #edf3ff;
  color: #2c57b1;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.workflow-step-actions {
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #24324f;
  font-weight: 600;
}

label span {
  font-size: 14px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d2dced;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  color: #172033;
  box-shadow: inset 0 1px 2px rgba(17, 26, 48, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #5883ff;
  box-shadow: 0 0 0 4px rgba(88, 131, 255, 0.14);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

.compact-prompt-field {
  min-height: calc(2em * 1.6 + 24px);
}

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

.style-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #e3e9f5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.style-picker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.style-picker-header strong {
  color: #172033;
  font-size: 14px;
}

.style-picker-header span {
  color: #5e6f89;
  font-size: 12px;
  font-weight: 600;
}

.style-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.style-picker-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.style-picker-grid,
.style-picker-grid-compact {
  align-items: stretch;
}

.style-tile {
  border: 1px solid #d2dced;
  border-radius: 16px;
  background: #ffffff;
  padding: 10px 12px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.style-tile:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: #8ca8ff;
  box-shadow: 0 16px 28px rgba(88, 131, 255, 0.16);
}

.style-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 22%, rgba(88, 131, 255, 0.08) 100%);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.style-tile:hover::before,
.style-tile.is-selected::before {
  opacity: 1;
}

.style-tile.is-selected::after {
  content: "当前";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(88, 131, 255, 0.14);
  color: #4a68cb;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.style-tile strong {
  font-size: 14px;
  color: #172033;
}

.style-tile small,
.style-tile-note {
  font-size: 12px;
  color: #5e6f89;
  font-weight: 600;
}

.style-tile-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.style-tile-note {
  color: #7b8aa3;
  line-height: 1.45;
}

.style-tile-preview {
  display: block;
  position: relative;
  min-height: 38px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef3fb 0%, #dfe8f7 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.style-tile:hover .style-tile-preview,
.style-tile.is-selected .style-tile-preview {
  transform: scale(1.02);
}

.style-tile-preview,
.style-preview-stage {
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.style-tile:hover .style-preview-base,
.style-tile:hover .style-preview-subject,
.style-tile:hover .style-preview-accent,
.style-tile:hover .style-preview-camera-frame {
  filter: saturate(1.08) brightness(1.03);
}

.style-tile-preview > .style-preview-layer,
.style-tile-preview > .style-preview-camera-frame,
.style-preview-stage > .style-preview-layer,
.style-preview-stage > .style-preview-camera-frame {
  z-index: 1;
}

.style-tile-preview .style-preview-subject {
  width: 18px;
  height: 28px;
  margin-left: -9px;
  margin-top: -14px;
  border-radius: 9px;
}

.style-tile-preview .style-preview-subject::before {
  inset: 4px;
  border-radius: 6px;
}

.style-tile-preview .style-preview-accent {
  inset: auto -10% -28% 18%;
  height: 96%;
}

.style-tile-preview .style-preview-camera-frame {
  inset: 8px 14px;
  border-radius: 8px;
}

.style-preview-subject,
.style-preview-camera-frame {
  z-index: 2;
}

.style-preview-accent {
  z-index: 3;
}

.style-preview-detail {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(240px, 0.85fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #d7e2f4;
  background: linear-gradient(180deg, #fbfdff 0%, #eef4ff 100%);
  box-shadow: 0 18px 38px rgba(98, 124, 179, 0.12);
}

.style-preview-stage {
  display: block;
  position: relative;
  min-height: 196px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef3fb 0%, #dfe8f7 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 22px 44px rgba(77, 101, 148, 0.18);
}

.style-preview-stage-camera::before,
.style-preview-stage-camera::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: rgba(10, 18, 31, 0.24);
  z-index: 4;
}

.style-preview-stage-camera::before {
  top: 0;
}

.style-preview-stage-camera::after {
  bottom: 0;
}

.style-preview-stage .style-preview-camera-frame {
  inset: 26px 34px;
}

.style-preview-stage-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.style-preview-stage-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 25, 43, 0.14) 0%, rgba(15, 25, 43, 0.56) 100%);
  backdrop-filter: blur(8px);
}

.style-preview-stage-caption strong {
  font-size: 16px;
  color: #ffffff;
}

.style-preview-stage-caption span {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(244, 247, 255, 0.92);
}

.style-preview-timeline {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.style-preview-beat {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
}

.style-preview-beat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.34) 50%, rgba(255, 255, 255, 0.04) 100%);
  transform: translateX(-100%);
  animation: style-preview-beat-glow 3.6s ease-in-out infinite;
}

.style-preview-beat:nth-child(2)::after {
  animation-delay: 1.2s;
}

.style-preview-beat:nth-child(3)::after {
  animation-delay: 2.4s;
}

.style-preview-beat.is-active {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.style-preview-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  justify-content: center;
}

.style-preview-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(88, 131, 255, 0.12);
  color: #4564c6;
  font-size: 12px;
  font-weight: 800;
}

.style-preview-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 27, 49, 0.06);
  color: #51637f;
  font-size: 12px;
  font-weight: 700;
}

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

.style-preview-shot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 98px;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  border: 1px solid #dbe5f6;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 10px 20px rgba(113, 136, 177, 0.08);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  cursor: pointer;
}

.style-preview-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(88, 131, 255, 0) 0%, rgba(88, 131, 255, 0.08) 100%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.style-preview-shot.is-active {
  transform: translateY(-3px);
  border-color: #8ca8ff;
  box-shadow: 0 16px 28px rgba(88, 131, 255, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #eff5ff 100%);
}

.style-preview-shot.is-active::before {
  opacity: 1;
}

.style-preview-shot:hover {
  transform: translateY(-2px);
  border-color: #a3b8ff;
}

.style-preview-shot-index {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(16, 27, 49, 0.06);
  color: #60718c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.style-preview-shot-thumb {
  position: relative;
  display: block;
  min-height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #edf3fc 0%, #e3ebf8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.style-preview-shot-layer {
  position: absolute;
  pointer-events: none;
}

.style-preview-shot-thumb .style-preview-base {
  inset: 0;
}

.style-preview-shot-thumb .style-preview-subject {
  left: 50%;
  top: 54%;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  margin-top: -19px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(20, 38, 77, 0.18);
}

.style-preview-shot-thumb .style-preview-subject::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.style-preview-shot-thumb .style-preview-accent {
  inset: auto -12% -12% 18%;
  height: 72%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0) 72%);
  mix-blend-mode: screen;
}

.style-preview-shot-thumb .style-preview-camera-frame {
  inset: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(10, 18, 31, 0.05);
}

.style-preview-shot.is-active .style-preview-shot-thumb {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 10px 20px rgba(88, 131, 255, 0.12);
}

.style-preview-shot:focus {
  outline: none;
  border-color: #7f9cff;
  box-shadow: 0 0 0 3px rgba(88, 131, 255, 0.18);
}

.style-preview-shot strong,
.style-preview-shot small {
  position: relative;
  z-index: 1;
}

.style-preview-shot strong {
  font-size: 13px;
  color: #172033;
}

.style-preview-shot small {
  font-size: 12px;
  line-height: 1.55;
  color: #60718c;
}

[data-shot-segment="0"].style-preview-subject {
  transform: scale(0.88) translateY(2px);
}

[data-shot-segment="1"].style-preview-subject {
  transform: scale(1) translateY(0);
}

[data-shot-segment="2"].style-preview-subject {
  transform: scale(1.12) translateY(-2px);
}

[data-shot-segment="0"].style-preview-camera-frame {
  inset: 13px 18px;
}

[data-shot-segment="1"].style-preview-camera-frame {
  inset: 11px 14px;
}

[data-shot-segment="2"].style-preview-camera-frame {
  inset: 9px 10px;
}

[data-shot-segment="0"].style-preview-accent {
  opacity: 0.5;
  transform: translateX(-6px);
}

[data-shot-segment="1"].style-preview-accent {
  opacity: 0.8;
}

[data-shot-segment="2"].style-preview-accent {
  opacity: 1;
  transform: translateX(8px);
}

[data-style-scene="minimal"] .style-preview-shot-thumb .style-preview-base {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, #f8fbff 0%, #edf2fb 100%);
}

[data-style-scene="minimal"] .style-preview-shot-thumb .style-preview-subject {
  background: linear-gradient(180deg, #ffffff 0%, #d9e1ef 100%);
  box-shadow:
    0 8px 16px rgba(135, 149, 179, 0.18),
    0 0 0 6px rgba(255, 255, 255, 0.26);
}

[data-style-scene="minimal"] .style-preview-shot-thumb .style-preview-accent {
  background: radial-gradient(circle, rgba(168, 187, 219, 0.3) 0%, rgba(168, 187, 219, 0.08) 46%, rgba(168, 187, 219, 0) 74%);
}

[data-style-scene="minimal"] [data-shot-segment="0"].style-preview-subject {
  transform: scale(0.76) translateY(3px);
}

[data-style-scene="minimal"] [data-shot-segment="1"].style-preview-subject {
  transform: scale(0.94) translateY(0);
}

[data-style-scene="minimal"] [data-shot-segment="2"].style-preview-subject {
  transform: scale(1.08) translateY(-2px);
}

[data-style-scene="minimal"] [data-shot-segment="0"].style-preview-accent {
  opacity: 0.38;
  transform: scale(0.82);
}

[data-style-scene="minimal"] [data-shot-segment="1"].style-preview-accent {
  opacity: 0.7;
  transform: scale(1);
}

[data-style-scene="minimal"] [data-shot-segment="2"].style-preview-accent {
  opacity: 1;
  transform: scale(1.14);
}

.style-preview-detail-copy strong {
  font-size: 20px;
  color: #172033;
}

.style-preview-detail-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #55657f;
}

.style-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-preview-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d8e3f6;
  color: #445876;
  font-size: 12px;
  font-weight: 700;
}

.style-preview-layer,
.style-preview-camera-frame {
  position: absolute;
  pointer-events: none;
}

.style-preview-base {
  inset: 0;
}

.style-preview-subject {
  left: 50%;
  top: 50%;
  width: 34px;
  height: 54px;
  margin-left: -17px;
  margin-top: -27px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(208, 221, 244, 0.95) 100%);
  box-shadow: 0 12px 24px rgba(20, 38, 77, 0.18);
}

.style-preview-subject::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.style-preview-accent {
  inset: auto -12% -10% 20%;
  height: 76%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: screen;
}

.style-tile-preview-camera::before,
.style-tile-preview-camera::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(12, 16, 26, 0.2);
  z-index: 3;
}

.style-tile-preview-camera::before {
  top: 0;
}

.style-tile-preview-camera::after {
  bottom: 0;
}

.style-preview-camera-frame {
  inset: 18px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(10, 18, 31, 0.06);
  z-index: 2;
}

[data-style-scene="luxury"] .style-preview-base {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 229, 154, 0.4) 0%, rgba(255, 229, 154, 0) 34%),
    linear-gradient(135deg, #0f1b34 0%, #1d325f 48%, #0c1327 100%);
}

[data-style-scene="luxury"] .style-preview-subject {
  background: linear-gradient(180deg, #f7d98f 0%, #c89f4a 100%);
  box-shadow: 0 12px 30px rgba(8, 10, 20, 0.34);
  animation: style-luxury-float 2.8s ease-in-out infinite;
}

[data-style-scene="luxury"] .style-preview-accent {
  inset: -8% auto -18% -12%;
  width: 64%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 239, 188, 0.86) 50%, rgba(255, 255, 255, 0) 100%);
  animation: style-luxury-shimmer 2.4s ease-in-out infinite;
}

[data-style-scene="street"] .style-preview-base {
  background:
    linear-gradient(90deg, rgba(122, 255, 219, 0.18) 0%, rgba(122, 255, 219, 0) 32%),
    linear-gradient(135deg, #18192f 0%, #3d2158 52%, #131320 100%);
}

[data-style-scene="street"] .style-preview-subject {
  width: 40px;
  height: 50px;
  margin-left: -20px;
  margin-top: -25px;
  border-radius: 14px;
  background: linear-gradient(180deg, #a7f6e5 0%, #2dc0b1 100%);
  transform: rotate(-10deg);
  animation: style-street-jitter 1.2s steps(3, end) infinite;
}

[data-style-scene="street"] .style-preview-accent {
  inset: auto -18% 16% 8%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 71, 166, 0) 0%, rgba(255, 71, 166, 0.92) 35%, rgba(111, 220, 255, 0.92) 68%, rgba(255, 71, 166, 0) 100%);
  animation: style-street-sweep 1.7s linear infinite;
}

[data-style-scene="minimal"] .style-preview-base {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.78) 48%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(238, 243, 251, 0.9) 100%),
    linear-gradient(180deg, #f8fbff 0%, #edf2fb 100%);
  animation: style-minimal-sweep 3.2s ease-in-out infinite;
}

[data-style-scene="minimal"] .style-preview-subject {
  width: 32px;
  height: 48px;
  margin-left: -16px;
  margin-top: -24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #d9e1ef 100%);
  box-shadow:
    0 10px 24px rgba(135, 149, 179, 0.18),
    0 0 0 10px rgba(255, 255, 255, 0.24);
  animation: style-minimal-focus 3s ease-in-out infinite;
}

[data-style-scene="minimal"] .style-preview-accent {
  inset: auto auto 50% 50%;
  width: 84px;
  height: 84px;
  margin-left: -42px;
  margin-bottom: -42px;
  background: radial-gradient(circle, rgba(168, 187, 219, 0.28) 0%, rgba(168, 187, 219, 0.08) 42%, rgba(168, 187, 219, 0) 72%);
  animation: style-minimal-breathe 3s ease-in-out infinite;
}

[data-style-scene="outdoor"] .style-preview-base {
  background:
    linear-gradient(180deg, #7fd2ff 0%, #d7efff 46%, #cfe9b4 46%, #7fc26b 100%);
}

[data-style-scene="outdoor"] .style-preview-subject {
  background: linear-gradient(180deg, #ffffff 0%, #dae6d1 100%);
  animation: style-outdoor-bounce 2.6s ease-in-out infinite;
}

[data-style-scene="outdoor"] .style-preview-accent {
  inset: 10% auto auto -24%;
  width: 48%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 186, 0.88) 0%, rgba(255, 248, 186, 0.16) 42%, rgba(255, 248, 186, 0) 76%);
  animation: style-outdoor-sun 3.2s ease-in-out infinite;
}

[data-style-scene="editorial"] .style-preview-base {
  background:
    linear-gradient(120deg, #120f1f 0%, #372144 56%, #0f1224 100%);
}

[data-style-scene="editorial"] .style-preview-subject {
  width: 38px;
  height: 60px;
  margin-left: -19px;
  margin-top: -30px;
  background: linear-gradient(180deg, #f2ccd8 0%, #bb7d90 100%);
  box-shadow: 0 18px 32px rgba(8, 8, 16, 0.42);
  animation: style-editorial-pose 2.8s ease-in-out infinite;
}

[data-style-scene="editorial"] .style-preview-accent {
  inset: -8% auto -8% 52%;
  width: 18%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 236, 196, 0.92) 46%, rgba(255, 255, 255, 0) 100%);
  animation: style-editorial-flash 2.2s ease-in-out infinite;
}

[data-style-scene="elegant"] .style-preview-base {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 240, 248, 0.62) 0%, rgba(255, 240, 248, 0) 34%),
    linear-gradient(135deg, #f3dce6 0%, #decfe8 52%, #c3d4eb 100%);
}

[data-style-scene="elegant"] .style-preview-subject {
  width: 34px;
  height: 56px;
  margin-left: -17px;
  margin-top: -28px;
  background: linear-gradient(180deg, #fff8fc 0%, #d8c2db 100%);
  animation: style-elegant-sway 3.4s ease-in-out infinite;
}

[data-style-scene="elegant"] .style-preview-accent {
  inset: auto -8% -22% -8%;
  height: 82%;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0) 62%);
  animation: style-elegant-glow 3.4s ease-in-out infinite;
}

[data-style-scene="cinematic"] .style-preview-base {
  background:
    linear-gradient(90deg, rgba(255, 201, 122, 0.14) 0%, rgba(255, 201, 122, 0) 26%),
    linear-gradient(135deg, #1c2438 0%, #42557f 56%, #172033 100%);
  animation: camera-cinematic-pan 3.2s ease-in-out infinite;
}

[data-style-scene="cinematic"] .style-preview-subject {
  background: linear-gradient(180deg, #ecf2ff 0%, #bccae7 100%);
}

[data-style-scene="cinematic"] .style-preview-camera-frame {
  animation: camera-frame-glide 3.2s ease-in-out infinite;
}

[data-style-scene="dynamic"] .style-preview-base {
  background:
    linear-gradient(135deg, #1b1f2b 0%, #294c72 52%, #1a2236 100%);
}

[data-style-scene="dynamic"] .style-preview-subject {
  background: linear-gradient(180deg, #d8f6ff 0%, #7db8ff 100%);
  transform: rotate(-8deg);
  animation: camera-dynamic-subject 1.2s ease-in-out infinite;
}

[data-style-scene="dynamic"] .style-preview-camera-frame {
  animation: camera-dynamic-shake 1s steps(3, end) infinite;
}

[data-style-scene="macro"] .style-preview-base {
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 8%),
    radial-gradient(circle at 62% 56%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 8%),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 7%),
    linear-gradient(135deg, #573829 0%, #9f6d4d 100%);
}

[data-style-scene="macro"] .style-preview-subject {
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #f8e4c1 0%, #cf9362 58%, #8b5c35 100%);
  animation: camera-macro-zoom 3s ease-in-out infinite;
}

[data-style-scene="macro"] .style-preview-subject::before {
  inset: 16px;
  border-radius: 50%;
}

[data-style-scene="macro"] .style-preview-camera-frame {
  animation: camera-macro-frame 3s ease-in-out infinite;
}

[data-style-scene="orbit_360"] .style-preview-base {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, #18263e 0%, #38547d 56%, #162034 100%);
}

[data-style-scene="orbit_360"] .style-preview-subject {
  width: 38px;
  height: 56px;
  margin-left: -19px;
  margin-top: -28px;
  background: linear-gradient(180deg, #f3f7ff 0%, #c8d5ee 100%);
}

[data-style-scene="orbit_360"] .style-preview-camera-frame {
  inset: 20px 34px;
  border-radius: 999px;
  animation: camera-orbit-spin 3.2s linear infinite;
}

.style-tile.is-selected {
  border-color: #5883ff;
  box-shadow: 0 0 0 4px rgba(88, 131, 255, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
}

.style-tile.is-selected .style-tile-preview {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 10px 22px rgba(88, 131, 255, 0.18);
}

.style-tile.is-selected strong,
.style-tile:hover strong {
  color: #133071;
}

.style-tile.is-selected .style-tile-note,
.style-tile:hover .style-tile-note {
  color: #546a92;
}

.style-preview-detail[data-style-scene="luxury"] .style-preview-base {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 229, 154, 0.4) 0%, rgba(255, 229, 154, 0) 34%),
    linear-gradient(135deg, #0f1b34 0%, #1d325f 48%, #0c1327 100%);
}

.style-preview-detail[data-style-scene="luxury"] .style-preview-subject {
  background: linear-gradient(180deg, #f7d98f 0%, #c89f4a 100%);
  box-shadow: 0 12px 30px rgba(8, 10, 20, 0.34);
  animation: style-luxury-float 2.8s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="luxury"] .style-preview-accent {
  inset: -8% auto -18% -12%;
  width: 64%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 239, 188, 0.86) 50%, rgba(255, 255, 255, 0) 100%);
  animation: style-luxury-shimmer 2.4s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="street"] .style-preview-base {
  background:
    linear-gradient(90deg, rgba(122, 255, 219, 0.18) 0%, rgba(122, 255, 219, 0) 32%),
    linear-gradient(135deg, #18192f 0%, #3d2158 52%, #131320 100%);
}

.style-preview-detail[data-style-scene="street"] .style-preview-subject {
  width: 40px;
  height: 50px;
  margin-left: -20px;
  margin-top: -25px;
  border-radius: 14px;
  background: linear-gradient(180deg, #a7f6e5 0%, #2dc0b1 100%);
  transform: rotate(-10deg);
  animation: style-street-jitter 1.2s steps(3, end) infinite;
}

.style-preview-detail[data-style-scene="street"] .style-preview-accent {
  inset: auto -18% 16% 8%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 71, 166, 0) 0%, rgba(255, 71, 166, 0.92) 35%, rgba(111, 220, 255, 0.92) 68%, rgba(255, 71, 166, 0) 100%);
  animation: style-street-sweep 1.7s linear infinite;
}

.style-preview-detail[data-style-scene="minimal"] .style-preview-base {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.78) 48%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(238, 243, 251, 0.9) 100%),
    linear-gradient(180deg, #f8fbff 0%, #edf2fb 100%);
  animation: style-minimal-sweep 3.2s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="minimal"] .style-preview-subject {
  width: 32px;
  height: 48px;
  margin-left: -16px;
  margin-top: -24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #d9e1ef 100%);
  box-shadow:
    0 10px 24px rgba(135, 149, 179, 0.18),
    0 0 0 10px rgba(255, 255, 255, 0.24);
  animation: style-minimal-focus 3s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="minimal"] .style-preview-accent {
  inset: auto auto 50% 50%;
  width: 84px;
  height: 84px;
  margin-left: -42px;
  margin-bottom: -42px;
  background: radial-gradient(circle, rgba(168, 187, 219, 0.28) 0%, rgba(168, 187, 219, 0.08) 42%, rgba(168, 187, 219, 0) 72%);
  animation: style-minimal-breathe 3s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="outdoor"] .style-preview-base {
  background: linear-gradient(180deg, #7fd2ff 0%, #d7efff 46%, #cfe9b4 46%, #7fc26b 100%);
}

.style-preview-detail[data-style-scene="outdoor"] .style-preview-subject {
  background: linear-gradient(180deg, #ffffff 0%, #dae6d1 100%);
  animation: style-outdoor-bounce 2.6s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="outdoor"] .style-preview-accent {
  inset: 10% auto auto -24%;
  width: 48%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 186, 0.88) 0%, rgba(255, 248, 186, 0.16) 42%, rgba(255, 248, 186, 0) 76%);
  animation: style-outdoor-sun 3.2s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="editorial"] .style-preview-base {
  background: linear-gradient(120deg, #120f1f 0%, #372144 56%, #0f1224 100%);
}

.style-preview-detail[data-style-scene="editorial"] .style-preview-subject {
  width: 38px;
  height: 60px;
  margin-left: -19px;
  margin-top: -30px;
  background: linear-gradient(180deg, #f2ccd8 0%, #bb7d90 100%);
  box-shadow: 0 18px 32px rgba(8, 8, 16, 0.42);
  animation: style-editorial-pose 2.8s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="editorial"] .style-preview-accent {
  inset: -8% auto -8% 52%;
  width: 18%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 236, 196, 0.92) 46%, rgba(255, 255, 255, 0) 100%);
  animation: style-editorial-flash 2.2s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="elegant"] .style-preview-base {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 240, 248, 0.62) 0%, rgba(255, 240, 248, 0) 34%),
    linear-gradient(135deg, #f3dce6 0%, #decfe8 52%, #c3d4eb 100%);
}

.style-preview-detail[data-style-scene="elegant"] .style-preview-subject {
  width: 34px;
  height: 56px;
  margin-left: -17px;
  margin-top: -28px;
  background: linear-gradient(180deg, #fff8fc 0%, #d8c2db 100%);
  animation: style-elegant-sway 3.4s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="elegant"] .style-preview-accent {
  inset: auto -8% -22% -8%;
  height: 82%;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0) 62%);
  animation: style-elegant-glow 3.4s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="cinematic"] .style-preview-base {
  background:
    linear-gradient(90deg, rgba(255, 201, 122, 0.14) 0%, rgba(255, 201, 122, 0) 26%),
    linear-gradient(135deg, #1c2438 0%, #42557f 56%, #172033 100%);
  animation: camera-cinematic-pan 3.2s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="cinematic"] .style-preview-subject {
  background: linear-gradient(180deg, #ecf2ff 0%, #bccae7 100%);
}

.style-preview-detail[data-style-scene="cinematic"] .style-preview-camera-frame {
  animation: camera-frame-glide 3.2s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="dynamic"] .style-preview-base {
  background: linear-gradient(135deg, #1b1f2b 0%, #294c72 52%, #1a2236 100%);
}

.style-preview-detail[data-style-scene="dynamic"] .style-preview-subject {
  background: linear-gradient(180deg, #d8f6ff 0%, #7db8ff 100%);
  transform: rotate(-8deg);
  animation: camera-dynamic-subject 1.2s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="dynamic"] .style-preview-camera-frame {
  animation: camera-dynamic-shake 1s steps(3, end) infinite;
}

.style-preview-detail[data-style-scene="macro"] .style-preview-base {
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 8%),
    radial-gradient(circle at 62% 56%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 8%),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 7%),
    linear-gradient(135deg, #573829 0%, #9f6d4d 100%);
}

.style-preview-detail[data-style-scene="macro"] .style-preview-subject {
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #f8e4c1 0%, #cf9362 58%, #8b5c35 100%);
  animation: camera-macro-zoom 3s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="macro"] .style-preview-subject::before {
  inset: 16px;
  border-radius: 50%;
}

.style-preview-detail[data-style-scene="macro"] .style-preview-camera-frame {
  animation: camera-macro-frame 3s ease-in-out infinite;
}

.style-preview-detail[data-style-scene="orbit_360"] .style-preview-base {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, #18263e 0%, #38547d 56%, #162034 100%);
}

.style-preview-detail[data-style-scene="orbit_360"] .style-preview-subject {
  width: 38px;
  height: 56px;
  margin-left: -19px;
  margin-top: -28px;
  background: linear-gradient(180deg, #f3f7ff 0%, #c8d5ee 100%);
}

.style-preview-detail[data-style-scene="orbit_360"] .style-preview-camera-frame {
  inset: 26px 54px;
  border-radius: 999px;
  animation: camera-orbit-spin 3.2s linear infinite;
}

.style-tile:focus {
  outline: none;
}

@keyframes style-luxury-float {
  0%, 100% { transform: translate3d(0, 2px, 0) scale(1); }
  50% { transform: translate3d(0, -4px, 0) scale(1.03); }
}

@keyframes style-luxury-shimmer {
  0% { transform: translate3d(-12%, 0, 0) rotate(18deg); opacity: 0.2; }
  50% { opacity: 0.9; }
  100% { transform: translate3d(128%, 0, 0) rotate(18deg); opacity: 0.1; }
}

@keyframes style-street-jitter {
  0%, 100% { transform: translate3d(-2px, 1px, 0) rotate(-11deg); }
  33% { transform: translate3d(3px, -2px, 0) rotate(-7deg); }
  66% { transform: translate3d(-1px, 2px, 0) rotate(-13deg); }
}

@keyframes style-street-sweep {
  0% { transform: translateX(-10%); opacity: 0.3; }
  50% { opacity: 0.95; }
  100% { transform: translateX(36%); opacity: 0.35; }
}

@keyframes style-minimal-sweep {
  0%, 100% { transform: translateX(-12%); opacity: 0.7; }
  50% { transform: translateX(12%); opacity: 1; }
}

@keyframes style-minimal-focus {
  0%, 100% { transform: scale(0.96) translateY(1px); box-shadow: 0 10px 24px rgba(135, 149, 179, 0.14), 0 0 0 6px rgba(255, 255, 255, 0.18); }
  50% { transform: scale(1.04) translateY(-3px); box-shadow: 0 14px 30px rgba(135, 149, 179, 0.22), 0 0 0 12px rgba(255, 255, 255, 0.32); }
}

@keyframes style-minimal-breathe {
  0%, 100% { transform: scale(0.86); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes style-outdoor-bounce {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

@keyframes style-outdoor-sun {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0.7; }
  50% { transform: translate3d(18px, 6px, 0) scale(1); opacity: 1; }
}

@keyframes style-editorial-pose {
  0%, 100% { transform: translate3d(-2px, 0, 0) scale(1); }
  50% { transform: translate3d(3px, -4px, 0) scale(1.04); }
}

@keyframes style-editorial-flash {
  0%, 100% { opacity: 0.12; transform: translateX(0); }
  48% { opacity: 0.12; }
  56% { opacity: 0.92; transform: translateX(8px); }
  72% { opacity: 0.2; }
}

@keyframes style-elegant-sway {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-4px); }
}

@keyframes style-elegant-glow {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 0.85; transform: translateY(-6px); }
}

@keyframes style-preview-beat-glow {
  0%, 18% { transform: translateX(-100%); opacity: 0.1; }
  36%, 100% { transform: translateX(100%); opacity: 0.85; }
}

@keyframes video-costs-loading-sweep {
  0% { transform: translateX(-120%); opacity: 0.18; }
  50% { opacity: 0.78; }
  100% { transform: translateX(120%); opacity: 0.08; }
}

@keyframes video-costs-loading-pulse {
  0%, 100% { transform: scaleX(0.96) translateY(2px); opacity: 0.45; }
  50% { transform: scaleX(1.02) translateY(-2px); opacity: 0.92; }
}

@keyframes camera-cinematic-pan {
  0%, 100% { transform: scale(1.03) translateX(-6px); }
  50% { transform: scale(1.03) translateX(6px); }
}

@keyframes camera-frame-glide {
  0%, 100% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
}

@keyframes camera-dynamic-subject {
  0%, 100% { transform: translate3d(-2px, 0, 0) rotate(-8deg); }
  40% { transform: translate3d(3px, -3px, 0) rotate(-3deg); }
  70% { transform: translate3d(-3px, 2px, 0) rotate(-11deg); }
}

@keyframes camera-dynamic-shake {
  0%, 100% { transform: translate3d(-4px, 2px, 0) rotate(-1deg); }
  33% { transform: translate3d(3px, -2px, 0) rotate(0.6deg); }
  66% { transform: translate3d(-2px, -1px, 0) rotate(-0.8deg); }
}

@keyframes camera-macro-zoom {
  0%, 100% { transform: scale(0.9); }
  50% { transform: scale(1.08); }
}

@keyframes camera-macro-frame {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(0.86); opacity: 0.95; }
}

@keyframes camera-orbit-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .style-tile,
  .style-preview-base,
  .style-preview-subject,
  .style-preview-accent,
  .style-preview-camera-frame {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .style-preview-detail {
    grid-template-columns: 1fr;
  }

  .style-preview-stage {
    min-height: 156px;
  }

  .style-preview-timeline {
    grid-template-columns: 1fr;
  }

  .style-preview-storyboard {
    grid-template-columns: 1fr;
  }

  .style-preview-detail-copy strong {
    font-size: 18px;
  }
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #e3e9f5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.toggle-row-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-row-copy strong {
  color: #172033;
  font-size: 14px;
}

.toggle-row-copy span {
  color: #5e6f89;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.reference-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.reference-input-row input[type="text"],
.reference-input-row input[type="url"],
.reference-input-row input:not([type]) {
  flex: 1 1 320px;
}

.reference-file-input {
  flex: 1 1 220px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #d2dced;
  background: #fff;
}

.mode-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #e3e9f5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.mode-combo-preview {
  display: grid;
  gap: 8px;
  background: linear-gradient(180deg, #f4f8ff 0%, #eef4ff 100%);
}

.mode-combo-preview strong {
  color: #1c2942;
}

.mode-combo-preview p {
  margin: 0;
}

.mode-combo-preview-recommendation {
  color: #315fe7;
  font-weight: 700;
}

.mode-combo-preview-status {
  color: #1f4ed8;
  font-weight: 700;
}

.mode-combo-preview-note {
  color: #6a7a95;
}

.mode-combo-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-combo-preview-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(49, 95, 231, 0.1);
  color: #2443b6;
  font-size: 12px;
  font-weight: 700;
}

.mode-combo-preview-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.mode-combo-preview-shot {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #d8e4fb;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(49, 95, 231, 0.08);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mode-combo-preview-shot:hover {
  transform: translateY(-1px);
  border-color: #9fb8ff;
}

.mode-combo-preview-shot.is-active {
  border-color: #4d74ff;
  box-shadow: 0 14px 32px rgba(49, 95, 231, 0.16);
}

.mode-combo-preview-shot:focus {
  outline: none;
  border-color: #4d74ff;
  box-shadow: 0 0 0 4px rgba(77, 116, 255, 0.16);
}

.mode-combo-shot-thumb {
  position: relative;
  overflow: hidden;
  min-height: 88px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dfe8ff 0%, #eff4ff 100%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.mode-combo-preview-shot.is-active .mode-combo-shot-thumb {
  transform: scale(1.02);
  box-shadow: inset 0 0 0 1px rgba(77, 116, 255, 0.26);
}

.mode-combo-shot-layer {
  position: absolute;
  inset: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mode-combo-shot-base {
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.7), transparent 34%),
    linear-gradient(135deg, #d5e0ff 0%, #edf3ff 100%);
}

.mode-combo-shot-subject {
  top: 18px;
  left: 50%;
  width: 34px;
  height: 54px;
  transform: translateX(-50%);
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, rgba(63, 81, 181, 0.86), rgba(27, 42, 98, 0.92));
  box-shadow: 0 14px 26px rgba(28, 41, 66, 0.26);
}

.mode-combo-shot-subject::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(248, 221, 195, 0.96);
  box-shadow: 0 4px 10px rgba(17, 26, 48, 0.12);
}

.mode-combo-shot-accent {
  inset: auto 10px 10px 10px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.mode-combo-preview-shot strong {
  color: #1c2942;
  font-size: 13px;
}

.mode-combo-preview-shot small {
  color: #627390;
  line-height: 1.55;
}

.mode-combo-shot-thumb[data-shot-segment="0"] .mode-combo-shot-subject {
  transform: translateX(-62%);
}

.mode-combo-shot-thumb[data-shot-segment="1"] .mode-combo-shot-subject {
  width: 38px;
  height: 58px;
}

.mode-combo-shot-thumb[data-shot-segment="2"] .mode-combo-shot-subject {
  transform: translateX(-38%);
}

.mode-combo-shot-thumb[data-combo-scene="bangkok_chinatown"] .mode-combo-shot-base,
.mode-combo-shot-thumb[data-combo-scene="night_market"] .mode-combo-shot-base {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 210, 90, 0.38), transparent 28%),
    radial-gradient(circle at 78% 24%, rgba(255, 95, 149, 0.34), transparent 26%),
    linear-gradient(135deg, #38275f 0%, #121933 100%);
}

.mode-combo-shot-thumb[data-combo-scene="bangkok_cafe"] .mode-combo-shot-base {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.72), transparent 26%),
    linear-gradient(135deg, #d8c2aa 0%, #f3e8d8 50%, #c7d9c7 100%);
}

.mode-combo-shot-thumb[data-combo-scene="shopping_mall"] .mode-combo-shot-base {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 0 12%, transparent 12% 24%, rgba(255, 255, 255, 0.18) 24% 36%, transparent 36% 100%),
    linear-gradient(135deg, #cfd8ea 0%, #f2f6ff 100%);
}

.mode-combo-shot-thumb[data-combo-scene="studio_white"] .mode-combo-shot-base {
  background:
    radial-gradient(circle at 50% 18%, rgba(204, 221, 255, 0.55), transparent 28%),
    linear-gradient(180deg, #fefeff 0%, #edf2fb 100%);
}

.mode-combo-shot-thumb[data-combo-scene="outdoor_street"] .mode-combo-shot-base {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 228, 159, 0.42), transparent 22%),
    linear-gradient(135deg, #8fb3d9 0%, #dfe8ef 60%, #b9c7b4 100%);
}

.mode-combo-shot-thumb[data-combo-model-style^="western"] .mode-combo-shot-subject {
  background: linear-gradient(180deg, rgba(36, 43, 63, 0.94), rgba(17, 23, 38, 0.96));
}

.mode-combo-shot-thumb[data-combo-model-style^="th_local"] .mode-combo-shot-subject {
  background: linear-gradient(180deg, rgba(57, 78, 149, 0.88), rgba(35, 49, 103, 0.94));
}

.mode-combo-shot-thumb[data-combo-model-style$="female"] .mode-combo-shot-subject {
  border-radius: 18px 18px 14px 14px;
}

.mode-combo-shot-thumb[data-combo-model-style$="female"] .mode-combo-shot-subject::before {
  width: 20px;
  height: 24px;
}

.mode-combo-shot-thumb[data-combo-model-style$="male"] .mode-combo-shot-subject {
  width: 36px;
}

.reference-uploader {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button.reference-uploader-box {
  flex: 1 1 320px;
  gap: 12px;
  justify-content: flex-start;
  padding: 12px 14px;
  background: #fff;
  border: 1px dashed #d2dced;
  box-shadow: none;
  color: #5e6f89;
  font-weight: 700;
  text-align: left;
}

button.reference-uploader-box:hover {
  transform: none;
  box-shadow: none;
  border-color: #315fe7;
}

button.reference-uploader-box.is-ready {
  border-style: solid;
  color: #24324f;
}

.reference-uploader-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid #d2dced;
  background: #fff;
  object-fit: cover;
  flex: 0 0 auto;
}

.reference-uploader-placeholder {
  font-size: 13px;
  line-height: 1.4;
}

.reference-video-preview {
  margin-top: 12px;
  border-radius: 18px;
  background: #0b1220;
  overflow: hidden;
  border: 1px solid #d2dced;
}

.reference-video-preview video {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #000;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.image-lightbox-body {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: min(920px, 100%);
  max-height: min(90vh, 100%);
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(210, 220, 237, 0.9);
  box-shadow: 0 24px 54px rgba(14, 25, 55, 0.35);
}

.image-lightbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.image-lightbox-copy h3 {
  margin: 0;
  color: #13213d;
  font-size: 22px;
}

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

.image-lightbox-actions .action-link {
  min-height: 38px;
  padding: 10px 14px;
  box-shadow: none;
}

.image-lightbox-body img {
  max-width: min(880px, 100%);
  max-height: 76vh;
  border-radius: 14px;
  object-fit: contain;
  border: 1px solid #d2dced;
  background: #f7faff;
}

button.image-lightbox-close.secondary {
  justify-self: end;
  min-height: 38px;
  width: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.cost-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cost-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.cost-confirm-body {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(720px, 100%);
  max-height: min(90vh, 100%);
  overflow: auto;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(210, 220, 237, 0.9);
  box-shadow: 0 24px 54px rgba(14, 25, 55, 0.35);
}

.cost-confirm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5672c9;
}

.cost-confirm-header h3 {
  margin: 0;
  font-size: 22px;
  color: #13213d;
}

.cost-confirm-content {
  display: grid;
  gap: 14px;
}

.cost-confirm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.cost-confirm-metric {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #dbe5f4;
}

.cost-confirm-metric strong,
.cost-confirm-details strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #5a6c92;
}

.cost-confirm-metric span {
  font-size: 22px;
  font-weight: 700;
  color: #13213d;
}

.cost-confirm-details {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #dbe5f4;
}

.cost-confirm-details p,
.cost-confirm-note {
  margin: 0;
  color: #31415f;
}

.cost-confirm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cost-confirm-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff8e8;
  border: 1px solid #f2ddb1;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
}

.checkbox input {
  width: auto;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-row input[type="text"] {
  flex: 1 1 280px;
}

.panel-actions {
  margin-bottom: 18px;
}

.product-assets-preview {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #e2e9f6;
}

.product-assets-preview strong {
  font-size: 14px;
  color: #24324f;
}

.product-assets-preview .asset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.product-assets-preview img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #d2dced;
  background: #fff;
}

.product-assets-preview .asset-image {
  padding: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  border: 2px solid transparent;
  line-height: 0;
}

.product-assets-preview .asset-image:hover {
  transform: none;
  box-shadow: none;
}

.product-assets-preview .asset-image.is-selected {
  border-color: #315fe7;
  background: rgba(49, 95, 231, 0.08);
}

.product-assets-preview .asset-image img {
  border: 0;
}

.product-assets-preview a {
  color: #3258b8;
  font-weight: 700;
  text-decoration: none;
}

.product-assets-preview a:hover {
  text-decoration: underline;
}

.script-mode-switch {
  margin-bottom: 12px;
}

.script-mode-switch button {
  flex: 1 1 220px;
}

.script-mode-switch button.is-active {
  background: linear-gradient(135deg, #315fe7 0%, #4576ff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(48, 94, 226, 0.2);
}

button,
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #315fe7 0%, #4576ff 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 12px 24px rgba(48, 94, 226, 0.2);
}

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

button.secondary,
.action-link.secondary {
  background: #edf3ff;
  color: #3258b8;
  box-shadow: none;
}

button.ghost {
  background: #f7faff;
  color: #355cbd;
  border: 1px solid #d8e3f7;
  box-shadow: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f7faff;
  border: 1px solid #e2e9f6;
}

.label {
  display: block;
  margin-bottom: 6px;
  color: #6a7892;
  font-size: 13px;
}

.video-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-bottom: 18px;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-card h3,
.video-card p {
  margin: 0;
}

.video-player-shell {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.video-player-frame {
  width: min(100%, var(--video-preview-max-width, 420px));
  aspect-ratio: var(--video-aspect-ratio, 16 / 9);
  max-height: min(72vh, 720px);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(124, 154, 255, 0.18) 0%, rgba(124, 154, 255, 0) 42%),
    linear-gradient(180deg, #111827 0%, #060b16 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(12, 21, 41, 0.16);
}

.video-player-frame[data-orientation="portrait"] {
  --video-preview-max-width: 320px;
}

.video-player-frame[data-orientation="square"] {
  --video-preview-max-width: 420px;
}

.video-player-frame[data-orientation="landscape"] {
  --video-preview-max-width: 760px;
}

.video-player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.video-dimension-meta {
  color: #6a7892;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.asset-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-card .section-title.compact {
  margin-bottom: 0;
}

.asset-card .section-title.compact h4 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.asset-card-preview {
  width: 100%;
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e2e9f6;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
}

.asset-card-preview-image,
.asset-card-preview-video {
  aspect-ratio: 4 / 3;
}

.asset-card-preview-image {
  cursor: zoom-in;
  position: relative;
}

.asset-card-preview-image:hover {
  border-color: #c7d6f6;
  box-shadow: 0 10px 26px rgba(48, 94, 226, 0.08);
}

.asset-card-preview-image:focus-visible {
  outline: none;
  border-color: #5883ff;
  box-shadow: 0 0 0 4px rgba(88, 131, 255, 0.14);
}

.asset-card-preview-overlay {
  position: absolute;
  inset: auto 14px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.asset-card-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.asset-card-preview-badge.strong {
  background: rgba(49, 95, 231, 0.92);
}

.asset-card-preview-image img,
.asset-card-preview-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.94) 0%, rgba(238, 244, 251, 0.98) 100%);
}

.asset-card-preview-video video {
  background: #0b1220;
}

.asset-card-preview-audio {
  min-height: auto;
  padding: 18px;
}

.asset-card-preview-audio audio {
  width: 100%;
  display: block;
}

.asset-card-preview-fallback {
  min-height: auto;
  padding: 18px;
}

.asset-link-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7faff;
  border: 1px solid #dfe8f7;
  color: #536582;
  font-size: 13px;
}

.asset-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.asset-card-action-button {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: none;
}

.asset-card-action-button.danger {
  background: #fff1f1;
  color: #c03d3d;
}

.asset-card-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.asset-card-quick-button {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  justify-content: center;
  box-shadow: none;
}

.copy-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #edf8f0;
  color: #1f7d4c;
  font-size: 14px;
  font-weight: 600;
}

.copy-status.warning {
  background: #fff5e8;
  color: #b26b08;
}

.cost-table-wrapper {
  overflow: auto;
  border: 1px solid #e3e9f5;
  border-radius: 18px;
  background: #fff;
}

.cost-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.cost-table th,
.cost-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef7;
  text-align: left;
  vertical-align: top;
  color: #24324f;
  font-size: 12px;
  line-height: 1.45;
}

.cost-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faff;
  color: #5f6f89;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cost-table tbody tr:hover {
  background: #f9fbff;
}

.cost-table tbody tr:last-child td {
  border-bottom: 0;
}

.cost-table td {
  word-break: break-word;
}

.cost-table-prompt {
  min-width: 220px;
  max-width: 320px;
}

@media (max-width: 1024px) {
  .video-costs-card.video-costs-card-wide {
    grid-column: auto;
  }
}

body.ui-simple .advanced-only {
  display: none !important;
}

body.ui-simple .workspace-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.ui-complex .simple-only {
  display: none !important;
}

.link-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-url {
  display: inline-block;
  max-width: 100%;
  color: #62728d;
  font-size: 13px;
}

.result-json {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: #0f1729;
  color: #d9e3ff;
  overflow: auto;
  min-height: 220px;
}

@media (max-width: 1380px) {
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

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

  .app-sidebar {
    position: static;
    height: auto;
  }

  .sidebar-resizer {
    display: none;
  }

  .system-nav {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

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

  .project-board {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .app-shell {
    gap: 18px;
    padding: 16px;
  }

  .topbar,
  .workspace-panel,
  .guide-panel,
  .operations-panel,
  .executive-panel,
  .dashboard-card {
    padding: 20px;
    border-radius: 20px;
  }

  .topbar-main,
  .executive-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-meta,
  .hero-actions {
    justify-content: flex-start;
  }

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

  .system-nav {
    grid-template-columns: 1fr;
  }
}
