:root {
  --builder-bg: #030407;
  --builder-panel: #080a0e;
  --builder-panel-2: #0c0f14;
  --builder-paper: #f6f3ed;
  --builder-muted: #a1a5af;
  --builder-line: rgba(213, 222, 242, .16);
  --builder-line-strong: rgba(213, 222, 242, .28);
  --builder-blue: #7186ff;
  --builder-blue-bright: #93b8ff;
  --builder-green: #8bd98f;
  --preview-accent: #9b5729;
  --preview-surface: #fbf7f2;
  --preview-ink: #241a15;
  --preview-radius: 24px;
  --page-width: min(1540px, calc(100vw - 48px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--builder-bg); scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% 30%, rgba(43, 74, 151, .12), transparent 35%),
    linear-gradient(180deg, #020305, #06080d 58%, #020305);
  color: var(--builder-paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
img { display: block; max-width: 100%; }

:where(a, button, input, select):focus-visible { outline: 2px solid #8fb7ff; outline-offset: 4px; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  transform: translateY(-160%);
  background: #fff;
  color: #050608;
  text-decoration: none;
}
.skip-link:focus { transform: none; }

.builder-app { min-height: calc(100svh - 66px); }

/* Four-step setup */
.builder-wizard {
  position: relative;
  min-height: calc(100svh - 66px);
  padding: 22px 24px 42px;
  display: grid;
  grid-template-rows: auto 1fr;
  isolation: isolate;
  overflow: hidden;
}
.builder-wizard::before,
.builder-wizard::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 55%;
  width: min(1240px, 94vw);
  aspect-ratio: 2.25 / 1;
  transform: translate(-50%, -50%) rotate(-5deg);
  border: 1px solid rgba(81, 112, 212, .46);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(32, 61, 133, .08);
}
.builder-wizard::after {
  width: min(900px, 72vw);
  transform: translate(-50%, -50%) rotate(12deg);
  border-color: rgba(81, 112, 212, .24);
}

.wizard-starfield,
.editor-starfield { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.wizard-starfield i,
.editor-starfield i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #dce6ff;
  box-shadow: 0 0 12px 3px rgba(113,134,255,.55);
  opacity: .6;
  animation: builder-twinkle 4s ease-in-out infinite alternate;
}
.wizard-starfield i:nth-child(1), .editor-starfield i:nth-child(1) { left: 12%; top: 28%; }
.wizard-starfield i:nth-child(2), .editor-starfield i:nth-child(2) { left: 87%; top: 34%; animation-delay: -1.1s; }
.wizard-starfield i:nth-child(3), .editor-starfield i:nth-child(3) { left: 76%; top: 82%; animation-delay: -2.4s; }
.wizard-starfield i:nth-child(4), .editor-starfield i:nth-child(4) { left: 24%; top: 72%; animation-delay: -3.2s; }

.wizard-topbar {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
}
.wizard-back {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #c8cbd3;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wizard-back[hidden] { visibility: hidden; display: inline-flex; }
.wizard-back svg { width: 17px; }
.wizard-progress { display: grid; justify-items: center; gap: 8px; }
.wizard-progress > span { color: #b2b5be; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.wizard-progress-bars { width: min(270px, 44vw); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wizard-progress-bars i { height: 2px; background: #373a43; }
.wizard-progress-bars i.is-complete,
.wizard-progress-bars i.is-current { background: var(--builder-blue); box-shadow: 0 0 8px rgba(113,134,255,.5); }

.wizard-stage {
  min-height: 570px;
  display: grid;
  place-items: center;
  padding-top: 18px;
}
.wizard-card {
  width: min(680px, 100%);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--builder-line-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(10,12,17,.96), rgba(4,5,8,.97));
  box-shadow: 0 30px 90px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.025);
}
.wizard-heading { margin-bottom: 28px; text-align: center; }
.wizard-heading > span { color: #8ba3ff; font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.wizard-heading h2 { margin: 12px 0 6px; font-size: clamp(25px, 3vw, 38px); font-weight: 520; letter-spacing: -.03em; }
.wizard-heading p { margin: 0; color: var(--builder-muted); font-size: 14px; }

.pos-options { display: grid; gap: 10px; }
.pos-option {
  width: 100%;
  min-height: 60px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 36px 1fr auto 24px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--builder-line);
  border-radius: 6px;
  background: rgba(255,255,255,.012);
  color: #f2f3f6;
  cursor: pointer;
  text-align: left;
}
.pos-option:hover:not(:disabled) { border-color: rgba(143,183,255,.5); background: rgba(82,105,179,.08); }
.pos-option.is-selected { border-color: rgba(92,175,104,.65); background: rgba(47,112,60,.11); }
.pos-option:disabled { cursor: not-allowed; opacity: .62; }
.pos-option > svg { width: 23px; height: 23px; }
.pos-option strong { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.pos-option small { color: #969aa4; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.pos-option.is-selected small { color: #8bd98f; }
.pos-radio {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #747984;
  border-radius: 50%;
}
.pos-option.is-selected .pos-radio { border-color: #82d28a; background: #82d28a; color: #071009; }
.pos-option.is-selected .pos-radio::after { content: "✓"; font-size: 11px; font-weight: 900; }

.wizard-primary {
  width: min(430px, 100%);
  min-height: 50px;
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(100deg, #4059d7, #697eff);
  box-shadow: 0 12px 38px rgba(62,87,211,.24);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wizard-primary:hover { filter: brightness(1.08); }
.wizard-primary:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.wizard-help { margin: 12px 0 0; color: #888c95; text-align: center; font-size: 11px; }

.wizard-field { display: grid; gap: 9px; }
.wizard-field label { color: #aeb2bc; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.wizard-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #5367bb;
  border-radius: 5px;
  background: #05070b;
  color: #fff;
  font-size: clamp(18px, 2vw, 25px);
}
.wizard-character-count { justify-self: end; color: #9296a0; font-size: 10px; }

.wizard-name-preview {
  width: min(380px, 80%);
  height: 220px;
  margin: 22px auto -48px;
  padding: 34px 28px;
  overflow: hidden;
  border: 7px solid #202226;
  border-bottom: 0;
  border-radius: 48px 48px 0 0;
  background:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
    url("../assets/img/studio-coffee-background-v1.webp") center/cover;
  text-align: center;
}
.wizard-name-preview::before { content: ""; width: 100px; height: 24px; margin: -25px auto 40px; display: block; border-radius: 14px; background: #050506; }
.wizard-name-preview strong { display: block; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 45px); color: #f4dfad; }

.logo-dropzone {
  min-height: 190px;
  padding: 26px;
  display: grid;
  place-items: center;
  gap: 9px;
  border: 1px dashed rgba(255,255,255,.55);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
  color: #e5e7eb;
  cursor: pointer;
  text-align: center;
}
.logo-dropzone.is-dragging { border-color: var(--builder-blue); background: rgba(113,134,255,.08); }
.logo-dropzone svg { width: 34px; height: 34px; }
.logo-dropzone strong { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.logo-dropzone small { color: #8e929c; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.logo-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.logo-sample-row { margin-top: 12px; display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.sample-logo-tile {
  position: relative;
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid var(--builder-line-strong);
  border-radius: 6px;
  background: #08090c;
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: .8;
  text-align: center;
}
.sample-logo-tile.is-selected { border-color: #82d28a; }
.sample-logo-tile.is-selected::after { content: "✓"; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #82d28a; color: #071009; font-size: 12px; }
.sample-logo-tile img { max-width: 80%; max-height: 58px; object-fit: contain; }
.logo-actions { display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.logo-actions button {
  min-height: 42px;
  border: 1px solid var(--builder-line-strong);
  border-radius: 5px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.logo-actions button:last-child { border: 0; color: #91a6ff; }

.wizard-assurance { margin: 28px 0 0; color: #8d919b; text-align: center; font-size: 10px; letter-spacing: .06em; }

/* Full configurator */
.builder-editor { position: relative; min-height: calc(100svh - 76px); isolation: isolate; }
.editor-ready-bar {
  min-height: 68px;
  padding: 11px max(22px, calc((100vw - 1540px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--builder-line);
  background: rgba(4,5,8,.88);
}
.editor-ready-message { display: grid; gap: 5px; }
.editor-ready-message strong { color: var(--builder-green); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.editor-ready-message strong::before { content: ""; width: 9px; height: 9px; margin-right: 10px; display: inline-block; border-radius: 50%; background: var(--builder-green); box-shadow: 0 0 12px rgba(139,217,143,.6); }
.editor-ready-message span { color: #a9adb6; font-size: 12px; }
.editor-top-actions { display: flex; gap: 12px; }
.editor-top-actions button {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #c3c6ce;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.editor-top-actions svg { width: 17px; }

.editor-workspace {
  width: var(--page-width);
  min-height: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(500px, .98fr) minmax(490px, 1.1fr);
  border-inline: 1px solid var(--builder-line);
}
.editor-controls {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--builder-line);
  background: rgba(4,6,9,.82);
}
.editor-summary {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--builder-line);
  border-radius: 6px;
  background: #090b0f;
  color: #c6c9d0;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.editor-summary button { min-height: 42px; border: 0; background: transparent; color: #89a2ff; cursor: pointer; font-size: 10px; text-transform: uppercase; }

.editor-section { margin-top: 9px; border: 1px solid var(--builder-line); border-radius: 7px; overflow: hidden; background: rgba(10,12,16,.84); }
.editor-section-heading {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: #f2f3f5;
  cursor: pointer;
  text-align: left;
}
.editor-section-heading > span:first-child { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #727783; border-radius: 50%; font-size: 11px; }
.editor-section-heading strong { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.editor-section-heading small { color: #8f939d; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.editor-section-heading svg { width: 17px; transition: transform .2s ease; }
.editor-section.is-open .editor-section-heading svg { transform: rotate(180deg); }
.editor-section-body { padding: 2px 16px 18px; }
.editor-section:not(.is-open) .editor-section-body { display: none; }

.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-field { min-width: 0; display: grid; gap: 7px; }
.editor-field > span,
.control-block > span { color: #9b9fa8; font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.editor-field input,
.editor-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--builder-line-strong);
  border-radius: 5px;
  background: #06080c;
  color: #fff;
  font-size: 14px;
}
.palette-row { margin-top: 15px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; }
.palette-swatches { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 10px; }
.palette-swatch {
  width: 43px;
  height: 43px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
}
.palette-swatch.is-selected { border-color: #fff; box-shadow: 0 0 0 2px #050608, 0 0 0 3px #fff; }
.live-indicator { padding-bottom: 10px; color: #b8bdc6; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.live-indicator::before { content: ""; width: 8px; height: 8px; margin-right: 8px; display: inline-block; border-radius: 50%; background: var(--builder-green); }

.segmented-control { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--builder-line-strong); border-radius: 5px; overflow: hidden; }
.segmented-control button { min-height: 40px; border: 0; background: #06080c; color: #a5a8b1; cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.segmented-control button.is-selected { background: #f5f2ec; color: #17191e; }
.range-row { display: grid; grid-template-columns: 36px 1fr 24px; align-items: center; gap: 10px; }
.range-preview { width: 30px; height: 30px; border: 1px solid #9297a3; border-radius: var(--preview-radius); }
.range-row input { min-height: 40px; accent-color: var(--builder-blue); }
.range-row output { color: #c7cad1; font-size: 12px; }
.style-row { margin-top: 14px; display: grid; grid-template-columns: .78fr 1.22fr; gap: 14px; }
.font-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.direction-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.direction-option {
  min-height: 68px;
  padding: 9px;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 1px solid var(--builder-line);
  border-radius: 5px;
  background: #06080c;
  color: #c8cbd2;
  cursor: pointer;
  font-size: 9px;
  text-transform: uppercase;
}
.direction-option svg { width: 20px; }
.direction-option.is-selected { border-color: var(--preview-accent); box-shadow: inset 0 0 0 1px var(--preview-accent); color: #fff; }

.editor-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor-upload {
  min-height: 100px;
  padding: 14px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px dashed var(--builder-line-strong);
  border-radius: 6px;
  color: #d5d8de;
  cursor: pointer;
  text-align: center;
}
.editor-upload svg { width: 24px; }
.editor-upload span { font-size: 10px; text-transform: uppercase; }
.editor-upload small { color: #898e99; font-size: 9px; }
.editor-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.feature-option input { position: absolute; opacity: 0; }
.feature-option span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--builder-line);
  border-radius: 5px;
  color: #aeb2bb;
  cursor: pointer;
  font-size: 10px;
  text-align: center;
}
.feature-option input:checked + span { border-color: var(--preview-accent); background: color-mix(in srgb, var(--preview-accent) 18%, #06080c); color: #fff; }

.editor-preview {
  position: relative;
  min-width: 0;
  min-height: 720px;
  padding: 18px 24px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 55% 49%, rgba(36,58,121,.15), transparent 52%);
}
.editor-preview::before,
.editor-preview::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 53%;
  top: 50%;
  width: min(710px, 88%);
  aspect-ratio: 2.2 / 1;
  transform: translate(-50%, -50%) rotate(-7deg);
  border: 1px solid rgba(92,124,224,.48);
  border-radius: 50%;
}
.editor-preview::after { width: min(500px, 66%); transform: translate(-50%, -50%) rotate(18deg); border-color: rgba(92,124,224,.23); }
.preview-live { position: relative; z-index: 2; display: grid; justify-items: center; gap: 4px; color: #fff; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.preview-live strong::before { content: ""; width: 8px; height: 8px; margin-right: 8px; display: inline-block; border-radius: 50%; background: var(--builder-green); box-shadow: 0 0 10px rgba(139,217,143,.55); }
.preview-live small { color: #989ca6; font-size: 9px; }

.preview-phone {
  position: relative;
  z-index: 3;
  width: 276px;
  aspect-ratio: 390 / 844;
  align-self: center;
  border: 4px solid #24262a;
  border-radius: 48px;
  background: linear-gradient(90deg, #737476, #e0ddd5 8%, #494b4e 16%, #17181a 88%, #b8b5ad 96%, #393a3c);
  box-shadow: 0 28px 60px rgba(0,0,0,.62), 0 0 0 1px #999891, 0 0 32px rgba(66,93,173,.13);
  transition: transform .28s ease;
}
.preview-phone.is-rotated { transform: perspective(1000px) rotateY(-11deg) rotateX(2deg); }
.preview-phone.is-refreshing { animation: phone-refresh .52s cubic-bezier(.22,.8,.22,1); }
.preview-phone::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 50%;
  width: 90px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 16px;
  background: #030304;
  box-shadow: inset 0 -1px 3px rgba(255,255,255,.08);
}
.preview-phone-inner { position: absolute; inset: 8px; overflow: hidden; border-radius: 39px; background: var(--preview-surface); }
.phone-screen { position: absolute; inset: 0; display: none; }
.phone-screen.is-active { display: block; animation: preview-fade .24s ease both; }
.phone-screen > img { width: 100%; height: 100%; object-fit: cover; }

.welcome-screen { color: #fff; background: #17100c; }
.welcome-background { position: absolute; inset: 0; }
.welcome-background img,
.welcome-background video { width: 100%; height: 100%; object-fit: cover; }
.welcome-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.04) 40%, rgba(0,0,0,.19) 72%, rgba(0,0,0,.6)); pointer-events: none; }
.phone-statusbar { position: relative; z-index: 2; padding: 17px 25px 0; display: flex; justify-content: space-between; color: #070708; font-size: 10px; font-weight: 800; }
.welcome-screen .phone-statusbar { color: rgba(255,255,255,.9); }
.welcome-content { position: absolute; z-index: 3; inset: 0; padding: 74px 24px 22px; display: grid; grid-template-rows: 1fr auto auto auto 1fr auto; align-items: center; }
.phone-brand-lockup { align-self: center; justify-self: center; max-width: 88%; color: #f5dfae; font-family: Georgia, serif; font-size: 38px; font-weight: 700; line-height: .72; text-align: center; text-wrap: balance; }
.phone-brand-lockup img { max-width: 170px; max-height: 100px; object-fit: contain; filter: drop-shadow(0 3px 10px rgba(0,0,0,.2)); }
[data-heading="modern"] .phone-brand-lockup { font-family: Inter, ui-sans-serif, sans-serif; font-weight: 760; line-height: .86; letter-spacing: -.05em; }
[data-body="clean"] .phone-tagline,
[data-body="clean"] .phone-cta { font-family: Inter, ui-sans-serif, sans-serif; }
[data-direction="luminous"] .welcome-background { filter: saturate(1.12) brightness(1.07); }
[data-direction="luminous"] .phone-brand-lockup { text-shadow: 0 0 24px color-mix(in srgb, var(--preview-accent) 74%, white); }
[data-direction="essential"] .welcome-background { filter: saturate(.72) contrast(1.05); }
[data-direction="essential"] .phone-brand-lockup { font-size: 33px; line-height: .86; text-transform: uppercase; }
.phone-tagline { margin: 0 0 28px; padding-left: 12px; border-left: 2px solid #fff; color: #fff; font-size: 13px; font-weight: 750; line-height: 1.35; letter-spacing: .05em; text-transform: uppercase; }
.phone-cta { min-height: 42px; margin-top: 8px; display: grid; place-items: center; border: 0; border-radius: var(--preview-radius); background: var(--preview-accent); color: #fff; font-family: Georgia, serif; font-size: 12px; }
.phone-cta.secondary { background: var(--preview-surface); color: var(--preview-accent); }
.phone-powered-by { align-self: end; justify-self: center; color: rgba(255,255,255,.84); font-size: 7px; font-weight: 750; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.phone-powered-by > img { width: 30px; height: 30px; margin: 0 auto 5px; border-radius: 7px; object-fit: cover; }
.phone-powered-by i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: radial-gradient(circle at 35% 30%, white, #293078 52%, #030414); }

.preview-screen-tabs {
  position: relative;
  z-index: 3;
  width: min(520px, 92%);
  min-height: 58px;
  margin-top: 8px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border: 1px solid var(--builder-line-strong);
  border-radius: 7px;
  background: rgba(3,4,7,.9);
}
.preview-screen-tabs button {
  min-width: 0;
  min-height: 46px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #a1a5af;
  cursor: pointer;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.preview-screen-tabs button + button { border-left: 1px solid var(--builder-line); }
.preview-screen-tabs button svg { width: 18px; height: 18px; }
.preview-screen-tabs button.is-selected { border-bottom-color: var(--builder-blue); color: #90a7ff; }
.preview-screen-tabs button:disabled { cursor: not-allowed; opacity: .35; }
.preview-tools {
  position: relative;
  z-index: 3;
  width: min(520px, 92%);
  min-height: 48px;
  margin-top: 10px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--builder-line);
  border-radius: 6px;
  background: rgba(3,4,7,.9);
}
.preview-tools select { min-height: 40px; border: 0; background: transparent; color: #c4c7cf; font-size: 10px; text-transform: uppercase; }
.preview-tools button { min-height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #c4c7cf; cursor: pointer; font-size: 9px; text-transform: uppercase; }
.preview-tools svg { width: 17px; }

.editor-pricebar {
  min-height: 104px;
  padding: 14px max(24px, calc((100vw - 1500px) / 2));
  display: grid;
  grid-template-columns: auto auto auto 1fr auto auto;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--builder-line);
  background: rgba(3,4,7,.97);
}
.price-item { display: flex; align-items: baseline; gap: 10px; }
.price-item strong { font-family: Georgia, serif; font-size: clamp(28px, 3vw, 43px); font-weight: 400; }
.price-item span { color: #b9bdc5; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.price-divider { color: #9fa3ac; }
.price-assurance { justify-self: center; color: #a3a7b0; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.price-assurance span + span::before { content: "·"; margin: 0 9px; }
.price-action {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.price-action.primary { min-width: 210px; border-color: #fff; background: #f5f2ec; color: #7d4725; }

.builder-toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 18px;
  border: 1px solid rgba(139,217,143,.5);
  border-radius: 6px;
  background: #0d1711;
  color: #e9f7eb;
  box-shadow: 0 16px 50px rgba(0,0,0,.45);
  font-size: 12px;
}
.builder-toast[hidden] { display: none; }

@keyframes preview-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes builder-twinkle { from { opacity: .22; transform: scale(.8); } to { opacity: .88; transform: scale(1.15); } }
@keyframes phone-refresh { 0% { opacity: 1; transform: scale(1); } 46% { opacity: .35; transform: scale(.975); } 100% { opacity: 1; transform: scale(1); } }

@media (max-width: 1120px) {
  .editor-workspace { grid-template-columns: minmax(430px,.95fr) minmax(430px,1.05fr); }
  .editor-controls { padding: 14px; }
  .preview-phone { width: 270px; }
  .editor-pricebar { grid-template-columns: 1fr 1fr auto auto; gap: 16px; }
  .price-divider { display: none; }
  .price-assurance { display: none; }
  .price-action.primary { min-width: 180px; }
}

@media (min-width: 881px) and (max-height: 900px) {
  .editor-workspace,
  .editor-preview { min-height: 640px; }
  .editor-preview { padding-block: 10px; }
  .preview-phone { width: 232px; }
  .preview-screen-tabs { min-height: 50px; margin-top: 4px; }
  .preview-screen-tabs button { min-height: 40px; }
  .preview-tools { min-height: 42px; margin-top: 6px; }
  .editor-pricebar { min-height: 88px; padding-block: 8px; }
}

@media (max-width: 880px) {
  :root { --page-width: calc(100vw - 28px); }
  .builder-app { min-height: calc(100svh - 66px); }
  .builder-wizard { min-height: calc(100svh - 66px); }

  .editor-workspace { display: flex; flex-direction: column-reverse; border-inline: 0; }
  .editor-preview { min-height: 720px; border-bottom: 1px solid var(--builder-line); }
  .editor-controls { border-right: 0; }
  .editor-pricebar { grid-template-columns: 1fr 1fr; }
  .price-action { width: 100%; }
}

@media (max-width: 600px) {
  :root { --page-width: calc(100vw - 24px); }
  .builder-wizard { padding: 16px 12px 28px; }
  .wizard-topbar { grid-template-columns: 58px 1fr 58px; }
  .wizard-progress-bars { width: 150px; }
  .wizard-stage { min-height: 520px; padding-top: 14px; }
  .wizard-card { padding: 24px 16px; }
  .wizard-heading { margin-bottom: 22px; }
  .pos-option { min-height: 58px; padding-inline: 12px; grid-template-columns: 30px 1fr auto 20px; gap: 8px; }
  .wizard-progress > span,
  .wizard-heading > span,
  .pos-option small,
  .wizard-help,
  .wizard-back { font-size: 12px; }
  .wizard-name-preview { width: 90%; height: 180px; }
  .logo-dropzone { min-height: 150px; }
  .logo-sample-row { grid-template-columns: 92px 1fr; }

  .editor-ready-bar { padding: 10px 14px; align-items: flex-start; }
  .editor-ready-message span { display: none; }
  .editor-top-actions { gap: 0; }
  .editor-top-actions button { padding: 0 8px; }
  .editor-top-actions button span { display: none; }
  .editor-preview { min-height: 650px; padding-inline: 8px; }
  .preview-phone { width: 245px; }
  .preview-screen-tabs,
  .preview-tools { width: calc(100% - 8px); }
  .preview-tools button span { display: none; }
  .editor-controls { padding: 12px; }
  .editor-summary { padding-inline: 12px; }
  .control-grid,
  .style-row,
  .editor-upload-grid { grid-template-columns: 1fr; }
  .direction-options { grid-template-columns: repeat(3,1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .editor-pricebar { padding: 18px 14px; gap: 12px; }
  .price-item { gap: 6px; }
  .price-item strong { font-size: 30px; }
  .price-action { min-height: 48px; padding-inline: 10px; }
  .builder-toast { left: 14px; right: 14px; bottom: 14px; }
}

@media (max-width: 370px) {
  .editor-preview { min-height: 610px; }
  .preview-phone { width: 220px; }
  .phone-brand-lockup { font-size: 32px; }
  .welcome-content { padding-inline: 19px; }
  .editor-section-heading small { display: none; }
  .editor-pricebar { grid-template-columns: 1fr; }
  .price-item { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
