:root {
  --bg: #f7f3ec;
  --bg-soft: #fcfaf6;
  --surface: #fffdf9;
  --surface-muted: #f3eee5;
  --surface-strong: #efe7da;
  --text: #1f241e;
  --muted: #60675b;
  --muted-soft: #8a8f85;
  --border: #e5dfd4;
  --border-strong: #d9d1c4;
  --accent: #1f4d3a;
  --accent-strong: #153426;
  --accent-soft: rgba(31, 77, 58, 0.12);
  --shadow: 0 24px 56px rgba(40, 48, 33, 0.08);
  --shadow-soft: 0 14px 36px rgba(40, 48, 33, 0.06);
  --radius-2xl: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(232, 223, 207, 0.55), transparent 26%),
    linear-gradient(180deg, #fcfbf8 0%, #f7f3ec 45%, #fbf9f5 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 0%, rgba(226, 211, 185, 0.18), transparent 28%),
    radial-gradient(circle at 0% 70%, rgba(216, 228, 218, 0.18), transparent 30%);
  z-index: -1;
}

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

img,
video {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

textarea,
input,
select {
  appearance: none;
}

::selection {
  background: rgba(31, 77, 58, 0.18);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.site-header,
.app-header {
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 1px solid rgba(217, 209, 196, 0.72);
  background: rgba(251, 249, 245, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  /* The gold house mark carries its own finish, so it stands on its own here
     (no chip background/border) for a cleaner, more premium look at small size. */
  background: transparent;
  border: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  /* Preserve the PNG's aspect ratio so the mark never looks cropped or stretched. */
  object-fit: contain;
  display: block;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"],
.footer-nav a[aria-current="page"] {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-credits {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.header-credits::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f0b949;
  box-shadow: 0 0 0 4px rgba(240, 185, 73, 0.16);
}

.avatar-pill {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: white;
  font-size: 0.95rem;
  font-weight: 800;
}

/* Wrapper around the nav links + header actions. On desktop it is transparent
   (display: contents) so brand / nav / actions lay out exactly as before; on
   mobile (<=768px) it becomes the floating dropdown card. */
.header-menu {
  display: contents;
}

/* Mobile hamburger toggle. Hidden on desktop; revealed in the <=768px block. */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 200ms ease, opacity 200ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: white;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 77, 58, 0.34);
  box-shadow: var(--shadow-soft);
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.9);
}

.button-ghost {
  background: transparent;
}

.button:disabled,
.action-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 77, 58, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.96;
}

p {
  margin: 0;
}

.section-block {
  padding: 92px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(2.65rem, 5vw, 4rem);
  max-width: 10.5ch;
}

.section-heading p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1rem;
}

.section-heading.section-heading--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 48px;
}

.section-heading.section-heading--center h2 {
  max-width: none;
}

.section-heading.section-heading--center p {
  max-width: 480px;
}

#pricing .section-heading.section-heading--center {
  gap: 6px;
  margin-bottom: 22px;
}

#pricing .section-heading.section-heading--center h2 {
  font-size: clamp(2.45rem, 4.4vw, 3.65rem);
}

/* Before / After examples — premium showcase */
.examples-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.examples-filter {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.examples-filter:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.examples-filter.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.examples-featured {
  margin-bottom: 36px;
  padding: 18px;
  border-radius: var(--radius-2xl);
}

.examples-compare {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.examples-compare-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.examples-compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.examples-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20, 24, 18, 0.92);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.examples-compare-label {
  position: absolute;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 24, 18, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.examples-compare-label--before {
  left: 14px;
}

.examples-compare-label--after {
  right: 14px;
}

.examples-featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 12px 6px;
}

.examples-featured-room {
  display: block;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.examples-featured-style {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 2px;
}

.examples-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}

.example-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-xl);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.example-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(40, 48, 33, 0.08);
}

.example-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-strong, #efe8db);
}

.example-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.example-card-img--before {
  clip-path: inset(0 50% 0 0);
}

.example-card-img--after {
  clip-path: inset(0 0 0 50%);
}

.example-card-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(20, 24, 18, 0.08);
  pointer-events: none;
}

.example-card-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20, 24, 18, 0.85);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.example-card-tag {
  position: absolute;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(20, 24, 18, 0.74);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.example-card-tag--before {
  left: 10px;
}

.example-card-tag--after {
  right: 10px;
}

.example-card-meta {
  display: grid;
  gap: 2px;
  padding: 0 6px;
}

.example-card-meta strong {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.example-card-meta span {
  font-size: 0.85rem;
  color: var(--muted);
}

.example-card-cta {
  padding: 0 6px 4px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

.example-card-cta:hover {
  color: var(--accent-strong);
}

.examples-cta {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.examples-cta .button {
  min-width: 220px;
}

.examples-cta-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.examples-cta-note {
  margin: 8px 0 0;
  max-width: 520px;
  color: var(--muted-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.surface-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.page-home .hero-section {
  min-height: auto;
  height: auto;
  padding-top: 64px !important;
  padding-bottom: 56px;
}

.page-home .container {
  width: min(1400px, calc(100% - 48px));
}

.page-home .site-header {
  position: sticky;
  top: 14px;
  width: min(1400px, calc(100% - 48px));
  margin: 14px auto 0;
  border: 1px solid rgba(217, 209, 196, 0.78);
  border-radius: 999px;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 18px rgba(70, 60, 50, 0.04);
}

.page-home .site-header .header-inner {
  width: 100%;
  padding: 0 24px;
}

.page-home .header-inner {
  min-height: 72px;
  gap: 22px;
}

.page-home .brand {
  gap: 12px;
}

.page-home .brand-mark {
  width: 34px;
  height: 34px;
}

.page-home .brand-icon {
  width: 34px;
  height: 34px;
}

.page-home .brand-name {
  font-size: 1.08rem;
}

.page-home .brand-tagline {
  display: none;
}

.page-home .site-nav {
  gap: 26px;
  font-size: 0.95rem;
}

.page-home .header-actions {
  gap: 12px;
}

.page-home .header-actions .button {
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.92rem;
}

/* Processing page uses the same floating pill header as the homepage */
.page-processing .site-header {
  position: sticky;
  top: 14px;
  width: min(1400px, calc(100% - 48px));
  margin: 14px auto 0;
  border: 1px solid rgba(217, 209, 196, 0.78);
  border-radius: 999px;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 18px rgba(70, 60, 50, 0.04);
}

.page-processing .site-header .header-inner {
  width: 100%;
  padding: 0 24px;
  min-height: 72px;
  gap: 22px;
}

.page-processing .brand-tagline {
  display: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 38px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.hero-title {
  font-size: clamp(3.15rem, 6.7vw, 5.4rem);
  max-width: 8.8ch;
}

.page-home .hero-grid {
  min-height: auto;
  height: auto;
  grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  gap: 64px;
  align-items: stretch;
}

.page-home .hero-copy {
  margin-top: 0;
  margin-left: 56px;
  transform: none;
  align-self: center;
  gap: 26px;
}

.page-home .hero-title {
  max-width: 580px;
  font-size: clamp(3.5rem, 4.6vw, 5.05rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-title span {
  color: var(--accent);
}

.hero-copy p {
  max-width: 450px;
  color: var(--muted);
  font-size: 1.05rem;
}

.page-home .hero-copy p {
  max-width: 540px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-home .hero-actions {
  flex-wrap: nowrap;
}

.page-home .hero-actions .button {
  min-height: 52px;
  padding: 0 30px;
  font-size: 0.98rem;
  white-space: nowrap;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 6px;
  color: var(--muted);
}

.page-home .hero-trust {
  gap: 12px;
  padding-top: 2px;
}

.avatar-cluster {
  display: flex;
  align-items: center;
}

.avatar-cluster span,
.avatar-cluster img {
  display: inline-block;
  width: 36px;
  height: 36px;
  margin-left: -10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9cdbb, #b4c2ae);
}

.avatar-cluster img {
  object-fit: cover;
}

.avatar-cluster span {
  display: inline-grid;
  place-items: center;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
}

.page-home .avatar-cluster span,
.page-home .avatar-cluster img {
  width: 32px;
  height: 32px;
}

.page-home .avatar-cluster span {
  font-size: 0.66rem;
}

.avatar-cluster span:first-child,
.avatar-cluster img:first-child {
  margin-left: 0;
}

.hero-rating {
  display: grid;
  gap: 4px;
}

.hero-stars {
  color: #f0b949;
  font-size: 0;
  letter-spacing: 0.12em;
  line-height: 1;
}

.hero-stars::before {
  content: "\2605\2605\2605\2605\2605";
  font-size: 0.98rem;
}

.page-home .hero-stars {
  letter-spacing: 0.08em;
}

.page-home .hero-stars::before {
  font-size: 0.84rem;
}

.hero-rating span {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-home .hero-rating span {
  font-size: 0.82rem;
}

.comparison-card {
  display: block;
  align-self: center;
}

.page-home .comparison-card {
  display: block;
  position: relative;
  align-self: stretch;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
}

.comparison-image {
  display: block;
  width: 100%;
  border-radius: 18px;
}

.page-home .comparison-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  aspect-ratio: auto;
  max-height: none;
}

.home-process-strip {
  display: grid;
  gap: 20px;
  margin-top: 34px;
  padding: 12px 22px 22px;
}

.page-home .home-process-strip {
  margin-top: 104px;
  padding: 18px 20px 22px;
  gap: 36px;
}

.home-process-title {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.page-home .home-process-title {
  font-size: 0.94rem;
}

.home-process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.page-home .home-process-grid {
  gap: 8px;
}

.process-strip-card {
  display: grid;
  gap: 10px;
  padding: 12px 10px;
}

.page-home .process-strip-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 0;
  justify-items: start;
  text-align: left;
  padding: 12px 18px 12px 8px;
}

.process-strip-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  grid-row: 1 / span 2;
  grid-column: 1;
  align-self: center;
}

.process-strip-icon .icon-stroke {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}

.process-strip-card:not(:last-child)::after {
  content: "\203A";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(216, 209, 199, 0.85);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  pointer-events: none;
}

.process-strip-number {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.process-strip-heading {
  grid-row: 1;
  grid-column: 2;
  align-self: end;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.step-number {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-strip-card strong,
.step-card strong,
.pricing-card strong {
  font-size: 1.05rem;
}

.page-home .process-strip-card strong {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
}

.process-strip-card p,
.step-card p,
.style-card p,
.pricing-card p,
.faq-card p,
.showcase-copy p,
.showcase-side p,
.tip-panel li,
.credit-copy,
.credit-lock p,
.summary-notes,
.history-intro,
.refine-copy {
  color: var(--muted);
  font-size: 0.95rem;
}

.process-strip-card p {
  max-width: 160px;
  font-size: 0.84rem;
}

.page-home .process-strip-card p {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  max-width: 200px;
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
}

.showcase-feature,
.showcase-side,
.style-card,
.step-card,
.pricing-card,
.faq-card,
.summary-card,
.generator-workspace,
.upload-sidebar,
.generator-result-panel,
.history-sidebar,
.result-workspace,
.refine-sidebar {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.showcase-feature {
  overflow: hidden;
}

.showcase-visual {
  position: relative;
  min-height: 340px;
  background:
    linear-gradient(180deg, rgba(38, 47, 34, 0.2), rgba(38, 47, 34, 0.1)),
    url("home_designe_page_1.png") center/cover no-repeat;
}

.showcase-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 243, 236, 0.3) 0 50%, rgba(0, 0, 0, 0) 50% 100%);
}

.showcase-visual-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.86);
  z-index: 1;
}

.showcase-visual-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  font-weight: 800;
}

.showcase-copy {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.showcase-bullets,
.pricing-list,
.faq-list,
.tip-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.showcase-bullets li,
.pricing-list li,
.faq-list li,
.tip-panel li {
  position: relative;
  padding-left: 22px;
}

.showcase-bullets li::before,
.faq-list li::before,
.tip-panel li::before {
  content: "";
  position: absolute;
  top: 0.62rem;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 77, 58, 0.42);
}

.pricing-list {
  display: grid;
  gap: 8px;
  text-align: left;
  width: fit-content;
  margin: 0 auto;
}

.pricing-list li {
  padding-left: 24px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
}

.pricing-list li::before {
  content: "\2713";
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(31, 36, 30, 0.55);
  line-height: 1.5;
}

.showcase-side-grid {
  display: grid;
  gap: 24px;
}

.showcase-side {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.showcase-side-media {
  aspect-ratio: 1.24;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
}

.showcase-side-media--board {
  background-image: url("showcase-brief-board.png");
}

.showcase-side-media--neutral {
  background:
    linear-gradient(135deg, rgba(239, 231, 218, 0.86), rgba(247, 243, 236, 0.96)),
    url("home_designe_page_1.png");
  background-size: cover;
  background-position: center;
  filter: saturate(0.78);
}

.styles-grid,
.steps-grid,
.pricing-grid,
.faq-grid {
  display: grid;
  gap: 18px;
}

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

.steps-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

.style-card,
.step-card,
.faq-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.style-preview,
.step-icon {
  display: grid;
  place-items: center;
  border-radius: 18px;
}

.step-icon {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(31, 77, 58, 0.14);
  background: rgba(31, 77, 58, 0.06);
  color: var(--accent);
}

.icon-stroke {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.style-preview {
  position: relative;
  aspect-ratio: 1.25;
  overflow: hidden;
  border: 1px solid rgba(217, 209, 196, 0.6);
  background: var(--surface-strong, #efe7da);
}

.style-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 420ms ease;
}

.style-card:hover .style-preview-img {
  transform: scale(1.03);
}

.style-card {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.style-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(40, 48, 33, 0.08);
}

.style-card strong {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
}

.style-card-cta {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

.style-card-cta:hover {
  color: var(--accent-strong);
}

/* FAQ — accordion */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.faq-item[open] {
  border-color: var(--border-strong);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  display: none;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 220ms ease, background 220ms ease;
}

.faq-item[open] .faq-toggle {
  transform: rotate(45deg);
  background: var(--accent);
  color: #fff;
}

.faq-answer {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}

.style-preview--modern {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #e6d9c7, #faf7f2 58%, #bca988);
}

.style-preview--luxury {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #d2c0ab, #f5ece0 52%, #937a5e);
}

.style-preview--minimalist {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #f1ece3, #ffffff 60%, #d8cec1);
}

.style-preview--scandinavian {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #eadfce, #fcfaf6 58%, #c5b595);
}

.style-preview--japandi {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #d8c6ab, #f6f0e5 58%, #9f8f78);
}

.style-preview--industrial {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #c8c1b6, #f0ece6 52%, #7b7367);
}

.style-preview--farmhouse {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #ded2c2, #fbf7f0 54%, #b4916b);
}

.style-preview--mediterranean {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #dccdb6, #f7f2ea 50%, #ba8e63);
}

.pricing-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 24px 28px 24px;
  text-align: center;
  justify-items: center;
  border-radius: var(--radius-xl);
}

.pricing-card.is-featured {
  border-color: rgba(216, 209, 199, 1);
  border-width: 2px;
  padding: 23px 27px 24px;
  box-shadow: 0 22px 50px rgba(40, 48, 33, 0.07);
}

#pricing.section-block {
  padding: 18px 0 44px;
  scroll-margin-top: 0;
}

.pricing-card.is-selected {
  outline: 2px solid rgba(31, 77, 58, 0.26);
}

.pricing-card .button[data-checkout-pack] {
  position: relative;
}

.pricing-card .button.is-loading {
  pointer-events: none;
  opacity: 0.85;
  cursor: progress;
}

.pricing-card .button.is-loading .button-label {
  visibility: hidden;
}

.pricing-card .button.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 720ms linear infinite;
}

.pricing-feedback {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.1em;
}

.pricing-badge {
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
}

.pricing-head {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.pricing-name {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.pricing-head p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.34;
  color: var(--muted);
}

.pricing-price {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 3px;
  color: var(--text);
  margin: 0;
}

.pricing-price strong {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 2.38rem;
  font-weight: 600;
  line-height: 1;
}

.pricing-credits {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-top: -4px;
}

.pricing-card .button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  margin-top: 0;
}

.pricing-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.pricing-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pricing-trust-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text);
  flex-shrink: 0;
}

.pricing-trust-icon .icon-stroke {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}

.pricing-trust-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.pricing-trust-copy strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.pricing-trust-copy span {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer {
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 22px;
  flex-wrap: wrap;
  font-weight: 600;
}

.footer-nav a {
  transition: color 180ms ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.page-legal {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.legal-main {
  flex: 1;
  padding: 72px 0 64px;
}

.legal-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.legal-intro {
  margin-bottom: 28px;
}

.legal-intro .eyebrow {
  margin-bottom: 18px;
}

.legal-title {
  max-width: 14ch;
  font-size: clamp(3rem, 7vw, 5rem);
}

.legal-lead {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.02rem;
}

.legal-updated {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.legal-card {
  padding: clamp(26px, 5vw, 48px);
}

.legal-section + .legal-section {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.05;
}

.legal-section h3 {
  margin: 22px 0 8px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
}

.legal-section p + p {
  margin-top: 12px;
}

.legal-section ul {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding-left: 22px;
}

.legal-section a,
.support-email {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(31, 77, 58, 0.3);
  text-underline-offset: 3px;
}

.legal-callout {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(31, 77, 58, 0.16);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.legal-callout strong {
  display: block;
  margin-bottom: 5px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.support-topic {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.support-topic h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.support-topic p {
  color: var(--muted);
  font-size: 0.92rem;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.page-title {
  font-size: clamp(2.85rem, 5vw, 4.35rem);
}

.page-subtitle {
  margin-top: 12px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
}

.interface-badge {
  display: inline-flex;
  align-items: center;
  padding: 11px 15px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.page-generator .app-main,
.page-processing .app-main {
  padding: 20px 0 64px;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(350px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.generator-workspace,
.upload-sidebar,
.generator-result-panel,
.history-sidebar,
.result-workspace,
.refine-sidebar {
  padding: 28px;
}

.upload-sidebar,
.history-sidebar,
.refine-sidebar {
  position: sticky;
  top: 98px;
}

.form-section {
  display: grid;
  gap: 14px;
}

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

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-section-title strong {
  font-size: 1.04rem;
}

.form-section-title span {
  color: var(--muted-soft);
  font-size: 0.9rem;
}

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

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

.option-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  min-height: 118px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 244, 237, 0.96));
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.option-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.option-card {
  position: relative;
}

.option-card.is-active {
  border-color: var(--accent);
  background: #eaf4ee;
  box-shadow: 0 10px 24px rgba(31, 77, 58, 0.12);
}

.option-card.is-active .option-name,
.option-card.is-active .option-copy strong {
  color: var(--accent-strong);
}

/* Premium selected check badge (top-right) for room/style cards */
.option-card.is-active::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
}

.option-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.option-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(31, 77, 58, 0.16);
  background: rgba(31, 77, 58, 0.06);
  color: var(--accent);
}

.option-copy {
  display: grid;
  gap: 4px;
}

.option-copy strong {
  font-size: 0.96rem;
  font-weight: 800;
}

.option-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.option-card--style {
  min-height: 152px;
}

.option-card--style .style-preview {
  width: 100%;
  aspect-ratio: 1.6;
  border-radius: 18px;
}

.brief-chat,
.preservation-box,
.credit-panel,
.credit-lock,
.tip-panel,
.result-credit {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-soft);
}

.brief-chat,
.preservation-box,
.credit-panel,
.credit-lock,
.tip-panel,
.result-credit {
  padding: 22px;
}

.brief-chat.is-active,
.preservation-box {
  background: linear-gradient(180deg, #fffcf8, #f6f0e7);
}

.field-textarea,
.refine-textarea {
  width: 100%;
  min-height: 150px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: white;
  resize: vertical;
}

.field-textarea:focus,
.refine-textarea:focus,
.auth-input:focus {
  outline: none;
  border-color: rgba(31, 77, 58, 0.44);
  box-shadow: 0 0 0 4px rgba(31, 77, 58, 0.08);
}

.field-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  color: var(--muted-soft);
  font-size: 0.92rem;
}

.preservation-box legend {
  padding: 0;
  margin-bottom: 16px;
  font-size: 1.04rem;
  font-weight: 800;
}

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

.preservation-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: white;
  font-size: 0.93rem;
}

.preservation-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.generator-footer {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* Mobile-only credit status pill on the Create Design page. Hidden on desktop
   (the header badge covers desktop); revealed near the top in the <=768px block. */
.generator-credit-status {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-weight: 700;
  color: var(--text);
}

.generator-credit-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f0b949;
}

.generator-credit-status[data-state="ok"] .generator-credit-dot {
  background: #2f9e5f;
}

.generator-credit-status[data-state="empty"] .generator-credit-dot {
  background: #c2410c;
}

.generator-credit-value {
  flex: 1 1 auto;
}

.generator-credit-plans {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: white;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

.generator-note,
.refine-note {
  color: var(--muted);
  font-size: 0.93rem;
}

.credit-panel-top,
.credit-actions,
.result-credit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.credit-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credit-pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 700;
}

.credit-copy {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.credit-copy strong,
.credit-lock strong,
.result-credit strong {
  font-size: 1rem;
}

.credit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.credit-stat {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--border);
}

.credit-stat span:first-child {
  color: var(--muted);
  font-size: 0.84rem;
}

.credit-stat strong {
  font-size: 1.15rem;
}

.credit-actions {
  margin-top: 16px;
}

.text-link {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}

.upload-box {
  display: grid;
  gap: 14px;
  min-height: 280px;
  margin-top: 0;
  padding: 20px;
  border-radius: 28px;
  border: 1.5px dashed rgba(31, 77, 58, 0.2);
  background: linear-gradient(180deg, #fffdfa, #f5eee4);
  cursor: pointer;
}

.upload-box:hover {
  border-color: rgba(31, 77, 58, 0.36);
}

.upload-content {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}

.upload-icon {
  display: inline-grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 22px;
  background: white;
  border: 1px solid var(--border);
  color: var(--accent);
}

.upload-meta {
  font-size: 0.9rem;
}

.upload-preview {
  display: none;
  gap: 16px;
}

.upload-preview.is-visible {
  display: grid;
}

.preview-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 24px;
  background: #e8dfd0;
}

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

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-name {
  min-width: 0;
}

.preview-name strong,
.history-meta strong {
  display: block;
  font-size: 0.98rem;
}

.preview-name span,
.history-meta span {
  color: var(--muted);
  font-size: 0.88rem;
}

.preview-reset {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: white;
  font-weight: 700;
}

.tip-panel {
  margin-top: 18px;
}

.tip-panel strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1rem;
}

.tip-panel ul {
  display: grid;
  gap: 10px;
}

.generator-result-panel {
  display: none;
  gap: 18px;
  margin-top: 24px;
}

.generator-result-panel.is-visible {
  display: grid;
}

.result-head,
.history-head,
.refine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 77, 58, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.result-placeholder {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 34px;
  border-radius: 26px;
  background: linear-gradient(180deg, #f6efe5, #ede3d3);
  color: var(--muted);
  text-align: center;
}

.result-placeholder-inner {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.result-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border-radius: 999px;
  border: 3px solid rgba(31, 77, 58, 0.14);
  border-top-color: var(--accent);
  animation: spin 900ms linear infinite;
}

.result-frame {
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(180deg, #f1e8d9, #e7ddcd);
}

.result-frame img {
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: contain;
}

.result-frame img.is-hidden {
  display: none;
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.result-copy {
  color: var(--muted);
}

.result-link {
  color: var(--accent);
  font-weight: 800;
}

/* Compact brief summary as boxed tinted chips */
/* Anti-flicker gate: while the processing page's inline app script has not yet
   applied the correct state, keep the dynamic summary + result/processing layout
   hidden (but keep their layout box, so there is no reflow) so the default or a
   previously-cached layout never flashes. The script — with load/timeout
   failsafes — removes .js-pending as soon as it is ready. */
.page-processing.js-pending .project-summary-bar,
.page-processing.js-pending .processing-layout {
  visibility: hidden;
}

.project-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.project-summary-item {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  text-align: center;
  min-width: 0;
  min-height: 64px;
  flex: 1 1 180px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.project-summary-item--notes {
  flex: 2 1 260px;
}

.project-summary-item span {
  color: var(--muted-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-summary-item strong {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-intro--tight {
  margin-bottom: 14px;
}

.page-processing .page-title {
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.page-processing .page-subtitle {
  margin-top: 6px;
}

.processing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.history-intro,
.refine-copy {
  margin-top: 6px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.history-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  text-align: left;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.history-item:not(.history-item--source):hover {
  border-color: rgba(31, 77, 58, 0.3);
}

.history-item.is-active {
  border-color: var(--accent);
  background: #eaf4ee;
  box-shadow: 0 10px 22px rgba(31, 77, 58, 0.1);
}

.history-item--source {
  cursor: default;
}

.history-thumb,
.history-thumb-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.history-thumb-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e8ddcd, #f4eee4);
  color: var(--muted-soft);
  font-size: 0.72rem;
  text-align: center;
}

.history-new {
  width: 100%;
  margin-top: 16px;
}

/* Project Versions: stretch the outer panel to the workspace height, keep
   cards compact at the top, and pin "+ New Variation" to the bottom. */
.page-processing .history-sidebar {
  position: static;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.page-processing .history-sidebar .history-list {
  flex: 1 1 auto;
  align-content: start;
}

.page-processing .history-sidebar .history-new {
  margin-top: auto;
}

.result-workspace {
  display: grid;
  gap: 14px;
}

/* Tighter shell so the generated image is the hero, not the padding */
.page-processing .result-workspace {
  padding: 16px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 13px;
  border-radius: 999px;
  /* In-progress (Generating / Refining / Reconnecting) = soft orange */
  background: #fbeede;
  color: #9a5a1c;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.is-success {
  background: #e8f4ec;
  color: var(--accent-strong);
}

.status-pill.is-error {
  background: rgba(194, 65, 12, 0.12);
  color: #c2410c;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Light, uniform action buttons aligned cleanly */
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 77, 58, 0.34);
  background: #eaf4ee;
}

/* Icon-only result actions (Open full size / Download / Share) */
.action-icon {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  color: var(--text);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.action-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.action-icon:hover {
  transform: translateY(-1px);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.action-button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 77, 58, 0.2);
}

/* Disabled state for the anchor actions while no result exists */
.action-button.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.progress-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* The verbose sentence above the progress bar is hidden for a cleaner UI;
   the status badge + bar + steps communicate progress. */
.progress-label {
  display: none;
}

.progress-value {
  color: #9a5a1c;
  font-size: 0.9rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2d8c9;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #214f3c, #69815e);
  transition: width 240ms ease;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.progress-step {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  color: var(--muted-soft);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.progress-step.is-active {
  border-color: rgba(31, 77, 58, 0.34);
  color: var(--accent);
  background: #f7fbf8;
}

.progress-step.is-complete {
  border-color: transparent;
  background: rgba(31, 77, 58, 0.12);
  color: var(--accent);
}

.feedback-box {
  display: none;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #e7c5b8;
  background: #f9ece7;
  color: #87482c;
  font-size: 0.94rem;
}

.feedback-box.is-visible {
  display: block;
}

.result-card {
  display: grid;
  gap: 14px;
}

.result-stage {
  position: relative;
}

.result-stage .result-frame {
  min-height: 360px;
  display: grid;
  place-items: center;
  /* Clean neutral stage (no beige) so the render is the hero */
  background: #f1f1ef;
}

.result-stage .result-frame img {
  max-height: 80vh;
}

/* ---- Page states: Generating / Complete / Refining ---- */

/* Refine controls now live below the image inside the result workspace */
.refine-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.refine-panel .refine-head strong {
  font-size: 1.02rem;
}

.refine-panel .refine-textarea {
  min-height: 96px;
}

/* Full-width refine action, aligned to the image/textarea width */
.refine-submit {
  width: 100%;
  justify-content: center;
}

.refine-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.refine-panel .refine-note {
  margin: 0;
  text-align: center;
}

.refine-plans-link {
  justify-self: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
  text-decoration: none;
  transition: background 180ms ease;
}

.refine-plans-link:hover {
  background: var(--accent-strong);
}

/* Generating: hide the refine controls; show progress + versions only */
.processing-layout.is-generating .refine-panel {
  display: none;
}

/* Refining: keep the current result visible but lock the refine controls */
.processing-layout.is-refining .refine-panel {
  opacity: 0.55;
  pointer-events: none;
}

/* Pending version item (Version N while it is still processing) */
.history-item--pending {
  cursor: default;
}

.history-thumb-loading {
  position: relative;
}

.history-spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(31, 77, 58, 0.25);
  border-top-color: var(--accent);
  animation: spin 720ms linear infinite;
}

.result-stage-placeholder {
  display: grid;
  gap: 10px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.result-stage-placeholder[hidden] {
  display: none !important;
}

.result-caption {
  display: grid;
  gap: 8px;
}

.result-caption strong {
  font-size: 1.06rem;
}

.result-caption span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 27, 22, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.auth-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px 32px 28px;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: 0 30px 80px rgba(20, 24, 18, 0.18);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.auth-close:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.auth-close svg {
  width: 18px;
  height: 18px;
}

.auth-view[hidden] {
  display: none;
}

.auth-head {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.auth-head--center {
  justify-items: center;
  text-align: center;
}

.auth-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}

.auth-title {
  margin: 4px 0 0;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

.auth-subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-social {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.auth-google {
  position: relative;
  width: 100%;
  min-height: 46px;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
}

.auth-google svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.auth-google.is-loading > * {
  visibility: hidden;
}

.auth-google.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 720ms linear infinite;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.auth-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 77, 58, 0.12);
}

.auth-feedback {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}

.auth-feedback.is-error {
  color: #b04a2c;
}

.auth-feedback.is-success {
  color: var(--accent);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.auth-submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.auth-submit.is-loading .auth-submit-label {
  visibility: hidden;
}

.auth-submit {
  position: relative;
}

.auth-submit.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 720ms linear infinite;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-foot--center {
  justify-content: center;
  text-align: center;
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: color 180ms ease;
}

.auth-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.auth-account-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.auth-account-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-account-actions .button {
  width: 100%;
  justify-content: center;
}

/* Account dashboard: projects, credits, support */
.auth-projects {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-empty {
  display: grid;
  gap: 4px;
  padding: 26px 18px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.auth-empty strong {
  font-size: 1rem;
  color: var(--text);
}

.auth-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-project-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.auth-project-item:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 77, 58, 0.34);
  box-shadow: var(--shadow-soft);
}

.auth-project-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.auth-credit-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  margin-bottom: 16px;
}

.auth-credit-balance span {
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-credit-balance strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.auth-pack-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.auth-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.auth-pack-name {
  font-weight: 800;
  color: var(--text);
}

.auth-pack-price {
  font-weight: 800;
  color: var(--accent);
}

.auth-pack-credits {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-support {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.auth-support .button {
  width: 100%;
  justify-content: center;
}

.auth-support-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.button-account {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.button-account:hover {
  background: var(--accent-strong);
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 32px 22px 22px;
  }

  .auth-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-foot--center {
    align-items: center;
  }
}

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

@media (max-width: 1120px) {
  .generator-layout,
  .showcase-grid,
  .processing-layout {
    grid-template-columns: 1fr;
  }

  .upload-sidebar,
  .history-sidebar,
  .refine-sidebar {
    position: static;
  }

  .processing-layout {
    gap: 18px;
  }

  /* Stacked: lead with the generated result, then versions, then refine */
  .processing-layout .result-workspace {
    order: -1;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .page-home .container {
    width: min(1540px, calc(100% - 36px));
  }

  .page-home .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .page-home .hero-copy {
    margin-top: 0;
    margin-left: 0;
    transform: none;
  }

  .page-home .comparison-card {
    aspect-ratio: 1.35 / 1;
    min-height: 0;
  }

  .process-strip-card:not(:last-child)::after {
    display: none;
  }

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

  .styles-grid,
  .pricing-grid,
  .faq-grid,
  .option-grid--styles,
  .examples-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .home-process-grid,
  .processing-summary,
  .preservation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   Mobile header + hamburger menu — applies at <=768px ONLY.
   Closed:  [gold icon + RoomCraft AI] .................. [hamburger]
   Open:    a stacked dropdown panel with the nav links + actions.
   Desktop (>768px) is entirely unaffected by this block.
   ============================================================ */
@media (max-width: 768px) {
  /* Compact closed header: brand on the left, hamburger on the right. The bar
     stays a single row (the menu opens as an absolutely-positioned card, so it
     never wraps or resizes the bar). */
  .header-inner {
    position: relative;
    align-items: center;
    column-gap: 12px;
    min-height: 64px;
    padding: 10px 0;
  }

  .brand {
    gap: 10px;
    min-width: 0;
    margin-right: auto;
  }

  .brand-name {
    font-size: 1.02rem;
  }

  /* Cleaner closed header: drop the tagline on phones only. */
  .brand-tagline {
    display: none;
  }

  /* Reveal the hamburger (hidden on desktop) on the right. */
  .nav-toggle {
    display: inline-flex;
  }

  /* Closed: the menu card is hidden. Open: it becomes a clean rectangular
     dropdown floating directly under the header, only as tall as its content. */
  .header-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .is-menu-open .header-menu {
    display: flex;
  }

  /* Nav links: stacked vertically, no wrapping, no horizontal scroll. */
  .header-menu .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    font-size: 1rem;
  }

  .header-menu .site-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
  }

  .header-menu .site-nav a:hover,
  .header-menu .site-nav a[aria-current="page"] {
    background: var(--accent-soft);
  }

  /* Actions: clean full-width buttons at the bottom of the card (rounded
     rectangles, not full-width pills/ovals). */
  .header-menu .header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .header-menu .header-actions .button,
  .header-menu .header-actions .header-credits {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
  }

  .header-menu .header-actions .header-credits {
    justify-content: center;
  }

  .header-menu .header-actions .avatar-pill {
    width: 100%;
    height: 48px;
    border-radius: 12px;
  }

  /* Hamburger animates to an X in place — no separate floating close box. */
  .is-menu-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .is-menu-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .is-menu-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 760px) {
  .container {
    width: min(var(--max-width), calc(100% - 24px));
  }

  .page-home .container {
    width: min(1540px, calc(100% - 24px));
  }

  /* NOTE: the mobile header (brand + hamburger + dropdown) is handled entirely in
     the dedicated @media (max-width: 768px) block near the end of this file. */

  .legal-main {
    padding: 48px 0;
  }

  .legal-card {
    border-radius: var(--radius-xl);
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner,
  .footer-nav {
    justify-content: flex-start;
  }

  .section-block {
    padding: 74px 0;
  }

  .section-heading,
  .page-intro,
  .result-footer,
  .workspace-top,
  .progress-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .showcase-visual,
  .result-stage .result-frame {
    min-height: 310px;
  }

  .styles-grid,
  .steps-grid,
  .pricing-grid,
  .pricing-trust,
  .faq-grid,
  .home-process-grid,
  .processing-summary,
  .option-grid,
  .option-grid--styles,
  .preservation-grid,
  .progress-steps,
  .examples-gallery {
    grid-template-columns: 1fr;
  }

  .examples-featured-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .examples-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 6px;
  }

  .examples-filter {
    flex-shrink: 0;
  }

  .pricing-trust {
    gap: 18px;
    margin-top: 24px;
    padding-top: 18px;
  }

  .pricing-trust-item {
    justify-content: flex-start;
  }

  .result-actions,
  .hero-actions,
  .auth-actions {
    width: 100%;
  }

  .page-home .hero-actions {
    flex-wrap: wrap;
  }

  .result-actions .button,
  .result-actions .action-button,
  .hero-actions .button,
  .auth-actions .button {
    flex: 1 1 calc(50% - 12px);
  }

  /* Icon-only actions stay compact (not stretched) on mobile */
  .result-actions .action-icon {
    flex: 0 0 auto;
  }

  .generator-workspace,
  .upload-sidebar,
  .generator-result-panel,
  .history-sidebar,
  .result-workspace,
  .refine-sidebar {
    padding: 22px;
  }

  .page-home .hero-title {
    max-width: none;
    font-size: clamp(2.9rem, 14vw, 4.2rem);
  }

  .hero-title,
  .page-title {
    max-width: none;
  }
}

/* Password show/hide toggle */
.auth-input-wrap {
  position: relative;
  display: block;
}

.auth-input-wrap .auth-input {
  width: 100%;
  padding-right: 64px;
}

.auth-pass-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  border-radius: 8px;
  transition: color 180ms ease, background 180ms ease;
}

.auth-pass-toggle:hover {
  color: var(--accent-strong);
  background: rgba(31, 77, 58, 0.08);
}

/* Profile photo on avatars (header + account modal); initials are the fallback */
.has-photo {
  color: transparent !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  overflow: hidden;
}

.auth-profile-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.auth-profile-upload {
  cursor: pointer;
}

/* Header credit badge is now an interactive control (opens Credits view) */
button.header-credits {
  font-family: inherit;
  cursor: pointer;
}

/* Generator: live "Your design brief" summary panel */
.brief-summary {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.brief-summary-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.brief-summary-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.brief-summary-list li span {
  color: var(--muted);
}

.brief-summary-list li strong {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}

/* Compact, icon-only Room Type cards (scoped so Design Style cards are unaffected) */
.option-grid--rooms {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.option-card--room {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  padding: 16px 10px;
  border-radius: 18px;
  text-align: center;
}

.option-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* Accessible keyboard focus for all option cards */
.option-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 77, 58, 0.18);
}

@media (max-width: 760px) {
  .option-grid--rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Generator polish: tighter header + balanced section rhythm */
.page-generator .page-title {
  font-size: clamp(2.2rem, 3.2vw, 3rem);
}

.page-generator .page-subtitle {
  margin-top: 8px;
}

.page-generator .brief-chat {
  margin-top: 16px;
}

/* Hide the (now usually empty) helper note under the Generate button */
.generator-note:empty {
  display: none;
}

/* Status pill states (soft, brand-consistent) */
.interface-badge[data-state="warning"] {
  background: #fbeede;
  border-color: #ead0a8;
  color: #9a5a1c;
}

.interface-badge[data-state="success"] {
  background: #e8f4ec;
  border-color: #bfe0c9;
  color: var(--accent-strong);
}

/* Design brief: room photo status */
.brief-summary-list .is-missing {
  color: #c2410c;
}

.brief-summary-list .is-uploaded {
  color: #1f7a4d;
}

/* Instructions: lift the title closer to the section's top boundary */
.page-generator .brief-chat {
  padding-top: 16px;
}

.page-generator .brief-chat .form-section-title {
  margin-bottom: 12px;
}

/* =====================================================================
   Create Design (generator) mobile UX — applies at <=768px ONLY.
   Desktop layout above 768px is unaffected by this block. It reorders the
   flow to: intro -> credit status -> upload -> room -> style -> instructions
   -> generate -> note, and compacts the cards so the page is shorter.
   Placed last so it wins over the earlier <=760/<=980 grid rules.
   ===================================================================== */
@media (max-width: 768px) {
  /* 1. Compact intro. The interface badge is redundant with the credit status
        + generate note on mobile, so hide it to shorten the top. */
  .page-generator .page-intro {
    margin-bottom: 10px;
  }

  .page-generator .page-title {
    font-size: clamp(1.7rem, 7vw, 2.1rem);
  }

  .page-generator .interface-badge {
    display: none;
  }

  /* 2. Reveal the credit status near the top. */
  .generator-credit-status {
    display: flex;
  }

  /* 3. Move the upload block above the room/style workspace. */
  .generator-layout {
    gap: 16px;
  }

  .generator-layout .upload-sidebar {
    order: -1;
  }

  /* Compact the upload box (was min-height: 380px). */
  .upload-box {
    min-height: 0;
    gap: 12px;
    padding: 18px 16px;
  }

  .upload-icon {
    width: 52px;
    height: 52px;
  }

  /* Hide the live "design brief" summary on mobile to keep the page short. */
  .upload-sidebar .brief-summary {
    display: none;
  }

  /* 4. Compact room cards (two columns). */
  .option-grid--rooms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .option-card--room {
    min-height: 66px;
    padding: 12px 10px;
    gap: 8px;
  }

  .option-card--room .option-icon {
    width: 34px;
    height: 34px;
  }

  /* 5. Compact style cards: two columns with smaller previews (no long list). */
  .option-grid--styles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .option-card--style {
    min-height: 0;
    gap: 8px;
    padding: 10px;
  }

  .option-card--style .style-preview {
    aspect-ratio: 1.7;
    border-radius: 14px;
  }

  .option-card--style .option-copy strong {
    font-size: 0.9rem;
  }

  .option-card--style .option-copy span {
    font-size: 0.76rem;
  }

  /* 6. Usable instructions textarea. */
  .brief-chat {
    padding: 16px;
  }

  .field-textarea {
    min-height: 104px;
    padding: 14px;
  }

  /* 7. Full-width generate button. */
  .generator-footer .button-primary {
    width: 100%;
  }
}
