@charset "UTF-8";

:root {
  --bg: #0c0c0f;
  --bg-grid: rgba(255, 255, 255, 0.018);
  --sidebar: #08080a;
  --surface: #131318;
  --surface-raised: #18181e;
  --surface-soft: #1d1d24;
  --line: #292930;
  --line-strong: #373740;
  --text: #f3f0eb;
  --text-soft: #d2ced4;
  --muted: #aaa5ae;
  --accent: #e7ff62;
  --accent-hover: #f0ff91;
  --accent-soft: rgba(231, 255, 98, 0.1);
  --violet: #a394ff;
  --violet-soft: rgba(163, 148, 255, 0.11);
  --mint: #63d5b2;
  --mint-soft: rgba(99, 213, 178, 0.1);
  --amber: #e9b45f;
  --amber-soft: rgba(233, 180, 95, 0.1);
  --danger: #ff7a74;
  --card-radius: 12px;
  --control-radius: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="day"] {
  --bg: #fffcf2;
  --bg-grid: rgba(64, 61, 57, 0.055);
  --sidebar: rgba(255, 252, 242, 0.96);
  --surface: rgba(255, 252, 242, 0.82);
  --surface-raised: rgba(255, 252, 242, 0.96);
  --surface-soft: rgba(204, 197, 185, 0.22);
  --line: rgba(204, 197, 185, 0.68);
  --line-strong: #ccc5b9;
  --text: #252422;
  --text-soft: #403d39;
  --muted: #403d39;
  --accent: #eb5e28;
  --accent-hover: #eb5e28;
  --accent-soft: rgba(235, 94, 40, 0.11);
  --violet: #eb5e28;
  --violet-soft: rgba(235, 94, 40, 0.1);
  --mint: #eb5e28;
  --mint-soft: rgba(235, 94, 40, 0.1);
  --amber: #eb5e28;
  --amber-soft: rgba(235, 94, 40, 0.1);
  --danger: #eb5e28;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px;
  font-family: Bahnschrift, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

button,
input,
select,
textarea,
.panel,
.task-row {
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .25s ease,
    transform .25s var(--ease);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 18px;
  border-right: 1px solid #202025;
  background: rgba(8, 8, 10, 0.97);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  color: var(--accent);
  background: #111115;
  font-size: 16px;
  letter-spacing: 0;
  box-shadow: inset 0 0 18px rgba(231, 255, 98, .05);
}

.workspace-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 27px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.workspace-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--control-radius);
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 15px;
  font-weight: 700;
}

.workspace-card > span:last-child,
.user-card > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workspace-card small,
.user-card small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
}

.workspace-card strong {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--control-radius);
  color: #77737d;
  background: transparent;
  text-align: left;
  font-size: 15px;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: transparent;
  transition: background-color .2s ease, height .25s var(--ease);
}

.nav-item > span {
  width: 18px;
  color: #5d5963;
  font-size: 18px;
  text-align: center;
}

.nav-item:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, .025);
}

.nav-item.active {
  color: var(--text);
  background: var(--surface-raised);
}

.nav-item.active::before {
  height: 24px;
  background: var(--accent);
}

.nav-item.active > span {
  color: var(--accent);
}

.nav-badge {
  min-width: 18px;
  margin-left: auto;
  padding: 3px 5px;
  border-radius: 999px;
  color: #0b0b0d;
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.nav-badge.muted {
  color: var(--text-soft);
  background: var(--surface-soft);
}

.theme-switch {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: var(--surface);
  text-align: left;
}

.theme-switch span {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  letter-spacing: .08em;
}

.theme-switch strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
}

.theme-switch:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: var(--surface-raised);
}

.sidebar-tip {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background:
    radial-gradient(circle at 0 0, rgba(231, 255, 98, .08), transparent 50%),
    var(--surface);
}

.sidebar-tip strong {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
}

.sidebar-tip p {
  margin: 8px 0 0;
  color: #6f6b74;
  font-size: 13px;
  line-height: 1.55;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 7px 0;
}

.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f6d7cd;
  background: #6b3b36;
  font-size: 14px;
}

.user-card > span:nth-child(2) {
  flex: 1;
}

.user-card strong {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.user-card button {
  border: 0;
  color: #56525b;
  background: transparent;
}

.user-card button:hover {
  color: var(--text);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 8, 10, .58);
  backdrop-filter: blur(10px);
}

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

.auth-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-soft);
  background: var(--surface);
}

.auth-dialog h2 {
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-dialog p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

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

.auth-dialog label {
  display: grid;
  gap: 8px;
}

.auth-dialog label span {
  color: var(--text-soft);
  font-size: 13px;
}

.auth-dialog input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text);
  background: var(--surface);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 8, 10, .76);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox-dialog {
  position: relative;
  width: min(920px, 94vw);
  max-height: 92vh;
  display: grid;
  gap: 12px;
}

.image-lightbox-dialog img {
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
}

.image-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #111;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
}

.image-lightbox-caption {
  color: #fff;
  font-size: 13px;
  text-align: center;
}

.auth-message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.auth-message.error {
  color: #ff8d84;
}

/* Main frame */

.main {
  min-width: 0;
  padding: 0 52px 72px;
}

.topbar {
  height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
}

.topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 2.4vw, 35px);
  font-weight: 560;
  letter-spacing: -.045em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.status-pill i,
.form-actions > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(99, 213, 178, .7);
}

.icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: var(--surface);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.icon-button b {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.view {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 34px;
}

.view.active {
  display: block;
  animation: view-in .45s var(--ease) both;
}

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

/* Progress */

.stepper {
  max-width: 690px;
  display: grid;
  grid-template-columns: 1fr 48px 1fr 48px 1fr;
  align-items: center;
  margin: 2px 0 32px;
}

.stepper > i {
  height: 1px;
  background: var(--line);
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 9px;
  align-items: center;
  color: #5d5962;
}

.step span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #66616b;
  background: var(--surface);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.step b {
  color: #77737c;
  font-size: 13px;
  font-weight: 500;
}

.step small {
  color: #4f4c54;
  font-size: 12px;
}

.step.active span {
  border-color: var(--accent);
  color: #0d0d10;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(231, 255, 98, .2);
}

.step.active b {
  color: var(--text);
}

/* Panels and form rhythm */

.panel {
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: rgba(19, 19, 24, .92);
}

.panel:hover {
  border-color: #303038;
}

#requestForm {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 16px;
}

#requestForm > .panel {
  margin: 0;
}

#requestForm > .panel:nth-of-type(2) {
  background:
    radial-gradient(circle at 100% 0, rgba(163, 148, 255, .055), transparent 30%),
    var(--surface);
}

#requestForm > .panel:nth-of-type(3),
#requestForm > .form-actions {
  grid-column: 1 / -1;
}

#requestForm > .panel:nth-of-type(3) {
  padding: 18px 24px;
}

#requestForm > .panel:first-child .form-grid {
  grid-template-columns: 1fr;
}

#requestForm > .panel:first-child .wide {
  grid-column: auto;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -.015em;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-heading.compact {
  justify-content: space-between;
  margin-bottom: 19px;
}

.panel-heading.compact h2 {
  margin: 0;
}

.section-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: var(--control-radius);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  background: transparent !important;
  opacity: .85;
}

.coral {
  color: var(--accent);
  background: var(--accent-soft);
}

.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.mint {
  color: var(--mint);
  background: var(--mint-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
}

.form-grid > label,
.review-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-grid > label > span,
.review-note > span {
  color: #9b969f;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}

em {
  color: var(--accent);
  font-style: normal;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  outline: none;
  color: var(--text);
  background: #0f0f13;
}

input,
select {
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
}

select {
  color-scheme: dark;
}

textarea {
  min-height: 80px;
  padding: 12px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: #514e56;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 255, 98, .08);
  background: #121216;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choice {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: #101014;
  font-size: 13px;
}

.choice:hover {
  color: var(--text-soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.choice.active {
  border-color: rgba(231, 255, 98, .45);
  color: #efffa1;
  background: var(--accent-soft);
}

.choice:active,
.primary-button:active,
.secondary-button:active,
.danger-button:active,
.row-action:active {
  transform: scale(.97);
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #0d0d10;
}

.segment-control button {
  min-height: 33px;
  border: 0;
  border-radius: 6px;
  color: #66626b;
  background: transparent;
  font-size: 13px;
}

.segment-control button:hover {
  color: var(--text-soft);
}

.segment-control button.active {
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px #2e2e36;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: #101014;
  font-size: 13px;
}

.check-grid label:has(input:checked) {
  border-color: rgba(163, 148, 255, .3);
  color: #c1b8ff;
  background: var(--violet-soft);
}

.check-grid input,
.checklist input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.upload-box {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px dashed #373740;
  border-radius: var(--card-radius);
  color: var(--text-soft);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.018) 50%, transparent 50.2%),
    #0f0f13;
  cursor: pointer;
}

.upload-box:hover {
  border-color: var(--accent);
  background-color: #131318;
}

.upload-box input {
  display: none;
}

.upload-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #3a3434;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 17px;
}

.upload-box strong {
  font-size: 14px;
  font-weight: 500;
}

.upload-box small {
  color: #5f5b64;
  font-size: 12px;
}

.form-actions {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.form-actions > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5f5b64;
  font-size: 12px;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--control-radius);
  font-size: 13px;
  font-weight: 550;
}

.primary-button {
  border: 1px solid var(--accent);
  color: #0d0d0f;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(231, 255, 98, 0);
}

.primary-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  box-shadow: 0 9px 28px rgba(231, 255, 98, .14);
  transform: translateY(-2px);
}

.primary-button b {
  padding-left: 11px;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: var(--surface);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.danger-button {
  border: 1px solid rgba(255, 122, 116, .25);
  color: var(--danger);
  background: rgba(255, 122, 116, .06);
}

.small {
  min-height: 34px;
  padding: 0 11px;
}

/* Result */

.result-hero {
  position: relative;
  min-height: 205px;
  padding: 0;
  overflow: hidden;
  border-color: #3a3130;
  background:
    radial-gradient(circle at 83% 12%, rgba(231, 255, 98, .17), transparent 32%),
    linear-gradient(120deg, #171318, #131318 62%);
}

.result-hero::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -55px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(231, 255, 98, .13);
  border-radius: 50%;
}

.result-kicker {
  padding: 15px 24px 0;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
}

.result-main {
  position: relative;
  z-index: 1;
  min-height: 165px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 30px;
}

.result-main > div:first-child {
  display: flex;
  align-items: center;
  gap: 22px;
}

.result-number {
  color: var(--accent);
  font-size: 68px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.08em;
  opacity: .95;
}

.result-main small {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: .08em;
}

.result-main h2 {
  margin: 6px 0 9px;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 540;
  letter-spacing: -.045em;
}

.result-main p {
  max-width: 650px;
  margin: 0;
  color: #99949d;
  font-size: 14px;
  line-height: 1.65;
}

.confidence {
  min-width: 110px;
  padding-left: 24px;
  border-left: 1px solid var(--line-strong);
  text-align: center;
}

.confidence strong {
  display: block;
  color: var(--mint);
  font-size: 25px;
  font-weight: 500;
}

.confidence span {
  color: var(--muted);
  font-size: 12px;
}

.result-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 16px;
}

.tag {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--mint);
  background: var(--mint-soft);
  font-size: 12px;
  font-weight: 500;
}

.tag.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.coral-tag {
  color: #edff99;
  background: var(--accent-soft);
}

.summary-list {
  margin: 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 10px 0;
  border-bottom: 1px solid #232329;
}

.summary-list div:last-child {
  border-bottom: 0;
}

.summary-list dt {
  color: var(--muted);
  font-size: 12px;
}

.summary-list dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-row div {
  padding: 14px;
  border: 1px solid #232329;
  border-radius: var(--control-radius);
  background: #101014;
}

.metric-row small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.metric-row strong {
  font-size: 16px;
  font-weight: 500;
}

.missing-box {
  margin-top: 13px;
  padding: 12px 14px;
  border-left: 2px solid var(--amber);
  background: var(--amber-soft);
}

.missing-box strong {
  color: var(--amber);
  font-size: 12px;
  font-weight: 500;
}

.missing-box ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 8px 0 0;
  padding-left: 13px;
  color: #a19a90;
  font-size: 12px;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: work;
}

.workflow-list li {
  position: relative;
  min-height: 83px;
  padding: 14px 12px 12px 43px;
  border: 1px solid #24242b;
  border-radius: var(--control-radius);
  background: #101014;
  counter-increment: work;
}

.workflow-list li:hover {
  border-color: #373740;
  background: #15151a;
  transform: translateY(-2px);
}

.workflow-list li::before {
  content: "0" counter(work);
  position: absolute;
  top: 15px;
  left: 12px;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.workflow-list b {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.workflow-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.prompt-studio {
  position: relative;
  overflow: hidden;
  border-color: rgba(231, 255, 98, .2);
  background:
    radial-gradient(circle at 100% 0, rgba(231, 255, 98, .07), transparent 28%),
    var(--surface);
}

.prompt-studio::before {
  content: "";
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .65;
}

.prompt-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  letter-spacing: .16em;
}

.prompt-tabs {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #0c0c0f;
}

.prompt-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
}

.prompt-tabs button:hover {
  color: var(--text);
}

.prompt-tabs button.active {
  color: #0c0c0f;
  background: var(--accent);
}

.prompt-editor {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: #0b0b0e;
}

.prompt-editor:focus-within {
  border-color: rgba(231, 255, 98, .5);
  box-shadow: 0 0 0 3px rgba(231, 255, 98, .05);
}

.prompt-editor-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #101014;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.prompt-editor-bar > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-editor-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(231, 255, 98, .6);
}

.prompt-editor-bar b {
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: .08em;
}

#promptOutput {
  min-height: 390px;
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: 0;
  color: #d6d2cb;
  background: transparent;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 17px;
  line-height: 1.75;
  resize: vertical;
}

#promptOutput:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.prompt-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.prompt-feedback,
.prompt-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.prompt-feedback > span,
#promptStatus {
  color: var(--muted);
  font-size: 15px;
}

.prompt-feedback button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #101014;
  font-size: 14px;
}

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

.prompt-feedback button.active {
  border-color: rgba(231, 255, 98, .35);
  color: var(--accent);
  background: var(--accent-soft);
}

#promptStatus {
  margin-right: 4px;
  color: var(--mint);
}

/* Workspace */

.stats-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr .85fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-grid article {
  min-height: 110px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.stats-grid article:first-child {
  border-color: #3c312f;
  background:
    linear-gradient(115deg, var(--accent-soft), transparent 64%),
    var(--surface);
}

.stat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--control-radius);
  font-size: 16px;
}

.stats-grid article div {
  display: flex;
  flex-direction: column;
}

.stats-grid small {
  color: var(--muted);
  font-size: 12px;
}

.stats-grid strong {
  margin-top: 4px;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.stats-grid em {
  margin-left: auto;
  color: var(--mint);
  font-size: 12px;
}

.task-list {
  display: grid;
}

.system-panel {
  margin-bottom: 16px;
}

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

.system-grid article {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
}

.system-grid small {
  color: var(--muted);
  font-size: 12px;
}

.system-grid strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.system-message.error {
  color: #ff8d84;
}

.workspace-empty {
  display: grid;
  gap: 6px;
  padding: 24px 4px 4px;
  border-top: 1px solid #24242a;
}

.workspace-empty strong {
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 500;
}

.workspace-empty p {
  margin: 0;
  color: var(--muted);
}

.task-row {
  display: grid;
  grid-template-columns: 46px minmax(260px, 1fr) 180px 100px;
  gap: 15px;
  align-items: center;
  padding: 17px 4px;
  border-top: 1px solid #24242a;
}

.task-row:first-child {
  border-top: 0;
}

.task-row:hover {
  padding-left: 10px;
  padding-right: 10px;
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.018);
}

.task-thumb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--control-radius);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

.lipstick {
  color: #efffa1;
  background: var(--accent-soft);
}

.cream {
  color: #e1bc74;
  background: var(--amber-soft);
}

.brush {
  color: var(--mint);
  background: var(--mint-soft);
}

.task-main > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-main small {
  color: var(--muted);
  font-size: 12px;
}

.task-main h3 {
  margin: 7px 0 4px;
  font-size: 15px;
  font-weight: 500;
}

.task-main p {
  margin: 0;
  color: #66626b;
  font-size: 12px;
}

.task-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.55;
}

.task-row.is-expanded .task-description {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.task-description-toggle {
  margin-top: 5px;
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
}

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

.progress-block span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.progress-block span b {
  color: #96919a;
  font-weight: 400;
}

.progress-block span em {
  color: var(--muted);
}

.progress-block > i {
  display: block;
  height: 3px;
  margin-top: 9px;
  border-radius: 3px;
  background: #292930;
  overflow: hidden;
}

.progress-block > i b {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(231, 255, 98, .45);
}

.row-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
}

.row-action:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(2px);
}

/* Review */

.review-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: #09090b;
}

.preview-toolbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #101014;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.preview-toolbar div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-toolbar button {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-soft);
  background: var(--surface);
}

.mock-art {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 30%, #f8d8cd 0, #d99a8b 21%, transparent 22%),
    linear-gradient(135deg, #8c3735, #dc927f 55%, #c45f51);
}

.mock-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(45, 10, 15, .62), transparent 50%);
}

.art-label {
  position: absolute;
  z-index: 2;
  top: 62px;
  left: 55px;
  color: #fff4ef;
  font-size: 47px;
  font-weight: 600;
  line-height: .86;
  letter-spacing: -.05em;
}

.product-shape {
  position: absolute;
  z-index: 2;
  bottom: 70px;
  left: 44%;
  width: 88px;
  height: 275px;
  border-radius: 8px 8px 20px 20px;
  background: linear-gradient(90deg, #74262d, #b4454e 45%, #722229);
  box-shadow: 20px 22px 35px rgba(72, 25, 28, .3);
  transform: rotate(-7deg);
}

.product-shape i {
  position: absolute;
  top: -55px;
  left: 9px;
  width: 70px;
  height: 70px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(90deg, #201b20, #4d4148, #1d171c);
}

.product-shape b {
  position: absolute;
  top: 115px;
  left: 21px;
  color: #f2d7cd;
  font-size: 18px;
  letter-spacing: .15em;
  transform: rotate(90deg);
}

.mock-art p {
  position: absolute;
  z-index: 2;
  right: 48px;
  bottom: 46px;
  margin: 0;
  color: #742b2e;
  font-size: 17px;
  text-align: right;
  letter-spacing: .12em;
}

.mock-art p strong {
  color: #fff4ee;
  font-size: 27px;
}

.mock-art > small {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 15px;
  color: rgba(255,255,255,.45);
  font-size: 11px;
}

.review-panel {
  margin: 0;
}

.checklist {
  display: grid;
  gap: 7px;
  margin-bottom: 19px;
}

.checklist label {
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #24242a;
  border-radius: var(--control-radius);
  background: #101014;
}

.checklist label:has(input:checked) {
  border-color: rgba(99, 213, 178, .2);
  background: var(--mint-soft);
}

.checklist input {
  accent-color: var(--mint);
}

.checklist span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checklist b {
  font-size: 13px;
  font-weight: 500;
}

.checklist small {
  color: var(--muted);
  font-size: 12px;
}

.review-note textarea {
  min-height: 92px;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 7px;
  margin-top: 16px;
}

.decision-message {
  display: none;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid rgba(99, 213, 178, .18);
  border-radius: var(--control-radius);
  color: var(--mint);
  background: var(--mint-soft);
  font-size: 12px;
}

.decision-message.show {
  display: block;
  animation: message-in .35s var(--ease) both;
}

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

/* Reference-driven scale and editorial rhythm */

.app-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.main {
  padding-right: 58px;
  padding-left: 58px;
}

.studio-hero {
  position: relative;
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 48px;
  margin: 0 0 30px;
  padding: 22px 4px 36px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.studio-hero::before {
  content: "";
  position: absolute;
  top: 2%;
  left: 46%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(231, 255, 98, .035);
  filter: blur(4px);
  pointer-events: none;
}

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

.micro-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--accent);
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .16em;
}

.micro-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero-copy h2 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 560;
  line-height: 1.03;
  letter-spacing: -.062em;
}

.hero-copy h2 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy p {
  max-width: 600px;
  margin: 24px 0 0;
  color: #99959d;
  font-size: 18px;
  line-height: 1.7;
}

.hero-signal {
  position: relative;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(231, 255, 98, .12), transparent 55%),
    #101014;
}

.hero-signal::before,
.hero-signal::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}

.hero-signal::before {
  width: 1px;
  height: 128%;
}

.hero-signal::after {
  width: 128%;
  height: 1px;
}

.hero-signal span {
  position: absolute;
  top: 28px;
  left: 31px;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 16px;
}

.hero-signal i {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--accent);
  box-shadow:
    0 0 0 15px rgba(231, 255, 98, .05),
    0 0 52px rgba(231, 255, 98, .3);
  transform: rotate(45deg);
}

.hero-signal b {
  position: absolute;
  right: 26px;
  bottom: 27px;
  color: var(--text-soft);
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .1em;
  text-align: right;
}

body {
  font-size: 19px;
}

.brand {
  font-size: 18px;
}

.workspace-card small,
.user-card small,
.status-pill,
.eyebrow {
  font-size: 14px;
}

.workspace-card strong,
.user-card strong {
  font-size: 16px;
}

.nav-item {
  min-height: 46px;
  font-size: 16px;
}

.sidebar-tip strong {
  font-size: 14px;
}

.sidebar-tip p {
  font-size: 15px;
}

.topbar h1 {
  font-size: clamp(32px, 2.7vw, 40px);
}

.step b {
  font-size: 16px;
}

.step small {
  font-size: 14px;
}

.step span {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.step {
  grid-template-columns: 32px 1fr;
}

.panel {
  padding: 28px;
}

.panel-heading h2 {
  font-size: 20px;
}

.panel-heading p {
  font-size: 16px;
}

.section-icon {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.form-grid > label > span,
.review-note > span {
  font-size: 16px;
}

input,
select {
  height: 46px;
  font-size: 17px;
}

textarea {
  min-height: 94px;
  font-size: 17px;
}

.choice,
.segment-control button,
.check-grid label {
  font-size: 16px;
}

.choice {
  padding: 10px 14px;
}

.segment-control button {
  min-height: 39px;
}

.check-grid label {
  min-height: 44px;
}

.upload-box {
  min-height: 122px;
}

.upload-box strong {
  font-size: 16px;
}

.upload-box small,
.form-actions > span {
  font-size: 15px;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 44px;
  font-size: 16px;
}

.result-kicker,
.result-main small,
.confidence span,
.tag {
  font-size: 15px;
}

.result-main p {
  font-size: 17px;
}

.confidence strong {
  font-size: 29px;
}

.summary-list dt,
.metric-row small,
.missing-box strong {
  font-size: 15px;
}

.summary-list dd {
  font-size: 16px;
}

.metric-row strong {
  font-size: 19px;
}

.missing-box ul {
  font-size: 15px;
}

.workflow-list b {
  font-size: 16px;
}

.workflow-list span,
.workflow-list li::before {
  font-size: 15px;
}

.stats-grid small,
.stats-grid em {
  font-size: 15px;
}

.stats-grid strong {
  font-size: 35px;
}

.task-main small,
.task-main p,
.progress-block span,
.row-action {
  font-size: 15px;
}

.task-main h3 {
  font-size: 18px;
}

.preview-toolbar,
.checklist small,
.decision-message {
  font-size: 15px;
}

.checklist b {
  font-size: 16px;
}

/* Direct workflow picker */

#requestView > .stepper,
#requestView > #requestForm {
  display: none;
}

#requestView {
  max-width: min(1480px, 100%);
}

.method-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.method-card {
  position: relative;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(255,255,255,.018), transparent 50%),
    var(--surface);
  text-align: left;
}

.method-card::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform .45s var(--ease), border-color .25s ease;
}

.method-card:hover {
  border-color: #484851;
  background-color: var(--surface-raised);
  transform: translateY(-5px);
}

.method-card:hover::after {
  border-color: var(--line-strong);
  transform: scale(1.18);
}

.method-card.primary-method {
  border-color: rgba(231, 255, 98, .28);
  background:
    radial-gradient(circle at 100% 0, rgba(231, 255, 98, .13), transparent 36%),
    linear-gradient(145deg, rgba(231, 255, 98, .055), transparent 58%),
    var(--surface);
}

.method-card.primary-method:hover {
  border-color: rgba(231, 255, 98, .58);
  box-shadow: 0 22px 60px rgba(0,0,0,.28);
}

.method-number {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 16px;
}

.method-status {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #0c0c0f;
  background: var(--accent);
  font-family: Consolas, monospace;
  font-size: 13px;
  letter-spacing: .08em;
}

.method-status.muted {
  color: var(--muted);
  background: var(--surface-soft);
}

.method-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 35px 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-soft);
  background: #0e0e12;
  font-size: 23px;
}

.primary-method .method-icon {
  border-color: rgba(231, 255, 98, .32);
  color: var(--accent);
  box-shadow: 0 0 32px rgba(231, 255, 98, .09);
}

.method-card > strong {
  max-width: 250px;
  font-size: 25px;
  font-weight: 540;
  letter-spacing: -.035em;
}

.method-card > p {
  max-width: 330px;
  margin: 12px 0 20px;
  color: #8e8992;
  font-size: 16px;
  line-height: 1.65;
}

.method-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.method-meta b {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.method-action {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 20px;
}

.primary-method .method-action {
  color: var(--accent);
}

.method-action i {
  font-style: normal;
  transition: transform .2s ease;
}

.method-card:hover .method-action i {
  transform: translateX(4px);
}

.method-notice {
  min-height: 42px;
  display: none;
  align-items: center;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: var(--surface);
  font-size: 16px;
}

.method-notice.show {
  display: flex;
  animation: message-in .3s var(--ease);
}

/* AI suite generation canvas */

.main.canvas-mode {
  padding-right: 22px;
  padding-left: 22px;
}

.main.canvas-mode .topbar {
  display: none;
}

.canvas-view {
  max-width: 1540px;
  padding-top: 15px;
}

.suite-page-head {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 13px;
  padding: 0 4px;
}

.back-link {
  justify-self: start;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

.suite-page-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.suite-page-head > div strong {
  font-size: 18px;
  font-weight: 540;
}

.suite-page-head > div small {
  color: var(--muted);
  font-size: 14px;
}

.suite-page-head > .secondary-button {
  justify-self: end;
  min-height: 34px;
}

.creator-shell {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 232px minmax(480px, 1fr) 270px;
  gap: 12px;
}

.brief-inspector,
.canvas-workspace,
.ai-assistant {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: rgba(19, 19, 24, .96);
}

.brief-inspector,
.ai-assistant {
  display: flex;
  flex-direction: column;
}

.inspector-title,
.assistant-head {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.inspector-title > span,
.assistant-head > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  color: var(--accent);
  background: #0d0d10;
  font-family: Consolas, monospace;
  font-size: 13px;
}

.inspector-title > div,
.assistant-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inspector-title strong,
.assistant-head strong {
  font-size: 16px;
  font-weight: 520;
}

.inspector-title small,
.assistant-head small {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: .08em;
}

.inspector-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
}

.suite-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.suite-field > span,
.suite-field legend {
  color: #9b969f;
  font-size: 14px;
}

.suite-field input,
.suite-field select {
  height: 38px;
  padding: 0 10px;
  font-size: 15px;
}

.suite-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.suite-type-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.suite-type-list label,
.constraint-stack label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #24242b;
  border-radius: var(--control-radius);
  color: var(--muted);
  background: #101014;
  font-size: 14px;
}

.suite-type-list label:has(input:checked),
.constraint-stack label:has(input:checked) {
  border-color: rgba(231, 255, 98, .22);
  color: var(--text-soft);
  background: var(--accent-soft);
}

.suite-type-list input,
.constraint-stack input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent);
}

.constraint-stack {
  display: grid;
  gap: 6px;
}

.mini-upload {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #35353d;
  border-radius: var(--control-radius);
  background: #0f0f13;
  cursor: pointer;
}

.mini-upload:hover {
  border-color: rgba(231, 255, 98, .5);
  background: #121217;
}

.mini-upload input {
  display: none;
}

.mini-upload > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 17px;
}

.mini-upload > .upload-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-upload strong {
  font-size: 14px;
  font-weight: 500;
}

.mini-upload small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-workspace {
  display: grid;
  grid-template-rows: 52px minmax(420px, 1fr) auto;
  background: #0c0c0f;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #121217;
}

.canvas-toolbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.canvas-toolbar strong {
  font-size: 15px;
  font-weight: 500;
}

.canvas-toolbar small {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.canvas-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(231,255,98,.5);
}

.canvas-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.canvas-tools button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-soft);
  background: #0e0e12;
  font-size: 16px;
}

.canvas-tools span {
  min-width: 38px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.canvas-tools i {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--line);
}

.artboard-canvas {
  position: relative;
  min-height: 0;
  padding: 26px;
  overflow: auto;
  background:
    radial-gradient(circle, rgba(255,255,255,.075) 1px, transparent 1px),
    #0a0a0d;
  background-size: 20px 20px;
}

.canvas-empty,
.canvas-loading {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-orbit {
  position: relative;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid #2e2e35;
  border-radius: 50%;
}

.empty-orbit::before,
.empty-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid #232329;
  border-radius: 50%;
}

.empty-orbit::before {
  width: 76px;
  height: 76px;
}

.empty-orbit::after {
  width: 140px;
  height: 140px;
}

.empty-orbit i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 34px rgba(231,255,98,.28);
}

.canvas-empty strong,
.canvas-loading strong {
  font-size: 20px;
  font-weight: 520;
}

.canvas-empty p,
.canvas-loading p {
  max-width: 380px;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.canvas-empty small {
  color: #4f4c54;
  font-size: 13px;
}

.canvas-loading > span {
  display: flex;
  gap: 7px;
  margin-bottom: 20px;
}

.canvas-loading > span i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: loading-dot .9s ease-in-out infinite alternate;
}

.canvas-loading > span i:nth-child(2) {
  animation-delay: .18s;
}

.canvas-loading > span i:nth-child(3) {
  animation-delay: .36s;
}

@keyframes loading-dot {
  to {
    opacity: .2;
    transform: translateY(-8px);
  }
}

.suite-artboards {
  display: grid;
  grid-template-columns: repeat(3, minmax(145px, 1fr));
  gap: 22px;
  align-content: start;
  min-width: 510px;
}

.suite-artboard {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 4px;
  color: #fff;
  background: #23232a;
  box-shadow: 0 12px 28px rgba(0,0,0,.26);
  text-align: left;
}

.suite-artboard.generation-slot {
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
}

.suite-artboard.generation-slot .generated-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suite-artboard.generation-slot[data-slot-status="queued"]::before,
.suite-artboard.generation-slot[data-slot-status="running"]::before,
.suite-artboard.generation-slot[data-slot-status="submitting"]::before,
.suite-artboard.generation-slot[data-slot-status="polling"]::before,
.suite-artboard.generation-slot[data-slot-status="waiting_recovery"]::before,
.suite-artboard.generation-slot[data-slot-status="saving"]::before,
.suite-artboard.generation-slot[data-slot-status="verifying"]::before,
.suite-artboard.generation-slot[data-slot-status="failed"]::before {
  content: attr(data-slot-label);
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #536680;
  font-size: 12px;
  font-weight: 700;
  background: rgba(242, 246, 255, .86);
  backdrop-filter: blur(8px);
}

.suite-artboard.generation-slot[data-slot-status="failed"]::before {
  color: #b34d55;
  background: rgba(255, 239, 241, .9);
}

.suite-fidelity-badge {
  position: absolute;
  z-index: 7;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #94661a;
  background: rgba(255, 247, 222, .94);
  box-shadow: 0 4px 14px rgba(94, 66, 14, .12);
  font-size: 11px;
  font-weight: 800;
}

.fidelity-review-action {
  position: absolute;
  z-index: 8;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 102, 26, .24);
  border-radius: 8px;
  color: #7d5714;
  background: rgba(255, 250, 235, .96);
  font-weight: 800;
  cursor: pointer;
}

.generated-delete-action {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 8;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  background: rgba(32, 38, 55, .72);
  color: #fff;
  font-size: 20px;
  line-height: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s ease, background .16s ease;
}

.suite-artboard:hover .generated-delete-action,
.generated-delete-action:focus-visible {
  opacity: 1;
}

.generated-delete-action:hover {
  background: #b42318;
}

.fidelity-retry-action {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  min-width: max-content;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #c85861;
  font-weight: 700;
  cursor: pointer;
}

.generated-preview-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.generated-preview-action {
  position: absolute;
  z-index: 5;
  left: 10px;
  bottom: 10px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,.54);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.suite-artboard.has-generated-preview .mock-product,
.suite-artboard.has-generated-preview .mock-copy,
.suite-artboard.missing-generated-preview .mock-product,
.suite-artboard.missing-generated-preview .mock-copy,
.single-generated-art.has-generated-preview .single-art-label,
.single-generated-art.has-generated-preview .single-art-product,
.single-generated-art.has-generated-preview .single-art-points,
.single-generated-art.has-generated-preview .single-art-caption {
  display: none;
}

.generated-missing {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.72);
  background: rgba(20,20,24,.72);
  font-size: 13px;
}

.suite-artboard:hover {
  border-color: rgba(255,255,255,.42);
  transform: translateY(-3px);
}

.suite-artboard.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(231,255,98,.11),
    0 18px 36px rgba(0,0,0,.32);
}

.slot-select {
  position: absolute;
  z-index: 12;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 50%;
  color: #34456d;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 12px rgba(14, 24, 48, .18);
  font-weight: 800;
  opacity: 0;
  transform: scale(.86);
}

.suite-artboard:hover .slot-select,
.slot-select[aria-pressed="true"] { opacity: 1; transform: scale(1); }

.slot-select[aria-pressed="true"] { color: #fff; border-color: #5d7edc; background: #5d7edc; }

.image-lightbox-dialog img { transition: transform .16s ease; cursor: zoom-in; }

.suite-artboard.revised {
  filter: saturate(.82) brightness(1.08);
}

.suite-artboard.revised::after {
  content: "已修改";
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  border-radius: 999px;
  color: #0b0b0d;
  background: var(--accent);
  font-size: 12px;
}

.artboard-a {
  background:
    radial-gradient(circle at 72% 20%, #dca9a4, transparent 27%),
    linear-gradient(145deg, #662f39, #b45e64 58%, #e0a49b);
}

.artboard-b {
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.48), transparent 22%),
    linear-gradient(135deg, #c9a69e, #f1d8cb 55%, #96605f);
}

.artboard-c {
  background:
    linear-gradient(25deg, transparent 55%, rgba(239,213,191,.56) 56%, transparent 72%),
    linear-gradient(145deg, #312025, #945e61 56%, #d5a38f);
}

.artboard-d {
  background:
    radial-gradient(circle at 75% 72%, rgba(248,207,187,.55), transparent 23%),
    linear-gradient(155deg, #ead0c5, #b67575 58%, #542c34);
}

.artboard-e {
  background:
    repeating-linear-gradient(120deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px),
    linear-gradient(145deg, #9d6869, #3a2228);
}

.artboard-f {
  background:
    radial-gradient(circle at 48% 45%, #d9a29b, transparent 28%),
    linear-gradient(145deg, #4d2830, #9a4d57);
}

.artboard-order,
.artboard-version {
  position: absolute;
  z-index: 3;
  top: 9px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.artboard-order {
  left: 9px;
  color: rgba(255,255,255,.8);
}

.artboard-version {
  right: 9px;
  padding: 3px 5px;
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  background: rgba(0,0,0,.2);
}

.mock-product {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 15%;
  width: 24%;
  height: 55%;
  border-radius: 3px 3px 12px 12px;
  background: linear-gradient(90deg, #5b1824, #b14a59 48%, #521520);
  box-shadow: 12px 14px 20px rgba(43,9,16,.28);
  transform: translateX(-50%) rotate(-5deg);
}

.mock-product i {
  position: absolute;
  top: -18%;
  left: 8%;
  width: 84%;
  height: 22%;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(90deg, #171419, #51444b, #151216);
}

.mock-product b {
  position: absolute;
  top: 48%;
  left: -3%;
  color: #f3cec6;
  font-family: Consolas, monospace;
  font-size: clamp(10px, .6vw, 13px);
  font-weight: 500;
  letter-spacing: .12em;
  transform: rotate(90deg);
}

.mock-copy {
  position: absolute;
  z-index: 2;
  right: 8%;
  bottom: 8%;
  color: rgba(255,255,255,.7);
  font-size: clamp(12px, .8vw, 16px);
  line-height: .9;
  text-align: right;
  letter-spacing: -.03em;
}

.mock-copy b {
  color: #fff;
  font-size: 1.35em;
}

.selection-mark {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0c0c0f;
  background: var(--accent);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.7);
}

.suite-artboard.selected .selection-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.canvas-prompt {
  padding: 13px;
  border-top: 1px solid var(--line);
  background: #121217;
}

.prompt-context {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.prompt-context > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 16px;
}

.prompt-context > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prompt-context strong {
  font-size: 15px;
  font-weight: 520;
}

.prompt-context small {
  color: var(--muted);
  font-size: 12px;
}

#suitePrompt {
  min-height: 76px;
  padding: 11px 12px;
  font-size: 15px;
  line-height: 1.6;
}

.prompt-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.prompt-send-row > span {
  color: #57535c;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.prompt-send-row .primary-button {
  min-height: 36px;
  font-size: 14px;
}

.assistant-head > span {
  border-radius: 50%;
  color: #0b0b0d;
  background: var(--accent);
}

.assistant-thread {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.assistant-message {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.assistant-message > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0b0b0d;
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.assistant-message strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 520;
}

.assistant-message p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Generation status uses the same rounded inner surface as the controls below it. */
.assistant-message.assistant-status-card {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.assistant-message.assistant-status-card > span {
  width: 30px;
  height: 30px;
}

.assistant-message.assistant-status-card strong {
  margin: 1px 0 5px;
  line-height: 1.35;
}

.assistant-message.assistant-status-card p {
  line-height: 1.55;
}

.generation-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 15px 0;
}

.generation-summary > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.generation-summary > div {
  padding: 10px;
  border: 1px solid #25252c;
  border-radius: var(--control-radius);
  background: #101014;
}

.generation-summary strong {
  display: block;
  font-size: 21px;
  font-weight: 520;
}

.generation-summary small {
  color: var(--muted);
  font-size: 12px;
}

.revision-panel {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

.selected-artboard-info {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid #25252c;
  border-radius: var(--control-radius);
  background: #101014;
}

#selectedPreview {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  color: var(--muted);
  background: #23232a;
  font-family: Consolas, monospace;
  font-size: 14px;
}

.selected-artboard-info > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.selected-artboard-info strong {
  font-size: 14px;
  font-weight: 500;
}

.selected-artboard-info small {
  color: var(--muted);
  font-size: 12px;
}

.revision-panel > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.revision-panel > label > span {
  color: #99949d;
  font-size: 13px;
}

#revisionPrompt {
  min-height: 92px;
  padding: 10px;
  font-size: 14px;
}

#revisionPrompt:disabled,
#applyRevision:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.revision-panel .primary-button {
  width: 100%;
  min-height: 38px;
  font-size: 14px;
}

.assistant-actions {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.assistant-actions > span {
  margin-bottom: 2px;
  color: var(--text-soft);
  font-size: 14px;
}

.assistant-actions button {
  width: 100%;
  min-height: 36px;
  font-size: 13px;
}

.confirm-button {
  border: 1px solid rgba(99, 213, 178, .26);
  border-radius: var(--control-radius);
  color: var(--mint);
  background: var(--mint-soft);
}

.confirm-button:hover {
  border-color: var(--mint);
  transform: translateY(-1px);
}

.suite-feedback {
  display: none;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(99, 213, 178, .18);
  border-radius: var(--control-radius);
  color: var(--mint);
  background: var(--mint-soft);
  font-size: 13px;
  line-height: 1.5;
}

.suite-feedback.show {
  display: block;
  animation: message-in .3s var(--ease);
}

/* Single-image reference workflow */

.method-card[data-method="single"] {
  background:
    radial-gradient(circle at 100% 0, rgba(163, 148, 255, .1), transparent 34%),
    var(--surface);
}

.method-card[data-method="single"]:hover {
  border-color: rgba(163, 148, 255, .46);
}

.single-process-strip {
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.single-process-strip > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 8px;
  align-items: center;
  color: var(--text-soft);
  font-size: 14px;
}

.single-process-strip > span b {
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
}

.single-process-strip > span small {
  color: var(--muted);
  font-size: 12px;
}

.single-process-strip > span.active b {
  border-color: var(--violet);
  color: #0b0b0e;
  background: var(--violet);
  box-shadow: 0 0 18px rgba(163,148,255,.18);
}

.single-process-strip > i {
  color: #4d4a52;
  font-style: normal;
}

.reference-required {
  border-color: rgba(163, 148, 255, .36);
  background: var(--violet-soft);
}

.reference-required > span {
  color: var(--violet);
  background: var(--violet-soft);
}

.process-note {
  padding: 12px;
  border: 1px solid rgba(163, 148, 255, .18);
  border-radius: var(--control-radius);
  background: var(--violet-soft);
}

.process-note span {
  color: var(--violet);
  font-size: 12px;
}

.process-note strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
  font-weight: 520;
}

.process-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.single-workspace {
  grid-template-rows: 52px minmax(470px, 1fr) auto;
}

.single-canvas-area {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(180px, .42fr) minmax(280px, .58fr);
  gap: 28px;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px),
    #0a0a0d;
  background-size: 20px 20px;
}

.reference-frame,
.output-frame {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.frame-label {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.frame-label b {
  color: var(--text-soft);
  font-weight: 500;
}

.reference-visual {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px dashed #3a3a43;
  border-radius: 4px;
  color: var(--muted);
  background:
    linear-gradient(30deg, rgba(163,148,255,.08), transparent 45%),
    #141419;
}

.reference-visual.has-file {
  border-style: solid;
  border-color: rgba(163,148,255,.4);
  background:
    radial-gradient(circle at 32% 25%, rgba(255,255,255,.18), transparent 20%),
    linear-gradient(145deg, #b7a8ad, #80636d 53%, #34252d);
}

.reference-visual > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 18px;
}

.reference-visual strong {
  font-size: 15px;
  font-weight: 500;
}

.reference-visual small {
  max-width: 150px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.reference-tags span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
}

.output-frame {
  min-width: 320px;
}

.single-output-empty,
.single-generated-art,
.output-frame > .canvas-loading {
  min-height: 0;
  flex: 1;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
}

.single-output-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  border: 1px solid #2d2d34;
  color: var(--muted);
  background: #101014;
  text-align: center;
}

.single-output-empty > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border: 1px solid rgba(163,148,255,.28);
  border-radius: 50%;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 25px;
}

.single-output-empty strong {
  color: var(--text-soft);
  font-size: 18px;
  font-weight: 520;
}

.single-output-empty p {
  max-width: 300px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.output-frame > .canvas-loading {
  border: 1px solid #2d2d34;
  background: #101014;
}

.single-generated-art {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 75% 26%, rgba(255,239,231,.72), transparent 22%),
    linear-gradient(135deg, #e0c0b7, #bd7e83 48%, #5f303b);
  box-shadow: 0 20px 44px rgba(0,0,0,.28);
  animation: art-reveal .5s var(--ease) both;
}

.single-generated-art .generated-preview-image {
  z-index: 1;
  object-fit: contain;
}

@keyframes art-reveal {
  from {
    opacity: 0;
    transform: scale(.97);
  }
}

.single-generated-art.revised {
  background:
    radial-gradient(circle at 75% 26%, rgba(255,250,244,.86), transparent 24%),
    linear-gradient(135deg, #f0dcd3, #d19ca2 50%, #7b4450);
}

.single-art-label {
  position: absolute;
  top: 12%;
  left: 9%;
  z-index: 2;
  color: rgba(83,39,48,.78);
  font-size: clamp(19px, 2vw, 36px);
  font-weight: 560;
  line-height: .9;
  letter-spacing: -.05em;
}

.single-art-label b {
  color: #fff7f2;
  font-size: 1.14em;
}

.single-art-product {
  position: absolute;
  right: 15%;
  bottom: 14%;
  width: 22%;
  height: 53%;
  border-radius: 4px 4px 14px 14px;
  background: linear-gradient(90deg, #561621, #b84758 48%, #4f131d);
  box-shadow: 18px 20px 28px rgba(58,15,25,.28);
  transform: rotate(-5deg);
}

.single-art-product i {
  position: absolute;
  top: -16%;
  left: 7%;
  width: 86%;
  height: 20%;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(90deg, #171419, #51444b, #151216);
}

.single-art-product b {
  position: absolute;
  top: 46%;
  left: 5%;
  color: #f1c9c1;
  font-family: Consolas, monospace;
  font-size: clamp(11px, .7vw, 15px);
  font-weight: 500;
  letter-spacing: .15em;
  transform: rotate(90deg);
}

.single-art-points {
  position: absolute;
  bottom: 12%;
  left: 9%;
  display: flex;
  gap: 7px;
}

.single-art-points i {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.single-art-caption {
  position: absolute;
  bottom: 6%;
  left: 9%;
  color: rgba(255,255,255,.76);
  font-family: Consolas, monospace;
  font-size: clamp(10px, .65vw, 14px);
  letter-spacing: .08em;
}

.single-revision-badge {
  position: absolute;
  top: 11px;
  right: 11px;
  display: none;
  padding: 5px 8px;
  border-radius: 999px;
  color: #0b0b0e;
  background: var(--accent);
  font-size: 12px;
}

.single-generated-art.revised .single-revision-badge {
  display: block;
}

.single-assistant-thread {
  display: block;
}

.single-result-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 15px 0;
}

.single-result-meta span {
  padding: 9px 7px;
  border: 1px solid #25252c;
  border-radius: var(--control-radius);
  background: #101014;
}

.single-result-meta b,
.single-result-meta small {
  display: block;
}

.single-result-meta b {
  font-size: 16px;
  font-weight: 520;
}

.single-result-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.single-revision-box {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.single-revision-box > span {
  color: var(--text-soft);
  font-size: 13px;
}

.revision-targets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.revision-targets button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: #101014;
  font-size: 12px;
}

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

.revision-targets button.active {
  border-color: rgba(163,148,255,.42);
  color: #c5bdff;
  background: var(--violet-soft);
}

#singleRevisionPrompt {
  min-height: 100px;
  padding: 10px;
  font-size: 14px;
}

#singleRevisionPrompt:disabled,
#applySingleRevision:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.single-revision-box .primary-button {
  width: 100%;
  min-height: 38px;
  font-size: 14px;
}

/* Generation history */

.history-view {
  max-width: 1260px;
}

.history-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 25px 5px 35px;
  border-bottom: 1px solid var(--line);
}

.history-hero h2 {
  margin: 0;
  font-size: clamp(46px, 5vw, 70px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -.062em;
}

.history-hero h2 em {
  color: var(--accent);
  font-style: normal;
}

.history-hero p {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.history-counter {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(231,255,98,.1), transparent 58%),
    #101014;
}

.history-counter strong {
  color: var(--accent);
  font-size: 55px;
  font-weight: 500;
  letter-spacing: -.06em;
}

.history-counter span {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .1em;
  text-align: center;
}

.history-toolbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

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

.history-filters button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 14px;
}

.history-filters button.active {
  border-color: var(--accent);
  color: #0b0b0e;
  background: var(--accent);
}

.history-toolbar > span {
  color: var(--muted);
  font-size: 13px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.history-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.history-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.history-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(145deg, #63303a, #c37a7e);
}

.history-thumb.single {
  background:
    radial-gradient(circle at 75% 26%, rgba(255,239,231,.72), transparent 22%),
    linear-gradient(135deg, #e0c0b7, #bd7e83 48%, #5f303b);
}

.history-thumb.artboard-b {
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.48), transparent 22%),
    linear-gradient(135deg, #c9a69e, #f1d8cb 55%, #96605f);
}

.history-thumb.artboard-c {
  background: linear-gradient(145deg, #312025, #945e61 56%, #d5a38f);
}

.history-thumb.artboard-d {
  background: linear-gradient(155deg, #ead0c5, #b67575 58%, #542c34);
}

.history-thumb.artboard-e {
  background: linear-gradient(145deg, #9d6869, #3a2228);
}

.history-thumb.artboard-f {
  background: linear-gradient(145deg, #4d2830, #9a4d57);
}

.history-thumb::before {
  content: "";
  position: absolute;
  right: 24%;
  bottom: 14%;
  width: 18%;
  height: 52%;
  border-radius: 3px 3px 9px 9px;
  background: linear-gradient(90deg, #541520, #ad4353 50%, #4a121b);
  box-shadow: 10px 12px 18px rgba(40,8,15,.24);
  transform: rotate(-5deg);
}

.history-thumb::after {
  content: "FRAME";
  position: absolute;
  bottom: 10%;
  left: 8%;
  color: rgba(255,255,255,.7);
  font-family: Consolas, monospace;
  font-size: 13px;
  letter-spacing: .14em;
}

.history-thumb.remote {
  background: #f5f7f8;
}

.history-thumb.remote img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.history-thumb.remote::before,
.history-thumb.remote::after {
  content: none;
}

.history-version {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 999px;
  color: #0b0b0e;
  background: var(--accent);
  font-size: 12px;
}

.history-card-body {
  padding: 13px;
}

.history-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.history-card-meta span {
  color: var(--violet);
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: .08em;
}

.history-card-meta time {
  color: var(--muted);
  font-size: 12px;
}

.history-card h3 {
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card p {
  min-height: 34px;
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-card button {
  width: 100%;
  min-height: 33px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: #101014;
  font-size: 13px;
}

.history-card button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.history-empty {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--line-strong);
  border-radius: var(--card-radius);
  background: rgba(19,19,24,.7);
  text-align: center;
}

.history-empty > span {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 35px;
}

.history-empty strong {
  font-size: 20px;
  font-weight: 520;
}

.history-empty p {
  max-width: 430px;
  margin: 9px 0 19px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Simplified visual hierarchy */

.workspace-card,
.sidebar-tip,
.icon-button,
.nav-badge,
.method-icon,
.process-note,
.stat-icon,
.task-thumb {
  display: none;
}

.nav-list {
  margin-top: 28px;
}

.nav-item {
  gap: 0;
  padding-right: 15px;
  padding-left: 15px;
}

.nav-item > span {
  display: none;
}

.user-card {
  margin-top: auto;
}

.method-card {
  min-height: 390px;
  padding: 34px;
}

.method-card > strong {
  margin-top: 88px;
  font-size: 34px;
}

.method-card > p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.7;
}

.single-process-strip {
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 12px 18px;
}

.single-process-strip > i {
  display: none;
}

.single-process-strip > span {
  font-size: 15px;
}

.single-process-strip > span small {
  font-size: 13px;
}

.canvas-tools button,
.canvas-tools i {
  display: none;
}

.canvas-tools span {
  min-width: auto;
  font-size: 13px;
}

.frame-label span {
  display: none;
}

.frame-label b {
  color: var(--text);
  font-size: 16px;
}

.reference-visual {
  position: relative;
  border-width: 2px;
  border-color: #4a4852;
  color: var(--text-soft);
  cursor: pointer;
}

.reference-visual:hover {
  border-color: var(--violet);
  background-color: #181820;
}

.reference-visual input {
  display: none;
}

.reference-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0d11;
}

.reference-visual.has-file > span {
  display: none;
}

.reference-visual.has-file > strong,
.reference-visual.has-file > small {
  position: relative;
  z-index: 2;
  max-width: 82%;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(8, 8, 10, .78);
  backdrop-filter: blur(8px);
}

.reference-visual strong {
  font-size: 19px;
}

.reference-visual small {
  max-width: 220px;
  color: var(--muted);
  font-size: 14px;
}

.assistant-message {
  display: block;
}

.assistant-message > span {
  display: none;
}

.assistant-message strong {
  font-size: 17px;
}

.assistant-message p {
  color: var(--muted);
  font-size: 15px;
}

.suite-page-head > div strong,
.canvas-toolbar strong,
.prompt-context strong {
  font-size: 17px;
}

.canvas-toolbar small,
.prompt-context small,
.inspector-title small,
.assistant-head small {
  color: var(--muted);
}

.suite-type-list label,
.constraint-stack label {
  border-color: transparent;
  background: #17171d;
}

.suite-type-list label:has(input:checked),
.constraint-stack label:has(input:checked) {
  border-color: transparent;
  box-shadow: inset 3px 0 0 var(--accent);
}

.stats-grid article {
  min-height: 100px;
  padding: 20px;
}

.task-row {
  grid-template-columns: minmax(280px, 1fr) 190px 110px;
}

.task-row:hover {
  padding-left: 4px;
  padding-right: 4px;
}

.topbar h1,
.history-hero h2,
.hero-copy h2 {
  text-wrap: balance;
}

/* Large readable workspace pass */

.topbar {
  display: none;
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.main {
  padding-top: 0;
  padding-right: clamp(28px, 3vw, 64px);
  padding-left: clamp(28px, 3vw, 64px);
}

.view {
  max-width: min(1720px, 100%);
  padding-top: clamp(18px, 2vw, 30px);
}

#requestView {
  max-width: min(1760px, 100%);
}

.studio-hero {
  min-height: clamp(320px, 34vh, 430px);
  grid-template-columns: minmax(0, 1fr) 260px;
  margin-bottom: 38px;
  padding: 34px 0 48px;
}

.hero-copy h2 {
  max-width: 980px;
  font-size: clamp(60px, 5.8vw, 96px);
  line-height: .98;
}

.hero-signal {
  width: 250px;
  height: 250px;
}

.hero-signal i {
  width: 68px;
  height: 68px;
  border-radius: 18px;
}

.method-picker {
  gap: clamp(24px, 2vw, 36px);
  margin-top: 34px;
}

.method-card {
  min-height: clamp(500px, 47vh, 620px);
  padding: clamp(36px, 2.4vw, 48px);
}

.method-card::after {
  right: -64px;
  bottom: -64px;
  width: 190px;
  height: 190px;
}

.method-number {
  font-size: 20px;
}

.method-status {
  top: 30px;
  right: 30px;
  padding: 8px 13px;
  font-size: 16px;
}

.method-card > strong {
  max-width: 420px;
  margin-top: clamp(104px, 9vh, 148px);
  font-size: clamp(42px, 3.3vw, 60px);
  line-height: 1.12;
}

.method-card > p {
  display: none;
}

.method-meta b {
  padding: 9px 15px;
  font-size: 19px;
}

.method-action {
  margin-top: 28px;
  padding-top: 22px;
  font-size: 24px;
}

.canvas-view {
  max-width: min(1880px, 100%);
}

.main.canvas-mode {
  padding-right: clamp(18px, 1.6vw, 32px);
  padding-left: clamp(18px, 1.6vw, 32px);
}

.suite-page-head {
  min-height: 72px;
  margin-bottom: 16px;
}

.back-link,
.suite-page-head > div strong {
  font-size: 20px;
}

.suite-page-head > div small {
  font-size: 16px;
}

.creator-shell {
  min-height: calc(100vh - 98px);
  grid-template-columns: minmax(300px, 17vw) minmax(720px, 1fr) minmax(340px, 19vw);
  gap: 18px;
}

.inspector-title,
.assistant-head {
  min-height: 76px;
  padding: 0 22px;
}

.inspector-title > span,
.assistant-head > span {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.inspector-title strong,
.assistant-head strong {
  font-size: 21px;
}

.inspector-title small,
.assistant-head small {
  font-size: 14px;
}

.inspector-scroll,
.assistant-thread {
  padding: 22px;
}

.suite-field > span,
.suite-field legend {
  font-size: 17px;
}

.suite-field input,
.suite-field select {
  height: 52px;
  padding: 0 14px;
  font-size: 18px;
}

.suite-type-list,
.constraint-stack {
  gap: 10px;
}

.suite-type-list label,
.constraint-stack label {
  min-height: 46px;
  padding: 0 13px;
  font-size: 17px;
}

.suite-type-list input,
.constraint-stack input {
  width: 17px;
  height: 17px;
}

.mini-upload {
  min-height: 82px;
  gap: 14px;
  padding: 14px;
}

.mini-upload > span {
  width: 38px;
  height: 38px;
  font-size: 22px;
}

.mini-upload strong {
  font-size: 18px;
}

.mini-upload small {
  font-size: 15px;
}

.canvas-workspace {
  grid-template-rows: 66px minmax(560px, 1fr) auto;
}

.canvas-toolbar {
  padding: 0 22px;
}

.canvas-toolbar strong,
.prompt-context strong {
  font-size: 20px;
}

.canvas-toolbar small,
.prompt-context small {
  font-size: 16px;
}

.canvas-tools span {
  font-size: 16px;
}

.artboard-canvas {
  padding: clamp(30px, 2.2vw, 44px);
}

.empty-orbit {
  width: 140px;
  height: 140px;
}

.empty-orbit::before {
  width: 96px;
  height: 96px;
}

.empty-orbit::after {
  width: 178px;
  height: 178px;
}

.empty-orbit i {
  width: 34px;
  height: 34px;
}

.canvas-empty strong,
.canvas-loading strong {
  font-size: 28px;
}

.canvas-empty p,
.canvas-loading p {
  max-width: 620px;
  font-size: 20px;
}

.canvas-empty small {
  font-size: 17px;
}

.suite-artboards {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 30px;
  min-width: 760px;
}

.artboard-order,
.artboard-version {
  top: 13px;
  font-size: 15px;
}

.artboard-order {
  left: 13px;
}

.artboard-version {
  right: 13px;
  padding: 5px 8px;
}

.canvas-prompt {
  padding: 20px 22px;
}

.prompt-context {
  gap: 14px;
  margin-bottom: 14px;
}

.prompt-context > span {
  width: 38px;
  height: 38px;
  font-size: 21px;
}

#suitePrompt,
#singlePrompt {
  min-height: 124px;
  padding: 16px 18px;
  font-size: 19px;
  line-height: 1.75;
}

.single-facts-more {
  margin: 4px 0 12px;
  border: 1px solid rgba(115, 132, 178, .2);
  border-radius: 12px;
  padding: 10px;
}

.single-facts-more summary {
  cursor: pointer;
  font-weight: 700;
  color: #52617d;
}

.single-facts-more[open] summary { margin-bottom: 10px; }

.single-prompt-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.single-prompt-toolbar > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.single-prompt-toolbar strong {
  font-size: 17px;
}

.single-prompt-toolbar small {
  color: var(--muted);
  font-size: 13px;
}

.single-prompt-toolbar button {
  margin-left: auto;
  border: 1px solid rgba(96, 123, 214, .35);
  border-radius: 9px;
  padding: 7px 12px;
  background: rgba(239, 244, 255, .9);
  color: #4662bd;
  cursor: pointer;
}

.prompt-send-row {
  margin-top: 12px;
}

.prompt-send-row > span {
  font-size: 15px;
}

.prompt-send-row .primary-button {
  min-height: 48px;
  padding: 0 22px;
  font-size: 18px;
}

.assistant-message strong {
  font-size: 20px;
}

.assistant-message p {
  font-size: 18px;
}

.generation-summary > span,
.assistant-actions > span,
.suite-feedback,
.revision-panel > label > span,
.selected-artboard-info small {
  font-size: 16px;
}

.generation-summary strong {
  font-size: 28px;
}

.generation-summary small {
  font-size: 15px;
}

.selected-artboard-info strong,
.revision-panel .primary-button,
.assistant-actions button {
  font-size: 17px;
}

#revisionPrompt,
#singleRevisionPrompt {
  min-height: 120px;
  font-size: 17px;
}

#singleView .single-process-strip {
  display: none;
}

#singleView .suite-page-head {
  min-height: 58px;
  margin-bottom: 12px;
}

#singleView .suite-page-head > div small {
  display: none;
}

.single-creator-shell {
  grid-template-columns: minmax(260px, 15vw) minmax(0, 1fr);
}

.single-creator-shell.revision-open {
  grid-template-columns: minmax(250px, 14vw) minmax(0, 1fr) minmax(320px, 18vw);
}

.single-creator-shell > .ai-assistant {
  display: none;
}

.single-creator-shell.revision-open > .ai-assistant {
  display: flex;
}

.single-creator-shell .inspector-title {
  display: none;
}

.single-creator-shell .inspector-scroll {
  gap: 14px;
  padding: 18px;
}

.single-creator-shell .suite-field:has(#singleSellingPoint),
.single-creator-shell .suite-field:has(#singleAudience),
.single-creator-shell .process-note {
  display: none;
}

.single-creator-shell .suite-field-row {
  grid-template-columns: 1fr;
}

.single-creator-shell .mini-upload small {
  display: none;
}

.single-creator-shell .mini-upload {
  min-height: 64px;
}

.single-creator-shell .constraint-stack label {
  min-height: 42px;
}

.single-workspace {
  grid-template-rows: 58px minmax(620px, 1fr) auto;
}

.single-workspace .canvas-toolbar .canvas-tools,
.single-workspace .canvas-toolbar small {
  display: none;
}

.single-canvas-area {
  grid-template-columns: minmax(360px, .48fr) minmax(460px, .52fr);
  gap: clamp(28px, 2.6vw, 48px);
  padding: clamp(34px, 2.8vw, 56px);
}

.reference-visual,
.single-output-empty,
.single-generated-art,
.output-frame > .canvas-loading {
  min-height: 560px;
}

.reference-frame,
.output-frame {
  justify-content: center;
}

.frame-label {
  min-height: 36px;
  font-size: 16px;
}

.reference-visual strong,
.single-output-empty strong {
  font-size: 24px;
}

.reference-visual small,
.single-output-empty p {
  font-size: 17px;
}

#singleView .canvas-prompt {
  padding: 18px 22px 20px;
}

#singleView .prompt-send-row {
  justify-content: flex-end;
}

.sidebar-toggle {
  position: absolute;
  top: 28px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: var(--surface);
}

.sidebar-toggle span,
.sidebar-toggle span::before {
  display: block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.sidebar-toggle span::before {
  content: "";
  transform: rotate(90deg);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
  padding-right: 10px;
  padding-left: 10px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .brand > span:last-child,
.app-shell.sidebar-collapsed .theme-switch span,
.app-shell.sidebar-collapsed .theme-switch strong,
.app-shell.sidebar-collapsed .sidebar-tip,
.app-shell.sidebar-collapsed .user-card > span:nth-child(2),
.app-shell.sidebar-collapsed .user-card button {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  top: 74px;
  right: 23px;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-item > span {
  display: block;
  font-size: 18px;
}

.app-shell.sidebar-collapsed .theme-switch {
  justify-content: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .user-card {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.history-card {
  position: relative;
}

.history-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241, 64, 75, .24);
  border-radius: 50%;
  color: var(--danger);
  background: rgba(241, 64, 75, .08);
  font-size: 22px;
  line-height: 1;
}

.history-delete:hover {
  border-color: var(--danger);
  background: rgba(241, 64, 75, .16);
  transform: translateY(-1px);
}

#requestView .method-card > strong {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(32px, 2.35vw, 48px);
}

#singleView .single-canvas-area {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(560px, 1fr);
  align-items: stretch;
}

.single-materials-frame {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.single-material-pickers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.single-material-picker-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.single-material-picker {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: var(--surface-soft);
  text-align: left;
}

.single-material-picker:hover,
.single-material-picker:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.single-material-picker > span:first-child {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.single-material-picker > span:last-child,
.single-material-picker strong,
.single-material-picker small {
  min-width: 0;
  display: block;
}

.single-material-picker strong {
  color: var(--text);
  font-weight: 500;
}

.single-material-picker small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.single-material-picker-wrap:has(.single-material-selection-list:not(:empty)) {
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
}

.single-material-picker-wrap:has(.single-material-selection-list:not(:empty)) .single-material-picker {
  border: 0;
  border-radius: 0;
}

.single-material-selection-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42px;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 8px 8px;
  scrollbar-width: thin;
}

.single-material-selection-list:empty { display: none; }
.single-material-selection-list::-webkit-scrollbar { height: 5px; }
.single-material-selection-list::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(99, 127, 221, .5); }

.single-material-selection-item {
  position: relative;
  width: 42px;
  height: 42px;
}

.single-material-selection-item img {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
}

.single-material-selection-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 26, 40, .72);
}

.single-material-selection-remove:hover,
.single-material-selection-remove:focus-visible { background: var(--danger); }

.reference-thumb-stack {
  display: none;
}

.reference-visual.has-file .reference-thumb-stack {
  display: grid;
  gap: 14px;
  width: 100%;
}

.reference-thumb-stack img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
}

.reference-add-hint {
  width: 100%;
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 34px;
  font-weight: 500;
}

.upload-box.has-upload-preview,
.mini-upload.has-upload-preview,
.reference-visual.has-upload-preview {
  align-items: stretch;
  flex-wrap: wrap;
  padding: 14px;
}

.upload-box.has-upload-preview {
  min-height: 180px;
}

.mini-upload.has-upload-preview > span {
  flex: 0 0 auto;
}

.mini-upload.has-upload-preview > .upload-copy {
  flex: 1 1 150px;
}

.upload-preview-grid {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 10px;
  padding: 2px 0 7px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 127, 221, .5) transparent;
}

.upload-preview-grid::-webkit-scrollbar { height: 5px; }
.upload-preview-grid::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(99, 127, 221, .5); }

.reference-visual.has-upload-preview > span {
  display: none;
}

.reference-visual .upload-preview-grid {
  align-self: stretch;
}

.upload-preview-thumb,
.upload-add-thumb {
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
}

.upload-preview-thumb {
  position: relative;
  scroll-snap-align: start;
}

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

.upload-preview-thumb em {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(8, 8, 10, .72);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #fff;
  background: rgba(18,24,36,.72);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.upload-preview-remove:hover,
.upload-preview-remove:focus-visible {
  background: #d84f58;
}

.upload-add-thumb {
  min-height: 66px;
  display: grid;
  place-items: center;
  border-style: dashed;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 30px;
  font-weight: 500;
}

.upload-library-save {
  width: 100%;
  min-height: 34px;
  margin-top: 7px;
  border: 1px solid rgba(99, 127, 221, .24);
  border-radius: 9px;
  color: #4f69bd;
  background: rgba(238, 242, 255, .72);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.upload-library-save:hover:not(:disabled),
.upload-library-save:focus-visible {
  border-color: rgba(99, 127, 221, .48);
  background: rgba(224, 232, 255, .92);
}

.upload-library-save:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .58;
}

.upload-library-save.is-saved {
  color: #527d69;
  border-color: rgba(82, 125, 105, .24);
  background: rgba(224, 242, 233, .72);
  opacity: 1;
}

.upload-library-save.is-error {
  color: #b85258;
  border-color: rgba(184, 82, 88, .3);
  background: rgba(255, 232, 233, .78);
}

/* Sidebar collapse handle and creator form cleanup */

.brief-inspector .inspector-title {
  display: none;
}

.sidebar-toggle {
  top: 50%;
  right: -18px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.sidebar-toggle span {
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 1px;
  background: transparent;
  transform: translateX(2px) rotate(-45deg);
}

.sidebar-toggle span::before {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  top: 50%;
  right: -18px;
}

.app-shell.sidebar-collapsed .sidebar-toggle span {
  transform: translateX(-2px) rotate(135deg);
}

.history-card .history-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: auto;
  min-width: 58px;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(241, 64, 75, .38);
  border-radius: 999px;
  color: var(--danger);
  background: rgba(241, 64, 75, .1);
  font-size: 15px;
  font-weight: 600;
}

.history-card .history-delete:hover {
  border-color: var(--danger);
  color: #fff;
  background: var(--danger);
}

#historyView .micro-label,
#historyView .history-hero p {
  display: none;
}

#historyView .history-hero {
  min-height: clamp(320px, 34vh, 430px);
  padding: 34px 0 48px;
}

#historyView .history-hero h2 {
  max-width: 980px;
  font-size: clamp(60px, 5.8vw, 96px);
  line-height: .98;
}

/* Non-home readability and single-page fit */

body[data-view]:not([data-view="request"]) .main {
  font-size: 20px;
}

body[data-view]:not([data-view="request"]) .main :is(
  input,
  select,
  textarea,
  button,
  .suite-field > span,
  .suite-field legend,
  .canvas-toolbar strong,
  .canvas-toolbar small,
  .prompt-context strong,
  .prompt-context small,
  .assistant-message strong,
  .assistant-message p,
  .generation-summary > span,
  .selected-artboard-info strong,
  .selected-artboard-info small,
  .assistant-actions > span,
  .suite-feedback,
  .frame-label,
  .history-card h3,
  .history-card p,
  .history-card-meta,
  .task-main h3,
  .task-main p,
  .task-main small,
  .checklist b,
  .checklist small,
  .review-note > span,
  .preview-toolbar,
  .single-output-empty p,
  .reference-visual small
) {
  font-size: 18px;
}

body[data-view]:not([data-view="request"]) .main :is(
  .canvas-empty strong,
  .canvas-loading strong,
  .single-output-empty strong,
  .reference-visual strong,
  .panel-heading h2,
  .assistant-head strong,
  .inspector-title strong
) {
  font-size: 24px;
}

body[data-view]:not([data-view="request"]) .primary-button,
body[data-view]:not([data-view="request"]) .secondary-button,
body[data-view]:not([data-view="request"]) .danger-button,
body[data-view]:not([data-view="request"]) .confirm-button {
  min-height: 48px;
  font-size: 18px;
}

body[data-view="single"] {
  overflow-y: auto;
}

body[data-view="single"] .main {
  height: auto;
  overflow: visible;
  padding-bottom: 18px;
}

body[data-view="single"] #singleView {
  height: auto;
  padding-top: 14px;
  overflow: visible;
}

body[data-view="single"] #singleView .suite-page-head {
  min-height: 48px;
  margin-bottom: 10px;
}

body[data-view="single"] .single-creator-shell,
body[data-view="single"] .single-creator-shell.revision-open {
  height: calc(100vh - 40px);
  min-height: 680px;
  grid-template-columns: var(--creator-left-column) minmax(0, 1fr) var(--creator-right-column);
}

body[data-view="single"] .single-creator-shell > .ai-assistant {
  display: flex;
}

body[data-view="single"] .brief-inspector,
body[data-view="single"] .canvas-workspace,
body[data-view="single"] .ai-assistant {
  min-height: 0;
}

body[data-view="single"] .single-workspace {
  height: 100%;
  min-height: 0;
  grid-template-rows: 56px minmax(0, 1fr) auto;
}

body[data-view="single"] .single-canvas-area,
body[data-view="single"] #singleView .single-canvas-area {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px 14px;
  overflow: hidden;
}

body[data-view="single"] .single-materials-frame {
  gap: 8px;
}

body[data-view="single"] .single-material-picker {
  min-height: 66px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .single-material-pickers {
    grid-template-columns: 1fr;
  }
}

body[data-view="single"] .reference-visual,
body[data-view="single"] .single-output-empty,
body[data-view="single"] .single-generated-art,
body[data-view="single"] .output-frame > .canvas-loading,
body[data-view="single"] #singleView .reference-visual {
  min-height: 0;
  height: auto;
}

body[data-view="single"] .single-output-empty,
body[data-view="single"] .single-generated-art,
body[data-view="single"] .output-frame > .canvas-loading {
  min-height: 0;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

body[data-view="single"] .reference-visual,
body[data-view="single"] #singleView .reference-visual {
  min-height: 360px;
}

body[data-view="single"] .output-frame {
  min-height: 0;
  justify-content: stretch;
}

body[data-view="single"] #singleView .canvas-prompt {
  padding: 14px 18px 16px;
}

body[data-view="single"] #singlePrompt {
  min-height: 92px;
  max-height: 18vh;
}

body[data-view="single"] .ai-assistant {
  overflow: hidden;
}

body[data-view="single"] .ai-assistant .assistant-thread {
  overflow-y: auto;
}

/* Responsive */

@media (max-width: 1280px) {
  .creator-shell {
    grid-template-columns: 220px minmax(480px, 1fr);
  }

  .ai-assistant {
    grid-column: 1 / -1;
    min-height: 360px;
  }

  .assistant-thread {
    display: grid;
    grid-template-columns: 1.1fr .8fr .9fr;
    gap: 14px;
    align-items: start;
  }

  .assistant-message {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 0 14px 0 0;
  }

  .generation-summary,
  .revision-panel {
    margin-top: 0;
  }

  .assistant-actions {
    grid-column: 3;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .suite-feedback {
    grid-column: 1 / -1;
  }

  .history-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    padding: 25px 10px 18px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > span:last-child,
  .workspace-card > span:last-child,
  .sidebar-tip,
  .user-card > span:nth-child(2),
  .user-card button {
    display: none;
  }

  .workspace-card {
    justify-content: center;
    padding: 10px 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .nav-item::before {
    left: -10px;
  }

  .nav-item > span {
    display: block;
    font-size: 18px;
  }

  .nav-badge {
    display: none;
  }

  .user-card {
    justify-content: center;
  }

  .main {
    padding: 0 30px 60px;
  }

  .method-picker {
    grid-template-columns: 1fr 1fr;
  }

  .method-card.primary-method {
    grid-column: 1 / -1;
    min-height: 290px;
  }

  .single-process-strip {
    overflow-x: auto;
  }

  #requestForm {
    grid-template-columns: 1fr;
  }

  #requestForm > .panel:nth-of-type(3),
  #requestForm > .form-actions {
    grid-column: auto;
  }

  #requestForm > .panel:first-child .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  #requestForm > .panel:first-child .wide {
    grid-column: 1 / -1;
  }

  .prompt-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .prompt-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

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

  .brief-inspector,
  .canvas-workspace,
  .ai-assistant {
    grid-column: auto;
  }

  .brief-inspector {
    max-height: none;
  }

  .inspector-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .canvas-workspace {
    min-height: 760px;
  }

  .assistant-thread {
    grid-template-columns: 1fr 1fr;
  }

  .assistant-actions {
    grid-column: 1 / -1;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    height: 58px;
    flex-direction: row;
    align-items: center;
    padding: 9px 13px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    height: auto;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .workspace-card,
  .user-card {
    display: none;
  }

  .nav-list {
    display: flex;
    margin-left: auto;
  }

  .nav-item {
    width: 36px;
    min-height: 36px;
  }

  .nav-item::before {
    display: none;
  }

  .main {
    padding: 0 15px 42px;
  }

  .main.canvas-mode {
    padding: 0 10px 30px;
  }

  .topbar {
    height: 84px;
  }

  .status-pill {
    display: none;
  }

  .view {
    padding-top: 24px;
  }

  .studio-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 18px 0 30px;
  }

  .hero-copy h2 {
    font-size: clamp(40px, 11vw, 54px);
  }

  .hero-copy p {
    margin-top: 18px;
    font-size: 17px;
  }

  .hero-signal {
    display: none;
  }

  .method-picker {
    grid-template-columns: 1fr;
  }

  .method-card,
  .method-card.primary-method {
    min-height: 290px;
    grid-column: auto;
  }

  .suite-page-head {
    grid-template-columns: 1fr auto;
  }

  .suite-page-head > div {
    display: none;
  }

  .single-process-strip {
    display: flex;
    justify-content: flex-start;
    padding: 10px;
  }

  .single-process-strip > span {
    min-width: 150px;
  }

  .single-canvas-area {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .reference-frame {
    max-width: 280px;
  }

  .output-frame {
    min-width: 0;
  }

  .history-hero {
    min-height: 230px;
  }

  .history-counter {
    display: none;
  }

  .history-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .history-filters {
    max-width: 100%;
    overflow-x: auto;
  }

  .history-filters button {
    flex: 0 0 auto;
  }

  .inspector-scroll {
    grid-template-columns: 1fr;
  }

  .canvas-workspace {
    min-height: 720px;
  }

  .artboard-canvas {
    padding: 18px;
  }

  .suite-artboards {
    grid-template-columns: repeat(2, minmax(155px, 1fr));
    min-width: 340px;
    gap: 16px;
  }

  .canvas-tools > i,
  .canvas-tools button:last-child {
    display: none;
  }

  .assistant-thread {
    display: grid;
    grid-template-columns: 1fr;
  }

  .assistant-message {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 14px;
  }

  .assistant-actions,
  .suite-feedback {
    grid-column: auto;
  }

  .stepper {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 22px;
  }

  .stepper > i,
  .step small {
    display: none;
  }

  .step {
    grid-template-columns: 25px 1fr;
  }

  .step span {
    width: 25px;
    height: 25px;
  }

  .form-grid,
  #requestForm > .panel:first-child .form-grid,
  .result-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .wide,
  #requestForm > .panel:first-child .wide {
    grid-column: auto;
  }

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

  .panel {
    padding: 19px;
  }

  .result-main {
    align-items: flex-start;
    padding: 25px 20px;
  }

  .result-main > div:first-child {
    align-items: flex-start;
    gap: 14px;
  }

  .result-number {
    font-size: 45px;
  }

  .confidence {
    display: none;
  }

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

  .prompt-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #promptOutput {
    min-height: 440px;
    padding: 16px;
    font-size: 16px;
  }

  .prompt-feedback {
    flex-wrap: wrap;
  }

  .prompt-feedback > span,
  #promptStatus {
    width: 100%;
  }

  .prompt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .prompt-actions #promptStatus {
    grid-column: 1 / -1;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .progress-block,
  .row-action {
    grid-column: auto;
  }

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

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

  .mock-art {
    min-height: 420px;
  }
}

@media (max-width: 520px) {
  .history-grid {
    grid-template-columns: 1fr;
  }

  .history-hero h2 {
    font-size: 41px;
  }
}

@media (max-width: 1050px) {
  #requestView .method-card > strong {
    white-space: normal;
  }
}

/* Day color mode */

html[data-theme="day"] body {
  color: #252422;
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    #fffcf2;
}

html[data-theme="day"] .sidebar {
  border-color: var(--line);
  background: rgba(255, 252, 242, 0.96);
}

html[data-theme="day"] .brand {
  color: #252422;
}

html[data-theme="day"] .brand-mark,
html[data-theme="day"] .theme-switch,
html[data-theme="day"] .status-pill,
html[data-theme="day"] .workspace-card,
html[data-theme="day"] .user-card {
  border-color: var(--line);
  background: rgba(255, 252, 242, 0.84);
  box-shadow: none;
}

html[data-theme="day"] .brand-mark,
html[data-theme="day"] .theme-switch strong {
  color: #eb5e28;
}

html[data-theme="day"] .nav-item,
html[data-theme="day"] .nav-item > span,
html[data-theme="day"] .theme-switch,
html[data-theme="day"] .status-pill {
  color: #403d39;
}

html[data-theme="day"] .nav-item:hover,
html[data-theme="day"] .theme-switch:hover {
  color: #252422;
  background: rgba(204, 197, 185, 0.24);
}

html[data-theme="day"] .nav-item.active {
  color: #252422;
  background: rgba(235, 94, 40, 0.1);
}

html[data-theme="day"] .nav-item.active::before,
html[data-theme="day"] .status-pill i,
html[data-theme="day"] .canvas-dot,
html[data-theme="day"] .form-actions > span i {
  background: #eb5e28;
  box-shadow: none;
}

html[data-theme="day"] .panel,
html[data-theme="day"] .method-card,
html[data-theme="day"] .stats-grid article,
html[data-theme="day"] .prompt-studio,
html[data-theme="day"] .prompt-editor,
html[data-theme="day"] .brief-inspector,
html[data-theme="day"] .canvas-workspace,
html[data-theme="day"] .ai-assistant,
html[data-theme="day"] .single-process-strip,
html[data-theme="day"] .history-card,
html[data-theme="day"] .history-empty {
  border-color: var(--line);
  background: rgba(255, 252, 242, 0.82);
  box-shadow: none;
}

html[data-theme="day"] .panel:hover,
html[data-theme="day"] .method-card:hover,
html[data-theme="day"] .history-card:hover {
  border-color: #ccc5b9;
  background-color: rgba(255, 252, 242, 0.96);
  box-shadow: none;
}

html[data-theme="day"] #requestForm > .panel:nth-of-type(2),
html[data-theme="day"] .method-card.primary-method,
html[data-theme="day"] .method-card[data-method="single"],
html[data-theme="day"] .stats-grid article:first-child,
html[data-theme="day"] .history-counter {
  border-color: rgba(235, 94, 40, 0.26);
  background:
    radial-gradient(circle at 100% 0, rgba(235, 94, 40, 0.08), transparent 34%),
    rgba(255, 252, 242, 0.88);
}

html[data-theme="day"] .studio-hero::before {
  display: none;
}

html[data-theme="day"] .hero-signal {
  border-color: #ccc5b9;
  background:
    radial-gradient(circle, rgba(235, 94, 40, 0.12), transparent 54%),
    #fffcf2;
}

html[data-theme="day"] .hero-signal::before,
html[data-theme="day"] .hero-signal::after {
  background: #ccc5b9;
}

html[data-theme="day"] .hero-signal i {
  background: #eb5e28;
  box-shadow:
    0 0 0 15px rgba(235, 94, 40, 0.08),
    0 0 52px rgba(235, 94, 40, 0.24);
}

html[data-theme="day"] .hero-signal b {
  color: #403d39;
}

html[data-theme="day"] .method-card::after {
  border-color: var(--line);
  background: rgba(235, 94, 40, 0.05);
}

html[data-theme="day"] .method-card > p,
html[data-theme="day"] .history-hero p,
html[data-theme="day"] .assistant-message p,
html[data-theme="day"] .canvas-empty p,
html[data-theme="day"] .canvas-loading p,
html[data-theme="day"] .single-output-empty p,
html[data-theme="day"] .history-card p,
html[data-theme="day"] .history-empty p {
  color: #403d39;
}

html[data-theme="day"] input,
html[data-theme="day"] select,
html[data-theme="day"] textarea,
html[data-theme="day"] .choice,
html[data-theme="day"] .segment-control,
html[data-theme="day"] .segment-control button.active,
html[data-theme="day"] .check-grid label,
html[data-theme="day"] .upload-box,
html[data-theme="day"] .mini-upload,
html[data-theme="day"] .constraint-stack label,
html[data-theme="day"] .suite-type-list label,
html[data-theme="day"] .prompt-tabs,
html[data-theme="day"] .prompt-feedback button,
html[data-theme="day"] .history-filters button,
html[data-theme="day"] .history-card button,
html[data-theme="day"] .revision-targets button {
  border-color: var(--line);
  color: #252422;
  background: rgba(255, 252, 242, 0.9);
}

html[data-theme="day"] input::placeholder,
html[data-theme="day"] textarea::placeholder {
  color: rgba(64, 61, 57, 0.5);
}

html[data-theme="day"] select {
  color-scheme: light;
}

html[data-theme="day"] input:focus,
html[data-theme="day"] select:focus,
html[data-theme="day"] textarea:focus {
  border-color: #eb5e28;
  background: rgba(255, 252, 242, 1);
  box-shadow: 0 0 0 3px rgba(235, 94, 40, 0.12);
}

html[data-theme="day"] .choice.active,
html[data-theme="day"] .check-grid label:has(input:checked),
html[data-theme="day"] .suite-type-list label:has(input:checked),
html[data-theme="day"] .constraint-stack label:has(input:checked),
html[data-theme="day"] .revision-targets button.active,
html[data-theme="day"] .prompt-feedback button.active {
  border-color: rgba(235, 94, 40, 0.34);
  color: #252422;
  background: rgba(235, 94, 40, 0.1);
}

html[data-theme="day"] .primary-button,
html[data-theme="day"] .history-filters button.active,
html[data-theme="day"] .selection-mark,
html[data-theme="day"] .history-version,
html[data-theme="day"] .artboard-version,
html[data-theme="day"] .single-revision-badge,
html[data-theme="day"] .suite-artboard.revised::after {
  border-color: #eb5e28;
  color: #252422;
  background: #eb5e28;
  box-shadow: none;
}

html[data-theme="day"] .primary-button:hover {
  border-color: #eb5e28;
  background: #eb5e28;
  box-shadow: 0 10px 24px rgba(235, 94, 40, 0.16);
}

html[data-theme="day"] .secondary-button,
html[data-theme="day"] .confirm-button {
  border-color: var(--line);
  color: #403d39;
  background: rgba(255, 252, 242, 0.86);
}

html[data-theme="day"] .secondary-button:hover,
html[data-theme="day"] .confirm-button:hover,
html[data-theme="day"] .history-card button:hover {
  border-color: #eb5e28;
  color: #eb5e28;
  background: rgba(235, 94, 40, 0.08);
}

html[data-theme="day"] .canvas-toolbar,
html[data-theme="day"] .canvas-prompt,
html[data-theme="day"] .prompt-editor-bar {
  border-color: var(--line);
  background: rgba(255, 252, 242, 0.9);
}

html[data-theme="day"] .artboard-canvas,
html[data-theme="day"] .single-canvas-area {
  background:
    radial-gradient(circle, rgba(64, 61, 57, 0.13) 1px, transparent 1px),
    #fffcf2;
}

html[data-theme="day"] .canvas-tools button,
html[data-theme="day"] .generation-summary > div,
html[data-theme="day"] .selected-artboard-info,
html[data-theme="day"] #selectedPreview,
html[data-theme="day"] .single-result-meta,
html[data-theme="day"] .single-result-meta span,
html[data-theme="day"] .single-output-empty,
html[data-theme="day"] .output-frame > .canvas-loading,
html[data-theme="day"] .preview-card,
html[data-theme="day"] .preview-toolbar,
html[data-theme="day"] .preview-toolbar button,
html[data-theme="day"] .checklist label {
  border-color: var(--line);
  color: #403d39;
  background: rgba(255, 252, 242, 0.9);
}

html[data-theme="day"] .preview-card {
  background: #fffcf2;
}

html[data-theme="day"] .checklist label:has(input:checked) {
  border-color: rgba(235, 94, 40, 0.24);
  background: rgba(235, 94, 40, 0.1);
}

html[data-theme="day"] .task-row {
  border-color: var(--line);
}

html[data-theme="day"] .task-row:hover {
  background: rgba(235, 94, 40, 0.05);
}

html[data-theme="day"] .progress-block span b,
html[data-theme="day"] .progress-block span em,
html[data-theme="day"] .task-main p {
  color: #403d39;
}

html[data-theme="day"] .progress-block > i {
  background: rgba(204, 197, 185, 0.62);
}

html[data-theme="day"] .progress-block > i b {
  background: #eb5e28;
  box-shadow: none;
}

html[data-theme="day"] .coral-tag {
  color: #eb5e28;
  background: rgba(235, 94, 40, 0.12);
}

html[data-theme="day"] .reference-visual {
  border-color: #ccc5b9;
  color: #403d39;
  background:
    linear-gradient(30deg, rgba(235, 94, 40, 0.07), transparent 45%),
    rgba(255, 252, 242, 0.92);
}

html[data-theme="day"] .reference-visual:hover,
html[data-theme="day"] .reference-visual.has-file {
  border-color: #eb5e28;
  background-color: rgba(255, 252, 242, 1);
}

html[data-theme="day"] .reference-visual img {
  background: #fffcf2;
}

html[data-theme="day"] .reference-visual.has-file > strong,
html[data-theme="day"] .reference-visual.has-file > small {
  color: #252422;
  background: rgba(255, 252, 242, 0.82);
}

html[data-theme="day"] .empty-orbit,
html[data-theme="day"] .empty-orbit::before,
html[data-theme="day"] .empty-orbit::after {
  border-color: #ccc5b9;
}

html[data-theme="day"] .suite-artboard {
  border-color: rgba(64, 61, 57, 0.16);
  box-shadow: 0 14px 30px rgba(64, 61, 57, 0.12);
}

html[data-theme="day"] .suite-artboard:hover,
html[data-theme="day"] .suite-artboard.selected {
  border-color: #eb5e28;
  box-shadow: 0 16px 32px rgba(64, 61, 57, 0.16);
}

html[data-theme="day"] .history-thumb,
html[data-theme="day"] .history-thumb.artboard-c,
html[data-theme="day"] .history-thumb.artboard-e,
html[data-theme="day"] .history-thumb.artboard-f {
  background: linear-gradient(145deg, #ccc5b9, #eb5e28);
}

html[data-theme="day"] .history-thumb.artboard-d,
html[data-theme="day"] .history-thumb.single {
  background:
    radial-gradient(circle at 75% 26%, rgba(255, 252, 242, 0.7), transparent 22%),
    linear-gradient(135deg, #ccc5b9, #eb5e28 58%, #403d39);
}

html[data-theme="day"] .history-thumb::after,
html[data-theme="day"] .artboard-order,
html[data-theme="day"] .mock-copy,
html[data-theme="day"] .mock-copy b {
  color: #fffcf2;
}

html[data-theme="day"] .history-card-meta span,
html[data-theme="day"] em,
html[data-theme="day"] .eyebrow,
html[data-theme="day"] .micro-label,
html[data-theme="day"] .result-number,
html[data-theme="day"] .history-counter strong {
  color: #eb5e28;
}

html[data-theme="day"] #promptOutput {
  color: #252422;
}

@media (max-width: 760px) {
  .theme-switch {
    display: none;
  }
}

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

.reference-library-button {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: transparent;
  font-size: 13px;
}

.reference-library-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.reference-library-button.compact {
  min-height: 34px;
  margin-top: 8px;
}

.reference-library-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 6, .72);
  backdrop-filter: blur(8px);
}

.reference-library-dialog {
  width: min(980px, 100%);
  max-height: min(780px, 92vh);
  display: grid;
  grid-template-rows: auto auto auto auto minmax(160px, 1fr) auto;
  gap: 16px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--card-radius);
  background: var(--surface-raised);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.reference-library-head,
.reference-library-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reference-library-head > div {
  min-width: 0;
}

.reference-library-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .15em;
}

.reference-library-head h2 {
  margin: 0;
  font-size: 24px;
}

.reference-library-close {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 24px;
}

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

.reference-library-upload {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  cursor: pointer;
}

.reference-library-upload:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.reference-library-upload input {
  display: none;
}

.reference-library-upload span {
  color: var(--accent);
  font-size: 20px;
}

.reference-library-upload-feedback {
  min-height: 20px;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reference-library-grid {
  min-height: 160px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  overflow: auto;
  padding-right: 3px;
}

.reference-library-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  overflow: hidden;
}

.reference-library-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.reference-library-select {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 7px;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
}

.reference-library-select img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--control-radius) - 2px);
  background: var(--surface-soft);
}

.reference-library-select span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-library-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .66);
  font-size: 18px;
}

.reference-library-delete:hover {
  background: var(--danger);
}

.reference-library-standardize {
  width: calc(100% - 14px);
  min-height: 30px;
  margin: 0 7px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface-raised);
  font-size: 11px;
}

.reference-library-standardize:hover,
.reference-library-standardize:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.product-standardization-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 6, .72);
  backdrop-filter: blur(10px);
}

.product-standardization-modal[hidden] {
  display: none;
}

.product-standardization-dialog {
  width: min(1040px, 100%);
  max-height: 92vh;
  display: grid;
  gap: 16px;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--card-radius);
  background: var(--surface-raised);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.product-standardization-head,
.product-standardization-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-standardization-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .15em;
}

.product-standardization-head h2 {
  margin: 0;
  font-size: 24px;
}

.product-standardization-close {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 24px;
}

.product-standardization-note,
.product-standardization-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.product-standardization-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: var(--surface-soft);
}

.product-standardization-status[data-phase="failed"] {
  border-color: rgba(185, 55, 72, .3);
  color: var(--danger);
}

.product-standardization-status[data-phase="confirmed"] {
  border-color: rgba(31, 145, 101, .3);
  color: #15704f;
}

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

.standardization-preview {
  min-width: 0;
  margin: 0;
}

.standardization-preview > div {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
}

.standardization-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.standardization-preview.checkerboard > div {
  background-color: #eef1f4;
  background-image:
    linear-gradient(45deg, #cbd2db 25%, transparent 25%),
    linear-gradient(-45deg, #cbd2db 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cbd2db 75%),
    linear-gradient(-45deg, transparent 75%, #cbd2db 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.standardization-preview.white > div {
  background: #fff;
}

.standardization-preview.black > div {
  background: #111;
}

.standardization-preview figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.product-standardization-risks {
  padding: 12px 14px;
  border: 1px solid rgba(199, 135, 28, .3);
  border-radius: var(--control-radius);
  color: #785313;
  background: rgba(255, 190, 70, .11);
  font-size: 12px;
}

.product-standardization-risks ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.product-standardization-actions {
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .product-standardization-modal {
    padding: 10px;
  }

  .product-standardization-dialog {
    max-height: 96vh;
    padding: 16px;
  }

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

.reference-library-empty {
  grid-column: 1 / -1;
  align-self: center;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.reference-library-actions > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 620px) {
  .reference-library-modal {
    padding: 10px;
  }

  .reference-library-dialog {
    max-height: 96vh;
    padding: 16px;
  }

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

/* UI V2: day-only liquid-glass depth system. */
:root {
  --bg: #edf1f5; --bg-grid: rgba(72, 88, 116, .035);
  --sidebar: rgba(250, 252, 255, .64); --surface: rgba(255, 255, 255, .57);
  --surface-raised: rgba(255, 255, 255, .8); --surface-soft: rgba(229, 235, 243, .64);
  --line: rgba(255, 255, 255, .76); --line-strong: rgba(164, 181, 207, .52);
  --text: #202b3b; --text-soft: #405069; --muted: #6b7890;
  --accent: #5f7de0; --accent-hover: #4e6ccd; --accent-soft: rgba(95, 125, 224, .13);
  --violet: #8d7be8; --violet-soft: rgba(141, 123, 232, .13);
  --mint: #3cae9c; --mint-soft: rgba(60, 174, 156, .13);
  --amber: #d89558; --amber-soft: rgba(216, 149, 88, .13); --danger: #d96b6b;
  --glass-blur: 22px; --glass-shadow: 0 22px 48px rgba(57, 73, 98, .11), 0 3px 12px rgba(83, 99, 125, .06);
  --glass-shadow-hover: 0 28px 54px rgba(57, 73, 98, .15), 0 7px 18px rgba(83, 99, 125, .09);
  --creator-left-column: clamp(270px, 15vw, 300px);
  --creator-right-column: clamp(310px, 18vw, 340px);
  color-scheme: light;
}

html, html[data-theme="day"] { background: var(--bg); color-scheme: light; }
body {
  min-height: 100vh;
  background:
    radial-gradient(55rem 38rem at -8% -12%, rgba(146, 187, 255, .48), transparent 60%),
    radial-gradient(46rem 34rem at 102% 4%, rgba(255, 194, 139, .38), transparent 58%),
    radial-gradient(42rem 34rem at 62% 105%, rgba(132, 220, 193, .25), transparent 62%),
    linear-gradient(145deg, #f8fafc, #eef1f5 48%, #e7ebf2);
}
body::before, body::after { position: fixed; z-index: -1; width: 28rem; height: 28rem; border-radius: 50%; content: ""; filter: blur(42px); pointer-events: none; }
body::before { top: 28%; left: 24%; background: rgba(177, 202, 255, .17); }
body::after { right: 3%; bottom: 5%; background: rgba(255, 202, 164, .15); }
.app-shell { position: relative; isolation: isolate; gap: 20px; padding: 18px; background: rgba(255,255,255,.16); }
.sidebar, .topbar, .panel, .method-card, .stats-grid article, .prompt-studio, .prompt-editor, .brief-inspector, .canvas-workspace, .ai-assistant, .single-process-strip, .history-card, .history-empty, .preview-card, .reference-library-dialog {
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
}
.sidebar { border-radius: 24px; background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(245,248,253,.47)); box-shadow: 0 24px 54px rgba(57,73,98,.13), inset -1px 0 rgba(255,255,255,.52); }
.topbar { margin-bottom: 18px; padding: 18px 22px; border-radius: 20px; background: rgba(255,255,255,.48); }
.panel, .method-card, .stats-grid article, .history-card, .preview-card { overflow: hidden; }
.panel::before, .method-card::before, .stats-grid article::before, .history-card::before { position:absolute; inset:0; border-radius:inherit; background:linear-gradient(135deg,rgba(255,255,255,.35),transparent 34%); content:""; pointer-events:none; }
.panel:hover, .method-card:hover, .history-card:hover, .stats-grid article:hover { border-color:rgba(255,255,255,.92); background:rgba(255,255,255,.72); box-shadow:var(--glass-shadow-hover); transform:translateY(-2px); }
.method-card.primary-method, .method-card[data-method="single"], #requestForm > .panel:nth-of-type(2), .history-counter { border-color:rgba(150,175,241,.34); background:radial-gradient(circle at 90% 8%,rgba(168,194,255,.42),transparent 32%),linear-gradient(140deg,rgba(255,255,255,.78),rgba(242,246,255,.5)); }
input, select, textarea, .choice, .segment-control, .check-grid label, .upload-box, .mini-upload, .constraint-stack label, .suite-type-list label, .prompt-tabs, .prompt-feedback button, .history-filters button, .history-card button, .revision-targets button, .canvas-toolbar, .canvas-prompt, .prompt-editor-bar, .preview-toolbar, .reference-library-button { border-color:rgba(255,255,255,.8); background:rgba(255,255,255,.58); box-shadow:0 7px 18px rgba(80,96,120,.055), inset 0 1px rgba(255,255,255,.68); backdrop-filter:blur(14px) saturate(1.12); -webkit-backdrop-filter:blur(14px) saturate(1.12); }
input:focus, select:focus, textarea:focus { border-color:rgba(95,125,224,.68); background:rgba(255,255,255,.85); box-shadow:0 0 0 4px rgba(95,125,224,.13),0 10px 22px rgba(76,101,163,.08); }
.nav-item.active, .choice.active, .check-grid label:has(input:checked), .suite-type-list label:has(input:checked), .constraint-stack label:has(input:checked), .revision-targets button.active, .prompt-feedback button.active { color:#324d9d; border-color:rgba(117,145,226,.36); background:linear-gradient(110deg,rgba(207,220,255,.58),rgba(255,255,255,.5)); }
.primary-button, .history-filters button.active, .selection-mark, .history-version, .artboard-version, .single-revision-badge { border-color:rgba(85,111,199,.28); background:linear-gradient(135deg,#6f88e6,#5672d5); box-shadow:0 12px 22px rgba(86,114,213,.24); }
.primary-button:hover { background:linear-gradient(135deg,#637ee0,#4665ca); box-shadow:0 16px 28px rgba(70,101,202,.3); }
.reference-library-modal { background:rgba(50,63,90,.22); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
@media (max-width: 760px) { .app-shell { padding: 10px; } .sidebar { border-radius: 18px; } .topbar { padding: 15px 16px; } }

/* UI V2 HIGH-SPECIFICITY SURFACE LAYER
   This layer intentionally matches legacy day-mode specificity. */
html[data-theme="day"] {
  --bg: #e7edf4;
  --bg-grid: rgba(73, 92, 122, .026);
  --sidebar: rgba(250, 252, 255, .58);
  --surface: rgba(255, 255, 255, .44);
  --surface-raised: rgba(255, 255, 255, .68);
  --surface-soft: rgba(228, 236, 247, .5);
  --line: rgba(255, 255, 255, .78);
  --line-strong: rgba(148, 168, 199, .42);
  --text: #1d293b;
  --text-soft: #43516a;
  --muted: #68768e;
  --accent: #637fdd;
  --accent-hover: #4f6dc9;
  --accent-soft: rgba(99, 127, 221, .14);
  --violet: #887ae5;
  --violet-soft: rgba(136, 122, 229, .14);
  --mint: #718bdc;
  --mint-soft: rgba(113, 139, 220, .14);
  --amber: #cf8d55;
  --amber-soft: rgba(207, 141, 85, .14);
  --glass-edge-highlight: inset 0 1px 0 rgba(255, 255, 255, .92), inset 1px 0 0 rgba(255, 255, 255, .45);
}

html[data-theme="day"] body {
  color: var(--text);
  background:
    radial-gradient(52rem 38rem at 7% -4%, rgba(128, 174, 255, .52), transparent 62%),
    radial-gradient(48rem 36rem at 98% 3%, rgba(255, 189, 137, .48), transparent 60%),
    radial-gradient(44rem 36rem at 61% 106%, rgba(154, 165, 232, .3), transparent 64%),
    linear-gradient(145deg, #f7f9fc 0%, #e9eef5 52%, #e4eaf2 100%);
  background-attachment: fixed;
}

html[data-theme="day"] .main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 28px;
  background: rgba(247, 250, 255, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

html[data-theme="day"] .main::before,
html[data-theme="day"] .main::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  content: "";
  filter: blur(16px);
  pointer-events: none;
}

html[data-theme="day"] .main::before {
  top: -18rem;
  left: -18rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(142, 178, 255, .28), transparent 70%);
}

html[data-theme="day"] .main::after {
  right: -19rem;
  bottom: -19rem;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(255, 190, 144, .22), transparent 70%);
}

html[data-theme="day"] :is(.sidebar, .topbar, .panel, .method-card, .stats-grid article, .prompt-studio, .prompt-editor, .brief-inspector, .canvas-workspace, .ai-assistant, .single-process-strip, .history-card, .history-empty, .preview-card, .reference-library-dialog) {
  border: 1px solid rgba(255, 255, 255, .76);
  background: linear-gradient(145deg, rgba(255, 255, 255, .58), rgba(244, 248, 255, .34));
  box-shadow: var(--glass-edge-highlight), 0 22px 48px rgba(55, 72, 101, .13), 0 4px 14px rgba(73, 91, 121, .07);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
}

html[data-theme="day"] .sidebar {
  border-color: rgba(255, 255, 255, .82);
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .74), rgba(237, 244, 253, .45));
  box-shadow: var(--glass-edge-highlight), 0 28px 60px rgba(48, 66, 96, .15);
}

html[data-theme="day"] .topbar {
  background: linear-gradient(120deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .3));
}

html[data-theme="day"] :is(.panel, .method-card, .stats-grid article, .history-card, .preview-card) {
  position: relative;
  border-radius: 20px;
}

html[data-theme="day"] :is(.panel, .method-card, .stats-grid article, .history-card, .preview-card)::before {
  position: absolute;
  inset: 1px 1px auto;
  height: 42%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), transparent);
  content: "";
  pointer-events: none;
}

html[data-theme="day"] :is(.panel, .method-card, .history-card):hover {
  border-color: rgba(255, 255, 255, .96);
  background: linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(241, 247, 255, .42));
  box-shadow: var(--glass-edge-highlight), 0 30px 58px rgba(51, 72, 108, .18), 0 8px 20px rgba(81, 101, 137, .09);
  transform: translateY(-4px);
}

html[data-theme="day"] :is(.method-card.primary-method, .method-card[data-method="single"], #requestForm > .panel:nth-of-type(2), .history-counter) {
  border-color: rgba(183, 203, 255, .68);
  background: linear-gradient(145deg, rgba(255, 255, 255, .66), rgba(244, 248, 253, .42));
}

html[data-theme="day"] :is(input, select, textarea, .choice, .segment-control, .check-grid label, .upload-box, .mini-upload, .constraint-stack label, .suite-type-list label, .prompt-tabs, .prompt-feedback button, .history-filters button, .history-card button, .revision-targets button, .canvas-toolbar, .canvas-prompt, .prompt-editor-bar, .preview-toolbar, .reference-library-button) {
  border-color: rgba(255, 255, 255, .8);
  color: var(--text);
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 8px 22px rgba(60, 80, 113, .07);
  backdrop-filter: blur(16px) saturate(1.16);
  -webkit-backdrop-filter: blur(16px) saturate(1.16);
}

html[data-theme="day"] :is(input, select, textarea):focus {
  border-color: rgba(99, 127, 221, .72);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 0 0 4px rgba(99, 127, 221, .13), 0 12px 26px rgba(61, 83, 124, .1);
}

html[data-theme="day"] :is(.nav-item.active, .choice.active, .check-grid label:has(input:checked), .suite-type-list label:has(input:checked), .constraint-stack label:has(input:checked), .revision-targets button.active, .prompt-feedback button.active) {
  border-color: rgba(130, 157, 230, .42);
  color: #2f4b9c;
  background: linear-gradient(120deg, rgba(206, 220, 255, .68), rgba(255, 255, 255, .46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 10px 22px rgba(77, 105, 174, .1);
}

html[data-theme="day"] :is(.primary-button, .history-filters button.active, .selection-mark, .history-version, .artboard-version, .single-revision-badge) {
  border-color: rgba(88, 111, 195, .34);
  color: #fff;
  background: linear-gradient(135deg, #728be5, #536fd1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 28px rgba(76, 103, 200, .26);
}

@media (max-width: 760px) {
  html[data-theme="day"] .main { border-radius: 20px; }
  html[data-theme="day"] .main::before { left: -20rem; }
}

/* UI V2 NEUTRAL INNER SURFACES
   Remove the remaining warm paper backgrounds from creation views. */
html[data-theme="day"] :is(.artboard-canvas, .single-canvas-area) {
  border-color: rgba(255, 255, 255, .74);
  background: rgba(247, 249, 253, .62);
  background-image: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), inset 0 0 54px rgba(103, 126, 178, .035);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="day"] :is(.selected-artboard-info, #selectedPreview, .generation-summary > div, .single-result-meta, .single-result-meta span, .single-output-empty, .output-frame > .canvas-loading, .preview-card, .preview-toolbar, .preview-toolbar button, .checklist label, .assistant-message) {
  border-color: rgba(255, 255, 255, .78);
  color: var(--text-soft);
  background: rgba(255, 255, 255, .52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88), 0 8px 20px rgba(62, 80, 112, .055);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

html[data-theme="day"] :is(.canvas-toolbar, .canvas-prompt, .prompt-editor-bar) {
  border-color: rgba(255, 255, 255, .76);
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .84);
}

html[data-theme="day"] :is(.upload-box, .mini-upload, .reference-library-button) {
  background: rgba(255, 255, 255, .54);
}

html[data-theme="day"] .selected-artboard-info :is(strong, small),
html[data-theme="day"] .assistant-message :is(strong, p) {
  color: var(--text-soft);
}

/* UI V2 CLEAN DECORATIVE DETAILS
   Keep functional cues crisp without stacking warm or violet color patches. */
html[data-theme="day"] .method-card::after {
  display: none;
  content: none;
}

html[data-theme="day"] :is(.single-output-empty > span, .prompt-context > span) {
  border: 1px solid rgba(126, 151, 214, .22);
  color: #6682d9;
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 7px 18px rgba(67, 88, 128, .07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="day"] .reference-visual {
  border-color: rgba(126, 145, 181, .34);
  color: var(--text-soft);
  background: rgba(255, 255, 255, .56);
  background-image: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 24px rgba(60, 80, 113, .055);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

html[data-theme="day"] .reference-visual:hover,
html[data-theme="day"] .reference-visual.has-file {
  border-color: rgba(100, 129, 205, .52);
  background: rgba(255, 255, 255, .66);
  background-image: none;
}

html[data-theme="day"] .reference-visual > span {
  border: 1px solid rgba(126, 151, 214, .2);
  color: #6682d9;
  background: rgba(255, 255, 255, .54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94), 0 6px 16px rgba(67, 88, 128, .06);
}

html[data-theme="day"] .reference-visual img,
html[data-theme="day"] .reference-visual.has-file > strong,
html[data-theme="day"] .reference-visual.has-file > small {
  background: rgba(255, 255, 255, .72);
}

html[data-theme="day"] .hero-signal {
  border-color: rgba(126, 145, 181, .28);
  background: transparent;
  background-image: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="day"] .hero-signal::before,
html[data-theme="day"] .hero-signal::after {
  background: rgba(114, 130, 160, .28);
}

/* UI V2 AUTH DIALOG
   The legacy dialog referenced dark-theme-only variables, leaving it transparent. */
html[data-theme="day"] .auth-modal {
  background: rgba(35, 46, 65, .28);
  backdrop-filter: blur(18px) saturate(.84);
  -webkit-backdrop-filter: blur(18px) saturate(.84);
}

html[data-theme="day"] .auth-dialog {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 22px;
  color: #1d293b;
  background: rgba(250, 252, 255, .94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 30px 76px rgba(24, 38, 62, .26), 0 8px 24px rgba(35, 51, 78, .12);
  backdrop-filter: blur(28px) saturate(1.12);
  -webkit-backdrop-filter: blur(28px) saturate(1.12);
}

html[data-theme="day"] .auth-dialog .section-icon {
  border-color: rgba(102, 130, 217, .22);
  color: #5874d2;
  background: rgba(231, 237, 255, .84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

html[data-theme="day"] .auth-close {
  border-color: rgba(123, 142, 174, .22);
  color: #526077;
  background: rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(42, 59, 88, .1);
}

html[data-theme="day"] .auth-close:hover {
  color: #1d293b;
  background: #fff;
}

html[data-theme="day"] .auth-dialog h2 {
  color: #1d293b;
  font-weight: 620;
}

html[data-theme="day"] .auth-dialog p {
  color: #637087;
}

html[data-theme="day"] .auth-dialog label span {
  color: #4c5a72;
  font-weight: 520;
}

html[data-theme="day"] .auth-dialog input {
  min-height: 48px;
  border-color: rgba(127, 148, 187, .28);
  color: #1d293b;
  background: rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, 0 7px 18px rgba(52, 70, 101, .06);
}

html[data-theme="day"] .auth-dialog input:focus {
  border-color: rgba(91, 119, 211, .7);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 127, 221, .12), 0 10px 22px rgba(52, 70, 101, .08);
}

html[data-theme="day"] .auth-dialog .primary-button {
  min-height: 48px;
  border-radius: 10px;
}

html[data-theme="day"] .auth-message {
  color: #637087;
}

html[data-theme="day"] .auth-message.error {
  color: #c34f49;
}

html[data-theme="day"] .stats-grid article:first-child {
  border-color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .58);
  background-image: none;
  box-shadow: var(--glass-edge-highlight), 0 18px 40px rgba(55, 72, 101, .1), 0 4px 12px rgba(73, 91, 121, .05);
}

html[data-theme="day"] .user-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 16px;
  background: rgba(255, 255, 255, .56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 28px rgba(52, 70, 101, .075);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}
/* TEMU Prompt Studio: existing FRAME type scale, warm neutral surfaces, 8/16/24/32 spacing rhythm. */
.temu-prompt-view {
  padding: 32px;
}

.temu-workbench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.temu-workbench-head h2 {
  max-width: 760px;
  margin: 4px 0 8px;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.08;
  text-wrap: balance;
}

.temu-workbench-head > div > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.temu-platform-mark {
  min-width: 132px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
}

.temu-platform-mark b,
.temu-platform-mark span {
  display: block;
}

.temu-platform-mark b {
  color: var(--accent);
  font-size: 22px;
  letter-spacing: .12em;
}

.temu-platform-mark span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.temu-workbench-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  gap: 24px;
  align-items: start;
}

.temu-workspace-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 520px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.temu-workspace-stages button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.temu-workspace-stages button.is-active {
  color: var(--accent-strong, #4d69be);
  background: var(--surface-raised);
  box-shadow: 0 3px 12px rgba(45, 59, 93, .08);
}

.temu-unified-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 41%) minmax(500px, 59%);
  min-height: calc(100vh - 190px);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  overflow: hidden;
  background: var(--surface-raised);
}

.temu-stage-column {
  min-width: 0;
  max-height: calc(100vh - 190px);
  overflow: auto;
  background: var(--surface);
}

.temu-stage-column > section[hidden] { display: none; }

.temu-stage-column .temu-input-panel,
.temu-stage-column .temu-review-panel {
  border: 0;
}

.temu-stage-column .temu-review-panel {
  position: static;
  max-height: none;
  overflow: visible;
}

.temu-result-stage-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.temu-selected-fidelity-review,
.temu-suite-result-actions {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}

.temu-selected-fidelity-review { padding: 14px; }

.temu-suite-result-actions {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.temu-suite-selection-summary {
  color: var(--muted);
  font-size: 12px;
}

.temu-suite-result-actions label {
  display: grid;
  gap: 7px;
}

.temu-suite-result-actions label > span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.temu-suite-result-actions textarea {
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text);
  background: var(--surface);
}

#temuSuiteFeedback {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 12px;
  line-height: 1.5;
}

#temuSuiteFeedback.show { display: block; }

.temu-suite-results {
  min-width: 0;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface-soft);
}

.temu-suite-results > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.temu-suite-results h3,
.temu-suite-results p { margin: 0; }

.temu-suite-results p,
#temuResultStatus {
  color: var(--muted);
  font-size: 12px;
}

.temu-suite-results p { margin-top: 4px; }

.temu-suite-results .suite-artboards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.temu-suite-results .suite-artboard {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(45, 59, 93, .10);
}

.temu-suite-history-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.temu-suite-history-actions[hidden] {
  display: none;
}

.temu-suite-results .artboard-order,
.temu-suite-results .artboard-version {
  top: 9px;
  font-size: 11px;
}

.temu-suite-results .artboard-order { left: 9px; }
.temu-suite-results .artboard-version { right: 9px; }

.temu-input-panel,
.temu-review-panel {
  border: 1px solid var(--line);
  background: var(--surface);
}

.temu-input-panel {
  padding: 24px;
}

.temu-review-panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.temu-section-heading {
  display: flex;
  gap: 14px;
  margin: 4px 0 18px;
}

.temu-section-heading:not(:first-child) {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.temu-section-heading > span {
  color: var(--accent);
  font: 700 13px/1 Bahnschrift, sans-serif;
  letter-spacing: .12em;
}

.temu-section-heading h3,
.temu-review-head h3 {
  margin: 0;
  font-size: 18px;
}

.temu-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.temu-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.temu-field,
.temu-upload-field,
.temu-plan-item label {
  display: grid;
  gap: 7px;
}

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

.temu-field > span,
.temu-upload-field > span,
.temu-plan-item label > span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.temu-field input,
.temu-field textarea,
.temu-plan-item input,
.temu-plan-item textarea,
.temu-manual-review input {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text);
  background: var(--surface-raised);
  outline: none;
}

.temu-field textarea,
.temu-plan-item textarea {
  resize: vertical;
  line-height: 1.6;
}

.temu-technical-details { color: var(--muted); font-size: 12px; }
.temu-technical-details pre { max-height: 240px; overflow: auto; white-space: pre-wrap; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }

.temu-field input:focus,
.temu-field textarea:focus,
.temu-plan-item textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.temu-upload-field {
  min-height: 112px;
  align-content: center;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-soft);
}

.temu-upload-field small {
  color: var(--muted);
  line-height: 1.45;
}

.temu-upload-field input {
  width: 100%;
  font-size: 12px;
}

.temu-library-selection-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.temu-library-selection-summary[hidden] { display: none; }

.temu-library-selection-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.temu-library-selection-item img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 7px;
  object-fit: cover;
}

.temu-library-selection-item span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temu-slot-group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.temu-suite-positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.temu-suite-position {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(118, 127, 151, .2);
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, .58);
}

.temu-suite-direction { grid-column: 2 / -2; }
.temu-suite-direction input { width: 100%; }
.temu-suite-remove {
  align-self: start;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}
.temu-suite-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.temu-suite-position > b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(231, 91, 64, .1);
  color: var(--accent-coral);
}

.temu-suite-position label,
.temu-suite-position label span {
  display: block;
}

.temu-suite-position label span {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.temu-suite-position select {
  width: 100%;
}

.temu-slot-group legend {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text);
}

.temu-slot-group legend span {
  color: var(--muted);
  font-size: 13px;
}

.temu-slot-group legend i {
  color: var(--accent);
  font-style: normal;
}

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

.temu-slot-card {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto 1fr;
  gap: 5px 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface-raised);
  cursor: pointer;
}

.temu-slot-card input {
  position: absolute;
  inset: 12px 12px auto auto;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.temu-slot-card > b {
  grid-row: 1 / 3;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.temu-slot-card strong {
  padding-right: 22px;
  font-size: 15px;
}

.temu-slot-card small {
  color: var(--muted);
  line-height: 1.45;
}

.temu-slot-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.temu-slot-card.is-selected {
  border-color: color-mix(in oklch, var(--accent) 72%, var(--line));
  background: color-mix(in oklch, var(--accent-soft) 65%, var(--surface-raised));
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}

.temu-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

#temuFormStatus {
  color: var(--muted);
  font-size: 13px;
}

#temuFormStatus[data-tone="success"] { color: var(--mint); }
#temuFormStatus[data-tone="error"] { color: var(--danger); }

.temu-review-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.temu-review-head p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .14em;
}

#temuPlanState {
  color: var(--muted);
  font-size: 12px;
}

.temu-agent-run {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.temu-agent-run[data-state="ready"] { color: var(--mint); }
.temu-agent-run[data-state="failed"] { color: var(--danger); }

.temu-prompt-run-log {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  overflow: hidden;
}

.temu-prompt-run-log > header,
.temu-run-execution > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.temu-prompt-run-log > header { padding: 12px 14px; }
.temu-prompt-run-log > header h3 { margin: 0; font-size: 14px; }
.temu-prompt-run-log > header span,
.temu-run-execution > header span { color: var(--text-muted); font-size: 11px; }
.temu-run-empty { margin: 0; padding: 0 14px 14px; color: var(--text-muted); font-size: 12px; }
.temu-run-execution { border-top: 1px solid var(--line); padding: 12px 14px; }
.temu-run-execution > header { margin-bottom: 8px; }
.temu-run-stage { border-top: 1px solid var(--line); }
.temu-run-stage summary { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; cursor: pointer; font-size: 12px; }
.temu-run-stage summary span:first-child { display: flex; gap: 8px; align-items: center; }
.temu-run-stage summary small { color: var(--text-muted); }
.temu-run-stage[data-status="succeeded"] summary small { color: var(--mint); }
.temu-run-stage[data-status="failed"] summary small,
.temu-run-error { color: var(--danger); }
.temu-run-stage-body { padding: 0 0 12px; }
.temu-run-stage-body pre { max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: rgba(239, 243, 250, .86); font-size: 11px; }
.temu-run-issues { margin: 8px 0; padding-left: 18px; }
.temu-run-issues li { display: flex; gap: 8px; margin: 4px 0; font-size: 11px; }
.temu-run-trace { display: grid; gap: 3px; color: var(--text-muted); font-size: 10px; word-break: break-all; }

@media (max-width: 720px) {
  .temu-run-stage summary,
  .temu-run-execution > header { align-items: flex-start; flex-direction: column; }
}

.temu-analysis-review {
  display: grid;
  gap: 16px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
}

.temu-analysis-review[hidden] { display: none; }

.temu-analysis-review > header,
.temu-claim-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.temu-analysis-review header small,
.temu-claim-check small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

#temuAnalysisState { color: var(--amber); font-size: 12px; }

.temu-analysis-actions {
  display: grid;
  gap: 8px;
}

#temuAnalysisActionStatus {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#temuAnalysisActionStatus[data-tone="error"] { color: var(--danger); }

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

.temu-analysis-columns article,
.temu-claim-review {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .5);
}

.temu-analysis-columns h4,
#temuClaimReview > h4 { margin: 0 0 10px; }

.temu-analysis-columns ul { margin: 0; padding-left: 18px; color: var(--muted); }
.temu-analysis-columns li + li { margin-top: 6px; }

#temuClaimReview { display: grid; gap: 10px; }
.temu-claim-review { display: grid; gap: 12px; }
.temu-claim-check { justify-content: flex-start; }
.temu-claim-check input { width: 18px; height: 18px; flex: 0 0 auto; }
.temu-claim-review > label:last-child { display: grid; gap: 7px; }
.temu-claim-review input[data-claim-copy] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(8, 14, 29, .72);
  color: var(--text);
}

.temu-empty-state {
  padding: 64px 28px;
  text-align: center;
}

.temu-empty-state p {
  max-width: 360px;
  margin: 9px auto 0;
  color: var(--muted);
  line-height: 1.6;
}

.temu-plan-items {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.temu-plan-item {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
}

.temu-plan-item header,
.temu-item-actions,
.temu-verification-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.temu-plan-item header small {
  color: var(--accent);
  text-transform: uppercase;
}

.temu-plan-item header h4 {
  margin: 4px 0 0;
  font-size: 16px;
}

.temu-plan-item header > span,
.temu-item-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.temu-locked-facts {
  padding: 12px;
  background: var(--surface-soft);
}

.temu-locked-facts > b {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.temu-locked-facts div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.temu-locked-facts span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 11px;
}

.temu-item-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.temu-item-actions > span { margin-right: auto; }

.temu-confirm-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid var(--line-strong);
  background: var(--surface-raised);
}

.temu-confirm-bar span {
  color: var(--muted);
  font-size: 12px;
}

.temu-generation-result {
  border-top: 1px solid var(--line);
}

.temu-generating,
.temu-error {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.temu-error { color: var(--danger); }

.temu-verification-report {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.temu-standard-evidence {
  margin-top: 14px;
  border: 1px solid rgba(119, 132, 166, 0.2);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.78);
}

.temu-standard-evidence > summary {
  padding: 14px 16px;
  color: #5d6d91;
  font-weight: 700;
  cursor: pointer;
}

.temu-standard-evidence-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 0 16px 14px;
}

.temu-verification-trace {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 16px 14px;
  color: #68789a;
  font-size: 12px;
}

.temu-verification-report li code {
  display: block;
  margin-top: 6px;
  color: #97a0b5;
  font-size: 11px;
}

.temu-standard-evidence-images figure {
  margin: 0;
}

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

.temu-verification-images figure { margin: 0; }

.temu-verification-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.temu-verification-images figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.temu-verification-status {
  padding: 12px;
  border: 1px solid var(--line);
}

.temu-verification-status[data-status="passed"] b { color: var(--mint); }
.temu-verification-status[data-status="failed"] b { color: var(--danger); }
.temu-verification-status[data-status="manual_review_required"] b { color: var(--amber); }

.temu-verification-status span {
  color: var(--muted);
  font-size: 12px;
}

.temu-verification-report ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--line);
}

.temu-verification-report li {
  padding: 10px;
  background: var(--surface-raised);
}

.temu-verification-report li > span {
  float: right;
  color: var(--muted);
  font-size: 11px;
}

.temu-verification-report li > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.temu-manual-review {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

@media (max-width: 1320px) {
  .temu-unified-workspace {
    grid-template-columns: minmax(320px, 41%) minmax(440px, 59%);
  }
}

@media (max-width: 1240px) {
  .temu-unified-workspace { grid-template-columns: 1fr; }
  .temu-stage-column { max-height: none; }
  .temu-suite-results { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 1180px) {
  .temu-workbench-layout { grid-template-columns: 1fr; }
  .temu-review-panel { position: static; max-height: none; }
}

@media (max-width: 1100px) {
  .temu-unified-workspace { grid-template-columns: 1fr; }
  .temu-stage-column { max-height: none; }
  .temu-suite-results { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 720px) {
  .temu-prompt-view { padding: 18px; }
  .temu-workbench-head { align-items: flex-start; flex-direction: column; }
  .temu-platform-mark { width: 100%; }
  .temu-workspace-stages { max-width: none; }
  .temu-input-panel { padding: 16px; }
  .temu-field-grid, .temu-slot-grid, .temu-verification-report ul, .temu-verification-images, .temu-analysis-columns { grid-template-columns: 1fr; }
  .temu-suite-results .suite-artboards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .temu-field-wide { grid-column: auto; }
  .temu-form-actions, .temu-confirm-bar { align-items: stretch; flex-direction: column; }
  .temu-manual-review { grid-template-columns: 1fr; }
  .temu-slot-card { min-height: 112px; }
}

/* Method 03 uses the same creator shell, controls, color and glass system as methods 01/02. */
.precision-creator-shell { grid-template-columns:var(--creator-left-column) minmax(0,1fr) var(--creator-right-column); height:calc(100vh - 40px); min-height:680px; }
.precision-creator-shell > * { min-height:0; }
.precision-source-delivery { display:flex; flex-direction:column; gap:4px; border:1px solid var(--line); border-radius:var(--control-radius); padding:12px 14px; background:rgba(255,255,255,.42); }
.precision-source-delivery > span { color:var(--muted); font-size:12px; }
.precision-source-delivery > strong { color:var(--ink); font-size:15px; }
.precision-source-delivery > small { color:var(--muted); font-size:11px; line-height:1.45; }
.precision-workspace { align-content:start; grid-template-rows:auto auto auto auto; min-height:0; }
.precision-materials-bar { display:grid; gap:8px; padding:10px 14px 0; }
.precision-material-pickers { display:grid; gap:10px; grid-template-columns:repeat(4,minmax(0,1fr)); }
.precision-material-picker-wrap { display:flex; flex-direction:column; min-width:0; }
.precision-material-picker-wrap:has(.precision-reference-list:not(:empty)) { border:1px dashed var(--line-strong); border-radius:var(--control-radius); overflow:hidden; }
.precision-material-picker-wrap:has(.precision-reference-list:not(:empty)) .precision-material-picker { border:0; border-radius:0; }
.precision-reference-list { display:grid; gap:6px; grid-auto-flow:column; grid-auto-columns:42px; overflow-x:auto; overflow-y:hidden; padding:0 8px 8px; scrollbar-width:thin; }
.precision-reference-list:empty { display:none; }
.precision-reference-list::-webkit-scrollbar { height:5px; }
.precision-reference-list::-webkit-scrollbar-thumb { background:rgba(99,127,221,.5); border-radius:999px; }
.precision-reference-item { height:42px; position:relative; width:42px; }
.precision-reference-item img { border-radius:7px; height:42px; object-fit:cover; width:42px; }
.precision-reference-remove { align-items:center; background:rgba(20,26,40,.72); border:0; border-radius:50%; color:#fff; display:flex; height:16px; justify-content:center; padding:0; position:absolute; right:2px; top:2px; width:16px; }
.precision-reference-remove:hover,.precision-reference-remove:focus-visible { background:var(--danger); }
.precision-material-picker { align-items:center; background:rgba(255,255,255,.35); border:1px dashed var(--line-strong); border-radius:var(--control-radius); color:var(--ink); display:flex; gap:8px; min-height:66px; padding:9px 10px; text-align:left; width:100%; }
.precision-material-picker:hover,.precision-material-picker:focus-visible { background:var(--accent-soft); border-color:var(--accent); }
.precision-material-picker > span:first-child { align-items:center; background:var(--accent-soft); border-radius:50%; color:var(--accent); display:flex; flex:0 0 28px; height:28px; justify-content:center; width:28px; }
.precision-material-picker > span:last-child,.precision-material-picker strong,.precision-material-picker small { display:block; min-width:0; }
.precision-material-picker strong { font-size:14px; font-weight:700; }
.precision-material-picker small { color:var(--muted); font-size:10px; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.precision-version-rail button { border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.35); color:var(--ink); cursor:pointer; }
.precision-compare-stage { align-items:center; display:grid; gap:12px; grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr); height:clamp(420px,58vh,620px); min-height:0; padding:14px; }
.precision-frame { aspect-ratio:1 / 1; border:1px solid var(--line); border-radius:18px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.25); justify-self:center; max-height:100%; overflow:hidden; position:relative; width:min(100%,520px); }
.precision-frame.source-frame { background:linear-gradient(145deg,rgba(255,255,255,.6),rgba(230,235,247,.42)); }
.precision-frame.current-frame { background:radial-gradient(circle at 48% 45%,rgba(162,184,255,.18),transparent 35%),rgba(255,255,255,.3); }
.precision-frame .frame-label { left:12px; position:absolute; right:12px; top:12px; z-index:3; }
.precision-frame > img { height:100%; object-fit:contain; width:100%; }
.precision-frame.current-frame > img { -webkit-user-drag:none; user-select:none; }
.precision-image-empty { align-items:center; color:var(--muted); display:flex; flex-direction:column; height:100%; justify-content:center; padding:28px; text-align:center; }
.precision-image-empty > span { color:var(--violet); font-size:30px; margin-bottom:10px; }
.precision-image-empty strong { color:var(--ink); font-size:13px; }
.precision-image-empty small { font-size:11px; line-height:1.5; margin-top:5px; }
.precision-link { color:var(--muted); text-align:center; }
.precision-link span { color:var(--violet); display:block; font-size:25px; }
.precision-link small { display:block; font-size:9px; line-height:1.35; margin-top:4px; }
.precision-version-rail { align-items:center; border-top:1px solid var(--line); display:flex; gap:12px; justify-content:space-between; padding:12px 14px; }
.precision-version-rail > div:first-child { display:flex; flex-direction:column; }
.precision-version-rail strong { font-size:12px; }
.precision-version-rail small { color:var(--muted); font-size:9px; }
.precision-version-rail > div:last-child { display:flex; gap:7px; overflow-x:auto; }
.precision-version-rail button { min-width:66px; padding:7px 10px; }
.precision-version-rail button b,.precision-version-rail button span { display:block; }
.precision-version-rail button b { color:var(--violet); font-size:11px; }
.precision-version-rail button span { color:var(--muted); font-size:9px; margin-top:2px; }
.precision-version-rail button.active { border-color:rgba(123,106,255,.48); background:rgba(123,106,255,.1); }
.precision-assistant .assistant-thread { display:flex; flex-direction:column; gap:10px; overflow-y:auto; }
.precision-assistant { grid-column:auto; }
.precision-assistant .suite-field textarea { min-height:60px; }
.precision-run-button { width:100%; }
.precision-checklist { display:grid; gap:6px; grid-template-columns:1fr 1fr; }
.precision-checklist span { align-items:center; color:var(--muted); display:flex; font-size:10px; gap:6px; }
.precision-checklist i { border:1px solid var(--line); border-radius:50%; height:8px; width:8px; }
.precision-checklist.passed i { background:var(--mint); border-color:var(--mint); box-shadow:0 0 0 3px rgba(72,203,154,.12); }
.precision-manual-box { border-top:1px solid var(--line); display:grid; gap:8px; padding-top:12px; }
.precision-manual-box > div { display:flex; flex-direction:column; }
.precision-manual-box > div strong { font-size:12px; }
.precision-manual-box > div small { color:var(--muted); font-size:9px; }
.precision-manual-box .mini-upload { min-height:58px; }
body[data-view="precision"] #precisionView { min-height:calc(100vh - 76px); }
body[data-view="precision"] #precisionView .suite-page-head { margin-bottom:10px; }

@media (max-width:1280px) {
  .precision-creator-shell > .precision-assistant { grid-column:auto; }
  .precision-compare-stage { grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr); }
}
@media (max-width:1180px) {
  .precision-material-pickers { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:980px) {
  .precision-creator-shell { grid-template-columns:1fr; height:auto; }
  .precision-compare-stage { height:auto; min-height:auto; }
}
@media (max-width:640px) {
  .precision-material-pickers { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .precision-compare-stage { grid-template-columns:1fr; }
  .precision-link { transform:rotate(90deg); }
  .precision-version-rail { align-items:flex-start; flex-direction:column; }
}

/* Product library management workspace */
.product-library-view { display: none; gap: 18px; }
.product-library-view.active { display: grid; }
.product-library-head,
.product-library-filters,
.product-editor-heading,
.product-editor-actions,
.product-editor-section > header,
.product-sku-actions,
.product-image-upload-actions,
.product-image-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.product-library-head {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 20px;
}
.product-library-head h2,
.product-library-head p,
.product-editor-heading h3,
.product-editor-section h3,
.product-editor-section p { margin: 0; }
.product-library-head > div:first-child > p:last-child,
.product-editor-section p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.product-library-filters {
  display: grid;
  grid-template-columns: auto minmax(280px, 520px) auto;
  justify-content: end;
}
.product-library-search,
.product-library-toggle,
.product-facts-grid label,
.product-sku-fields label,
.product-image-fields label,
.product-image-upload-draft label,
.product-image-upload { display: grid; gap: 6px; }
.product-library-search-label,
.product-library-toggle span,
.product-facts-grid label > span,
.product-sku-fields label > span,
.product-image-fields label > span,
.product-image-upload-draft label > span,
.product-image-upload > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.product-library-search {
  display: block;
  min-width: 0;
}
.product-library-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.product-library-search-control { display: block; position: relative; }
.product-library-search-control svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}
.product-library-search input { min-width: 0; width: 100%; padding-left: 40px; border-radius: 999px; }
.product-library-toggle { align-items: center; grid-template-columns: auto 1fr; }
.product-library-toggle input { height: 18px; width: 18px; }
.product-library-status,
.product-library-feedback,
.product-image-upload-actions > span { min-height: 20px; color: var(--muted); font-size: 12px; }
.product-library-status[data-tone="error"],
.product-library-feedback[data-tone="error"],
.product-image-upload-draft.failed small { color: var(--danger); }
.product-library-feedback[data-tone="conflict"] {
  border: 1px solid rgba(235, 170, 64, .38);
  border-radius: 10px;
  color: var(--amber);
  padding: 10px 12px;
}
.product-library-layout { display: grid; gap: 18px; grid-template-columns: 280px minmax(0, 1fr); }
.product-card-browser,
.product-card-editor {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  min-width: 0;
}
.product-card-browser { align-self: start; display: grid; gap: 10px; padding: 12px; }
.product-card-list { display: grid; gap: 8px; }
.product-card-list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 13px;
  text-align: left;
  background: var(--surface-raised);
}
.product-card-list-item span,
.product-card-list-item small { color: var(--muted); font-size: 11px; }
.product-card-list-item.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(123, 106, 255, .12); }
.product-card-editor { padding: 20px; }
.product-library-empty { color: var(--muted); padding: 80px 20px; text-align: center; }
.product-library-empty.compact { padding: 24px 12px; }
.product-editor-heading { margin-bottom: 12px; }
.product-facts-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-facts-grid .wide { grid-column: 1 / -1; }
.product-facts-grid input,
.product-facts-grid textarea,
.product-sku-fields input,
.product-image-fields select,
.product-image-upload-draft select,
.product-library-search input {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 10px 11px;
  background: var(--surface-raised);
}
.product-facts-grid textarea { min-height: 76px; resize: vertical; }
.product-editor-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.product-sku-list,
.product-image-upload-drafts { display: grid; gap: 12px; margin-top: 14px; }
.product-sku-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-soft);
}
.product-sku-fields { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-sku-overrides { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-sku-override { border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; margin: 0; padding: 10px; }
.product-sku-override legend { color: var(--muted); font-size: 11px; font-weight: 700; padding: 0 4px; }
.product-sku-override label { display: grid; gap: 6px; }
.product-sku-override label > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.product-sku-override :is(input, textarea, select) { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; padding: 9px 10px; }
.product-sku-override textarea { resize: vertical; }
.product-sku-actions { justify-content: flex-end; }
.product-sku-actions > span { color: var(--muted); font-size: 11px; margin-right: auto; }
.product-image-upload { border: 1px dashed var(--line-strong); border-radius: 12px; margin-top: 14px; padding: 14px; }
.product-image-upload-draft {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, .7fr) minmax(150px, .8fr);
  padding: 12px;
  background: var(--surface-soft);
}
.product-image-upload-draft > small { grid-column: 1 / -1; }
.product-image-upload-draft.succeeded { border-color: rgba(72, 203, 154, .42); }
.product-image-upload-actions { margin-top: 12px; }
.product-image-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 16px; }
.product-image-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 12px;
  background: var(--surface-soft);
}
.product-image-card > img { aspect-ratio: 1; border-radius: 10px; object-fit: contain; width: 100%; background: #fff; }
.product-image-card > small { color: var(--muted); overflow-wrap: anywhere; }
.product-image-fields { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-image-actions { flex-wrap: wrap; justify-content: flex-start; }
.product-library-view :is(input, textarea, select, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .product-library-layout { grid-template-columns: 1fr; }
  .product-library-head { grid-template-columns: 1fr; }
  .product-library-filters {
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-content: stretch;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .product-library-filters {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }
  #newProductCard,
  .product-library-toggle { align-self: flex-start; }
  .product-library-search { width: 100%; }
  .product-facts-grid,
  .product-sku-fields,
  .product-sku-overrides,
  .product-image-fields,
  .product-image-upload-draft { grid-template-columns: 1fr; }
  .product-facts-grid .wide,
  .product-image-upload-draft > small { grid-column: auto; }
  .product-editor-heading,
  .product-editor-section > header,
  .product-image-upload-actions { align-items: stretch; flex-direction: column; }
  .product-editor-actions { flex-wrap: wrap; }
}

.product-card-fill-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.product-card-fill-tools.compact { margin-bottom: 12px; }
.product-card-source-badge {
  background: rgba(111, 87, 255, .12);
  border: 1px solid rgba(111, 87, 255, .28);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
}
.product-card-chooser-modal {
  align-items: center;
  background: rgba(18, 22, 35, .58);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 24px;
  position: fixed;
  z-index: 140;
}
.product-card-chooser-modal[hidden] { display: none; }
.product-card-chooser-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(12, 18, 32, .3);
  max-height: min(780px, calc(100vh - 48px));
  max-width: 920px;
  overflow: auto;
  padding: 22px;
  width: min(100%, 920px);
}
.product-card-chooser-dialog:focus { outline: none; }
.product-card-chooser-head,
.product-card-chooser-actions {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.product-card-chooser-head p { color: var(--muted); font-size: 11px; letter-spacing: .12em; margin: 0 0 4px; }
.product-card-chooser-head h2,
.product-card-chooser-step h3 { margin: 0; }
.product-card-chooser-close {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 22px;
  height: 38px;
  width: 38px;
}
.product-card-chooser-status { color: var(--muted); min-height: 22px; padding: 10px 0; }
.product-card-chooser-status[data-tone="error"] { color: var(--danger); }
.product-card-chooser-step > p { color: var(--muted); }
.product-card-chooser-search { display: grid; gap: 7px; }
.product-card-chooser-search input {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 11px 12px;
}
.product-card-chooser-cards,
.product-card-chooser-options,
.product-card-conflict-list { display: grid; gap: 10px; margin: 14px 0; }
.product-card-chooser-card,
.product-card-chooser-option,
.product-card-conflict {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  padding: 12px;
  text-align: left;
}
.product-card-chooser-card { display: grid; gap: 4px; width: 100%; }
.product-card-chooser-card span,
.product-card-chooser-card small,
.product-card-chooser-option small,
.product-card-conflict small { color: var(--muted); }
.product-card-chooser-option { align-items: start; display: grid; gap: 8px; grid-template-columns: auto 1fr; }
.product-card-chooser-images {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  margin: 14px 0;
}
.product-card-chooser-image {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 10px;
}
.product-card-chooser-image img { aspect-ratio: 1; background: #fff; border-radius: 10px; object-fit: contain; width: 100%; }
.product-card-chooser-image span { align-items: start; display: grid; gap: 3px; grid-template-columns: auto 1fr; }
.product-card-chooser-image small { color: var(--muted); }
.product-card-conflict { display: grid; gap: 10px; }
.product-card-conflict-values { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card-conflict-values label { align-items: start; display: grid; gap: 7px; grid-template-columns: auto 1fr; }
.product-card-conflict-values code { overflow-wrap: anywhere; white-space: pre-wrap; }
.product-card-sku-review-groups,
.product-card-image-review { display: grid; gap: 10px; }
.product-card-sku-review-groups h4,
.product-card-image-review h4 { margin: 8px 0 0; }
.product-card-sku-review-group { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 8px; padding: 12px; }
.product-card-sku-review-group div { display: grid; gap: 4px; }
.product-card-sku-review-group code { overflow-wrap: anywhere; white-space: pre-wrap; }
.product-card-image-review article { align-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 10px; grid-template-columns: 52px 1fr; padding: 8px; }
.product-card-image-review img { background: #fff; border-radius: 8px; height: 52px; object-fit: contain; width: 52px; }
.product-card-chooser-actions { gap: 10px; margin-top: 16px; }
.product-card-chooser-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .product-card-chooser-modal { align-items: end; padding: 0; }
  .product-card-chooser-dialog { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .product-card-conflict-values { grid-template-columns: 1fr; }
}

/* Saved history selection and downloads */
.history-download-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 10px;
}

.history-select-visible {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: var(--surface-soft);
  cursor: pointer;
}

.history-select-visible input,
.history-select-control input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

#historySelectedCount {
  min-width: 72px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

#historyDownloadSelected {
  width: auto;
  min-height: 36px;
  padding: 0 16px;
}

#historyDownloadSelected:disabled,
.history-select-visible:has(input:disabled) {
  cursor: not-allowed;
  opacity: .48;
}

.history-download-feedback {
  min-height: 22px;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.history-grid {
  align-items: stretch;
}

.history-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.history-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 34%, transparent);
}

.history-thumb,
.history-thumb.single {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: none;
}

.history-thumb.remote {
  display: grid;
  place-items: center;
  background: #f3f5f7;
  cursor: zoom-in;
}

.history-thumb.remote img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f3f5f7;
}

.history-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.history-card-body p {
  margin-bottom: 0;
}

.history-select-control {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  color: #252422;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 14px rgba(37, 36, 34, .12);
  cursor: pointer;
}

.history-select-control:has(input:disabled) {
  cursor: not-allowed;
  opacity: .65;
}

html[data-theme="day"] .history-card.is-selected {
  border-color: #eb5e28;
  box-shadow: 0 0 0 2px rgba(235, 94, 40, .2);
}

html[data-theme="day"] .history-select-visible {
  border-color: var(--line);
  color: #403d39;
  background: rgba(255, 252, 242, .9);
}

@media (max-width: 1050px) {
  .history-download-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .history-download-feedback {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .history-download-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .history-select-visible {
    grid-column: 1 / -1;
  }
}

/* Five-module homepage and AI SKU image workspace */
.method-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 20px;
  margin-top: 24px;
}

.method-creation-zone > header,
.method-tool-zone > header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.method-creation-zone > header span,
.method-tool-zone > header span {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: .12em;
}

.method-creation-zone > header h3,
.method-tool-zone > header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 540;
}

.method-home-layout .method-picker {
  margin-top: 0;
}

.method-tool-zone {
  display: grid;
  grid-template-rows: auto 1fr;
}

.tool-method-list {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

.tool-method {
  min-height: 0;
  padding: 28px;
}

.tool-method > strong {
  margin-top: 48px;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.2;
}

.tool-method > p {
  display: block;
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.tool-method .method-action {
  margin-top: auto;
  padding-top: 16px;
  font-size: 15px;
}

.tool-method .method-status {
  top: 24px;
  right: 24px;
  padding: 6px 10px;
  font-size: 12px;
}

.sku-tool-method {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.sku-image-heading {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.sku-image-heading h2,
.sku-image-result-group h3,
.sku-image-result-group p {
  margin: 0;
}

.sku-image-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr);
  gap: 18px;
}

.sku-image-layout > * {
  min-width: 0;
}

.sku-image-input-panel,
.sku-image-results,
.sku-image-result-group {
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.sku-image-input-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.sku-image-input-panel > label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 13px;
}

.sku-image-input-panel input:not([type="checkbox"]),
.sku-image-input-panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--text);
  background: var(--surface-raised);
}

.sku-image-input-panel textarea {
  min-height: 76px;
  resize: vertical;
}

.sku-image-upload {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--surface-soft);
}

.sku-image-file-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sku-image-file-previews:empty {
  display: none;
}

.sku-image-file-previews img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--control-radius);
  object-fit: contain;
  background: #fff;
}

.sku-image-results {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.sku-image-result-group {
  padding: 18px;
}

.sku-image-result-group > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.sku-image-result-group p,
.sku-image-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}

.sku-image-progress {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface-soft);
}

.sku-image-progress > strong { font-size: 13px; }
.sku-image-slot-progress { display: grid; gap: 6px; }
.sku-image-slot-status { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.sku-image-slot-status .sku-image-slot-task-id {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}
.sku-image-slot-status.is-active { color: var(--accent); }
.sku-image-slot-status.is-success { color: var(--mint); }
.sku-image-slot-status.is-failed { color: var(--danger); }

.sku-image-candidate-grid {
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}

.sku-image-skeleton {
  aspect-ratio: 1 / 1;
  border-radius: var(--control-radius);
  background: linear-gradient(110deg, var(--surface-soft) 25%, color-mix(in srgb, var(--surface-soft) 55%, white) 50%, var(--surface-soft) 75%);
  background-size: 200% 100%;
  animation: sku-image-skeleton-pulse 1.2s ease-in-out infinite;
}

@keyframes sku-image-skeleton-pulse {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.sku-image-candidate {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--control-radius);
  color: var(--text-soft);
  background: var(--surface-soft);
  text-align: left;
}

.sku-image-candidate img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
}

.sku-image-candidate-label {
  display: block;
  padding: 10px 12px;
  font-size: 12px;
}

#skuImageGenerate:disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
  transform: none;
}

#skuImageGenerate:disabled:hover {
  box-shadow: none;
}

@media (max-width: 900px) {
  .method-home-layout,
  .sku-image-layout {
    grid-template-columns: 1fr;
  }

  .tool-method-list {
    height: auto;
  }

  .method-home-layout .method-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sku-image-candidate-grid {
    grid-template-columns: 1fr;
  }
}
