:root {
  --yh-site-header-height: 96px;
  --ink: #0f172a;
  --muted: #64748b;
  --soft-muted: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --paper: #f8fafc;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --purple: #7c3aed;
  --green: #15803d;
  --red: #dc2626;
  --amber: #b45309;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body { margin: 0; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:not(:disabled), select, label[for], summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
[hidden] { display: none !important; }

#nav-placeholder {
  position: relative;
  z-index: 80;
  min-height: 96px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

/* 公共导航用户菜单：与 /product-image-set/ 的 Tailwind 渲染保持一致。 */
#nav-placeholder #index-user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: color .2s ease, background-color .2s ease;
}
#nav-placeholder #index-user-name:hover { background: #e2e8f0; }
#nav-placeholder #index-user-name iconify-icon { flex: 0 0 auto; font-size: 16px; }
#nav-placeholder #index-user-name .max-w-20 {
  display: block;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#nav-placeholder #index-user-chip .nav-dropdown > .flex {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 8px;
}
#nav-placeholder #index-user-chip .nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
#nav-placeholder #index-user-chip .nav-dropdown a:hover { background: #f8fafc; }
#nav-placeholder #index-user-chip .nav-dropdown a iconify-icon { flex: 0 0 auto; font-size: 16px; }
#nav-placeholder #index-user-chip .nav-dropdown .border-t {
  height: 1px;
  margin-block: 4px;
  border-top: 1px solid #f1f5f9;
}
#nav-placeholder #index-user-chip .nav-dropdown #nav-logout-btn { color: #ef4444; }
#nav-placeholder #index-user-chip .nav-dropdown #nav-logout-btn:hover { background: #fef2f2; }

.hot-image-page-shell { display: flex; align-items: stretch; min-width: 0; min-height: calc(100vh - 96px); }
.hot-image-page-shell > [data-tool-sidebar] { flex: 0 0 var(--yh-tool-sidebar-width, 184px); }
.hot-image-content-shell { flex: 1 1 auto; min-width: 0; min-height: calc(100vh - 96px); display: flex; flex-direction: column; }
.hot-image-content-shell > main { flex: 1 1 auto; min-width: 0; min-height: 0; }

.tool-app-shell {
  display: flex;
  min-height: calc(100vh - 96px);
  background: var(--paper);
}

.product-header {
  width: 100%;
  min-height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 40;
}

.brand-lockup { flex: 1 1 0; display: flex; align-items: center; }
.brand-lockup strong { display: block; color: #1e293b; font-size: 16px; line-height: 1.25; }
.brand-lockup small { display: block; margin-top: 2px; color: #94a3b8; font-size: 9px; letter-spacing: 0.08em; }
.top-tabs { flex: 0 0 auto; align-self: stretch; display: flex; align-items: stretch; justify-content: center; gap: 24px; }
.top-tab {
  width: auto;
  min-width: 76px;
  min-height: 64px;
  padding: 0 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: #fff;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  position: relative;
  transition: 0.2s ease;
}
.top-tab:hover { color: var(--primary); background: #f8fafc; border-bottom-color: #bfdbfe; }
.top-tab.active { color: var(--primary); background: #fff; border-bottom-color: var(--primary); }
.top-tab b {
  position: static;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary);
  font-size: 9px;
  line-height: 1.2;
}
.header-actions { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; }
.retention-note {
  display: inline-flex;
  width: auto;
  color: var(--soft-muted);
  font-size: 11px;
  line-height: 1.4;
}
.mobile-settings-button { display: none; }

main { flex: 1; min-width: 0; overflow: hidden; }
.view { display: none; }
.view.active { display: block; }

.studio-layout {
  display: grid;
  grid-template-columns: minmax(360px, 410px) minmax(0, 1fr);
  gap: 30px;
  padding: 16px 30px 22px;
  height: calc(100vh - 160px);
  min-height: 620px;
}

.settings-panel,
.workspace {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.settings-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
}

.mobile-drawer-head {
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,0.97);
}
.mobile-drawer-head strong {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-drawer-head strong::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--primary);
}
.mobile-drawer-head button { display: none; }

.setting-section { border-bottom: 1px solid var(--line-soft); }
.section-heading {
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  border: 0;
  background: #fff;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  color: #334155;
  font-weight: 700;
}
.section-heading:hover { background: #f8fafc; }
.step-index {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
}
.section-heading em { color: var(--soft-muted); font-size: 11px; font-style: normal; font-weight: 500; }
.section-body { padding: 0 22px 22px; }

.field-label,
.two-column-fields label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}
.hot-image-page-shell input,
.hot-image-page-shell textarea,
.hot-image-page-shell select {
  width: 100%;
  border: 1px solid #dbe1e9;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hot-image-page-shell input::placeholder,
.hot-image-page-shell textarea::placeholder { color: #94a3b8; }
.hot-image-page-shell input:focus,
.hot-image-page-shell textarea:focus,
.hot-image-page-shell select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.hot-image-page-shell textarea { resize: vertical; line-height: 1.5; }
.url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.url-row input { border-radius: 8px 0 0 8px; }
.url-row button {
  min-width: 64px;
  padding: 0 16px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.url-row button:hover { background: var(--primary-dark); }
.divider { height: 38px; display: flex; align-items: center; gap: 10px; color: #94a3b8; font-size: 11px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.upload-zone {
  min-height: 118px;
  padding: 18px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-align: center;
  transition: 0.2s ease;
}
.upload-zone:hover { border-color: var(--primary); color: var(--primary); background: #f8fafc; }
.upload-zone input, .file-button input { display: none; }
.upload-zone .upload-icon { margin-bottom: 5px; color: #3b82f6; font-size: 30px; }
.upload-zone strong { font-size: 13px; }
.upload-zone small { margin-top: 4px; color: #94a3b8; font-size: 10px; }

.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.secondary-button, .primary-button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid #dbe1e9;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}
.secondary-button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.primary-button { border-color: var(--primary); background: var(--primary); color: #fff; }
.primary-button:hover, .primary-cta:hover, .quick-start-button:hover { background: var(--primary-dark); }
.file-button { display: grid; place-items: center; }
.quiet-tip { margin: 10px 0 0; color: #7c8798; font-size: 10.5px; line-height: 1.55; }

.asset-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 10px; }
.asset-chip { position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: #f1f5f9; }
.asset-chip img { width: 100%; height: 100%; object-fit: cover; }
.asset-chip button { position: absolute; top: 3px; right: 3px; width: 21px; height: 21px; padding: 0; border: 0; border-radius: 50%; background: rgba(15,23,42,0.78); color: #fff; }
.source-box { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.source-record + .source-record { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.source-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.source-head strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.source-head button { flex: 0 0 auto; padding: 6px 9px; border: 0; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11px; }
.candidate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.candidate { position: relative; overflow: hidden; padding: 0; aspect-ratio: 1; border: 2px solid transparent; border-radius: 7px; background: #e2e8f0; }
.candidate.selected { border-color: var(--primary); }
.candidate img { width: 100%; height: 100%; object-fit: cover; }
.candidate span { position: absolute; left: 3px; bottom: 3px; padding: 2px 4px; border-radius: 3px; background: rgba(15,23,42,0.75); color: #fff; font-size: 8px; }

.two-column-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 9px; }
.full-field { grid-column: 1 / -1; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 8px; background: #f1f5f9; }
.segmented button { padding: 8px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: 12px; }
.segmented button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(15,23,42,0.12); font-weight: 700; }
.brand-creator { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.brand-creator summary { color: var(--primary); font-size: 12px; font-weight: 650; }
.brand-fields { display: grid; gap: 7px; margin-top: 10px; }
.brand-logo-field { display: grid; gap: 5px; padding: 8px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); font-size: 10px; }
.brand-fields button { padding: 9px; border: 0; border-radius: 7px; background: var(--primary); color: #fff; }

.settings-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 13px 20px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.98);
}
.selection-summary { display: flex; justify-content: space-between; margin: 0 4px 9px; color: #7c8798; font-size: 10px; }
.selection-summary b { color: var(--ink); }
.primary-cta {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37,99,235,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 750;
}
.primary-cta small { margin-top: 2px; font-size: 9px; font-weight: 500; opacity: 0.78; }

.workspace {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 30px 34px;
  overflow: auto;
  position: relative;
}
.workspace-hero { max-width: 960px; margin: 0 auto; text-align: center; }
.hero-copy { max-width: 760px; margin: 0 auto; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; }
.eyebrow iconify-icon { vertical-align: -2px; font-size: 15px; }
.hero-copy h1 { margin: 12px 0 10px; color: #111827; font-size: 25px; line-height: 1.3; letter-spacing: -0.02em; }
.hero-copy p { max-width: 690px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.7; }
.feature-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 15px; }
.feature-pills span { padding: 6px 9px; border: 1px solid #dbeafe; border-radius: 999px; background: var(--primary-soft); color: #45617f; font-size: 10px; }

.campaign-preview { max-width: 760px; margin: 24px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; }
.preview-card { min-width: 0; text-align: left; }
.preview-card > span { display: block; margin-bottom: 9px; color: #334155; font-size: 12px; font-weight: 650; }
.preview-card > b { display: block; margin-top: 8px; color: #334155; font-size: 12px; text-align: center; }
.preview-image-wrap { overflow: hidden; aspect-ratio: 1; border: 1px solid #dbe1e9; border-radius: 12px; background: #f1f5f9; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07); }
.preview-image-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-arrow { width: 40px; height: 40px; margin: 24px auto 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: #64748b; }
.quick-start-button { width: 193px; height: 48px; margin: 18px auto 0; border: 0; border-radius: 8px; background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(37,99,235,0.22); display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; }
.quick-start-button iconify-icon { font-size: 18px; }

.default-structure { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); text-align: left; }
.structure-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.structure-head strong { font-size: 13px; }
.structure-head span { color: #94a3b8; font-size: 10px; }
.structure-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.structure-item { min-width: 0; padding: 10px 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: #f8fafc; }
.structure-item b { display: block; color: var(--primary); font-size: 10px; }
.structure-item span { display: block; margin-top: 5px; overflow: hidden; color: #334155; font-size: 10.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

.working-state { position: absolute; inset: 0; min-height: 620px; display: grid; place-content: center; text-align: center; }
.working-orb { width: 84px; height: 84px; margin: 0 auto 22px; border: 1px solid #bfdbfe; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; animation: pulse 1.7s ease-in-out infinite; }
.working-orb iconify-icon { color: var(--primary); font-size: 38px; }
.working-state h2 { margin: 0 0 8px; font-size: 22px; }
.working-state p { color: var(--muted); }
@keyframes pulse { 50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(37,99,235,0.05); } }

.plan-workspace, .result-workspace { max-width: 1180px; margin: 0 auto; }
.workspace-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.workspace-toolbar h2 { margin: 6px 0 4px; font-size: 27px; }
.workspace-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.analysis-banner { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid #bfdbfe; border-radius: 10px; background: var(--primary-soft); color: #1e3a5f; }
.analysis-banner strong { font-size: 13px; }
.analysis-banner span { color: #5a708b; font-size: 11px; }
.analysis-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.analysis-tags i { padding: 4px 7px; border-radius: 999px; background: #fff; color: #46627f; font-size: 10px; font-style: normal; }
.analysis-tags i.planning-warning { background: #fff7ed; color: #c2410c; }
.analysis-tags i.planning-success { background: #ecfdf5; color: #047857; }
.page-plan-list { display: grid; gap: 10px; }
.plan-page { display: grid; grid-template-columns: 44px 88px minmax(150px,1fr) minmax(180px,1.2fr) 190px 82px; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.drag-number { color: var(--primary); font-size: 12px; font-weight: 750; text-align: center; }
.plan-cover { overflow: hidden; height: 72px; border-radius: 7px; background: #f1f5f9; }
.plan-cover img { width: 100%; height: 100%; object-fit: cover; }
.plan-field label { display: block; margin: 0 0 4px; color: #94a3b8; font-size: 9px; }
.plan-field input, .plan-field textarea, .plan-field select { padding: 7px 8px; border-radius: 6px; font-size: 11px; }
.plan-field input + label, .plan-field input + input { margin-top: 5px; }
.plan-field textarea { height: 55px; }
.plan-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.plan-settings select { padding: 6px; font-size: 10px; }
.plan-toggle { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.plan-toggle input { width: auto; }
.model-recommendation { grid-column: 1 / -1; color: var(--primary); font-size: 9px; }
.plan-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.plan-actions button { padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 10px; }
.plan-actions button:hover { border-color: var(--primary); color: var(--primary); }
.plan-actions .danger { color: var(--red); }
.quote-panel { display: grid; grid-template-columns: 220px 1fr 210px; gap: 22px; align-items: center; margin-top: 18px; padding: 19px; border: 1px solid #bfdbfe; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.quote-panel > div:first-child span, .quote-panel > div:first-child small { display: block; color: var(--muted); font-size: 10px; }
.quote-panel > div:first-child strong { display: block; margin: 3px 0; font-size: 23px; }
.quote-panel > div:first-child strong b { color: var(--primary); }
#quoteBreakdown { display: flex; flex-wrap: wrap; gap: 6px; }
#quoteBreakdown span { padding: 5px 7px; border-radius: 6px; background: var(--primary-soft); color: #425d7b; font-size: 10px; }
.primary-cta.compact { min-height: 44px; }
.job-progress { margin-bottom: 18px; }
.job-progress > div { overflow: hidden; height: 8px; border-radius: 999px; background: #e2e8f0; }
.job-progress > div span { display: block; width: 0; height: 100%; background: var(--primary); transition: width 0.4s; }
.job-progress p { color: var(--muted); font-size: 11px; text-align: right; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.result-image { position: relative; overflow: hidden; aspect-ratio: 1; background: #f1f5f9; display: grid; place-items: center; }
.result-image.ratio-9-16 { aspect-ratio: 9 / 16; }
.result-image.ratio-4-5 { aspect-ratio: 4 / 5; }
.result-image.ratio-16-9 { aspect-ratio: 16 / 9; }
.result-image img { width: 100%; height: 100%; object-fit: cover; }
.result-image .canvas-container { width: 100% !important; height: 100% !important; max-width: 100%; max-height: 100%; }
.result-image canvas { display: block; width: 100% !important; height: 100% !important; max-width: 100%; max-height: 100%; object-fit: contain; }
.result-image[data-result-preview] { cursor: zoom-in; outline: none; }
.result-image[data-result-preview]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(15,23,42,0); transition: background .18s ease; }
.result-image[data-result-preview]:hover::after, .result-image[data-result-preview]:focus-visible::after { background: rgba(15,23,42,.08); }
.result-image[data-result-preview]:focus-visible { box-shadow: inset 0 0 0 3px var(--primary); }
.result-preview-hint { position: absolute; z-index: 2; right: 10px; bottom: 10px; padding: 6px 9px; border-radius: 999px; background: rgba(15,23,42,.76); color: #fff; font-size: 10px; opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.result-image[data-result-preview]:hover .result-preview-hint, .result-image[data-result-preview]:focus-visible .result-preview-hint { opacity: 1; transform: translateY(0); }
.result-status { position: absolute; top: 9px; left: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(15,23,42,0.78); color: #fff; font-size: 9px; }
.status-succeeded { background: rgba(21,128,61,0.9); }
.status-failed { background: rgba(220,38,38,0.9); }
.generating-placeholder { color: #7c8798; font-size: 11px; text-align: center; }
.generating-placeholder::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 9px; border: 3px solid #cbd5e1; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-meta { padding: 13px; }
.result-meta h3 { margin: 0 0 5px; font-size: 13px; }
.result-meta p { margin: 0; color: var(--muted); font-size: 10px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 13px 13px; }
.result-actions button, .result-actions a { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; font-size: 10px; text-decoration: none; }
.result-actions button:hover, .result-actions a:hover { border-color: var(--primary); color: var(--primary); }

.catalog-view, .history-view { min-height: calc(100vh - 160px); padding: 32px max(28px, calc((100vw - 1420px) / 2)); overflow: auto; }
.catalog-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.catalog-header h1 { margin: 7px 0; font-size: 31px; }
.catalog-header p { margin: 0; color: var(--muted); font-size: 13px; }
.library-tabs { display: flex; gap: 7px; margin-top: 16px; }
.library-tabs button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); }
.library-tabs button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.catalog-search { display: grid; grid-template-columns: 220px 150px 150px auto; gap: 8px; align-items: center; }
.catalog-search label { color: var(--muted); font-size: 11px; white-space: nowrap; }
.catalog-search label input { width: auto; }
.template-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; }
.template-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.template-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,23,42,0.12); }
.template-cover { position: relative; overflow: hidden; aspect-ratio: 1; background: #f1f5f9; }
.template-cover img { width: 100%; height: 100%; object-fit: cover; }
.template-page-count { position: absolute; left: 9px; bottom: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(15,23,42,.78); color: #fff; font-size: 9px; }
.template-copy { padding: 12px; }
.template-copy h3 { margin: 0 0 5px; font-size: 12px; }
.template-copy p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.template-meta { display: flex; gap: 5px; margin-top: 9px; }
.template-meta span { padding: 4px 5px; border-radius: 5px; background: #f1f5f9; color: #64748b; font-size: 8px; }
.template-select, .template-favorite { position: absolute; z-index: 2; border: 0; border-radius: 7px; }
.template-select { right: 9px; bottom: 9px; padding: 7px 9px; background: var(--primary); color: #fff; font-size: 10px; }
.template-select.selected { background: var(--green); }
.template-favorite { top: 9px; right: 9px; width: 30px; height: 30px; background: rgba(255,255,255,0.92); font-size: 17px; }
.template-favorite.favorite { color: #e11d48; }
.personal-template-actions { display: flex; gap: 5px; padding: 0 12px 12px; }
.personal-template-actions button { flex: 1; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #475569; font-size: 9px; }
.personal-template-actions button.danger { color: #b91c1c; }
.personal-template-actions button:disabled { cursor: default; color: #15803d; background: #f0fdf4; }
.same-style-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid #c7d2fe; border-radius: 8px; background: #eef2ff; }
.same-style-banner[hidden] { display: none; }
.same-style-banner div { display: grid; gap: 2px; }
.same-style-banner strong { color: #3730a3; font-size: 11px; }
.same-style-banner span { color: #6366f1; font-size: 10px; }
.same-style-banner button { border: 0; background: transparent; color: #4f46e5; font-size: 10px; }
.load-more { display: block; margin: 28px auto; padding: 10px 25px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.load-more:hover { border-color: var(--primary); color: var(--primary); }
.history-list { display: grid; gap: 11px; }
.history-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.history-main { display: flex; align-items: center; gap: 14px; }
.history-thumb-stack { position: relative; width: 86px; height: 62px; }
.history-thumb-stack img { position: absolute; width: 58px; height: 58px; border: 2px solid #fff; border-radius: 8px; background: #f1f5f9; object-fit: cover; }
.history-thumb-stack img:nth-child(2) { left: 14px; }
.history-thumb-stack img:nth-child(3) { left: 28px; }
.history-copy h3 { margin: 0 0 6px; font-size: 14px; }
.history-copy p { margin: 0; color: var(--muted); font-size: 10px; }
.history-status { margin-left: 7px; padding: 4px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 9px; }
.history-actions { display: flex; gap: 7px; }
.empty-list { grid-column: 1 / -1; padding: 72px 20px; border: 1px dashed #cbd5e1; border-radius: 11px; color: var(--muted); text-align: center; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.template-modal { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); }
.template-modal[hidden] { display: none; }
.template-modal-card { width: min(520px, 100%); padding: 28px; border-radius: 14px; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.28); }
.template-modal-card h2 { margin: 8px 0 10px; font-size: 23px; }
.template-modal-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.template-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.publish-consent { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 12px; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 11px; line-height: 1.55; }
.publish-consent input { width: auto; margin-top: 2px; }
.result-preview-open { overflow: hidden; }
.result-preview-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; }
.result-preview-modal[hidden] { display: none; }
.result-preview-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(15,23,42,.78); backdrop-filter: blur(6px); cursor: default; }
.result-preview-dialog { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(1120px, calc(100vw - 48px)); height: min(92vh, 920px); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.result-preview-header, .result-preview-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; background: #fff; }
.result-preview-header { border-bottom: 1px solid var(--line); }
.result-preview-header h2 { margin: 4px 0 0; font-size: 20px; }
.result-preview-close { display: grid; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #475569; font-size: 25px; line-height: 1; }
.result-preview-close:hover { border-color: var(--primary); color: var(--primary); }
.result-preview-stage { display: flex; flex: 1 1 auto; min-height: 0; align-items: center; justify-content: center; overflow: auto; padding: 24px; background: #e9eef5; }
.result-preview-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 35px rgba(15,23,42,.22); }
.result-preview-stage img[hidden] { display: none; }
.result-preview-loading { color: #64748b; font-size: 13px; text-align: center; }
.result-preview-loading[hidden] { display: none; }
.result-preview-footer { border-top: 1px solid var(--line); }
.result-preview-footer span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.toast { min-width: 250px; max-width: 390px; padding: 12px 15px; border-radius: 8px; background: #1e293b; color: #fff; box-shadow: 0 12px 30px rgba(15,23,42,0.18); font-size: 12px; animation: toastIn 0.2s ease-out; }
.toast.error { background: #991b1b; }
.toast.success { background: #166534; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.drawer-backdrop { display: none; }
.feature-disabled-banner { margin: 16px 20px 0; padding: 14px 16px; border: 1px solid #f6cf7b; border-radius: 9px; background: #fffbeb; color: #784d00; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.feature-disabled-banner span { color: #8a651e; font-size: 13px; }

@media (max-width: 1260px) {
  .studio-layout { grid-template-columns: minmax(340px, 380px) minmax(0,1fr); gap: 20px; padding-inline: 20px; }
  .plan-page { grid-template-columns: 40px 76px minmax(130px,1fr) minmax(150px,1fr) 170px 78px; }
  .template-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .result-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .studio-layout { grid-template-columns: 350px minmax(0,1fr); gap: 14px; padding: 14px; }
  .workspace { padding: 24px 20px; }
  .campaign-preview { gap: 10px; }
  .structure-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-page { grid-template-columns: 36px 70px 1fr; }
  .plan-field.prompt-field { grid-column: 1 / -1; }
  .plan-settings, .plan-actions { grid-column: auto; }
  .quote-panel { grid-template-columns: 1fr; }
  .catalog-search { grid-template-columns: 1fr 1fr; width: 100%; }
  .catalog-search input:first-child { grid-column: 1 / -1; }
  .catalog-header { align-items: flex-start; flex-direction: column; }
  .template-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .result-preview-modal { padding: 0; }
  .result-preview-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .result-preview-stage { padding: 12px; }
  .result-preview-header, .result-preview-footer { padding: 12px 14px; }
}

@media (max-width: 767px) {
  :root { --yh-site-header-height: 94px; }
  .hot-image-page-shell { display: block; min-height: 0; }
  .hot-image-content-shell { min-height: 0; padding-bottom: 58px; }
  #nav-placeholder { min-height: 94px; }
  .tool-app-shell { display: block; min-height: calc(100vh - 94px); padding-bottom: 58px; }
  .product-header {
    width: 100%;
    height: 58px;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    top: 0;
    flex-direction: row;
    justify-content: space-between;
  }
  .brand-lockup { display: flex; align-items: center; gap: 8px; }
  .brand-lockup > iconify-icon { color: var(--primary); font-size: 26px; }
  .brand-lockup strong { display: block; font-size: 14px; }
  .brand-lockup small { display: block; margin-top: 1px; color: #94a3b8; font-size: 8px; letter-spacing: 0.08em; }
  .top-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; height: 58px; border-top: 1px solid var(--line); background: #fff; flex-direction: row; }
  .top-tab { min-height: 58px; flex: 1; padding: 6px 4px; border-right: 0; border-top: 3px solid transparent; font-size: 10px; }
  .top-tab iconify-icon { font-size: 20px; }
  .top-tab.active, .top-tab:hover { border-right-color: transparent; border-top-color: var(--primary); }
  .top-tab b { padding: 1px 5px; }
  .header-actions { margin: 0; padding: 0; }
  .retention-note { display: none; }
  .mobile-settings-button { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border: 0; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 650; }
  main { overflow: visible; }
  .studio-layout { display: block; height: auto; min-height: calc(100vh - 152px); padding: 12px; }
  .settings-panel { position: fixed; top: 0; left: 0; bottom: 0; z-index: 170; width: min(92vw, 390px); height: 100vh; border-radius: 0 12px 12px 0; transform: translateX(-105%); transition: transform 0.25s; }
  .settings-panel.open { transform: translateX(0); }
  .mobile-drawer-head { min-height: 58px; padding: 0 18px; }
  .mobile-drawer-head button { display: block; padding: 7px; border: 0; background: none; color: var(--primary); }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 160; background: rgba(15,23,42,0.48); }
  .drawer-backdrop.visible { display: block; }
  .workspace { height: auto; min-height: calc(100vh - 176px); padding: 24px 16px; }
  .hero-copy h1 { font-size: 22px; }
  .campaign-preview { max-width: 520px; }
  .workspace-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .catalog-view, .history-view { min-height: calc(100vh - 152px); padding: 26px 16px 78px; }
  .history-card { grid-template-columns: 1fr; }
  .history-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .brand-lockup small { display: none; }
  .workspace { padding: 21px 13px; }
  .hero-copy h1 { font-size: 20px; }
  .hero-copy p { font-size: 12px; }
  .feature-pills span { font-size: 9px; }
  .campaign-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 18px; }
  .campaign-preview .preview-card:last-child { grid-column: 1 / -1; width: calc(50% - 5px); margin: 0 auto; }
  .preview-card > span { font-size: 10px; }
  .preview-image-wrap { border-radius: 8px; }
  .preview-arrow { width: 28px; height: 28px; }
  .structure-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .structure-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .plan-page { grid-template-columns: 32px 58px 1fr; padding: 8px; gap: 7px; }
  .plan-settings, .plan-actions { grid-column: 2 / -1; }
  .plan-cover { height: 58px; }
  .workspace-toolbar h2 { font-size: 24px; }
  .result-grid, .template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .catalog-search { grid-template-columns: 1fr; }
  .catalog-search input:first-child { grid-column: auto; }
  .history-thumb-stack { display: none; }
}

/* hero-v5: restore the spacious campaign showcase selected by the user */
.workspace {
  padding: 0;
  border-color: #e5eaf2;
  background: #f6f8fc;
  container-name: workspace;
  container-type: inline-size;
}

.workspace-hero {
  width: 100%;
  max-width: 1400px;
  min-height: 100%;
  margin: 0 auto;
  padding: 105px 48px 60px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.hero-copy {
  width: min(67%, 780px);
  max-width: none;
  margin: 0;
  position: relative;
  z-index: 3;
}

.eyebrow {
  color: #6d55e7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero-copy h1 {
  margin: 28px 0 24px;
  color: #182235;
  font-size: clamp(34px, 2.55vw, 50px);
  line-height: 1.14;
  letter-spacing: -.045em;
}

.hero-copy h1 em {
  color: #6d55e7;
  font-style: normal;
}

.hero-copy p {
  max-width: 790px;
  margin: 0;
  color: #718096;
  font-size: 16px;
  line-height: 1.9;
}

.feature-pills {
  margin-top: 34px;
  justify-content: flex-start;
  gap: 10px;
}

.feature-pills span {
  padding: 10px 14px;
  border: 1px solid #d7e0ed;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: #5d6a80;
  font-size: 13px;
}

.campaign-preview {
  width: 520px;
  height: 520px;
  max-width: none;
  margin: 0;
  display: block;
  position: absolute;
  top: 105px;
  right: -8px;
  z-index: 2;
  perspective: 1200px;
}

.preview-card {
  width: 270px;
  height: 340px;
  padding: 16px;
  position: absolute;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(37,49,80,.17);
  text-align: left;
}

.preview-card > span {
  margin: 0;
  position: relative;
  z-index: 2;
  color: rgba(43,55,78,.62);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .12em;
}

.preview-image-wrap {
  position: absolute;
  inset: 57px 16px 68px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #eef2f7;
  box-shadow: none;
}

.preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-card > b {
  margin: 0;
  position: absolute;
  left: 19px;
  bottom: 22px;
  z-index: 2;
  color: #111d31;
  font-size: 22px;
  font-weight: 800;
  text-align: left;
}

.card-a {
  top: 128px;
  right: 184px;
  transform: rotate(-7deg);
  background: #f4f1e8;
}

.card-b {
  top: 0;
  right: 48px;
  transform: rotate(5deg);
  background: #23343c;
}

.card-b > span { color: rgba(255,255,255,.58); }
.card-b > b { color: #fff; }

.card-c {
  top: 168px;
  right: -16px;
  transform: rotate(9deg);
  background: #eadff2;
}

.ai-orbit {
  width: 58px;
  height: 58px;
  position: absolute;
  top: 248px;
  right: 224px;
  z-index: 8;
  border-radius: 50%;
  background: #6547e8;
  color: #fff;
  box-shadow: 0 0 0 12px rgba(101,71,232,.12);
  display: grid;
  place-items: center;
}

.ai-orbit iconify-icon { font-size: 24px; }

.default-structure {
  margin-top: 190px;
  padding: 32px 34px 34px;
  position: relative;
  z-index: 4;
  border: 1px solid #dbe4f0;
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 38px rgba(31,45,76,.055);
  text-align: left;
}

.structure-head { margin-bottom: 28px; }
.structure-head strong { color: #18263a; font-size: 17px; }
.structure-head span { color: #9aaac2; font-size: 13px; }

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

.structure-item {
  min-height: 100px;
  padding: 20px 15px;
  border: 1px solid #e4e9f1;
  border-radius: 14px;
  background: #f7f8fb;
}

.structure-item b { color: #684df0; font-size: 13px; }
.structure-item span {
  margin-top: 13px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 1500px) and (min-width: 1101px) {
  .workspace-hero { padding: 78px 32px 44px; }
  .hero-copy { width: 66%; }
  .eyebrow { font-size: 11px; }
  .hero-copy h1 { margin: 21px 0 18px; font-size: clamp(28px, 2.45vw, 38px); }
  .hero-copy p { font-size: 12px; line-height: 1.8; }
  .feature-pills { margin-top: 22px; gap: 7px; }
  .feature-pills span { padding: 7px 10px; font-size: 10px; }
  .campaign-preview { top: 64px; right: -8px; width: 520px; height: 520px; transform: none; }
  .default-structure { margin-top: 55px; padding: 24px 26px 27px; border-radius: 21px; }
  .structure-head { margin-bottom: 22px; }
  .structure-head strong { font-size: 15px; }
  .structure-head span { font-size: 11px; }
  .structure-grid { gap: 10px; }
  .structure-item { min-height: 92px; padding: 17px 12px; border-radius: 12px; }
  .structure-item b { font-size: 12px; }
  .structure-item span { margin-top: 10px; font-size: 12px; }
}

@media (max-width: 1100px) {
  .workspace-hero { padding: 40px 26px 46px; }
  .hero-copy { width: 100%; }
  .hero-copy h1 { font-size: 38px; }
  .hero-copy p { font-size: 15px; }
  .feature-pills { margin-top: 26px; }
  .feature-pills span { padding: 9px 13px; font-size: 12px; }
  .campaign-preview { position: relative; top: auto; right: auto; width: 520px; height: 430px; margin: 34px auto 0; transform: scale(.82); transform-origin: center top; }
  .default-structure { margin-top: 4px; padding: 28px; border-radius: 24px; }
  .structure-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 767px) {
  .workspace { padding: 0; }
  .workspace-hero { padding: 36px 18px 90px; }
  .eyebrow { font-size: 10px; }
  .hero-copy h1 { margin: 22px 0 20px; font-size: 31px; line-height: 1.2; }
  .hero-copy p { font-size: 13px; line-height: 1.75; }
  .feature-pills { margin-top: 22px; gap: 7px; }
  .feature-pills span { padding: 8px 10px; font-size: 10px; }
  .campaign-preview { width: 500px; height: 390px; margin-left: calc((100% - 500px) / 2); transform: scale(.67); transform-origin: center top; }
  .default-structure { margin-top: -92px; padding: 23px 18px 25px; border-radius: 21px; }
  .structure-head { margin-bottom: 18px; }
  .structure-head strong { font-size: 15px; }
  .structure-head span { font-size: 10px; }
  .structure-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .structure-item { min-height: 92px; padding: 16px 12px; border-radius: 12px; }
  .structure-item b { font-size: 12px; }
  .structure-item span { margin-top: 10px; font-size: 12px; }
}

/* Keep the showcase proportional to the actual right workspace, not only the
   browser viewport. This matters when the two left columns are visible. */
@container workspace (max-width: 900px) {
  .workspace-hero {
    padding: 64px 26px 38px;
  }

  .hero-copy {
    width: 62%;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: .15em;
  }

  .hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(26px, 5cqw, 38px);
    line-height: 1.16;
  }

  .hero-copy p {
    font-size: 11px;
    line-height: 1.75;
  }

  .feature-pills {
    margin-top: 22px;
    gap: 7px;
  }

  .feature-pills span {
    padding: 7px 9px;
    font-size: 9px;
  }

  .campaign-preview {
    width: 320px;
    height: 320px;
    top: 54px;
    right: -14px;
    margin: 0;
    position: absolute;
    transform: none;
  }

  .preview-card {
    width: 168px;
    height: 212px;
    padding: 10px;
    border-radius: 11px;
    box-shadow: 0 15px 36px rgba(37,49,80,.17);
  }

  .preview-card > span {
    font-size: 6px;
  }

  .preview-image-wrap {
    inset: 36px 10px 43px;
    border-radius: 7px;
  }

  .preview-card > b {
    left: 12px;
    bottom: 13px;
    font-size: 14px;
  }

  .card-a {
    top: 80px;
    right: 112px;
  }

  .card-b {
    top: 0;
    right: 29px;
  }

  .card-c {
    top: 105px;
    right: -10px;
  }

  .ai-orbit {
    width: 38px;
    height: 38px;
    top: 154px;
    right: 136px;
    box-shadow: 0 0 0 8px rgba(101,71,232,.12);
  }

  .ai-orbit iconify-icon {
    font-size: 17px;
  }

  .default-structure {
    margin-top: 102px;
    padding: 19px 20px 21px;
    border-radius: 17px;
  }

  .structure-head {
    margin-bottom: 16px;
  }

  .structure-head strong {
    font-size: 12px;
  }

  .structure-head span {
    font-size: 8px;
  }

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

  .structure-item {
    min-height: 61px;
    padding: 11px 8px;
    border-radius: 8px;
  }

  .structure-item b {
    font-size: 8px;
  }

  .structure-item span {
    margin-top: 7px;
    font-size: 8px;
    line-height: 1.35;
  }
}

@container workspace (max-width: 520px) {
  .workspace-hero {
    padding: 34px 18px 82px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 12px;
  }

  .campaign-preview {
    width: 500px;
    height: 390px;
    margin: 30px 0 0 calc((100% - 500px) / 2);
    position: relative;
    top: auto;
    right: auto;
    transform: scale(.67);
    transform-origin: center top;
  }

  .preview-card {
    width: 340px;
    height: 430px;
    padding: 20px;
    border-radius: 22px;
  }

  .preview-card > span {
    font-size: 10px;
  }

  .preview-image-wrap {
    inset: 72px 20px 86px;
    border-radius: 13px;
  }

  .preview-card > b {
    left: 24px;
    bottom: 28px;
    font-size: 28px;
  }

  .card-a { top: 160px; right: 230px; }
  .card-b { top: 0; right: 60px; }
  .card-c { top: 210px; right: -20px; }

  .ai-orbit {
    width: 72px;
    height: 72px;
    top: 310px;
    right: 280px;
    box-shadow: 0 0 0 15px rgba(101,71,232,.12);
  }

  .ai-orbit iconify-icon { font-size: 30px; }

  .default-structure {
    margin-top: -92px;
    padding: 23px 18px 25px;
    border-radius: 21px;
  }

  .structure-head strong { font-size: 15px; }
  .structure-head span { font-size: 10px; }
  .structure-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .structure-item { min-height: 92px; padding: 16px 12px; border-radius: 12px; }
  .structure-item b { font-size: 12px; }
  .structure-item span { margin-top: 10px; font-size: 12px; }
}
