/* GVR's Custom Designs: storage unit builder. Everything is scoped under .ub
   One question at a time on every screen size: size, roof, door, extras, colour, then a summary.
   Site hooks (set on .ub or :root):
   --ub-sticky-top  desktop: distance from the top for the sticky preview (header height plus a gap)
   --ub-m-top       phones: height of any sticky site header, so the builder fits in 100svh minus it */

.ub {
  --ub-ink: var(--ink, #15181a);
  --ub-charcoal: var(--charcoal, #23282c);
  --ub-orange: var(--orange, #f65c07);
  --ub-orange-text: var(--orange-text, #a8520a);
  --ub-line: var(--line, #e3e0da);
  --ub-display: var(--font-display, "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif);
  --ub-body: var(--font-body, "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif);
  --ub-muted: #5f6468;
  --ub-ease: cubic-bezier(.22, .8, .24, 1);

  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  font-family: var(--ub-body);
  color: var(--ub-ink);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.ub *, .ub *::before, .ub *::after { box-sizing: border-box; }
.ub p { margin: 0; }
.ub fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ub svg { display: block; }
.ub [hidden] { display: none !important; }
.ub__sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ================================================================
   BUTTONS AND TILES: restyle here (one block, variables first)
   ================================================================ */
.ub {
  --ub-ground: #f8f8f8;            /* panel ground behind the tiles */
  --ub-tile-bg: #efefef;           /* tile fill */
  --ub-tile-bg-hover: #e9e9e9;
  --ub-tile-radius: 24px;
  --ub-tile-ink: #111111;
  --ub-tile-label: #3b3f42;
  --ub-tile-ring: var(--ub-charcoal);
  --ub-icon-w: 64px;
  --ub-icon-stroke: 1.5px;

  --ub-btn-radius: var(--btn-radius, 14px);
  --ub-cta-bg: var(--ub-orange);     /* the price box is charcoal, so the main button is orange */
  --ub-cta-bg-hover: #ff7424;
  --ub-cta-fg: #15181a;
  --ub-wa-bg: #25D366;
  --ub-wa-bg-hover: #22c55e;
  --ub-wa-fg: #292d30;
  --ub-sale: var(--sale, #c62828);
}

/* option tiles: calm grey spec card, thin line-art icon, regular label, bold value */
.ub__opt { position: relative; display: block; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ub__in { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ub__card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  gap: 4px;
  padding: 22px 12px 18px;
  background: var(--ub-tile-bg);
  border-radius: var(--ub-tile-radius);
  color: var(--ub-tile-ink);
  text-align: center;
  transition: background-color .2s, box-shadow .2s var(--ub-ease);
}
@media (hover: hover) { .ub__opt:hover .ub__card { background: var(--ub-tile-bg-hover); } }
.ub__in:checked + .ub__card { box-shadow: inset 0 0 0 2px var(--ub-tile-ring); }
.ub__in:focus-visible + .ub__card { outline: 3px solid var(--ub-orange); outline-offset: 2px; }
.ub__ico { display: block; color: var(--ub-tile-ink); margin-bottom: 6px; }
.ub__ico svg { width: var(--ub-icon-w); height: auto; fill: none; stroke: currentColor; stroke-width: var(--ub-icon-stroke); stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ub__ico svg * { vector-effect: non-scaling-stroke; }
.ub__ico .ub-l2 { stroke-width: 1px; opacity: .5; }
.ub__lab { display: block; font-size: 14px; font-weight: 400; line-height: 1.25; color: var(--ub-tile-label); }
.ub__big { display: block; font-family: var(--ub-display); font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--ub-tile-ink); }
.ub__big small { font-size: .75em; font-weight: 700; }
.ub__p { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; font-weight: 400; color: var(--ub-tile-ink); }
.ub__pn { font-weight: 700; color: var(--ub-sale); }
.ub__p s { color: var(--ub-muted); margin-left: 2px; }
.ub__p em { font-style: normal; color: var(--ub-muted); }
.ub__p--q { color: var(--ub-orange-text); font-weight: 600; }
.ub__p--n { color: var(--ub-muted); }
/* selected: the ring plus a small plain check, no filled dot */
.ub__tick { position: absolute; top: 12px; right: 13px; width: 18px; height: 18px; color: var(--ub-charcoal); opacity: 0; transition: opacity .2s; }
.ub__tick svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ub__in:checked + .ub__card .ub__tick { opacity: 1; }

/* spec cards under the render (desktop) */
.ub__specs { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ub__spec {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 10px; align-items: center;
  padding: 12px; min-width: 0;
  background: var(--ub-tile-bg); border-radius: 20px;
}
.ub__spec .ub__ico { grid-row: 1 / 3; margin: 0; }
.ub__spec .ub__ico svg { width: 38px; }
.ub__spec .ub__lab { font-size: 12.5px; align-self: end; }
.ub__spec .ub__big { font-size: 19px; align-self: start; font-variant-numeric: tabular-nums; }
.ub__spec .ub__big[data-spec="M"] { font-size: 12.5px; font-weight: 700; line-height: 1.25; }

/* buttons: one shape, solid, no glow */
.ub__next, .ub__go, .ub__wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border: 0; border-radius: var(--ub-btn-radius);
  font-family: var(--ub-body); font-size: 16px; font-weight: 600; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, transform .12s;
}
.ub__next:active, .ub__go:active, .ub__wa:active { transform: scale(.985); }
.ub__next, .ub__go { background: var(--ub-cta-bg); color: var(--ub-cta-fg); }
.ub__next:hover, .ub__go:hover { background: var(--ub-cta-bg-hover); }
.ub__next svg, .ub__go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ub__wa { background: var(--ub-wa-bg); color: var(--ub-wa-fg); text-shadow: none; }
.ub__wa:hover { background: var(--ub-wa-bg-hover); }
.ub__wa svg { width: 22px; height: 22px; flex: none; }
.ub__next:focus-visible, .ub__go:focus-visible, .ub__wa:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 3px; }
.ub__go:focus-visible, .ub__next:focus-visible { outline-color: #fff; }

/* quiet text buttons in the step bar: Back and Start over */
.ub__back, .ub__reset {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--ub-btn-radius);
  background: transparent; color: var(--ub-ink);
  font-family: var(--ub-body); font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s;
}
.ub__back:hover, .ub__reset:hover { background: #ececec; }
.ub__back svg, .ub__reset svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ub__back:focus-visible, .ub__reset:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 1px; }
.ub .ub__back[hidden] { display: inline-flex !important; visibility: hidden; }
.ub__reset { margin-right: -6px; }
.ub__back { margin-left: -6px; }
.ub__done {
  min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--ub-btn-radius);
  background: var(--ub-charcoal); color: #fff;
  font-family: var(--ub-body); font-size: 15px; font-weight: 600; cursor: pointer;
}
.ub__done:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 2px; }
/* ===== end BUTTONS AND TILES ===== */

/* ---------- stage ---------- */
.ub__stage {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 38%, #ffffff 0%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #f4f3f0 0%, #eeece8 58%, #e4e1db 100%);
  touch-action: pan-y;
  cursor: grab;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}
.ub__stage.is-drag { cursor: grabbing; }
.ub__stage:focus-visible { box-shadow: inset 0 0 0 3px var(--ub-orange); }
.ub__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ub__ghost { transition: opacity .38s ease; pointer-events: none; }
.ub__head { position: absolute; top: 20px; left: 22px; right: 120px; z-index: 1; pointer-events: none; }
.ub__model { font-family: var(--ub-display); font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.ub__sub, .ub__msub { margin-top: 2px !important; font-size: 14px; color: var(--ub-muted); }
.ub__msub { display: none; }
.ub__hint {
  position: absolute; top: 20px; right: 20px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ub-muted);
  pointer-events: none;
}
.ub__hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ub__foot { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; display: flex; justify-content: flex-end; align-items: flex-end; min-height: 44px; pointer-events: none; }
.ub__doorbtn {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 0; border-radius: var(--ub-btn-radius);
  background: rgba(255,255,255,.92); color: var(--ub-ink);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
  font-family: var(--ub-body); font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background-color .2s;
}
.ub__doorbtn:hover { background: #fff; }
.ub__doorbtn[aria-pressed="true"] { background: var(--ub-charcoal); color: #fff; box-shadow: none; }
.ub__doorbtn:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 2px; }
.ub__doorbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- step panel ---------- */
.ub__steps {
  position: relative;
  display: flex; flex-direction: column;
  padding: 14px 24px 26px;
  background: var(--ub-ground);
  border-radius: 28px;
}
.ub__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 14px; }
.ub__back { justify-self: start; }
.ub__reset { justify-self: end; }
.ub__count { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ub__countt { font-size: 13px; font-weight: 600; color: var(--ub-muted); letter-spacing: .01em; }
.ub__dots { display: flex; gap: 6px; }
.ub__dots i { display: block; width: 6px; height: 6px; border-radius: 6px; background: #d3d5d7; transition: width .3s var(--ub-ease), background-color .3s; }
.ub__dots i.is-done { background: #8d9297; }
.ub__dots i.is-on { width: 20px; background: var(--ub-charcoal); }

.ub__step { display: none; }
.ub__step.is-active { display: block; }
.ub__q { display: block; float: left; width: 100%; padding: 0; margin: 0 0 4px; font-family: var(--ub-display); font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; outline: none; }
.ub__step fieldset > :not(legend), .ub__step--sum > :not(.ub__q) { clear: both; }
.ub__hint2 { font-size: 14.5px; color: var(--ub-muted); margin: 0 0 18px !important; }
.ub__sub2 { font-size: 14px; font-weight: 600; color: var(--ub-tile-label); margin: 0 0 8px !important; }
.ub__xrow + .ub__xrow { margin-top: 16px; }
.ub__fine { font-size: 13.5px; color: var(--ub-muted); }

.ub__grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ub__grid--size, .ub__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ub__grid--x .ub__card { flex-direction: row; gap: 10px; padding: 14px 12px; min-height: 64px; }
.ub__grid--x .ub__ico { margin: 0; }
.ub__grid--x .ub__ico svg { width: 40px; }
.ub__grid--x .ub__big { font-size: 16px; }

.ub__custom { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 12px; }
.ub__custom .ub__fine { grid-column: 1 / -1; order: 5; }
.ub__sheet-t { display: none; }
.ub__field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.ub__field input {
  width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid var(--ub-line); border-radius: var(--ub-btn-radius);
  background: #fff; color: var(--ub-ink);
  font: 700 18px/1 var(--ub-display);
}
.ub__field input:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 1px; border-color: transparent; }

/* colour swatches */
.ub__swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px; }
.ub__sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center; min-width: 0; }
.ub__chip {
  display: block; width: 100%; max-width: 64px; aspect-ratio: 1;
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 42%, rgba(0,0,0,0) 60%, rgba(0,0,0,.2) 100%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0 7px, rgba(0,0,0,.07) 7px 9px, rgba(255,255,255,.08) 9px 10px),
    var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.09);
  transition: box-shadow .2s;
}
.ub__in:checked + .ub__chip { box-shadow: inset 0 0 0 1px rgba(0,0,0,.09), 0 0 0 3px var(--ub-ground), 0 0 0 5px var(--ub-charcoal); }
.ub__in:focus-visible + .ub__chip { outline: 3px solid var(--ub-orange); outline-offset: 7px; }
.ub__swn { font-size: 13px; line-height: 1.2; color: var(--ub-muted); }
.ub__in:checked ~ .ub__swn { color: var(--ub-ink); font-weight: 700; }

/* summary */
.ub__sum { display: grid; margin: 10px 0 18px; border-top: 1px solid #e3e3e3; }
.ub__row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: baseline; gap: 12px;
  width: 100%; padding: 13px 2px; border: 0; border-bottom: 1px solid #e3e3e3;
  background: none; color: var(--ub-ink); text-align: left; cursor: pointer;
  font: inherit;
}
.ub__rk { font-size: 14px; color: var(--ub-muted); }
.ub__rv { font-size: 16px; font-weight: 600; min-width: 0; }
.ub__chg { font-size: 14px; font-weight: 600; color: var(--ub-orange-text); }
.ub__row:hover .ub__chg { text-decoration: underline; text-underline-offset: 3px; }
.ub__row:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 2px; border-radius: 8px; }
.ub__step--sum .ub__wa { width: 100%; }

/* ---------- price ---------- */
.ub__price {
  padding: 22px 24px;
  border-radius: 28px;
  background: var(--ub-charcoal);
  color: #fff;
}
.ub__kicker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); }
.ub__sale { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--ub-sale); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.ub__fig { margin-top: 4px !important; font-family: var(--ub-display); font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ub__price[data-kind="quote"] .ub__fig { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.ub__was { margin-top: 6px !important; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 15px; color: rgba(255,255,255,.62); }
.ub__was s { color: rgba(255,255,255,.62); }
.ub__save { font-weight: 700; color: #fff; }
.ub__inc { margin-top: 12px !important; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.75); }
.ub__note { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: rgba(255,255,255,.75); }
.ub__cta { display: flex; gap: 10px; margin-top: 18px; }
.ub__cta > * { flex: 1 1 auto; }
.ub__status { margin-top: 10px !important; font-size: 13.5px; color: rgba(255,255,255,.8); }
.ub__status:empty { display: none; }
.ub__price.is-pop .ub__pricehead { animation: ub-pop .5s var(--ub-ease); }
@keyframes ub-pop { 0% { opacity: .35; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }

/* ---------- desktop: preview on the left, one question at a time on the right ---------- */
@media (min-width: 1000px) {
  .ub { --ub-sticky-top: 96px; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 28px; row-gap: 16px; align-items: start; }
  .ub__aside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: var(--ub-sticky-top); grid-column: 1; grid-row: 1 / span 2; }
  .ub__steps { grid-column: 2; grid-row: 1; min-height: 452px; }
  .ub__price { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
  .ub__pricehead, .ub__inc, .ub__note { grid-column: 1; }
  .ub__cta { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .ub__next, .ub__go { min-width: 200px; }
  .ub__status { grid-column: 1 / -1; }
  .ub__stage { height: clamp(320px, calc(100svh - var(--ub-sticky-top) - 130px), 560px); }
  .ub__specs { grid-template-columns: 1fr 1fr 1fr 1.45fr; }
  .ub__grid--size .ub__card { padding: 16px 8px 14px; }
  .ub__grid--size .ub__ico svg { width: 48px; }
  .ub__grid--size .ub__big { font-size: 18px; white-space: nowrap; }
  .ub__grid--2 .ub__card, .ub__grid--3 .ub__card { min-height: 168px; }
  .ub__grid--x .ub__card { min-height: 72px; }
}
@media (min-width: 1000px) and (max-width: 1279px) {
  .ub__steps { padding-inline: 18px; }
  .ub__grid--size .ub__big { font-size: 16px; }
  .ub__p { font-size: 12px; }
  .ub__spec .ub__lab { font-size: 11.5px; }
  .ub__spec .ub__ico svg { width: 32px; }
  .ub__grid--x .ub__card { flex-direction: column; gap: 2px; }
}

/* ---------- phones and tablets: the whole builder fits one screen, no scrolling inside it ---------- */
@media (max-width: 999px) {
  .ub {
    display: flex; flex-direction: column; gap: 8px;
  }
  .ub__aside { display: contents; }
  .ub__stage { order: 1; flex: none; height: clamp(300px, 46svh, 480px); min-height: 120px; border-radius: 22px; }
  .ub__specs { display: none; }
  .ub__steps { order: 2; flex: none; padding: 4px 10px 10px; border-radius: 22px; }
  .ub__price { order: 3; flex: none; }

  .ub__bar { margin-bottom: 4px; }
  .ub__back, .ub__reset { min-height: 40px; padding: 0 8px; font-size: 14px; }
  .ub__reset { margin-right: -2px; }
  .ub__back { margin-left: -2px; }
  .ub__count { gap: 4px; }
  .ub__countt { font-size: 12px; }
  .ub__q { font-size: 18px; margin-bottom: 8px; text-align: center; }
  .ub__hint2 { display: none; }

  .ub__grid { gap: 8px; }
  .ub__card { padding: 10px 6px; gap: 2px; border-radius: 18px; }
  .ub__ico { margin-bottom: 2px; }
  .ub__ico svg { width: 44px; }
  .ub__lab { font-size: 11.5px; }
  .ub__big { font-size: 15.5px; }
  .ub__p { font-size: 11.5px; margin-top: 2px; }
  .ub__p--n { display: none; }
  .ub__tick { display: none; } /* the ring alone marks the pick on phones */

  /* sizes: 3 x 2, words only */
  .ub__grid--size .ub__ico { display: none; }
  .ub__grid--size .ub__card { min-height: 64px; padding: 8px 4px; }
  .ub__grid--size .ub__p s { display: none; }
  .ub__grid--size .ub__p em { display: block; font-size: 10.5px; line-height: 1.2; }
  .ub__grid--2 .ub__card, .ub__grid--3:not(.ub__grid--x) .ub__card { min-height: 104px; }

  /* extras: label beside each row */
  .ub__xrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; }
  .ub__xrow + .ub__xrow { margin-top: 8px; }
  .ub__sub2 { margin: 0 !important; font-size: 13px; }
  .ub__grid--x .ub__card { min-height: 52px; padding: 6px 6px; gap: 6px; }
  .ub__grid--x .ub__ico { display: none; }
  .ub__grid--x .ub__big { font-size: 14px; }

  /* colours: 2 rows of 4 */
  .ub__swatches { gap: 8px 6px; }
  .ub__sw { gap: 4px; }
  .ub__chip { width: 40px; border-radius: 12px; }
  .ub__swn { font-size: 11.5px; }

  /* summary: compact rows */
  .ub__sum { margin: 2px 0 8px; }
  .ub__row { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 7px 2px; gap: 8px; }
  .ub__rk { font-size: 12.5px; }
  .ub__rv { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ub__chg { font-size: 12.5px; }
  .ub__step--sum .ub__wa { min-height: 46px; font-size: 15px; }

  /* custom size: a small sheet over the panel, never taller than it */
  .ub__custom { display: none !important; }
  .ub.is-sheet .ub__custom:not([hidden]) {
    display: grid !important; position: absolute; inset: 0; z-index: 2;
    grid-template-columns: 1fr 1fr 1fr; align-content: center; align-items: end; gap: 6px 8px;
    margin: 0; padding: 10px 12px;
    background: var(--ub-ground); border-radius: 22px;
    animation: ub-pop .3s var(--ub-ease);
  }
  .ub__sheet-t { display: block; grid-column: 1 / -1; font-family: var(--ub-display); font-size: 15px; font-weight: 800; }
  .ub__field { gap: 3px; font-size: 12px; }
  .ub__field input { height: 44px; font-size: 17px; }
  .ub__custom .ub__fine { font-size: 11.5px; order: 0; }
  .ub__done { grid-column: 3; grid-row: 2; min-height: 44px; }

  /* stage */
  .ub__head { top: 12px; left: 14px; right: 14px; }
  .ub__model { font-size: 16px; }
  .ub__sub, .ub__hint { display: none; }
  .ub__msub { display: block; font-size: 12.5px; }
  .ub__foot { left: 10px; right: 10px; bottom: 10px; min-height: 38px; }
  .ub__doorbtn { min-height: 38px; padding: 0 12px; font-size: 13px; }
  .ub__doorbtn svg { width: 16px; height: 16px; }

  /* slim price bar: price left, the main button right, clear of the floating WhatsApp */
  .ub__price {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center;
    padding: 9px var(--ub-m-float-clear, 74px) 9px 14px; border-radius: 20px; row-gap: 0;
  }
  .ub__pricehead { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; min-width: 0; }
  .ub__kicker { width: 100%; font-size: 11px; gap: 6px; line-height: 1.3; }
  .ub__sale { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; }
  .ub__fig { margin: 0 !important; font-size: 21px; letter-spacing: -.01em; }
  .ub__price[data-kind="quote"] .ub__fig { font-size: 13.5px; line-height: 1.2; }
  .ub__was { margin: 0 !important; font-size: 12px; gap: 6px; }
  .ub__save { display: inline; font-size: 12px; }
  .ub__inc { display: none !important; }
  .ub__note { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0 !important; padding: 0; border: 0; font-size: 11px; line-height: 1.3; color: rgba(255,255,255,.7); }
  .ub__cta { grid-column: 2; grid-row: 1; margin: 0; }
  .ub__next, .ub__go { min-height: 50px; padding: 0 18px; font-size: 15px; gap: 6px; }
  .ub__next svg, .ub__go svg { width: 16px; height: 16px; }
  .ub__status { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0 !important; }
}
@media (max-width: 999px) and (min-width: 620px) {
  .ub__stage { min-height: 260px; }
  .ub__big { font-size: 18px; }
  .ub__lab { font-size: 13px; }
  .ub__steps { padding: 6px 18px 16px; }
  .ub__hint2 { display: block; text-align: center; margin: -4px 0 12px !important; }
  .ub__grid--2 .ub__card, .ub__grid--3:not(.ub__grid--x) .ub__card { min-height: 128px; }
}
@media (max-width: 379px) {
  .ub__next svg, .ub__go svg { display: none; }
  .ub__next, .ub__go { padding: 0 14px; font-size: 14px; }
  .ub__fig { font-size: 18px; }
  .ub__row { grid-template-columns: 50px minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ub *, .ub *::before, .ub *::after { transition: none !important; animation: none !important; }
}
/* short phones (360 x 640): the summary loses its title (the step bar already says all steps are done) and tightens up */
@media (max-width: 999px) and (max-height: 700px) {
  .ub__stage { min-height: 96px; }
  .ub__msub { display: none; }
  .ub.is-summary .ub__head, .ub.is-summary .ub__foot { display: none; }
  .ub__step--sum .ub__q { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
  .ub__sum { margin-top: 0; }
  .ub__row { padding: 5px 2px; }
  .ub__step--sum .ub__wa { min-height: 44px; }
}

/* ================================================================
   PHONES (under 768px): a compact teaser in the page, the builder
   itself opens as a full-screen sheet, like an app.
   ================================================================ */
.ub__teaser, .ub__shead { display: none; }
@media (min-width: 768px) { .ub__sheet { display: contents; } }

/* instant taps: no double-tap zoom wait, a pressed state on every tile */
.ub button, .ub a, .ub__opt, .ub__sw, .ub__tstage { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ub__card { transition: background-color .2s, box-shadow .2s var(--ub-ease), transform .12s var(--ub-ease); }
.ub__opt:active .ub__card { transform: scale(.97); background: var(--ub-tile-bg-hover); }
.ub__chip { transition: box-shadow .2s, transform .12s var(--ub-ease); }
.ub__sw:active .ub__chip { transform: scale(.93); }
.ub__back:active, .ub__reset:active, .ub__close:active, .ub__row:active { background: #e6e6e6; }

/* steps slide in quickly, forward or back (transform and opacity only) */
.ub__step.is-active { animation: ub-step-f .22s var(--ub-ease) both; }
.ub[data-dir="back"] .ub__step.is-active { animation-name: ub-step-b; }
@keyframes ub-step-f { from { opacity: 0; transform: translate3d(18px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes ub-step-b { from { opacity: 0; transform: translate3d(-18px, 0, 0); } to { opacity: 1; transform: none; } }

/* page scroll is locked while the sheet is open */
html.ub-lock, html.ub-lock body { overflow: hidden; }

@media (max-width: 767px) {
  .ub { display: block; height: auto; }

  /* ---------- the teaser ---------- */
  .ub__teaser { display: block; border-radius: 26px; overflow: hidden; background: var(--ub-charcoal); color: #fff; }
  .ub__tstage {
    position: relative; display: block; aspect-ratio: 1000 / 660; cursor: pointer;
    background:
      radial-gradient(90% 70% at 50% 38%, #ffffff 0%, rgba(255,255,255,0) 70%),
      linear-gradient(180deg, #f4f3f0 0%, #eeece8 58%, #e4e1db 100%);
  }
  .ub__tsvg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ub__tchip {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px 6px 9px; border-radius: 999px;
    background: #fff; color: var(--ub-ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
    font-size: 13px; font-weight: 700; line-height: 1.2;
  }
  .ub__tchip svg { width: 26px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .ub__tchip svg * { vector-effect: non-scaling-stroke; }
  .ub__tchip .ub-l2 { stroke-width: 1px; opacity: .5; }
  .ub__tsize { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; font-size: 12.5px; font-weight: 600; color: var(--ub-muted); }
  .ub__tbody { padding: 16px 16px 14px; }
  .ub__tline { font-size: 15.5px; line-height: 1.45; color: rgba(255,255,255,.86); }
  .ub__tprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 12px !important; }
  .ub__tsale { align-self: center; padding: 3px 8px; border-radius: 6px; background: var(--ub-sale); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
  .ub__tkick { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); }
  .ub__tfig { font-family: var(--ub-display); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .ub__tprice[data-kind="quote"] .ub__tfig { font-size: 20px; }
  .ub__twas { font-size: 14px; color: rgba(255,255,255,.62); }
  .ub__tnote { margin-top: 6px !important; font-size: 12.5px; color: rgba(255,255,255,.62); }
  .ub__start {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 56px; margin-top: 14px; padding: 0 20px;
    border: 0; border-radius: var(--ub-btn-radius);
    background: var(--ub-cta-bg); color: var(--ub-cta-fg);
    font-family: var(--ub-body); font-size: 17px; font-weight: 700; cursor: pointer;
    transition: background-color .2s, transform .12s;
  }
  .ub__start:active { transform: scale(.985); background: var(--ub-cta-bg-hover); }
  .ub__start svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .ub__start:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
  .ub__thint { margin-top: 9px !important; text-align: center; font-size: 13px; color: rgba(255,255,255,.62); }

  /* ---------- the sheet ---------- */
  .ub__sheet {
    position: fixed; left: 0; right: 0; top: 0; z-index: 1000;
    height: 100vh; height: 100dvh;
    display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top);
    background: #fff;
    visibility: hidden;
    transform: translate3d(0, 100%, 0);
    transition: transform .22s cubic-bezier(.4, 0, 1, 1), visibility 0s linear .22s;
    overscroll-behavior: contain;
  }
  .ub.is-open .ub__sheet { visibility: visible; transform: none; transition: transform .3s var(--ub-ease), visibility 0s; }
  .ub__shead { display: flex; order: 0; flex: none; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 4px 8px 0 16px; }
  .ub__stitle { font-family: var(--ub-display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
  .ub__close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: #f1f1f1; color: var(--ub-ink); cursor: pointer; }
  .ub__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .ub__close:focus-visible { outline: 3px solid var(--ub-orange); outline-offset: 2px; }

  .ub__steps { display: contents; }
  .ub__bar { order: 1; flex: none; margin: 0; padding: 0 12px 4px; }
  .ub__stage { order: 2; flex: none; width: auto; height: clamp(150px, 40vh, 380px); height: clamp(150px, 40dvh, 380px); min-height: 0; margin: 0 12px; border-radius: 20px; touch-action: none; }
  .ub__step.is-active {
    order: 3; flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 12px 14px 16px;
  }
  .ub__q { font-size: 19px; margin-bottom: 10px; }

  /* custom size: inline under the sizes, no overlay */
  .ub__custom:not([hidden]) {
    display: grid !important; position: static; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 6px 8px;
    margin: 12px 0 0; padding: 12px; background: var(--ub-ground); border-radius: 18px; animation: none;
  }
  .ub__custom .ub__done { grid-column: auto; grid-row: auto; }

  /* price bar docked at the bottom, Next or Get my quote on the right */
  .ub__price {
    order: 4; flex: none;
    border-radius: 22px 22px 0 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom)) 16px;
  }
  .ub__next, .ub__go { min-height: 52px; min-width: 128px; }
}
/* taller phones: bigger, easier tiles */
@media (max-width: 767px) and (min-height: 740px) {
  .ub__grid { gap: 10px; }
  .ub__grid--size .ub__card { min-height: 76px; }
  .ub__grid--2 .ub__card, .ub__grid--3:not(.ub__grid--x) .ub__card { min-height: 124px; }
  .ub__grid--x .ub__card { min-height: 58px; }
  .ub__chip { width: 48px; }
  .ub__swatches { gap: 14px 8px; }
  .ub__row { padding: 10px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .ub__sheet, .ub.is-open .ub__sheet { transition: none; }
}
