:root {
  --page: #f3f5f6;
  --side: #20272b;
  --surface: #ffffff;
  --surface-soft: #f7f9f9;
  --line: #d9e0e2;
  --text: #172126;
  --muted: #66747b;
  --primary: #14766f;
  --primary-dark: #0c554f;
  --primary-soft: #e5f3f1;
  --accent: #d45b3f;
  --yellow: #e4b94f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }

.toast-host {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 120;
  max-width: min(520px, calc(100vw - 28px));
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  padding: 10px 16px;
  box-shadow: 0 16px 42px rgba(13, 28, 31, 0.18);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast-host.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.toast-host.success {
  border-color: #b9ddd3;
  background: #edf8f4;
  color: #19745f;
}
.toast-host.error {
  border-color: #f0b8ad;
  background: #fff3f0;
  color: #b33b2e;
}
.toast-host.info {
  border-color: #c9d6d9;
  background: #f7fbfb;
  color: #2e555b;
}

.admin-body { background: #eef2f3; }
.admin-login-view {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, #203237, #eef4f3 58%, #f7faf9);
}
.admin-login-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 24px 70px rgba(10, 24, 28, .24);
}
.admin-login-card h1 { font-size: 26px; }
.admin-login-card p, .admin-login-card small { color: var(--muted); }
.admin-login-card input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
}
.admin-login-card small { min-height: 18px; color: var(--accent); }
.admin-console {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  background: #20272b;
  color: #f4f7f7;
}
.admin-brand {
  display: grid;
  gap: 4px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid #3b454a;
}
.admin-brand strong { font-size: 22px; }
.admin-brand span { color: #9eabb0; font-size: 12px; }
.admin-menu { display: grid; gap: 7px; }
.admin-menu button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cbd5d8;
  text-align: left;
  padding: 0 12px;
  font-weight: 800;
}
.admin-menu button:hover, .admin-menu button.active {
  background: #304044;
  color: #fff;
}
.admin-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
}
.admin-console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.admin-console-topbar h1 { font-size: 23px; }
.admin-console-topbar p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.admin-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.admin-panel {
  min-width: 0;
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}
.admin-toolbar input {
  max-width: 360px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
}
.admin-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}
.admin-list-footer > span { color: var(--muted); font-size: 13px; }
.table-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  white-space: nowrap;
}
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-action.danger {
  border-color: #d95745;
  background: #fff0ee;
  color: #b73525;
}
.admin-detail-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}
.admin-detail-dialog h2 { margin: 0 0 16px; }
.admin-detail-body { display: grid; gap: 16px; }
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-detail-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-detail-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfc;
}
.admin-detail-grid span { color: var(--muted); font-size: 12px; }
.admin-detail-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-detail-block,
.admin-detail-copy {
  display: grid;
  gap: 8px;
}
.admin-detail-block pre,
.admin-detail-copy pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.admin-detail-images { display: grid; gap: 14px; }
.admin-detail-image {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.admin-detail-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  border-radius: 6px;
  background: #eef3f3;
  color: var(--muted);
}
.admin-detail-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}
.admin-shell { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 36px; }
.admin-topbar, .admin-recharge, .admin-template, .admin-tables, .admin-data { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-bottom: 16px; }
.admin-topbar p, .admin-recharge p, .admin-section-title p, .admin-table-button span, .admin-recharge small { color: var(--muted); }
.admin-topbar nav { display: flex; gap: 10px; }
.admin-recharge { display: grid; grid-template-columns: 260px 1fr; gap: 16px; padding: 18px 20px; margin-bottom: 16px; }
.admin-recharge-form { display: grid; grid-template-columns: minmax(140px, 1fr) 140px minmax(180px, 1fr) auto; gap: 10px; }
.admin-recharge-form input { height: 44px; border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; font: inherit; }
.admin-recharge small { grid-column: 2 / -1; }
.admin-template { margin-bottom: 16px; }
.admin-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.admin-template-grid label, .admin-template-form { display: grid; gap: 7px; }
.admin-template-grid span, .admin-check { color: var(--muted); font-size: 13px; }
.admin-template-grid select, .admin-template-form input, .admin-template-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
}
.admin-template-form textarea { resize: vertical; line-height: 1.5; }
.admin-template-editors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px; }
.admin-template-form { align-content: start; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface-soft); }
.admin-check { display: flex; align-items: center; gap: 7px; }
#adminTemplateMessage { display: block; padding: 0 16px 16px; color: var(--muted); }
.admin-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.admin-tables, .admin-data { min-height: 620px; }
.admin-section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.admin-table-list { display: grid; gap: 8px; padding: 12px; }
.admin-table-button { display: grid; gap: 5px; text-align: left; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 11px 12px; cursor: pointer; }
.admin-table-button.active { border-color: var(--primary); background: #eef7f5; }
.admin-pager { display: flex; align-items: center; gap: 8px; }
.admin-table-wrap { overflow: auto; max-height: 72vh; }
#adminDataTable { width: 100%; border-collapse: collapse; font-size: 13px; }
#adminDataTable th, #adminDataTable td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 9px 10px; vertical-align: top; max-width: 360px; }
#adminDataTable th { position: sticky; top: 0; z-index: 1; background: #f8faf9; text-align: left; white-space: nowrap; }
#adminDataTable td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#adminDataTable td.long-cell { white-space: normal; min-width: 320px; max-height: 160px; line-height: 1.5; }
.admin-template-panel { min-height: calc(100vh - 112px); }
.admin-template-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 650px;
}
.admin-template-nav {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #f8faf9;
}
.admin-template-nav h3 {
  margin-bottom: 8px;
  font-size: 14px;
}
.admin-template-list {
  display: grid;
  gap: 7px;
  max-height: 190px;
  overflow: auto;
}
.admin-template-list.compact {
  max-height: 310px;
}
.admin-template-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
}
.admin-template-list button.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}
.admin-template-list strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-template-list span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-template-workspace .admin-template-editors {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-content: start;
}
.admin-template-form.wide {
  grid-column: 1 / -1;
}
.admin-template-form h3 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.template-flow-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  min-height: calc(100vh - 190px);
}
.template-scroll-region {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  background: #f8faf9;
}
.template-top-scroller {
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}
.template-top-scroll-inner {
  height: 1px;
}
.template-columns {
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  overflow-x: auto;
  background: #f8faf9;
  scrollbar-width: none;
}
.template-columns::-webkit-scrollbar {
  display: none;
}
.template-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 0 0 238px;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.template-column-head {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}
.template-column-head span {
  color: var(--muted);
  font-size: 12px;
}
.template-column-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-column[data-column-type="step"] .template-column-head {
  cursor: pointer;
}
.template-column-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
}
.template-column[data-column-type="step"] .template-current-node {
  display: none;
}
.template-node,
.template-current-node {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
}
.template-current-node {
  border-style: dashed;
  background: #f8fbfb;
}
.template-node.active,
.template-current-node.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}
.template-node strong,
.template-current-node strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-node span,
.template-current-node span,
.template-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.template-empty {
  padding: 14px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fbfcfc;
}
.template-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  border-left: 3px solid #cad6d8;
  background: #fff;
}
.template-detail-head {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}
.template-detail-head span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}
.template-detail-head strong {
  font-size: 18px;
}
.template-detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}
.template-detail-form label {
  display: grid;
  gap: 6px;
}
.template-detail-form label.wide,
.template-detail-form .admin-check,
.template-detail-actions {
  grid-column: 1 / -1;
}
.template-detail-form input,
.template-detail-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 11px;
}
.template-detail-form textarea {
  resize: vertical;
  line-height: 1.55;
}
.template-detail-actions {
  display: flex;
  justify-content: flex-end;
}
.admin-context-menu {
  position: fixed;
  z-index: 50;
  display: grid;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(12, 22, 25, .18);
}
.admin-context-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 10px;
}
.admin-context-menu button:hover {
  background: var(--surface-soft);
}
.admin-context-menu button.danger {
  color: #a53a2a;
}

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

.side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px;
  background: var(--side);
  color: #f4f7f7;
  min-width: 0;
  max-width: 286px;
  overflow-x: hidden;
}

.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--primary);
  font-size: 22px;
  font-weight: 800;
}
.brand h1 { font-size: 22px; }
.brand p { margin-top: 3px; color: #9eabb0; font-size: 12px; }

.auth-form { display: grid; gap: 10px; }
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}
.auth-tabs button.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(23, 33, 38, 0.08);
}
.auth-field {
  display: grid;
  gap: 6px;
}
.auth-field > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}
.password-input-wrap button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-dark);
  font-weight: 800;
}
.auth-form .password-rule {
  color: #aeb9bd;
  font-size: 11px;
  line-height: 1.5;
}
.account-dialog {
  max-height: min(760px, calc(100vh - 32px));
  overflow-y: auto;
}
.account-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.account-section h3 {
  margin: 0;
  font-size: 16px;
}
.account-dialog #saveAccountButton {
  justify-self: start;
  min-height: 38px;
}
#accountMessage {
  min-height: 18px;
  color: var(--primary-dark);
  font-weight: 700;
}

.balance {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid #3b454a;
  border-radius: 8px;
  background: #293237;
}
.balance span { color: #aeb9bd; font-size: 12px; }
.balance strong { font-size: 26px; }
.balance button {
  min-height: 36px;
  border: 1px solid #4a575c;
  border-radius: 6px;
  background: #343e43;
  color: #e9f6f4;
  font-weight: 700;
}

.history-header { display: grid; gap: 9px; color: #aeb9bd; font-size: 12px; }
.history-header div { display: flex; gap: 8px; }
.history-header button { border: 0; background: transparent; color: #8ed0c9; font-weight: 700; }
#newTaskButton {
  flex: 1;
  min-height: 38px;
  border: 1px solid #4f6768;
  border-radius: 6px;
  background: #e9f6f4;
  color: #0c554f;
}
#refreshHistoryButton {
  min-width: 52px;
}
.history-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; max-width: 100%; overflow-y: auto; overflow-x: hidden; }
.history-item {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid #3b454a;
  border-radius: 6px;
  background: #293237;
  color: #f4f7f7;
  font: inherit;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}
.history-item strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item span { display: block; max-width: 100%; margin-top: 4px; overflow: hidden; color: #9eabb0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-context-menu {
  position: fixed;
  z-index: 80;
  min-width: 118px;
  border: 1px solid #435055;
  border-radius: 6px;
  background: #20282d;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}
.history-context-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #ffb8ae;
  font-weight: 800;
  text-align: left;
  padding: 0 10px;
}
.history-context-menu button:hover { background: rgba(217, 87, 69, 0.16); }

.workspace { min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}
.topbar h2 { font-size: 21px; }
.mobile-new-task-button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: inherit;
  font-size: 21px;
  font-weight: 800;
  text-align: left;
}
.mobile-balance-pill { display: none; }
.topbar p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.top-auth { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.top-auth span {
  order: -1;
  max-width: 180px;
  overflow: hidden;
  color: #405258;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-home-link { display: inline-flex; align-items: center; text-decoration: none; }

.studio {
  display: grid;
  grid-template-columns: minmax(560px, 1.1fr) minmax(360px, 0.9fr);
  gap: 22px;
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px 28px;
}

.workflow-panel, .result-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.workflow-panel { min-height: 690px; padding: 22px; }

.stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 18px;
  align-items: start;
}
.stepper-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 112px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #627175;
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}
.stepper-item:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -15px;
  width: 12px;
  height: auto;
  background: transparent;
  color: #aab5b8;
  font-size: 14px;
  transform: translateY(-50%);
}
.stepper-item > span {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f2f6f6;
  font-size: 11px;
  font-weight: 800;
}
.stepper-item small { min-width: 0; max-width: 116px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.stepper-item:hover { border-color: #8ab9b5; color: var(--primary-dark); box-shadow: 0 5px 14px rgba(27, 55, 57, 0.08); }
.stepper-item.complete > span { border-color: var(--primary); background: var(--primary); color: #fff; }
.stepper-item.active { border-color: var(--primary); background: #f4fbfa; color: var(--primary-dark); box-shadow: 0 0 0 3px var(--primary-soft); }
.stepper-item.active > span { border-color: var(--primary); background: #eef8f5; color: var(--primary-dark); }
.stepper-item.complete:not(:last-child)::after { color: var(--primary); }
.stepper-item.active small { color: var(--primary-dark); }

.workflow-heading { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; }
.workflow-heading h3 { margin-top: 5px; font-size: 24px; }
.workflow-heading p { max-width: 720px; margin-top: 7px; color: var(--muted); line-height: 1.6; }
.workflow-heading .step-hint {
  display: inline-block;
  max-width: 720px;
  margin-top: 8px;
  border: 1px solid #b9ddd3;
  border-radius: 6px;
  background: #edf8f4;
  color: #19745f;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.workflow-heading .step-hint.hidden { display: none; }
.workflow-heading .step-hint.single-line {
  display: block;
  width: 100%;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(11px, 1.15vw, 14px);
  line-height: 1.25;
}
.step-content { min-height: 430px; }

.category-grid, .option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-card, .option-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.category-card { min-height: 226px; padding: 13px; }
.option-card { display: grid; grid-template-columns: 142px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 132px; padding: 10px; }
.category-card:hover:not(:disabled), .option-card:hover { transform: translateY(-1px); border-color: #8ab9b5; box-shadow: 0 7px 20px rgba(27, 55, 57, 0.09); }
.category-card.selected, .option-card.selected { border: 2px solid var(--primary); background: #fbfefe; box-shadow: 0 0 0 3px var(--primary-soft); }
.category-card:disabled { opacity: 0.58; }
.category-card strong, .option-card strong { display: block; font-size: 15px; }
.category-card > span, .option-card div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.category-card small { position: absolute; top: 9px; right: 9px; padding: 3px 6px; border-radius: 4px; background: #e8ecee; color: #59666c; }

.quick-config-panel {
  display: grid;
  gap: 14px;
  min-height: 0;
}
.config-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.config-section.category-picker-section {
  background: #fbfefe;
}
.config-section.category-picker-section.collapsed {
  padding: 11px 14px;
}
.config-section-head {
  display: grid;
  gap: 5px;
}
.config-section-head strong {
  color: var(--text);
  font-size: 16px;
}
.config-section-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.category-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.category-summary strong {
  display: block;
  color: var(--primary-dark);
  font-size: 15px;
}
.category-summary span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-picker-actions {
  display: flex;
  justify-content: flex-end;
}
.config-node-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 7px;
}
.config-node {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #cddadd;
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--text);
  padding: 0 5px;
  font-weight: 800;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.config-node span {
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e7eeee;
  color: var(--primary-dark);
  font-size: 11px;
}
.config-node strong {
  min-width: 0;
  overflow: visible;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
.config-node:hover,
.config-node:focus-visible {
  border-color: #8ab9b5;
  box-shadow: 0 5px 16px rgba(27, 55, 57, 0.08);
}
.config-node.active {
  border-color: var(--primary);
  background: #f8fdfc;
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.config-node.done {
  border-color: #8ab9b5;
  background: #eef8f6;
  color: var(--primary-dark);
}
.config-node.active span {
  background: #e7eeee;
  color: var(--primary-dark);
}
.config-node.done span {
  background: var(--primary);
  color: #fff;
}
.config-node.active.done span {
  background: var(--primary);
  color: #fff;
}
.active-option-section {
  min-height: 250px;
}
.quick-config-scroll {
  display: grid;
  gap: 14px;
  max-height: min(55vh, 560px);
  overflow-y: auto;
  padding: 2px 8px 4px 2px;
  scrollbar-color: #9db6b4 #edf3f3;
  scrollbar-width: thin;
}
.quick-config-scroll::-webkit-scrollbar { width: 9px; }
.quick-config-scroll::-webkit-scrollbar-track { background: #edf3f3; border-radius: 999px; }
.quick-config-scroll::-webkit-scrollbar-thumb { background: #9db6b4; border-radius: 999px; }
.quick-group {
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
}
.quick-group.collapsed {
  gap: 0;
  border: 1px solid #d8e4e5;
  border-radius: 8px;
  background: #f8fbfb;
  padding: 0;
  cursor: pointer;
}
.quick-group:last-child { border-bottom: 0; }
.quick-group.collapsed:last-child { border-bottom: 1px solid #d8e4e5; }
.quick-group-head {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
}
.quick-group.collapsed .quick-group-head {
  align-items: center;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 7px 10px;
}
.quick-group.collapsed .quick-group-head::after {
  content: "展开";
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}
.quick-group-head strong {
  color: var(--text);
  font-size: 15px;
}
.quick-group.collapsed .quick-group-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-group-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}
.quick-group.collapsed .quick-group-head span {
  overflow: hidden;
  color: var(--primary-dark);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-group.collapsed .quick-tags { display: none; }
.quick-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.quick-tags.category-tags {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quick-tag {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}
.quick-tag.compact {
  min-height: 74px;
}
.quick-tag:hover:not(:disabled),
.quick-tag:focus-visible {
  border-color: #8ab9b5;
  box-shadow: 0 6px 18px rgba(27, 55, 57, 0.08);
  transform: translateY(-1px);
}
.quick-tag.selected {
  border: 2px solid var(--primary);
  background: #f4fbfa;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.quick-tag:disabled {
  opacity: .56;
  cursor: not-allowed;
}
.quick-tag-text {
  min-width: 0;
}
.quick-tag-text strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-tag-text span {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.quick-tag-icon {
  flex: none;
  position: relative;
  width: 42px;
  height: 42px;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
}
.quick-tag-icon.option-icon {
  display: grid;
  place-items: center;
  background: #edf4f3;
  border: 1px solid #dce3e5;
}
.quick-tag-icon.option-icon > .layout-preview {
  display: flex !important;
  flex: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 142px;
  height: 106px;
  border: 0;
  margin: 0;
  transform: translate(-50%, -50%) scale(.34);
  transform-origin: center;
}
.quick-tag .category-preview.quick-tag-icon {
  display: block !important;
  width: 42px;
  height: 42px;
  margin: 0;
  overflow: hidden;
  background-size: 12px 12px;
}
.quick-tag .category-preview.quick-tag-icon span {
  border-width: 1px;
}
.quick-tag em {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 4px;
  background: #e8ecee;
  color: #59666c;
  padding: 2px 6px;
  font-size: 11px;
  font-style: normal;
}
.quick-empty-guide {
  display: grid;
  gap: 6px;
  border: 1px dashed #b9cacc;
  border-radius: 8px;
  background: #f8fbfb;
  padding: 14px;
}
.quick-empty-guide strong {
  color: var(--primary-dark);
}
.quick-empty-guide span {
  color: var(--muted);
  line-height: 1.55;
}

.category-preview {
  position: relative;
  height: 128px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #dce3e5;
  border-radius: 6px;
  background: #edf4f3;
}
.category-preview span { position: absolute; display: block; border: 2px solid #5b8683; background: #fff; }
.category-asset span:nth-child(1) { left: 42%; top: 18%; width: 18%; height: 66%; border-radius: 45% 45% 20% 20%; }
.category-asset span:nth-child(2) { left: 9%; top: 24%; width: 25%; height: 24%; }
.category-asset span:nth-child(3) { right: 9%; bottom: 19%; width: 25%; height: 24%; }
.category-scene { background: #e6f0f2; }
.category-scene span { border: 0; background: #718e84; transform: rotate(45deg); }
.category-scene span:nth-child(1) { left: 12%; bottom: -31%; width: 48%; height: 76%; }
.category-scene span:nth-child(2) { right: 0; bottom: -45%; width: 64%; height: 85%; background: #4e736b; }
.category-scene span:nth-child(3) { right: 14%; top: 16%; width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); }
.category-portrait span:nth-child(1) { left: 38%; top: 14%; width: 24%; height: 24%; border-radius: 50%; background: #f7f1ea; }
.category-portrait span:nth-child(2) { left: 31%; top: 39%; width: 38%; height: 42%; border-radius: 44% 44% 14% 14%; background: #dce9e7; }
.category-portrait span:nth-child(3) { left: 18%; bottom: 12%; width: 64%; height: 8%; border-radius: 999px; background: #8fb5b1; }
.category-product span:nth-child(1) { left: 36%; top: 19%; width: 28%; height: 48%; border-radius: 8px 8px 4px 4px; background: #fff; }
.category-product span:nth-child(2) { left: 28%; bottom: 17%; width: 44%; height: 12%; border-radius: 50%; background: #dce9e7; }
.category-product span:nth-child(3) { right: 20%; top: 26%; width: 16%; height: 16%; border-radius: 50%; background: var(--yellow); }
.category-avatar span:nth-child(1) { left: 28%; top: 16%; width: 44%; height: 44%; border-radius: 50%; background: #fff; }
.category-avatar span:nth-child(2) { left: 38%; top: 29%; width: 7%; height: 7%; border-radius: 50%; background: #5b8683; }
.category-avatar span:nth-child(3) { right: 38%; top: 29%; width: 7%; height: 7%; border-radius: 50%; background: #5b8683; }
.category-texture { background-color: #e8ecea; background-image: linear-gradient(45deg, #c7d0cc 25%, transparent 25%), linear-gradient(-45deg, #c7d0cc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #c7d0cc 75%), linear-gradient(-45deg, transparent 75%, #c7d0cc 75%); background-size: 28px 28px; background-position: 0 0, 0 14px, 14px -14px, -14px 0; }
.category-texture span { display: none; }

.layout-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 142px;
  height: 106px;
  overflow: hidden;
  border: 1px solid #d7e0e1;
  border-radius: 6px;
  background-color: #f5f8f8;
  background-image: linear-gradient(#e6ebec 1px, transparent 1px), linear-gradient(90deg, #e6ebec 1px, transparent 1px);
  background-size: 14px 14px;
}
.layout-preview .figure { display: block; width: 15px; height: 63px; border: 2px solid #527c79; border-radius: 45% 45% 20% 20%; background: #d9ece9; }
.preview-single-hero .figure { width: 28px; height: 82px; }
.preview-five-view { gap: 4px; }
.preview-five-view .figure { width: 12px; height: 58px; }
.preview-views-expressions { display: grid; grid-template-columns: 1.25fr 1px 1fr; align-items: center; gap: 8px; padding: 8px; }
.preview-views-expressions i { width: 1px; height: 84px; background: #d0b06f; }
.preview-views { display: flex; justify-content: center; gap: 5px; }
.preview-views .figure { width: 12px; height: 76px; }
.preview-faces { display: grid; grid-template-columns: repeat(2, 22px); gap: 6px; justify-content: center; }
.preview-faces span { width: 22px; height: 22px; border: 2px solid #c46c55; border-radius: 50%; background: #f8e9e5; }
.preview-character-breakdown { display: grid; grid-template-columns: 1fr 32px 1fr; grid-template-rows: repeat(2, 1fr); gap: 5px; padding: 8px; }
.preview-character-breakdown .main-figure { grid-column: 2; grid-row: 1 / 3; width: 24px; height: 76px; align-self: center; }
.preview-character-breakdown .callout { min-height: 30px; border: 2px solid #c46c55; background: #f8e9e5; }
.preview-outfit-breakdown { justify-content: space-evenly; padding: 7px; }
.preview-outfit-breakdown .main-figure { width: 24px; height: 78px; }
.preview-pieces { display: grid; grid-template-columns: repeat(2, 28px); gap: 5px; }
.preview-pieces span { height: 30px; border: 2px solid #c46c55; border-radius: 10px 10px 3px 3px; background: #f8e9e5; }
.preview-prop-breakdown { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 5px; padding: 9px; }
.main-prop { grid-row: 1 / 4; border: 2px solid #527c79; background: #d9ece9; transform: skewY(-10deg); }
.prop-detail { border: 2px solid #c46c55; background: #f8e9e5; }
.style-preview { background-image: none; }
.style-subject { width: 42px; height: 69px; clip-path: polygon(50% 0, 73% 22%, 66% 48%, 86% 100%, 14% 100%, 34% 48%, 27% 22%); background: var(--primary); }
.style-shadow { position: absolute; right: 20px; bottom: 15px; width: 64px; height: 10px; border-radius: 50%; background: #c8d0d2; }
.preview-style-realistic { background: #d9e0dc; }
.preview-style-realistic .style-subject { background: linear-gradient(135deg, #26383c, #9ba9a5 60%, #313e43); }
.preview-style-anime-cg { background: #e3f2f0; }
.preview-style-anime-cg .style-subject { background: linear-gradient(135deg, #ef715b 48%, #156f81 48%); }
.preview-style-flat-2d { background: #fff3c9; }
.preview-style-flat-2d .style-subject { background: #e9564b; outline: 2px solid #242f35; }
.preview-style-low-poly { background: #dfe8df; }
.preview-style-low-poly .style-subject { background: linear-gradient(35deg, #3b6e65 33%, #7ca56d 33%, #7ca56d 66%, #d4bb62 66%); }

.sketch-preview {
  isolation: isolate;
  background-image: none;
  background: linear-gradient(180deg, #f8fbfb, #edf5f4);
}
.sketch-preview span, .sketch-preview i {
  position: absolute;
  display: block;
  box-sizing: border-box;
}
.sketch-preview .sun, .sketch-preview .moon, .sketch-preview .spark, .sketch-preview .small-dot, .sketch-preview .light-dot,
.sketch-preview .pin, .sketch-preview .heart, .sketch-preview .check, .sketch-preview .music-note {
  border: 2px solid #d0a34c;
  background: #fff3c9;
}
.sketch-preview .sun { right: 18px; top: 15px; width: 18px; height: 18px; border-radius: 50%; }
.sketch-preview .sun.low { left: 24px; right: auto; top: 53px; }
.sketch-preview .sun.setting { right: 24px; top: 55px; }
.sketch-preview .sun.warm { right: 16px; top: 20px; background: #ffe0b4; }
.sketch-preview .moon { right: 19px; top: 15px; width: 17px; height: 17px; border-radius: 50%; background: #e7eef7; }
.sketch-preview .stars::before, .sketch-preview .stars::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #d0a34c; }
.sketch-preview .stars { right: 47px; top: 20px; }
.sketch-preview .stars::before { left: 0; top: 0; }
.sketch-preview .stars::after { left: 24px; top: 16px; }
.sketch-preview .mountain {
  bottom: 14px;
  border: 0;
  background: #88a79c;
  transform: rotate(45deg);
}
.sketch-preview .mountain.far { left: 10px; width: 58px; height: 58px; opacity: .62; }
.sketch-preview .mountain.near { right: 5px; width: 78px; height: 78px; background: #557d74; }
.sketch-preview .mountain.tiny { left: 11px; bottom: 25px; width: 38px; height: 38px; opacity: .45; }
.sketch-preview .mountain.wide { right: 8px; bottom: 11px; width: 110px; height: 70px; }
.sketch-preview .river, .sketch-preview .water-line {
  left: 18px;
  bottom: 14px;
  width: 98px;
  height: 12px;
  border: 2px solid #5d96a3;
  border-left: 0;
  border-right: 0;
  border-radius: 50%;
}
.sketch-preview .ground, .sketch-preview .floor-line, .sketch-preview .road, .sketch-preview .counter {
  left: 11px;
  bottom: 14px;
  width: 120px;
  height: 2px;
  background: #9aa9a8;
}
.sketch-preview .road { height: 18px; border: 2px solid #9aa9a8; border-top: 0; background: transparent; transform: perspective(80px) rotateX(35deg); }
.sketch-preview .path { left: 45px; bottom: 9px; width: 36px; height: 74px; border: 2px solid #9aa9a8; border-top: 0; background: #e8efed; transform: perspective(70px) rotateX(28deg); }
.sketch-preview .tree, .sketch-preview .plant {
  left: 15px;
  bottom: 24px;
  width: 20px;
  height: 32px;
  border: 0;
  border-radius: 50% 50% 35% 35%;
  background: #6f9a73;
}
.sketch-preview .tree::after, .sketch-preview .plant::after { content: ""; position: absolute; left: 8px; bottom: -17px; width: 4px; height: 18px; background: #8c6d4b; }
.sketch-preview .tower, .sketch-preview .building, .sketch-preview .temple, .sketch-preview .dome {
  bottom: 23px;
  border: 2px solid #527c79;
  background: #dbe9e8;
}
.sketch-preview .tower { right: 24px; width: 24px; height: 58px; }
.sketch-preview .tower.huge, .sketch-preview .tower.looming { right: 32px; bottom: 11px; width: 38px; height: 92px; }
.sketch-preview .building.tall { left: 23px; width: 20px; height: 70px; }
.sketch-preview .building.mid { left: 52px; width: 24px; height: 52px; }
.sketch-preview .building.small { left: 83px; width: 19px; height: 36px; }
.sketch-preview .mega-arch {
  left: 34px;
  bottom: 16px;
  width: 60px;
  height: 82px;
  border: 8px solid #527c79;
  border-bottom: 0;
  border-radius: 42px 42px 0 0;
  background: transparent;
}
.sketch-preview .tiny-person, .sketch-preview .person, .sketch-preview .person.mid, .sketch-preview .person.hero, .sketch-preview .person.bottom {
  width: 9px;
  height: 25px;
  border: 2px solid #c46c55;
  border-radius: 45% 45% 22% 22%;
  background: #f8e9e5;
}
.sketch-preview .tiny-person { right: 18px; bottom: 16px; width: 6px; height: 17px; }
.sketch-preview .person { left: 57px; bottom: 24px; }
.sketch-preview .person.mid { left: 61px; bottom: 20px; width: 14px; height: 39px; }
.sketch-preview .person.hero { left: 57px; bottom: 16px; width: 24px; height: 68px; }
.sketch-preview .person.bottom { left: 23px; bottom: 10px; width: 10px; height: 28px; }
.sketch-preview .film-frame {
  inset: 11px;
  border: 3px solid #26383c;
  background: transparent;
}
.sketch-preview .film-frame::before, .sketch-preview .film-frame::after { content: ""; position: absolute; top: 8px; bottom: 8px; width: 5px; background: repeating-linear-gradient(#26383c 0 4px, transparent 4px 8px); }
.sketch-preview .film-frame::before { left: -10px; }
.sketch-preview .film-frame::after { right: -10px; }
.sketch-preview .spotlight, .sketch-preview .light-beam {
  left: 40px;
  top: 6px;
  width: 62px;
  height: 92px;
  clip-path: polygon(44% 0, 60% 0, 100% 100%, 0 100%);
  background: rgba(238, 206, 117, .45);
}
.sketch-preview .shadow, .sketch-preview .soft-shadow, .sketch-preview .hard-shadow, .sketch-preview .long-shadow {
  right: 17px;
  bottom: 14px;
  width: 65px;
  height: 10px;
  border-radius: 50%;
  background: #c9d1d1;
}
.sketch-preview .hard-shadow { background: #7b8586; transform: skewX(-30deg); }
.sketch-preview .long-shadow { width: 84px; transform: skewX(-35deg); }
.sketch-preview .room-wall, .sketch-preview .room-perspective {
  inset: 15px;
  border: 2px solid #9aa9a8;
  background: linear-gradient(90deg, transparent 49%, #dce3e5 50%, transparent 51%);
}
.sketch-preview .room-perspective { transform: perspective(90px) rotateX(14deg); }
.sketch-preview .window { right: 19px; top: 20px; width: 28px; height: 24px; border: 2px solid #5d96a3; background: #eaf7fb; }
.sketch-preview .sofa { left: 22px; bottom: 25px; width: 42px; height: 22px; border: 2px solid #527c79; border-radius: 8px 8px 3px 3px; background: #dbe9e8; }
.sketch-preview .roof.big, .sketch-preview .roof.small {
  left: 32px;
  top: 30px;
  width: 72px;
  height: 16px;
  border: 2px solid #527c79;
  border-bottom: 0;
  background: #d9ece9;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.sketch-preview .roof.small { left: 44px; top: 52px; width: 48px; }
.sketch-preview .lantern { right: 27px; top: 40px; width: 10px; height: 16px; border-radius: 50%; background: #f2a391; border: 2px solid #c46c55; }
.sketch-preview .steps { left: 40px; bottom: 20px; width: 54px; height: 18px; border: 2px solid #9aa9a8; border-left: 0; border-right: 0; }
.sketch-preview .dome { left: 37px; bottom: 30px; width: 60px; height: 36px; border-radius: 50% 50% 8px 8px; }
.sketch-preview .antenna { left: 66px; top: 18px; width: 2px; height: 30px; background: #527c79; }
.sketch-preview .panel { right: 20px; bottom: 24px; width: 28px; height: 36px; border: 2px solid #527c79; background: #eaf7fb; }
.sketch-preview .broken-wall { left: 24px; bottom: 20px; width: 45px; height: 45px; border: 2px solid #7c817d; background: #e1e0d9; clip-path: polygon(0 30%, 30% 18%, 50% 35%, 74% 12%, 100% 28%, 100% 100%, 0 100%); }
.sketch-preview .pillar { right: 30px; bottom: 20px; width: 17px; height: 61px; border: 2px solid #7c817d; background: #e1e0d9; }
.sketch-preview .stone { right: 20px; bottom: 18px; width: 19px; height: 10px; border: 2px solid #7c817d; background: #e1e0d9; }
.sketch-preview .grass { left: 14px; bottom: 16px; width: 104px; height: 10px; border: 0; background: repeating-linear-gradient(90deg, #6f9a73 0 3px, transparent 3px 9px); }
.sketch-preview .crystal { left: 30px; bottom: 22px; width: 25px; height: 54px; background: #b9e6e7; border: 2px solid #5d96a3; clip-path: polygon(50% 0, 100% 28%, 82% 100%, 18% 100%, 0 28%); }
.sketch-preview .floating-island { right: 20px; top: 37px; width: 52px; height: 20px; border: 2px solid #527c79; border-radius: 50%; background: #dbe9e8; }
.sketch-preview .cloud, .sketch-preview .cloud.soft, .sketch-preview .cloud.dark, .sketch-preview .cloud-soft {
  left: 20px;
  top: 18px;
  width: 55px;
  height: 21px;
  border-radius: 999px;
  background: #d7e3e5;
  border: 2px solid #9aa9a8;
}
.sketch-preview .cloud.dark { background: #59666c; border-color: #404a4e; }
.sketch-preview .rain { left: 25px; top: 52px; width: 75px; height: 40px; background: repeating-linear-gradient(110deg, transparent 0 9px, #5d96a3 9px 11px, transparent 11px 18px); }
.sketch-preview .mist, .sketch-preview .mist.low { left: 16px; top: 56px; width: 105px; height: 10px; border: 0; border-radius: 999px; background: rgba(154, 169, 168, .45); }
.sketch-preview .mist.low { top: 75px; width: 80px; left: 30px; }
.sketch-preview .umbrella { right: 25px; bottom: 26px; width: 38px; height: 20px; border: 2px solid #c46c55; border-bottom: 0; border-radius: 40px 40px 0 0; background: #f8e9e5; }
.sketch-preview .small-boat { right: 26px; bottom: 25px; width: 34px; height: 10px; border: 2px solid #527c79; border-top: 0; border-radius: 0 0 50% 50%; }
.sketch-preview .map-road { left: 20px; top: 22px; width: 100px; height: 65px; border: 0; background: linear-gradient(145deg, transparent 42%, #9aa9a8 43% 48%, transparent 49%); }
.sketch-preview .map-block { left: 24px; top: 24px; width: 28px; height: 22px; border: 2px solid #527c79; background: #dbe9e8; box-shadow: 52px 22px 0 -2px #dbe9e8, 52px 22px 0 0 #527c79; }
.sketch-preview .map-river { left: 52px; top: 14px; width: 16px; height: 80px; border: 0; background: #a9d4dc; transform: rotate(20deg); }
.sketch-preview .pin { right: 25px; top: 27px; width: 13px; height: 13px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.sketch-preview .angle-lines { left: 16px; bottom: 13px; width: 105px; height: 70px; border: 0; background: linear-gradient(65deg, transparent 49%, #cfd9da 50%, transparent 51%), linear-gradient(115deg, transparent 49%, #cfd9da 50%, transparent 51%); }
.sketch-preview .grid-detail { inset: 20px; border: 0; background-image: linear-gradient(#cfd9da 1px, transparent 1px), linear-gradient(90deg, #cfd9da 1px, transparent 1px); background-size: 12px 12px; opacity: .75; }
.sketch-preview .brush-stroke { left: 22px; top: 36px; width: 85px; height: 18px; border: 0; border-radius: 50%; background: #c46c55; transform: rotate(-12deg); }
.sketch-preview .brush-stroke.small { left: 45px; top: 61px; width: 55px; height: 13px; background: #527c79; }
.sketch-preview .cube { left: 30px; bottom: 30px; width: 34px; height: 34px; border: 2px solid #527c79; background: #dbe9e8; transform: skewY(-12deg); }
.sketch-preview .sphere { right: 32px; bottom: 31px; width: 35px; height: 35px; border: 2px solid #527c79; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #b8d7d4); }
.sketch-preview .asset-figure {
  left: 57px;
  top: 14px;
  width: 28px;
  height: 78px;
  border: 2px solid #527c79;
  border-radius: 45% 45% 18% 18%;
  background: linear-gradient(135deg, #dbe9e8, #89aaa6);
}
.sketch-preview .asset-figure.anime { background: linear-gradient(135deg, #f8e9e5 0 48%, #dbe9e8 48%); border-color: #c46c55; }
.sketch-preview .asset-figure.flat { background: #f8e9e5; border: 3px solid #26383c; }
.sketch-preview .material-ball {
  right: 22px;
  bottom: 23px;
  width: 28px;
  height: 28px;
  border: 2px solid #527c79;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #7e9996);
}
.sketch-preview .detail-chip {
  right: 18px;
  top: 24px;
  width: 30px;
  height: 25px;
  border: 2px solid #c46c55;
  border-radius: 5px;
  background: #f8e9e5;
}
.sketch-preview .main-prop-symbol {
  left: 35px;
  top: 44px;
  width: 73px;
  height: 14px;
  border: 2px solid #527c79;
  border-radius: 999px;
  background: #dbe9e8;
  transform: rotate(-28deg);
}
.sketch-preview .main-prop-symbol::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -7px;
  width: 18px;
  height: 26px;
  border: 2px solid #527c79;
  border-left: 0;
  border-radius: 0 50% 50% 0;
  background: #dbe9e8;
}
.sketch-preview .creature-head {
  left: 48px;
  top: 20px;
  width: 47px;
  height: 36px;
  border: 2px solid #527c79;
  border-radius: 50% 50% 42% 42%;
  background: #dbe9e8;
}
.sketch-preview .creature-head::before, .sketch-preview .creature-head::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 14px;
  height: 20px;
  border: 2px solid #527c79;
  border-bottom: 0;
  background: #dbe9e8;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.sketch-preview .creature-head::before { left: 4px; transform: rotate(-18deg); }
.sketch-preview .creature-head::after { right: 4px; transform: rotate(18deg); }
.sketch-preview .creature-body {
  left: 42px;
  bottom: 16px;
  width: 58px;
  height: 38px;
  border: 2px solid #527c79;
  border-radius: 50% 50% 25% 25%;
  background: #dbe9e8;
}
.sketch-preview .claw {
  right: 19px;
  bottom: 24px;
  width: 24px;
  height: 22px;
  border: 0;
  background: repeating-linear-gradient(120deg, transparent 0 6px, #c46c55 6px 9px, transparent 9px 14px);
}
.sketch-preview .vehicle-body {
  left: 30px;
  top: 43px;
  width: 82px;
  height: 27px;
  border: 2px solid #527c79;
  border-radius: 12px 18px 8px 8px;
  background: #dbe9e8;
}
.sketch-preview .vehicle-body::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -21px;
  width: 37px;
  height: 24px;
  border: 2px solid #527c79;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #eaf7fb;
}
.sketch-preview .wheel {
  left: 40px;
  top: 64px;
  width: 18px;
  height: 18px;
  border: 3px solid #26383c;
  border-radius: 50%;
  background: #fff;
}
.sketch-preview .wheel.two { left: 86px; }
.sketch-preview .poly-shape {
  left: 31px;
  top: 23px;
  width: 34px;
  height: 38px;
  border: 2px solid #527c79;
  background: #7ca56d;
  clip-path: polygon(50% 0, 100% 34%, 78% 100%, 18% 84%, 0 24%);
}
.sketch-preview .poly-shape.two { left: 60px; top: 44px; background: #d4bb62; }
.sketch-preview .poly-shape.three { left: 86px; top: 26px; background: #5d96a3; }

.sketch-preview .head, .sketch-preview .avatar-face, .sketch-preview .profile-head, .sketch-preview .toy-head {
  left: 53px;
  top: 17px;
  width: 35px;
  height: 35px;
  border: 2px solid #c46c55;
  border-radius: 50%;
  background: #f8e9e5;
}
.sketch-preview .head.large, .sketch-preview .avatar-face.large { left: 43px; top: 12px; width: 56px; height: 56px; }
.sketch-preview .head.pores::after, .sketch-preview .skin-dot::after { content: ""; position: absolute; left: 14px; top: 16px; width: 3px; height: 3px; border-radius: 50%; background: #c46c55; box-shadow: 9px 5px 0 #c46c55, -5px 8px 0 #c46c55; opacity: .55; }
.sketch-preview .profile-head { border-radius: 52% 45% 45% 52%; clip-path: polygon(0 0, 78% 0, 100% 36%, 80% 100%, 0 100%); }
.sketch-preview .shoulders, .sketch-preview .shoulders.large, .sketch-preview .avatar-shoulders {
  left: 38px;
  bottom: 22px;
  width: 66px;
  height: 34px;
  border: 2px solid #527c79;
  border-radius: 50% 50% 9px 9px;
  background: #dbe9e8;
}
.sketch-preview .shoulders.large { bottom: 16px; height: 43px; }
.sketch-preview .torso, .sketch-preview .avatar-body, .sketch-preview .tiny-body, .sketch-preview .toy-body {
  left: 50px;
  bottom: 15px;
  width: 42px;
  height: 50px;
  border: 2px solid #527c79;
  border-radius: 18px 18px 8px 8px;
  background: #dbe9e8;
}
.sketch-preview .figure.full {
  left: 57px;
  top: 13px;
  width: 27px;
  height: 82px;
  border: 2px solid #527c79;
  border-radius: 45% 45% 20% 20%;
  background: #dbe9e8;
}
.sketch-preview .hands, .sketch-preview .hands-down { left: 40px; bottom: 37px; width: 62px; height: 16px; border: 0; border-left: 3px solid #c46c55; border-right: 3px solid #c46c55; }
.sketch-preview .eyes::before, .sketch-preview .eyes::after,
.sketch-preview .anime-eye::before, .sketch-preview .anime-eye::after {
  content: "";
  position: absolute;
  top: 30px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #26383c;
}
.sketch-preview .eyes::before { left: 63px; }
.sketch-preview .eyes::after { left: 76px; }
.sketch-preview .eyes.strong::before, .sketch-preview .eyes.strong::after { width: 7px; height: 3px; border-radius: 3px; }
.sketch-preview .anime-eye::before { left: 60px; width: 8px; height: 10px; background: #156f81; }
.sketch-preview .anime-eye::after { left: 74px; width: 8px; height: 10px; background: #156f81; }
.sketch-preview .anime-eye.two { display: none; }
.sketch-preview .mouth, .sketch-preview .smile, .sketch-preview .flat-mouth {
  left: 66px;
  top: 40px;
  width: 12px;
  height: 6px;
  border: 2px solid #c46c55;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
.sketch-preview .flat-mouth { height: 0; border: 0; border-top: 2px solid #c46c55; border-radius: 0; }
.sketch-preview .side-turn { transform: rotate(-16deg); }
.sketch-preview .turn { transform: rotate(12deg); }
.sketch-preview .neck { left: 65px; top: 49px; width: 14px; height: 22px; border: 2px solid #c46c55; border-top: 0; background: #f8e9e5; }
.sketch-preview .shirt, .sketch-preview .suit, .sketch-preview .hanfu, .sketch-preview .dress, .sketch-preview .hoodie {
  left: 42px;
  bottom: 15px;
  width: 58px;
  height: 48px;
  border: 2px solid #527c79;
  border-radius: 18px 18px 6px 6px;
  background: #dbe9e8;
}
.sketch-preview .suit { background: linear-gradient(90deg, #26383c 0 45%, #eef6f5 45% 55%, #26383c 55%); }
.sketch-preview .tie { left: 68px; bottom: 35px; width: 7px; height: 24px; background: #c46c55; clip-path: polygon(50% 0, 100% 25%, 70% 100%, 30% 100%, 0 25%); }
.sketch-preview .hanfu { background: linear-gradient(135deg, #f8e9e5 0 45%, #dbe9e8 45%); }
.sketch-preview .hairpin { right: 40px; top: 20px; width: 23px; height: 3px; background: #d0a34c; transform: rotate(-25deg); }
.sketch-preview .dress { clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%); background: #f8e9e5; border-color: #c46c55; }
.sketch-preview .hoodie { background: #d7e0dc; }
.sketch-preview .cap { left: 51px; top: 10px; width: 39px; height: 14px; border: 2px solid #527c79; border-radius: 18px 18px 4px 4px; background: #dbe9e8; }
.sketch-preview .visor { left: 55px; top: 28px; width: 31px; height: 8px; border: 2px solid #156f81; background: #b9e6e7; }
.sketch-preview .neon-line, .sketch-preview .cool-line, .sketch-preview .rim {
  right: 23px;
  top: 29px;
  width: 32px;
  height: 3px;
  background: #5d96a3;
  box-shadow: 0 11px 0 #5d96a3;
}
.sketch-preview .rim { left: 88px; top: 23px; width: 3px; height: 45px; box-shadow: none; }
.sketch-preview .softbox { left: 16px; top: 18px; width: 25px; height: 33px; border: 2px solid #d0a34c; background: #fff3c9; transform: rotate(-12deg); }
.sketch-preview .back-sun { left: 83px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: #fff3c9; border: 2px solid #d0a34c; }
.sketch-preview .lens { right: 20px; top: 23px; width: 24px; height: 18px; border: 2px solid #26383c; border-radius: 6px; background: #e8ecee; }
.sketch-preview .bokeh, .sketch-preview .bokeh.small { right: 18px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: rgba(208, 163, 76, .4); border: 0; box-shadow: -18px 21px 0 rgba(93,150,163,.35); }
.sketch-preview .grain { inset: 16px; border: 0; background-image: radial-gradient(#9aa9a8 1px, transparent 1px); background-size: 9px 9px; opacity: .5; }
.sketch-preview .backdrop { inset: 12px 22px; border: 2px solid #d7e0e1; border-radius: 8px; background: #f5f8f8; }
.sketch-preview .table { left: 16px; bottom: 20px; width: 110px; height: 8px; border: 2px solid #9a7a55; background: #e4cfae; }
.sketch-preview .cup { right: 30px; bottom: 28px; width: 17px; height: 21px; border: 2px solid #527c79; border-radius: 3px 3px 8px 8px; background: #fff; }

.sketch-preview .product-box, .sketch-preview .product-bottle, .sketch-preview .phone, .sketch-preview .bowl, .sketch-preview .shirt-icon, .sketch-preview .lamp, .sketch-preview .minimal-shape {
  left: 50px;
  top: 24px;
  width: 42px;
  height: 52px;
  border: 2px solid #527c79;
  border-radius: 7px;
  background: #fff;
}
.sketch-preview .product-box.hero { left: 46px; top: 20px; width: 50px; height: 62px; }
.sketch-preview .product-box.front { transform: none; }
.sketch-preview .product-box.angled { transform: skewY(-8deg); box-shadow: 11px 5px 0 #dbe9e8; }
.sketch-preview .product-bottle { left: 56px; width: 30px; height: 61px; border-radius: 9px 9px 6px 6px; }
.sketch-preview .product-bottle::before { content: ""; position: absolute; left: 7px; top: -12px; width: 13px; height: 12px; border: 2px solid #527c79; border-bottom: 0; background: #fff; }
.sketch-preview .label-line { left: 57px; top: 47px; width: 28px; height: 2px; background: #9aa9a8; box-shadow: 0 8px 0 #9aa9a8; }
.sketch-preview .white-bg { inset: 11px; border: 2px dashed #dce3e5; background: #fff; z-index: -1; }
.sketch-preview .color-panel, .sketch-preview .brand-panel, .sketch-preview .gradient-panel {
  inset: 12px;
  border: 0;
  background: #dbe9e8;
  z-index: -1;
}
.sketch-preview .gradient-panel { background: linear-gradient(135deg, #f8e9e5, #dbe9e8); }
.sketch-preview .brand-panel { background: #e3f2f0; }
.sketch-preview .stage { left: 22px; bottom: 16px; width: 100px; height: 22px; border: 2px solid #d0a34c; border-radius: 50%; background: #fff3c9; }
.sketch-preview .burst { right: 20px; top: 17px; width: 24px; height: 24px; border: 2px solid #d0a34c; background: #fff3c9; clip-path: polygon(50% 0, 62% 34%, 100% 28%, 72% 52%, 88% 88%, 52% 70%, 18% 100%, 28% 60%, 0 42%, 38% 34%); }
.sketch-preview .reflection { left: 47px; bottom: 17px; width: 51px; height: 11px; border: 0; border-radius: 50%; background: rgba(93,150,163,.24); }
.sketch-preview .drop { right: 31px; top: 32px; width: 13px; height: 19px; border: 2px solid #5d96a3; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #eaf7fb; }
.sketch-preview .bowl { top: 49px; height: 27px; border-radius: 0 0 30px 30px; }
.sketch-preview .steam { left: 57px; top: 25px; width: 4px; height: 18px; border: 0; border-left: 2px solid #9aa9a8; border-radius: 50%; box-shadow: 13px 0 0 #9aa9a8, 26px 0 0 #9aa9a8; }
.sketch-preview .leaf { right: 24px; top: 37px; width: 20px; height: 12px; border: 2px solid #6f9a73; border-radius: 100% 0 100% 0; background: #dbe9d6; }
.sketch-preview .hanger { left: 59px; top: 18px; width: 24px; height: 14px; border: 2px solid #527c79; border-bottom: 0; border-radius: 50% 50% 0 0; }
.sketch-preview .shirt-icon { clip-path: polygon(20% 0, 38% 12%, 62% 12%, 80% 0, 100% 25%, 82% 42%, 82% 100%, 18% 100%, 18% 42%, 0 25%); }
.sketch-preview .fold { left: 64px; top: 42px; width: 2px; height: 35px; background: #9aa9a8; }
.sketch-preview .phone { left: 54px; width: 34px; height: 60px; border-radius: 9px; background: #26383c; }
.sketch-preview .screen-glow { left: 60px; top: 31px; width: 22px; height: 38px; border: 0; background: #b9e6e7; }
.sketch-preview .chip { right: 24px; top: 54px; width: 18px; height: 18px; border: 2px solid #d0a34c; background: #fff3c9; }
.sketch-preview .lamp { top: 25px; width: 34px; height: 28px; border-radius: 50% 50% 8px 8px; }
.sketch-preview .lamp::after { content: ""; position: absolute; left: 14px; top: 27px; width: 4px; height: 31px; background: #527c79; }
.sketch-preview .toy-head { top: 17px; }
.sketch-preview .toy-body { left: 53px; bottom: 18px; width: 35px; height: 39px; border-radius: 12px; }
.sketch-preview .top-box { left: 43px; top: 27px; width: 56px; height: 44px; border: 2px solid #527c79; border-radius: 50%; background: #fff; }
.sketch-preview .top-shadow { left: 37px; bottom: 24px; width: 68px; height: 12px; border-radius: 50%; background: #c9d1d1; }
.sketch-preview .side-product { left: 44px; top: 38px; width: 60px; height: 26px; border: 2px solid #527c79; background: #fff; }
.sketch-preview .depth-line { left: 52px; top: 70px; width: 45px; height: 2px; background: #9aa9a8; }
.sketch-preview .macro-circle { left: 29px; top: 18px; width: 76px; height: 76px; border: 3px solid #527c79; border-radius: 50%; background: #fff; }
.sketch-preview .texture-lines { left: 44px; top: 44px; width: 47px; height: 27px; border: 0; background: repeating-linear-gradient(160deg, #9aa9a8 0 2px, transparent 2px 8px); }
.sketch-preview .product-corner { right: 28px; bottom: 25px; width: 27px; height: 27px; border: 2px solid #527c79; border-radius: 5px; background: #dbe9e8; }
.sketch-preview .hand { left: 21px; bottom: 19px; width: 54px; height: 15px; border: 2px solid #c46c55; border-radius: 999px; background: #f8e9e5; transform: rotate(-18deg); }
.sketch-preview .tile { inset: 16px; border: 0; background-image: linear-gradient(#dce3e5 1px, transparent 1px), linear-gradient(90deg, #dce3e5 1px, transparent 1px); background-size: 22px 22px; z-index: -1; }
.sketch-preview .marble-line, .sketch-preview .wood-line { left: 16px; bottom: 28px; width: 110px; height: 2px; background: #c9d1d1; transform: rotate(-8deg); }
.sketch-preview .marble-line.two, .sketch-preview .wood-line.two { bottom: 45px; transform: rotate(7deg); }
.sketch-preview .wood-line { background: #b48d5f; }

.sketch-preview .round-frame {
  left: 34px;
  top: 11px;
  width: 74px;
  height: 74px;
  border: 3px solid #527c79;
  border-radius: 50%;
  background: transparent;
}
.sketch-preview .avatar-face { left: 50px; top: 24px; width: 42px; height: 42px; }
.sketch-preview .avatar-face.large { left: 39px; top: 16px; width: 64px; height: 64px; }
.sketch-preview .avatar-shoulders { left: 43px; bottom: 23px; width: 56px; height: 28px; }
.sketch-preview .safe-margin { left: 25px; top: 4px; width: 92px; height: 92px; border: 1px dashed #d0a34c; border-radius: 50%; background: transparent; }
.sketch-preview .minimal-shape { left: 51px; top: 28px; width: 40px; height: 40px; border-radius: 12px; transform: rotate(45deg); background: #dbe9e8; }
.sketch-preview .minimal-dot { right: 37px; top: 27px; width: 10px; height: 10px; border-radius: 50%; background: #d0a34c; }
.sketch-preview .pattern-dot { left: 18px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: #d0a34c; box-shadow: 92px 20px 0 #5d96a3, 13px 68px 0 #c46c55; }
.sketch-preview .pattern-dot.two { display: none; }
.sketch-preview .chat-bubble { right: 25px; bottom: 22px; width: 26px; height: 18px; border: 2px solid #5d96a3; border-radius: 10px; background: #eaf7fb; }
.sketch-preview .heart { right: 23px; top: 20px; width: 18px; height: 18px; border: 0; background: #f2a391; clip-path: polygon(50% 90%, 8% 43%, 8% 18%, 28% 4%, 50% 20%, 72% 4%, 92% 18%, 92% 43%); }
.sketch-preview .music-note { right: 25px; top: 22px; width: 16px; height: 24px; border: 0; background: transparent; border-left: 4px solid #156f81; border-bottom: 4px solid #156f81; }
.sketch-preview .tv-ear::before, .sketch-preview .tv-ear::after { content: ""; position: absolute; top: 14px; width: 14px; height: 14px; border-top: 3px solid #527c79; }
.sketch-preview .tv-ear::before { left: 41px; transform: rotate(35deg); }
.sketch-preview .tv-ear::after { right: 41px; transform: rotate(-35deg); }
.sketch-preview .outline-bold { left: 46px; top: 20px; width: 50px; height: 50px; border: 4px solid #26383c; border-radius: 50%; background: transparent; }
.sketch-preview .suit-small { left: 53px; bottom: 23px; width: 36px; height: 29px; border: 2px solid #26383c; background: #dbe9e8; }
.sketch-preview .check { right: 25px; bottom: 24px; width: 18px; height: 18px; border-radius: 50%; }
.sketch-preview .check::after { content: ""; position: absolute; left: 4px; top: 5px; width: 8px; height: 4px; border-left: 2px solid #527c79; border-bottom: 2px solid #527c79; transform: rotate(-45deg); }
.sketch-preview .spark { right: 20px; top: 20px; width: 16px; height: 16px; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

.detail-fields, .parameter-panel { display: grid; gap: 18px; max-width: 760px; }
.selection-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}
.selection-summary span {
  color: #405258;
  font-size: 12px;
  font-weight: 800;
}
.inline-model-panel { display: grid; gap: 12px; }
.model-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}
.model-chip.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.description-panel { position: relative; display: grid; gap: 14px; }
.description-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: -4px;
}
.description-tools .ghost-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.description-tools span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
label { display: grid; gap: 7px; color: #3f4d53; font-size: 13px; font-weight: 800; }
label > strong { font-size: 13px; line-height: 18px; }
label > span { color: var(--muted); font-size: 11px; font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--text); outline: none; }
input { height: 43px; padding: 0 11px; }
select { height: 43px; padding: 0 11px; font-weight: 700; }
select:disabled { color: #68777d; background: #edf2f2; cursor: not-allowed; }
textarea { min-height: 172px; padding: 12px; resize: vertical; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.parameter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.parameter-fields.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.parameter-fields label { grid-template-rows: 18px 43px 16px; align-items: start; }
.parameter-fields label > span { min-height: 16px; line-height: 16px; }
.notice { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 13px; line-height: 1.6; }
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-button { display: inline-grid; place-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--primary-dark); cursor: pointer; }
.upload-button input { display: none; }
.upload-row > span { color: var(--muted); font-size: 12px; }
.reference-thumbs, .review-references { display: flex; flex-wrap: wrap; gap: 10px; }
.reference-thumb {
  position: relative;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 0;
}
.reference-thumb img, .review-references img { width: 100%; height: 100%; object-fit: cover; }
.reference-thumb span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(20, 118, 111, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.reference-thumb small {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(23, 33, 38, 0.75);
  color: #fff;
  font-size: 14px;
}
.reference-picker {
  position: absolute;
  z-index: 5;
  left: 10px;
  top: 118px;
  display: grid;
  grid-template-columns: repeat(4, 76px);
  gap: 8px;
  max-width: 360px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 33, 38, 0.16);
}
.reference-picker-item {
  display: grid;
  gap: 4px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.reference-picker-item.active { border-color: var(--primary); background: var(--primary-soft); }
.reference-picker-item img {
  width: 64px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.review-list { border-top: 1px solid var(--line); }
.review-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.review-list span { color: var(--muted); font-size: 12px; }
.review-list strong { font-size: 13px; line-height: 1.55; }
.review-references { margin-top: 14px; }
.review-references img { width: 86px; height: 86px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); cursor: zoom-in; }

.workflow-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.workflow-actions:has(#backButton.hidden) { justify-content: flex-end; }
.action-end { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: flex-end; }
.price-text { color: var(--accent); font-weight: 800; }
.login-required-text {
  width: 100%;
  border: 1px solid #f0b8ad;
  border-radius: 6px;
  background: #fff3f0;
  color: #b33b2e;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}
.ghost-button, .primary-button { min-height: 40px; padding: 0 16px; border-radius: 6px; font-weight: 800; }
.ghost-button { border: 1px solid var(--line); background: var(--surface); color: var(--primary-dark); }
.primary-button { border: 0; background: var(--primary); color: #fff; }
.primary-button:hover { background: var(--primary-dark); }
.primary-button:disabled { opacity: 0.6; }

.result { min-width: 0; }
.empty-result {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 690px;
  padding: 28px;
  border: 1px dashed #b9c5c8;
  border-radius: 8px;
  background: #edf1f2;
  color: var(--muted);
  text-align: center;
}
.empty-result > span { max-width: 430px; line-height: 1.6; }
.empty-result strong { color: var(--text); font-size: 20px; }
.empty-frame { display: flex; align-items: end; gap: 6px; width: 160px; height: 116px; padding: 18px; border: 1px solid #b8c4c6; background: #fff; }
.empty-frame span { flex: 1; border: 2px solid #88a09e; border-radius: 45% 45% 15% 15%; background: #dce9e7; }
.empty-frame span:nth-child(1) { height: 55px; }
.empty-frame span:nth-child(2) { height: 78px; }
.empty-frame span:nth-child(3) { height: 62px; }
.empty-result.has-example {
  align-content: start;
  padding: 16px;
  border-style: solid;
  background: #fff;
}
.example-image {
  display: block;
  width: 100%;
  max-height: 610px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  cursor: zoom-in;
}
.empty-result.has-example strong { margin-top: 4px; }
.empty-result.has-example > span { color: var(--muted); }
.result-card { padding: 16px; }
.main-result-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  border-radius: 6px;
  background: #e9edef;
  overflow: hidden;
}
.result-card img { display: block; width: 100%; max-height: 620px; object-fit: contain; border-radius: 6px; background: #e9edef; }
.generating-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  min-height: 420px;
  border-radius: 6px;
  background: #edf1f2;
  text-align: center;
}
.result-error {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 420px;
  padding: 24px;
  color: #9b2c2c;
  background: #fff1f1;
  border: 1px solid #efb7b7;
  text-align: center;
  font-weight: 800;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #d0ddde;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
.generating-state strong { font-size: 18px; }
.generating-state span { color: var(--muted); font-size: 13px; }
@keyframes spin {
  to { transform: rotate(360deg); }
}
.result-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.result-meta div { padding: 11px; border: 1px solid var(--line); background: var(--surface-soft); }
.result-meta span { color: var(--muted); font-size: 11px; }
.result-meta strong { display: block; margin-top: 3px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.result-actions a { display: inline-grid; place-items: center; min-height: 40px; padding: 0 16px; border-radius: 6px; font-weight: 800; text-decoration: none; }
.result-actions .disabled { opacity: 0.55; pointer-events: none; }
.thumb-strip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.thumb-scroll {
  width: 38px;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #edf3f3);
  color: var(--primary-dark);
  font-size: 28px;
  font-weight: 900;
}
.result-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding: 2px 1px 8px;
}
.result-thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 86px;
  width: 86px;
  aspect-ratio: 1;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #edf1f2;
  overflow: hidden;
}
.result-thumb.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(55, 120, 116, 0.18);
}
.result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.result-thumb small {
  position: absolute;
  left: 6px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(16, 29, 32, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.mini-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #d0ddde;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
.thumb-error {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 8px;
  color: #9b2c2c;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.image-modal, .auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 21, 0.82);
}

.auth-modal {
  align-items: start;
  justify-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.image-modal button, .modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}
.image-modal img {
  max-width: min(96vw, 1500px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  cursor: zoom-out;
}

.image-modal img,
.example-image,
.result-card img,
.reference-thumb img,
.result-thumb img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.auth-dialog, .recharge-dialog {
  position: relative;
  width: min(420px, 92vw);
  margin: auto 0;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.auth-dialog h2, .recharge-dialog h2 { margin: 0; font-size: 24px; }
.auth-dialog p, .recharge-dialog p { margin: 8px 0 18px; color: var(--muted); line-height: 1.6; }
.auth-dialog .modal-close, .recharge-dialog .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 22px;
}
.auth-dialog .auth-form input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}
.auth-dialog .auth-form .password-rule {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.captcha-row strong {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px dashed #9bb9b6;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.auth-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.auth-dialog #authMessage { min-height: 18px; color: var(--accent); font-size: 12px; line-height: 1.45; }
.recharge-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.amount-option {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-weight: 900;
}
.amount-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.recharge-custom {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}
.recharge-custom input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
}
.recharge-dialog #rechargeMessage {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
}
.recharge-actions { display: grid; margin-top: 10px; }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  .studio { grid-template-columns: 1fr; }
  .empty-result { min-height: 430px; }
}

@media (min-width: 1181px) and (max-height: 940px) {
  .app-shell {
    grid-template-columns: minmax(0, 218px) minmax(0, 1fr);
  }

  .side {
    gap: 14px;
    padding: 16px 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand p {
    max-width: 136px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logo {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .balance {
    padding: 12px;
  }

  .balance strong {
    font-size: 20px;
  }

  .history-header div {
    gap: 6px;
  }

  #newTaskButton {
    min-height: 34px;
  }

  #refreshHistoryButton {
    min-width: 44px;
  }

  .history-list {
    gap: 6px;
  }

  .history-item {
    padding: 8px 9px;
  }

  .history-item strong {
    font-size: 13px;
  }

  .history-item span {
    font-size: 10px;
  }

  .topbar {
    min-height: 58px;
    padding: 10px 20px;
  }

  .top-auth {
    gap: 8px;
  }

  .top-auth .ghost-button {
    min-height: 34px;
    padding: 0 12px;
  }

  .studio {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
    min-width: 0;
    max-width: 1640px;
    padding: 16px 20px;
  }

  .workflow-panel {
    min-height: calc(100vh - 90px);
    padding: 16px;
  }

  .stepper {
    padding-bottom: 10px;
  }

  .stepper-item {
    gap: 4px;
    min-width: 104px;
    min-height: 36px;
    padding: 0 9px;
  }

  .stepper-item:not(:last-child)::after {
    top: 50%;
    right: -15px;
    left: auto;
    width: auto;
    transform: translateY(-50%);
  }

  .stepper-item > span {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .stepper-item small {
    max-width: 82px;
    font-size: 11px;
  }

  .workflow-heading {
    padding: 12px 0 14px;
  }

  .workflow-heading h3 {
    font-size: 21px;
  }

  .workflow-heading p {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.5;
  }

  .workflow-heading .step-hint {
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 12px;
  }
  .workflow-heading .step-hint.single-line {
    font-size: clamp(10px, 1.05vw, 13px);
    white-space: nowrap;
  }

  .step-content {
    min-height: 350px;
  }

  .quick-config-scroll {
    max-height: min(52vh, 470px);
  }

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

  .category-grid,
  .option-grid {
    gap: 10px;
  }

  .category-card {
    min-height: 190px;
    padding: 10px;
  }

  .category-preview {
    height: 104px;
    margin-bottom: 9px;
  }

  .option-card {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
    min-height: 104px;
    padding: 8px;
  }

  .layout-preview {
    width: 116px;
    height: 88px;
  }

  .model-bar {
    gap: 8px;
    margin-bottom: 12px;
  }

  .model-chip {
    min-height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .parameter-panel,
  .parameter-fields {
    gap: 10px;
  }

  .field-group select,
  .field-group input {
    height: 40px;
  }

  textarea {
    min-height: 180px;
  }

  .reference-thumbs {
    gap: 8px;
  }

  .reference-thumb {
    width: 70px;
    height: 70px;
  }

  .workflow-actions {
    margin-top: 14px;
    padding-top: 12px;
  }

  .ghost-button,
  .primary-button {
    min-height: 36px;
    padding: 0 13px;
  }

  .empty-result {
    min-height: calc(100vh - 90px);
    padding: 14px;
  }

  .example-image {
    max-height: calc(100vh - 145px);
  }

  .result-card {
    padding: 12px;
  }

  .main-result-frame,
  .generating-state,
  .result-error {
    min-height: calc(100vh - 330px);
  }

  .result-card img {
    max-height: calc(100vh - 300px);
  }

  .result-meta {
    gap: 8px;
    margin: 10px 0;
  }

  .result-meta div {
    padding: 8px 10px;
  }

  .thumb-strip {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 6px;
    margin-top: 8px;
  }

  .thumb-scroll {
    width: 32px;
    height: 68px;
    font-size: 23px;
  }

  .result-thumbs {
    gap: 8px;
    padding-bottom: 5px;
  }

  .result-thumb {
    flex-basis: 68px;
    width: 68px;
  }

  .result-actions {
    gap: 8px;
    margin-top: 8px;
  }

  .result-actions a,
  .result-actions .ghost-button,
  .result-actions .primary-button {
    min-height: 36px;
    padding: 0 12px;
  }
}

@media (max-width: 780px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  body { background: var(--surface); }
  .admin-console {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 11;
    padding: 12px;
  }
  .admin-brand {
    padding: 0 4px 8px;
  }
  .admin-menu {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .admin-menu button {
    flex: 0 0 auto;
    min-height: 36px;
    white-space: nowrap;
  }
  .admin-console-topbar {
    display: grid;
    padding: 14px;
  }
  .admin-top-actions {
    justify-content: flex-start;
  }
  .admin-panel {
    margin: 12px;
  }
  .admin-toolbar, .admin-list-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .admin-toolbar input {
    max-width: none;
  }
  .admin-template-workspace {
    grid-template-columns: 1fr;
  }
  .template-flow-editor {
    grid-template-columns: 1fr;
  }
  .template-columns {
    min-height: 360px;
  }
  .template-column {
    flex-basis: 220px;
    min-height: 360px;
  }
  .template-detail {
    border-left: 0;
    border-top: 3px solid #cad6d8;
  }
  .admin-template-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-template-list,
  .admin-template-list.compact {
    max-height: 180px;
  }
  .admin-shell { width: min(100% - 24px, 720px); padding-top: 14px; }
  .admin-topbar, .admin-recharge, .admin-layout, .admin-template-grid, .admin-template-editors { display: grid; grid-template-columns: 1fr; }
  .admin-topbar nav, .admin-pager { flex-wrap: wrap; }
  .admin-recharge-form { grid-template-columns: 1fr; }
  .admin-recharge small { grid-column: auto; }
  .admin-layout { gap: 12px; }
  .admin-tables, .admin-data { min-height: auto; }
  .admin-table-wrap { max-height: 70vh; }
  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 190px;
  }
  .workspace { order: 1; }
  .side {
    display: none;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    min-height: 0;
    padding: 12px 14px;
  }
  .mobile-new-task-button {
    min-height: 34px;
    color: var(--primary-dark);
    font-size: 18px;
  }
  .topbar p {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-balance-pill {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 86px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fbfb;
    padding: 6px 9px;
  }
  .mobile-balance-pill span {
    color: var(--muted);
    font-size: 11px;
  }
  .mobile-balance-pill strong {
    color: var(--primary-dark);
    font-size: 14px;
  }
  .top-auth {
    grid-column: 1 / -1;
    flex: 1;
    justify-content: flex-start;
    gap: 6px;
  }
  .top-auth span {
    width: auto;
    max-width: 34vw;
    margin-right: auto;
    text-align: left;
    font-size: 12px;
  }
  .top-auth .ghost-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
  .studio {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px 12px 24px;
  }
  .workspace,
  .studio,
  .workflow-panel,
  .step-content,
  .category-grid,
  .option-grid,
  .layout-grid,
  .detail-fields,
  .parameter-panel,
  .generate-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .workflow-panel {
    overflow-x: hidden;
  }
  .category-grid, .option-grid, .layout-grid { grid-template-columns: 1fr; }
  .parameter-fields { grid-template-columns: 1fr; }
  .parameter-fields.compact { grid-template-columns: 1fr; }
  .reference-picker { grid-template-columns: repeat(3, 76px); }
  .workflow-panel {
    min-height: auto;
    padding: 14px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .stepper {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    margin: -2px -4px 8px;
    padding: 2px 4px 10px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: none;
    scrollbar-width: none;
  }
  .stepper::-webkit-scrollbar { display: none; }
  .stepper-item {
    flex: 0 0 auto;
    min-width: 112px;
    min-height: 38px;
    gap: 6px;
    padding: 0 10px;
  }
  .stepper-item:not(:last-child)::after {
    right: -15px;
    top: 50%;
    width: auto;
    transform: translateY(-50%);
  }
  .stepper-item > span {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
  }
  .stepper-item small {
    max-width: 82px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .workflow-heading {
    padding: 14px 0 15px;
  }
  .workflow-heading h3 { font-size: 22px; }
  .workflow-heading p { font-size: 13px; line-height: 1.55; }
  .workflow-heading .step-hint.single-line {
    font-size: clamp(10px, 3.1vw, 13px);
    white-space: nowrap;
  }
  .step-content { min-height: 0; }
  .quick-config-scroll {
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .config-section {
    gap: 10px;
    padding: 12px;
  }
  .category-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .category-summary .ghost-button,
  .category-picker-actions .ghost-button {
    width: 100%;
  }
  .config-node-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .config-node {
    justify-content: flex-start;
    min-width: 0;
    min-height: 38px;
    border-radius: 8px;
    padding-right: 9px;
  }
  .config-node strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .active-option-section {
    min-height: 0;
  }
  .quick-group {
    gap: 8px;
    padding-bottom: 12px;
  }
  .quick-group.collapsed {
    padding: 0;
  }
  .quick-group-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px 8px;
  }
  .quick-group-head span {
    grid-column: 1 / -1;
    text-align: left;
  }
  .quick-group.collapsed .quick-group-head {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 38px;
    padding: 7px 10px;
  }
  .quick-group.collapsed .quick-group-head span {
    grid-column: 1 / 2;
    white-space: nowrap;
  }
  .quick-tags,
  .quick-tags.category-tags {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .quick-tag,
  .quick-tag.compact {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    min-height: auto;
    padding: 12px;
  }
  .quick-tag-icon,
  .quick-tag-icon.option-icon {
    display: flex;
    width: 34px;
    height: 34px;
  }
  .quick-tag .category-preview.quick-tag-icon {
    width: 34px;
    height: 34px;
  }
  .quick-tag-icon.option-icon > .layout-preview {
    display: flex !important;
    transform: translate(-50%, -50%) scale(.28);
  }
  .quick-tag .category-preview.quick-tag-icon {
    display: block !important;
  }
  .quick-tag-text strong {
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .quick-tag-text span {
    -webkit-line-clamp: 3;
  }
  .category-card {
    min-height: auto;
    padding: 11px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .category-preview {
    display: none;
  }
  .option-card {
    display: block;
    min-height: auto;
    padding: 13px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .layout-preview {
    display: none;
  }
  .option-card strong, .category-card strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 16px;
  }
  .option-card div > span, .category-card > span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.55;
  }
  #newTaskButton {
    position: fixed;
    top: 66px;
    right: 12px;
    z-index: 12;
    min-height: 34px;
    max-width: 112px;
    padding: 0 10px;
    overflow: hidden;
    border-color: rgba(20, 118, 111, 0.34);
    box-shadow: 0 8px 20px rgba(23, 33, 38, 0.12);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .selection-summary { padding: 8px; }
  .model-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-chip {
    min-width: 0;
    padding: 0 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  textarea { min-height: 146px; }
  .upload-row {
    align-items: stretch;
  }
  .upload-button {
    width: 100%;
  }
  .reference-thumbs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .reference-thumb {
    flex: 0 0 78px;
    width: 78px;
    height: 78px;
  }
  .reference-picker {
    left: 0;
    right: 0;
    top: auto;
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .reference-picker-item img { width: 100%; }
  .workflow-actions {
    position: sticky;
    bottom: 0;
    z-index: 8;
    align-items: stretch;
    gap: 10px;
    margin: 14px -14px -14px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 24px rgba(23, 33, 38, 0.08);
  }
  .workflow-actions > .ghost-button {
    flex: 0 0 auto;
  }
  .action-end {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    justify-items: stretch;
  }
  .action-end .primary-button { width: 100%; }
  .price-text {
    width: 100%;
    text-align: right;
    font-size: 12px;
  }
  .login-required-text {
    width: 100%;
    text-align: center;
    font-size: 14px;
  }
  .result:not(.has-output) {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 12;
    pointer-events: none;
  }
  .result.has-output {
    position: static;
    pointer-events: auto;
  }
  .empty-result {
    display: grid;
    place-items: center;
    min-height: 0;
    max-height: 170px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid rgba(199, 211, 213, 0.86);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 36px rgba(23, 33, 38, 0.16);
    pointer-events: auto;
  }
  .empty-result .empty-frame,
  .empty-result strong,
  .empty-result > span {
    display: none;
  }
  .example-image {
    width: 100%;
    height: 150px;
    max-height: 150px;
    object-fit: contain;
    object-position: center center;
  }
  .result-card {
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(23, 33, 38, 0.16);
    pointer-events: auto;
  }
  .main-result-frame, .generating-state, .result-error { min-height: 320px; }
  .result-card img { max-height: 420px; }
  .result-meta { grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
  .thumb-strip {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
  }
  .thumb-scroll {
    width: 34px;
    height: 74px;
  }
  .result-thumb {
    flex-basis: 74px;
    width: 74px;
  }
  .result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .result-actions .ghost-button,
  .result-actions .primary-button,
  .result-actions a {
    width: 100%;
    padding: 0 10px;
    font-size: 13px;
  }
  .auth-modal, .image-modal { padding: 14px; }
  .auth-dialog, .recharge-dialog {
    width: 100%;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    padding: 20px;
  }
  .recharge-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .topbar { flex-direction: column; }
  .topbar p { max-width: 100%; }
  .top-auth {
    width: 100%;
    justify-content: flex-start;
  }
  .top-auth span { width: auto; margin-right: auto; text-align: left; }
  .option-card {
    display: block;
    grid-template-columns: 92px minmax(0, 1fr);
  }
  .layout-preview {
    width: 92px;
    height: 78px;
  }
  .model-bar { grid-template-columns: 1fr; }
  .workflow-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
}
