:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --bg: #f4f8fd;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe7f4;
  --line-strong: #b9cce3;
  --blue: #246bfe;
  --blue-dark: #174ec9;
  --blue-soft: #eaf3ff;
  --green: #168768;
  --amber: #a86700;
  --red: #bd3d32;
  --shadow: 0 8px 24px rgba(32, 76, 128, 0.07);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #1d3d66;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

button:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

button:disabled {
  cursor: not-allowed;
  color: #9aa8ba;
  background: #eef3f8;
}

button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(36, 107, 254, 0.2);
}

button.primary:hover:not(:disabled) {
  background: var(--blue-dark);
  color: #fff;
}

button.ghost {
  background: #f8fbff;
  color: var(--blue-dark);
}

.app-shell {
  min-height: 100vh;
  padding: 14px;
}

.topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 23px;
  font-weight: 900;
}

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

h1 { margin-bottom: 2px; font-size: 18px; line-height: 1.1; }
.brand p { margin: 0; color: var(--muted); font-size: 12px; }

.status-pill {
  justify-self: end;
  width: min(100%, 460px);
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #bcd6ff;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.status-pill span {
  margin: 0;
  color: var(--blue-dark);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 900;
}

.status-pill strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.status-pill.danger { border-color: #ffc9c2; background: #fff0ee; }
.status-pill.danger span,
.status-pill.danger strong { color: var(--red); }

.workspace {
  min-width: 0;
  padding-top: 12px;
}

@media (min-width: 1281px) {
  .app-shell:has(.result-dock.visible) .workspace { padding-right: 254px; }
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.main-grid {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(520px, 680px) minmax(420px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.control-panel {
  height: calc(100vh - 112px);
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.chat-history {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  box-shadow: var(--shadow);
}

.chat-message {
  max-width: 88%;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-message strong {
  color: var(--blue-dark);
  font-size: 12px;
  line-height: 1.2;
}

.chat-message.user {
  align-self: flex-end;
  border-color: #bcd6ff;
  background: var(--blue-soft);
}

.chat-message.assistant { align-self: flex-start; }

.chat-attachment-image {
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: block;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #fff;
}

.chat-message.user .chat-attachment-image {
  justify-self: start;
}

.bottom-composer {
  min-height: 218px;
  max-height: min(46vh, 360px);
  display: grid;
  grid-template-rows: auto minmax(92px, 1fr) auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fbfdff;
  box-shadow: 0 16px 34px rgba(32, 76, 128, 0.13);
  overflow: hidden;
}

.bottom-composer.drag-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.12), 0 12px 30px rgba(32, 76, 128, 0.12);
}

.bottom-composer.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(189, 61, 50, 0.1), 0 12px 30px rgba(32, 76, 128, 0.12);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-preview {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  margin: 10px 10px 0;
  padding: 8px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f6faff;
}

.attachment-preview[hidden] { display: none; }

.attachment-preview img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.attachment-preview span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-input {
  width: 100%;
  min-height: 92px;
  height: 100%;
  border: 0;
  outline: none;
  resize: none;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  background: transparent;
}

.brief-input:focus { box-shadow: none; }

.composer-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 9px 9px;
  background: transparent;
}

.composer-bar button {
  box-shadow: 0 8px 18px rgba(34, 78, 128, 0.1);
}

.composer-bar button.ghost {
  background: rgba(255, 255, 255, 0.92);
}

.icon-only {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 18px;
}

.icon-only svg,
.icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-action { min-width: 94px; }

.ratio-picker {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d3d66;
  box-shadow: 0 8px 18px rgba(34, 78, 128, 0.1);
}

.ratio-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ratio-picker select {
  width: 76px;
  min-height: 32px;
  padding: 4px 24px 4px 6px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.ratio-picker select:focus {
  box-shadow: none;
  outline: 2px solid rgba(36, 107, 254, 0.18);
  outline-offset: 2px;
}

.compact-select {
  display: grid;
  gap: 7px;
}

.composer-bar .compact-select {
  grid-template-columns: auto minmax(118px, 1fr);
  align-items: center;
  gap: 7px;
}

.compact-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ratio-control { width: min(100%, 218px); }

.advanced-settings {
  min-width: 72px;
  position: relative;
}

.advanced-settings summary {
  min-height: 38px;
  list-style: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #1d3d66;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings[open] summary { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.advanced-settings .compact-select {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(32, 76, 128, 0.14);
}

select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
  font-size: 13px;
  font-weight: 800;
}

select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.1); }

.generate-button {
  min-width: 126px;
  min-height: 38px;
  box-shadow: 0 10px 24px rgba(36, 107, 254, 0.24);
}

.preview-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.preview-toolbar h3 { margin: 0; font-size: 18px; }
.preview-actions { display: flex; align-items: center; gap: 10px; }
.preview-panel:not(.has-suite) .preview-actions { display: none; }

.task-lights {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(185, 204, 227, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(32, 76, 128, 0.08);
}

.task-light {
  width: 13px;
  height: 13px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}

.task-light i {
  width: 9px;
  height: 9px;
  display: block;
  border-radius: inherit;
  background: #b8c7d9;
  box-shadow: 0 0 0 3px rgba(184, 199, 217, 0.16);
}

.task-light.done i {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 135, 104, 0.14), 0 0 14px rgba(22, 135, 104, 0.34);
}

.task-light.active i {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.15), 0 0 16px rgba(36, 107, 254, 0.42);
}

.task-light.error i {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(189, 61, 50, 0.14), 0 0 14px rgba(189, 61, 50, 0.32);
}
.carousel-controls { display: flex; align-items: center; gap: 8px; }
.carousel-controls button { width: 38px; padding: 0; font-size: 18px; }
.carousel-controls span { min-width: 52px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 900; }

.image-stage {
  --preview-ratio: 1 / 1;
  position: relative;
  min-height: calc(100vh - 196px);
  display: grid;
  place-items: center;
  margin: 0;
  padding: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
}

.image-frame {
  position: relative;
  width: min(100%, var(--preview-width, 54vh));
  max-width: 100%;
  max-height: 62vh;
  aspect-ratio: var(--preview-ratio);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.image-frame img.visible { display: block; }

.stage-empty {
  display: none;
  max-width: 220px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
}

.stage-empty.visible { display: block; }

.result-badge,
.download-float {
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(35, 72, 118, 0.08);
}

.result-badge {
  position: absolute;
  top: 14px;
  right: 104px;
  z-index: 1;
  padding: 6px 10px;
  border: 1px solid #c9d9ec;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.image-float-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.download-float {
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
}

.result-badge.succeeded { border-color: #a7dbc8; color: var(--green); background: rgba(238, 250, 246, 0.95); }
.result-badge.mock_fallback,
.result-badge.pending,
.result-badge.generating { border-color: #f3d29a; color: var(--amber); background: rgba(255, 250, 238, 0.95); }
.result-badge.failed { border-color: #ffc9c2; color: var(--red); background: rgba(255, 240, 238, 0.96); }
.result-badge.pending,
.download-float:disabled { display: none; }

.result-dock {
  position: fixed;
  top: 102px;
  right: 14px;
  z-index: 20;
  width: 244px;
  max-height: calc(100vh - 124px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(32, 76, 128, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.result-dock.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dock-head strong { color: var(--blue-dark); font-size: 12px; }

.asset-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: calc(100vh - 174px);
  overflow: auto;
  padding: 0 2px 2px 0;
}

.asset-thumb-wrap {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.asset-thumb-wrap.active { border-color: var(--blue); background: var(--blue-soft); }

.asset-thumb {
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 5px;
  justify-items: start;
  padding: 7px;
}

.asset-thumb:hover:not(:disabled) { background: transparent; }
.asset-thumb img,
.thumb-empty { width: 100%; aspect-ratio: var(--thumb-ratio, var(--preview-ratio, 1 / 1)); border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.asset-thumb img { object-fit: contain; }
.thumb-empty { display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 900; }
.asset-thumb span { max-width: 100%; font-size: 12px; line-height: 1.2; font-weight: 900; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.thumb-download {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 14px rgba(35, 72, 118, 0.1);
}

.regenerate-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 20px 54px rgba(24, 54, 90, 0.22);
}

.regenerate-dialog::backdrop { background: rgba(23, 32, 51, 0.28); }

.regenerate-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
}

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

.dialog-head h3 { margin: 0; font-size: 16px; }
.dialog-close { width: 34px; min-height: 34px; padding: 0; font-size: 20px; }
.regenerate-card textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  resize: vertical;
  padding: 12px;
  outline: none;
  line-height: 1.55;
}
.regenerate-card textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.1); }
.dialog-actions { justify-content: flex-end; }

@media (max-width: 1280px) {
  .result-dock {
    top: auto;
    right: 14px;
    bottom: 14px;
    width: min(520px, calc(100vw - 28px));
    max-height: 164px;
  }

  .asset-strip {
    grid-template-columns: repeat(5, minmax(78px, 1fr));
    max-height: 108px;
    overflow: auto;
  }
}

@media (max-width: 1180px) {
  .main-grid { grid-template-columns: minmax(460px, 560px) minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .topbar,
  .main-grid { grid-template-columns: 1fr; }
  .status-pill:not(.status-lights) { justify-self: stretch; width: 100%; }
  .control-panel { height: auto; min-height: 420px; overflow: visible; }
  .image-stage { min-height: 520px; }
}

@media (max-width: 720px) {
  .app-shell { padding: 10px; }
  .bottom-composer { max-height: none; }
  .composer-bar { align-items: stretch; }
  .preview-toolbar { align-items: start; flex-direction: column; }
  .preview-actions { width: 100%; justify-content: space-between; }
  .task-lights { align-self: flex-end; }
}

@media (max-width: 520px) {
  .composer-bar { justify-content: stretch; }
  .ratio-picker { flex: 1 1 124px; justify-content: space-between; }
  .ratio-picker select { width: 82px; }
  .icon-action { flex: 1 1 120px; }
  .generate-button { flex: 1 1 100%; }
  .preview-actions { flex-direction: column; align-items: stretch; }
  .carousel-controls { justify-content: space-between; }
}

/* Splash and studio visual direction */
body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 4%, rgba(36, 107, 254, 0.1), transparent 28vw),
    linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
}

.splash-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(232, 242, 255, 0.78)),
    radial-gradient(circle at 72% 18%, rgba(36, 107, 254, 0.16), transparent 30vw),
    radial-gradient(circle at 22% 74%, rgba(22, 135, 104, 0.1), transparent 26vw);
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.splash-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  color: var(--ink);
}

.splash-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(36, 107, 254, 0.28);
}

.splash-kicker {
  margin: 0;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

.splash-content h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

.splash-copy {
  max-width: 520px;
  margin: 0;
  color: #46566d;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  font-weight: 700;
}

.splash-start {
  min-width: 146px;
  min-height: 44px;
  margin-top: 8px;
  box-shadow: 0 16px 34px rgba(36, 107, 254, 0.26);
}

.splash-scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 28px rgba(32, 76, 128, 0.12);
  transform: translateX(-50%);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(238, 246, 255, 0.96)),
    linear-gradient(90deg, rgba(36, 107, 254, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 107, 254, 0.04) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
}

.topbar,
.chat-history,
.preview-panel {
  border-color: rgba(185, 204, 227, 0.72);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 34px rgba(32, 76, 128, 0.08);
  backdrop-filter: blur(10px);
}

.topbar {
  border-radius: 12px;
}

.chat-history {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(236, 246, 255, 0.68)),
    radial-gradient(circle at 18% 14%, rgba(36, 107, 254, 0.08), transparent 280px);
}

.bottom-composer {
  border-color: rgba(147, 178, 216, 0.78);
  background: rgba(251, 253, 255, 0.92);
  box-shadow: 0 18px 36px rgba(32, 76, 128, 0.14);
}

.preview-panel {
  background: rgba(255, 255, 255, 0.62);
}

.preview-toolbar {
  border-bottom-color: rgba(185, 204, 227, 0.72);
  background: rgba(255, 255, 255, 0.58);
}

.image-stage {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.9), transparent 34vh),
    linear-gradient(90deg, rgba(36, 107, 254, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 107, 254, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  background-size: auto, 34px 34px, 34px 34px, auto;
}

.image-frame {
  border-color: rgba(185, 204, 227, 0.8);
  box-shadow: 0 18px 48px rgba(40, 76, 120, 0.09);
}

.stage-empty {
  color: #7b8da5;
}

.result-dock {
  border-color: rgba(185, 204, 227, 0.78);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: reduce) {
  .particle-canvas { display: none; }
}

@media (max-width: 720px) {
  .splash-content { width: min(100% - 28px, 560px); }
  .splash-content h2 { font-size: 42px; }
}

/* Top-right task lights */
.status-pill.status-lights {
  width: auto;
  min-width: 0;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding: 9px 12px;
  border: 1px solid rgba(158, 185, 221, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(32, 76, 128, 0.09);
  backdrop-filter: blur(10px);
}

.status-pill.status-lights.danger {
  border-color: rgba(255, 185, 176, 0.74);
  background: rgba(255, 249, 248, 0.84);
}

.status-pill.status-lights .task-lights {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.status-pill.status-lights .task-light {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
}

.status-pill.status-lights .task-light i {
  width: 30px;
  height: 30px;
  background: #d7e7f8;
  box-shadow: inset 0 0 0 1px rgba(117, 151, 191, 0.28), 0 0 0 5px rgba(216, 232, 248, 0.38);
}

.status-pill.status-lights .task-light.ready i {
  background: #5bbdf8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 5px rgba(91, 189, 248, 0.16), 0 0 22px rgba(91, 189, 248, 0.4);
}

.status-pill.status-lights .task-light.active i {
  background: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48), 0 0 0 5px rgba(36, 107, 254, 0.16), 0 0 24px rgba(36, 107, 254, 0.46);
}

.status-pill.status-lights .task-light.done i {
  background: #18a779;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 0 5px rgba(24, 167, 121, 0.16), 0 0 22px rgba(24, 167, 121, 0.42);
}

.status-pill.status-lights .task-light.error i {
  background: #e66b5f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48), 0 0 0 5px rgba(230, 107, 95, 0.15), 0 0 22px rgba(230, 107, 95, 0.38);
}

.preview-panel:not(.has-suite) .preview-toolbar {
  display: none;
}

.preview-toolbar .task-lights {
  display: none;
}

@media (max-width: 960px) {
  .status-pill.status-lights {
    justify-self: end;
    width: auto;
  }
}