:root {
  --bg: #f7f3ed;
  --bg-soft: #fbf8f3;
  --bg-card: rgba(255, 252, 247, 0.92);
  --bg-card-strong: #fffdf9;
  --text: #2f2b26;
  --text-soft: #817d75;
  --text-muted: #9e998f;
  --line: rgba(214, 206, 194, 0.72);
  --line-strong: rgba(176, 166, 147, 0.38);
  --primary: #6a7d59;
  --primary-dark: #596b4c;
  --primary-soft: rgba(106, 125, 89, 0.16);
  --purple: #bd6df3;
  --purple-dark: #aa58ea;
  --mint: #dcebe4;
  --mint-strong: #d3e6dc;
  --pill-shadow: 0 18px 40px rgba(76, 63, 47, 0.09);
  --card-shadow: 0 24px 60px rgba(82, 68, 49, 0.08);
  --soft-shadow: 0 12px 28px rgba(88, 73, 52, 0.06);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --accent-red: #d9534f;
  --accent-gold: #c5a059;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #ded8cf transparent;
  scrollbar-gutter: stable;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ded8cf;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c18c5d;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(227, 205, 173, 0.28), transparent 22%),
    radial-gradient(circle at 84% 8%, rgba(244, 231, 210, 0.34), transparent 18%),
    radial-gradient(circle at 18% 84%, rgba(215, 225, 208, 0.16), transparent 18%),
    linear-gradient(180deg, #f8f5f0 0%, var(--bg) 100%);
}

body.workspace-open {
  overflow-y: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.84), transparent 26%),
    radial-gradient(circle at 78% 68%, rgba(255, 255, 255, 0.52), transparent 24%);
  opacity: 0.9;
}

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

button {
  border: 0;
  background: none;
  color: inherit;
}

select {
  color: inherit;
}

.hidden {
  display: none !important;
}

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

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #ded8cf transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(222, 216, 207, 0.8);
  border-radius: 999px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
  background: rgba(248, 245, 240, 0.76);
  border-bottom: 1px solid rgba(223, 214, 201, 0.56);
}

.topbar__inner {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-text {
  font-family: "Fraunces", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #2f2c27;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(108, 126, 95, 0.66);
  background: transparent;
  color: #5d7052;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.topbar-cta:hover {
  background: rgba(106, 125, 89, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(88, 108, 71, 0.1);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  color: rgba(88, 81, 72, 0.85);
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.lang-switch select {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
  outline: none;
  cursor: pointer;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100vw - 64px));
  margin: 0 auto;
  min-height: calc(100vh - 24px);
  padding-bottom: 80px;
}

.hero-state {
  display: grid;
  gap: 64px;
  min-height: calc(100vh - 60px);
  padding: 112px 0 80px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms ease, transform 650ms ease;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-state.opacity-0,
.hero-state.is-exiting {
  opacity: 0;
  transform: translateY(-24px);
  pointer-events: none;
}

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 72px;
  align-items: start;
  min-height: auto;
  grid-template-areas: "media content";
}

.landing-hero__media {
  grid-area: media;
  position: relative;
  min-height: 720px;
  padding: 34px;
  border-radius: 42px;
  overflow: hidden;
  background: rgba(255, 251, 246, 0.78);
  border: 1px solid rgba(224, 216, 205, 0.82);
  box-shadow: 0 30px 70px rgba(83, 69, 50, 0.12);
}

.landing-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 30px;
}

.landing-hero__glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(251, 247, 241, 0.92) 100%);
  pointer-events: none;
}

.landing-hero__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  max-width: 820px;
  padding-top: 0;
}

.hero-eyebrow {
  margin: 0;
  color: #a29d93;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.landing-hero__title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(80px, 6vw, 128px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: #2d2a26;
  text-wrap: balance;
  max-width: 760px;
  margin-top: 2px;
  margin-bottom: 10px;
}

.hero-title-line {
  display: inline-block;
  white-space: nowrap;
}

.hero-title-line--muted {
  color: #5f5951;
}

.landing-hero__body {
  margin: 0;
  max-width: 36ch;
  color: #8b857c;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.72;
  margin-top: 6px;
}

.hero-drop-zone {
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
  max-width: 420px;
  margin-top: 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hero-drop-zone.is-dragover {
  transform: translateY(-2px);
}

.hero-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6e815f 0%, #5f7350 100%);
  color: #f8f5ef;
  box-shadow: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  align-self: center;
}

.hero-cta:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.hero-cta__copy {
  display: grid;
  gap: 0;
  text-align: center;
}

.hero-cta__copy strong {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-title-break {
  display: none;
}

@media (min-width: 761px) {
  .hero-title-break {
    display: block;
  }
}

.landing-section {
  display: grid;
  gap: 28px;
}

.landing-section--steps {
  padding-top: 180px;
}

.landing-section--social {
  padding-top: 180px;
}

.section-heading {
  max-width: 760px;
  display: grid;
  gap: 12px;
}

.section-heading__eyebrow {
  color: #6d7e5e;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 3.2vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #2f2b26;
}

.section-heading p {
  margin: 0;
  max-width: 700px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.6;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.how-step-card {
  min-height: 236px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(220, 213, 202, 0.74);
  box-shadow: var(--card-shadow);
  display: grid;
  align-content: start;
  gap: 18px;
}

.how-step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(106, 125, 89, 0.1);
  color: #5c6f4e;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.how-step-card__icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  color: #7b786f;
}

.how-step-card__icon svg {
  width: 100%;
  height: 100%;
}

.how-step-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #35312b;
}

.how-step-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.6;
}

.social-proof-grid {
  column-count: 3;
  column-gap: 18px;
}

.social-card {
  break-inside: avoid;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(220, 213, 202, 0.74);
  box-shadow: var(--card-shadow);
}

.social-card__image-wrap {
  position: relative;
  overflow: hidden;
}

.social-card--tall .social-card__image-wrap {
  aspect-ratio: 4 / 5.2;
}

.social-card--mid .social-card__image-wrap {
  aspect-ratio: 4 / 4.4;
}

.social-card--short .social-card__image-wrap {
  aspect-ratio: 4 / 3.8;
}

.social-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}

.social-card__meta {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
}

.social-card__tag {
  color: #6f7f60;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.social-card__meta strong {
  font-size: 17px;
  font-weight: 900;
  color: #3b3731;
}

/* Guides Section [AEO Optimized] */
.landing-section--guides {
  padding-top: 120px;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.guide-card {
  text-decoration: none;
  background: white;
  border: 1px solid rgba(106, 125, 89, 0.12);
  border-radius: 32px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.guide-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 48px rgba(106, 125, 89, 0.08);
}

.guide-card__tag {
  display: inline-flex;
  padding: 6px 14px;
  background: rgba(106, 125, 89, 0.08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  width: fit-content;
}

.guide-card__title {
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 700;
  color: #2F2C27;
  line-height: 1.25;
}

.guide-card__body {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
  flex: 1;
}

.guide-card__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 13px;
  color: var(--primary);
  opacity: 0.6;
}

@media (max-width: 960px) {
  .guides-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Guide Page Layout */
.guide-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1440px;
  margin: 0 auto;
  padding: 80px 60px 80px;
  gap: 80px;
}

.guide-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.guide-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-sidebar__section-title {
  font-size: 13px;
  font-weight: 800;
  color: #8b857a;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  margin-left: 12px;
}

.guide-sidebar__link {
  display: block;
  padding: 14px 18px;
  border-radius: 14px;
  color: #4A4640;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-sidebar__link:hover {
  background: rgba(106, 125, 89, 0.05);
  transform: translateX(4px);
  color: #5c6f4e;
}

.guide-sidebar__link.is-active {
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  color: #2F2C27;
}

.guide-content {
  max-width: 800px;
}

.guide-article {
  background: white;
  padding: 80px;
  border-radius: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.02);
}

@media (max-width: 1024px) {
  .guide-layout {
    grid-template-columns: 1fr;
    padding: 120px 24px 60px;
    gap: 40px;
  }
  .guide-sidebar {
    position: static;
    display: none; /* Hide sidebar on mobile for now or make it a drawer */
  }
  .guide-article {
    padding: 40px 24px;
    border-radius: 24px;
  }
}

.workspace-state {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 0;
  padding: 14px 0 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.workspace-state.is-visible,
.workspace-state:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

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

.workspace-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.workspace-title__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #f0eee6;
  color: #75836d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.workspace-title__icon svg {
  width: 18px;
  height: 18px;
}

.workspace-title h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 38px;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.replace-image-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(217, 210, 199, 0.9);
  background: rgba(255, 253, 249, 0.88);
  box-shadow: var(--soft-shadow);
  color: #5d5953;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.replace-image-btn__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.replace-image-btn__icon svg {
  width: 100%;
  height: 100%;
}

.workspace-divider {
  margin-top: 14px;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 209, 197, 0), rgba(216, 209, 197, 0.7) 16%, rgba(216, 209, 197, 0.7) 84%, rgba(216, 209, 197, 0));
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 25vw, 420px);
  grid-template-areas: "center right";
  gap: clamp(20px, 2vw, 32px);
  align-items: stretch;
}

.workspace-sidebar--right {
  grid-area: right;
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.canvas-panel--center {
  grid-area: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  background: none;
  border: none;
  box-shadow: none;
}


.workspace-sidebar {
  display: grid;
  gap: 10px;
  overflow-y: visible;
  padding-right: 8px;
}

.control-card,
.summary-card-legacy-remove-legacy-remove,
.canvas-panel {
  position: relative;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(220, 213, 202, 0.4);
  /* Softer borders */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--card-shadow);
}

.control-card,
.summary-card-legacy-remove-legacy-remove {
  border-radius: 28px;
}

.control-card {
  padding: 14px 14px 12px;
}

.control-card__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(242, 238, 230, 0.88), rgba(248, 244, 237, 0.78));
  color: #4e4a44;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- HUD BOTTOM BAR --- */
.canvas-hud {
  margin-top: 24px;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(220, 213, 202, 0.6);
  box-shadow: 0 8px 32px rgba(50, 45, 38, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  z-index: 20;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-group--actions {
  border-left: 1px solid rgba(216, 209, 197, 0.6);
  border-right: 1px solid rgba(216, 209, 197, 0.6);
  padding: 0 10px;
}

.hud-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: #605c55;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 160ms ease;
  border: 1px solid transparent;
}

.hud-btn:hover {
  background: rgba(240, 236, 228, 0.8);
  color: #2f2c27;
  border-color: rgba(220, 213, 202, 0.8);
}

.hud-select {
  height: 38px;
  padding: 0 32px 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(220, 213, 202, 0.8);
  color: #4e4a44;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.zoom-dock.in-hud {
  position: static;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: 38px;
  transform: none;
}

.canvas-toolbar {
  display: none !important;
}

.control-card__icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.control-card__icon svg {
  width: 100%;
  height: 100%;
}

.field-block {
  margin-top: 10px;
}

.field-block__label {
  display: inline-block;
  color: #9b9489;
  font-size: 12px;
  font-weight: 800;
}

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

.field-block__meta {
  color: #928a80;
  font-size: 11px;
  font-weight: 800;
}

.field-block__row #targetBudgetVal {
  color: #898277;
  font-size: 12px;
  font-weight: 800;
}

.segmented-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.segmented-group--dual {
  grid-template-columns: repeat(2, 1fr);
}

.segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.86);
  color: #a29b90;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.segment-btn svg {
  width: 18px;
  height: 18px;
}

.segment-btn.is-active svg {
  color: #677857;
}

.segment-btn.is-active {
  border-color: rgba(116, 134, 99, 0.72);
  color: #677857;
  background: #fcfbf7;
  box-shadow: inset 0 0 0 1px rgba(116, 134, 99, 0.18);
}

.route-option-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.route-option {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.9);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.route-option:hover {
  transform: translateY(-1px);
}

.route-option.is-active {
  border-color: rgba(116, 134, 99, 0.78);
  background: rgba(238, 245, 234, 0.82);
}

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

.route-option__name,
.route-option__price {
  color: #4f4a43;
  font-size: 13px;
  font-weight: 900;
}

.route-option__meta {
  color: #8a8277;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.preset-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(224, 217, 205, 0.4);
  background: rgba(255, 253, 249, 0.6);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.preset-button:hover {
  background: rgba(255, 253, 249, 0.9);
  border-color: rgba(224, 217, 205, 0.8);
  transform: translateY(-1px);
}

.preset-button.is-active {
  background: #fdfaf5;
  border-color: #748663;
  box-shadow: 0 4px 12px rgba(116, 134, 99, 0.08);
}

.preset-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}

.preset-label {
  font-size: 14px;
  font-weight: 800;
  color: #2b2824;
}

.preset-dims {
  font-size: 11px;
  font-weight: 600;
  color: #8c867a;
  letter-spacing: 0.02em;
}

.baseplate-visual {
  transform: scale(0.8);
  display: grid;
  gap: 2px;
  padding: 4px;
  background: rgba(230, 225, 217, 0.2);
  border-radius: 6px;
}

.baseplate-dot {
  width: 8px;
  height: 8px;
  background: rgba(140, 134, 122, 0.15);
  border-radius: 2px;
}

.preset-button.is-active .baseplate-dot {
  background: rgba(116, 134, 99, 0.3);
}

.assistive-copy {
  margin-top: 6px;
  color: #a19a90;
  font-size: 11px;
  font-weight: 800;
}

.detail-slider,
.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(214, 206, 194, 0.82);
  outline: none;
}

.detail-slider {
  margin-top: 10px;
}

.detail-slider::-webkit-slider-thumb,
.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0;
  background: #6e835e;
  box-shadow: 0 6px 16px rgba(78, 102, 57, 0.28);
  cursor: pointer;
}

.detail-slider::-moz-range-thumb,
.zoom-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0;
  background: #6e835e;
  box-shadow: 0 6px 16px rgba(78, 102, 57, 0.28);
  cursor: pointer;
}

.advanced-settings {
  margin-top: 12px;
  border-top: 1px solid rgba(230, 223, 212, 0.86);
  padding-top: 10px;
}

.legacy-hidden {
  display: none !important;
}

.fold-card {
  border: 1px solid rgba(220, 213, 202, 0.74);
  background: rgba(255, 252, 247, 0.9);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
}

.fold-card[open] {
  padding-bottom: 10px;
}

.fold-card__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}

.fold-card__summary::after,
.review-drawer__summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.6px solid #6c665d;
  border-bottom: 1.6px solid #6c665d;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.fold-card__summary::-webkit-details-marker {
  display: none;
}

.fold-card[open] .fold-card__summary::after,
.review-drawer[open] .review-drawer__summary::after {
  transform: rotate(-135deg);
  margin-top: 5px;
}

.control-card__label--summary {
  flex: none;
}

.fold-card__hint {
  color: #928a80;
  font-size: 12px;
  font-weight: 700;
}

.fold-card__body {
  display: grid;
  gap: 12px;
  padding: 0 14px 4px;
}

.advanced-settings summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4e4a44;
  font-size: 13px;
  font-weight: 800;
}

.advanced-settings summary::-webkit-details-marker {
  display: none;
}

.advanced-settings summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.6px solid #6c665d;
  border-bottom: 1.6px solid #6c665d;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.advanced-settings[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 5px;
}

.advanced-settings__body {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.advanced-settings__group {
  display: grid;
  gap: 10px;
}

.advanced-settings__title,
.advanced-settings__title-row {
  color: #6d665d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.advanced-settings__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.secondary-select {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.92);
  padding: 0 14px;
  color: #4e4a44;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.route-meta {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 241, 233, 0.88);
}

.route-meta strong,
.route-meta span {
  color: #677857;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.route-meta p {
  margin: 0;
  color: #7f786e;
  font-size: 13px;
  line-height: 1.5;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f5c55;
  font-size: 14px;
  font-weight: 700;
}

.toggle-row input {
  accent-color: #6a7d59;
}

.bg-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bg-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.92);
  color: #69645b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bg-choice.is-active {
  border-color: rgba(116, 134, 99, 0.68);
  background: rgba(222, 232, 216, 0.78);
  color: #536447;
}

.bg-choice__swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(201, 194, 183, 0.86);
}

/* ── Background panel ── */

.bg-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bg-status-hint {
  font-size: 11px;
  color: #8c867a;
  white-space: nowrap;
}

.bg-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(111, 130, 93, 0.28);
  border-top-color: rgba(111, 130, 93, 0.95);
  animation: three-spinner 0.8s linear infinite;
  flex-shrink: 0;
}

.bg-options-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity .25s ease,
              margin-top .3s ease;
  margin-top: 0;
}

.bg-options-panel.is-open {
  max-height: 140px;
  opacity: 1;
  margin-top: 14px;
}

.bg-swatch-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bg-swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(201, 194, 183, 0.86);
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color .2s ease,
              box-shadow .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bg-swatch:hover {
  transform: scale(1.12);
}

.bg-swatch.is-active {
  border-color: rgba(116, 134, 99, 0.85);
  box-shadow: 0 0 0 2px rgba(116, 134, 99, 0.35), 0 1px 3px rgba(0, 0, 0, 0.08);
  transform: scale(1.15);
}

.bg-skip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: #6b665d;
  cursor: pointer;
  user-select: none;
}
.bg-skip-row input[type="checkbox"] {
  accent-color: #748663;
  margin: 0;
}
.bg-saved-hint {
  display: block;
  font-size: 11px;
  color: #748663;
  font-weight: 600;
  margin-top: 8px;
  padding-left: 2px;
}

/* ── Secondary / Export buttons ── */

.secondary-action-btn,
.mini-action-btn,
.mini-export-btn {
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.92);
  color: #5a564f;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.secondary-action-btn:hover,
.mini-action-btn:hover,
.mini-export-btn:hover {
  transform: translateY(-1px);
}

.secondary-action-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.mini-action-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.status-note {
  color: #8c867b;
  font-size: 12px;
  font-weight: 800;
}

.summary-card-legacy-remove-legacy-remove {
  padding: 12px;
  background:
    linear-gradient(146deg, rgba(223, 238, 231, 0.98) 0%, rgba(218, 233, 227, 0.92) 54%, rgba(205, 228, 218, 0.94) 100%);
  overflow: hidden;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-card-legacy-remove-legacy-remove::before {
  content: "";
  position: absolute;
  inset: auto -20px -32px auto;
  width: 180px;
  height: 90px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
  transform: rotate(-20deg);
}

.summary-card-legacy-remove-legacy-remove__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.summary-card-legacy-remove-legacy-remove__metric {
  display: grid;
  gap: 4px;
}

.summary-card-legacy-remove-legacy-remove__metric--price {
  text-align: right;
}

.summary-card-legacy-remove-legacy-remove__label {
  color: #73806a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.summary-card-legacy-remove-legacy-remove__metric strong {
  color: #445246;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.summary-card-legacy-remove-legacy-remove__sr {
  position: absolute;
  inset: auto auto 9999px 9999px;
}

.build-shell {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.build-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #6c805b 0%, #617351 100%);
  color: #f6f5ef;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(88, 108, 71, 0.16);
}

.build-btn:disabled {
  opacity: 0.58;
  cursor: default;
  box-shadow: none;
}

.build-btn__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.build-btn__icon svg {
  width: 100%;
  height: 100%;
}

.unlock-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.unlock-panel__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.unlock-panel__status {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #778b66 0%, #657853 100%);
  color: #f6f4ec;
  box-shadow: 0 12px 26px rgba(93, 112, 76, 0.18);
}

.unlock-panel__status span {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.mini-export-btn {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}

.mini-export-btn--primary {
  width: 100%;
  background: #2b2621;
  border-color: rgba(43, 38, 33, 0.96);
  color: #fffaf2;
  box-shadow: 0 12px 24px rgba(43, 38, 33, 0.14);
}

.mini-export-btn--primary:hover {
  border-color: rgba(43, 38, 33, 0.96);
}

.mini-export-btn--secondary {
  width: 100%;
  background: rgba(255, 252, 247, 0.62);
}

.unlock-panel__meta {
  display: grid;
  gap: 6px;
  color: #64715d;
  font-size: 12px;
  font-weight: 700;
}

.legend-list {
  display: grid;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.canvas-panel {
  min-height: clamp(596px, 72vh, 860px);
  padding: 14px;
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.92);
}

.review-drawer {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(198, 213, 203, 0.48);
}

.review-drawer__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
}

.review-drawer__summary::-webkit-details-marker {
  display: none;
}

.review-drawer__eyebrow {
  color: #758168;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.review-drawer__summary-text {
  color: #70806e;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.review-drawer__body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.review-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-metric-card {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.74);
  border: 1px solid rgba(201, 211, 203, 0.48);
}

.review-metric-card__label {
  color: #73806a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.review-metric-card strong {
  color: #465448;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.warning-list__empty,
.warning-pill {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.8);
  border: 1px solid rgba(221, 206, 190, 0.68);
  color: #7b7368;
  font-size: 12px;
  line-height: 1.45;
}

.warning-pill--high {
  background: rgba(255, 243, 241, 0.88);
  border-color: rgba(215, 151, 137, 0.54);
  color: #8c5448;
}

.warning-pill--medium {
  background: rgba(255, 249, 239, 0.88);
  border-color: rgba(216, 188, 134, 0.56);
  color: #8d6e31;
}

.route-comparison-list {
  display: grid;
  gap: 8px;
}

.route-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.74);
  border: 1px solid rgba(201, 211, 203, 0.48);
}

.route-card.is-active {
  border-color: rgba(107, 126, 90, 0.54);
  background: rgba(238, 245, 234, 0.78);
}

.route-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.route-card__title {
  color: #465448;
  font-size: 13px;
  font-weight: 900;
}

.route-card__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(114, 129, 97, 0.12);
  color: #5b6d4d;
  font-size: 11px;
  font-weight: 900;
}

.route-card__meta,
.route-card__note {
  color: #73806a;
  font-size: 12px;
  line-height: 1.45;
}

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

.canvas-toolbar__left,
.canvas-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.92);
  color: #70675e;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.toolbar-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.preview-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
  color: #70675e;
  font-size: 12px;
  font-weight: 900;
}

.preview-mode-select {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
  cursor: pointer;
}

.optimize-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(171, 94, 237, 0.24);
  cursor: pointer;
}

.optimize-btn__icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.optimize-btn__icon svg {
  width: 100%;
  height: 100%;
}

.optimize-btn:not(.is-active) {
  background: rgba(255, 253, 249, 0.98);
  color: #766f66;
  border: 1px solid rgba(224, 217, 205, 0.88);
  box-shadow: var(--soft-shadow);
}

.canvas-stage {
  position: relative;
  width: 100%;
  max-width: 900px;
  flex-shrink: 0;
  min-height: clamp(526px, 64vh, 790px);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdfa 0%, #fdfaf4 100%);
}

.canvas-stage.is-edit-mode .canvas-stage__crop-box {
  box-shadow:
    0 0 0 1px rgba(199, 189, 174, 0.3),
    0 0 0 200vmax rgba(18, 14, 10, 0.36);
}

.canvas-stage__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(186, 176, 159, 0.18) 0.75px, transparent 0.75px);
  background-size: 20px 20px;
}

.canvas-stage__image-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 4px;
  z-index: 1;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.canvas-stage__image-layer:active {
  cursor: grabbing;
}

.canvas-stage__backdrop-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #111;
  transition: opacity 0.3s;
  opacity: 0;
}

.canvas-stage.is-edit-mode .canvas-stage__backdrop-layer {
  opacity: 1;
}

.canvas-stage.is-edit-mode .canvas-stage__image-layer {
  box-shadow: none;
}

#originalView,
#backdropView {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  max-width: none;
  display: block;
  user-select: none;
  pointer-events: none;
}

#backdropView {
  filter: brightness(0.56) blur(1px);
}

.canvas-stage__crop-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(199, 189, 174, 0.12);
  z-index: 2;
  pointer-events: none;
}

.preview-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.three-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(22, 17, 13, 0.22);
  pointer-events: none;
}

.three-overlay.hidden {
  display: none;
}

.three-overlay__card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(226, 217, 202, 0.5);
  background: rgba(255, 252, 247, 0.94);
  color: #60584f;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(58, 48, 37, 0.2);
}

.three-overlay__spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(111, 130, 93, 0.28);
  border-top-color: rgba(111, 130, 93, 0.95);
  animation: three-spinner 0.8s linear infinite;
}

.three-overlay--error {
  background: rgba(25, 19, 14, 0.45);
  pointer-events: auto;
}

.three-overlay__card--error {
  display: grid;
  gap: 8px;
  min-height: auto;
  padding: 16px 18px;
  border-radius: 14px;
  min-width: 250px;
}

.three-overlay__card--error p {
  margin: 0;
  color: #6f6458;
  font-size: 12px;
  font-weight: 700;
}

@keyframes three-spinner {
  to {
    transform: rotate(360deg);
  }
}

.zoom-dock {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 230px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--pill-shadow);
  color: #807a72;
}

.zoom-dock__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
}

.zoom-dock__icon svg {
  width: 100%;
  height: 100%;
}

.palette-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 30px;
}

.palette-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 31, 25, 0.34);
  backdrop-filter: blur(12px);
}

.palette-modal__card {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(1280px, calc(100vw - 44px));
  max-height: min(92vh, 1040px);
  padding: 30px 32px 26px;
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.98);
  border: 1px solid rgba(220, 213, 202, 0.74);
  box-shadow: 0 28px 70px rgba(66, 56, 43, 0.16);
}

.palette-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.palette-modal__eyebrow {
  display: inline-block;
  color: #847467;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.palette-modal__header h3 {
  margin: 8px 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(36px, 3.4vw, 60px);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.palette-modal__close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.92);
  color: #70675e;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.palette-modal__actions,
.palette-modal__footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.palette-modal__actions {
  align-items: center;
}

.palette-modal__actions .secondary-action-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
}

.palette-modal__footer {
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px solid rgba(225, 217, 206, 0.72);
}

.palette-modal__summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.palette-modal__summary-primary {
  color: #3f392f;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.palette-modal__summary-secondary {
  color: #8d8579;
  font-size: 12px;
  font-weight: 700;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #6f835f 0%, #617551 100%);
  color: #f7f4ed;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 16px 30px rgba(94, 113, 78, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(94, 113, 78, 0.22);
}

.primary-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary-cta--small {
  min-width: 168px;
}

.palette-grid {
  display: grid;
  gap: 22px;
  max-height: min(58vh, 760px);
  overflow-y: auto;
  padding-right: 4px;
}

.palette-group {
  display: grid;
  gap: 14px;
}

.palette-group__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(225, 217, 206, 0.72);
}

.palette-group__title {
  color: #40392f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.palette-group__meta {
  color: #8e8679;
  font-size: 12px;
  font-weight: 700;
}

.palette-subgroup {
  display: grid;
  gap: 10px;
}

.palette-subgroup__title {
  color: #7d7569;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.palette-subgroup__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.palette-chip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 76px;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid rgba(213, 205, 193, 0.92);
  background: rgba(255, 252, 247, 0.96);
  color: #52594a;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.palette-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(146, 159, 126, 0.56);
  box-shadow: 0 12px 26px rgba(74, 65, 51, 0.07);
}

.palette-chip.is-active {
  border-color: rgba(205, 198, 187, 0.96);
  background: linear-gradient(180deg, rgba(247, 245, 239, 0.98), rgba(242, 238, 230, 0.94));
  color: #4f5f43;
}

.palette-chip.is-disabled {
  background: rgba(243, 239, 232, 0.76);
  color: #8b857c;
  opacity: 0.82;
}

.palette-chip.is-used {
  border-width: 2px;
  border-color: rgba(98, 116, 81, 0.98);
  box-shadow: 0 10px 22px rgba(97, 117, 81, 0.08), inset 0 0 0 1px rgba(239, 245, 233, 0.92);
}

.palette-chip__body {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.palette-chip__name {
  display: -webkit-box;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.22;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.palette-chip__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.palette-chip__swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(191, 183, 170, 0.92);
  flex: none;
  margin-top: 2px;
}

.palette-chip__tier {
  min-width: 0;
  color: #8a8075;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .palette-modal__card {
    width: min(100vw - 24px, 100%);
    padding: 22px 20px 20px;
  }

  .palette-modal__footer {
    align-items: stretch;
  }

  .palette-modal__summary {
    width: 100%;
  }

  .primary-cta--small {
    width: 100%;
  }

  .palette-grid {
    gap: 18px;
  }

  .palette-group__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .palette-subgroup__grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

.animate-bounce-slow {
  animation: bounce-slow 4s ease-in-out infinite;
}

.legend-empty {
  color: #817d75;
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 2px;
}

.legend-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(224, 217, 205, 0.88);
  background: rgba(255, 253, 249, 0.92);
}

.legend-item.is-locked {
  opacity: 0.6;
  filter: blur(2px);
}

.legend-item.is-locked-blur {
  opacity: 0.6;
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.unlock-benefits {
  margin-top: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(220, 213, 202, 0.6);
  border-radius: 12px;
  text-align: left;
}

.unlock-benefits__title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #4f4a43;
  margin-bottom: 8px;
}

.unlock-benefits__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unlock-benefits__list li {
  position: relative;
  padding-left: 18px;
  font-size: 12px;
  color: #6a645b;
  line-height: 1.4;
}

.unlock-benefits__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #5d7052;
  font-weight: 700;
}

.preview-pdf-link {
  color: #748663;
  text-decoration: underline;
  text-decoration-color: rgba(116, 134, 99, 0.4);
  text-underline-offset: 2px;
  font-weight: 700;
  margin-left: 4px;
}

.preview-pdf-link:hover {
  text-decoration-color: #748663;
}

.checkout-preview {
  margin-top: 8px;
  padding: 12px;
  background: rgba(43, 40, 36, 0.04);
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.benefits-accordion details {
  margin-top: 2px;
}

.benefits-accordion summary {
  cursor: pointer;
  user-select: none;
  font-weight: 400;
  /* Match other lis */
  list-style: none;
  /* Hide default arrow */
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.15s;
}

/* Hide webkit default arrow */
.benefits-accordion summary::-webkit-details-marker {
  display: none;
}

/* Custom animated chevron */
.benefits-accordion summary::after {
  content: "▾";
  font-size: 16px;
  color: #a39c90;
  transition: transform 0.25s ease;
}

.benefits-accordion details[open] summary::after {
  transform: rotate(180deg);
}

.benefits-accordion summary:hover {
  color: #4b463f;
}

.checkout-preview__title {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #5d5852;
  margin-bottom: 8px;
}

.mini-colors-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mini-colors-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6a645b;
}

.mini-colors-list .mini-color-name {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-colors-list .mini-color-count {
  font-weight: 700;
  color: #8c867a;
}

.mini-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(201, 194, 183, 0.86);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.legend-item__swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 194, 183, 0.86);
}

.legend-item__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.legend-item__name,
.legend-item__count {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-item__name {
  color: #4f4a43;
  font-size: 13px;
  font-weight: 800;
}

.legend-item__count {
  color: #8f887d;
  font-size: 12px;
  font-weight: 700;
}

.legend-item__price {
  color: #77644c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes bounce-slow {

  0%,
  100% {
    transform: translateY(0);
  }

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

@media (max-width: 1400px) {

  .site-shell,
  .topbar__inner {
    width: min(1280px, calc(100vw - 64px));
  }

  .hero-state {
    gap: 56px;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 56px;
  }

  .workspace-title h2 {
    font-size: 48px;
  }
}

@media (max-width: 1100px) {
  body:not(.workspace-open) {
    overflow: auto;
  }

  .site-shell,
  .topbar__inner {
    width: min(100vw - 32px, 100%);
  }

  .hero-state,
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .hero-state {
    min-height: auto;
    padding-bottom: 72px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 36px;
  }

  .landing-hero__media {
    min-height: 560px;
    order: 1;
  }

  .landing-hero__content {
    order: 2;
    max-width: none;
    padding-top: 0;
  }

  .how-it-works-grid {
    grid-template-columns: 1fr;
  }

  .social-proof-grid {
    column-count: 2;
  }

  .workspace-title h2 {
    font-size: 40px;
  }

  .workspace-sidebar {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .canvas-panel {
    min-height: 640px;
  }

  .canvas-stage {
    min-height: 560px;
  }
}

.steps-section-title {
  margin: 0;
  text-align: center;
  color: #a29d93;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .topbar__inner {
    min-height: 68px;
  }

  .brand-mark {
    font-size: 22px;
  }

  .topbar__actions {
    gap: 10px;
  }

  .topbar-cta {
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .landing-hero__title {
    font-size: 46px;
    line-height: 1.16;
  }


  .landing-hero__body,
  .section-heading p,
  .how-step-card p {
    font-size: 16px;
  }

  .hero-drop-zone,
  .hero-cta {
    width: 100%;
  }

  .landing-hero__media {
    min-height: 460px;
    padding: 18px;
  }

  .hero-cta {
    min-height: 72px;
    padding: 0 20px;
  }

  .hero-cta__copy strong {
    font-size: 24px;
  }

  .social-proof-grid {
    column-count: 1;
  }

  .landing-section {
    gap: 22px;
  }

  .workspace-header {
    flex-direction: column;
    align-items: stretch;
  }

  .replace-image-btn {
    justify-content: center;
  }

  .workspace-title h2 {
    font-size: 34px;
  }

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

  .canvas-panel {
    min-height: 520px;
    padding: 14px;
  }

  .canvas-stage {
    min-height: 460px;
  }

  .zoom-dock {
    width: 210px;
  }

  .summary-card-legacy-remove-legacy-remove__metrics,
  .unlock-panel__row,
  .segmented-group {
    grid-template-columns: 1fr;
  }

  .summary-card-legacy-remove-legacy-remove__metric--price {
    text-align: left;
  }

  .palette-modal {
    padding: 16px;
  }

  .palette-modal__card {
    padding: 20px;
  }
}

/* ── Baseplate Shopping Guide ── */

.baseplate-guide {
  margin-top: 12px;
  padding: 12px;
  background: rgba(93, 112, 82, 0.08);
  border: 1px solid rgba(93, 112, 82, 0.2);
  border-radius: 10px;
}

.baseplate-guide__header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5D7052;
  font-size: 13px;
  margin-bottom: 8px;
}

.baseplate-guide__body {
  font-size: 13px;
  color: #4D4A46;
}

.baseplate-guide__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.baseplate-guide__qty {
  font-weight: 700;
  color: #5D7052;
  min-width: 28px;
}

.baseplate-guide__note {
  font-size: 12px;
  color: #8A8580;
  margin: 4px 0 0;
}

.baseplate-guide__warning {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(200, 80, 60, 0.08);
  border: 1px solid rgba(200, 80, 60, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #9B4030;
  line-height: 1.4;
}
}

/* ── Micro-brick Warning Modal ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  max-width: 420px;
  margin: 16px;
  padding: 28px 24px;
  background: #FDFCF8;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.modal-card__icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.modal-card__title {
  font-family: "Fraunces", serif;
  font-size: 18px;
  color: #2b2621;
  margin: 0 0 12px;
}

.modal-card__body {
  font-size: 14px;
  line-height: 1.5;
  color: #4D4A46;
  margin: 0 0 8px;
}

.modal-card__body--muted {
  font-size: 13px;
  color: #8A8580;
}

.modal-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.modal-btn:hover {
  opacity: 0.85;
}

.modal-btn--primary {
  background: #5D7052;
  color: #fff;
}

.modal-btn--secondary {
  background: transparent;
  color: #8A8580;
  border: 1px solid rgba(138, 133, 128, 0.3);
}

/* ── Painter Tool ── */

.painter-toolbar {
  margin-top: 12px;
  padding: 12px;
  background: rgba(43, 38, 33, 0.04);
  border: 1px solid rgba(43, 38, 33, 0.1);
  border-radius: 10px;
}

.painter-toolbar.hidden {
  display: none;
}

.painter-toolbar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.painter-toolbar__title {
  font-size: 13px;
  font-weight: 600;
  color: #4D4A46;
}

.painter-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.painter-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.12s;
  padding: 0;
}

.painter-swatch:hover {
  border-color: rgba(93, 112, 82, 0.5);
}

.painter-swatch.is-active {
  border-color: #5D7052;
  box-shadow: 0 0 0 1px #5D7052;
}


/* --- Phase 3 UX Refinements --- */
.hidden-in-hero {
  display: none !important;
}

body.workspace-open .hidden-in-hero {
  display: flex !important;
}

.canvas-stage__overlay-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 20;
}

.overlay-btn {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(220, 213, 202, 0.6);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4e4a44;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(50, 45, 38, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(50, 45, 38, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.overlay-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.property-section {
  padding: 24px 20px;
}

.property-section__title {
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c867a;
  margin: 0;
}

.property-section__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(223, 214, 201, 0) 0%, rgba(223, 214, 201, 0.6) 10%, rgba(223, 214, 201, 0.6) 90%, rgba(223, 214, 201, 0) 100%);
  margin: 0;
}

.baseplate-grid--pills {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 6px;
  width: 100%;
}

.baseplate-grid--pills .preset-button {
  width: auto;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 12px;
}

.route-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-tabs .route-option {
  border-radius: 12px;
  border: 1px solid rgba(223, 214, 201, 0.6);
  background: rgba(248, 245, 240, 0.5);
  transition: all 0.2s ease;
}

.route-tabs .route-option:hover {
  background: rgba(255, 252, 247, 0.8);
}

.route-tabs .route-option.is-active {
  background: rgba(255, 252, 247, 0.95);
  border-color: #c7c1b5;
  box-shadow: 0 4px 12px rgba(50, 45, 38, 0.05), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.sticky-checkout {
  position: relative;
  flex-shrink: 0;
  background: rgba(255, 252, 247, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(223, 214, 201, 0.6);
  padding: 20px;
  border-radius: 0 0 28px 0;
  box-shadow: 0 -8px 24px rgba(50, 45, 38, 0.05);
}

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

.sticky-checkout__label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8c867a;
}

.sticky-checkout__price {
  font-size: 26px;
  font-weight: 800;
  color: #2b2824;
  /* sleek dark */
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d9d2c7;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked+.slider {
  background-color: #a872ff;
}

.toggle-switch input:checked+.slider:before {
  transform: translateX(20px);
}

.topbar-cta {
  display: flex;
}

#workspaceReplaceBtn {
  align-items: center;
}

.sticky-checkout__estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dotted rgba(223, 214, 201, 0.8);
}

.sticky-checkout__estimate-label {
  font-size: 11px;
  font-weight: 700;
  color: #8c867a;
}

.sticky-checkout__estimate-price {
  font-size: 14px;
  font-weight: 600;
  color: #8c867a;
}

.build-btn--premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.build-btn__badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  color: white;
}

.sidebar-scroller {
  flex: 1;
  overflow-y: visible;
}


/* --- Phase 3 UX Refinements --- */
.hidden-in-hero {
  display: none !important;
}

body.workspace-open .hidden-in-hero {
  display: flex !important;
}

.canvas-stage__overlay-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 20;
}

.overlay-btn {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(220, 213, 202, 0.6);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4e4a44;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(50, 45, 38, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(50, 45, 38, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.overlay-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.property-section {
  padding: 24px 20px;
}

.property-section__title {
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c867a;
  margin: 0;
}

.property-section__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(223, 214, 201, 0) 0%, rgba(223, 214, 201, 0.6) 10%, rgba(223, 214, 201, 0.6) 90%, rgba(223, 214, 201, 0) 100%);
  margin: 0;
}

.baseplate-grid--pills {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 6px;
  width: 100%;
}

.baseplate-grid--pills .preset-button {
  width: auto;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 12px;
}

.route-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-tabs .route-option {
  border-radius: 12px;
  border: 1px solid rgba(223, 214, 201, 0.6);
  background: rgba(248, 245, 240, 0.5);
  transition: all 0.2s ease;
}

.route-tabs .route-option:hover {
  background: rgba(255, 252, 247, 0.8);
}

.route-tabs .route-option.is-active {
  background: rgba(255, 252, 247, 0.95);
  border-color: #c7c1b5;
  box-shadow: 0 4px 12px rgba(50, 45, 38, 0.05), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.sticky-checkout {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  background: rgba(255, 252, 247, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(223, 214, 201, 0.6);
  padding: 20px;
  z-index: 30;
  border-radius: 0 0 28px 0;
  box-shadow: 0 -4px 24px rgba(50, 45, 38, 0.05);
}

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

.sticky-checkout__label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8c867a;
}

.sticky-checkout__price {
  font-size: 26px;
  font-weight: 800;
  color: #2b2824;
  /* sleek dark */
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d9d2c7;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked+.slider {
  background-color: rgb(104, 123, 87);
}

.toggle-switch input:checked+.slider:before {
  transform: translateX(20px);
}

.topbar-cta {
  display: flex;
}

#workspaceReplaceBtn {
  align-items: center;
}

/* HUD Toggle Styles */
.hud-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(223, 214, 201, 0.4);
}

.hud-toggle-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b7368;
}

.toggle-switch--small {
  width: 32px;
  height: 18px;
}

.toggle-switch--small .slider:before {
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
}

.toggle-switch--small input:checked+.slider:before {
  transform: translateX(14px);
}

/* Recovery overrides after partial reject corruption */
.workspace-sidebar.workspace-sidebar--right {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
}

.canvas-panel--center {
  justify-content: flex-start;
}

.canvas-stage-shell {
  width: min(100%, 900px);
  position: sticky;
  top: 90px;
}

.canvas-stage {
  width: 100%;
  max-width: none;
}

.canvas-stage__toolbar-shell {
  position: relative;
  z-index: 3;
  margin-bottom: 14px;
}

.canvas-stage__overlay-tools {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.84);
  border: 1px solid rgba(222, 214, 203, 0.72);
  box-shadow: 0 12px 30px rgba(50, 45, 38, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 3;
}

.overlay-tools__left {
  display: flex;
  gap: 8px;
}

.overlay-tools__center {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.overlay-tools__helper {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #736d62;
}

.overlay-tools__right {
  display: flex;
  justify-content: flex-end;
}

.overlay-btn svg {
  width: 20px;
  height: 20px;
}

.sidebar-scroller {
  padding-bottom: 24px;
}

.sticky-checkout {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  display: grid;
  gap: 12px;
  flex-shrink: 0;
  padding: 18px 20px 20px;
  z-index: 1;
}

@media (max-width: 980px) {
  .canvas-stage__overlay-tools {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "center center";
    align-items: start;
  }

  .overlay-tools__left {
    grid-area: left;
  }

  .overlay-tools__center {
    grid-area: center;
    justify-content: flex-start;
  }

  .overlay-tools__helper {
    text-align: left;
  }

  .overlay-tools__right {
    grid-area: right;
  }
}

/* ── Snapshot Lock & Summary ── */

.sidebar-scroller.is-locked {
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(0.3);
  transition: opacity 0.3s, filter 0.3s;
}
.overlay-btn--replace.is-locked {
  pointer-events: none;
  opacity: 0.4;
}

@media (min-width: 1101px) {
  body.workspace-open {
    height: 100vh;
    overflow: hidden;
  }

  body.workspace-open .site-shell {
    min-height: calc(100vh - 76px);
    height: calc(100vh - 76px);
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.workspace-open .workspace-state {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding-top: 14px;
    overflow: hidden;
  }

  body.workspace-open .workspace-layout {
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
  }

  body.workspace-open .workspace-sidebar.workspace-sidebar--right {
    min-height: 0;
    height: 100%;
    border-radius: 32px;
    background: rgba(255, 252, 247, 0.74);
    border: 1px solid rgba(220, 213, 202, 0.46);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  body.workspace-open .sidebar-scroller {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 24px;
  }

  body.workspace-open .sticky-checkout {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    background: rgba(255, 252, 247, 0.98);
    border-top: 1px solid rgba(223, 214, 201, 0.72);
    box-shadow: 0 -10px 28px rgba(50, 45, 38, 0.08);
  }

  body.workspace-open .canvas-panel--center {
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    height: 100%;
    padding-bottom: 132px;
  }

  body.workspace-open .canvas-stage-shell {
    width: min(100%, 900px);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    position: relative;
    top: auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
  }

  body.workspace-open .canvas-stage {
    width: 100%;
    max-width: none;
    min-height: 0;
    height: clamp(640px, calc(100vh - 250px), 980px);
  }
}

.snapshot-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(238, 245, 234, 0.6);
  border: 1px solid rgba(116, 134, 99, 0.3);
  margin-bottom: 10px;
}
.snapshot-summary.is-stale {
  border-color: rgba(216, 188, 134, 0.6);
  background: rgba(255, 249, 239, 0.6);
}
.snapshot-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6a645b;
}
.snapshot-row strong {
  color: #2f2b26;
  font-weight: 800;
}

.snapshot-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.mini-export-btn--outline {
  background: transparent;
  border: 1px dashed rgba(116, 134, 99, 0.5);
  color: #5d7052;
}
.mini-export-btn--confirm {
  background: linear-gradient(180deg, #6c805b 0%, #617351 100%);
  color: #f6f5ef;
  border: none;
}

.palette-counts {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.palette-counts__sep {
  font-size: 11px;
  color: var(--line-strong);
}
.badge {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge--used {
  background: rgba(189, 109, 243, 0.12);
  color: var(--purple-dark);
}

/* --- SEO & Guide Integration Styles --- */

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: 32px;
}

.topbar__link {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 180ms ease;
  padding: 8px 0;
  position: relative;
}

.topbar__link:hover {
  color: var(--primary);
}

.topbar__link.is-active {
  color: var(--text);
}

.topbar__link.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 99px;
}

/* Premium Accordion for FAQ */
.premium-accordion {
  display: grid;
  gap: 16px;
  width: 100%;
}

.premium-accordion details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-accordion details:hover {
  border-color: var(--primary-dark);
  box-shadow: var(--soft-shadow);
}

.premium-accordion details[open] {
  background: var(--bg-card-strong);
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
}

.premium-accordion summary {
  padding: 24px 32px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.premium-accordion summary::-webkit-details-marker {
  display: none;
}

.premium-accordion summary::after {
  content: "";
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236a7d59' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 6v12m6-6H6' /%3E%3C/svg%3E") no-repeat center;
  transition: transform 300ms ease;
}

.premium-accordion details[open] summary::after {
  transform: rotate(45deg);
}

.premium-accordion .accordion-content {
  padding: 0 32px 24px;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 16px;
}

/* Article Template Enhancements */
.guide-article h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text);
}

.guide-article h2 {
  font-family: "Fraunces", serif;
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 20px;
  color: var(--text);
}

.guide-article p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.aeo-snippet {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.6;
  margin-bottom: 32px;
}

.guide-sidebar__link.is-active {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 16px rgba(106, 125, 89, 0.2);
}

.guide-sidebar__link.is-active:hover {
  color: white;
  background: var(--primary-dark);
}

.article-footer-cta {
  margin-top: 80px;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.article-footer-cta h3 {
  font-family: "Fraunces", serif;
  font-size: 24px;
  margin: 0;
}

/* FAQ Hero Section */
.faq-hero {
  text-align: center;
  padding: 80px 0 60px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-hero h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.faq-hero p {
  font-size: 20px;
  color: var(--text-soft);
}

@media (max-width: 768px) {
  .topbar__nav {
    display: none;
  }
}

/* Micro-animations & Performance Optimization */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.guide-layout {
  animation: fadeIn 0.2s ease-out;
  will-change: opacity;
  backface-visibility: hidden;
}

.guide-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  will-change: transform, box-shadow;
}

.guide-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.guide-sidebar__link {
  transition: padding-left 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.guide-sidebar__link:hover:not(.is-active) {
  padding-left: 18px;
  background: var(--bg-card);
  color: var(--primary);
}

/* Remove global smooth scroll as it can cause jank on page-to-page navigation */
/* Use it only for specific scroll-to-top or internal anchor interactions if needed */

/* ── Gallery Scenario Chips ── */
.gallery-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.gallery-chip {
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.gallery-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.gallery-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- Promo & Contact UI --- */
.promo-pill {
  position: absolute;
  top: -12px;
  right: -8px;
  background: var(--accent-red);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(217, 83, 79, 0.3);
  z-index: 2;
  pointer-events: none;
  animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* --- Contact Widget --- */
.contact-widget {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.contact-widget__main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
  white-space: nowrap;
}

.contact-widget:hover .contact-widget__main {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.contact-widget__tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: var(--bg-card-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--card-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.2, 1, 0.2, 1);
  white-space: nowrap;
}

.contact-widget:hover .contact-widget__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.contact-widget__email {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}

.contact-widget__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-widget__copy:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.contact-widget__copy.is-copied {
  background: var(--primary);
  color: white;
}

.contact-widget__copy svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .contact-widget {
    bottom: 24px;
    right: 24px;
  }
  .contact-widget__main span {
    display: none;
  }
  .contact-widget__main {
    padding: 12px;
  }
}
