@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Unbounded:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --paper: #f3f1ea;
  --paper-soft: #faf9f5;
  --ink: #181a17;
  --muted: #777a70;
  --line: rgba(24, 26, 23, 0.13);
  --acid: #dfff4f;
  --violet: #7540f5;
  --blue: #1769ff;
  --orange: #ff6c3b;
  --shadow: 0 30px 80px rgba(31, 31, 27, 0.12);
  --radius-xl: 32px;
  --radius-lg: 23px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
textarea:focus-visible,
label:focus-within {
  outline: 3px solid rgba(117, 64, 245, 0.25);
  outline-offset: 2px;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-a {
  width: 420px;
  height: 420px;
  top: -180px;
  right: 5vw;
  background: #d9ff70;
}

.ambient-b {
  width: 360px;
  height: 360px;
  top: 440px;
  left: -220px;
  background: #cab7ff;
}

.site-header,
main,
footer {
  width: min(1480px, calc(100% - 64px));
  margin-inline: auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  gap: 11px;
}

.brand-mark {
  width: 31px;
  height: 31px;
  position: relative;
  display: inline-block;
}

.brand-mark span {
  position: absolute;
  width: 16px;
  height: 20px;
  left: 7px;
  top: 5px;
  border-radius: 4px;
  background: var(--ink);
  border: 2px solid var(--paper);
}

.brand-mark span:first-child { transform: rotate(-25deg) translateX(-5px); }
.brand-mark span:nth-child(2) { transform: rotate(25deg) translateX(5px); }
.brand-mark span:last-child { transform: rotate(0); background: var(--acid); border-color: var(--ink); }

.brand-name {
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.brand-tag {
  padding-left: 11px;
  border-left: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.header-side {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #efaa34;
  box-shadow: 0 0 0 5px rgba(239, 170, 52, 0.12);
}

.server-status.is-ready .status-dot {
  background: #69b657;
  box-shadow: 0 0 0 5px rgba(105, 182, 87, 0.12);
}

.server-status.is-live .status-dot {
  background: var(--violet);
  box-shadow: 0 0 0 5px rgba(117, 64, 245, 0.12);
}

.no-login {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 13px;
}

.hero {
  min-height: 378px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 76px 0 54px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 9px;
}

.hero h1 {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.065em;
}

.hero h1 em {
  position: relative;
  font-style: normal;
  color: var(--violet);
}

.hero h1 em::after {
  content: "";
  position: absolute;
  height: 8px;
  left: 2px;
  right: 0;
  bottom: -3px;
  border-radius: 50%;
  border-top: 2px solid rgba(117, 64, 245, 0.35);
  transform: rotate(-1deg);
}

.hero-copy > p {
  width: min(630px, 90%);
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-note i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.25;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(370px, 0.72fr) minmax(650px, 1.45fr);
  min-height: 850px;
  background: var(--paper-soft);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.controls-panel {
  padding: 30px;
  border-right: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.94);
}

.panel-heading,
.preview-toolbar {
  min-height: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-index,
.panel-meta,
.preview-kicker,
.result-count {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-meta,
.result-count {
  color: var(--muted);
}

.control-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: "Unbounded", sans-serif;
  font-size: 9px;
}

.section-title h2 {
  margin: 1px 0 4px;
  font-size: 14px;
  line-height: 1.3;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.marketplace-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--ink);
  cursor: pointer;
  transition: 0.2s ease;
}

.marketplace-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 26, 23, 0.26);
  box-shadow: 0 10px 24px rgba(24, 26, 23, 0.06);
}

.marketplace-card.is-active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.market-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: white;
  font-family: "Unbounded", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.wb-icon { background: linear-gradient(145deg, #d838e5, #6322db); }
.ozon-icon { background: #1668f8; }
.yandex-icon { background: #ffcc00; color: #171916; }
.mega-icon { background: linear-gradient(145deg, #27a94f, #0f7732); }
.magnit-icon { background: #e51c23; }
.ali-icon { background: linear-gradient(145deg, #ff6a2f, #e72c21); }
.universal-icon { background: #171916; color: var(--acid); }
.marketplace-wide { grid-column: 1 / -1; }

.market-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.market-copy strong { max-width: 100%; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-copy small { color: var(--muted); font-size: 8px; white-space: nowrap; }

.selection-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  transform: scale(0.7);
  transition: 0.2s ease;
}

.is-active .selection-check { opacity: 1; transform: scale(1); }
.selection-check svg { width: 11px; fill: none; stroke: white; stroke-width: 2; }

.upload-zone {
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px dashed rgba(24, 26, 23, 0.28);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(245,242,253,0.75));
  cursor: pointer;
  transition: 0.2s ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--violet);
  background: #f7f3ff;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--ink);
  color: white;
}

.upload-icon svg,
.button-arrow svg,
.download-all svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-copy { display: flex; flex-direction: column; gap: 3px; }
.upload-copy strong { font-size: 12px; }
.upload-copy small { color: var(--muted); font-size: 10px; }
.upload-plus { margin-left: auto; color: var(--muted); font-size: 22px; font-weight: 300; }

.thumb-list {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.thumb-list:empty { display: none; }

.thumb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: visible;
  border: 1px solid var(--line);
  background: white;
}

.thumb img { width: 100%; height: 100%; border-radius: 11px; object-fit: cover; display: block; }
.thumb button {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.thumb-add {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: #eae8e1;
}

.mode-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.mode-button.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(24, 26, 23, 0.08);
}

.spark-icon { color: var(--violet); font-size: 14px; }
.pencil-icon svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }

.auto-description {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-top: 12px;
  border: 1px solid rgba(117, 64, 245, 0.14);
  border-radius: 14px;
  background: rgba(117, 64, 245, 0.05);
}

.auto-orb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--violet);
  color: white;
  font-family: "Unbounded", sans-serif;
  font-size: 8px;
}

.auto-description p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.auto-description strong { color: var(--ink); }

.auto-brief { margin-top: 12px; }
.auto-brief > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
}
.auto-brief > label small {
  color: var(--violet);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.auto-brief textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.55;
}
.auto-brief textarea:focus { outline: 2px solid rgba(117, 64, 245, .18); border-color: rgba(117, 64, 245, .45); }
.auto-brief textarea::placeholder { color: #aaa99f; }
.auto-brief-note { margin: 7px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }

.manual-brief { margin-top: 13px; }
.manual-brief label { display: block; margin: 0 0 8px; font-size: 10px; font-weight: 700; }
.manual-guide {
  padding: 13px;
  margin-bottom: 13px;
  border: 1px solid rgba(117, 64, 245, .14);
  border-radius: 14px;
  background: rgba(117, 64, 245, .05);
}
.manual-guide strong { display: block; font-size: 10px; }
.manual-guide p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.manual-brief textarea {
  width: 100%;
  resize: vertical;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
}

.manual-card-list { display: grid; gap: 8px; margin-top: 14px; }
.manual-card-item {
  display: grid !important;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  padding: 8px 8px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.55);
}
.manual-card-item > span { color: var(--violet); font-family: "Unbounded", sans-serif; font-size: 8px; }
.manual-card-item > span small { display: block; margin-top: 4px; color: var(--ink); font-family: Arial, sans-serif; font-size: 8px; font-weight: 700; }
.manual-card-item textarea {
  min-height: 48px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 9px;
}

.manual-brief textarea::placeholder { color: #aaa99f; }
.brief-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 9px; }
.example-brief { border: 0; padding: 0; background: none; color: var(--violet); cursor: pointer; font-size: 9px; font-weight: 700; }

.output-count {
  display: block;
  margin-top: 16px;
}

.count-copy strong { display: block; font-size: 10px; font-weight: 800; }
.count-copy p { margin: 5px 0 0; color: var(--muted); font-size: 8.5px; font-weight: 500; line-height: 1.45; }

.count-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 9px; }
.count-picker button {
  width: 100%;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.count-picker button.is-active { background: var(--ink); color: white; }

.count-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid rgba(117, 64, 245, 0.13);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(117, 64, 245, 0.07), rgba(206, 255, 57, 0.1));
}
.count-plan-index {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--violet);
  color: white;
  font-size: 10px;
  font-weight: 800;
}
.count-plan p { margin: 0; min-width: 0; }
.count-plan strong { display: block; font-size: 9px; font-weight: 800; }
.count-plan small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.4; }

.generate-button {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 6px 7px 6px 19px;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(24, 26, 23, 0.18);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.generate-button:not(:disabled):hover { transform: translateY(-2px); }
.generate-button:disabled { cursor: not-allowed; opacity: 0.32; box-shadow: none; }
.button-label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; }
.button-label > span { color: var(--acid); }
.button-arrow { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--acid); color: var(--ink); }
.button-arrow svg { width: 20px; }
.button-hint { margin: 9px 0 0; text-align: center; color: var(--muted); font-size: 9px; }

.preview-panel {
  position: relative;
  min-width: 0;
  padding: 30px;
  background:
    radial-gradient(circle at 88% 8%, rgba(223, 255, 79, 0.16), transparent 23%),
    linear-gradient(145deg, #232520 0%, #171916 52%, #20221e 100%);
  color: white;
  overflow: hidden;
}

.preview-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.preview-toolbar {
  position: relative;
  z-index: 2;
  border-color: rgba(255,255,255,0.12);
}

.preview-toolbar h2 { margin: 6px 0 0; font-family: "Unbounded", sans-serif; font-size: 16px; letter-spacing: -0.04em; }
.preview-kicker { color: rgba(255,255,255,0.45); }
.preview-actions { display: flex; align-items: center; gap: 10px; }
.result-count { color: rgba(255,255,255,0.45); min-width: 38px; text-align: right; }

.ghost-button,
.download-all {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.ghost-button { padding: 0 12px; }
.download-all { display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--acid); color: var(--ink); border-color: var(--acid); }
.download-all svg { width: 15px; }
.download-all.is-locked { background: rgba(255,255,255,.08); color: rgba(255,255,255,.64); border-color: rgba(255,255,255,.16); }

.empty-state {
  position: relative;
  z-index: 1;
  min-height: 710px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(60px, 9vw, 150px);
  padding: 40px;
}

.card-sculpture {
  position: relative;
  width: 245px;
  height: 390px;
  flex: 0 0 auto;
  perspective: 1000px;
}

.sculpture-card {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 35px 65px rgba(0,0,0,0.32);
}

.card-back-two { transform: rotate(-14deg) translate(-40px, 16px); background: #6540d9; }
.card-back-two::after { content: ""; position: absolute; width: 200px; height: 200px; right: -70px; top: -30px; border-radius: 50%; border: 36px solid rgba(255,255,255,0.12); }
.card-back-one { transform: rotate(10deg) translate(35px, 9px); background: var(--acid); }
.card-back-one::after { content: ""; position: absolute; inset: 24px; border: 1px solid rgba(24,26,23,.2); border-radius: 17px; }

.card-front { background: linear-gradient(160deg, #f7f4ea, #d9d4c8); color: var(--ink); transform: rotate(-2deg); }
.mock-badge { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--ink); color: white; font-family: "Unbounded"; font-size: 7px; }
.mock-product { position: absolute; width: 130px; height: 225px; top: 78px; left: 58px; filter: drop-shadow(0 22px 15px rgba(37,35,29,.21)); }
.mock-body { position: absolute; width: 108px; height: 185px; left: 11px; top: 25px; border-radius: 45px 45px 32px 32px; background: linear-gradient(90deg, #272a26, #767b71 49%, #22241f); }
.mock-body::after { content: "K"; position: absolute; top: 76px; left: 43px; color: rgba(255,255,255,.8); font-family: "Unbounded"; font-size: 21px; }
.mock-cap { position: absolute; width: 77px; height: 38px; top: 4px; left: 27px; border-radius: 16px 16px 7px 7px; background: #1c1f1b; box-shadow: inset 0 6px 0 rgba(255,255,255,.08); }
.mock-shadow { position: absolute; left: 0; bottom: 0; width: 130px; height: 20px; border-radius: 50%; background: rgba(24,26,23,.24); filter: blur(7px); }
.mock-lines { position: absolute; left: 21px; right: 21px; bottom: 23px; display: flex; flex-direction: column; gap: 6px; }
.mock-lines i { display: block; height: 5px; border-radius: 9px; background: var(--ink); }
.mock-lines i:first-child { width: 62%; height: 10px; }
.mock-lines i:nth-child(2) { width: 88%; opacity: .22; }
.mock-lines i:last-child { width: 48%; opacity: .22; }
.orbit { position: absolute; z-index: 5; display: grid; place-items: center; border-radius: 50%; font-family: "Unbounded"; box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.orbit-one { width: 54px; height: 54px; right: -68px; top: 55px; background: var(--orange); font-size: 18px; }
.orbit-two { width: 42px; height: 42px; left: -70px; bottom: 76px; background: white; color: var(--ink); font-size: 8px; }

.empty-copy { max-width: 350px; }
.empty-index,
.generation-label { color: rgba(255,255,255,.4); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.empty-copy h3,
.generation-copy h3 { margin: 17px 0 16px; font-family: "Unbounded"; font-size: clamp(23px, 3vw, 38px); line-height: 1.16; letter-spacing: -.055em; }
.empty-copy p { max-width: 330px; margin: 0; color: rgba(255,255,255,.5); font-size: 12px; line-height: 1.65; }

.generation-state {
  position: relative;
  z-index: 1;
  min-height: 710px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 70px;
  padding: 50px 7%;
}

.generation-visual { position: relative; display: grid; place-items: center; }
.scan-frame { position: relative; width: min(310px, 100%); aspect-ratio: 4/5; padding: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); }
.scan-frame img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: .76; filter: saturate(.8); }
.scan-line { position: absolute; left: 18px; right: 18px; height: 2px; top: 18px; background: var(--acid); box-shadow: 0 0 18px var(--acid); animation: scan 2.8s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(0); } 50% { transform: translateY(330px); } }
.corner { position: absolute; width: 23px; height: 23px; border-color: var(--acid); border-style: solid; }
.corner-a { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.corner-b { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.corner-c { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.corner-d { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }
.ai-pulse { position: absolute; right: -25px; bottom: 20px; display: grid; place-items: center; width: 75px; height: 75px; border-radius: 50%; background: var(--violet); font-family: "Unbounded"; font-size: 10px; }
.ai-pulse i { position: absolute; inset: -12px; border: 1px solid rgba(117,64,245,.5); border-radius: 50%; animation: pulse 2s ease-out infinite; }
.ai-pulse i:last-child { animation-delay: 1s; }
@keyframes pulse { from { opacity: .8; transform: scale(.7); } to { opacity: 0; transform: scale(1.35); } }

.progress-heading { display: flex; align-items: baseline; justify-content: space-between; margin-top: 28px; color: rgba(255,255,255,.42); font-size: 9px; }
.progress-heading strong { color: var(--acid); font-family: "Unbounded"; font-size: 20px; letter-spacing: -.05em; }
.progress-track { height: 5px; margin: 9px 0 17px; border-radius: 10px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress-track span { display: block; width: 8%; height: 100%; border-radius: inherit; background: var(--acid); transition: width .6s ease; }
.generation-steps { display: flex; flex-direction: column; gap: 9px; color: rgba(255,255,255,.3); font-size: 10px; }
.generation-steps span { display: flex; align-items: center; gap: 8px; transition: color .3s ease; }
.generation-steps span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.generation-steps span.is-active { color: var(--acid); }

.results-area { position: relative; z-index: 1; padding: 24px 0 10px; }
.product-insight { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 13px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.05); }
.insight-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--acid); color: var(--ink); }
.product-insight div { display: flex; flex-direction: column; min-width: 150px; }
.product-insight small { color: rgba(255,255,255,.4); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.product-insight strong { margin-top: 2px; font-size: 11px; }
.product-insight p { margin: 0; color: rgba(255,255,255,.46); font-size: 9px; line-height: 1.5; text-align: right; }

.results-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 14px; }
.result-card { position: relative; grid-column: span 2; aspect-ratio: 3/4; border-radius: 17px; overflow: hidden; background: #e5e2da; color: var(--ink); box-shadow: 0 14px 30px rgba(0,0,0,.22); animation: reveal .65s both; cursor: zoom-in; }
.result-card:nth-child(1), .result-card:nth-child(2), .result-card:nth-child(3) { grid-column: span 3; }
.result-card:nth-child(4) { grid-column: 3 / span 3; }
.result-card:nth-child(5) { grid-column: 6 / span 3; }
@keyframes reveal { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.result-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.result-overlay { position: absolute; inset: 0; pointer-events: none; }
.result-meta { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; }
.result-meta span { padding: 5px 7px; border-radius: 99px; background: rgba(255,255,255,.88); backdrop-filter: blur(7px); font-size: 6px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.result-download { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 10px; background: var(--acid); color: var(--ink); opacity: 0; transform: translateY(4px); cursor: pointer; transition: .2s ease; }
.result-download.is-locked { background: rgba(24,26,23,.9); color: white; }
.result-card:hover .result-download { opacity: 1; transform: none; }
.result-download svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.result-number { position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--ink); color: white; font-family: "Unbounded"; font-size: 7px; }

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 46px 0 70px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--line);
}

.trust-row > div { position: relative; padding: 26px; background: var(--paper); }
.trust-row span { display: block; margin-bottom: 24px; color: var(--violet); font-family: "Unbounded"; font-size: 9px; }
.trust-row strong { display: block; font-size: 13px; }
.trust-row p { max-width: 330px; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

footer {
  min-height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.footer-brand { color: var(--ink); }
.footer-brand .brand-name { font-size: 14px; }
.footer-brand .brand-tag { font-size: 7px; }

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  max-width: min(460px, calc(100% - 32px));
  padding: 13px 17px;
  border-radius: 13px;
  background: var(--ink);
  color: white;
  font-size: 11px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #b93838; }

.preview-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  align-items: center;
  gap: 28px;
  padding: 34px;
  background: rgba(10,11,9,.94);
  backdrop-filter: blur(18px);
}
.preview-modal-stage { min-width: 0; height: calc(100vh - 68px); display: grid; place-items: center; }
.preview-modal-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 15px; box-shadow: 0 28px 80px rgba(0,0,0,.48); }
.preview-modal-close { position: absolute; top: 18px; right: 20px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.08); color: white; font-size: 26px; font-weight: 300; cursor: pointer; }
.preview-modal-note { color: white; }
.preview-modal-note span { display: inline-flex; padding: 7px 9px; border-radius: 99px; background: var(--acid); color: var(--ink); font-family: "Unbounded"; font-size: 8px; }
.preview-modal-note p { margin: 18px 0 0; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.65; }
body.has-modal { overflow: hidden; }

[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .studio-shell { grid-template-columns: 390px 1fr; }
  .empty-state { gap: 55px; padding-inline: 20px; }
  .card-sculpture { width: 205px; height: 330px; }
  .mock-product { transform: scale(.85); transform-origin: top left; left: 46px; top: 65px; }
  .result-card { grid-column: span 5 !important; }
  .result-card:last-child { grid-column: 3 / span 6 !important; }
}

@media (max-width: 940px) {
  .site-header, main, footer { width: min(100% - 32px, 720px); }
  .hero { min-height: 0; display: block; padding: 58px 0 38px; }
  .hero-note { width: fit-content; margin-top: 28px; }
  .studio-shell { grid-template-columns: 1fr; }
  .controls-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .preview-panel { min-height: 720px; }
  .empty-state { min-height: 590px; }
}

@media (max-width: 640px) {
  .site-header, main, footer { width: min(100% - 20px, 520px); }
  .site-header { min-height: 76px; }
  .brand-tag, .server-status, .hero-note { display: none; }
  .no-login { padding: 7px 10px; font-size: 10px; }
  .hero { padding-top: 45px; }
  .hero h1 { font-size: 38px; }
  .hero-copy > p { width: 100%; font-size: 14px; }
  .studio-shell { border-radius: 22px; }
  .controls-panel, .preview-panel { padding: 20px; }
  .marketplace-grid { grid-template-columns: 1fr; }
  .marketplace-wide { grid-column: auto; }
  .marketplace-card { padding: 10px 12px; }
  .empty-state { flex-direction: column; min-height: 650px; gap: 45px; text-align: center; }
  .card-sculpture { width: 175px; height: 280px; }
  .mock-product { transform: scale(.68); left: 40px; top: 54px; }
  .orbit-one { right: -48px; }
  .orbit-two { left: -45px; }
  .generation-state { grid-template-columns: 1fr; min-height: 700px; gap: 35px; padding: 34px 8px; }
  .scan-frame { width: 220px; }
  @keyframes scan { 0%,100% { transform: translateY(0); } 50% { transform: translateY(235px); } }
  .generation-copy { text-align: center; }
  .generation-steps { align-items: center; }
  .product-insight { grid-template-columns: auto 1fr; }
  .product-insight p { display: none; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .result-card, .result-card:last-child { grid-column: auto !important; }
  .result-card:last-child { grid-column: 1 / -1 !important; width: calc(50% - 7px); justify-self: center; }
  .result-download { opacity: 1; transform: none; }
  .manual-card-item { grid-template-columns: 72px 1fr; }
  .preview-modal { grid-template-columns: 1fr; align-content: center; gap: 18px; padding: 60px 14px 18px; }
  .preview-modal-stage { height: min(70vh, 660px); }
  .preview-modal-note { max-width: 520px; text-align: center; justify-self: center; }
  .preview-modal-note p { margin-top: 10px; }
  .trust-row { grid-template-columns: 1fr; }
  footer { min-height: 130px; flex-direction: column; justify-content: center; gap: 14px; text-align: center; }
}
