/* 工具壳使用中性表面；只有作品预览随主题变化，操作与焦点保持同一语义。 */
:root {
  color-scheme: light;
  --ink: #202226;
  --muted: #626871;
  --line: #e0e2e6;
  --blue: #225bd6;
  --surface: #fff;
  --canvas: #fff;
}
body {
  background: #fafbfc;
}
button,
textarea,
input,
select {
  font: inherit;
}
button {
  min-height: 36px;
}
:focus-visible {
  outline: 3px solid #225bd6;
  outline-offset: 3px;
}
main {
  max-width: 1600px;
  padding: 0 32px;
}
.workflow-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 38px;
  padding: 18px 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
}
.workflow-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.workflow-steps li span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid #cdd0d6;
}
.workflow-steps [aria-current] {
  color: var(--ink);
  font-weight: 600;
}
.workflow-steps [aria-current] span {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.file-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
body[data-phase="empty"] .workflow-steps {
  display: none;
}
#entry {
  max-width: 1160px;
  margin: 56px auto 0;
}
.entry-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: stretch;
  gap: 48px;
}
/* 首屏背景取自当前示例封面：大幅模糊后只留色调，点阵与左侧浅色渐变保证标题和上传区可读。 */
.entry-backdrop {
  position: absolute;
  inset: -56px -96px -48px;
  left: max(-96px, calc((100% - 100vw) / 2));
  right: max(-96px, calc((100% - 100vw) / 2));
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 12% 20%, #dfe8ff 0%, transparent 70%),
    radial-gradient(50% 60% at 40% 90%, #f3e6ff 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 50% 55% at 50% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 55% at 50% 45%, #000 55%, transparent 100%);
}
.entry-backdrop img {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(56px) saturate(1.35);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.entry-backdrop img.is-ready {
  opacity: 0.55;
}
.entry-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    #fafbfcbf 0%,
    #fafbfc80 42%,
    #fafbfc33 70%,
    transparent 100%
  );
}
.entry-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: radial-gradient(#20222624 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(70% 80% at 22% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 80% at 22% 40%, #000 0%, transparent 75%);
}
.entry-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.entry-heading {
  margin-bottom: 28px;
}
.entry-heading .eyebrow {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0;
}
.entry-heading h1 {
  margin: 12px 0 14px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.22;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.entry-heading p {
  max-width: 440px;
  line-height: 1.6;
}
.upload-zone {
  border: 1px dashed #aeb5bf;
  border-radius: 12px;
  background: #ffffffd9;
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 10px;
  padding: 20px 20px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover {
  border-color: #7d8692;
}
.upload-zone.dragging {
  border-color: var(--blue);
  background: #eef3ff;
}
.upload-icon {
  width: 32px;
  height: 32px;
  color: #6a7380;
}
.upload-copy {
  min-width: 0;
}
.upload-zone h2 {
  margin-bottom: 2px;
}
.upload-zone .primary {
  min-width: 132px;
}
.file-formats {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid #eceef1;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 550;
}
.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.primary:hover {
  background: #1747af;
  border-color: #1747af;
}
.secondary {
  color: var(--ink);
  background: white;
  border-color: #d5d9df;
}
.secondary:hover {
  background: #f0f2f5;
}
.tool-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 6px 8px;
  border-radius: 5px;
}
.tool-button:hover {
  background: #eceef1;
  color: var(--ink);
}
.tool-button[aria-pressed="true"] {
  background: #eef3ff;
  color: #1747af;
}
.example-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px -28px #20222659;
}
.example-art {
  flex: 1;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}
.example-art {
  background: linear-gradient(160deg, #eef1f5, #e3e7ed);
}
.example-stack {
  position: absolute;
  inset: 44px 28px 26px;
}
.example-sample {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #dfe3e9;
  box-shadow: 0 14px 30px -18px #20222680;
  transform: translate(calc(var(--depth) * 14px), calc(var(--depth) * -12px))
    scale(calc(1 - var(--depth) * 0.06));
  transform-origin: 100% 0;
  z-index: calc(10 - var(--depth));
  opacity: calc(1 - var(--depth) * 0.18);
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.45s ease;
}
.example-sample img,
.example-sample video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.example-sample img {
  transition: transform 6s ease;
}
.example-sample video {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.example-sample.is-playing video {
  opacity: 1;
}
.example-card:hover .example-sample:not([aria-hidden]) img {
  transform: scale(1.04);
}
.example-card:hover .example-sample[aria-hidden] {
  transform: translate(calc(var(--depth) * 20px), calc(var(--depth) * -16px))
    scale(calc(1 - var(--depth) * 0.06));
}
.example-motion {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #202226d9;
  color: white;
  line-height: 1;
}
.example-sample[aria-hidden] .example-motion {
  display: none;
}
.example-stack[data-loading] {
  border-radius: 10px;
  background: #dfe3e9;
}
.example-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.example-tag {
  position: absolute;
  z-index: 20;
  left: 16px;
  top: 14px;
  padding: 3px 9px;
  border-radius: 4px;
  background: #202226d9;
  color: #fff;
}
.example-caption {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.example-caption h2 {
  margin-bottom: 3px;
}
.example-caption button {
  flex-shrink: 0;
}
.entry-foot {
  max-width: 480px;
  margin: 14px 0 0;
  line-height: 1.55;
}
#entry-status:empty {
  display: none;
}
.builtin-gallery {
  margin: 56px auto 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.builtin-heading h2 {
  margin: 5px 0 6px;
}
.builtin-eyebrow {
  color: var(--blue);
  font-weight: 600;
}
.builtin-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.builtin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  max-width: 360px;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  background: white;
  border: 1px solid #d5d9df;
  border-radius: 7px;
}
.builtin-search:focus-within {
  outline: 3px solid #225bd6;
  outline-offset: 3px;
}
.builtin-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
}
.builtin-search .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.builtin-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.builtin-filters button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}
.builtin-filters button:hover {
  background: #eef0f3;
  color: var(--ink);
}
.builtin-filters button[aria-pressed="true"] {
  background: #eef3ff;
  color: #1747af;
  border-color: #d9e5ff;
  font-weight: 600;
}
.builtin-status {
  margin: 16px 0 12px;
}
.builtin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
dialog.builtin-preview {
  width: min(880px, calc(100vw - 32px));
}
dialog.builtin-preview[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.builtin-preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.builtin-preview-heading {
  flex: 1;
  min-width: 0;
}
.builtin-preview-heading h3 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.builtin-preview-heading h3:focus {
  outline: none;
}
.builtin-preview-close {
  display: inline-flex;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}
/* 弹窗是纵向 flex，示意窗不能被压扁，否则任务卡会盖住标题；矮屏时按高度收窄宽度。 */
.builtin-preview .builtin-concept {
  flex-shrink: 0;
  width: min(100%, (90dvh - 130px) * 1.6);
  margin: 0 auto;
  box-shadow: 0 18px 36px -24px #0009;
}
/* 手机上的预览窗只有约 360px 宽，任务卡会盖住标题，只保留标题和输入框。 */
@container concept (max-width: 560px) {
  .builtin-concept .concept-tasks,
  .builtin-concept .concept-live {
    display: none;
  }
}
.builtin-concept > video {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.builtin-concept.is-playing > video {
  opacity: 1;
}
.builtin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.builtin-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8ebef;
}
.builtin-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.builtin-card-cover video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.builtin-card-cover.is-playing video {
  opacity: 1;
}
.builtin-card-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #202226d9;
  color: white;
  line-height: 1;
}
.builtin-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: start;
  gap: 8px;
  padding: 16px;
}
.builtin-card-body h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.builtin-card-description {
  flex: 1;
  line-height: 1.55;
}
.builtin-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  width: 100%;
  margin-top: 4px;
}
.builtin-card-download,
.builtin-card-try,
.builtin-card-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 600;
  cursor: pointer;
}
.builtin-card-download {
  color: #1747af;
}
.builtin-card-try {
  color: var(--ink);
}
.builtin-card-open {
  margin-left: auto;
  color: var(--muted);
}
.builtin-card-download:hover,
.builtin-card-try:hover,
.builtin-card-open:hover {
  color: #1747af;
  text-decoration: underline;
}
.builtin-empty {
  padding: 32px 16px;
  border: 1px dashed #d5d9df;
  border-radius: 10px;
  background: white;
  text-align: center;
}
.builtin-foot {
  margin-top: 16px;
  line-height: 1.5;
}
@media (max-width: 1000px) {
  .builtin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .builtin-gallery {
    margin-top: 38px;
    padding-top: 24px;
  }
  .builtin-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .builtin-search {
    flex: initial;
    max-width: none;
  }
  .builtin-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  dialog.builtin-preview[open] {
    padding: 16px;
  }
  /* 手机上任务卡已隐藏，固定 380px 高会在标题下留出大块空白，改为按内容撑开。 */
  .builtin-preview .builtin-concept {
    height: auto;
  }
  .builtin-preview .builtin-concept .concept-page,
  .builtin-preview .builtin-concept .concept-hero {
    flex: 0 0 auto;
  }
  .builtin-preview .builtin-concept .concept-hero {
    gap: 24px;
    padding: 14px 16px 18px;
  }
}
.inline-error {
  color: #ad302b;
  text-align: center;
  margin-top: 12px;
}
.inline-error:empty {
  display: none;
}
#workspace {
  padding-bottom: 190px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px;
  gap: 16px;
}
body:not([data-phase="empty"]) .workflow-steps {
  padding: 12px 0;
}
.workspace-heading > div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.workspace-heading h1 {
  margin-bottom: 0;
}
.preview-jump {
  display: none;
}
.design-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 24px;
  align-items: start;
}
.design-stage {
  min-width: 0;
  scroll-margin-top: 16px;
}
.canvas-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}
#preview-state {
  color: var(--ink);
}
body[data-phase="result"] #preview-state {
  color: #266d48;
}
.canvas-frame {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.canvas-toolbar,
.preview-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  gap: 10px;
}
.canvas-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
.segments {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #f0f2f5;
  border-radius: 7px;
}
.segments button {
  color: var(--muted);
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: var(--text-ui-sm);
  min-height: 34px;
  white-space: nowrap;
}
.segments button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #2022261a;
}
.segments button:hover {
  background: #e4e7eb;
}
.canvas-frame .tool-button {
  color: var(--muted);
}
.canvas-frame .tool-button:hover {
  background: #f0f2f5;
  color: var(--ink);
}
.canvas-frame .tool-button[aria-pressed="true"] {
  background: #eef3ff;
  color: #1747af;
}
.canvas-mat {
  padding: 8px 18px;
}
.preview-bottom {
  margin: 0;
}
.preview-note {
  margin-top: 10px;
}
#design-status {
  margin-top: 8px;
  overflow-wrap: anywhere;
}
#design-status:empty {
  display: none;
}
.inspector {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.inspector-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.inspector-section:last-child {
  border-bottom: 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title h2 {
  margin: 0;
}
.media-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.media-strip img {
  width: 60px;
  height: 48px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}
.media-caption {
  min-width: 0;
}
.media-caption strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#media-note {
  overflow-wrap: anywhere;
  margin-top: 3px;
}
#reset-sample {
  padding-left: 0;
}
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 16px;
  margin-top: 0;
}
.field:last-child {
  margin-bottom: 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #cdd2da;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-ui-caption);
}
.field textarea {
  resize: vertical;
  min-height: 92px;
}
.field textarea::placeholder {
  color: #737a84;
}
.brief-heading {
  margin-bottom: 6px;
}
.brief-intro {
  margin-bottom: 16px;
  line-height: 1.55;
}
.brief-section .field {
  margin-bottom: 14px;
}
.brief-examples > p {
  margin-bottom: 8px;
}
.brief-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.brief-chip {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #d9dee5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.brief-chip:hover {
  border-color: #9da9b8;
  background: #f6f8fa;
}
.prompt-assist {
  margin-top: 16px;
}
.prompt-actions,
.suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.prompt-actions .secondary,
.suggestion-actions .secondary {
  min-height: 36px;
  padding: 6px 12px;
  gap: 6px;
}
.prompt-assist > p {
  margin-top: 8px;
  line-height: 1.5;
}
#prompt-status:empty {
  display: none;
}
.prompt-suggestion {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d6e1f5;
  border-radius: 8px;
  background: #f7f9fd;
}
.suggestion-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
}
#prompt-result {
  margin: 10px 0 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.preferences {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
#video-options {
  margin-top: 16px;
}
#video-options .preferences {
  margin-top: 0;
}
summary {
  cursor: pointer;
  min-height: 30px;
  padding: 3px 0;
}
summary .muted {
  float: right;
}
.details-note {
  margin: 10px 0 14px;
}
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.style-choice {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 6px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.style-choice:hover {
  border-color: #aab4c3;
  box-shadow: 0 2px 8px -4px #1d2a3f40;
}
.style-choice[aria-checked="true"] {
  border-color: var(--blue);
  background: #f4f7ff;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.style-choice[aria-checked="true"]::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/100% no-repeat;
  box-shadow: 0 0 0 2px #fff;
}
.style-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 8px 3px 0;
}
.style-choice strong {
  min-width: 0;
  font-size: var(--text-ui-sm);
  font-weight: 600;
  white-space: nowrap;
}
.style-choice small {
  display: block;
  margin: 2px 3px 0;
  color: var(--muted);
  font-size: var(--text-ui-xs);
  line-height: 1.35;
}
.style-swatches {
  display: flex;
  flex-shrink: 0;
}
.style-swatches i {
  width: 9px;
  height: 9px;
  margin-left: -2px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px #fff, inset 0 0 0 1px #0000001f;
}
.style-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f6f8;
  line-height: 1.5;
}
.style-detail dt {
  color: var(--muted);
  white-space: nowrap;
}
.style-detail dd {
  margin: 0;
  color: var(--ink);
}
.design-preferences {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
}
.design-preferences .field {
  gap: 5px;
  margin-bottom: 0;
}
.preference-note {
  line-height: 1.35;
}
.preference-legend {
  margin-top: 10px;
  line-height: 1.5;
}
/* 迷你窗口只用各风格自身的浅色板和形态语法，与右侧预览的 data-style 规则保持一致。 */
.mini {
  display: flex;
  height: 62px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--sample-bg);
  box-shadow: inset 0 0 0 1px #0000000f;
}
.mini i,
.mini b {
  display: block;
}
.mini-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 27%;
  padding: 5px 4px;
  background: var(--sample-panel);
  border-right: 1px solid color-mix(in srgb, var(--sample-fg) 10%, transparent);
}
.mini-dots {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
}
.mini-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sample-sub) 45%, transparent);
}
.mini-nav {
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--sample-sub) 22%, transparent);
}
.mini-nav.is-active {
  background: color-mix(in srgb, var(--sample-accent) 70%, transparent);
}
.mini-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px;
}
.mini-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 72%;
  padding: 3px;
  border-radius: 3px;
  background: var(--sample-panel);
}
.mini-msg i {
  height: 2px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--sample-fg) 45%, transparent);
}
.mini-msg i + i {
  width: 65%;
  background: color-mix(in srgb, var(--sample-sub) 35%, transparent);
}
.mini-msg.is-user {
  align-self: flex-end;
  width: 38%;
  background: color-mix(in srgb, var(--sample-accent) 16%, var(--sample-panel));
}
.mini-input {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 13px;
  margin-top: auto;
  padding: 0 3px 0 5px;
  border: 1px solid color-mix(in srgb, var(--sample-accent) 45%, transparent);
  border-radius: 3px;
  background: var(--sample-panel);
}
.mini-input i {
  flex: 1;
  height: 2px;
  background: color-mix(in srgb, var(--sample-sub) 30%, transparent);
}
.mini-input b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sample-accent);
}
/* 极简：连续内容面，不套气泡。 */
.style-choice[data-style="minimal"] .mini-msg:not(.is-user) {
  padding-inline: 0;
  background: none;
}
.style-choice[data-style="minimal"] .mini-input {
  border-color: color-mix(in srgb, var(--sample-fg) 25%, transparent);
  border-radius: 2px;
}
/* 纸墨：纸面色阶、墨线分隔、印记式发送。 */
.style-choice[data-style="ink"] .mini {
  border-radius: 1px;
}
.style-choice[data-style="ink"] .mini-side {
  background: color-mix(in srgb, var(--sample-panel) 55%, transparent);
  border-right-color: color-mix(in srgb, var(--sample-fg) 35%, transparent);
}
.style-choice[data-style="ink"] .mini-nav {
  height: 2px;
  border-radius: 0;
}
.style-choice[data-style="ink"] .mini-msg {
  border-radius: 0;
  background: none;
  border-bottom: 1px solid color-mix(in srgb, var(--sample-fg) 14%, transparent);
}
.style-choice[data-style="ink"] .mini-msg.is-user {
  background: color-mix(in srgb, var(--sample-panel) 70%, transparent);
}
.style-choice[data-style="ink"] .mini-input {
  border-width: 0 0 1px;
  border-color: var(--sample-fg);
  border-radius: 0;
  background: none;
}
.style-choice[data-style="ink"] .mini-input b {
  border-radius: 1px;
}
/* 青玉：温润实体与细高光边缘。 */
.style-choice[data-style="jade"] .mini {
  border-radius: 6px;
}
.style-choice[data-style="jade"] .mini-side {
  margin: 3px 0 3px 3px;
  border: 0;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 #ffffffb0, 0 1px 3px #122a2226;
}
.style-choice[data-style="jade"] .mini-msg {
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #ffffffb0, 0 1px 2px #122a221f;
}
.style-choice[data-style="jade"] .mini-input {
  border-width: 1.5px;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 #ffffffb0;
}
/* 赛博：硬边分区，信号色只出现在活动项与输入区。 */
.style-choice[data-style="cyber"] .mini {
  border-radius: 0;
}
.style-choice[data-style="cyber"] .mini-side {
  border-right-color: color-mix(in srgb, var(--sample-accent) 45%, transparent);
}
.style-choice[data-style="cyber"] .mini-nav {
  border-radius: 0;
}
.style-choice[data-style="cyber"] .mini-nav.is-active {
  background: color-mix(in srgb, var(--sample-accent) 18%, transparent);
  box-shadow: inset 2px 0 0 var(--sample-accent);
}
.style-choice[data-style="cyber"] .mini-msg {
  border-radius: 0;
  border-top: 1px solid color-mix(in srgb, var(--sample-accent) 55%, transparent);
}
.style-choice[data-style="cyber"] .mini-input {
  border-left-width: 3px;
  border-radius: 0;
}
.style-choice[data-style="cyber"] .mini-input b {
  border-radius: 0;
}
/* 玻璃：素材透出，侧栏与阅读面不同透明度，主按钮保持实色。 */
.style-choice[data-style="glass"] .mini {
  background: url("/sample-landscape.png") center/cover;
}
.style-choice[data-style="glass"] .mini-side {
  background: color-mix(in srgb, var(--sample-panel) 42%, transparent);
  border-right-color: color-mix(in srgb, var(--sample-panel) 60%, transparent);
  backdrop-filter: blur(3px);
}
.style-choice[data-style="glass"] .mini-msg {
  border-radius: 4px;
  background: color-mix(in srgb, var(--sample-panel) 62%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sample-panel) 70%, transparent);
}
.style-choice[data-style="glass"] .mini-msg.is-user {
  background: color-mix(in srgb, var(--sample-panel) 82%, transparent);
}
.style-choice[data-style="glass"] .mini-input {
  border-color: color-mix(in srgb, var(--sample-panel) 85%, transparent);
  border-radius: 5px;
  background: color-mix(in srgb, var(--sample-panel) 80%, transparent);
}
/* 自然：圆润无框的稳定实体。 */
.style-choice[data-style="nature"] .mini {
  border-radius: 8px;
}
.style-choice[data-style="nature"] .mini-side {
  margin: 3px 0 3px 3px;
  border: 0;
  border-radius: 7px;
}
.style-choice[data-style="nature"] .mini-nav {
  height: 5px;
  border-radius: 3px;
}
.style-choice[data-style="nature"] .mini-msg {
  border-radius: 6px;
}
.style-choice[data-style="nature"] .mini-input {
  border: 0;
  border-radius: 999px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--sample-fg) 16%, transparent);
}
/* 电影：画面铺满，侧栏与底部渐隐为暗场，只有输入区是实体。 */
.style-choice[data-style="cinema"] .mini {
  background:
    linear-gradient(90deg, #0b0b0ce6, transparent 40%),
    linear-gradient(180deg, transparent 35%, #0b0b0cf0),
    url("/sample-landscape.png") center/cover;
}
.style-choice[data-style="cinema"] .mini-side {
  background: none;
  border: 0;
}
.style-choice[data-style="cinema"] .mini-msg {
  background: none;
}
.style-choice[data-style="cinema"] .mini-msg i {
  background: #f1ede6b3;
}
.style-choice[data-style="cinema"] .mini-msg.is-user {
  background: #ffffff1f;
}
.style-choice[data-style="cinema"] .mini-input {
  border: 0;
  background: #151517;
}
.style-choice[data-style="cinema"] .mini-input b {
  background: #e8a15a;
}
/* 杂志：直角纸面、粗细横线与醒目标题块。 */
.style-choice[data-style="editorial"] .mini {
  border-radius: 0;
}
.style-choice[data-style="editorial"] .mini-side {
  border-right: 1px solid var(--sample-fg);
}
.style-choice[data-style="editorial"] .mini-nav {
  height: 1px;
  border-radius: 0;
  background: color-mix(in srgb, var(--sample-fg) 30%, transparent);
}
.style-choice[data-style="editorial"] .mini-nav.is-active {
  height: 3px;
  background: var(--sample-accent);
}
.style-choice[data-style="editorial"] .mini-msg {
  width: 100%;
  padding-inline: 0;
  border-radius: 0;
  background: none;
  border-top: 2px solid var(--sample-fg);
}
.style-choice[data-style="editorial"] .mini-msg i:first-child {
  height: 4px;
  background: var(--sample-fg);
}
.style-choice[data-style="editorial"] .mini-msg.is-user {
  border-top-width: 1px;
}
.style-choice[data-style="editorial"] .mini-input {
  border-width: 1px 0;
  border-color: var(--sample-fg);
  border-radius: 0;
  background: none;
}
.style-choice[data-style="editorial"] .mini-input b {
  border-radius: 0;
}
/* 撞色：粗轮廓与偏移硬阴影。 */
.style-choice[data-style="pop"] .mini {
  border-radius: 6px;
  box-shadow: inset 0 0 0 1.5px var(--sample-fg);
}
.style-choice[data-style="pop"] .mini-side {
  border-right: 1.5px solid var(--sample-fg);
  border-radius: 6px 0 0 6px;
}
.style-choice[data-style="pop"] .mini-nav.is-active {
  background: var(--sample-accent);
  box-shadow: 1px 1px 0 var(--sample-fg);
}
.style-choice[data-style="pop"] .mini-msg {
  border: 1.5px solid var(--sample-fg);
  box-shadow: 2px 2px 0 var(--sample-fg);
}
.style-choice[data-style="pop"] .mini-msg.is-user {
  background: #ffcf3f;
}
.style-choice[data-style="pop"] .mini-input {
  border: 1.5px solid var(--sample-fg);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--sample-fg);
}
.style-choice[data-style="pop"] .mini-input b {
  border-radius: 2px;
}
/* 梦幻：柔光渐层与圆润轻面板。 */
.style-choice[data-style="dream"] .mini {
  border-radius: 8px;
  background:
    radial-gradient(70% 70% at 85% 10%, color-mix(in srgb, var(--sample-accent) 40%, transparent), transparent 70%),
    radial-gradient(60% 60% at 10% 100%, #f7c6e5aa, transparent 70%),
    var(--sample-bg);
}
.style-choice[data-style="dream"] .mini-side {
  margin: 3px 0 3px 3px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--sample-panel) 60%, transparent);
}
.style-choice[data-style="dream"] .mini-nav {
  border-radius: 3px;
}
.style-choice[data-style="dream"] .mini-msg {
  border-radius: 6px;
  background: color-mix(in srgb, var(--sample-panel) 75%, transparent);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--sample-accent) 30%, transparent);
}
.style-choice[data-style="dream"] .mini-input {
  border: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sample-accent) 25%, transparent),
    0 1px 5px color-mix(in srgb, var(--sample-accent) 35%, transparent);
}
.style-choice[data-style="dream"] .mini-input b {
  background: linear-gradient(135deg, var(--sample-accent), #f29ad0);
}
.design-details h2 {
  margin-top: 10px;
}
.design-details p {
  margin-top: 8px;
}
.design-details ul {
  padding-left: 18px;
}
.palette {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.palette span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #0002;
}
.prompt-details p,
.prompt-details button,
.prompt-details details {
  margin-top: 12px;
}
.prompt-details pre {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.candidate-return {
  display: none;
}
#candidate-panel {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
#candidate-panel .section-title {
  display: block;
}
#candidate-panel .section-title span {
  display: block;
  margin-top: 4px;
}
#candidate-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.candidate-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  text-align: left;
  gap: 3px 10px;
  padding: 10px;
  border: 1px solid #cdd2da;
  background: white;
  color: var(--ink);
  border-radius: 8px;
}
.candidate-choice[aria-pressed="true"] {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  background: #f3f6ff;
}
.candidate-art {
  height: 62px;
  grid-column: 1;
  grid-row: 1 / 4;
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}
.candidate-colors {
  grid-column: 1;
  grid-row: 4;
  display: flex;
  gap: 3px;
}
.candidate-colors i {
  height: 5px;
  flex: 1;
  border-radius: 2px;
}
.candidate-choice > span:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}
.candidate-choice > strong {
  grid-column: 2;
  grid-row: 2;
  overflow-wrap: anywhere;
}
.candidate-choice > span:last-child {
  grid-column: 2;
  grid-row: 3 / 5;
  color: var(--muted);
  font-size: var(--text-ui-sm);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.candidate-details {
  margin-top: 12px;
}
.candidate-details p {
  margin-top: 8px;
}
.action-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 24px #18233408;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.action-context {
  min-width: 0;
  max-width: 800px;
}
.action-context strong {
  display: block;
}
.action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#generation-status {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  max-height: 66px;
  overflow: auto;
}
#generation-status:empty {
  display: none;
}
#action-hint {
  margin-top: 3px;
}
body[data-phase="result"] #generate-design {
  background: transparent;
  color: var(--muted);
  border-color: #d5d9df;
}
body[data-phase="generating"] .canvas-frame {
  opacity: 0.7;
}
dialog {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 24px 80px #0004;
}
dialog::backdrop {
  background: #10182066;
}
.dialog-heading,
.inspector-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.dialog-heading .eyebrow {
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: 0;
  font-weight: 400;
}
.dialog-content {
  padding: 24px;
}
#download-theme {
  width: 100%;
}
.export-help {
  margin: 16px 0 22px;
}
#legacy-options {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
#legacy-options p {
  margin: 8px 0 12px;
}
#export-status {
  margin-top: 16px;
}
#ai-form .inspector-section {
  padding: 24px;
}
#ai-form p {
  margin-bottom: 16px;
}
#ai-settings-status {
  margin-top: 12px;
}
/* 预览按真实客户端组织：素材铺满窗口，侧栏、标题区、任务卡和输入框都是浮在画面上的半透明层。 */
.concept {
  --bg: #eef0f2;
  --panel: #fff;
  --fg: #20252c;
  --accent: #28587c;
  --sub: #59636f;
  --radius: 12px;
  --opacity: 62%;
  --side-opacity: calc(var(--opacity) - 14%);
  --edge: 1px;
  --blur: 8px;
  --pad: 16px;
  --border: color-mix(in srgb, var(--fg) 14%, transparent);
  --shadow: 0 10px 28px -12px #0000004d;
  --glass: color-mix(in srgb, var(--panel) var(--opacity), transparent);
  --glass-side: color-mix(in srgb, var(--panel) var(--side-opacity), transparent);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: clamp(132px, 17%, 220px) minmax(0, 1fr);
  width: min(100%, max(520px, (100vh - 240px) * 1.6));
  aspect-ratio: 16 / 10;
  margin-inline: auto;
  container: concept / inline-size;
  border: 1px solid #00000026;
  border-radius: 12px;
  color: var(--fg);
  background: var(--bg);
  box-shadow: 0 26px 50px -26px #000a;
}
.concept > img,
.concept > video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.concept::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 40%,
    color-mix(in srgb, var(--bg) 14%, transparent)
  );
}
.concept i {
  font-style: normal;
}
.concept-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px 10px;
  background: var(--glass-side);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  border-right: var(--edge) solid var(--border);
}
.window-dots {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  margin: 0 0 12px 4px;
}
.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5f57;
}
.window-dots i:nth-child(2) {
  background: #febc2e;
}
.window-dots i:nth-child(3) {
  background: #28c840;
}
.concept-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 10px;
  font-size: var(--text-ui-base);
}
.concept-brand i {
  color: var(--accent);
}
.concept .nav,
.concept .sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  padding: 6px 8px;
  border-radius: calc(var(--radius) * 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.concept .nav i {
  width: 14px;
  flex-shrink: 0;
  color: var(--sub);
  text-align: center;
}
.nav-label {
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
  margin: 12px 8px 4px;
  color: var(--sub);
}
.concept .nav b,
.concept .sidebar-bottom b {
  margin-left: auto;
  color: var(--sub);
  font-weight: 400;
}
.concept .nav-project {
  background: color-mix(in srgb, var(--panel) 30%, transparent);
}
.nav-tasks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}
.concept .nav-task {
  display: block;
  color: var(--sub);
}
.concept[data-concept-page="home"] .nav-home,
.concept[data-concept-page="chat"] .nav-chat,
.concept[data-concept-page="settings"] .nav-settings {
  color: var(--fg);
  background: color-mix(in srgb, var(--accent) 22%, var(--glass));
  box-shadow: inset 2px 0 0 var(--accent);
}
.concept .sidebar-bottom {
  position: static;
  margin-top: auto;
  border-top: var(--edge) solid var(--border);
  border-radius: 0;
  padding-top: 10px;
}
.avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.concept-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.concept-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  flex-shrink: 0;
  padding: 0 14px;
  color: var(--sub);
  background: color-mix(in srgb, var(--panel) calc(var(--opacity) - 30%), transparent);
  backdrop-filter: blur(var(--blur));
  border-bottom: var(--edge) solid var(--border);
}
.concept-header span:nth-child(2) {
  color: var(--fg);
  font-weight: 600;
}
.concept-header .header-nav {
  color: var(--fg);
  font-size: var(--text-ui-base);
  opacity: 0.7;
}
.concept-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: var(--pad);
}
.concept-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.concept-page[hidden] {
  display: none;
}
.concept-hero,
.concept-task,
.concept-composer,
.concept-settings,
.concept-message {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  border: var(--edge) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.concept .concept-hero {
  flex: 1;
  background: color-mix(in srgb, var(--panel) calc(var(--opacity) * 0.15), transparent);
  backdrop-filter: none;
  border-radius: calc(var(--radius) * 1.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 18px 22px 24px;
}
.concept-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.badge-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--fg);
  background: color-mix(in srgb, var(--panel) 40%, transparent);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
}
.badge-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.badge-copy strong {
  color: var(--accent);
  font-size: var(--text-ui-base);
}
.badge-copy small {
  color: var(--accent);
  opacity: 0.85;
  font-size: 9px;
  letter-spacing: 0.16em;
}
.concept-live {
  align-self: flex-start;
  margin-left: auto;
  color: var(--fg);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.concept-hero h2 {
  margin: 0;
  font-size: clamp(16px, 3.4cqi, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow:
    0 0 2px color-mix(in srgb, var(--bg) 70%, transparent),
    0 2px 14px color-mix(in srgb, var(--bg) 75%, transparent);
}
.concept-badge,
.concept-live {
  text-shadow: 0 0 2px var(--bg), 0 1px 8px color-mix(in srgb, var(--bg) 80%, transparent);
}
.accent-glyph,
.accent-word {
  color: var(--accent);
}
.accent-glyph {
  margin-right: 12px;
}
.concept-tasks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex-shrink: 0;
}
.concept-task {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px;
}
.concept-task {
  padding: 12px 14px 14px;
}
.concept-task i {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: var(--text-ui-xs);
}
.concept-task strong {
  font-size: var(--text-ui-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.concept-workspace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.15);
  border: var(--edge) solid var(--border);
  border-radius: var(--radius);
}
.concept-workspace span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.concept-workspace small {
  color: var(--sub);
  font-size: 9px;
}
.concept-task span {
  color: var(--sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.concept-composer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  padding: 10px 12px;
  color: var(--sub);
}
.composer-meta,
.composer-foot,
.composer-send-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.composer-foot {
  justify-content: space-between;
}
.composer-send-group > span {
  color: var(--fg);
  text-shadow: 0 0 2px var(--bg), 0 1px 6px color-mix(in srgb, var(--bg) 80%, transparent);
}
.concept-send {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg, var(--panel));
  opacity: 1 !important;
}
#page-chat {
  justify-content: flex-end;
}
.concept-message {
  max-width: 82%;
  padding: 12px 14px;
}
.concept-message p {
  margin-top: 6px;
  color: var(--sub);
}
.concept-message.user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 24%, var(--glass));
}
.concept-settings {
  padding: 14px 16px;
}
.concept-settings h2 {
  margin: 0 0 4px;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child {
  border-bottom: 0;
}
.setting-row strong {
  font-weight: 500;
  color: var(--sub);
}
.switch {
  color: var(--accent);
}
/* 每种风格除了色板与圆角，还要在遮罩、表面材质、标题排印和组件轮廓上形成可辨识的差异。 */
.concept[data-style="minimal"] {
  --radius: 6px;
  --opacity: 94%;
  --side-opacity: 97%;
  --blur: 0px;
  --shadow: none;
}
.concept[data-style="minimal"] .concept-hero h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.concept[data-style="minimal"] .concept-task {
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}
.concept[data-style="minimal"] .concept-task i {
  display: none;
}
.concept[data-style="ink"] {
  --radius: 2px;
  --opacity: 88%;
  --blur: 6px;
  --border: color-mix(in srgb, var(--fg) 26%, transparent);
  --shadow: none;
}
.concept[data-style="ink"]::before {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 55%, transparent), transparent 45%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 18%, transparent), color-mix(in srgb, var(--bg) 46%, transparent));
}
.concept[data-style="ink"] .concept-hero h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.concept[data-style="ink"] .concept-tasks {
  gap: 0;
}
.concept[data-style="ink"] .concept-task {
  border-width: 0 0 0 1px;
  border-color: color-mix(in srgb, var(--fg) 30%, transparent);
  box-shadow: none;
}
.concept[data-style="ink"] .concept-composer {
  border-width: 0 0 2px;
  border-color: var(--fg);
}
.concept[data-style="ink"] .concept-send {
  border-radius: 2px;
}
.concept[data-style="ink"] .badge-copy small {
  letter-spacing: 0.22em;
}
.concept[data-style="jade"] {
  --radius: 16px;
  --opacity: 82%;
  --border: color-mix(in srgb, var(--accent) 30%, transparent);
  --shadow: inset 0 1px 0 #ffffff50, 0 6px 18px #122a2224;
}
.concept[data-style="jade"] .concept-task,
.concept[data-style="jade"] .concept-composer,
.concept[data-style="jade"] .concept-message {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--panel) calc(var(--opacity) + 8%), transparent),
    color-mix(in srgb, var(--panel) calc(var(--opacity) - 6%), transparent)
  );
}
.concept[data-style="jade"] .concept-hero h2 {
  font-weight: 650;
  letter-spacing: 0.02em;
}
.concept[data-style="jade"] .concept-composer {
  border-width: 2px;
}
.concept[data-style="cyber"] {
  --radius: 0px;
  --opacity: 86%;
  --blur: 4px;
  --border: color-mix(in srgb, var(--accent) 45%, transparent);
  --shadow: none;
}
.concept[data-style="cyber"]::before {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 30%, transparent), color-mix(in srgb, var(--bg) 62%, transparent)),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent) 0 1px, transparent 1px 48px);
}
.concept[data-style="cyber"] .concept-header,
.concept[data-style="cyber"] .badge-copy small,
.concept[data-style="cyber"] .concept-live,
.concept[data-style="cyber"] .composer-meta {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.06em;
}
.concept[data-style="cyber"] .concept-hero h2 {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.concept[data-style="cyber"] .concept-composer {
  border-left: 3px solid var(--accent);
}
.concept[data-style="cyber"] .concept-hero,
.concept[data-style="cyber"] .concept-task {
  border-top: 2px solid var(--accent);
}
.concept[data-style="cyber"] .concept-send {
  border-radius: 0;
}
.concept[data-style="glass"] {
  --radius: 14px;
  --opacity: 42%;
  --side-opacity: 36%;
  --blur: 8px;
  --border: color-mix(in srgb, var(--panel) 50%, transparent);
  --shadow: inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent), 0 10px 28px -14px #0006;
}
.concept[data-style="glass"] .concept-composer {
  background: color-mix(in srgb, var(--panel) 66%, transparent);
}
.concept[data-style="nature"] {
  --radius: 22px;
  --opacity: 82%;
  --edge: 0px;
  --pad: 18px;
  --border: color-mix(in srgb, var(--accent) 18%, transparent);
  --shadow: 0 6px 20px -10px #0005;
}
.concept[data-style="nature"] .nav {
  border-radius: 999px;
}
.concept[data-style="nature"] .concept-hero h2 {
  font-weight: 700;
}
.concept[data-style="cinema"] {
  --radius: 10px;
  --opacity: 58%;
  --side-opacity: 0%;
  --blur: 0px;
  --edge: 0px;
  --border: transparent;
  --shadow: none;
}
.concept[data-style="cinema"]::before {
  background:
    radial-gradient(120% 90% at 60% 35%, transparent 40%, color-mix(in srgb, var(--bg) 70%, transparent) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent), transparent 24%),
    linear-gradient(180deg, transparent 42%, color-mix(in srgb, var(--bg) 92%, transparent) 100%);
}
.concept[data-style="cinema"] .concept-header {
  background: none;
  backdrop-filter: none;
}
.concept[data-style="cinema"] .concept-hero {
  background: none;
  justify-content: flex-end;
}
.concept[data-style="cinema"] .concept-hero h2 {
  font-size: clamp(18px, 4cqi, 42px);
  font-weight: 800;
  letter-spacing: 0.01em;
}
.concept[data-style="cinema"] .concept-task {
  background: color-mix(in srgb, var(--bg) 46%, transparent);
}
.concept[data-style="cinema"] .concept-workspace {
  background: none;
  backdrop-filter: none;
}
.concept[data-style="cinema"] .concept-composer {
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 -12px 40px -12px color-mix(in srgb, var(--bg) 90%, transparent);
}
.concept[data-style="editorial"] {
  --radius: 0px;
  --opacity: 96%;
  --side-opacity: 98%;
  --blur: 0px;
  --border: color-mix(in srgb, var(--fg) 22%, transparent);
  --shadow: none;
}
.concept[data-style="editorial"] .concept-hero {
  border-width: 0 0 3px;
  border-color: var(--fg);
  background: color-mix(in srgb, var(--bg) 18%, transparent);
}
.concept[data-style="editorial"] .concept-hero h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  font-size: clamp(18px, 4.2cqi, 44px);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.concept[data-style="editorial"] .accent-glyph {
  display: none;
}
.concept[data-style="editorial"] .concept-tasks {
  gap: 0;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border-top: 1px solid var(--fg);
  border-bottom: 1px solid var(--border);
}
.concept[data-style="editorial"] .concept-task {
  border-width: 0 1px 0 0;
  background: none;
}
.concept[data-style="editorial"] .concept-task:last-child {
  border-right: 0;
}
.concept[data-style="editorial"] .concept-task i {
  color: var(--accent);
  font-weight: 700;
}
.concept[data-style="editorial"] .concept-composer {
  border-width: 2px 0 1px;
  border-color: var(--fg) transparent var(--border);
}
.concept[data-style="editorial"] .concept-send {
  border-radius: 0;
}
.concept[data-style="pop"] {
  --radius: 12px;
  --opacity: 100%;
  --side-opacity: 100%;
  --blur: 0px;
  --edge: 2px;
  --border: var(--fg);
  --shadow: 4px 4px 0 var(--fg);
}
.concept[data-style="pop"] .concept-hero {
  background: color-mix(in srgb, var(--panel) 18%, transparent);
  border-style: dashed;
  box-shadow: none;
}
.concept[data-style="pop"] .concept-hero h2 {
  font-weight: 900;
  text-shadow: 3px 3px 0 var(--bg);
}
.concept[data-style="pop"] .concept-task:nth-child(odd) {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
}
.concept[data-style="pop"] .nav-home,
.concept[data-style="pop"] .nav-chat,
.concept[data-style="pop"] .nav-settings {
  border: 2px solid transparent;
}
.concept[data-style="pop"][data-concept-page="home"] .nav-home,
.concept[data-style="pop"][data-concept-page="chat"] .nav-chat,
.concept[data-style="pop"][data-concept-page="settings"] .nav-settings {
  border-color: var(--fg);
  background: var(--accent);
  color: var(--accent-fg, var(--panel));
  box-shadow: 2px 2px 0 var(--fg);
}
.concept[data-style="pop"] .concept-send {
  border: 2px solid var(--fg);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--fg);
}
.concept[data-style="dream"] {
  --radius: 20px;
  --opacity: 60%;
  --side-opacity: 50%;
  --blur: 18px;
  --border: color-mix(in srgb, var(--panel) 60%, transparent);
  --shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), 0 8px 30px -8px color-mix(in srgb, var(--accent) 45%, transparent);
}
.concept[data-style="dream"]::before {
  background:
    radial-gradient(60% 50% at 80% 10%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(50% 40% at 10% 90%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 10%, transparent), color-mix(in srgb, var(--bg) 34%, transparent));
}
.concept[data-style="dream"] .nav {
  border-radius: 999px;
}
.concept[data-style="dream"] .concept-hero h2 {
  font-weight: 700;
  letter-spacing: 0.03em;
}
.concept[data-style="dream"] .concept-composer {
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  border-radius: 24px;
}
.concept[data-style="dream"] .concept-send {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--panel)));
}
.concept[data-intensity="restrained"] {
  --shadow: none;
  --opacity: 94%;
}
.concept[data-intensity="expressive"] {
  --edge: 2px;
  --border: color-mix(in srgb, var(--accent) 55%, transparent);
}
.concept[data-density="compact"] {
  --pad: 10px;
}
.concept[data-density="compact"] .concept-body,
.concept[data-density="compact"] .concept-page {
  gap: 6px;
}
.concept[data-density="compact"] .concept-task span {
  display: none;
}
.concept[data-rc-theme-design="2"] {
  --radius: var(--rc-design-radius);
  --blur: var(--rc-design-blur);
  --edge: var(--rc-design-border-width);
  --pad: var(--rc-design-spacing);
  --border: var(--rc-design-border);
  --shadow: var(--rc-design-shadow);
  --glass: var(--rc-design-surface);
  --glass-side: var(--rc-design-sidebar);
}
.concept[data-rc-theme-design="2"] > img,
.concept[data-rc-theme-design="2"] > video {
  object-position: var(--rc-design-position);
}
.concept[data-rc-theme-design="2"]::before {
  background: var(--rc-design-dim);
}
.concept[data-view="media"]::before {
  display: none;
}
.concept[data-view="media"] > .concept-sidebar,
.concept[data-view="media"] > .concept-main {
  visibility: hidden;
}
/* 右侧选项很长，预览随滚动固定在视口内；画布高度要给底部操作栏留出空间，否则固定后底边被遮住。 */
@media (min-width: 761px) and (min-height: 600px) {
  .design-stage {
    position: sticky;
    top: 12px;
  }
  .concept {
    width: min(100%, max(520px, (100vh - 380px) * 1.6));
  }
}
@media (min-width: 1600px) {
  .action-dock {
    padding-left: max(32px, calc((100vw - 1536px) / 2));
    padding-right: max(32px, calc((100vw - 1536px) / 2));
  }
}
@media (max-width: 1000px) {
  main {
    padding: 0 20px;
  }
  .design-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
  }
  .canvas-toolbar {
    flex-wrap: wrap;
  }
  .action-dock {
    padding: 14px 20px;
  }
  #entry {
    margin-top: 36px;
  }
  .entry-hero {
    gap: 28px;
  }
  .upload-zone {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .upload-zone .primary {
    grid-column: 1 / -1;
  }
  .example-caption {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  main {
    padding: 0 16px;
  }
  .workflow-steps {
    padding: 20px 0;
    gap: 20px;
    font-size: var(--text-ui-xs);
  }
  .workflow-steps li {
    gap: 5px;
  }
  .workflow-steps li span {
    width: 20px;
    height: 20px;
  }
  #entry {
    margin-top: 24px;
  }
  .entry-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .entry-backdrop {
    top: -24px;
    bottom: -32px;
  }
  .entry-heading {
    margin-bottom: 20px;
  }
  .entry-heading h1 {
    font-size: 28px;
  }
  .entry-heading p {
    max-width: 340px;
  }
  .upload-zone {
    padding: 18px 16px 14px;
  }
  .example-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .example-art {
    min-height: 0;
    height: 150px;
  }
  .example-stack {
    inset: 30px 16px 12px 10px;
  }
  .example-sample,
  .example-card:hover .example-sample[aria-hidden] {
    transform: translate(calc(var(--depth) * 5px), calc(var(--depth) * -6px))
      scale(calc(1 - var(--depth) * 0.06));
  }
  .example-motion {
    display: none;
  }
  .example-tag {
    left: 8px;
    top: 8px;
    font-size: var(--text-ui-xs);
  }
  .example-caption {
    padding: 14px;
    gap: 8px;
  }
  .example-caption .secondary {
    min-height: 36px;
    padding: 5px 12px;
  }
  .entry-foot {
    margin: 12px 0 0;
  }
  .workspace-heading {
    margin-bottom: 16px;
    align-items: start;
  }
  .workspace-heading > div {
    display: block;
  }
  .workspace-heading h1 {
    margin-bottom: 5px;
  }
  .workspace-heading p {
    max-width: 280px;
  }
  .preview-jump {
    display: inline;
    flex-shrink: 0;
  }
  .design-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .canvas-heading {
    font-size: var(--text-ui-sm);
  }
  .canvas-toolbar,
  .preview-bottom {
    padding: 8px;
    gap: 4px;
  }
  .canvas-toolbar {
    justify-content: space-between;
  }
  .canvas-tools {
    gap: 3px;
  }
  .segments button,
  .canvas-frame .tool-button {
    padding: 5px 7px;
    font-size: var(--text-ui-xs);
  }
  .canvas-mat {
    padding: 4px 8px;
  }
  .inspector {
    margin-top: 2px;
  }
  .style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field input,
  .field select,
  .field textarea {
    font-size: var(--text-ui-lg);
  }
  .section-title {
    gap: 8px;
    flex-wrap: wrap;
  }
  .candidate-return {
    display: inline-block;
    color: var(--blue);
    margin-top: 6px;
  }
  #candidate-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .candidate-choice {
    display: flex;
    flex-direction: column;
    padding: 7px;
    gap: 5px;
  }
  .candidate-choice strong {
    font-size: var(--text-ui-sm);
  }
  .candidate-art {
    height: 54px;
  }
  .candidate-choice > span:last-child {
    display: none;
  }
  .action-dock {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .action-context {
    max-width: none;
  }
  .action-context strong {
    display: none;
  }
  #action-hint {
    margin: 0;
  }
  #generation-status {
    max-height: 48px;
    font-size: var(--text-ui-sm);
  }
  .action-buttons {
    gap: 8px;
  }
  .action-buttons button {
    flex: 1;
  }
  #workspace {
    padding-bottom: 220px;
  }
  #preview {
    scroll-margin-top: 12px;
  }
  dialog .dialog-heading,
  dialog .dialog-content {
    padding: 20px;
  }
}
@container concept (max-width: 720px) {
  .concept-body,
  .concept-page {
    gap: 8px;
  }
  .concept .concept-hero {
    padding: 12px 16px 14px;
  }
  .concept-tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .concept-task {
    padding: 8px 12px;
  }
  .concept-task i,
  .concept-task:nth-child(n + 3),
  .concept-workspace {
    display: none;
  }
}
@media (max-width: 1000px) {
  .concept {
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .concept-tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .concept-task:nth-child(n + 3) {
    display: none;
  }
}
@media (max-width: 760px) {
  .concept {
    grid-template-columns: 44px minmax(0, 1fr);
    width: 100%;
    aspect-ratio: auto;
    height: 380px;
  }
  .concept-sidebar {
    padding: 10px 6px;
    font-size: var(--text-ui-xs);
  }
  .concept-brand,
  .nav-label,
  .concept .nav-task,
  .concept .nav-project,
  .window-dots {
    display: none;
  }
  .concept .nav,
  .concept .sidebar-bottom {
    justify-content: center;
    padding: 8px 0;
    font-size: 0;
  }
  .concept .nav i {
    font-size: var(--text-ui-sm);
  }
  .concept-sidebar {
    grid-template-columns: 1fr;
  }
  .concept-header {
    padding: 0 8px;
  }
  .concept-body {
    padding: 8px;
    gap: 8px;
  }
  .concept-hero {
    padding: 10px;
  }
  .concept-hero h2 {
    font-size: var(--text-ui-base);
  }
  .accent-glyph,
  .concept-workspace,
  .concept .sidebar-bottom b,
  .concept-live,
  .badge-copy small,
  .composer-meta,
  .concept-task span {
    display: none;
  }
  .concept-task {
    padding: 8px;
  }
  .concept-composer {
    padding: 8px 10px;
    font-size: var(--text-ui-sm);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
