/* ═══════════════════════════════════════════════════════
   BLUEPRINT AI — Styles
   AI-Powered Home Design Platform
   ═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ────────────────────────────────────── */
:root {
  /* Blueprint backgrounds */
  --bg:           #0A1628;
  --bg-surface:   #0F1E36;
  --bg-card:      #142640;
  --bg-input:     #0D1A2E;

  /* Grid lines */
  --grid:         rgba(65, 145, 220, 0.06);
  --grid-major:   rgba(65, 145, 220, 0.12);

  /* Text */
  --text:         #E8EDF4;
  --text-muted:   #7A8FA8;
  --text-dim:     #4A5F78;

  /* Accent colors */
  --accent:       #4191DC;
  --accent-light: #64B5F6;
  --accent-dim:   rgba(65, 145, 220, 0.12);
  --gold:         #D4A030;
  --gold-light:   #E8C060;
  --gold-gradient: linear-gradient(135deg, #D4A030 0%, #E8C060 50%, #D4A030 100%);
  --success:      #4CAF50;
  --warning:      #FF9800;
  --danger:       #EF5350;

  /* Blueprint lines */
  --line:         #C8D8EC;
  --line-dim:     rgba(200, 216, 236, 0.4);
  --line-door:    #64B5F6;
  --line-window:  #80CBC4;

  /* Borders */
  --border:       rgba(65, 145, 220, 0.12);
  --border-hover: rgba(65, 145, 220, 0.25);

  /* Fonts */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', monospace;
  --font-serif:   'Playfair Display', Georgia, serif;

  /* Radius */
  --radius:       8px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  /* Ease */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);

  /* Safe areas */
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-left:    env(safe-area-inset-left, 0px);
  --safe-right:   env(safe-area-inset-right, 0px);
}

/* ── GLASS-MORPHISM ─────────────────────────────────── */
.glass {
  background: rgba(15, 30, 54, 0.65);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(65, 145, 220, 0.10);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255,255,255,0.04);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* ── BLUEPRINT GRID BACKGROUND ──────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size:
    20px 20px,
    20px 20px,
    100px 100px,
    100px 100px;
}

/* Warm ambient glow overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(212,160,48,0.03) 0%, transparent 70%);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ═══════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════ */

.landing {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.landing.exiting {
  animation: landingExit 0.5s var(--ease) forwards;
}
.landing.hidden { display: none; }

@keyframes landingExit {
  to { opacity: 0; transform: scale(0.97); }
}

/* ── LANDING NAV ────────────────────────────────────── */
.land-nav {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), box-shadow 0.35s;
}
.land-nav.scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 24px;
  box-shadow: 0 1px 0 var(--border);
}
.land-nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.land-nav-logo span { color: var(--accent); }
.land-nav-links {
  display: none;
  flex-direction: column;
  gap: 0;
}
.land-nav-links.mobile-open {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  justify-content: center;
  align-items: center;
  gap: 32px;
  z-index: 199;
  animation: fadeIn 0.3s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.land-nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}
.land-nav-link:hover { color: var(--accent-light); }
.land-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 24px;
  background: var(--gold);
  color: #0A1628;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.3s, transform 0.2s;
}
.land-nav-cta:hover { background: var(--gold-light); }
.land-nav-cta:active { transform: scale(0.96); }
.land-nav-cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #0A1628;
  opacity: 0.4;
}

/* Hamburger */
.land-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 201;
}
.land-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}
.land-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.land-burger.open span:nth-child(2) { opacity: 0; }
.land-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ───────────────────────────────────────────── */
.land-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 24px 60px;
}
.land-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.land-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}
.land-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text);
  letter-spacing: -0.01em;
}
.land-hero-title-accent { color: var(--gold); }
.land-hero-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
}
.land-hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.land-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 28px;
  background: var(--gold-gradient);
  color: #0A1628;
  font-family: var(--font-display);
  box-shadow: 0 0 24px rgba(212, 160, 48, 0.20), 0 0 60px rgba(212, 160, 48, 0.06);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 30px rgba(212, 160, 48, 0.2);
}
.land-hero-btn:hover {
  background: var(--gold-light);
  box-shadow: 0 0 40px rgba(212, 160, 48, 0.35);
}
.land-hero-btn:active { transform: scale(0.96); }

.land-hero-ghost {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-hover);
  padding-bottom: 2px;
  transition: color 0.3s;
}
.land-hero-ghost:hover { color: var(--accent-light); }

/* Blueprint SVG in hero */
.land-hero-visual {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
  position: relative;
}
.land-hero-blueprint {
  width: 100%;
  height: 100%;
}

/* Hero self-drawing rooms */
.hero-room {
  fill: none;
  stroke: rgba(65,145,220,0.22);
  stroke-width: 1.5;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: heroDrawRoom 1.8s ease forwards;
  animation-delay: 0.2s;
}
@keyframes heroDrawRoom {
  to { stroke-dashoffset: 0; fill: rgba(65,145,220,0.04); }
}

/* Hero details (doors, windows) — fade in after rooms */
.hero-details {
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
  animation-delay: 1.6s;
}

/* Hero room labels — fade in late */
.hero-label {
  fill: rgba(200,216,236,0.45);
  opacity: 0;
  animation: heroFadeIn 0.6s ease forwards;
  animation-delay: 2.1s;
}

/* Hero dimension labels */
.hero-dim {
  fill: rgba(200,216,236,0.3);
  opacity: 0;
  animation: heroFadeIn 0.6s ease forwards;
  animation-delay: 2.6s;
}
.hero-dim-line {
  stroke: rgba(200,216,236,0.2);
  stroke-width: 0.5;
  stroke-dasharray: 3 2;
  opacity: 0;
  animation: heroFadeIn 0.6s ease forwards;
  animation-delay: 2.4s;
}

@keyframes heroFadeIn {
  to { opacity: 1; }
}

/* Hero warm gradient overlay */
.land-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 20% 50%, rgba(212,160,48,0.06) 0%, transparent 60%);
  z-index: 0;
}
.land-hero {
  position: relative;
}

/* Stagger animation */
.land-stagger {
  opacity: 0;
  animation: staggerIn 0.7s var(--ease) forwards;
  animation-delay: calc(0.1s + var(--i, 0) * 0.12s);
}
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll cue */
.land-scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.land-scroll-cue::before {
  content: '';
  width: 1px;
  height: 28px;
  background: var(--accent);
  opacity: 0.4;
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.6); }
  50% { opacity: 0.6; transform: scaleY(1); }
}

/* ── MARQUEE ─────────────────────────────────────────── */
.land-marquee {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 14px 0;
  white-space: nowrap;
}
.land-marquee-track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
.land-marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 20px;
}
.land-marquee-dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  vertical-align: middle;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── SECTIONS ────────────────────────────────────────── */
.land-section {
  padding: 80px 24px;
  position: relative;
  z-index: 1;
}
.land-section-dark {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.land-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.land-section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.land-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.land-section-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── FEATURES GRID ───────────────────────────────────── */
.land-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.land-feature-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
  overflow: hidden;
}
.land-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.land-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(65, 145, 220, 0.08);
  border-color: var(--border-hover);
}
.land-feature-card:hover::before { opacity: 1; }

.land-feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
}
.land-feature-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.land-feature-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── HOW IT WORKS ────────────────────────────────────── */
.land-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
}
.land-step {
  text-align: center;
  padding: 24px 0;
}
.land-step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.7;
}
.land-step-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.land-step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto;
}
.land-step-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.3;
}

/* ── PRICING ─────────────────────────────────────────── */
.land-pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}
.land-price-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s;
}
.land-price-card.featured {
  border-color: var(--gold);
  position: relative;
}
.land-price-card.featured::after {
  content: 'POPULAR';
  position: absolute;
  top: -10px;
  left: 24px;
  padding: 3px 12px;
  border-radius: 10px;
  background: var(--gold);
  color: #0A1628;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.land-price-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.land-price-amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
}
.land-price-amount span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}
.land-price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.land-price-features li {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.land-price-features li::before {
  content: '◆';
  color: var(--accent);
  font-size: 0.5rem;
}
.land-price-btn {
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: 24px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  transition: background 0.3s, transform 0.2s;
}
.land-price-btn-primary {
  background: var(--gold);
  color: #0A1628;
}
.land-price-btn-primary:hover { background: var(--gold-light); }
.land-price-btn-secondary {
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid var(--border);
}
.land-price-btn-secondary:hover { border-color: var(--accent); }

/* ── FOOTER ──────────────────────────────────────────── */
.land-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.land-footer-inner {
  padding: 48px 24px 32px;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.land-footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.land-footer-logo span { color: var(--accent); }
.land-footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.land-footer-links {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}
.land-footer-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}
.land-footer-link:hover { color: var(--accent); }
.land-footer-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.land-footer-bar-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  opacity: 0.5;
}

/* ── SCROLL REVEAL ───────────────────────────────────── */
.land-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.land-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════ */
.app-shell {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 50;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: rgba(15, 30, 54, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-right: 1px solid rgba(65, 145, 220, 0.10);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 4px;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.sidebar-link:hover {
  background: var(--accent-dim);
  color: var(--text);
}
.sidebar-link.active {
  background: var(--accent-dim);
  color: var(--accent-light);
}
.sidebar-link svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}
.sidebar-link.active svg { opacity: 1; }
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 12px 4px;
}
.sidebar-spacer { flex: 1; }

/* ── MAIN AREA ───────────────────────────────────────── */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* ── APP SCREENS ─────────────────────────────────────── */
.app-screen {
  display: none;
  min-height: 100%;
  padding: 32px 32px calc(32px + var(--safe-bottom));
  animation: screenFadeIn 0.3s var(--ease);
}
.app-screen.active {
  display: block;
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes screenSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.app-screen.active {
  animation: screenSlideIn 0.4s var(--ease) both;
}

/* Staggered element entrance */
@keyframes staggerUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stagger-in {
  opacity: 0;
  animation: staggerUp 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

/* Screen header pattern */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.screen-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.screen-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── ONBOARDING OVERLAY ──────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(6, 12, 22, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: screenSlideIn 0.5s var(--ease);
}
.onboarding-overlay.hidden { display: none; }
.onboarding-card {
  width: 100%;
  max-width: 480px;
  background: rgba(18, 36, 62, 0.95);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(65, 145, 220, 0.18);
  border-radius: var(--radius-xl);
  padding: 48px 40px 36px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(65,145,220,0.06), inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.onboarding-step { display: none; width: 100%; text-align: center; }
.onboarding-step.active { display: block; animation: staggerUp 0.4s var(--ease); }
.onboarding-emblem {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 4px;
}
.onboarding-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.onboarding-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 360px;
  margin: 0 auto;
}

/* Step 1: How it works grid */
.onboarding-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}
.onboarding-mini-step {
  background: rgba(10, 22, 40, 0.50);
  border: 1px solid rgba(65, 145, 220, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: left;
}
.onboarding-step-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.onboarding-step-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.onboarding-step-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Step 2: Tips */
.onboarding-tips {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.onboarding-tip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(10, 22, 40, 0.50);
  border: 1px solid rgba(65, 145, 220, 0.08);
  border-radius: var(--radius);
  text-align: left;
}
.onboarding-tip-icon {
  font-size: 1rem;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 1px;
}
.onboarding-tip span:last-child {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Nav dots + button */
.onboarding-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
}
.onboarding-dots {
  display: flex;
  gap: 8px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(65, 145, 220, 0.15);
  transition: background 0.3s, transform 0.3s;
}
.onboarding-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}
.onboarding-btn {
  padding: 12px 28px;
  border-radius: 24px;
  background: var(--gold-gradient);
  color: #0A1628;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.15s;
  box-shadow: 0 0 20px rgba(212, 160, 48, 0.15);
}
.onboarding-btn:hover {
  box-shadow: 0 0 28px rgba(212, 160, 48, 0.25);
}
.onboarding-btn:active { transform: scale(0.96); }

@media (max-width: 480px) {
  .onboarding-card { padding: 32px 20px 28px; }
  .onboarding-steps-grid { grid-template-columns: 1fr; gap: 12px; }
  .onboarding-title { font-size: 1.3rem; }
}

/* ── AUTH OVERLAY ─────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 12, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-overlay.hidden { display: none; }
.auth-card {
  width: 100%;
  max-width: 380px;
  background: rgba(15, 30, 54, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(65, 145, 220, 0.15);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.auth-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.auth-logo span { color: var(--accent); }
.auth-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-dim); }
.auth-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--gold);
  color: #0A1628;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.3s, transform 0.2s;
}
.auth-btn:hover { background: var(--gold-light); }
.auth-btn:active { transform: scale(0.98); }
.auth-toggle {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.auth-toggle a {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}
.auth-toggle a:hover { text-decoration: underline; }

/* ── TOAST ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 9999;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s;
  pointer-events: none;
}
.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  animation: toastBounce 0.5s var(--ease);
}
@keyframes toastBounce {
  0%   { transform: translateX(-50%) translateY(40px) scale(0.8); opacity: 0; }
  60%  { transform: translateX(-50%) translateY(-4px) scale(1.02); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
.toast-icon {
  font-size: 0.9rem;
  color: var(--accent);
}
.toast-msg {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── LOADING OVERLAY ──────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.loading-overlay.hidden { display: none; }
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── DASHBOARD — PROJECT CARDS ────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(65, 145, 220, 0.25);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(65, 145, 220, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.project-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.project-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(10,22,40,0.80));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.project-card:hover .project-card-thumb::after {
  opacity: 1;
}
.project-card:hover .project-card-thumb svg,
.project-card:hover .project-card-thumb img {
  transform: scale(1.03);
  transition: transform 0.4s var(--ease);
}
.project-card-thumb svg {
  width: 80%;
  height: 80%;
}
.project-card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.project-card-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
}
.project-card-new {
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  transition: border-color 0.3s;
}
.project-card-new:hover { border-color: var(--accent); }
.project-card-new-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}
.project-card-new-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── EMPTY STATE ──────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  text-align: center;
}
.empty-state-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
}
.empty-state-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  max-width: 320px;
}

/* ── MOBILE BOTTOM NAV ────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 150;
  background: rgba(15, 30, 54, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid rgba(65, 145, 220, 0.10);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.20);
  padding: 8px 0 calc(8px + var(--safe-bottom));
}
.mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  transition: color 0.2s;
}
.mobile-nav-btn.active { color: var(--accent); }
.mobile-nav-btn svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════════════════════
   PHASE 2 — FORM, UPLOAD, PREFERENCES, MODAL
   ═══════════════════════════════════════════════════════ */

/* ── FORM LAYOUT ─────────────────────────────────────── */
.form-container {
  max-width: 680px;
}
.form-section {
  margin-bottom: 32px;
}
.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.form-label-hint {
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-left: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); }

.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
  transition: border-color 0.3s;
  font-family: var(--font-body);
}
.form-textarea:focus { border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-dim); }

/* ── IMAGE UPLOAD ZONE ───────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  position: relative;
}
.upload-zone:hover {
  border-color: var(--border-hover);
}
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-zone-icon {
  font-size: 1.8rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: block;
}
.upload-zone-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.upload-zone-text strong {
  color: var(--accent-light);
}
.upload-zone-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 6px;
  display: block;
}
.upload-hidden {
  display: none;
}

/* Upload previews */
.upload-previews {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.upload-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  border: none;
  line-height: 1;
}
.upload-thumb:hover .upload-thumb-remove { opacity: 1; }

/* ── PREFERENCE PILLS ────────────────────────────────── */
.pref-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pref-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.pref-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.pref-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── MUST-HAVE CHIPS ─────────────────────────────────── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 7px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--border-hover);
  color: var(--text-muted);
}
.chip.active {
  background: rgba(212, 160, 48, 0.1);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ── GENERATE BUTTON ─────────────────────────────────── */
.btn-generate {
  width: 100%;
  padding: 14px 32px;
  border-radius: 28px;
  background: var(--gold);
  color: #0A1628;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 30px rgba(212, 160, 48, 0.15);
}
.btn-generate:hover {
  background: var(--gold-light);
  box-shadow: 0 0 40px rgba(212, 160, 48, 0.3);
}
.btn-generate:active { transform: scale(0.97); }
.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-draft {
  display: block;
  margin: 14px auto 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.3s;
}
.btn-draft:hover { color: var(--accent-light); }

/* ── FORM DIVIDER ────────────────────────────────────── */
.form-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ── DELETE MODAL ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s var(--ease);
}
.modal-overlay.hidden { display: none; }
.viewer-layout.hidden { display: none; }
.modal-card {
  width: 100%;
  max-width: 400px;
  background: rgba(15, 30, 54, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(65, 145, 220, 0.12);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.modal-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.modal-btn-cancel {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.modal-btn-cancel:hover { border-color: var(--text-dim); color: var(--text); }
.modal-btn-danger {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius);
  background: var(--danger);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.modal-btn-danger:hover { background: #E53935; }
.modal-btn-danger:active { transform: scale(0.97); }

/* ── PROJECT CARD — DELETE BUTTON ────────────────────── */
.project-card {
  position: relative;
}
.project-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 30, 54, 0.60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(65, 145, 220, 0.10);
  color: var(--text-dim);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, color 0.2s, background 0.2s;
  z-index: 2;
}
.project-card:hover .project-card-delete { opacity: 1; }
.project-card-delete:hover {
  color: var(--danger);
  background: rgba(0, 0, 0, 0.75);
}

/* ── PROJECT CARD — STATUS BADGE ─────────────────────── */
.project-card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-card-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.project-card-status.draft {
  background: rgba(255, 152, 0, 0.12);
  color: var(--warning);
}
.project-card-status.draft::before {
  background: var(--warning);
}
.project-card-status.generated {
  background: rgba(76, 175, 80, 0.12);
  color: var(--success);
}
.project-card-status.generated::before {
  background: var(--success);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* Mobile: hide sidebar, show bottom nav */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .app-screen {
    padding: 20px 16px calc(72px + var(--safe-bottom));
  }
  .land-hero { padding: 90px 20px 50px; }
  .land-section { padding: 60px 20px; }
  .upload-zone { padding: 28px 16px; }
  .upload-thumb { width: 64px; height: 64px; }
  .pref-pill { padding: 7px 12px; font-size: 0.72rem; }
  .chip { padding: 6px 11px; font-size: 0.68rem; }

  /* Always show delete on mobile (no hover on touch) */
  .project-card-delete { opacity: 0.7; }

  /* Larger tap targets for mobile nav */
  .mobile-nav-btn { min-height: 44px; }

  /* Auth card needs more contrast on mobile */
  .auth-card { padding: 32px 24px; }

  /* Screen title sizing */
  .screen-title { font-size: 1.35rem; }
}

/* Tablet+ */
@media (min-width: 600px) {
  .land-burger { display: none; }
  .land-nav-links {
    display: flex !important;
    flex-direction: row !important;
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
    animation: none !important;
    gap: 28px;
    align-items: center;
  }
  .land-hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 56px;
  }
  .land-hero-actions { justify-content: flex-start; }
  .land-features-grid { grid-template-columns: 1fr 1fr; }
  .land-pricing-grid { grid-template-columns: 1fr 1fr; }
  .land-steps {
    flex-direction: row;
    max-width: 800px;
    gap: 0;
  }
  .land-step-line {
    width: 48px; height: 1px;
    background: linear-gradient(to right, var(--accent), transparent);
    opacity: 0.3;
  }
  .land-nav { padding: 20px 40px; }
  .land-nav.scrolled { padding: 14px 40px; }
  .land-section { padding: 100px 40px; }
}

@media (min-width: 900px) {
  .land-features-grid { grid-template-columns: 1fr 1fr 1fr; }
  .land-nav { padding: 24px 56px; }
  .land-nav.scrolled { padding: 14px 56px; }
}


/* ═══════════════════════════════════════════════════════
   PHASE 3 — PROCESSING SCREEN + FLOOR PLAN + SVG
   ═══════════════════════════════════════════════════════ */

/* ── PROCESSING SCREEN ─────────────────────────────── */
.processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 36px;
  text-align: center;
  padding: 40px 24px;
}

.processing-visual {
  width: 200px;
  height: 160px;
  position: relative;
  border: 2px solid var(--accent);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  animation: procOutline 1.2s var(--ease) forwards;
}
@keyframes procOutline {
  0%   { clip-path: polygon(0 0, 0 0, 0 0, 0 0); }
  25%  { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); }
  50%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%); }
  75%  { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}
.processing-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0;
  animation: procGridIn 0.6s ease 1s forwards;
}
@keyframes procGridIn {
  to { opacity: 1; }
}

/* Animated blueprint draw lines */
.processing-line-h,
.processing-line-v {
  position: absolute;
  background: var(--accent);
  opacity: 0.6;
}
.processing-line-h {
  height: 2px;
  top: 50%;
  left: 8%;
  width: 0;
  animation: procDrawH 2.4s var(--ease) infinite 1.2s;
}
.processing-line-v {
  width: 2px;
  left: 50%;
  top: 12%;
  height: 0;
  animation: procDrawV 2.4s var(--ease) infinite 1.6s;
}
.processing-line-h2 {
  height: 1px;
  top: 30%;
  left: 18%;
  width: 0;
  animation: procDrawH 2.8s var(--ease) infinite 2s;
  opacity: 0.35;
}
.processing-line-v2 {
  width: 1px;
  left: 72%;
  top: 22%;
  height: 0;
  animation: procDrawV 2.8s var(--ease) infinite 2.2s;
  opacity: 0.35;
}

/* Door arc accent */
.proc-arc {
  position: absolute;
  bottom: 28%;
  left: 46%;
  width: 24px;
  height: 12px;
  border: 1.5px solid var(--accent);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  opacity: 0;
  animation: procArcIn 0.5s ease 2.8s forwards;
}
@keyframes procArcIn {
  to { opacity: 0.55; }
}

@keyframes procDrawH {
  0%   { width: 0; opacity: 0; }
  15%  { opacity: 0.6; }
  55%  { width: 84%; opacity: 0.6; }
  100% { width: 84%; opacity: 0; }
}
@keyframes procDrawV {
  0%   { height: 0; opacity: 0; }
  15%  { opacity: 0.6; }
  55%  { height: 70%; opacity: 0.6; }
  100% { height: 70%; opacity: 0; }
}

.processing-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 260px;
  text-align: left;
}

.processing-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.4s var(--ease), transform 0.4s var(--ease), opacity 0.4s;
  transform: translateX(0);
  opacity: 0.55;
}
.processing-step.active {
  color: var(--accent-light);
  transform: translateX(4px);
  opacity: 1;
}
.processing-step.done {
  color: var(--success);
  transform: translateX(0);
  opacity: 0.85;
}

.processing-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  flex-shrink: 0;
  transition: border-color 0.4s, background 0.4s, transform 0.3s;
  position: relative;
}
.processing-step.active .processing-step-icon {
  border-color: var(--accent);
  transform: scale(1.1);
}
.processing-step.active .processing-step-spinner {
  display: block;
}
.processing-step.done .processing-step-icon {
  border-color: var(--success);
  background: rgba(76, 175, 80, 0.12);
}
/* Checkmark on done */
.processing-step.done .processing-step-icon::after {
  content: '\2713';
  font-size: 11px;
  color: var(--success);
  line-height: 1;
}
.processing-step.done .processing-step-spinner {
  display: none;
}

.processing-step-spinner {
  width: 10px;
  height: 10px;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

/* ── FLOOR PLAN SCREEN ────────────────────────────── */
.floorplan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.floorplan-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.floorplan-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-btn {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.fp-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.fp-btn-icon {
  font-size: 0.85rem;
}
.fp-btn-gold {
  background: var(--gold-gradient);
  color: #0A1628;
  border-color: var(--gold);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(212, 160, 48, 0.15), 0 0 60px rgba(212, 160, 48, 0.05);
}
.fp-btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #0A1628;
  box-shadow: 0 0 24px rgba(212, 160, 48, 0.25), 0 0 60px rgba(212, 160, 48, 0.08);
}

/* Button press feedback */
.fp-btn:active, .fp-btn-gold:active, .cost-finish-pill:active, .chip:active {
  transform: scale(0.95);
  transition: transform 0.1s;
}

/* Zoom controls */
.fp-zoom-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.fp-zoom-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: none;
}
.fp-zoom-btn:hover {
  background: var(--accent-dim);
  color: var(--accent-light);
}
.fp-zoom-level {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  padding: 0 6px;
  min-width: 40px;
  text-align: center;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* SVG canvas */
.floorplan-canvas {
  width: 100%;
  min-height: 460px;
  max-height: 70vh;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: grab;
}
.floorplan-canvas:active {
  cursor: grabbing;
}
.floorplan-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Project stats bar */
.floorplan-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.floorplan-stat {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.floorplan-stat strong {
  color: var(--text);
  font-weight: 600;
}

/* ── FLOOR SELECTOR (MULTI-STORY) ─────────────────── */
.floor-selector {
  margin: 12px 0 4px;
  display: flex;
  justify-content: center;
}
.floor-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 30, 54, 0.65);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(65, 145, 220, 0.10);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.floor-tab {
  padding: 6px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.floor-tab:hover {
  color: var(--text);
  background: rgba(65,145,220,0.06);
}
.floor-tab.active {
  color: #D4A030;
  background: rgba(212,160,48,0.10);
  border-color: rgba(212,160,48,0.30);
}
@media (max-width: 768px) {
  .floor-tab {
    padding: 5px 12px;
    font-size: 0.68rem;
  }
}
@media (max-width: 480px) {
  .floor-tab {
    padding: 4px 8px;
    font-size: 0.62rem;
  }
}

/* Room info panel */
.floorplan-rooms {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.floorplan-room-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.floorplan-room-chip:hover {
  border-color: rgba(65, 145, 220, 0.25);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.floorplan-room-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.floorplan-room-name {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text);
}
.floorplan-room-sqft {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: auto;
  font-family: var(--font-mono);
}

/* ── FLOOR PLAN RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
  .floorplan-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .floorplan-toolbar-left,
  .floorplan-toolbar-right {
    justify-content: center;
  }
  .floorplan-canvas {
    min-height: 320px;
  }
  .floorplan-stats {
    gap: 12px;
    justify-content: center;
    text-align: center;
  }
  .floorplan-rooms {
    grid-template-columns: 1fr 1fr;
  }
}


/* ── AI REFINEMENT CHAT ─────────────────────────────── */
.refine-panel {
  margin-top: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.refine-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.refine-header:hover {
  background: var(--bg-card);
}
.refine-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.refine-header-icon {
  color: var(--accent);
  font-size: 1.1rem;
}
.refine-header-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.refine-chevron {
  color: var(--text-dim);
  font-size: 1rem;
  transition: transform 0.3s var(--ease);
}
.refine-panel.open .refine-chevron {
  transform: rotate(180deg);
}
.refine-body {
  display: none;
  padding: 0 20px 20px;
}
.refine-panel.open .refine-body {
  display: block;
}

/* Messages */
.refine-messages {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 4px 0;
}
.refine-msg {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.78rem;
  line-height: 1.55;
  max-width: 85%;
  word-break: break-word;
}
.refine-msg-ai {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  align-self: flex-start;
}
.refine-msg-user {
  background: var(--accent-dim);
  color: var(--accent-light);
  align-self: flex-end;
}

/* Typing indicator */
.refine-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  align-self: flex-start;
}
.refine-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: refineBounce 1.2s ease infinite;
}
.refine-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.refine-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes refineBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Suggestion chips */
.refine-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.refine-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.refine-chip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-dim);
}

/* Input row */
.refine-input-row {
  display: flex;
  gap: 8px;
}
.refine-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.78rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}
.refine-input:focus {
  border-color: var(--accent);
}
.refine-input::placeholder {
  color: var(--text-dim);
}
.refine-send {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  border: none;
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.refine-send:hover {
  background: var(--accent-light);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .refine-messages {
    max-height: 220px;
  }
  .refine-msg {
    max-width: 92%;
  }
}


/* ═══════════════════════════════════════════════════════
   PHASE 4 — 3D MODEL VIEWER
   ═══════════════════════════════════════════════════════ */

/* ── 3D Toolbar ────────────────────────────────────── */
.three-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.three-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.three-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle buttons */
.three-toggle {
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.three-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.three-toggle.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── 3D Canvas ─────────────────────────────────────── */
.three-canvas {
  width: 100%;
  min-height: 500px;
  max-height: 75vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: #0A1628;
}
.three-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

/* Placeholder */
.three-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.three-placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}

/* Loading overlay */
.three-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.85);
  z-index: 10;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.three-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Controls hint */
.three-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
  font-size: 0.68rem;
  color: var(--text-dim);
}
.three-hint span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Walkthrough HUD */
.walk-hud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(transparent, rgba(10,22,40,0.85));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 10;
}
.walk-hud > * { pointer-events: auto; }
.walk-hud-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.walk-hud-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.walk-hud-exit {
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #FF5252;
  background: rgba(255,82,82,0.10);
  border: 1px solid rgba(255,82,82,0.30);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.walk-hud-exit:hover {
  background: rgba(255,82,82,0.20);
  border-color: rgba(255,82,82,0.50);
}
.walk-dpad {
  display: none;
  position: relative;
  width: 90px;
  height: 90px;
}
.walk-dpad-btn {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.walk-dpad-btn:active { background: rgba(212,160,48,0.25); }
.walk-dpad-up    { top: 0; left: 50%; transform: translateX(-50%); }
.walk-dpad-down  { bottom: 0; left: 50%; transform: translateX(-50%); }
.walk-dpad-left  { top: 50%; left: 0; transform: translateY(-50%); }
.walk-dpad-right { top: 50%; right: 0; transform: translateY(-50%); }

@media (max-width: 768px) {
  .walk-dpad { display: block; }
  .walk-hud-label { display: none; }
  .walk-hud { padding: 8px 12px; }
}

/* ── 3D Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .three-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .three-toolbar-left,
  .three-toolbar-right {
    justify-content: center;
  }
  .three-canvas {
    min-height: 350px;
  }
  .three-hint {
    flex-wrap: wrap;
    gap: 10px;
  }
}


/* ═══════════════════════════════════════════════════════
   PHASE 5 — COST ESTIMATION
   ═══════════════════════════════════════════════════════ */

/* ── COST CONTAINER ────────────────────────────────── */
.cost-container {
  max-width: 740px;
}

/* ── COST HERO (total cost highlight) ──────────────── */
.cost-hero {
  background: linear-gradient(135deg, rgba(20,38,64,1) 0%, rgba(15,30,54,1) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.cost-hero::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent), var(--gold));
}
.cost-hero-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.cost-hero-total {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.cost-hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.cost-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cost-hero-stat-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.cost-hero-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── COST TOOLBAR ──────────────────────────────────── */
.cost-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cost-toolbar-left {
  display: flex;
  gap: 10px;
}
.cost-toolbar-right {
  display: flex;
  gap: 10px;
}

/* ── CATEGORY BREAKDOWN ────────────────────────────── */
.cost-section-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.cost-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.cost-row {
  display: grid;
  grid-template-columns: 170px 1fr 90px 50px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(65, 145, 220, 0.06);
}
.cost-row:last-child {
  border-bottom: none;
}
.cost-row-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.cost-row-bar-wrap {
  height: 8px;
  background: rgba(65, 145, 220, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.cost-row-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.8s var(--ease);
}
.cost-row-bar.gold { background: var(--gold); }
.cost-row-bar.teal { background: #4DB6AC; }
.cost-row-bar.purple { background: #9575CD; }
.cost-row-bar.orange { background: #FFB74D; }
.cost-row-bar.green { background: #81C784; }
.cost-row-amount {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
  text-align: right;
  font-weight: 500;
}
.cost-row-pct {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: right;
}

/* ── COST NOTES ────────────────────────────────────── */
.cost-notes {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
}
.cost-notes-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cost-note-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.cost-note-bullet {
  color: var(--gold);
  font-size: 0.6rem;
  margin-top: 4px;
  flex-shrink: 0;
}

/* ── COST DISCLAIMER ───────────────────────────────── */
.cost-disclaimer {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 16px 20px;
  background: rgba(65, 145, 220, 0.04);
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
}

/* ── COST PLACEHOLDER / GENERATE ───────────────────── */
.cost-placeholder {
  text-align: center;
  padding: 60px 24px;
}
.cost-placeholder-icon {
  font-size: 2.4rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.cost-placeholder p {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 20px;
}
.btn-estimate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A1628;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 160, 48, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-estimate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 160, 48, 0.35);
}
.btn-estimate:active {
  transform: translateY(0);
}

/* ── COST LOADING STATE ────────────────────────────── */
.cost-loading {
  text-align: center;
  padding: 60px 24px;
}
.cost-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
.cost-loading p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ── LOCATION SELECTOR ────────────────────────────── */
.cost-location {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
}
.cost-location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cost-location-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cost-location-active {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
}

/* ── Region pills row ── */
.cost-region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.cost-region-pill {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.cost-region-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.cost-region-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── State + ZIP row ── */
.cost-location-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.cost-loc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 160px;
}
.cost-loc-field.zip-field {
  flex: 0 0 140px;
  min-width: 120px;
}
.cost-loc-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.cost-loc-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 32px 9px 12px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A8FA8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.cost-loc-select:hover {
  border-color: var(--border-hover);
}
.cost-loc-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65, 145, 220, 0.15);
}
.cost-loc-select option {
  background: var(--bg-card);
  color: var(--text);
}
.cost-zip-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  transition: border-color 0.2s;
  width: 100%;
}
.cost-zip-input:hover {
  border-color: var(--border-hover);
}
.cost-zip-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65, 145, 220, 0.15);
}
.cost-zip-input::placeholder {
  color: var(--text-dim);
}
.cost-zip-status {
  font-size: 0.68rem;
  margin-top: 4px;
  min-height: 16px;
  transition: color 0.2s;
}
.cost-zip-status.resolved {
  color: #4DB6AC;
}
.cost-zip-status.error {
  color: var(--danger);
}
.cost-zip-status.loading {
  color: var(--text-dim);
}

/* ── Location divider ── */
.cost-loc-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}
.cost-loc-divider::before,
.cost-loc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.cost-loc-divider span {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ── FINISH LEVEL SELECTOR ────────────────────────── */
.cost-finish {
  background: rgba(15, 30, 54, 0.60);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(65, 145, 220, 0.10);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.03);
}
.cost-finish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cost-finish-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cost-finish-active {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
}
.cost-finish-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cost-finish-pill {
  flex: 1;
  min-width: 90px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cost-finish-pill:hover {
  border-color: var(--border-hover);
}
.cost-finish-pill.active {
  border-color: var(--gold);
  background: rgba(212, 160, 48, 0.08);
}
.cost-finish-pill-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.cost-finish-pill.active .cost-finish-pill-name {
  color: var(--gold-light);
}
.cost-finish-pill-mult {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}
.cost-finish-pill.active .cost-finish-pill-mult {
  color: var(--gold);
}

/* ── COST RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  .cost-hero {
    padding: 24px 20px;
  }
  .cost-hero-total {
    font-size: 2.2rem;
  }
  .cost-hero-meta {
    gap: 16px;
  }
  .cost-finish {
    padding: 18px 16px;
  }
  .cost-finish-pill {
    min-width: 75px;
    padding: 10px 12px;
  }
  .cost-row {
    grid-template-columns: 120px 1fr 80px 44px;
    gap: 8px;
  }
  .cost-row-name {
    font-size: 0.72rem;
  }
  .cost-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .cost-toolbar-left,
  .cost-toolbar-right {
    justify-content: center;
  }
  .cost-location {
    padding: 18px 16px;
  }
  .cost-region-pill {
    padding: 6px 12px;
    font-size: 0.68rem;
  }
  .cost-loc-field {
    min-width: 140px;
  }
  .cost-loc-field.zip-field {
    flex: 0 0 120px;
  }
}
@media (max-width: 480px) {
  .cost-row {
    grid-template-columns: 1fr 70px;
    gap: 6px;
  }
  .cost-row-bar-wrap {
    display: none;
  }
  .cost-row-pct {
    display: none;
  }
  .cost-location-row {
    flex-direction: column;
  }
  .cost-loc-field,
  .cost-loc-field.zip-field {
    flex: 1 1 100%;
    min-width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS POLISH
   ═══════════════════════════════════════════════════════ */

/* ── Prevent iOS zoom on form inputs ─────────────── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select,
  .cost-loc-select,
  .cost-zip-input {
    font-size: 16px !important;
  }
}

/* ── Mobile touch & glass polish ─────────────── */
@media (max-width: 768px) {
  /* Minimum 44px touch targets (Apple HIG) */
  .fp-btn, .cost-finish-pill, .chip, .cost-region-pill, .floor-tab-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Glass sidebar fallback — mobile doesn't always support backdrop-filter well */
  .mobile-nav {
    background: rgba(10, 22, 40, 0.92);
  }

  /* Toast closer to thumb reach */
  .toast {
    bottom: calc(80px + var(--safe-bottom));
  }

  /* Auth card centered better on short screens */
  .auth-overlay {
    align-items: center;
    padding: 16px;
  }

  /* Floorplan room chips — full width on small screens */
  .floorplan-rooms {
    grid-template-columns: 1fr;
  }

  /* Cost rows stagger faster on mobile */
  .stagger-in {
    animation-delay: calc(var(--i, 0) * 40ms);
  }
}

@media (max-width: 380px) {
  /* Extra small screens */
  .screen-title { font-size: 1.2rem; }
  .screen-header { margin-bottom: 20px; }
  .land-hero-title { font-size: 2rem; }
  .cost-hero { padding: 20px 16px; }
  .cost-hero-total { font-size: 1.8rem; }
  .fp-btn { padding: 6px 10px; font-size: 0.68rem; }
}

/* ── Floor plan + 3D at 480px ────────────────────── */
@media (max-width: 480px) {
  .floorplan-canvas {
    min-height: 280px;
    touch-action: none;
  }
  .floorplan-stats {
    flex-direction: column;
    gap: 8px;
  }
  .floorplan-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .floorplan-toolbar .fp-btn,
  .floorplan-toolbar .fp-btn-gold {
    padding: 7px 12px;
    font-size: 0.68rem;
  }
  .floorplan-rooms {
    grid-template-columns: 1fr;
  }

  .three-canvas {
    min-height: 300px;
  }
  .three-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .three-toggle {
    padding: 6px 10px;
    font-size: 0.65rem;
  }
}

/* ── Material Picker ─────────────────────────────── */
.material-picker {
  margin: 12px 0 8px;
  padding: 14px 16px;
  background: rgba(15, 30, 54, 0.60);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(65, 145, 220, 0.10);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
}
.material-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.material-row + .material-row {
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 4px;
  padding-top: 10px;
}
.material-label {
  min-width: 90px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.material-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.material-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
}
.material-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(212,160,48,0.25);
}
.material-swatch.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212,160,48,0.30), 0 0 12px rgba(212,160,48,0.15);
}
@media (max-width: 768px) {
  .material-label { min-width: 72px; font-size: 0.68rem; }
  .material-swatch { width: 26px; height: 26px; }
  .material-picker { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .material-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .material-label { min-width: auto; }
}

/* ── Share Modal ─────────────────────────────────── */
.share-url-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  margin-bottom: 14px;
  outline: none;
}
.share-url-input:focus {
  border-color: var(--gold);
}

/* ── Viewer Mode (shared project) ────────────────── */
.viewer-layout {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.viewer-header {
  text-align: center;
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.viewer-brand {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.viewer-title {
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 600;
}
.viewer-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.viewer-section {
  margin-bottom: 28px;
}
.viewer-section h3 {
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  font-weight: 600;
}
.viewer-floorplan {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  overflow: auto;
}
.viewer-floorplan svg {
  max-width: 100%;
  height: auto;
}
.viewer-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.viewer-spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.viewer-spec-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.viewer-spec-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.viewer-cost {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.viewer-cost-total {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 10px;
}
.viewer-cost-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.78rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.viewer-cost-row:first-child { border-top: none; }
.viewer-cost-cat { color: var(--text-muted); }
.viewer-cost-val { color: var(--text); font-weight: 600; }
.viewer-cta-wrap {
  text-align: center;
  margin-top: 32px;
}
.viewer-cta {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A1628;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: transform 0.2s, box-shadow 0.2s;
}
.viewer-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212,160,48,0.35);
}

/* ── Tiny screens (375px) ────────────────────────── */
@media (max-width: 375px) {
  .screen-title {
    font-size: 1.15rem;
  }
  .screen-subtitle {
    font-size: 0.72rem;
  }
  .app-screen {
    padding: 16px 12px calc(72px + var(--safe-bottom));
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .cost-hero-meta {
    flex-direction: column;
    gap: 10px;
  }
  .cost-hero-total {
    font-size: 1.6rem;
  }
  .cost-finish-pill {
    min-width: 65px;
    padding: 8px 8px;
  }
  .cost-finish-pill-name {
    font-size: 0.72rem;
  }
}
