:root {
  --neutral-0: #ffffff;
  --neutral-5: #f7f7f7;
  --neutral-10: #eeeeee;
  --neutral-20: #dddddd;
  --neutral-30: #c4c4c4;
  --neutral-40: #adadad;
  --neutral-50: #878787;
  --neutral-60: #707070;
  --neutral-70: #5c5c5c;
  --neutral-80: #404040;
  --neutral-90: #262626;
  --neutral-100: #141414;
  --blue-60: #006fff;
  --green-60: #479f32;
  --yellow-40: #e8b900;
  --red-50: #ff4d28;
  --capy-earth: #8a6b4f;
  --capy-fur: #c49a6c;
  --capy-cream: #f3e5d0;
  --capy-reed: #7d9468;
  --capy-water: #a8d4d7;
  --capy-ink: #2b211b;
  --surface: var(--neutral-0);
  --surface-soft: rgba(20, 20, 20, 0.06);
  --surface-softer: rgba(20, 20, 20, 0.04);
  --text: var(--neutral-100);
  --text-secondary: var(--neutral-60);
  --text-tertiary: var(--neutral-50);
  --border: rgba(20, 20, 20, 0.08);
  --border-strong: rgba(20, 20, 20, 0.16);
  --glass: rgba(238, 238, 238, 0.72);
  --shadow: 0 12px 80px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius-frame: 18px;
  --radius-card: 8px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1081px) {
  html.is-workspace-route,
  body.is-workspace-route,
  html:has(.workspace-shell),
  body:has(.workspace-shell) {
    height: 100%;
    overflow: hidden;
  }
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

:where(a, button, input, textarea, select, [tabindex]):focus {
  outline: none;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid rgba(0, 111, 255, 0.32);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(168, 212, 215, 0.16), transparent 24%, transparent 76%, rgba(243, 229, 208, 0.28)),
    linear-gradient(to bottom, rgba(138, 107, 79, 0.035), transparent 260px),
    var(--surface);
}

.topbar-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  pointer-events: none;
}

.topbar {
  width: min(calc(100vw - 40px), var(--max));
  height: 72px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
  animation: nav-drop 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    backdrop-filter 180ms ease,
    border-radius 180ms ease;
}

.topbar-wrap.is-scrolled .topbar {
  border-radius: 999px;
  background: rgba(247, 247, 247, 0.88);
  box-shadow:
    0 14px 34px rgba(20, 20, 20, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(22px);
}

.workspace-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding-top: 76px;
}

.workspace-shell .topbar-wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 76px;
}

.workspace-topbar {
  width: min(calc(100vw - 40px), var(--max));
  height: 52px;
  margin: 12px auto 0;
  padding: 0;
  gap: 14px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-wrap.is-scrolled .workspace-topbar {
  border-radius: 18px;
}

.workspace-topbar .nav-links {
  flex: 0 0 auto;
  margin-left: auto;
}

.workspace-topbar .nav-link {
  min-width: auto;
}

.workspace-topbar .top-actions {
  margin-left: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 652;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--capy-ink), var(--capy-earth));
  color: var(--neutral-0);
  font-size: 12px;
  line-height: 1;
}

.brand-logo {
  overflow: hidden;
  padding: 0;
  background: var(--neutral-0);
  box-shadow: inset 0 0 0 1px rgba(43, 33, 27, 0.08);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-text {
  font-size: 16px;
}

.nav-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.topbar.has-nav .nav-links {
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.nav-link {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(243, 229, 208, 0.72);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  margin-left: auto;
}

.topbar.has-nav .top-actions {
  margin-left: 12px;
}

.btn,
.icon-btn,
.chip,
.segmented-button {
  border: 0;
  cursor: pointer;
  color: var(--text);
}

.btn {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  background: var(--surface-soft);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.btn:hover {
  background: rgba(20, 20, 20, 0.1);
  box-shadow: 0 10px 28px rgba(138, 107, 79, 0.14);
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.btn[aria-disabled="true"],
.icon-btn:disabled,
.chip:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.btn:disabled:hover {
  box-shadow: none;
  transform: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--capy-ink);
  color: var(--neutral-0);
}

.btn.primary:hover {
  background: #3a2c24;
}

.btn.inverse {
  background: var(--neutral-0);
  color: var(--neutral-100);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  transition: background 160ms ease;
}

.icon-btn:hover {
  background: rgba(20, 20, 20, 0.08);
}

.icon-btn:disabled:hover {
  background: transparent;
}

.icon-btn.active {
  background: var(--neutral-100);
  color: var(--neutral-0);
}

.btn.is-loading svg,
.icon-btn.is-loading svg {
  animation: spin 900ms linear infinite;
}

.btn.active-auth {
  background: rgba(243, 229, 208, 0.72);
}

.credit-pill {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--capy-ink);
  color: var(--neutral-0);
  font-size: 14px;
  font-weight: 600;
}

.account-pill {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(243, 229, 208, 0.72);
  color: var(--capy-ink);
  font-size: 14px;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.account-pill:hover,
.account-pill.active {
  background: var(--capy-ink);
  color: var(--neutral-0);
  transform: translateY(-1px);
}

.page {
  width: min(calc(100vw - 40px), var(--max));
  margin: 0 auto;
}

.page.app-page {
  padding: 14px 0 80px;
}

.workspace-shell .generator-page {
  height: calc(100vh - 76px);
  min-height: 0;
  overflow: hidden;
  padding: 8px 0 12px;
}

.landing {
  padding-bottom: 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(460px, 1.12fr);
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  min-height: calc(100vh - 72px);
  padding: 42px 0 64px;
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  z-index: -1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138, 107, 79, 0.22), rgba(168, 212, 215, 0.26), transparent);
  transform-origin: left;
  animation: accent-line 1200ms 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-copy {
  display: grid;
  justify-items: start;
  text-align: left;
  min-width: 0;
}

.hero-copy > * {
  animation: hero-rise 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 90ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 170ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 240ms;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(243, 229, 208, 0.72);
  color: var(--capy-earth);
  font-size: 14px;
  font-weight: 600;
}

.hero h1,
.section-title {
  margin: 0;
  font-weight: 652;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 560px;
  padding-top: 24px;
  font-size: clamp(52px, 5.2vw, 76px);
  line-height: 1;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
}

.hero p {
  max-width: 620px;
  margin: 0;
  padding-top: 20px;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 440;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  padding-top: 34px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.hero-showcase {
  width: 100%;
  min-width: 0;
  animation: showcase-rise 820ms 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.showcase-frame,
.before-after-card,
.tool-preview,
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-frame);
  background: var(--neutral-5);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    var(--shadow-soft);
}

.showcase-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.42) 38%, transparent 54%);
  transform: translateX(-120%);
  animation: frame-sheen 5200ms 1200ms ease-in-out infinite;
}

.showcase-frame {
  min-height: 420px;
}

.showcase-frame.large {
  min-height: 560px;
}

.split-demo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.split-demo::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(43, 33, 27, 0.12) 12%, var(--capy-earth) 50%, rgba(43, 33, 27, 0.12) 88%, transparent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.68),
    0 0 24px rgba(138, 107, 79, 0.22);
  opacity: 0;
  pointer-events: none;
}

.split-side {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.split-side .home-product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-showcase .split-side.after .home-product-image {
  padding: clamp(18px, 2.4vw, 34px);
  object-fit: contain;
  background: var(--neutral-0);
}

.split-side.after {
  z-index: 3;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
}

.split-side.after .split-label {
  right: 18px;
  left: auto;
}

.split-demo.is-playing .split-side.after {
  animation: reveal-after 2600ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.split-demo.is-playing::after {
  animation: reveal-line 2600ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.split-demo.is-revealed .split-side.after {
  clip-path: inset(0 0 0 0);
}

.split-demo.is-revealed::after {
  left: calc(100% - 2px);
  opacity: 0;
}

.split-label {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  height: 30px;
  min-width: 64px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-0);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(18px);
}

.product-visual {
  width: 34%;
  aspect-ratio: 1;
  position: relative;
}

.home-product-image {
  display: block;
  max-width: 100%;
}

.showcase-frame.large .product-visual {
  width: 38%;
}

.generated-image {
  position: relative;
  aspect-ratio: 1.05;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--neutral-0);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.generated-image.has-generated-asset {
  background: var(--neutral-0);
}

.generated-image.has-generated-asset img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.generated-image .scene-accent {
  position: absolute;
  inset: 10%;
  border-radius: 30px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 30%),
    linear-gradient(135deg, var(--capy-water), var(--capy-cream) 52%, #f1dfdc);
  background-size: 140% 140%;
  z-index: -1;
}

.generated-image .product-visual {
  width: 38%;
}

.generated-image.large {
  aspect-ratio: 1.08;
}

.generated-image.thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: inherit;
}

.generated-image.thumb .scene-accent {
  inset: 7%;
  border-radius: 18px;
}

.generated-image.thumb .product-visual {
  width: 30%;
}

.showcase-frame .product-visual {
  animation: product-float 5200ms ease-in-out infinite;
}

.showcase-frame .after .product-visual {
  animation-delay: -1400ms;
}

.product-visual::before,
.product-visual::after {
  content: "";
  position: absolute;
  display: block;
}

.product-visual.bottle::before {
  width: 36%;
  height: 70%;
  left: 31%;
  top: 17%;
  border-radius: 18px 18px 10px 10px;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.65), transparent 44%),
    #f7f7f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.product-visual.bottle::after {
  width: 20%;
  height: 12%;
  left: 39%;
  top: 8%;
  border-radius: 8px 8px 3px 3px;
  background: var(--neutral-100);
}

.after .product-visual.bottle {
  filter: saturate(1.06);
}

.after .scene-accent {
  position: absolute;
  inset: 12%;
  border-radius: 30px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 30%),
    linear-gradient(135deg, var(--capy-water), var(--capy-cream) 52%, #f1dfdc);
  background-size: 140% 140%;
  z-index: -1;
  animation: scene-breathe 6800ms ease-in-out infinite;
}

.product-visual.shoe::before {
  width: 78%;
  height: 30%;
  left: 12%;
  top: 43%;
  border-radius: 90px 100px 34px 34px;
  background: var(--neutral-100);
  transform: rotate(-9deg);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
}

.product-visual.shoe::after {
  width: 48%;
  height: 12%;
  left: 28%;
  top: 61%;
  border-radius: 999px;
  background: var(--neutral-0);
  transform: rotate(-9deg);
}

.product-visual.bag::before {
  width: 58%;
  height: 54%;
  left: 21%;
  top: 31%;
  border-radius: 16px 16px 22px 22px;
  background: #d9c0a1;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.13);
}

.product-visual.bag::after {
  width: 28%;
  height: 24%;
  left: 36%;
  top: 18%;
  border: 5px solid #4f3425;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.product-visual.watch::before {
  width: 38%;
  height: 38%;
  left: 31%;
  top: 31%;
  border-radius: 999px;
  background: var(--neutral-100);
  box-shadow:
    inset 0 0 0 12px #f2f2f2,
    0 16px 34px rgba(0, 0, 0, 0.15);
}

.product-visual.watch::after {
  width: 18%;
  height: 84%;
  left: 41%;
  top: 8%;
  border-radius: 999px;
  background: #738c75;
  z-index: -1;
}

.product-visual.snack::before {
  width: 54%;
  height: 66%;
  left: 23%;
  top: 18%;
  border-radius: 20px 20px 14px 14px;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent 34%),
    #f0c85b;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
}

.product-visual.snack::after {
  width: 30%;
  height: 8%;
  left: 35%;
  top: 48%;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.16);
}

.product-visual.lamp::before {
  width: 56%;
  height: 18%;
  left: 22%;
  top: 24%;
  border-radius: 999px 999px 12px 12px;
  background: #ece2cf;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
}

.product-visual.lamp::after {
  width: 8%;
  height: 44%;
  left: 46%;
  top: 40%;
  border-radius: 999px;
  background: var(--neutral-100);
}

.section {
  padding: 80px 0;
}

.section.center {
  text-align: center;
  display: grid;
  justify-items: center;
}

.section-title {
  max-width: 640px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}

.section-copy {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.45;
}

.tabs-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.tabs-row.compact {
  justify-content: flex-end;
  margin-top: 0;
}

.chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 600;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.chip.active {
  background: var(--capy-ink);
  color: var(--neutral-0);
}

.chip:not(.active):hover {
  background: rgba(243, 229, 208, 0.92);
  color: var(--capy-ink);
  box-shadow: inset 0 0 0 1px rgba(138, 107, 79, 0.16);
}

.gallery {
  width: min(100%, 1040px);
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.case-card {
  display: grid;
  gap: 14px;
  animation: card-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.case-card:nth-child(2n) {
  animation-delay: 80ms;
}

.case-card:nth-child(3n) {
  animation-delay: 150ms;
}

.case-card .before-after-card,
.tool-preview,
.history-card,
.plan-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.case-card:hover .before-after-card,
.tool-preview:hover,
.history-card:hover,
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 0 0 1px rgba(138, 107, 79, 0.1),
    0 16px 44px rgba(138, 107, 79, 0.16);
}

.before-after-card {
  aspect-ratio: 1.02;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  text-align: left;
}

.card-meta > div {
  min-width: 0;
  text-align: left;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-subtitle {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
}

.tag {
  flex: 0 0 auto;
  height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.workflow-grid {
  width: 100%;
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tool-preview {
  min-height: 390px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.tool-preview:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(168, 212, 215, 0.18), transparent 48%),
    var(--neutral-5);
}

.tool-preview:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(243, 229, 208, 0.42), transparent 48%),
    var(--neutral-5);
}

.tool-preview h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.tool-preview p {
  max-width: 320px;
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.preview-ui {
  display: grid;
  gap: 10px;
}

.preview-bar {
  height: 42px;
  border-radius: 999px;
  background: var(--neutral-0);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.preview-cells {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preview-cell {
  min-height: 140px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.preview-cell .home-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-section {
  overflow: hidden;
}

.testimonial-marquee {
  width: 100%;
  margin-top: 44px;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.testimonial-marquee.reverse {
  margin-top: 16px;
}

.testimonial-track {
  width: max-content;
  display: flex;
  gap: 18px;
  animation: testimonial-slide 46s linear infinite;
}

.testimonial-marquee.reverse .testimonial-track {
  animation-direction: reverse;
  animation-duration: 54s;
}

.testimonial-marquee:hover .testimonial-track {
  animation-play-state: paused;
}

.quote-card {
  width: 360px;
  flex: 0 0 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(243, 229, 208, 0.34), transparent 46%),
    var(--neutral-0);
  text-align: left;
  box-shadow: 0 12px 32px rgba(138, 107, 79, 0.08);
}

.quote-card p {
  margin: 16px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quote-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-head strong,
.quote-head small {
  display: block;
}

.quote-head strong {
  font-size: 15px;
}

.quote-head small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 456;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 0 1px rgba(138, 107, 79, 0.16),
    0 8px 20px rgba(138, 107, 79, 0.18);
}

@keyframes testimonial-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 9px));
  }
}

@keyframes nav-drop {
  from {
    transform: translateY(-12px) scale(0.98);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-rise {
  from {
    transform: translateY(22px);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes showcase-rise {
  from {
    transform: translateY(28px) scale(0.985);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes card-rise {
  from {
    transform: translateY(18px);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes product-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes scene-breathe {
  0%,
  100% {
    background-position: 0% 50%;
    filter: saturate(1);
  }

  50% {
    background-position: 100% 50%;
    filter: saturate(1.08);
  }
}

@keyframes frame-sheen {
  0%,
  38% {
    transform: translateX(-120%);
  }

  62%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes accent-line {
  from {
    opacity: 0;
    transform: scaleX(0);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes reveal-after {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes reveal-line {
  0% {
    left: 0;
    opacity: 0;
  }

  8%,
  92% {
    opacity: 1;
  }

  100% {
    left: calc(100% - 2px);
    opacity: 0;
  }
}

@keyframes process-scan {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

@keyframes process-progress {
  from {
    transform: scaleX(0.08);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes skeleton-shimmer {
  to {
    background-position: -220% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .testimonial-track {
    animation: none !important;
  }

  .topbar,
  .hero::before,
  .hero-copy > *,
  .hero-showcase,
  .showcase-frame::after,
  .split-demo::after,
  .split-demo .split-side.after,
  .showcase-frame .product-visual,
  .after .scene-accent,
  .case-card,
  .process-scan,
  .process-progress span,
  .ui-skeleton span,
  .btn.is-loading svg,
  .icon-btn.is-loading svg,
  .result-status.is-processing svg,
  .send-btn:disabled svg {
    animation: none !important;
  }
}

.app-layout {
  --workspace-panel-height: clamp(560px, calc(100vh - 150px), 720px);
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.generator-page .app-layout {
  --workspace-panel-height: calc(100vh - 96px);
  height: 100%;
}

.side-panel,
.main-panel,
.content-panel {
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.side-panel {
  position: sticky;
  top: 96px;
  max-height: none;
  overflow: visible;
  padding: 14px;
}

.generator-page .side-panel {
  position: static;
  padding: 12px;
  line-height: 1.32;
}

.history-record-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 33, 27, 0.16) transparent;
}

.history-record-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.history-record-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-record-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(43, 33, 27, 0.16);
  background-clip: content-box;
}

.history-record-list:hover::-webkit-scrollbar-thumb {
  background-color: rgba(43, 33, 27, 0.26);
}

.panel-section + .panel-section {
  margin-top: 16px;
}

.generator-page .panel-section + .panel-section {
  margin-top: 10px;
}

.panel-title {
  margin: 0 0 9px;
  font-size: 15px;
  font-weight: 652;
}

.generator-page .panel-title {
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.28;
}

.model-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-card);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.generator-page .model-card {
  padding: 9px;
  gap: 9px;
  align-items: flex-start;
}

.model-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-0);
  box-shadow: inset 0 0 0 1px var(--border);
}

.model-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.18;
}

.model-card span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.22;
}

.generator-page .model-card span {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.38;
}

.quality-options {
  display: grid;
  gap: 7px;
}

.generator-page .quality-options {
  gap: 7px;
}

.quality-option {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-card);
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quality-option:hover,
.quality-option.active {
  background: var(--neutral-0);
  box-shadow:
    inset 0 0 0 1px rgba(43, 33, 27, 0.08),
    0 8px 22px rgba(43, 33, 27, 0.08);
}

.quality-option.active {
  background: var(--neutral-100);
  color: var(--neutral-0);
}

.quality-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.quality-main strong {
  font-size: 13px;
  line-height: 1.12;
}

.quality-main em {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-option small {
  min-width: max-content;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.quality-option.active small {
  color: rgba(255, 255, 255, 0.72);
}

.quality-option.active .quality-main em {
  color: rgba(255, 255, 255, 0.64);
}

.generator-page .quality-option {
  min-height: 42px;
  padding: 7px 8px;
}

.generator-page .quality-main strong {
  font-size: 12px;
}

.generator-page .quality-main em {
  font-size: 9.5px;
  line-height: 1.34;
}

.generator-page .quality-option small {
  font-size: 10.5px;
}

.platform-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.generator-page .platform-options {
  gap: 7px;
}

.platform-option {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius-card);
  padding: 7px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.platform-option:hover,
.platform-option.active {
  background: var(--neutral-0);
  box-shadow:
    inset 0 0 0 1px rgba(43, 33, 27, 0.08),
    0 8px 22px rgba(43, 33, 27, 0.08);
}

.platform-option.active {
  background: var(--neutral-100);
  color: var(--neutral-0);
}

.platform-option .platform-logo {
  width: 28px;
  height: 28px;
  padding: 3px;
}

.platform-option-copy {
  min-width: 0;
  display: block;
}

.platform-option-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  font-size: 13px;
  line-height: 1.1;
}

.generator-page .platform-option {
  min-height: 38px;
  padding: 6px 7px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
}

.generator-page .platform-option .platform-logo {
  width: 24px;
  height: 24px;
  padding: 2px;
}

.generator-page .platform-option-copy strong {
  font-size: 12px;
  line-height: 1.18;
}

.platform-style-guide {
  margin-top: 9px;
  border-radius: var(--radius-card);
  padding: 9px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(43, 33, 27, 0.06);
}

.platform-style-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.platform-style-head .platform-logo {
  width: 24px;
  height: 24px;
  padding: 2px;
}

.platform-style-head strong,
.platform-style-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-style-head strong {
  display: block;
  font-size: 12px;
  line-height: 1.18;
}

.platform-style-head span {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.24;
}

.platform-style-grid {
  display: grid;
  gap: 5px;
}

.platform-style-grid span {
  min-width: 0;
  border-radius: 8px;
  padding: 6px 7px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.64);
}

.platform-style-grid em {
  color: var(--text-secondary);
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  line-height: 1.2;
}

.platform-style-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-card {
  position: relative;
}

.select-trigger {
  width: 100%;
  border: 0;
  border-radius: var(--radius-card);
  padding: 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.generator-page .select-trigger {
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  gap: 8px;
  padding: 9px;
}

.select-trigger strong {
  display: block;
  font-size: 14px;
}

.select-trigger span:not(.select-chevron) {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.22;
}

.platform-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-0);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  margin-top: 0;
  overflow: hidden;
  padding: 4px;
  box-shadow: inset 0 0 0 1px var(--border);
}

.platform-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.platform-logo svg {
  width: 16px;
  height: 16px;
}

.generator-page .platform-logo {
  width: 30px;
  height: 30px;
}

.platform-logo-taobao {
  background: #ff6a00;
  color: #fff;
}

.platform-logo-jd {
  background: #e1251b;
  color: #fff;
}

.platform-logo-pinduoduo {
  background: #e02e24;
  color: #fff;
}

.platform-logo-douyin {
  background: #111;
  color: #fff;
}

.platform-logo-xiaohongshu {
  background: #ff2442;
  color: #fff;
  font-size: 10px;
}

.platform-logo-amazon {
  background: #232f3e;
  color: #ff9900;
  font-size: 18px;
  font-family: Georgia, serif;
}

.platform-logo-shopify {
  background: #95bf47;
  color: #fff;
}

.select-chevron {
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.select-chevron svg {
  width: 18px;
  height: 18px;
}

.select-menu {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border-radius: var(--radius-card);
  padding: 6px;
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(43, 33, 27, 0.08),
    0 18px 42px rgba(43, 33, 27, 0.12);
  backdrop-filter: blur(18px);
}

.select-option {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.select-option-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.select-option-copy strong,
.select-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-option-copy small {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.select-option:hover,
.select-option.active {
  background: var(--surface-soft);
}

.select-option svg {
  width: 16px;
  height: 16px;
}

.chip-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.generator-page .chip-grid {
  gap: 8px;
}

.chip.option {
  min-width: 52px;
  min-height: 30px;
  padding: 0 10px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.68);
}

.generator-page .chip.option {
  min-width: 50px;
  min-height: 28px;
}

.chip.option.active {
  background: var(--neutral-100);
}

.custom-size-chip {
  min-width: 66px;
}

.custom-size-fields {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  border-radius: var(--radius-card);
  padding: 6px;
  background: rgba(255, 255, 255, 0.6);
}

.custom-size-fields.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.custom-size-fields label {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.custom-size-fields input {
  width: 100%;
  min-width: 0;
  height: 24px;
  border: 0;
  border-radius: 8px;
  padding: 0 7px;
  background: var(--neutral-0);
  color: var(--text);
  font: inherit;
  font-weight: 760;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(43, 33, 27, 0.08);
}

.custom-size-fields input:focus {
  box-shadow:
    inset 0 0 0 1px rgba(43, 33, 27, 0.2),
    0 0 0 3px rgba(168, 212, 215, 0.32);
}

.custom-size-separator {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.custom-size-summary {
  min-width: max-content;
  border-radius: 999px;
  padding: 0 7px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 760;
  line-height: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.mode-tabs {
  width: min(100%, 650px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  border-radius: 999px;
  padding: 4px;
  background: rgba(243, 244, 244, 0.86);
  box-shadow: inset 0 0 0 1px rgba(43, 33, 27, 0.06);
}

.mode-tab {
  min-width: 0;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 740;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.mode-tab.active {
  background: var(--capy-ink);
  color: var(--neutral-0);
  box-shadow: 0 5px 14px rgba(43, 33, 27, 0.14);
}

.mode-tab.coming-soon {
  cursor: not-allowed;
  opacity: 0.68;
}

.mode-tab:not(.active):not(.coming-soon):hover {
  background: var(--neutral-0);
  color: var(--text);
}

.mode-tab.coming-soon:hover {
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}

.mode-tab small {
  min-height: 16px;
  border-radius: 999px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  background: rgba(243, 229, 208, 0.86);
  color: var(--capy-earth);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.mode-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-mode-tabs {
  align-self: start;
  justify-self: center;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  gap: 16px;
}

.workspace.history-expanded {
  grid-template-columns: minmax(260px, 0.78fr) minmax(460px, 0.88fr);
}

.canvas-stage {
  min-height: var(--workspace-panel-height);
  max-height: var(--workspace-panel-height);
  border-radius: var(--radius-card);
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 22px;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  align-content: stretch;
  gap: 14px;
}

.canvas-stage.has-result {
  padding: 18px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.upload-row {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 18px;
  min-height: clamp(240px, calc(var(--workspace-panel-height) - 190px), 330px);
}

.canvas-stage.is-uploading .upload-row {
  grid-column: 1 / -1;
  align-self: start;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 0;
  flex-wrap: wrap;
}

.upload-tile {
  width: 150px;
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-tile.filled {
  background: var(--neutral-10);
}

.upload-input {
  display: none;
}

.reference-upload-tile {
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(43, 33, 27, 0.08);
}

.reference-upload-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.upload-tile .close {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.82);
}

.upload-tile-label {
  display: grid;
  justify-items: center;
  gap: 10px;
  font-weight: 600;
}

.canvas-stage.is-uploading .upload-tile {
  width: 36px;
  height: 36px;
  aspect-ratio: auto;
  border-radius: 10px;
}

.canvas-stage.is-uploading .upload-tile:not(.filled) {
  width: auto;
  min-width: 108px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
}

.canvas-stage.is-uploading .upload-tile-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.1;
}

.canvas-stage.is-uploading .reference-upload-tile .caption-under {
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 999px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.74);
  font-size: 9px;
}

.canvas-stage.is-uploading .upload-tile .close {
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
}

.canvas-stage.is-uploading .upload-tile .close svg {
  width: 14px;
  height: 14px;
}

.plus-mark {
  width: 52px;
  height: 52px;
  position: relative;
}

.plus-mark::before,
.plus-mark::after {
  content: "";
  position: absolute;
  background: var(--neutral-100);
  border-radius: 999px;
}

.plus-mark::before {
  width: 52px;
  height: 4px;
  left: 0;
  top: 24px;
}

.plus-mark::after {
  width: 4px;
  height: 52px;
  left: 24px;
  top: 0;
}

.canvas-stage.is-uploading .plus-mark {
  width: 16px;
  height: 16px;
}

.canvas-stage.is-uploading .plus-mark::before {
  width: 16px;
  height: 2px;
  top: 7px;
}

.canvas-stage.is-uploading .plus-mark::after {
  width: 2px;
  height: 16px;
  left: 7px;
}

.caption-under {
  position: absolute;
  bottom: -28px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-upload-tile .caption-under {
  bottom: 8px;
  left: 8px;
  right: 8px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-secondary);
  font-size: 12px;
}

.generation-result,
.generation-process {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.generation-result {
  position: relative;
  grid-template-rows: minmax(0, 1fr);
}

.generation-process {
  grid-template-rows: minmax(0, 1fr) auto;
}

.result-preview-card,
.process-preview-card {
  position: relative;
  min-height: 0;
  width: min(44%, 360px);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--preview-ratio, 1 / 1);
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: var(--radius-card);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    var(--neutral-0);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 18px 48px rgba(138, 107, 79, 0.1);
}

.result-preview-card .generated-image,
.process-preview-card .generated-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: inherit;
}

.result-preview-card .generated-image.has-generated-asset,
.process-preview-card .generated-image.has-generated-asset {
  padding: 0;
}

.result-preview-card .scene-accent,
.process-preview-card .scene-accent {
  inset: clamp(18px, 7%, 42px);
  border-radius: clamp(22px, 4vw, 36px);
}

.result-preview-card .product-visual,
.process-preview-card .product-visual {
  width: min(28%, 148px);
}

.process-preview-card {
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
    var(--neutral-0);
}

.process-preview-card .generated-image {
  filter: saturate(0.92) blur(0.2px);
}

.process-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.58) 48%, transparent 100%);
  transform: translateX(-120%);
  animation: process-scan 1700ms cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

.result-info-row,
.process-info-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(138, 107, 79, 0.08);
}

.generation-result .result-info-row {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  backdrop-filter: blur(16px);
}

.process-info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 12px;
}

.result-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.result-copy strong,
.result-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy strong {
  font-size: 16px;
}

.result-copy > span:not(.result-status) {
  color: var(--text-secondary);
  font-size: 13px;
}

.result-status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--capy-earth);
  font-size: 12px;
  font-weight: 700;
}

.result-status svg {
  width: 14px;
  height: 14px;
}

.result-status.is-processing svg {
  animation: spin 900ms linear infinite;
}

.process-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.process-steps span {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  background: rgba(243, 229, 208, 0.58);
  color: var(--capy-earth);
  font-size: 12px;
  font-weight: 700;
}

.process-progress {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(43, 33, 27, 0.08);
}

.process-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--capy-fur), var(--capy-water));
  transform-origin: left;
  animation: process-progress 1700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
}

.prompt-bar {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  padding: 10px;
}

.prompt-bar .upload-row {
  grid-column: 1 / -1;
}

.generator-alert,
.checkout-alert {
  min-height: 34px;
  margin: 0;
  border-radius: var(--radius-card);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 77, 40, 0.08);
  color: #9d2d17;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: inset 0 0 0 1px rgba(255, 77, 40, 0.16);
}

.generator-alert {
  grid-column: 1 / -1;
}

.generator-alert svg,
.checkout-alert svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.upload-canvas-spacer {
  min-height: 0;
}

.generation-range-preview {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px 0 18px;
}

.generation-range-frame {
  width: min(44%, 360px);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--preview-ratio, 1 / 1);
  border: 1px dashed rgba(43, 33, 27, 0.18);
  border-radius: var(--radius-card);
  position: relative;
  background:
    linear-gradient(135deg, rgba(181, 220, 218, 0.16), rgba(243, 229, 208, 0.22)),
    rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.64),
    0 16px 40px rgba(138, 107, 79, 0.06);
}

.generation-range-frame.is-portrait,
.result-preview-card.is-portrait,
.process-preview-card.is-portrait {
  width: min(32%, 230px);
}

.generation-range-frame.is-landscape,
.result-preview-card.is-landscape,
.process-preview-card.is-landscape {
  width: min(66%, 520px);
}

.generation-range-frame span {
  position: absolute;
  left: 10px;
  top: 10px;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 740;
  box-shadow: inset 0 0 0 1px rgba(43, 33, 27, 0.06);
}

.prompt-bar textarea {
  min-height: 64px;
  max-height: 96px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  color: var(--text);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 33, 27, 0.18) transparent;
}

.prompt-bar textarea::-webkit-scrollbar {
  width: 5px;
}

.prompt-bar textarea::-webkit-scrollbar-track {
  background: transparent;
}

.prompt-bar textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(43, 33, 27, 0.18);
}

.prompt-bar textarea:hover::-webkit-scrollbar-thumb,
.prompt-bar textarea:focus::-webkit-scrollbar-thumb {
  background: rgba(43, 33, 27, 0.3);
}

.canvas-stage.is-uploading .prompt-bar {
  grid-template-columns: minmax(0, 1fr) 38px;
  grid-template-rows: auto minmax(52px, auto);
  row-gap: 8px;
  align-items: end;
}

.canvas-stage.is-uploading .prompt-bar .upload-row {
  grid-column: 1;
  grid-row: 1;
}

.canvas-stage.is-uploading .prompt-bar textarea {
  grid-column: 1;
  grid-row: 2;
  min-height: 52px;
  padding: 8px 10px;
}

.canvas-stage.is-uploading .prompt-bar .generator-alert {
  grid-column: 1 / -1;
  grid-row: 2;
}

.canvas-stage.is-uploading .prompt-bar:has(.generator-alert) {
  grid-template-rows: auto auto minmax(52px, auto);
}

.canvas-stage.is-uploading .prompt-bar:has(.generator-alert) textarea {
  grid-row: 3;
}

.canvas-stage.is-uploading .prompt-bar .send-btn {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: end;
  justify-self: center;
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
}

.canvas-stage.is-uploading .prompt-bar:has(.generator-alert) .send-btn {
  grid-row: 1 / 4;
}

.canvas-stage.has-result .prompt-bar {
  padding: 8px;
}

.canvas-stage.has-result .prompt-bar textarea {
  min-height: 44px;
  padding: 8px 10px;
}

.send-btn {
  align-self: end;
}

.send-btn:disabled {
  cursor: default;
  opacity: 0.66;
}

.send-btn:disabled svg {
  animation: spin 900ms linear infinite;
}

.output-panel {
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  padding: 14px;
  min-height: var(--workspace-panel-height);
  max-height: var(--workspace-panel-height);
  display: grid;
  align-content: start;
  gap: 14px;
}

.history-panel {
  min-width: 0;
  overflow: hidden;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.history-panel.expanded {
  box-shadow:
    inset 0 0 0 1px rgba(138, 107, 79, 0.08),
    0 18px 52px rgba(138, 107, 79, 0.12);
}

.history-panel.empty {
  align-content: stretch;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.output-head h2 {
  margin: 0;
  font-size: 18px;
}

.history-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.history-panel-body {
  min-height: 0;
  display: grid;
  gap: 12px;
}

.history-empty-state {
  min-height: calc(var(--workspace-panel-height) - 86px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-secondary);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(138, 107, 79, 0.08);
}

.history-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.history-empty-state p {
  max-width: 260px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.history-empty-state.compact {
  padding: 14px 10px;
}

.history-empty-state.compact p {
  max-width: 126px;
  font-size: 12px;
}

.history-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-0);
  color: var(--capy-earth);
  box-shadow: inset 0 0 0 1px var(--border);
}

.history-empty-icon svg {
  width: 20px;
  height: 20px;
}

.history-panel.expanded .history-panel-body {
  grid-template-columns: minmax(190px, 0.82fr) minmax(240px, 1fr);
  align-items: start;
}

.history-record-list {
  min-height: 0;
  max-height: 438px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 10px;
  padding-right: 2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.history-panel.collapsed .history-record-list {
  --history-thumb-size: 132px;
  grid-template-columns: 1fr;
  grid-auto-rows: var(--history-thumb-size);
  justify-items: center;
  max-height: calc(var(--workspace-panel-height) - 78px);
  gap: 12px;
  padding: 0;
}

.history-panel.expanded .history-record-list {
  max-height: 402px;
}

.history-image-tile {
  display: grid;
  place-items: center;
  width: min(132px, 100%);
  height: var(--history-thumb-size, auto);
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
  background: var(--neutral-0);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.history-image-tile > .generated-image.thumb {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
}

.history-image-tile:hover,
.history-image-tile.active {
  box-shadow:
    inset 0 0 0 1px rgba(138, 107, 79, 0.18),
    0 10px 28px rgba(138, 107, 79, 0.12);
}

.history-record {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  padding: 8px;
  background: rgba(255, 255, 255, 0.62);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.history-record:hover,
.history-record.active {
  border-color: rgba(138, 107, 79, 0.18);
  background: var(--neutral-0);
}

.history-record.active {
  transform: translateX(-2px);
}

.history-thumb {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  background: var(--neutral-0);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--border);
}

.history-thumb .generated-image {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 14px;
  box-shadow: none;
}

.history-thumb .product-visual {
  width: 34%;
}

.history-record-body {
  min-width: 0;
}

.history-record-main {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.history-record-main strong,
.history-record-main span {
  display: block;
}

.history-record-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.history-record-main span,
.history-record-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

.history-record-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.history-record-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.history-record-actions .icon-btn {
  width: 30px;
  height: 30px;
  background: var(--surface-soft);
}

.history-detail {
  display: none;
}

.history-panel.expanded .history-detail {
  display: grid;
  gap: 12px;
}

.detail-preview {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--neutral-0);
  box-shadow: inset 0 0 0 1px var(--border);
}

.detail-preview .generated-image {
  border-radius: var(--radius-card);
}

.history-detail-card {
  border-radius: var(--radius-card);
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.history-detail-card .detail-preview {
  margin-bottom: 14px;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.detail-title-row h3 {
  margin: 0;
  font-size: 17px;
}

.detail-title-row p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.detail-metrics {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-metrics span {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.detail-prompt {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.detail-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.transaction-card {
  margin-top: 14px;
  border-radius: var(--radius-card);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(243, 229, 208, 0.58), transparent 54%),
    var(--neutral-0);
}

.transaction-card span,
.transaction-card small,
.transaction-card strong {
  display: block;
}

.transaction-card span,
.transaction-card small {
  color: var(--text-secondary);
  font-size: 12px;
}

.transaction-card strong {
  margin: 6px 0;
  font-size: 20px;
}

.ledger-row {
  width: 100%;
  border: 0;
  border-radius: var(--radius-card);
  padding: 12px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.ledger-row strong,
.ledger-row small {
  display: block;
}

.ledger-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.ledger-row small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
}

.ledger-type {
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--capy-ink);
  color: var(--neutral-0);
  font-size: 12px;
  font-weight: 700;
}

.ledger-type.income {
  background: var(--capy-reed);
  color: var(--capy-ink);
}

.ledger-amount {
  color: var(--capy-earth);
  font-weight: 700;
}

.ledger-amount.income {
  color: #207560;
}

.empty-state {
  border-radius: var(--radius-card);
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.ui-state {
  min-height: 220px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  padding: 28px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-secondary);
  text-align: center;
}

.ui-state-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-0);
  color: var(--capy-earth);
  box-shadow: inset 0 0 0 1px var(--border);
}

.ui-state-icon svg {
  width: 21px;
  height: 21px;
}

.ui-state strong {
  color: var(--text);
  font-size: 16px;
}

.ui-state p {
  max-width: 360px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.ui-state-error {
  border-color: rgba(255, 77, 40, 0.32);
  color: #9d2d17;
  background: rgba(255, 77, 40, 0.07);
}

.ui-state-action {
  margin-top: 6px;
}

.ui-skeleton {
  width: min(420px, 100%);
  display: grid;
  gap: 9px;
}

.ui-skeleton span {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.05), rgba(20, 20, 20, 0.11), rgba(20, 20, 20, 0.05));
  background-size: 220% 100%;
  animation: skeleton-shimmer 1200ms ease-in-out infinite;
  animation-delay: calc(var(--skeleton-index, 0) * 90ms);
}

.ui-skeleton span:nth-child(2) {
  width: 86%;
}

.ui-skeleton span:nth-child(3) {
  width: 72%;
}

.result-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--neutral-0);
  border: 1px solid var(--border);
}

.result-card .before-after-card {
  border-radius: 0;
  box-shadow: none;
}

.result-meta {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-heading {
  padding: 24px 0 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

.page-heading p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.page-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.content-panel {
  padding: 24px;
}

.balance-banner {
  min-height: 168px;
  border-radius: var(--radius-frame);
  padding: 34px 38px;
  background: var(--neutral-100);
  color: var(--neutral-0);
  display: grid;
  align-content: center;
}

.balance-number {
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}

.balance-label {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.64);
}

.billing-tabs {
  display: flex;
  gap: 18px;
  margin: 38px 0 20px;
}

.billing-tab {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.billing-tab.active {
  color: var(--text);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.plan-card {
  min-height: 150px;
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--neutral-100);
  color: var(--neutral-0);
  display: grid;
  align-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
  transition: transform 160ms ease;
}

.plan-card:hover {
  transform: translateY(-2px);
}

.plan-card.active {
  box-shadow:
    inset 0 0 0 2px var(--blue-60),
    var(--shadow-soft);
}

.plan-discount {
  position: absolute;
  right: 14px;
  top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.plan-points {
  font-size: 30px;
  line-height: 1.05;
}

.plan-price {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 22px;
}

.payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
}

.pay-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.credits-page {
  padding-bottom: 84px;
}

.credits-heading {
  align-items: center;
}

.credits-heading h1 {
  max-width: 680px;
}

.credits-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.billing-main,
.billing-summary {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.billing-summary {
  position: sticky;
  top: 112px;
}

.credits-overview {
  display: grid;
}

.balance-card,
.credit-stat,
.billing-block,
.summary-card,
.ledger-preview,
.usage-card {
  border-radius: var(--radius-card);
}

.balance-card {
  min-height: 260px;
  padding: 30px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  color: var(--neutral-0);
  background:
    linear-gradient(135deg, rgba(168, 212, 215, 0.32), transparent 34%),
    linear-gradient(150deg, var(--capy-ink), #4a3628 72%, var(--capy-earth));
  box-shadow: var(--shadow-soft);
}

.balance-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.balance-eyebrow {
  width: max-content;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.balance-history-link {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 750;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.balance-history-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--neutral-0);
  transform: translateY(-1px);
}

.balance-card .balance-number {
  margin-top: 28px;
  font-size: clamp(52px, 7vw, 76px);
  font-weight: 750;
}

.balance-card .balance-label {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
}

.balance-estimate {
  width: max-content;
  max-width: 100%;
  margin-top: 14px;
  border-radius: 999px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 750;
}

.balance-meter {
  height: 8px;
  margin-top: 24px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.balance-meter span {
  height: 100%;
  border-radius: inherit;
  display: block;
  background: linear-gradient(90deg, var(--capy-water), var(--capy-cream));
}

.credit-stat-grid {
  display: grid;
  gap: 16px;
}

.credit-stat {
  min-height: 110px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px var(--border);
}

.credit-stat span {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--capy-cream);
  color: var(--capy-earth);
}

.credit-stat strong {
  font-size: 32px;
  line-height: 1;
}

.credit-stat small {
  color: var(--text-secondary);
  font-weight: 600;
}

.billing-block {
  padding: 22px;
  background: var(--surface-soft);
}

.recharge-checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title-row.compact {
  align-items: center;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.section-kicker {
  color: var(--capy-earth);
  font-size: 13px;
  font-weight: 800;
}

.recharge-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recharge-plan-card {
  min-height: 232px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.recharge-plan-card::before {
  content: "";
  height: 4px;
  position: absolute;
  inset: 0 0 auto;
  background: var(--capy-water);
}

.recharge-plan-card.tone-earth::before {
  background: var(--capy-fur);
}

.recharge-plan-card.tone-reed::before {
  background: var(--capy-reed);
}

.recharge-plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 107, 79, 0.24);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(43, 33, 27, 0.1);
}

.recharge-plan-card.active {
  border-color: rgba(138, 107, 79, 0.2);
  background:
    linear-gradient(135deg, rgba(243, 229, 208, 0.72), rgba(255, 255, 255, 0.8) 60%),
    var(--neutral-0);
  box-shadow:
    inset 0 0 0 1px rgba(178, 141, 103, 0.18),
    0 18px 44px rgba(138, 107, 79, 0.13);
}

.plan-topline,
.plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-name {
  font-size: 17px;
  font-weight: 800;
}

.plan-badge {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft);
  color: var(--capy-earth);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.recharge-plan-card .plan-points {
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 760;
  letter-spacing: 0;
  color: var(--text);
}

.recharge-plan-card .plan-points small {
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
}

.recharge-plan-card .plan-price {
  margin-top: -8px;
  color: var(--capy-earth);
  font-size: 28px;
  font-weight: 760;
}

.plan-note {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.plan-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.35;
}

.usage-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.usage-card {
  min-height: 126px;
  padding: 18px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px var(--border);
}

.usage-card span {
  color: var(--capy-earth);
}

.usage-card strong {
  font-size: 16px;
}

.usage-card small {
  color: var(--text-secondary);
  line-height: 1.45;
}

.summary-card,
.ledger-preview {
  padding: 20px;
  background: var(--surface-soft);
}

.summary-card {
  background:
    linear-gradient(180deg, rgba(243, 229, 208, 0.56), rgba(255, 255, 255, 0.72)),
    var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.package-summary {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.15fr) minmax(280px, 0.95fr);
  grid-template-areas:
    "head plan pay"
    "lines plan cta"
    "safe safe safe";
  gap: 14px 18px;
  align-items: center;
  min-height: 0;
}

.package-summary .summary-plan,
.package-summary .summary-lines,
.package-summary .pay-methods,
.package-summary .summary-safe {
  margin: 0;
}

.package-summary .summary-safe {
  align-self: center;
}

.package-summary .summary-head {
  grid-area: head;
}

.package-summary .summary-plan {
  grid-area: plan;
  align-self: stretch;
}

.package-summary .summary-lines {
  grid-area: lines;
}

.package-summary .pay-methods {
  grid-area: pay;
}

.package-summary .checkout-alert {
  grid-column: 1 / -1;
}

.package-summary > .btn.stretch {
  grid-area: cta;
  min-height: 52px;
  font-size: 16px;
}

.package-summary .summary-safe {
  grid-area: safe;
  justify-self: end;
}

.summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-head > span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--capy-ink);
  color: var(--neutral-0);
}

.summary-head h2 {
  margin: 0;
  font-size: 22px;
}

.summary-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.summary-plan {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--neutral-0);
  box-shadow: inset 0 0 0 1px var(--border);
}

.summary-plan strong {
  font-size: 24px;
  line-height: 1;
}

.summary-plan span {
  color: var(--capy-earth);
  font-size: 24px;
  font-weight: 760;
}

.summary-lines {
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.summary-lines div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.summary-lines strong {
  color: var(--text);
}

.pay-methods {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.pay-method {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-secondary);
  font-weight: 700;
  cursor: pointer;
}

.pay-method:hover {
  border-color: rgba(138, 107, 79, 0.22);
  background: var(--capy-cream);
  color: var(--capy-ink);
}

.pay-method.active {
  border-color: var(--capy-ink);
  background: var(--capy-ink);
  color: var(--neutral-0);
}

.btn.stretch {
  width: 100%;
}

.summary-safe {
  margin: 14px 0 0;
  display: flex;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.ledger-preview {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--border);
}

.ledger-preview-list {
  display: grid;
  gap: 8px;
}

.ledger-preview-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.58);
}

.ledger-preview-row strong,
.ledger-preview-row small {
  display: block;
}

.ledger-preview-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.ledger-preview-row small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
}

.ledger-preview-row b {
  color: var(--capy-earth);
}

.ledger-preview-row b.income {
  color: #207560;
}

.ledger-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--capy-ink);
  color: var(--neutral-0);
  font-weight: 800;
}

.ledger-dot.income {
  background: var(--capy-reed);
  color: var(--neutral-0);
}

.table {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr;
  gap: 16px;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
  font-size: 14px;
}

.table-row.header {
  min-height: 34px;
  background: transparent;
  color: var(--text-tertiary);
  font-weight: 600;
}

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

.history-empty-full {
  grid-column: 1 / -1;
}

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

.history-card .before-after-card {
  border-radius: 0;
  box-shadow: none;
}

.history-card .generated-image {
  border-radius: 0;
}

.history-body {
  padding: 14px;
}

.history-body h3 {
  margin: 0;
  font-size: 15px;
}

.history-body p {
  margin: 6px 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.history-actions {
  display: flex;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.simple-feedback-panel {
  width: min(760px, 100%);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  padding: 24px;
}

.field > span {
  font-weight: 600;
}

.field-help {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.4;
}

.feedback-body-input {
  min-height: 220px;
}

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

.feedback-upload-tile,
.feedback-image-card {
  min-height: 116px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.74);
}

.feedback-upload-tile {
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  text-align: center;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.feedback-upload-tile:hover {
  background: var(--neutral-0);
  box-shadow: 0 12px 28px rgba(138, 107, 79, 0.1);
  transform: translateY(-1px);
}

.feedback-upload-tile:focus-within {
  outline: 3px solid rgba(0, 111, 255, 0.32);
  outline-offset: 3px;
}

.feedback-upload-tile svg {
  width: 24px;
  height: 24px;
}

.feedback-upload-tile strong {
  font-size: 15px;
}

.feedback-upload-tile span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.feedback-upload-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.feedback-image-card {
  padding: 10px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
}

.feedback-image-card img {
  width: 76px;
  aspect-ratio: 1;
  border-radius: calc(var(--radius-card) - 2px);
  object-fit: cover;
  background: var(--neutral-10);
}

.feedback-image-card strong,
.feedback-image-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-image-card strong {
  font-size: 14px;
}

.feedback-image-card span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.feedback-image-card .icon-btn {
  width: 32px;
  height: 32px;
  background: var(--surface-soft);
}

.feedback-submit-row {
  margin-top: 24px;
}

.auth-page {
  min-height: calc(100vh - 92px);
  display: grid;
  align-items: center;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.58fr);
  gap: 40px;
  align-items: center;
}

.auth-copy {
  max-width: 620px;
}

.auth-copy h1 {
  margin: 24px 0 0;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.45;
}

.auth-points {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-points div {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(243, 229, 208, 0.62);
  color: var(--capy-earth);
  font-size: 14px;
  font-weight: 600;
}

.auth-card {
  border-radius: var(--radius-frame);
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(243, 229, 208, 0.52), transparent 44%),
    var(--neutral-0);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 18px 60px rgba(138, 107, 79, 0.14);
  animation: showcase-rise 640ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.auth-card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.auth-card .field {
  margin: 20px 0 0;
}

.auth-card .field span {
  font-size: 14px;
  font-weight: 600;
}

.auth-submit {
  width: 100%;
  margin-top: 24px;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
}

.auth-switch a {
  color: var(--capy-earth);
  font-weight: 700;
}

.field {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.field label {
  font-weight: 600;
}

.text-input,
.text-area {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 13px 14px;
}

.text-area {
  min-height: 180px;
  resize: vertical;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-item {
  padding: 14px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
}

.status-item strong {
  display: block;
  font-size: 14px;
}

.status-item span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.account-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
}

.profile-panel {
  border-radius: var(--radius-card);
  background: var(--neutral-100);
  color: var(--neutral-0);
  padding: 24px;
  min-height: 300px;
  display: grid;
  align-content: space-between;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-0);
  color: var(--neutral-100);
  font-size: 24px;
  font-weight: 700;
}

.profile-panel h2 {
  margin: 18px 0 0;
  font-size: 28px;
}

.profile-panel p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.64);
}

.settings-list {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
}

.setting-row strong {
  display: block;
  font-size: 15px;
}

.setting-row span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-login-shell,
.admin-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0, 111, 255, 0.06), transparent 28%, rgba(71, 159, 50, 0.06)),
    var(--neutral-5);
}

.admin-login-shell {
  display: grid;
  place-items: center;
  padding: 32px;
}

.admin-login-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 34px;
  align-items: center;
}

.admin-login-copy h1 {
  margin: 18px 0 0;
  font-size: 54px;
  line-height: 1.04;
}

.admin-login-copy p {
  max-width: 480px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.5;
}

.admin-auth-card {
  animation: none;
}

.admin-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 18px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.admin-brand {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.admin-brand span:last-child {
  display: grid;
  gap: 2px;
}

.admin-brand small {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.admin-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-nav-link {
  min-height: 42px;
  border-radius: var(--radius-card);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  background: var(--neutral-100);
  color: var(--neutral-0);
}

.admin-side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-chip span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-100);
  color: var(--neutral-0);
  font-weight: 800;
}

.admin-user-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.admin-main {
  min-width: 0;
  padding: 26px;
}

.admin-main-head {
  min-height: 60px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-main-head h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.15;
}

.admin-head-actions {
  display: flex;
  gap: 10px;
}

.admin-section,
.admin-grid,
.admin-panel,
.admin-feedback-list,
.admin-plan-grid {
  width: 100%;
}

.admin-section {
  margin-bottom: 18px;
}

.admin-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.admin-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
  box-shadow: 0 16px 40px rgba(20, 20, 20, 0.05);
}

.admin-panel-head {
  min-height: 34px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 17px;
}

.admin-panel-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.admin-panel-head a {
  color: var(--blue-60);
  font-size: 13px;
  font-weight: 800;
}

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

.admin-metric {
  min-height: 126px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  background: var(--neutral-0);
  box-shadow: 0 14px 34px rgba(20, 20, 20, 0.05);
}

.admin-metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-10);
}

.admin-metric.water .admin-metric-icon {
  background: rgba(168, 212, 215, 0.5);
}

.admin-metric.green .admin-metric-icon {
  background: rgba(71, 159, 50, 0.14);
  color: var(--green-60);
}

.admin-metric.gold .admin-metric-icon {
  background: rgba(232, 185, 0, 0.16);
  color: #9a7200;
}

.admin-metric.earth .admin-metric-icon {
  background: rgba(138, 107, 79, 0.14);
  color: var(--capy-earth);
}

.admin-metric.reed .admin-metric-icon {
  background: rgba(125, 148, 104, 0.16);
  color: var(--capy-reed);
}

.admin-metric.dark .admin-metric-icon {
  background: var(--neutral-100);
  color: var(--neutral-0);
}

.admin-metric.blue .admin-metric-icon {
  background: rgba(0, 111, 255, 0.12);
  color: var(--blue-60);
}

.admin-metric small,
.admin-metric span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.admin-metric strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 28px;
  line-height: 1;
}

.admin-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.admin-table-row {
  min-width: 760px;
  min-height: 54px;
  border-radius: var(--radius-card);
  padding: 0 14px;
  display: grid;
  grid-template-columns: var(--admin-columns);
  gap: 14px;
  align-items: center;
  background: rgba(247, 247, 247, 0.86);
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-table-row.header {
  min-height: 32px;
  background: transparent;
  color: var(--text-tertiary);
  font-weight: 800;
}

.admin-table-row strong,
.admin-table-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table-row strong {
  color: var(--text);
  font-size: 13px;
}

.admin-table-row small {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.admin-badge {
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  background: var(--neutral-10);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.admin-badge.success {
  background: rgba(71, 159, 50, 0.13);
  color: var(--green-60);
}

.admin-badge.pending {
  background: rgba(232, 185, 0, 0.16);
  color: #8a6500;
}

.admin-badge.muted {
  background: rgba(20, 20, 20, 0.06);
  color: var(--text-tertiary);
}

.admin-usage-list,
.admin-fact-list {
  display: grid;
  gap: 10px;
}

.admin-usage-row {
  position: relative;
  min-height: 58px;
  overflow: hidden;
  border-radius: var(--radius-card);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--neutral-5);
}

.admin-usage-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--blue-60);
}

.admin-usage-row strong,
.admin-usage-row span {
  display: block;
}

.admin-usage-row span {
  margin-top: 3px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.admin-usage-row em {
  font-style: normal;
  font-weight: 800;
}

.admin-fact-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-fact-list div {
  min-height: 72px;
  border-radius: var(--radius-card);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: var(--neutral-5);
}

.admin-fact-list span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.admin-fact-list strong {
  font-size: 20px;
}

.admin-toolbar {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-toolbar > span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.admin-search {
  width: min(420px, 100%);
  min-height: 42px;
  border-radius: var(--radius-card);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--neutral-5);
  box-shadow: inset 0 0 0 1px var(--border);
}

.admin-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
}

.admin-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-image-route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.84);
  padding: 18px;
  box-shadow: 0 16px 40px rgba(20, 20, 20, 0.05);
}

.admin-plan-card-head {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-image-route-card .admin-plan-card-head {
  align-items: flex-start;
}

.admin-route-remove {
  margin-left: auto;
}

.admin-plan-card-head > span {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--neutral-100);
  color: var(--neutral-0);
}

.admin-plan-card-head strong,
.admin-plan-card-head small {
  display: block;
}

.admin-plan-card-head small {
  margin-top: 3px;
  color: var(--text-tertiary);
}

.admin-submit-bar {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.admin-route-submit {
  align-items: center;
}

.admin-route-switch {
  min-height: 42px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-weight: 650;
}

.admin-route-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--capy-ink);
}

.admin-route-switch.danger {
  margin-bottom: 0;
  color: var(--text-tertiary);
}

.admin-key-summary {
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}

.admin-key-summary strong {
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-key-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-key-summary span {
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-tertiary);
  font-size: 12px;
}

.admin-key-input {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.admin-feedback-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-feedback-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.84);
  padding: 18px;
  box-shadow: 0 16px 40px rgba(20, 20, 20, 0.05);
}

.admin-feedback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-feedback-head strong,
.admin-feedback-head span {
  display: block;
}

.admin-feedback-head span {
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.admin-feedback-card p {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.admin-feedback-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-empty,
.admin-loading {
  min-height: 160px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.58);
  font-weight: 700;
}

.admin-loading span {
  animation: spin 900ms linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: none;
  align-items: center;
  background: var(--neutral-100);
  color: var(--neutral-0);
  box-shadow: var(--shadow-soft);
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
}

.toast.show {
  display: inline-flex;
}

svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

@media (max-width: 1080px) {
  html.is-workspace-route,
  body.is-workspace-route,
  html:has(.workspace-shell),
  body:has(.workspace-shell) {
    height: auto;
    overflow: auto;
  }

  .workspace-shell {
    height: auto;
    overflow: visible;
    padding-top: 92px;
  }

  .workspace-shell .generator-page {
    height: auto;
    overflow: visible;
    padding: 14px 0 80px;
  }

  .generator-page .app-layout {
    --workspace-panel-height: clamp(560px, calc(100vh - 150px), 720px);
    height: auto;
  }

  .topbar {
    width: calc(100vw - 24px);
  }

  .workspace-topbar {
    width: calc(100vw - 24px);
    margin: 12px auto 0;
  }

  .nav-links {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .hero,
  .hero-showcase,
  .app-layout,
  .workspace,
  .workspace.history-expanded,
  .credits-layout,
  .credits-overview,
  .recharge-checkout-grid,
  .form-grid,
  .auth-layout,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell,
  .admin-login-card,
  .admin-grid.two,
  .admin-plan-grid,
  .admin-image-route-grid,
  .admin-feedback-list {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow-x: auto;
  }

  .admin-nav-link {
    justify-content: center;
    white-space: nowrap;
  }

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

  .hero {
    gap: 42px;
    padding-top: 42px;
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  .auth-copy {
    display: grid;
    justify-items: center;
    text-align: center;
    margin: 0 auto;
  }

  .auth-points {
    justify-content: center;
  }

  .side-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .platform-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .platform-style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .platform-style-grid span {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .workflow-grid,
  .history-grid,
  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .billing-summary {
    position: static;
  }

  .recharge-plan-grid,
  .usage-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .package-summary {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
    grid-template-areas:
      "head plan"
      "lines plan"
      "pay cta"
      "safe safe";
  }

  .output-panel,
  .canvas-stage {
    min-height: auto;
    max-height: none;
  }

  .history-panel {
    max-height: none;
  }

  .history-panel.expanded .history-panel-body {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  .platform-options,
  .platform-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-wrap {
    height: auto;
    padding: 0 12px;
  }

  .topbar {
    width: 100%;
    height: auto;
    margin: 0;
    flex-wrap: wrap;
    padding: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
  }

  .topbar.has-nav .nav-links {
    flex: 1 0 100%;
    margin-left: 0;
    justify-content: center;
  }

  .top-actions .btn:not(.primary),
  .credit-pill span {
    display: none;
  }

  .page {
    width: calc(100vw - 24px);
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    gap: 34px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero p {
    font-size: 18px;
    width: min(100%, 340px);
    overflow-wrap: anywhere;
  }

  .showcase-frame {
    min-height: 340px;
  }

  .gallery,
  .workflow-grid,
  .history-grid,
  .plan-grid,
  .recharge-plan-grid,
  .recharge-checkout-grid,
  .usage-card-grid,
  .credit-stat-grid {
    grid-template-columns: 1fr;
  }

  .quote-card {
    width: 300px;
    flex-basis: 300px;
  }

  .page-heading,
  .payment-row {
    align-items: start;
    flex-direction: column;
  }

  .page-heading-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .tabs-row.compact {
    justify-content: flex-start;
  }

  .feedback-upload-grid {
    grid-template-columns: 1fr;
  }

  .credits-heading {
    align-items: stretch;
  }

  .credits-heading .btn {
    width: max-content;
  }

  .balance-card,
  .billing-block,
  .summary-card,
  .ledger-preview {
    padding: 18px;
  }

  .section-title-row {
    align-items: start;
    flex-direction: column;
  }

  .pay-methods {
    grid-template-columns: 1fr;
  }

  .package-summary {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "plan"
      "lines"
      "pay"
      "cta"
      "safe";
  }

  .package-summary .summary-safe {
    justify-self: start;
  }

  .table-row {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .admin-login-shell,
  .admin-main {
    padding: 16px;
  }

  .admin-login-copy h1 {
    font-size: 38px;
  }

  .admin-main-head,
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-head-actions,
  .admin-search,
  .admin-route-submit,
  .admin-submit-bar .btn {
    width: 100%;
  }

  .admin-metric-grid,
  .admin-fact-list {
    grid-template-columns: 1fr;
  }

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

  .admin-nav-link {
    justify-content: flex-start;
  }

  .upload-row {
    min-height: 260px;
    flex-wrap: wrap;
  }

  .result-info-row,
  .process-info-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-info-row {
    display: flex;
  }

  .result-actions,
  .process-steps {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .process-steps {
    justify-content: flex-start;
  }

  .history-record {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .history-thumb {
    width: 74px;
    height: 74px;
  }

  .ledger-row {
    grid-template-columns: 1fr;
  }
}
