/* ═══════════════════════════════════════════════
   DRIFTPRINT — Global Styles
   Font: Inter (Google Fonts)
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #E8E4DC;
  --surface:     #F5F2EC;
  --surface2:    #EBE8E1;
  --border:      #D4CFCA;
  --border-dark: #B8B3AC;
  --accent:      #2EC4B6;
  --accent-h:    #28AFA2;
  --accent2:     #F5C842;
  --accent2-h:   #D4AF38;
  --ocean:       #042A40;
  --ocean-h:     #0A3D58;
  --text:        #0F0F1A;
  --text-md:     #4A4853;
  --muted:       #7A7673;
  --success:     #18A558;
  --error:       #dc2626;
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xs:   6px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.13);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════
   NAV
   ════════════════════════════════════════ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  position: relative;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}
.nav-logo::before {
  content: 'DRIFTPRINT';
  position: absolute;
  top: -3px;
  left: 3px;
  color: var(--accent);
  opacity: 0.38;
  pointer-events: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: inherit;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-md);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--ocean);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.nav-cta:hover { background: var(--ocean-h); transform: translateY(-1px); }

/* Nav right cluster */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger button — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}
.nav-burger:hover { background: var(--surface2); }
.burger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
/* Animated X state */
.nav-burger.burger-open .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.burger-open .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.burger-open .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease, padding 0.28s ease;
  padding: 0 20px;
}
.nav-drawer.nav-drawer--open {
  max-height: 320px;
  padding: 12px 20px 16px;
}
.nav-drawer-link {
  display: block;
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.nav-drawer-link:last-of-type { border-bottom: none; }
.nav-drawer-link:hover { color: var(--accent); }
.nav-drawer-cta {
  display: block;
  margin-top: 12px;
  padding: 12px 0;
  text-align: center;
  background: var(--ocean);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.nav-drawer-cta:hover { background: var(--ocean-h); }

/* App nav */
.nav-app { padding: 0 28px; }

.nav-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.nav-step { color: var(--muted); }
.nav-step.active { color: var(--accent); }
.nav-step.done { color: var(--success); }
.nav-step-arrow { color: var(--border-dark); font-size: 11px; }

.nav-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back:hover { color: var(--accent); }

/* ════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ocean);
  color: #fff;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(4, 42, 64, 0.30);
}
.btn-primary:hover { background: var(--ocean-h); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(4,42,64,0.38); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-large { padding: 17px 36px; font-size: 17px; border-radius: 100px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-md);
  padding: 14px 20px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border-dark);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: var(--text-md);
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border-dark);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--border-dark);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ════════════════════════════════════════
   LANDING — HERO
   ════════════════════════════════════════ */
.landing .hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 80px;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-headline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-md);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-trust {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.hero-pricing-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}
.hero-from {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.hero-from strong {
  color: var(--accent);
  font-size: 16px;
}
.hero-pricing-dot {
  color: var(--border-dark);
}
.hero-social-count {
  color: var(--text-md);
  font-weight: 500;
}
.hero-proof-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-md);
  font-weight: 500;
}
.hero-stars {
  color: #F5C842;
  letter-spacing: 1px;
  font-size: 13px;
}
.btn-hero {
  font-size: 16px;
  padding: 14px 28px;
}
.btn-ghost-sm {
  font-size: 14px;
  padding: 10px 18px;
  opacity: 0.85;
}

/* Hero Gallery */
.hero-gallery {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  justify-content: center;
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 30px; /* DOM gap: visual_gap(12) + black_shadow(9) + white_shadow(9) = 30px */
  margin-top: -8px; /* compensate for shadow spread diff vs wood (17px) vs black/white (9px) */
}

.gallery-frame {
  position: relative;
  overflow: hidden;   /* clips the image cleanly */
  border-radius: 1px;
  flex-shrink: 0;
}

/* Tall left frame */
.frame-tall { width: 210px; height: 320px; }

/* margin-top:-8px, gap(30), visual_gap(12): 2*h = 318-12 = 306 → h=153px */
.frame-sq { width: 170px; height: 153px; }

/* Box-shadow is painted OUTSIDE the element and is never clipped by
   overflow:hidden on the element itself or any parent — so this works
   perfectly for frames that overlap each other in the hero. */
.frame-black {
  box-shadow:
    0 0 0 2px #2a2a2a,       /* thin inner liner */
    0 0 0 8px #111111,       /* main black moulding */
    0 0 0 9px #3a3a3a,       /* outer edge highlight */
    0 28px 56px rgba(0,0,0,0.5);
}
.frame-wood {
  box-shadow:
    0 0 0 2px #d4a870,       /* bright top-edge highlight */
    0 0 0 16px #7a4e28,      /* main walnut body */
    0 0 0 17px #5a3618,      /* outer dark edge */
    0 22px 44px rgba(0,0,0,0.35);
}
.frame-white-f {
  box-shadow:
    0 0 0 1px #e8e4e0,       /* inner liner */
    0 0 0 8px #f6f3f0,       /* main white moulding */
    0 0 0 9px #c8c4c0,       /* outer grey edge */
    0 18px 40px rgba(0,0,0,0.22);
}
/* Unframed / canvas-wrap style */
.frame-none {
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.08),
    0 12px 32px rgba(0,0,0,0.22);
  border-radius: 2px;
}

/* Mat board — cream inner padding between art and frame */
.frame-mat {
  background: #f0ebe2;
  padding: 14px;
}

/* Frame label wrapper — positions label below the visible frame shadow */
.gallery-frame-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-frame-label {
  margin-top: 24px; /* clears the 17px frame shadow + breathing room */
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2px;
  text-align: center;
}

/* Art clipping wrapper — not needed separately since gallery-frame clips */
.gallery-art-clip {
  width: 100%;
  height: 100%;
}

.gallery-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Art placeholders (CSS art) */
.art-1 { background: linear-gradient(160deg, #0d1117 0%, #1a2744 30%, #2a1a44 60%, #0d1117 100%); position: relative; overflow: hidden; }
.art-1::after { content: ''; position: absolute; top: 30%; left: 20%; width: 60%; height: 60%; background: radial-gradient(ellipse, rgba(255,220,100,0.5), transparent 70%); border-radius: 50%; }
.art-2 { background: linear-gradient(135deg, #7a3010 0%, #d4920a 40%, #2d7a22 100%); }
.art-3 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }

/* ════════════════════════════════════════
   LANDING — TRUST BAR
   ════════════════════════════════════════ */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 40px;
  background: var(--ocean);
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════
   LANDING — SECTIONS
   ════════════════════════════════════════ */
.section {
  padding: 100px 40px;
}
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-md);
  margin-bottom: 48px;
  max-width: 520px;
}

/* HOW IT WORKS */
.steps {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.step {
  flex: 1;
  padding: 32px 28px;
}

.step-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 32px 0;
}

.step-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
}


.step h3 {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.step p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-md);
}

/* ── Step visuals ── */
.step-visual {
  margin-top: 20px;
}
.step-art-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.step-art-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.step-ui-preview {
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.step-ui-img {
  width: 100%;
  display: block;
}
.step-wall-preview {
  position: relative;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #E0DDD6;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-wall-art {
  width: 80%;
  max-width: 180px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 3px #111, 0 12px 32px rgba(0,0,0,0.4);
}
/* Step 03 — Wall scene */
.step-wall-scene {
  position: relative;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #EAE5DC;
}
.step-wall-surface {
  background: #EAE5DC;
  background-image: radial-gradient(ellipse at 50% 38%, rgba(255,255,255,0.28) 0%, transparent 68%);
  padding: 28px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-wall-frame {
  padding: 10px;
  background: #1a1a1a;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.18),
    0 10px 28px rgba(0,0,0,0.28),
    0 28px 72px rgba(0,0,0,0.22);
}
.step-wall-frame-mat {
  padding: 16px;
  background: #F4F1EC;
}
.step-wall-art-img {
  display: block;
  width: 210px;
  height: 148px;
  object-fit: cover;
}
.step-wall-baseboard {
  height: 12px;
  background: rgba(0,0,0,0.07);
}
.step-delivered {
  position: relative;
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.step-delivered-art {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-xs);
}
.step-delivered-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,15,26,0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* STYLES GRID */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

.styles-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.styles-grid-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.styles-category-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 12px;
}

.style-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}
.style-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.style-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.style-info {
  padding: 18px 20px;
}
.style-info h4 {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 5px;
}
.style-info p {
  font-size: 13px;
  color: var(--text-md);
  line-height: 1.5;
}

.styles-cta { text-align: center; margin-top: 52px; }

/* MATERIALS */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.material-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}
.material-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.material-card[aria-expanded="true"] { border-color: var(--accent); box-shadow: var(--shadow-md); }

/* Size breakdown (shown on click) */
.material-sizes {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.size-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.size-row:last-of-type { border-bottom: none; }
.size-row span:first-child { color: var(--text-md); }
.size-row span:last-child  { font-weight: 700; color: var(--text); }
/* Square sizes — no prefix icon needed */
.material-cta {
  display: block;
  margin-top: 14px;
  text-align: center;
  background: var(--ocean);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}
.material-cta:hover { background: var(--ocean-h); }

.material-featured {
  border-color: var(--accent);
  background: var(--surface2);
}

.material-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ocean);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.material-icon {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 14px;
}

.material-card h4 {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 8px;
}

.material-card p {
  font-size: 13px;
  color: var(--text-md);
  line-height: 1.5;
  margin-bottom: 16px;
}

.material-price {
  font-size: 14px;
  color: var(--muted);
}
.material-price strong { color: var(--text); font-size: 16px; }

/* FRAMES ROW */
.frames-row {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-top: 48px;
}
.frames-row h3 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.frames-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ─── Frame Lab (interactive configurator) ─── */
.frame-lab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.frame-lab-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Simulated wall */
.fl-wall {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(160deg, #e2d9ce 0%, #ede4d8 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}

/* The framed artwork element — box-shadow = frame, padding = mat */
.fl-frame {
  background: white;
  padding: 0;
  line-height: 0;
  border-radius: 0;
  display: inline-block;
  transition: box-shadow 0.22s ease, padding 0.22s ease;
}

.fl-frame img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: width 0.22s ease, height 0.22s ease;
}


/* Controls column */
.frame-lab-controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.fl-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fl-group-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-md);
  display: flex;
  align-items: center;
  gap: 7px;
}

.fl-group-val {
  font-weight: 600;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

/* Swatch row */
.fl-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fl-sw {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
  min-width: 60px;
}
.fl-sw:hover   { border-color: var(--accent); }
.fl-sw.active  { border-color: var(--accent); background: var(--surface2); }

.fl-chip {
  width: 38px;
  height: 16px;
  border-radius: 3px;
  display: block;
}
.fl-chip-none  { background: #f5f0ea; border: 1.5px dashed #c4bdb5; }
.fl-chip-black { background: #111; }
.fl-chip-white { background: #f6f3f0; border: 1.5px solid #d0ccc8; }
.fl-chip-wood  { background: linear-gradient(90deg, #6a3e1e 0%, #c8883a 50%, #6a3e1e 100%); }
.fl-chip-gold  { background: linear-gradient(90deg, #7a5c06 0%, #f0d060 50%, #7a5c06 100%); }

.fl-orient-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.fl-orient-btn:hover  { border-color: var(--accent); color: var(--accent); }
.fl-orient-btn.active { border-color: var(--accent); background: var(--surface2); color: var(--accent); }

.fl-sw-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.fl-sw-price {
  font-size: 10px;
  font-style: normal;
  color: var(--muted);
}

/* Range slider */
/* Price info pill */

.fl-cta-btn {
  align-self: flex-start;
}

/* ════════════════════════════════════════
   LANDING — GUARANTEE STRIP
   ════════════════════════════════════════ */
.guarantee-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.guarantee-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 36px 32px;
  border-right: 1px solid var(--border);
}
.guarantee-item:last-child { border-right: none; }

.g-icon {
  font-size: 24px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.guarantee-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}

.guarantee-item p {
  font-size: 13px;
  color: var(--text-md);
  line-height: 1.5;
}

/* ════════════════════════════════════════
   LANDING — TESTIMONIALS
   ════════════════════════════════════════ */
.testimonials-section {
  background: var(--bg);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-md);
}
.tc-stars {
  color: #F5C842;
  font-size: 15px;
  letter-spacing: 2px;
}
.tc-quote {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  flex: 1;
}
.tc-quote::before { content: '\201C'; }
.tc-quote::after  { content: '\201D'; }
.tc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.tc-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
}
.tc-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.tc-print {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ════════════════════════════════════════
   LANDING — FINAL CTA
   ════════════════════════════════════════ */
.cta-section {
  padding: 100px 40px;
  text-align: center;
}

.cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.cta-inner p {
  font-size: 17px;
  color: var(--text-md);
  margin-bottom: 36px;
}

/* ════════════════════════════════════════
   LANDING — FOOTER
   ════════════════════════════════════════ */
.footer {
  background: var(--ocean);
  color: rgba(255,255,255,0.65);
  padding: 60px 40px 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.footer-brand .nav-logo { color: #fff; }
.footer-brand .nav-logo::before { color: var(--accent); opacity: 0.5; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand p { font-size: 14px; max-width: 260px; line-height: 1.6; }

.footer-links {
  display: flex;
  gap: 60px;
}
.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links strong {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ════════════════════════════════════════
   CREATE PAGE
   ════════════════════════════════════════ */
.app-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-page .nav { flex-shrink: 0; }

.create-main {
  flex: 1;
  display: grid;
  grid-template-columns: 420px 1fr;
  overflow: hidden;
}

/* Left panel */
.create-panel {
  padding: 32px;
  overflow-y: auto;
  overflow-x: hidden; /* prevent style strip from expanding grid track */
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0; /* prevent grid item from expanding beyond its track */
}

.panel-header {
  margin-bottom: 24px;
}
.panel-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.panel-header p {
  font-size: 14px;
  color: var(--muted);
}

/* Tabs */
.tabs {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 10px 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tab:not(.active):hover { color: var(--text); }

/* Panel content */
.panel { display: none; }
.panel.active { display: block; }

.input-group { margin-bottom: 20px; }

.input-group label,
.style-picker > label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  padding: 13px 15px;
  resize: none;
  overflow: hidden;
  min-height: 52px;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: 'Inter', inherit;
}
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,196,182,0.12);
}
textarea::placeholder { color: #B0ADA8; }

/* ── Inspire me panel ─────────────────────── */
.prompt-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.prompt-label-row label {
  margin-bottom: 0;
}
.inspire-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.32s ease, opacity 0.2s ease, margin-top 0.2s ease;
  margin-top: 0;
}
.inspire-panel.open {
  max-height: 640px;
  opacity: 1;
  margin-top: 10px;
  margin-bottom: 4px;
}
.inspire-category {
  margin-bottom: 12px;
}
.inspire-category:last-child { margin-bottom: 0; }
.inspire-cat-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 6px;
}
.inspire-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.inspire-chip {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 7px 11px;
  font-size: 12px;
  font-family: 'Inter', inherit;
  color: var(--text-md);
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.inspire-chip:hover {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--text);
}
.inspire-loading {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.inspire-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.inspire-shuffle {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s;
}
.inspire-shuffle:hover { color: var(--accent); }

/* Inspire panel — category-first redesign */
.inspire-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.inspire-cat-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 9px 11px;
  font-size: 12px;
  font-family: 'Inter', inherit;
  font-weight: 600;
  color: var(--text-md);
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.inspire-cat-btn:hover {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--text);
}
.inspire-prompt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.inspire-back {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px 2px 0;
  transition: color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.inspire-back:hover { color: var(--accent); }
.inspire-cat-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-picker { margin-bottom: 20px; }

/* ── Horizontal style strip ── */
.style-strip-wrap {
  position: relative;
  overflow: hidden;
  isolation: isolate; /* contain stacking context so buttons can't paint above sticky bar */
  contain: paint; /* hard paint boundary — nothing inside can visually escape this box */
}
.style-strip-wrap::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 8px;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--surface));
  pointer-events: none;
  z-index: 1;
}
.style-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.style-strip::-webkit-scrollbar { display: none; }

.style-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 0 7px;
  background: var(--surface2);
  border: 2px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--text-md);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
  width: 76px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.style-btn:hover { border-color: var(--border-dark); background: var(--surface); }
.style-btn.active {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

/* Small swatches */
.swatch-sm {
  width: 32px;
  height: 28px;
  border-radius: 5px;
  display: block;
  flex-shrink: 0;
}
/* ── Classic & Fine Art ── */
.noir-sm         { background: linear-gradient(135deg, #111 0%, #888 50%, #eee 100%); }
.oldmaster-sm    { background: linear-gradient(135deg, #1a0e05 0%, #8B6020 40%, #c8900a 65%, #1a0e05 100%); }
.impressionist-sm{ background: linear-gradient(135deg, #c8a0d8 0%, #88c8f0 35%, #a8dca0 65%, #f8d888 100%); }
.oil-sm          { background: linear-gradient(135deg, #7a3010 0%, #d4920a 50%, #2d7a22 100%); }
.watercolor-sm   { background: linear-gradient(135deg, #6ec6f5 0%, #f5a7c7 50%, #7be0a0 100%); }
.nouveau-sm      { background: linear-gradient(135deg, #c8a060 0%, #7a9e6e 40%, #d4c46a 70%, #a07840 100%); }
.ukiyoe-sm       { background: linear-gradient(135deg, #2a7a8a 0%, #f5e0b8 45%, #c85070 75%, #1a3a5a 100%); }
.sketch-sm       { background: #f5f5f0; background-image: repeating-linear-gradient(45deg, #c8c8c0 0, #c8c8c0 1px, transparent 0, transparent 5px); }
.postimpressionist-sm      { background: linear-gradient(135deg, #1a3a6e 0%, #3060a8 30%, #f5c820 60%, #e8831a 100%); }
.artdeco-sm      { background: linear-gradient(135deg, #0f0c05 0%, #c8a020 35%, #f0e8c8 65%, #c8a020 100%); }
/* ── Modern & Contemporary ── */
.neoexpress-sm     { background: linear-gradient(135deg, #c01828 0%, #e8c800 33%, #1868c0 66%, #111 100%); }
.popart-sm       { background: linear-gradient(135deg, #ff0066 0%, #ffee00 50%, #00ccff 100%); }
.bauhaus-sm      { background: linear-gradient(135deg, #d42820 0%, #f0c800 50%, #1860b8 100%); }
.vintage-sm      { background: linear-gradient(135deg, #c8a87a 0%, #edd9b0 50%, #9c7a5c 100%); }
.poster-sm       { background: linear-gradient(135deg, #e84820 0%, #f8c060 50%, #f0f0e0 100%); }
.travel-sm       { background: linear-gradient(135deg, #2d5a27 0%, #f5e080 45%, #4a8ab5 100%); }
.comic-sm        { background: linear-gradient(135deg, #e82020 0%, #f8e800 50%, #2060e8 100%); }
.cyberpunk-sm    { background: linear-gradient(135deg, #0d0221 0%, #c020e0 40%, #00f0ff 75%, #0d0221 100%); }
.surrealism-sm   { background: linear-gradient(135deg, #4a2878 0%, #d4a050 35%, #87ceeb 65%, #c03828 100%); }
.surrealoil-sm   { background: linear-gradient(135deg, #7a3010 0%, #c47820 35%, #4a3878 65%, #c87840 100%); }
.screenprint-sm  { background: linear-gradient(135deg, #d42020 0% 33%, #f8e040 33% 66%, #1840a8 66% 100%); }
.anime-sm        { background: linear-gradient(135deg, #ff6eb4 0%, #7ec8e3 50%, #ffe066 100%); }
.graffiti-sm     { background: linear-gradient(135deg, #111 0%, #ff2d55 25%, #ffcc00 55%, #00d4ff 80%, #111 100%); }
.cinematic-sm    { background: linear-gradient(135deg, #0d0d0d 0%, #8b5a1a 45%, #f5c842 75%, #fff7d6 100%); }
.motivational-sm { background: linear-gradient(135deg, #000 0%, #1a0a2e 35%, #7c3aed 70%, #f97316 100%); }
.sportsgraphic-sm{ background: linear-gradient(135deg, #000 0%, #1a1a1a 30%, #888 60%, #fff 100%); }
.graphicposter-sm{ background: linear-gradient(135deg, #c0392b 0% 33%, #f0e8d0 33% 66%, #1a4a6b 66% 100%); }
.sportsposter-sm { background: linear-gradient(135deg, #1a3a6b 0% 45%, #f0e8d0 45% 75%, #2d6a4f 75% 100%); }
.photo-sm        { background: linear-gradient(135deg, #87CEEB 0%, #d4a876 40%, #4a7a3a 100%); }
.none-sm         { background: var(--surface2); border: 1px solid var(--border); }
.nostyle-sm      { background: var(--surface2); border: 1px dashed var(--border-dark); }

/* ── Image format picker (create page) ── */
.format-picker {
  margin-bottom: 16px;
}
.format-picker > label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 8px;
}
.format-opts {
  display: flex;
  gap: 8px;
}
.format-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-md);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.format-btn:hover { border-color: var(--accent); color: var(--accent); }
.format-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--accent);
}
.format-btn svg { flex-shrink: 0; }
.format-hint {
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

/* Pulse the generate button when format changes and an image exists */
@keyframes nudge-pulse {
  0%   { box-shadow: 0 4px 16px rgba(4,42,64,0.25); }
  50%  { box-shadow: 0 4px 28px rgba(4,42,64,0.55); }
  100% { box-shadow: 0 4px 16px rgba(4,42,64,0.25); }
}
.btn-generate.nudge {
  animation: nudge-pulse 1s ease-in-out 3;
}

/* ── Landscape-incompatible style buttons ── */
.style-btn.landscape-warn {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.style-btn.landscape-warn.active {
  opacity: 0.35;
  border-color: var(--border);
  background: var(--bg);
  color: var(--text-md);
}

/* Note shown below style grid when incompatible styles exist for landscape */
.landscape-style-note {
  display: none;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  line-height: 1.5;
}
.landscape-style-note.visible { display: block; }

/* ── Text-in-artwork rendering notice ── */
.text-render-notice {
  display: none;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  line-height: 1.5;
}
.text-render-notice.visible { display: block; }

/* (style-category-label removed — categories replaced by horizontal scroll strip) */

/* Photo Inspiration panel layout */
.inspo-upload-block {
  margin-bottom: 24px;
}
.inspo-upload-block .upload-area {
  margin-bottom: 10px;
  min-height: 140px;
}
.inspo-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  min-height: 38px;
  line-height: 1.5;
}
.inspo-input:focus {
  outline: none;
  border-color: var(--accent);
}
.section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-md);
  margin-bottom: 10px;
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-sm);
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--bg);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent);
  background: var(--surface2);
}
.upload-placeholder { text-align: center; padding: 24px; pointer-events: none; }
.upload-icon { font-size: 28px; display: block; margin-bottom: 8px; opacity: 0.4; }
.upload-placeholder p { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.upload-placeholder small { font-size: 11px; color: var(--muted); opacity: 0.7; }
#photo-preview { width: 100%; height: auto; max-height: 260px; object-fit: contain; display: block; }

/* ── AI Engine picker ── */
.engine-picker {
  margin-bottom: 12px;
}
.engine-picker > label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 8px;
}
.engine-opts {
  display: flex;
  gap: 8px;
}
.engine-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-md);
  cursor: pointer;
  transition: all 0.15s;
}
.engine-btn:hover { border-color: var(--accent); color: var(--text); }
.engine-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--accent);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.engine-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--border);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.engine-tag-hot {
  background: linear-gradient(135deg, #D4AF38, #F5C842);
  color: #fff;
}
.engine-btn.active .engine-tag { background: rgba(46,196,182,0.12); color: var(--accent); }
.engine-btn.active .engine-tag-hot { background: linear-gradient(135deg, #D4AF38, #F5C842); color: #fff; }

/* Generate + Vary row */
/* ── Sticky generate bar ── */
.create-sticky-bottom {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding: 12px 0 max(16px, env(safe-area-inset-bottom, 16px));
  z-index: 30; /* must beat style-strip stacking contexts */
  border-top: 1px solid var(--border);
  margin-top: 8px;
  isolation: isolate; /* own stacking context */
  /* Force a GPU compositor layer so iOS Safari composites this ABOVE
     any transform-accelerated thumbnail images in the style strip */
  transform: translateZ(0);
}

.generate-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.generate-row .btn-generate { flex: 1; width: auto; }

/* Pricing hint below generate */
.create-price-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 7px;
  letter-spacing: 0.1px;
}

/* Post-generation art reveal animation */
@keyframes artReveal {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
#result-img.just-revealed {
  animation: artReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 🎲 Vary button */
.btn-vary {
  flex-shrink: 0;
  width: 48px;
  background: var(--surface2);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-vary:hover { border-color: var(--accent); background: var(--surface2); transform: scale(1.08); }
.btn-vary:disabled { opacity: 0.38; cursor: not-allowed; }

/* Generate button */
.btn-generate {
  width: 100%;
  padding: 15px;
  background: var(--ocean);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(4,42,64,0.25);
  font-family: inherit;
}
.btn-generate:hover { background: var(--ocean-h); transform: translateY(-1px); }
.btn-generate:active { transform: translateY(0); }
.btn-generate:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Sticky bottom bar (format selector + generate button) ── */
/* ── Inspire me CTA (shown when textarea is empty) ── */
.inspire-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 16px;
  margin-top: 10px;
  background: rgba(46,196,182,0.07);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  letter-spacing: 0.1px;
}
.inspire-cta:hover { background: rgba(46,196,182,0.14); }
.inspire-cta.active { background: rgba(46,196,182,0.18); border-style: solid; }
.inspire-cta.hidden { display: none; }

/* ── First-time onboarding tooltips ── */
.tip-bubble {
  /* position/top/left/width set by JS */
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--ocean);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-md);
  z-index: 9999;
  pointer-events: none; /* don't intercept clicks on elements below */
  animation: tipIn 0.22s ease-out;
}
.tip-bubble::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 20px;
  border: 6px solid transparent;
  border-bottom-color: var(--ocean);
}
@keyframes tipIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tip-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 4px;
  animation: tipPulse 1.4s ease-in-out infinite;
}
@keyframes tipPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}
.tip-text { flex: 1; }
.tip-skip {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
  white-space: nowrap;
  align-self: flex-start;
  pointer-events: auto; /* re-enable clicks for skip button despite parent pointer-events:none */
}
.tip-skip:hover { color: #fff; }

/* ── Quick-start prompt chips ── */

/* ── Right: Preview + Editor ── */
.preview-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.preview-empty {
  flex: 1;
  display: flex;
  align-items: flex-start; /* top-align so thumbnails never visually align with sticky generate bar */
  justify-content: center;
  padding-top: 48px;
}
.preview-empty-inner {
  text-align: center;
  padding: 40px;
}
.empty-icon {
  font-size: 48px;
  color: var(--border-dark);
  margin-bottom: 16px;
}
.preview-empty-inner h3 {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  margin-bottom: 8px;
}
.preview-empty-inner p { font-size: 14px; color: var(--muted); }

/* ── Inspiration gallery (empty state) ── */
.preview-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.insp-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.68;
  transition: opacity 0.2s;
  display: block;
}
.insp-img:hover { opacity: 0.86; }
.preview-insp-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
  letter-spacing: 0.3px;
}

.preview-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── Variations picker ───────────────────── */
.variations-picker {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 8px;
  overflow-y: auto;
  min-height: 0;
}
.variations-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 12px;
  text-align: center;
}
.variations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.variation-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
  aspect-ratio: 1;
  background: var(--surface);
}
.variation-card.portrait { aspect-ratio: 4/5; }
.variation-card.landscape { aspect-ratio: 5/4; }
.variation-card:hover { border-color: var(--accent); transform: scale(1.01); }
.variation-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.variation-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.variation-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.variation-card:hover .variation-overlay { opacity: 1; }
.variation-card.selected .variation-overlay {
  opacity: 1;
  background: rgba(46,196,182,0.2);
}
.variation-select-text {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 4px;
  padding: 4px 9px;
}
.variation-card.selected .variation-select-text { display: none; }
.variation-checkmark {
  display: none;
  font-size: 26px;
  color: var(--accent);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.variation-card.selected .variation-checkmark { display: block; }
.variations-retry {
  width: 100%;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 9px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-top: auto;
}
.variations-retry:hover { border-color: var(--accent); color: var(--accent); }

.btn-change-variation {
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0 0;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: color 0.15s;
}
.btn-change-variation:hover { color: var(--accent); }

.image-wrap {
  position: relative;
  background: var(--bg);
  flex: 1;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#result-img, #preview-art {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.1s;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
/* Re-enable pointer events on the wrapper so hover/click on the panel still works */
.image-wrap, .preview-col {
  pointer-events: all;
}

/* Revised prompt notice */
.revised-prompt-notice {
  margin: 10px 16px 0;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--text-md);
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.revised-prompt-notice.hidden { display: none; }
.revised-prompt-notice strong { color: var(--accent); }
.revised-prompt-notice em { color: var(--muted); font-style: normal; }
.revised-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

.image-loading {
  position: absolute;
  inset: 0;
  background: rgba(4,42,64,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 260px;
}
.big-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(255,255,255,0.15);
  border-top-color: #2EC4B6;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loading-label {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  min-height: 40px;
}
.loading-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
}
.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, var(--accent));
  border-radius: 99px;
  transition: width 1s ease;
}
.loading-timer {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

/* ── Loading step list ─────────────────────── */
.loading-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.loading-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  min-height: 28px;
  transition: opacity 0.5s ease;
}
.loading-step[data-state="pending"] { opacity: 0.28; }
.loading-step[data-state="active"]  { opacity: 1; }
.loading-step[data-state="done"]    { opacity: 0.5; }
.step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  justify-self: center;
}
.loading-step[data-state="done"] .step-icon {
  background: #4ade80;
  color: #fff;
}
.loading-step[data-state="active"] .step-icon {
  background: var(--accent);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.loading-step[data-state="pending"] .step-icon {
  border: 1.5px solid rgba(255,255,255,0.25);
}
.step-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
  align-self: center;
}
.loading-step[data-state="done"]    .step-label,
.loading-step[data-state="pending"] .step-label {
  color: rgba(255,255,255,0.45);
}
.loading-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  text-align: center;
  margin: 2px 0 0;
  min-height: 14px;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.15); opacity: 0.85; }
}

/* Editor toolbar */
/* ── Editor Toolbar ─────────────────────────── */
.editor-toolbar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Row layout shared by both rows */
.editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Row 1: Refine input stretches full width */
.editor-row-refine {
  width: 100%;
}
.refine-input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s;
  min-width: 0;
}
.refine-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,196,182,0.12);
}
.refine-input::placeholder { color: #B0ADA8; }

/* Row 2: Style group + divider + sliders group */
.editor-row-tools {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  flex-wrap: wrap;
  gap: 10px;
}
.editor-tool-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.editor-tool-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.editor-sliders {
  flex-wrap: nowrap;
  gap: 6px;
}
.editor-sliders input[type="range"] {
  width: 70px;
  accent-color: var(--accent);
  cursor: pointer;
  height: 3px;
  flex-shrink: 0;
}
.slider-val {
  font-size: 11px;
  color: var(--muted);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}
.editor-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.restyle-select {
  padding: 7px 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.15s;
  max-width: 160px;
}
.restyle-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,196,182,0.12); }

.editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-md);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.editor-btn:hover { border-color: var(--accent); color: var(--accent); }
.editor-btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.editor-btn-accent:hover { background: var(--accent-h); border-color: var(--accent-h); }
.editor-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 7px 8px;
}
.editor-btn-ghost:hover { border-color: var(--border); color: var(--text-md); }

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.preview-actions .btn-primary { flex: 1; justify-content: center; border-radius: var(--radius-sm); }
.preview-actions .btn-secondary { border-radius: var(--radius-sm); white-space: nowrap; }

/* Save Draft button */
.btn-save-draft {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-save-draft:hover { border-color: var(--ocean); color: var(--ocean); background: rgba(4,42,64,0.04); }

/* Auth modal */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-modal-overlay.hidden { display: none; }
.auth-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}
.auth-icon { font-size: 32px; margin-bottom: 12px; }
.auth-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.auth-sub { font-size: 14px; color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.auth-fine { font-size: 12px; color: #aaa; margin-top: 16px; }
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.auth-input:focus { border-color: var(--ocean); }
.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--ocean);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-submit-btn:hover { background: var(--ocean-h); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-error { font-size: 13px; color: #e55; margin-top: 10px; }
.auth-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.auth-close:hover { color: var(--text); }

/* Draft saved toast */
.draft-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  z-index: 1100;
  box-shadow: 0 8px 32px rgba(4,42,64,0.35);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
}
.draft-toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
}

/* ════════════════════════════════════════
   CUSTOMIZE PAGE
   ════════════════════════════════════════ */
.customize-main {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: calc(100vh - 68px);
  overflow: hidden;
}

/* ── Left preview panel ── */
.customize-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow-y: auto;
  background: #F5F4F0;
  transition: background 0.4s ease;
}

/* ── Wall mockup ── */
.wall-mockup {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wall-surface {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.4s ease;
  background: inherit;
  background-image: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.35) 0%, transparent 70%);
}

.wall-baseboard {
  height: 14px;
  background: rgba(0,0,0,0.07);
  transition: background 0.4s;
  flex-shrink: 0;
}

.wall-floor {
  height: 60px;
  background: rgba(0,0,0,0.10);
  transition: background 0.4s;
  flex-shrink: 0;
}

/* ── Mockup frame ── */
.mockup-frame {
  display: inline-block; /* shrink-wraps tightly around the mat-layer + img */
  padding: 14px;
  background: #1a1a1a;
  border-radius: 0;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.15),
    0 8px 24px rgba(0,0,0,0.20),
    0 24px 64px rgba(0,0,0,0.18);
  transition: all 0.35s ease;
}
.mockup-frame.frame-white {
  background: #F8F5F0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.12), 0 24px 64px rgba(0,0,0,0.10), inset 0 0 0 1px rgba(0,0,0,0.08);
}
.mockup-frame.frame-wood {
  background: linear-gradient(160deg, #C8986A 0%, #8B5A30 50%, #C0905A 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.25), 0 24px 64px rgba(0,0,0,0.2);
}
.mockup-frame.frame-gold {
  background: linear-gradient(160deg, #E0C060 0%, #B89A20 50%, #D8B840 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 8px 24px rgba(0,0,0,0.2), 0 24px 64px rgba(0,0,0,0.18);
}
.mockup-frame.frame-none {
  padding: 0;
  background: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.18), 0 24px 64px rgba(0,0,0,0.15);
}

.mockup-frame img {
  display: block;
  /* Dimensions set dynamically by updateMockupSize().
     Default matches portrait DALL-E ratio (1024×1792 ≈ 0.571:1) */
  width: 106px;
  height: 185px;
  object-fit: cover;
  transition: width 0.35s ease, height 0.35s ease;
}
/* Override the generic #preview-art rule (object-fit:contain, max-width:100%)
   which has higher ID specificity and would otherwise leave white space
   when the frame orientation differs from the image's natural ratio. */
.mockup-frame #preview-art {
  object-fit: cover;
  max-width: none;
  max-height: none;
}

/* Mat layer — sits between frame border and the photo */
.mat-layer {
  display: block;
  font-size: 0;     /* kill any inline text-baseline gap */
  line-height: 0;
  transition: padding 0.3s ease, background 0.3s ease;
}

/* ── Size guide ── */
.size-guide {
  padding: 16px 20px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.size-guide-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.size-guide-inner {
  width: 100%;
  max-width: 220px;
}

#size-svg { width: 100%; height: auto; }

/* ── Wall color picker ── */
/* Orientation toggle in the wall mockup panel */
.mockup-orient-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 20px 4px;
  width: 100%;
}
.mockup-orient-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-md);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.mockup-orient-btn:hover  { border-color: var(--accent); color: var(--accent); }
.mockup-orient-btn.active { border-color: var(--accent); background: var(--surface2); color: var(--accent); }

.wall-picker {
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.wall-picker-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.wall-color-opts {
  display: flex;
  gap: 8px;
}

.wall-color-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  outline: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.wall-color-btn:nth-child(1) { background: #F5F4F0; }
.wall-color-btn:nth-child(2) { background: #EAE5DC; }
.wall-color-btn:nth-child(3) { background: #DDE0E4; }
.wall-color-btn:nth-child(4) { background: #2C2C34; }
.wall-color-btn:nth-child(5) { background: #D8E4D8; }
.wall-color-btn:nth-child(6) { background: #EAD8C8; }
.wall-color-btn:hover { transform: scale(1.15); }
.wall-color-btn.active {
  border-color: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent);
}

/* ── Orientation picker ── */
.orient-opts {
  display: flex;
  gap: 8px;
}

.orient-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-md);
  transition: all 0.15s;
  flex: 1;
}
/* Hover: subtle background only — no teal border, so it can't be confused with active */
.orient-btn:not(.active):hover { background: var(--surface2); color: var(--text); }
.orient-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--accent);
}
.orient-icon { display: flex; align-items: center; justify-content: center; color: inherit; }

/* ── Image filter presets ── */
.filter-presets-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.filter-advanced-toggle {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0 4px 6px;
  white-space: nowrap;
  font-family: inherit;
  transition: color 0.15s;
  flex-shrink: 0;
}
.filter-advanced-toggle:hover { color: var(--accent); }
.filter-advanced-toggle.open  { color: var(--accent); }

.filter-btn {
  padding: 6px 13px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-md);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── Filter sliders ── */
.filter-sliders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  max-height: 200px;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.2s ease;
  opacity: 1;
  margin-top: 0;
}
.filter-sliders-collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.slider-row {
  display: grid;
  grid-template-columns: 80px 1fr 36px;
  align-items: center;
  gap: 10px;
}

.slider-row label {
  font-size: 12px;
  color: var(--text-md);
  font-weight: 500;
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.slider-val {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Frame dot swatches (configurator) ── */
.frame-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  border: 1.5px solid rgba(0,0,0,0.10);
}

/* Configurator panel */
.configurator {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 40px 36px;
  overflow-y: auto;
}

.config-header {
  margin-bottom: 32px;
}
.config-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.config-header p { font-size: 14px; color: var(--muted); }

.config-section { margin-bottom: 28px; }

.config-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-note {
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-md);
  opacity: 0;
  transition: opacity 0.2s;
  font-style: italic;
}

/* Frame section — unavailable state (canvas / metal selected) */
#frame-section.frame-unavailable .frame-opts {
  opacity: 0.3;
  pointer-events: none;
}
#frame-section.frame-unavailable .config-note {
  opacity: 1;
  color: var(--text-md);
  font-weight: 600;
  font-size: 11px;
}
#frame-section.frame-unavailable .config-label {
  color: var(--muted);
}

.config-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}

/* Size options */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
}
.option-btn strong { font-size: 14px; color: var(--text); }
.option-btn span { font-size: 12px; color: var(--muted); }
.option-btn:hover { border-color: var(--accent); }

/* Recommended size badge */
.option-btn-recommended { position: relative; }
.size-recommended-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 9px !important;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Customize page trust strip */
.customize-trust-line {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.5;
}
.option-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.option-btn.active strong { color: var(--accent); }
.option-btn:disabled,
.option-btn.unavailable {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}

/* Material options */
.material-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.material-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.mat-icon { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.mat-info { display: flex; flex-direction: column; gap: 2px; }
.mat-info strong { font-size: 14px; color: var(--text); }
.mat-info span { font-size: 12px; color: var(--muted); }
.mat-best { font-size: 11px !important; color: var(--text-md) !important; font-style: italic; margin-top: 1px; }
.material-opt:hover { border-color: var(--accent); }
.material-opt.active {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.material-opt.active .mat-info strong { color: var(--accent); }
.material-opt:disabled, .material-opt[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Frame options */
.frame-opts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.frame-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-md);
}
.frame-opt-btn:hover { border-color: var(--accent); }
.frame-opt-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 0 0 1.5px var(--accent);
  color: var(--accent);
}
.frame-opt-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Mat / padding options ── */
.mat-options {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.mat-sub-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  margin-bottom: 8px;
}
.mat-size-opts {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.mat-size-btn {
  flex: 1;
  padding: 7px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.mat-size-btn:hover  { border-color: var(--accent); color: var(--accent); }
.mat-size-btn.active { border-color: var(--accent); color: var(--accent); background: var(--surface2); }
.mat-color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mat-color-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.mat-color-btn:hover  { border-color: var(--accent); }
.mat-color-btn.active { border-color: var(--accent); transform: scale(1.18); }
.mat-color-btn[data-mat-color="white"] { background: #FFFFFF; }
.mat-color-btn[data-mat-color="cream"] { background: #F5F0E8; }
.mat-color-btn[data-mat-color="black"] { background: #1C1C1C; }

.frame-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
}
.fd-none  { background: var(--bg); border: 2px dashed var(--border-dark); }
.fd-black { background: #1a1a1a; }
.fd-white { background: #f5f0eb; border-color: #ccc; }
.fd-wood  { background: linear-gradient(135deg, #c09060, #8b5a30); }
.fd-gold  { background: linear-gradient(135deg, #d4af37, #b8960c); }

/* ── Frame profile buttons ── */
.profile-opts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-md);
  transition: all 0.15s;
  line-height: 1.4;
  text-align: center;
}
.profile-btn em   { color: var(--muted); font-style: normal; display: block; }
.profile-btn strong { color: var(--text-md); font-weight: 600; }
.profile-btn:hover { border-color: var(--accent); }
.profile-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--accent);
}
.profile-btn.active em     { color: var(--accent); opacity: 0.7; }
.profile-btn.active strong { color: var(--accent); }

/* Frame thickness preview diagrams */
.fp-preview {
  width: 36px;
  height: 28px;
  background: linear-gradient(135deg, #4a90d9 0%, #7bc8c8 60%, #c8e89a 100%);
  flex-shrink: 0;
  border-radius: 1px;
}
.fp-slim    { border: 3px solid #1a1a1a; }
.fp-classic { border: 7px solid #1a1a1a; }
.fp-gallery { border: 11px solid #1a1a1a; }
/* Floater: thin frame with a visible gap around the image */
.fp-floater {
  border: 6px solid #1a1a1a;
  box-shadow: inset 0 0 0 3px #f0ede8;
}
.profile-btn.active .fp-slim,
.profile-btn.active .fp-classic,
.profile-btn.active .fp-gallery { border-color: var(--accent); }
.profile-btn.active .fp-floater { border-color: var(--accent); box-shadow: inset 0 0 0 3px rgba(46,196,182,0.15); }

/* ── Mat/padding option buttons ── */
.mat-opts {
  display: flex;
  gap: 10px;
}
.mat-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-md);
  transition: all 0.15s;
  flex: 1;
}
.mat-opt-btn em { color: var(--muted); font-style: normal; font-size: 11px; }
.mat-opt-btn:hover { border-color: var(--accent); }
.mat-opt-btn.active {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--accent);
}
.mat-opt-btn.active em { color: var(--accent); opacity: 0.7; }

/* Small visual diagram showing frame + mat + photo */
.mat-preview {
  width: 40px;
  height: 32px;
  background: #1a1a1a;       /* frame color */
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mp-none  { padding: 3px; }
.mp-thin  { padding: 5px; }
.mp-wide  { padding: 8px; }
.mp-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4a90d9 0%, #7bc8c8 50%, #c8e89a 100%);
  border-radius: 1px;
}
/* None preview: no mat gap (image flush to frame) */
.mp-none .mp-img { background: linear-gradient(135deg, #4a90d9 0%, #7bc8c8 50%, #c8e89a 100%); }
/* Thin/wide: show white mat layer between frame and image */
.mp-thin .mp-img,
.mp-wide .mp-img {
  outline: 2px solid #F5F3ED;
  outline-offset: -2px;
}

/* Price block */
.price-block {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.price-breakdown {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-md);
}

.price-shipping { color: var(--text-md); }
.price-shipping.is-free { color: var(--success); }

.price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.btn-checkout {
  width: 100%;
  padding: 17px;
  background: var(--ocean);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(4,42,64,0.28);
  font-family: inherit;
  margin-bottom: 14px;
}
.btn-checkout:hover { background: var(--ocean-h); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(4,42,64,0.38); }
.btn-checkout:active { transform: translateY(0); }
.btn-checkout:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }

.checkout-trust {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════
   SUCCESS PAGE
   ════════════════════════════════════════ */
.success-page {
  height: auto;
  overflow: auto;
}
.success-main {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.success-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-weight: 900;
}

.success-card h1 {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.success-sub {
  font-size: 16px;
  color: var(--text-md);
  line-height: 1.6;
  margin-bottom: 32px;
}

.success-order {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 32px;
  text-align: left;
  flex-direction: column;
}

.order-img-wrap {
  height: 220px;
  overflow: hidden;
}
.order-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-details { padding: 20px; }

.order-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-md);
}
.order-row:last-child { border-bottom: none; }
.order-status { color: var(--success); font-weight: 700; }

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.success-guarantee {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 14px;
  text-align: left;
}
.success-guarantee strong { display: block; margin-bottom: 6px; }
.success-guarantee p { color: var(--text-md); line-height: 1.5; }
.success-guarantee a { color: var(--accent); }

/* ════════════════════════════════════════
   SHARED
   ════════════════════════════════════════ */
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: #FFF2F0;
  border: 1px solid #FFCDC5;
  border-radius: var(--radius-xs);
  color: #CC3311;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  gap: 7px;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}
.error-tip {
  font-size: 12px;
  font-weight: 400;
  color: #a02200;
  opacity: 0.85;
  font-style: italic;
}

.hidden { display: none !important; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
  .landing .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-gallery { justify-content: flex-start; }
  .materials-grid { grid-template-columns: repeat(2, 1fr); }
  .styles-grid { grid-template-columns: repeat(2, 1fr); }
  .styles-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .styles-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .guarantee-strip { grid-template-columns: 1fr; }
  .guarantee-item { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .step-art-grid img { aspect-ratio: 1; }
  .section { padding: 60px 20px; }
  .create-main { grid-template-columns: 1fr; }
  .create-panel { border-right: none; border-bottom: 1px solid var(--border); max-height: none; overflow-y: visible; }
  .customize-main { grid-template-columns: 1fr; overflow: visible; min-height: auto; }
  /* Sticky preview — stays pinned below the nav as you scroll the options */
  .customize-preview {
    display: flex;
    position: sticky;
    top: 56px; /* nav height on mobile */
    z-index: 10;
    max-height: 42vh;
    min-height: 220px;
    border-bottom: 1px solid var(--border);
  }
  /* Hide non-essential preview chrome on mobile to maximise artwork space */
  .customize-preview .size-guide,
  .customize-preview .wall-picker,
  .customize-preview .wall-baseboard,
  .customize-preview .wall-floor { display: none; }
  .steps { flex-direction: column; }
  .step-divider { width: 100%; height: 1px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .app-page { height: auto; overflow: auto; }

  /* ── Create page: fixed sticky bar on mobile ──────────────────────────────
     position:sticky is unreliable on iOS Safari when compositor layers are
     created by animated siblings (inspire panel opacity, etc.). Using
     position:fixed is the only bulletproof solution — it puts the bar in
     the root compositor layer, guaranteed above all page content.        */
  .create-sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 10px 16px max(14px, env(safe-area-inset-bottom, 14px));
    transform: none; /* override the translateZ(0) set above */
  }
  /* Give elements extra scroll clearance so the fixed bar never covers them.
     scroll-margin-bottom is respected by scrollIntoView (including Playwright). */
  html { scroll-padding-bottom: 110px; }
  .btn-save-draft, #btn-customize, #btn-generate { scroll-margin-bottom: 110px; }
  #panel-generate,
  #panel-room,
  #panel-style,
  .preview-panel {
    padding-bottom: 110px;
  }

  /* ── App nav ── */
  .nav-app { padding: 0 16px; height: 56px; }
  .nav-steps { font-size: 11px; gap: 5px; }
  .nav-step-arrow { font-size: 10px; }
  .nav-back { font-size: 12px; }

  /* ── Create page: hide empty preview state — only show when image is ready ── */
  #preview-empty { display: none; }
  .preview-panel { min-height: 0; max-height: none; }
  /* When result is visible, give it breathing room */
  .preview-panel:has(#preview-result:not(.hidden)) { min-height: 280px; padding-bottom: 16px; }

  /* ── Tab: prevent text wrap, shrink slightly ── */
  .tab { font-size: 13px; padding: 10px 8px; white-space: nowrap; }

  /* ── Create panel: compact header on mobile ── */
  .panel-header { margin-bottom: 16px; }
  .panel-header h1 { font-size: 22px; }
  .create-panel { padding: 20px 16px; }

  /* ── Textarea: 3 rows on mobile to show more styles above fold ── */
  #prompt { min-height: 80px; }

  /* Style picker is now a horizontal scroll strip — no grid overrides needed */

  /* ── Configurator panel ── */
  .configurator { padding: 24px 20px; }
  .config-header { margin-bottom: 24px; }
  .config-header h1 { font-size: 22px; }
  .config-section { margin-bottom: 20px; }

  /* ── Success page ── */
  .success-main { padding: 24px 16px; min-height: auto; }
  .success-card { padding: 28px 20px; }
  .success-card h1 { font-size: 26px; }
  .success-sub { font-size: 14px; }

  /* Stack hero CTA buttons on narrow screens */
  .hero-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { text-align: center; }

  /* Trust bar: hide pipes, stack vertically */
  .trust-bar { flex-direction: column; gap: 8px; padding: 20px 16px; text-align: center; }
  .trust-bar span { font-size: 13px; }
  .trust-bar span:nth-child(even) { display: none; } /* hides the | separators */

  /* ── Homepage: section padding + CTA section ── */
  .cta-section { padding: 60px 20px; }
  .footer { padding: 48px 20px 28px; }

  /* ── Homepage hero: reduce padding, show single centred frame ── */
  .landing .hero { padding: 36px 20px 44px; }
  .hero-headline { letter-spacing: -1px; }
  .hero-sub { font-size: 16px; margin-bottom: 24px; }
  .hero-gallery .gallery-col { display: none; } /* hide right column with two small frames */
  .gallery-frame-label { display: none; } /* single frame on mobile — labels not needed */
  .hero-gallery { justify-content: center; margin-top: 8px; }
  .gallery-frame.frame-tall {
    width: 175px; height: 260px;
    border-radius: 0; /* sharp corners = picture frame, not tablet */
    /* Black picture frame: inner liner → black moulding → edge highlight */
    box-shadow:
      0 0 0 2px #3a3a3a,
      0 0 0 20px #111111,
      0 0 0 22px #444444,
      0 20px 48px rgba(0,0,0,0.5);
  }

  /* ── Homepage frame lab: stack to single column ── */
  .frame-lab { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; }
  .fl-wall { aspect-ratio: 4/3; max-height: 250px; }
  .fl-frame img { width: 150px; height: 150px; }
  .fl-cta-btn { align-self: stretch; }
  .fl-cta-btn .btn-primary { width: 100%; justify-content: center; }

  /* ── Create page: generate button stays at bottom (natural document order) ── */
}


/* ═══════════════════════════════════════════════════
   CHECKOUT PAGE
   ═══════════════════════════════════════════════════ */

.co-main {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 60px);
}

/* ── Left: Order summary ── */
.co-summary {
  background: #f5f4f0;
  border-right: 1px solid #e8e5de;
  padding: 36px 32px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.co-thumb-wrap {
  background: #eae9e4;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.co-thumb-loading {
  min-height: 200px;
  background: linear-gradient(90deg, #eae9e4 25%, #f0efe9 50%, #eae9e4 75%);
  background-size: 200% 100%;
  animation: co-thumb-shimmer 1.4s infinite;
}

.co-thumb-loading .co-thumb {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.co-thumb-loading.loaded .co-thumb {
  opacity: 1;
}

@keyframes co-thumb-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.co-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.co-order-label {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.co-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}
.co-meta span {
  font-size: 13px;
  color: #7a7570;
  line-height: 1.5;
}

.co-divider {
  border: none;
  border-top: 1px solid #e0ddd8;
  margin-bottom: 16px;
}

.co-price-rows { margin-bottom: 8px; }

.co-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: #5a5550;
  padding: 4px 0;
}

.co-free { color: #2d7d46; font-weight: 500; }
.co-delivery { color: #5a5550; font-size: 12px; }
.co-delivery-row { border-top: 1px dashed #e0ddd8; margin-top: 4px; padding-top: 8px; }

.co-price-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  border-top: 1.5px solid #e0ddd8;
  padding-top: 12px;
  margin-bottom: 20px;
}

.co-security {
  margin-top: auto;
  font-size: 11.5px;
  color: #9a9590;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

/* ── Right: Form panel ── */
.co-form-panel {
  padding: 40px 52px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}

.co-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  gap: 16px;
  color: #7a7570;
  font-size: 14px;
}

.co-init-error {
  padding: 32px 0;
  color: #c0392b;
  font-size: 15px;
  line-height: 1.7;
}
.co-init-error a { color: var(--accent); }

.co-form { max-width: 500px; }

.co-section { margin-bottom: 32px; }

.co-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e5de;
  letter-spacing: 0.01em;
}

.co-field { margin-bottom: 12px; }

.co-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #5a5550;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.co-input, .co-select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #e0ddd8;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.co-input:focus, .co-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.co-input::placeholder { color: #b8b4ae; }

.co-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.co-row { display: flex; gap: 10px; }
.co-field-grow { flex: 1; }
.co-field-sm { flex: 0 0 76px; }

#payment-element { margin-top: 4px; }

.co-payment-error {
  margin-top: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #c0392b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
}

.btn-place-order {
  position: relative;
  width: 100%;
  background: #e84532;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}

.btn-place-order:hover:not(:disabled) { background: #c93928; }
.btn-place-order:active:not(:disabled) { transform: scale(0.99); }
.btn-place-order:disabled { opacity: 0.65; cursor: default; }

.co-fine-print {
  font-size: 11.5px;
  color: #9a9590;
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

/* ── Mobile ── */
@media (max-width: 800px) {
  .co-main { grid-template-columns: 1fr; }
  .co-summary {
    position: static;
    height: auto;
    padding: 24px 20px;
  }
  .co-thumb-wrap { max-height: none; }
  .co-form-panel {
    padding: 24px 20px;
    max-height: none;
  }
  .co-form { max-width: none; }
}

/* ── Checkout additions: promo, two-step, address summary ── */
.co-optional { font-size: 12px; font-weight: 400; color: #9a9590; }

.co-promo-row { display: flex; gap: 8px; }
.co-promo-input { flex: 1; text-transform: uppercase; letter-spacing: 0.05em; }
.co-promo-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border: 1.5px solid #e0ddd8;
  border-radius: 8px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.co-promo-btn:hover:not(:disabled) { background: #f5f4ff; border-color: var(--accent); }
.co-promo-btn:disabled { opacity: 0.5; cursor: default; }

.co-promo-result { font-size: 13px; margin-top: 8px; padding: 8px 12px; border-radius: 6px; }
.co-promo-success { background: #f0faf4; color: #2d7d46; border: 1px solid #bbf0cc; }
.co-promo-error   { background: #fef2f2; color: #c0392b; border: 1px solid #fecaca; }

.co-promo-label { color: #2d7d46; }
.co-discount-row { color: #2d7d46; }
.co-discount-amt { color: #2d7d46; font-weight: 600; }
.co-promo-badge  { color: #2d7d46; font-size: 12px; margin-top: 2px; }

.co-pending { color: #b8b4ae; font-size: 12px; font-style: italic; }

.co-total-note {
  font-size: 11.5px;
  color: #9a9590;
  margin-top: -10px;
  margin-bottom: 12px;
  text-align: right;
}

.co-continue-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #c0392b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.btn-continue {
  position: relative;
  width: 100%;
  background: var(--ocean);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}
.btn-continue:hover:not(:disabled) { background: #4338ca; }
.btn-continue:active:not(:disabled) { transform: scale(0.99); }
.btn-continue:disabled { opacity: 0.65; cursor: default; }

/* Address summary card in step 2 */
.co-addr-summary { margin-bottom: 24px; }
.co-addr-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #f5f4f0;
  border: 1.5px solid #e0ddd8;
  border-radius: 10px;
  padding: 14px 16px;
  gap: 12px;
}
.co-addr-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
  color: #5a5550;
  line-height: 1.5;
}
.co-addr-details strong { color: #1a1a1a; font-weight: 600; }
.co-addr-edit {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.co-addr-edit:hover { text-decoration: underline; }

.co-back-btn {
  display: block;
  background: none;
  border: none;
  color: #7a7570;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-top: 16px;
  text-align: center;
  width: 100%;
}
.co-back-btn:hover { color: var(--accent); }

/* ── Address autocomplete dropdown ──────────────────────────────────────── */
.co-field-autocomplete {
  position: relative;
}

.co-suggestions {
  position: fixed; /* fixed so it never gets clipped by overflow:auto parents */
  /* top / left / width set dynamically by JS */
  background: #fff;
  border: 1.5px solid var(--ocean);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.13);
  z-index: 9999;
  max-height: 290px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.co-suggestions.hidden { display: none; }

.co-suggestion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f2ede8;
  transition: background 0.08s;
}
.co-suggestion:last-child { border-bottom: none; }
.co-suggestion:first-child { border-radius: 8px 8px 0 0; }
.co-suggestion:last-child  { border-radius: 0 0 8px 8px; }
.co-suggestion:only-child  { border-radius: 8px; }

.co-suggestion:hover,
.co-sugg-active {
  background: #f5f3ff !important;
}

.co-sugg-primary {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-sugg-secondary {
  font-size: 12px;
  color: #7a7570;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-sugg-loading {
  padding: 12px 14px;
  font-size: 13px;
  color: #9a9490;
  text-align: center;
}

/* ── Certificate of Authenticity ─────────────────────────────────────────── */
.cert-wrap {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cert-wrap.hidden { display: none; }

.cert {
  width: 100%;
  max-width: 560px;
  background: #fffdf8;
  border: 1.5px solid #e8e2d8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  font-family: 'Inter', system-ui, sans-serif;
  position: relative;
}

/* Subtle inner border line for premium look */
.cert::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid #e8e2d8;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.cert-header {
  background: #1a1a1a;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.cert-logo {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.cert-logo span { color: #a5b4fc; }

.cert-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5b4fc;
  opacity: 0.9;
}

.cert-art-wrap {
  position: relative;
  z-index: 1;
  background: #f2ede8;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 280px;
  overflow: hidden;
}
.cert-art {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}

.cert-body {
  padding: 24px 28px 28px;
  position: relative;
  z-index: 1;
}

.cert-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0 0 4px;
}
.cert-subtitle {
  font-size: 12.5px;
  color: #7a7570;
  margin: 0 0 20px;
  line-height: 1.5;
}

.cert-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.cert-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
}
.cert-field-label {
  flex-shrink: 0;
  width: 90px;
  font-weight: 600;
  color: #5a5550;
  padding-top: 1px;
}
.cert-field-value {
  color: #1a1a1a;
  line-height: 1.5;
}
.cert-id {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.cert-field-prompt { align-items: flex-start; }
.cert-prompt-text {
  font-style: italic;
  color: #3d3830;
  line-height: 1.6;
}

.cert-statement {
  font-size: 11.5px;
  color: #9a9490;
  line-height: 1.6;
  border-top: 1px solid #e8e2d8;
  padding-top: 16px;
  margin-bottom: 16px;
}

.cert-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #b0aaa4;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.cert-dot { opacity: 0.5; }

.cert-print-btn {
  background: none;
  border: 1.5px solid #d0cbc4;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  color: #5a5550;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 28px;
}
.cert-print-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Print styles — hide everything except the certificate ─────────────── */
@media print {
  body * { visibility: hidden !important; }
  .cert, .cert * { visibility: visible !important; }
  .cert {
    position: fixed !important;
    inset: 0 !important;
    max-width: none !important;
    width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .cert::before { display: none !important; }
  .cert-print-btn { display: none !important; }
  .cert-art { max-height: 45vh !important; }
}

.co-input-error { border-color: #c0392b !important; box-shadow: 0 0 0 3px rgba(192,57,43,0.1) !important; }

/* ════════════════════════════════════════
   EXAMPLE GALLERY (Home page)
   ════════════════════════════════════════ */
.section-gallery {
  background: var(--ocean);
  color: #fff;
}
.section-gallery .section-label {
  color: var(--accent);
  border-color: rgba(46,196,182,0.25);
}
.section-gallery .section-title {
  color: #fff;
}
.section-gallery .section-sub {
  color: rgba(255,255,255,0.65);
}

/* Hero gallery: swap CSS placeholders for real imgs */
.gallery-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3-col masonry-like grid */
.eg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

/* First card spans 2 rows for a featured look */
.eg-card {
  background: #073250;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
.eg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(2,20,32,0.6);
}
.eg-featured {
  grid-row: span 2;
}
.eg-img-wrap {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #021828;
}
.eg-featured .eg-img-wrap {
  aspect-ratio: auto;
  height: calc(100% - 82px); /* fill card minus info bar */
}
.eg-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.eg-card:hover .eg-img-wrap img {
  transform: scale(1.04);
}
.eg-info {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eg-style-badge {
  display: inline-block;
  background: rgba(46,196,182,0.14);
  color: #2EC4B6;
  border: 1px solid rgba(46,196,182,0.30);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.eg-prompt {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-cta {
  margin-top: 48px;
  text-align: center;
}
/* CTA inside dark gallery section — use teal so it's visible on ocean bg */
.section-gallery .btn-primary {
  background: var(--accent);
  box-shadow: 0 4px 20px rgba(46,196,182,0.35);
}
.section-gallery .btn-primary:hover {
  background: var(--accent-h);
  box-shadow: 0 8px 28px rgba(46,196,182,0.45);
}

@media (max-width: 900px) {
  .eg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .eg-featured { grid-row: span 1; }
  .eg-featured .eg-img-wrap { aspect-ratio: 1 / 1; height: auto; }
  /* Style picker is now a horizontal scroll strip — no grid overrides needed */
}
@media (max-width: 580px) {
  .eg-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   MOBILE — COLLAPSE NAV STEPS (≤ 640px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Hide step breadcrumb — just logo + back link remains */
  .nav-steps { display: none; }
}

/* ═══════════════════════════════════════════════════
   MOBILE — SMALL PHONES (≤ 480px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Style picker is now a horizontal scroll strip — no grid overrides needed */

  /* Configurator tighter padding */
  .configurator { padding: 18px 14px; }
  .config-header h1 { font-size: 20px; }

  /* Success card tighter */
  .success-card { padding: 20px 14px; border-radius: 12px; }
  .success-card h1 { font-size: 22px; }
  .success-sub { font-size: 13px; }
  .success-actions { flex-direction: column; align-items: stretch; }
  .success-actions .btn-primary,
  .success-actions .btn-secondary { text-align: center; justify-content: center; }

  /* Certificate — tighter on small phones */
  .cert-header { padding: 12px 16px; }
  .cert-logo { font-size: 15px; }
  .cert-badge { font-size: 9px; letter-spacing: 0.08em; }
  .cert-body { padding: 18px 18px 22px; }
  .cert-title { font-size: 18px; }
  .cert-field { font-size: 12.5px; }
  .cert-field-label { width: 76px; }

  /* Hero badge: shrink to fit one line on small phones */
  .hero-badge { font-size: 10px; letter-spacing: 0.3px; padding: 4px 10px; }

  /* Hero pricing: single row — hide shipping text, keep price + guarantee */
  .hero-pricing-line { flex-direction: row; flex-wrap: nowrap; gap: 6px; font-size: 12px; }
  .hero-pricing-dot { display: inline; }
  .hero-from { font-size: 12px; }
  .hero-from strong { font-size: 14px; }
  /* Hide "Free US shipping on most orders" + its following dot on small screens */
  .hero-pricing-line > span:nth-child(3),
  .hero-pricing-line > span:nth-child(4) { display: none; }

  /* Materials: single column on phones */
  .materials-grid { grid-template-columns: 1fr; }

  /* Nav: don't show "Create" CTA text in full on tiny screens */
  .nav-cta { padding: 8px 14px; font-size: 13px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ROOM MATCH
───────────────────────────────────────────────────────────────────────────── */

.room-section {
  margin-bottom: 22px;
}

/* Vibe grid — 2×2 card buttons */
.vibe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vibe-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.vibe-btn:hover {
  border-color: var(--accent);
}

.vibe-btn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.vibe-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}

.vibe-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vibe-info strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.vibe-info small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Color palette grid — 4 per row */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.palette-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 9px 6px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.palette-card:hover {
  border-color: var(--accent);
}

.palette-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.palette-swatches {
  display: flex;
  gap: 3px;
}

.palette-swatches span {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

.palette-card > span {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-md);
  text-align: center;
  line-height: 1.2;
}

/* Art type chips */
.art-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.art-type-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.art-type-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.art-type-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* Results section */
.room-results {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.room-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.room-results-header .section-label {
  margin-bottom: 0;
}

.room-regen-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.room-regen-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* 3-column image grid */
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.room-img-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}

.room-img-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

/* Aspect ratios */
.room-card-square   { aspect-ratio: 1 / 1; }
.room-card-portrait { aspect-ratio: 2 / 3; }
.room-card-landscape{ aspect-ratio: 3 / 2; }

.room-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 30, 46, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
}

.room-img-card:hover .room-card-overlay {
  opacity: 1;
}

.room-card-overlay span {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0 8px;
}

/* Mobile: 2-column grid for room results */
@media (max-width: 520px) {
  .vibe-grid { grid-template-columns: 1fr 1fr; }
  .palette-grid { grid-template-columns: repeat(4, 1fr); }
  .room-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   STYLE BUTTON PREVIEWS
   Injected via JS when /style-examples/{style}.jpg is available.
   Falls back to existing swatch behaviour when image is missing.
───────────────────────────────────────────────────────────────────────────── */

/* Thumbnail image injected into each style button */
.style-btn .style-preview-img {
  display: block;
  width: calc(100% + 4px);   /* bleed to button edges (2px border each side) */
  margin: 0 -2px 0;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius-xs) - 2px) calc(var(--radius-xs) - 2px) 2px 2px;
  flex-shrink: 0;
  /* No transition — avoids pre-emptive compositor layer creation in iOS Safari */
}

.style-btn.has-preview {
  padding: 0 0 6px;
  overflow: hidden;
  gap: 5px;
}


/* ── Floating hover preview card (desktop only) ── */
#style-hover-card {
  position: fixed;
  z-index: 9999;
  width: 210px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.12s;
}

#style-hover-card.hidden {
  opacity: 0;
  visibility: hidden;
}

#style-hover-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

#style-hover-card .shc-meta {
  padding: 9px 12px 11px;
}

#style-hover-card .shc-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

#style-hover-card .shc-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Hide hover card on touch devices where hover doesn't apply */
@media (hover: none) {
  #style-hover-card { display: none !important; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ROOM MATCH — RIGHT PANEL RESULTS
───────────────────────────────────────────────────────────────────────────── */

.room-rp {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  gap: 12px;
}

.room-rp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.room-rp-header span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-md);
}

/* 3×2 grid filling remaining panel height */
.room-rp-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  min-height: 0;
}

.room-rp-grid .room-img-card {
  /* Override fixed aspect-ratio — let grid rows control height */
  aspect-ratio: unset !important;
  height: 100%;
}

/* ── Room Match loading screen (matches generate loading panel) ──────── */
.room-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a2e3d;
  border-radius: 12px;
  margin: 12px;
}
.room-loading .loading-inner {
  /* inherits all .loading-inner styles from the generate loading screen */
}

/* ── Room Match skeleton loading ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.room-skeleton-card {
  border-radius: 10px;
  height: 100%;
  background: linear-gradient(90deg, #e8e4e0 25%, #f0ece8 50%, #e8e4e0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-line {
  display: inline-block;
  background: linear-gradient(90deg, #e8e4e0 25%, #f0ece8 50%, #e8e4e0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* Mobile: room results below the form panel */
@media (max-width: 768px) {
  .room-rp {
    padding: 14px 14px 20px;
    min-height: 320px;
  }
  .room-rp-grid {
    grid-template-rows: auto;
    grid-template-columns: repeat(3, 1fr);
  }
  .room-rp-grid .room-img-card {
    aspect-ratio: 1 !important;
    height: auto;
  }
  /* Ensure preview panel shows when room results are visible */
  .preview-panel:has(.room-rp:not(.hidden)) {
    min-height: 380px;
  }
}

/* ── Email Gate Modal ─────────────────────────────────────────────────── */
.email-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 28, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.email-gate-overlay.hidden { display: none; }

.email-gate-modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  animation: egm-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes egm-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.egm-icon { font-size: 40px; margin-bottom: 16px; }

.egm-title {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.egm-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 24px;
  line-height: 1.5;
}

.egm-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.egm-input {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  border: 1.5px solid #e0dcd8;
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
}
.egm-input:focus { border-color: #2EC4B6; }

.egm-btn {
  width: 100%;
  padding: 14px;
  background: #1a2e3d;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
  font-family: inherit;
}
.egm-btn:hover { background: #243d50; }
.egm-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.egm-fine {
  font-size: 11px;
  color: #aaa;
  margin: 12px 0 0;
}

.egm-error {
  font-size: 13px;
  color: #d93025;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef2f2;
  border-radius: 8px;
}
.egm-error.hidden { display: none; }

/* Promo code display in success state */
.egm-code-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2EC4B6;
  border: 2px dashed #2EC4B6;
  border-radius: 10px;
  padding: 12px 20px;
  margin: 18px 0 8px;
  background: rgba(46, 196, 182, 0.07);
  text-align: center;
  user-select: all;
}

@media (max-width: 480px) {
  .email-gate-modal { padding: 32px 24px 28px; }
  .egm-title { font-size: 20px; }
  .egm-code-display { font-size: 18px; }
}

/* ── Room Match photo upload zone ───────────────────────────────────────── */
.room-photo-section { margin-bottom: 4px; }
.room-photo-sub {
  font-style: normal;
  font-weight: 400;
  color: #999;
  font-size: 11px;
  margin-left: 4px;
}
.room-upload-zone {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, background 0.18s;
  overflow: hidden;
  margin-bottom: 20px;
}
.room-upload-zone:hover,
.room-upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(46,196,182,0.05);
}
.ruz-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px;
  color: var(--muted);
  pointer-events: none;
}
.ruz-icon { font-size: 26px; opacity: 0.55; }
.ruz-empty p { margin: 0; font-size: 13px; font-weight: 500; color: var(--text-md); }
.ruz-empty small { font-size: 11.5px; color: var(--muted); }
.ruz-done {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  cursor: default;
}
.ruz-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
}
.ruz-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ruz-vibe-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #1a2e3d;
  text-transform: uppercase;
}
.ruz-swatches { display: flex; gap: 5px; align-items: center; }
.ruz-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.ruz-desc {
  font-size: 11px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ruz-loading-text {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #888;
}
.ruz-error { font-size: 12px; color: #c0392b; }
.ruz-clear-btn {
  padding: 5px 10px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 11px;
  color: #999;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.ruz-clear-btn:hover { border-color: #bbb; color: #555; }
.spinner-sm {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(46,196,182,0.25);
  border-top-color: #2EC4B6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── Checkout discount callout ───────────────────────────────────────────── */
.co-discount-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(46,196,182,0.08), rgba(46,196,182,0.03));
  border: 1.5px solid rgba(46,196,182,0.4);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.co-discount-callout.hidden { display: none; }
.co-dc-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.co-dc-text { display: flex; flex-direction: column; gap: 3px; }
.co-dc-text strong { font-size: 14px; font-weight: 700; color: #1a2e3d; }
.co-dc-text span   { font-size: 12px; color: #666; }

.co-discount-callout.co-dc-applied {
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(34,197,94,0.03));
  border-color: rgba(34,197,94,0.4);
}
.co-dc-check { font-size: 18px; font-weight: 700; color: #16a34a; }
.co-dc-applied .co-dc-text strong { color: #15803d; }

/* ── Homepage announcement / email capture strip ────────────────────────── */
.hs-strip {
  background: var(--ocean);
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.hs-strip.hidden { display: none; }
.hs-strip-icon { font-size: 14px; line-height: 1; }
.hs-strip-copy { color: rgba(255,255,255,0.82); font-size: 13px; }
.hs-strip-copy strong { color: #fff; }
.hs-strip-cta {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s;
}
.hs-strip-cta:hover { background: var(--accent-h); }
.hs-strip-done {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hs-strip-done-code {
  background: rgba(46,196,182,0.2);
  border: 1px dashed var(--accent);
  border-radius: 5px;
  padding: 2px 10px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ── Discount modal (homepage) ───────────────────────────────────────────── */
.hs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(3px);
}
.hs-modal-overlay.hidden { display: none; }
.hs-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 40px 36px;
  max-width: 420px;
  width: 92%;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.hs-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 6px;
  font-family: inherit;
}
.hs-modal-close:hover { color: var(--text); }
.hs-modal-icon { font-size: 38px; margin-bottom: 14px; }
.hs-modal-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.hs-modal-sub { font-size: 14px; color: var(--text-md); line-height: 1.55; margin-bottom: 24px; }
.hs-modal-form { display: flex; flex-direction: column; gap: 10px; }
.hs-modal-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  text-align: left;
}
.hs-modal-input:focus { border-color: var(--accent); }
.hs-modal-btn {
  height: 46px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.hs-modal-btn:hover { background: var(--accent-h); }
.hs-modal-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.hs-modal-fine { font-size: 12px; color: var(--muted); margin-top: 14px; }
.hs-modal-error { color: #d44; font-size: 13px; margin-top: 8px; }
.hs-modal-error.hidden { display: none; }
.hs-modal-code-display {
  display: inline-block;
  background: rgba(46,196,182,0.10);
  border: 1.5px dashed var(--accent);
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 20px;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  letter-spacing: 2px;
  font-weight: 700;
  margin: 14px 0 8px;
}

/* ── Describe tab: optional reference photo ────────────────────────────── */
.ref-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.ref-photo-toggle {
  background: none;
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius-xs);
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-md);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s, color 0.15s;
}
.ref-photo-toggle:hover { border-color: var(--accent); color: var(--accent); }
.ref-toggle-plus { font-size: 14px; font-weight: 700; line-height: 1; }
.ref-toggle-hint { opacity: 0.55; font-size: 11px; }
.ref-attached-badge {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.ref-photo-zone {
  margin-top: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ref-upload-area {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 12px;
  transition: background 0.15s;
  background: var(--surface);
}
.ref-upload-area:hover { background: var(--surface2); }
.ref-upload-area.dragover { background: rgba(46,196,182,0.06); border-color: var(--accent); }
.ref-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  pointer-events: none;
}
.ref-preview-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.ref-preview-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.ref-clear-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  padding: 3px 8px;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.ref-clear-btn:hover { border-color: #bbb; color: #555; }
.ref-hint {
  font-size: 11.5px;
  color: var(--muted);
  padding: 6px 12px 8px;
  background: var(--surface2);
  margin: 0;
  border-top: 1px solid var(--border);
}

/* ── Room match: mode toggle ────────────────────────────────────────────── */
.room-mode-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 18px;
}
.rmt-btn {
  flex: 1;
  padding: 9px 10px;
  border: none;
  background: var(--surface);
  color: var(--text-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.rmt-btn:first-child { border-right: 1.5px solid var(--border); }
.rmt-btn.active {
  background: var(--ocean);
  color: #fff;
  font-weight: 600;
}
.rmt-btn:not(.active):hover { background: var(--surface2); }

.rms-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Compact vibe grid */
.vibe-grid-compact .vibe-btn {
  padding: 10px 12px;
}
.vibe-grid-compact .vibe-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.vibe-grid-compact .vibe-info strong {
  font-size: 12.5px;
}
.vibe-grid-compact .vibe-info small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

/* Color trio pickers */
.color-trio {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ctp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ctp-swatch {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: block;
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--border), var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
}
.ctp-swatch:hover {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm);
  transform: scale(1.06);
}
.ctp-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.ctp-label {
  font-size: 11px;
  color: var(--text-md);
  font-weight: 500;
  text-align: center;
}

/* ── Create page persistent discount strip ──────────────────────────────── */
.create-discount-strip {
  background: linear-gradient(135deg, rgba(46,196,182,0.10), rgba(46,196,182,0.04));
  border: 1.5px solid rgba(46,196,182,0.32);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.create-discount-strip.hidden { display: none; }
.cds-icon { font-size: 16px; flex-shrink: 0; }
.cds-label { font-size: 13px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.cds-form {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 190px;
}
.cds-input {
  flex: 1;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.cds-input:focus { border-color: var(--accent); }
.cds-btn {
  height: 32px;
  padding: 0 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.cds-btn:hover { background: var(--accent-h); }
.cds-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.cds-success {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #15803d;
  font-weight: 600;
  flex-wrap: wrap;
}
.cds-code {
  background: rgba(46,196,182,0.14);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ── Account page — sign-in split layout ───────────────────────────────────── */

.acct-split {
  display: flex;
  height: calc(100vh - 68px);
}

.acct-art-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0F0F1A;
}

.acct-art-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.acct-art-slide.active { opacity: 1; }
.acct-art-slide-1 { background-image: url('/examples/login-roadtrip-oil.webp'); }
.acct-art-slide-2 { background-image: url('/examples/login-tokyo-cinematic.webp'); }
.acct-art-slide-3 { background-image: url('/examples/login-festival-impressionist.webp'); }
.acct-art-slide-4 { background-image: url('/examples/login-goldenretriever-vintage.webp'); }
.acct-art-slide-5 { background-image: url('/examples/login-cafe-watercolor.webp'); }

.acct-art-gradient {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  z-index: 10;
}
.acct-art-style-label {
  position: absolute; bottom: 28px; left: 32px; z-index: 20;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.7);
}

.acct-form-panel {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  background: var(--surface);
  overflow-y: auto;
}

.acct-form-inner {
  width: 100%;
  max-width: 360px;
}

.acct-signin-headline {
  font-size: 28px; font-weight: 700; line-height: 1.22;
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.acct-signin-sub {
  font-size: 14px; color: var(--muted); line-height: 1.5;
  margin-bottom: 28px;
}

.acct-input-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.acct-email-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; background: var(--bg);
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.acct-email-input:focus { border-color: var(--accent); }

.acct-submit-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.acct-divider {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.acct-divider-line { flex: 1; height: 1px; background: var(--border); }
.acct-divider-text { font-size: 12px; color: var(--muted); font-weight: 500; }

.acct-benefits-new { display: flex; flex-direction: column; gap: 12px; }
.acct-benefit-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13.5px; color: var(--text-md); line-height: 1.45;
}
.acct-benefit-check {
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: rgba(46,196,182,0.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
  color: var(--accent);
}
.acct-benefit-check svg { width: 11px; height: 11px; }

.acct-sent-icon {
  width: 60px; height: 60px;
  background: rgba(46,196,182,0.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; color: var(--accent);
}
.acct-sent-icon svg { width: 28px; height: 28px; }
.acct-sent-headline { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.acct-sent-body { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.6; margin-bottom: 20px; }
.acct-sent-body strong { color: var(--text); }

/* ── Account dashboard — side-nav layout ────────────────────────────────────── */

.acct-dashboard {
  display: flex;
  min-height: calc(100vh - 68px);
}

.acct-mobile-tabs {
  display: none;
  overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: sticky; top: 68px; z-index: 100;
}
.acct-mobile-tab {
  display: inline-flex; align-items: center;
  padding: 14px 16px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  white-space: nowrap; cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all 0.12s;
}
.acct-mobile-tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.acct-sidebar {
  width: 230px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex; flex-direction: column;
  position: sticky; top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}

.acct-sidebar-user {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.acct-sidebar-user-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.acct-sidebar-user-email {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.acct-sidebar-nav { flex: 1; padding: 4px 0; }
.acct-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-md);
  border-left: 3px solid transparent;
  transition: all 0.12s; user-select: none;
}
.acct-sidebar-item:hover { color: var(--text); background: var(--surface2); }
.acct-sidebar-item.active {
  color: var(--text); font-weight: 600;
  border-left-color: var(--accent);
  background: rgba(46,196,182,0.07);
}
.acct-sidebar-icon { font-size: 16px; width: 20px; text-align: center; }
.acct-sidebar-badge {
  margin-left: auto;
  background: var(--surface2); color: var(--text-md);
  border-radius: 50px; padding: 2px 8px;
  font-size: 11px; font-weight: 600;
}
.acct-sidebar-item.active .acct-sidebar-badge {
  background: rgba(46,196,182,0.15); color: var(--accent);
}

.acct-sidebar-footer {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.acct-signout-btn {
  width: 100%; padding: 9px 14px;
  background: none; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-md); font-family: inherit;
  transition: all 0.12s;
}
.acct-signout-btn:hover { border-color: var(--border-dark); color: var(--text); }

.acct-content {
  flex: 1; padding: 36px 40px;
  overflow-y: auto; min-width: 0;
}

.acct-section-panel { display: none; }
.acct-section-panel.active { display: block; }

.acct-panel-heading {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.acct-panel-sub {
  font-size: 14px; color: var(--muted); margin-top: -14px; margin-bottom: 20px;
}

/* ── Art card grid ──────────────────────────────────────────────────────────── */

.acct-art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.acct-art-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s, transform 0.15s;
  display: flex; flex-direction: column;
}
.acct-art-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.acct-art-card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}
.acct-art-card-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.acct-art-card-del {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(15,15,26,0.5); backdrop-filter: blur(4px);
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85); font-size: 17px; line-height: 1;
  transition: background 0.12s;
}
.acct-art-card-del:hover { background: rgba(220,38,38,0.75); }

.acct-art-card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; flex: 1;
}
.acct-art-card-body .draft-prompt {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.acct-art-card-body .draft-meta {
  font-size: 12px; color: var(--muted); margin-bottom: 4px;
}
.acct-art-card-body .draft-timestamp {
  font-size: 12px; color: var(--muted); margin-bottom: 12px;
}
.acct-art-card-resume {
  width: 100%; margin-top: auto;
  padding: 9px; font-size: 13px; font-weight: 600;
}

/* ── Skeleton grid ──────────────────────────────────────────────────────────── */

.acct-skeleton-grid { pointer-events: none; }
.acct-skeleton-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.acct-skeleton-img {
  aspect-ratio: 4/3; background: var(--surface2);
  animation: skeletonPulse 1.4s ease-in-out infinite;
}
.acct-skeleton-body { padding: 14px 16px 16px; }
.acct-skeleton-line {
  height: 12px; background: var(--surface2); border-radius: 6px;
  margin-bottom: 8px;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}
.acct-skeleton-line.short { width: 60%; }
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.5; }
}

/* ── Empty state ────────────────────────────────────────────────────────────── */

.acct-empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 56px 20px; text-align: center;
}
.acct-empty-icon { font-size: 36px; margin-bottom: 12px; }
.acct-empty-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.acct-empty-text { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.acct-empty-cta { padding: 11px 24px; border-radius: 50px; font-size: 14px; }

/* ── Refer section ──────────────────────────────────────────────────────────── */

.acct-refer-how {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 20px;
}
.acct-refer-how-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px;
}
.acct-refer-how-icon { font-size: 22px; margin-bottom: 8px; }
.acct-refer-how-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.acct-refer-how-text { font-size: 13px; color: var(--muted); line-height: 1.5; }

.acct-refer-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px;
}
.acct-refer-hero-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.acct-refer-link-row { display: flex; gap: 10px; margin-bottom: 16px; }
.acct-refer-link-input {
  flex: 1; padding: 11px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13.5px; font-family: inherit;
  color: var(--text); outline: none;
}
.acct-refer-copy-btn {
  padding: 11px 18px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  white-space: nowrap; transition: background 0.12s;
}
.acct-refer-copy-btn:hover { background: var(--accent-h); }
.acct-refer-progress { display: flex; align-items: center; gap: 12px; }
.acct-refer-bar-wrap { flex: 1; height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.acct-refer-bar { height: 100%; background: var(--accent); border-radius: 99px; width: 0; transition: width 0.4s; }
.acct-refer-progress-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.acct-refer-conv-heading { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.acct-refer-conv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.acct-refer-conv-row:last-child { border-bottom: none; }
.acct-refer-conv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.acct-refer-conv-email { flex: 1; font-weight: 500; }
.acct-refer-conv-date { color: var(--muted); font-size: 12px; }
.acct-refer-conv-badge {
  font-size: 11.5px; font-weight: 600;
  background: rgba(24,165,88,0.12); color: var(--success);
  padding: 3px 10px; border-radius: 50px;
}

/* ── Profile section ────────────────────────────────────────────────────────── */

.acct-profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 14px;
}
.acct-profile-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.acct-profile-value { font-size: 15px; font-weight: 500; }
.acct-profile-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

.acct-profile-auto-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 16px;
}

.acct-profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.acct-profile-field { display: flex; flex-direction: column; gap: 5px; }
.acct-profile-field.full { grid-column: 1 / -1; }
.acct-profile-field-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
}
.acct-profile-input {
  padding: 10px 13px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); font-size: 14px; font-family: inherit;
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.acct-profile-input:focus { border-color: var(--accent); }
.acct-profile-save-row {
  display: flex; align-items: center; gap: 12px; justify-content: flex-end;
}
.acct-profile-save-btn {
  padding: 10px 22px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: background 0.12s;
}
.acct-profile-save-btn:hover { background: var(--accent-h); }
.acct-profile-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.acct-profile-save-status { font-size: 13px; color: var(--success); font-weight: 500; }

.acct-profile-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.acct-profile-toggle-title { font-size: 14.5px; font-weight: 500; margin-bottom: 3px; }
.acct-profile-toggle-sub { font-size: 13px; color: var(--muted); }

.acct-toggle-switch {
  position: relative; width: 44px; height: 24px; flex-shrink: 0;
}
.acct-toggle-switch input { opacity: 0; width: 0; height: 0; }
.acct-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border-dark); border-radius: 99px; transition: background 0.2s;
}
.acct-toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; bottom: 3px; left: 3px; transition: transform 0.2s;
}
.acct-toggle-switch input:checked + .acct-toggle-slider { background: var(--accent); }
.acct-toggle-switch input:checked + .acct-toggle-slider::before { transform: translateX(20px); }

.acct-profile-danger {
  background: var(--surface); border: 1px solid #FFCDD2;
  border-radius: var(--radius); padding: 22px 26px;
}
.acct-profile-danger-title { font-size: 15px; font-weight: 600; color: #dc2626; margin-bottom: 6px; }
.acct-profile-danger-text { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.55; }
.acct-profile-danger-btn {
  padding: 10px 20px;
  background: none; border: 1.5px solid #dc2626;
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: #dc2626; font-family: inherit;
  transition: all 0.12s;
}
.acct-profile-danger-btn:hover { background: #dc2626; color: #fff; }

/* ── Order detail modal ─────────────────────────────────────────────────────── */

.acct-order-modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,15,26,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.acct-order-modal-overlay.hidden { display: none; }

.acct-order-modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  width: 100%; max-width: 860px; max-height: calc(100vh - 48px);
  display: flex; overflow: hidden;
  animation: acctModalIn 0.22s ease;
}
@keyframes acctModalIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.acct-order-modal-art {
  flex: 1;
  background: #D0CAC0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,0,0,0.025) 39px, rgba(0,0,0,0.025) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,0,0,0.025) 39px, rgba(0,0,0,0.025) 40px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 36px; gap: 14px; min-width: 0;
}

.acct-order-frame-wrap {
  position: relative; width: 100%; max-width: 300px;
}
.acct-order-frame-wrap img { width: 100%; display: block; }

.acct-frame-none img { border-radius: 3px; }

.acct-frame-black {
  padding: 16px; background: #1a1a1a;
  box-shadow: 0 0 0 2px #111, inset 0 0 0 1px rgba(255,255,255,0.05), 6px 6px 24px rgba(0,0,0,0.5);
}
.acct-frame-black::before {
  content: ''; position: absolute; inset: 13px;
  border: 9px solid #f0ede8; pointer-events: none; z-index: 1;
}

.acct-frame-white {
  padding: 16px; background: #f6f5f2;
  box-shadow: 0 0 0 2px #ddd, inset 0 0 0 1px rgba(0,0,0,0.05), 6px 6px 24px rgba(0,0,0,0.3);
}
.acct-frame-white::before {
  content: ''; position: absolute; inset: 13px;
  border: 8px solid #fffdf8; pointer-events: none; z-index: 1;
}

.acct-frame-natural {
  padding: 16px; background: #b5894a;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 6px);
  box-shadow: 0 0 0 2px #8a6530, 6px 6px 24px rgba(0,0,0,0.4);
}
.acct-frame-natural::before {
  content: ''; position: absolute; inset: 13px;
  border: 8px solid #f0ede8; pointer-events: none; z-index: 1;
}

.acct-order-art-label {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(15,15,26,0.4); text-align: center;
}

.acct-order-modal-details {
  width: 310px; flex-shrink: 0;
  padding: 24px 26px 22px;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
  overflow-y: auto;
}
.acct-order-modal-close {
  align-self: flex-end; margin-bottom: 14px;
  width: 32px; height: 32px;
  background: var(--surface2); border: none; border-radius: 50%;
  cursor: pointer; font-size: 18px; color: var(--text-md);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.acct-order-modal-close:hover { background: var(--border); }

.acct-order-modal-prompt {
  font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 4px;
}
.acct-order-modal-date { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }

.acct-order-spec-section { margin-bottom: 14px; }
.acct-order-spec-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.acct-order-spec-value {
  display: inline-block; padding: 5px 13px;
  border: 1.5px solid var(--accent); border-radius: 50px;
  background: rgba(46,196,182,0.07);
  font-size: 12.5px; font-weight: 600; color: var(--text);
}

.acct-order-pricing {
  border-top: 1px solid var(--border); margin: 16px 0 18px; padding-top: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.acct-order-price-row {
  display: flex; justify-content: space-between;
  font-size: 13.5px; color: var(--text-md);
}
.acct-order-price-row:first-child {
  font-size: 16px; font-weight: 700; color: var(--text);
}

.acct-order-reorder-btn { width: 100%; margin-top: auto; padding: 13px; font-size: 14px; }
.acct-order-guarantee { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 10px; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .acct-art-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Sign-in */
  .acct-split { flex-direction: column; height: auto; min-height: calc(100vh - 68px); }
  .acct-art-panel { height: 220px; flex: none; }
  .acct-form-panel { width: 100%; padding: 32px 24px; }

  /* Dashboard */
  .acct-sidebar { display: none; }
  .acct-mobile-tabs { display: flex; }
  .acct-dashboard { flex-direction: column; }
  .acct-content { padding: 24px 16px; }
  .acct-art-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .acct-refer-how { grid-template-columns: 1fr; }
  .acct-profile-grid { grid-template-columns: 1fr; }
  .acct-profile-field.full { grid-column: 1; }

  /* Order modal */
  .acct-order-modal { flex-direction: column; }
  .acct-order-modal-art { padding: 24px; }
  .acct-order-modal-details { width: 100%; border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 480px) {
  .acct-art-grid { grid-template-columns: 1fr; }
}

/* ── Legacy account styles (kept for backward compat) ───────────────────────── */

.acct-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.acct-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}

.acct-sub {
  color: #666;
  margin: 0 0 24px;
}

/* Sign-in card */
.acct-card {
  max-width: 440px;
  margin: 0 auto;
}

.acct-email-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.acct-email-input:focus {
  outline: none;
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(26,26,46,0.08);
}

.acct-btn {
  width: 100%;
  text-align: center;
}

.acct-error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 8px;
}

.acct-check {
  width: 48px;
  height: 48px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.acct-hint {
  color: #888;
  font-size: 14px;
}

/* Authenticated header */
.acct-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.acct-user-email {
  color: #555;
  font-size: 14px;
  margin: 0;
}

.acct-signout-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.acct-section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
}

/* Empty state */
.acct-empty {
  text-align: center;
  padding: 48px 24px;
  color: #888;
}

.acct-empty .acct-btn {
  display: inline-block;
  width: auto;
  margin-top: 16px;
}

/* Draft grid */
.drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.draft-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s;
}

.draft-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.draft-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}

.draft-info {
  padding: 12px;
}

.draft-prompt {
  font-size: 13px;
  color: #374151;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.draft-meta {
  font-size: 12px;
  color: #9ca3af;
  margin: 0 0 10px;
  text-transform: capitalize;
}

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

.draft-actions .btn-primary,
.draft-actions .btn-outline {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  text-align: center;
}

/* Nav account link (create page) */
.nav-app-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-account-link {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
}

.nav-account-link:hover {
  color: var(--dark);
}

/* ── Account benefits list ── */
.acct-benefits {
  list-style: none;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.acct-benefits li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--text-md);
}
.acct-benefits li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 13px;
}

/* ── Account preview cards (sign-in state teaser) ── */
.acct-preview-cards {
  margin-top: 36px;
}
.acct-preview-label {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.acct-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  filter: blur(2.5px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}
.acct-preview-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.acct-preview-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}
.acct-preview-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.acct-preview-card-line {
  height: 7px;
  background: var(--border);
  border-radius: 4px;
}
.acct-preview-card-line.short { width: 55%; }

/* ── Resend countdown ── */
.acct-resend-area {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  min-height: 22px;
}
.acct-resend-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}
.acct-resend-btn:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: none; }

/* ── Draft timestamp ── */
.draft-timestamp {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ── Draft skeleton loading ── */
.drafts-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.draft-skeleton-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.draft-skeleton-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(90deg, #e8e4e0 25%, #f0ece8 50%, #e8e4e0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.draft-skeleton-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.draft-skeleton-line {
  height: 9px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8e4e0 25%, #f0ece8 50%, #e8e4e0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.draft-skeleton-line.short { width: 58%; }

/* Responsive */
@media (max-width: 480px) {
  .acct-main {
    padding: 32px 16px 60px;
  }

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

  .acct-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Delete confirmation modal ───────────────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-overlay.hidden { display: none; }

.confirm-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.confirm-body {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-btn {
  flex: 1;
  max-width: 140px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  transition: background 0.15s;
}
.btn-danger:hover { background: #b91c1c; }
