@layer app {
  body { background: #1b1a18; color: #e8e4dc; }

  .forma {
    --bg: #1b1a18;
    --bg-2: #211f1c;
    --bg-3: #292723;
    --bg-4: #33302b;
    --ink: #e8e4dc;
    --ink-2: #bdb6aa;
    --ink-3: #928b80;
    --line: rgba(232, 228, 220, .12);
    --line-2: rgba(232, 228, 220, .24);
    --brass: #d2ad6a;
    --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
    --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.4, .5, 1);
    --panel-w: clamp(360px, 29vw, 440px);
    --sheet-h: 0px;

    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--panel-w);
    height: calc(100svh - var(--fs-bar-h));
    min-height: 600px;
    overflow: hidden;
    background: var(--bg);
    color: var(--ink);
    font: 400 14px/1.45 var(--sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .forma *, .forma *::before, .forma *::after { box-sizing: border-box; }
  :where(.forma) :where(button) { font: inherit; color: inherit; }
  .forma :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  .forma input[type="radio"], .forma input[type="checkbox"] {
    position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
  }
  .forma [hidden] { display: none !important; }
  .fm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
  .fm-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

  /* ---------------------------------------------------------------- stage */
  .fm-stage {
    position: relative; min-width: 0; overflow: hidden; isolation: isolate;
    background:
      radial-gradient(120% 70% at 50% 108%, #34312c 0%, rgba(52, 49, 44, 0) 62%),
      radial-gradient(90% 80% at 50% 30%, #2a2824 0%, #1e1d1a 58%, #191816 100%);
  }
  .fm-stage::after {
    /* subtle vignette + grain so the backdrop reads as a photographic cyclorama */
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background: radial-gradient(140% 100% at 50% 45%, transparent 55%, rgba(0, 0, 0, .35) 100%);
  }
  .fm-viewport { position: absolute; inset: 0; z-index: 0; outline: none; touch-action: none; }
  .fm-viewport:focus-visible { box-shadow: inset 0 0 0 2px rgba(232, 228, 220, .5); }
  .fm-viewport canvas {
    position: absolute; inset: 0; width: 100%; height: 100%; display: block;
    opacity: 0; transform: scale(.985); transition: opacity .9s var(--ease), transform 1.2s var(--ease);
    cursor: grab;
  }
  .fm-viewport canvas:active { cursor: grabbing; }
  .forma[data-state="ready"] .fm-viewport canvas { opacity: 1; transform: none; }

  /* poster: line drawing while loading, flat 2D preview as WebGL fallback */
  .fm-poster {
    position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
    padding: 18% 12% 22%; transition: opacity .6s var(--ease);
  }
  .fm-poster__svg { width: 100%; max-height: 100%; overflow: visible; }
  .fm-poster__svg rect, .fm-poster__svg ellipse {
    fill: transparent; stroke: rgba(232, 228, 220, .55); stroke-width: .5;
    stroke-dasharray: 1; stroke-dashoffset: 1; animation: fm-draw 2.4s var(--ease) forwards;
  }
  .fm-poster__svg .p-shadow { stroke: none; }
  .fm-poster__svg .p-arm { animation-delay: .25s; }
  .fm-poster__svg .p-seat { animation-delay: .45s; }
  .fm-poster__svg .p-back { animation-delay: .35s; }
  .fm-poster__svg .p-pil { animation-delay: .6s; }
  .fm-poster__svg .p-leg { animation-delay: .7s; }
  @keyframes fm-draw { to { stroke-dashoffset: 0; } }
  .forma[data-state="ready"] .fm-poster { opacity: 0; }

  .forma[data-state="fallback"] .fm-poster { padding: 16% 9% 20%; }
  .forma[data-state="fallback"] .fm-poster__svg rect,
  .forma[data-state="fallback"] .fm-poster__svg ellipse { animation: none; stroke-dashoffset: 0; stroke: rgba(0, 0, 0, .18); stroke-width: .35; transition: fill .5s var(--ease); }
  .forma[data-state="fallback"] .p-fab { fill: var(--fab); }
  .forma[data-state="fallback"] .p-shell { filter: brightness(.82); }
  .forma[data-state="fallback"] .p-back { filter: brightness(.93); }
  .forma[data-state="fallback"] .p-base { filter: brightness(.72); }
  .forma[data-state="fallback"] .p-arm { filter: brightness(1.04); }
  .forma[data-state="fallback"] .p-pil { fill: var(--pil); }
  .forma[data-state="fallback"] .p-leg { fill: var(--leg); }
  .forma[data-state="fallback"] .p-shadow { fill: rgba(0, 0, 0, .45); filter: blur(2px); }
  .forma[data-pillows="off"] .p-pils { opacity: 0; }
  .p-pils { transition: opacity .4s var(--ease); }

  .fm-loader {
    position: absolute; left: 50%; bottom: 17%; transform: translateX(-50%);
    display: grid; justify-items: center; gap: 12px; pointer-events: none;
    color: var(--ink-2); font: 500 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase;
    font-stretch: 112%; transition: opacity .5s var(--ease);
  }
  .fm-loader__bar { width: 168px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .fm-loader__bar i { display: block; height: 100%; width: var(--p, 8%); background: var(--ink); transition: width .5s var(--ease); }
  .forma:not([data-state="loading"]) .fm-loader { opacity: 0; }

  .fm-fallback {
    position: absolute; left: 50%; bottom: clamp(18px, 3vh, 30px); transform: translateX(-50%); z-index: 3;
    display: flex; gap: 10px; align-items: flex-start; width: min(460px, calc(100% - 32px)); margin: 0;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: rgba(27, 26, 24, .82); color: var(--ink-2); font-size: 13px;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .fm-fallback .fm-ic { color: var(--ink); margin-top: 1px; }

  /* heading over the canvas */
  .fm-head { position: absolute; z-index: 3; top: clamp(20px, 3.4vh, 34px); left: clamp(20px, 2.6vw, 40px); pointer-events: none; max-width: 60%; }
  .fm-brand { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; }
  .fm-brand__word { font: 600 12px/1 var(--sans); font-stretch: 125%; letter-spacing: .42em; text-transform: uppercase; color: var(--ink); }
  .fm-brand__sub { font: 400 12px/1 var(--sans); color: var(--ink-3); letter-spacing: .02em; }
  .fm-title {
    margin: 0; font: italic 400 clamp(64px, 8.2vw, 124px)/.86 var(--serif); letter-spacing: -.035em; color: var(--ink);
    font-optical-sizing: auto; text-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  }
  .fm-subtitle { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; letter-spacing: .01em; }
  .fm-subtitle span[data-out] { transition: opacity .25s; }

  .fm-tools { position: absolute; z-index: 4; top: clamp(18px, 3vh, 28px); right: clamp(16px, 2vw, 28px); display: flex; gap: 8px; }
  .fm-tool {
    position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
    background: rgba(27, 26, 24, .55); color: var(--ink);
    -webkit-backdrop-filter: blur(12px) saturate(120%); backdrop-filter: blur(12px) saturate(120%);
    transition: background .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease), color .25s;
  }
  .fm-tool:hover { background: rgba(52, 49, 44, .75); border-color: var(--line-2); }
  .fm-tool:active { transform: scale(.96); }
  .fm-tool--sq { width: 40px; padding: 0; justify-content: center; }
  .fm-tool[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .fm-tool__label { font: 500 13px/1 var(--sans); letter-spacing: .01em; }
  .fm-badge {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-right: -6px;
    border-radius: 999px; background: var(--ink); color: var(--bg); font: 650 11.5px/1 var(--sans); font-variant-numeric: tabular-nums;
  }
  .fm-badge.is-bump { animation: fm-bump .55s var(--spring); }
  @keyframes fm-bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
  [data-tip]::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -3px);
    padding: 6px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none; opacity: 0;
    background: var(--ink); color: var(--bg); font: 600 11.5px/1 var(--sans); transition: opacity .18s, transform .18s;
  }
  .fm-bar [data-tip]::after { top: auto; bottom: calc(100% + 8px); transform: translate(-50%, 3px); }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

  /* camera presets */
  .fm-bar {
    position: absolute; z-index: 4; left: 50%; bottom: clamp(18px, 3vh, 30px); transform: translateX(-50%);
    display: flex; align-items: center; gap: 8px; transition: bottom .5s var(--ease), opacity .3s;
  }
  .fm-views {
    position: relative; display: flex; height: 40px; padding: 3px; border-radius: 999px; border: 1px solid var(--line);
    background: rgba(27, 26, 24, .55); -webkit-backdrop-filter: blur(12px) saturate(120%); backdrop-filter: blur(12px) saturate(120%);
  }
  .fm-views button {
    position: relative; z-index: 1; min-width: 72px; padding: 0 14px; border: 0; border-radius: 999px; background: none; cursor: pointer;
    color: var(--ink-2); font: 500 13px/1 var(--sans); letter-spacing: .01em; transition: color .3s var(--ease);
  }
  .fm-views button:hover { color: var(--ink); }
  .fm-views button[aria-pressed="true"] { color: var(--bg); }
  .fm-views__ind {
    position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: var(--w, 72px); border-radius: 999px; background: var(--ink);
    transform: translateX(var(--x, 3px)); transition: transform .5s var(--spring), width .5s var(--spring);
  }
  .forma:not(.is-js) .fm-views__ind { display: none; }
  .forma:not(.is-js) .fm-views button[aria-pressed="true"] { background: var(--ink); }
  .forma[data-state="fallback"] .fm-bar { display: none; }

  .fm-hint {
    position: absolute; z-index: 2; left: 50%; bottom: calc(clamp(18px, 3vh, 30px) + 52px); transform: translateX(-50%);
    margin: 0; color: var(--ink-3); font-size: 12px; letter-spacing: .02em; white-space: nowrap; pointer-events: none;
    transition: opacity .6s var(--ease), bottom .5s var(--ease);
  }
  .forma:not([data-state="ready"]) .fm-hint, .forma.is-touched .fm-hint, .forma.has-dims .fm-hint { opacity: 0; }

  /* hotspots + popover */
  .fm-hotspots { position: absolute; inset: 0; pointer-events: none; z-index: 2; transition: opacity .3s var(--ease); }
  .fm-hot {
    position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(27, 26, 24, .4); cursor: pointer; pointer-events: auto;
    transform: translate3d(var(--hx, -100px), var(--hy, -100px), 0) scale(var(--hs, 1));
    opacity: var(--ho, 0); transition: opacity .35s var(--ease), background .2s;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgba(232, 228, 220, .55);
  }
  .fm-hot i { position: absolute; inset: 10px; border-radius: 50%; background: var(--ink); transition: inset .25s var(--spring); }
  .fm-hot::before {
    content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(232, 228, 220, .7);
    animation: fm-ping 2.6s var(--ease) infinite;
  }
  .fm-hot:hover i, .fm-hot[aria-expanded="true"] i { inset: 8px; }
  .fm-hot:hover { background: rgba(27, 26, 24, .7); }
  .fm-hot[data-off] { pointer-events: none; }
  @keyframes fm-ping { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
  .fm-pop {
    position: absolute; z-index: 5; left: 0; top: 0; width: 272px; padding: 16px 16px 14px; border-radius: 14px;
    background: rgba(33, 31, 28, .92); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    transform: translate3d(var(--px, 0), var(--py, 0), 0); animation: fm-pop-in .35s var(--ease);
  }
  @keyframes fm-pop-in { from { opacity: 0; translate: 0 6px; } }
  .fm-pop__kicker { margin: 0 0 6px; font: 600 10.5px/1 var(--sans); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
  .fm-pop__title { margin: 0 0 6px; font: italic 500 22px/1.1 var(--serif); color: var(--ink); padding-right: 24px; }
  .fm-pop__text { margin: 0 0 12px; color: var(--ink-2); font-size: 13px; }
  .fm-pop__link {
    display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--ink); font: 600 12.5px/1 var(--sans); letter-spacing: .02em;
  }
  .fm-pop__link .fm-ic { width: 15px; height: 15px; transition: transform .25s var(--ease); }
  .fm-pop__link:hover .fm-ic { transform: translateX(3px); }
  .fm-pop__close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
  .fm-pop__close:hover { color: var(--ink); background: rgba(232, 228, 220, .08); }
  .fm-pop__close .fm-ic { width: 16px; height: 16px; }

  .fm-dimlabels span {
    position: absolute; left: 0; top: 0; z-index: 2; padding: 5px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none;
    background: rgba(27, 26, 24, .82); border: 1px solid var(--line-2); color: var(--ink);
    font: 600 12px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em;
    transform: translate3d(var(--lx, -200px), var(--ly, -200px), 0) translate(-50%, -50%);
    opacity: var(--lo, 0); transition: opacity .35s var(--ease);
  }

  /* ---------------------------------------------------------------- panel */
  .fm-panel {
    position: relative; z-index: 5; display: flex; flex-direction: column; min-height: 0; min-width: 0;
    background: var(--bg-2); border-left: 1px solid var(--line);
  }
  .fm-grip, .fm-tabs { display: none; }
  .fm-steps { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
  .fm-step { padding: 22px clamp(20px, 2vw, 28px) 24px; border-bottom: 1px solid var(--line); }
  .fm-step__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .fm-step h3 {
    display: flex; align-items: baseline; gap: 10px; margin: 0;
    font: 600 11.5px/1 var(--sans); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  }
  .fm-step__n { font: italic 400 19px/1 var(--serif); letter-spacing: 0; color: var(--ink-3); text-transform: none; }
  .fm-step__val.is-off { opacity: .45; text-decoration: line-through; }
  .fm-step__val { color: var(--ink-2); font-size: 12.5px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fm-step fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

  /* models */
  .fm-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fm-model { position: relative; cursor: pointer; }
  .fm-model__card {
    display: grid; gap: 4px; height: 100%; padding: 12px 10px 11px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--bg-3); transition: border-color .25s var(--ease), background .25s var(--ease), transform .2s var(--ease);
  }
  .fm-model:hover .fm-model__card { border-color: var(--line-2); background: var(--bg-4); }
  .fm-model:active .fm-model__card { transform: scale(.98); }
  .fm-model input:checked + .fm-model__card { border-color: var(--ink); background: rgba(232, 228, 220, .07); }
  .fm-model input:focus-visible + .fm-model__card { outline: 2px solid var(--ink); outline-offset: 2px; }
  .fm-model__svg { width: 100%; height: 34px; margin-bottom: 6px; fill: none; stroke: var(--ink-3); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; transition: stroke .3s; }
  .fm-model input:checked + .fm-model__card .fm-model__svg { stroke: var(--ink); }
  .fm-model__name { font: 600 13px/1.15 var(--sans); color: var(--ink); }
  .fm-model__price { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

  /* segmented fabric picker */
  .fm-seg { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 3px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); }
  .fm-seg__opt { position: relative; z-index: 1; cursor: pointer; }
  .fm-seg__opt span {
    display: grid; place-items: center; height: 34px; border-radius: 999px; color: var(--ink-2);
    font: 500 13px/1 var(--sans); transition: color .3s var(--ease), background .3s;
  }
  .fm-seg__opt:hover span { color: var(--ink); }
  .fm-seg__opt input:checked + span { color: var(--bg); }
  .fm-seg__opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
  .forma:not(.is-js) .fm-seg__opt input:checked + span { background: var(--ink); }
  .fm-seg__ind {
    position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: var(--w, 25%); border-radius: 999px; background: var(--ink);
    transform: translateX(var(--x, 3px)); transition: transform .5s var(--spring), width .5s var(--spring);
  }
  .forma:not(.is-js) .fm-seg__ind { display: none; }
  .fm-fabric__blurb { display: grid; gap: 2px; margin: 14px 0 14px; min-height: 38px; }
  .fm-fabric__blurb strong { font-weight: 500; color: var(--ink); font-size: 13.5px; }
  .fm-fabric__blurb span { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
  .fm-fabric__blurb.is-swap { animation: fm-fade-up .45s var(--ease); }
  @keyframes fm-fade-up { from { opacity: 0; transform: translateY(4px); } }

  .fm-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
  .fm-swatches.is-swap .fm-swatch { animation: fm-sw-in .5s var(--spring) backwards; }
  .fm-swatches.is-swap .fm-swatch:nth-child(2) { animation-delay: .03s; }
  .fm-swatches.is-swap .fm-swatch:nth-child(3) { animation-delay: .06s; }
  .fm-swatches.is-swap .fm-swatch:nth-child(4) { animation-delay: .09s; }
  .fm-swatches.is-swap .fm-swatch:nth-child(5) { animation-delay: .12s; }
  .fm-swatches.is-swap .fm-swatch:nth-child(6) { animation-delay: .15s; }
  @keyframes fm-sw-in { from { opacity: 0; transform: scale(.6); } }
  .fm-swatch { position: relative; display: block; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
  .fm-swatch__dot {
    position: absolute; inset: 0; border-radius: 50%;
    background-color: var(--sw); background-image: var(--tex, none); background-size: cover;
    box-shadow: inset 0 -7px 12px rgba(0, 0, 0, .28), inset 0 2px 3px rgba(255, 255, 255, .14), 0 0 0 1px rgba(0, 0, 0, .25);
    transition: transform .3s var(--spring), box-shadow .3s var(--ease);
  }
  .fm-swatch:hover .fm-swatch__dot { transform: scale(1.08); }
  .fm-swatch input:checked + .fm-swatch__dot {
    box-shadow: inset 0 -7px 12px rgba(0, 0, 0, .28), inset 0 2px 3px rgba(255, 255, 255, .14), 0 0 0 3px var(--bg-2), 0 0 0 4.5px var(--ink);
  }
  .fm-swatch input:focus-visible + .fm-swatch__dot { outline: 2px solid var(--ink); outline-offset: 6px; }
  .fm-colorname { display: flex; gap: 8px; align-items: baseline; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); }
  .fm-colorname strong { font: italic 500 17px/1 var(--serif); color: var(--ink); letter-spacing: .005em; }

  /* legs */
  .fm-legs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fm-leg { position: relative; cursor: pointer; }
  .fm-leg__card {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center;
    padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-3);
    transition: border-color .25s var(--ease), background .25s var(--ease), transform .2s var(--ease);
  }
  .fm-leg:hover .fm-leg__card { border-color: var(--line-2); background: var(--bg-4); }
  .fm-leg:active .fm-leg__card { transform: scale(.98); }
  .fm-leg input:checked + .fm-leg__card { border-color: var(--ink); background: rgba(232, 228, 220, .07); }
  .fm-leg input:focus-visible + .fm-leg__card { outline: 2px solid var(--ink); outline-offset: 2px; }
  .fm-leg__dot {
    grid-row: span 2; width: 26px; height: 26px; border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .45), transparent 42%), var(--lg);
    box-shadow: inset 0 -4px 7px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .3);
  }
  .fm-leg[data-kind="wood"] .fm-leg__dot {
    background:
      radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .28), transparent 45%),
      repeating-linear-gradient(100deg, rgba(0, 0, 0, .0) 0 3px, rgba(0, 0, 0, .16) 3px 4px, rgba(0, 0, 0, 0) 4px 7px),
      var(--lg);
  }
  .fm-leg[data-kind="brass"] .fm-leg__dot { background: radial-gradient(circle at 34% 30%, #fff4cf 0%, #e3c27f 22%, #b48d48 58%, #7d5f2c 100%); }
  .fm-leg__name { font: 600 13px/1.15 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fm-leg__price { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

  /* switch */
  .fm-switch { position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-3); transition: border-color .25s, background .25s; }
  .fm-switch:hover { border-color: var(--line-2); }
  .fm-switch__track { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--bg-4); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .3s var(--ease); }
  .fm-switch__track i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-2); transition: transform .4s var(--spring), background .3s; }
  .fm-switch input:checked + .fm-switch__track { background: var(--ink); }
  .fm-switch input:checked + .fm-switch__track i { transform: translateX(18px); background: var(--bg); }
  .fm-switch input:focus-visible + .fm-switch__track { outline: 2px solid var(--ink); outline-offset: 3px; }
  .fm-switch__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
  .fm-switch__text strong { font-weight: 600; font-size: 13px; color: var(--ink); }
  .fm-switch__text span { font-size: 12px; color: var(--ink-3); }
  .fm-switch__chip { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--c); box-shadow: inset 0 -4px 7px rgba(0, 0, 0, .3), 0 0 0 1px rgba(0, 0, 0, .3); transform: rotate(-8deg); transition: background .4s, opacity .3s, transform .4s var(--spring); }
  .fm-switch input:not(:checked) ~ .fm-switch__chip { opacity: .3; transform: rotate(0) scale(.85); }
  .fm-switch--sm { margin-top: 14px; padding: 10px 12px; }

  /* dimensions */
  .fm-units { display: inline-flex; padding: 2px; border-radius: 999px; border: 1px solid var(--line); }
  .fm-units button { height: 24px; min-width: 34px; padding: 0 8px; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--ink-3); font: 600 11.5px/1 var(--sans); letter-spacing: .04em; transition: background .25s, color .25s; }
  .fm-units button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  .fm-dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; }
  .fm-dims__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
  .fm-dims__row:nth-child(5) { grid-column: 1 / -1; }
  .fm-dims dt { color: var(--ink-3); font-size: 12.5px; }
  .fm-dims dd { margin: 0; color: var(--ink); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

  /* summary */
  .fm-summary { border-bottom: 0; }
  .fm-sum { list-style: none; margin: 0; padding: 0; }
  .fm-sum li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
  .fm-sum li > span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .fm-sum b { font-weight: 600; color: var(--ink); }
  .fm-sum li.is-off { opacity: .4; }
  .fm-sum li.is-off > span:last-child { text-decoration: line-through; }
  .fm-sum li.is-flash { animation: fm-flash 1s var(--ease); }
  @keyframes fm-flash { 0% { background: rgba(232, 228, 220, .1); } 100% { background: transparent; } }
  .fm-sum__note { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; color: var(--ink-3); font-size: 12.5px; }

  /* footer: total + CTA */
  .fm-foot {
    display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px;
    padding: 16px clamp(20px, 2vw, 28px) calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    background: linear-gradient(to bottom, rgba(33, 31, 28, .9), var(--bg-2));
  }
  .fm-total { display: grid; gap: 3px; min-width: 0; }
  .fm-total__label { font: 600 10.5px/1 var(--sans); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
  .fm-total__label small { font: inherit; letter-spacing: .06em; text-transform: none; font-weight: 400; margin-left: 4px; }
  .fm-total__value { display: block; font: 500 clamp(30px, 2.6vw, 38px)/1 var(--serif); letter-spacing: -.01em; color: var(--ink); font-variant-numeric: lining-nums; white-space: nowrap; }
  .fm-total__value.is-up { animation: fm-tick .6s var(--ease); }
  @keyframes fm-tick { 30% { color: #fff; text-shadow: 0 0 22px rgba(232, 228, 220, .45); } }
  .fm-total__eta { font-size: 12px; color: var(--ink-3); }
  .fm-cta {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 20px 0 22px;
    border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); cursor: pointer; overflow: hidden;
    font: 600 14px/1 var(--sans); letter-spacing: .01em; white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  }
  .fm-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(232, 228, 220, .45); background: #f4f1ea; }
  .fm-cta:active { transform: scale(.97); }
  .fm-cta:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
  .fm-cta .fm-ic { transition: transform .35s var(--spring); }
  .fm-cta:hover .fm-ic { transform: rotate(90deg); }
  .fm-cta[data-act="quote-request"]:hover .fm-ic, .fm-qform .fm-cta:hover .fm-ic { transform: translateX(3px); }
  .fm-cta.is-done { background: #cfe3c9; }
  .fm-ghost { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--ink); cursor: pointer; font: 500 13.5px/1 var(--sans); transition: background .2s, border-color .2s; }
  .fm-ghost:hover { background: rgba(232, 228, 220, .06); border-color: var(--ink-3); }

  /* ---------------------------------------------------------------- quote drawer */
  .fm-quote {
    position: fixed; inset: var(--fs-bar-h) 0 0 auto; margin: 0; padding: 0; border: 0;
    width: min(440px, 100vw); height: calc(100dvh - var(--fs-bar-h)); max-height: none; max-width: 100vw;
    background: var(--bg-2); color: var(--ink); border-left: 1px solid var(--line);
    box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .8);
    font: 400 14px/1.45 var(--sans);
  }
  .fm-quote[open] { animation: fm-drawer .5s var(--ease); }
  .fm-quote.is-closing { animation: fm-drawer-out .3s var(--ease) forwards; }
  @keyframes fm-drawer { from { transform: translateX(100%); } }
  @keyframes fm-drawer-out { to { transform: translateX(100%); } }
  .fm-quote::backdrop { background: rgba(10, 9, 8, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  .fm-quote__inner { display: flex; flex-direction: column; height: 100%; }
  .fm-quote__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 16px 24px; border-bottom: 1px solid var(--line); }
  .fm-quote__head h2 { margin: 0; font: italic 400 30px/1 var(--serif); letter-spacing: -.01em; }
  .fm-quote__head .fm-tool { background: none; }
  .fm-quote__view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .fm-qlist { list-style: none; margin: 0; padding: 8px 16px; flex: 1; overflow-y: auto; }
  .fm-qlist:empty { display: none; }
  .fm-qlist:not(:empty) + .fm-qempty { display: none; }
  .fm-qitem { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); animation: fm-fade-up .45s var(--ease); }
  .fm-qitem.is-out { animation: fm-q-out .35s var(--ease) forwards; }
  @keyframes fm-q-out { to { opacity: 0; transform: translateX(24px); } }
  .fm-qitem img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg-3); display: block; }
  .fm-qitem h3 { margin: 0 0 3px; font: italic 500 18px/1.1 var(--serif); }
  .fm-qitem p { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
  .fm-qitem strong { display: block; margin-top: 5px; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
  .fm-qitem button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--ink-3); cursor: pointer; transition: color .2s, background .2s; }
  .fm-qitem button:hover { color: var(--ink); background: rgba(232, 228, 220, .08); }
  .fm-qempty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 30px; text-align: center; color: var(--ink-3); }
  .fm-qempty__art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1px dashed var(--line-2); color: var(--ink-2); }
  .fm-qempty__art .fm-ic { width: 26px; height: 26px; stroke-width: 1.3; }
  .fm-qempty p { margin: 0; max-width: 28ch; font-size: 13px; }
  .fm-qempty strong { display: block; margin-bottom: 4px; color: var(--ink); font: italic 500 20px/1.2 var(--serif); }
  .fm-quote__foot { display: grid; gap: 14px; padding: 16px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .fm-quote__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; color: var(--ink-3); font-size: 12.5px; }
  .fm-quote__total output { font: 500 28px/1 var(--serif); color: var(--ink); }
  .fm-quote__foot .fm-cta { width: 100%; }

  .fm-qform { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); gap: 14px; overflow-y: auto; }
  .fm-qform__lead { margin: 0 0 4px; color: var(--ink-2); font-size: 13.5px; }
  .fm-field { display: grid; gap: 6px; }
  .fm-field label { font: 600 11px/1 var(--sans); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
  .fm-field input {
    height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--ink);
    font: 400 15px/1 var(--sans); transition: border-color .2s, box-shadow .2s;
  }
  .fm-field input::placeholder { color: #6f6a62; }
  .fm-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(232, 228, 220, .12); }
  .fm-field.is-bad input { border-color: #e2836b; }
  .fm-field__err { min-height: 14px; color: #f0a08b; font-size: 12px; }
  .fm-check { position: relative; display: flex; gap: 10px; align-items: center; cursor: pointer; color: var(--ink-2); font-size: 13px; }
  .fm-check::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--bg-3) center / 12px no-repeat; transition: background-color .2s; }
  .fm-check:has(input:checked)::before {
    background-color: var(--ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1a18' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  }
  .fm-check:has(input:focus-visible)::before { outline: 2px solid var(--ink); outline-offset: 2px; }
  .fm-qform__demo { margin: 0; color: var(--ink-3); font-size: 12px; }
  .fm-qform__actions { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
  .fm-qform__actions .fm-cta { flex: 1; }
  .fm-qdone { justify-content: center; align-items: center; text-align: center; padding: 30px 28px; gap: 6px; }
  .fm-qdone__seal { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%; background: var(--ink); color: var(--bg); animation: fm-seal .7s var(--spring); }
  .fm-qdone__seal .fm-ic { width: 32px; height: 32px; stroke-width: 2; }
  @keyframes fm-seal { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }
  .fm-qdone h3 { margin: 0; font: italic 400 34px/1.05 var(--serif); }
  .fm-qdone p { margin: 0; color: var(--ink-2); }
  .fm-qdone strong { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
  .fm-qdone__text { max-width: 32ch; margin: 8px 0 18px !important; font-size: 13px; color: var(--ink-3) !important; }

  /* toasts + fly-to-quote */
  .fm-toasts { position: absolute; z-index: 20; top: 20px; left: calc((100% - var(--panel-w)) / 2); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
  .fm-toast {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px; max-width: min(92vw, 520px);
    background: var(--ink); color: var(--bg); font: 500 13.5px/1.3 var(--sans); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
    animation: fm-toast-in .45s var(--spring);
  }
  .fm-toast .fm-ic { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--bg); color: var(--ink); stroke-width: 2.4; }
  .fm-toast.is-out { animation: fm-toast-out .3s var(--ease) forwards; }
  @keyframes fm-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
  @keyframes fm-toast-out { to { opacity: 0; transform: translateY(-8px); } }
  .fm-fly { position: fixed; z-index: 30; left: 0; top: 0; width: 160px; height: 120px; border-radius: 14px; object-fit: cover; pointer-events: none; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); }

  /* ---------------------------------------------------------------- mobile: canvas on top, panel as bottom sheet */
  @media (max-width: 899px) {
    .forma { display: block; min-height: 540px; --sheet-peek: min(47%, 400px); --sheet-full: calc(100% - 150px); --sheet-h: var(--sheet-peek); }
    .forma[data-sheet="full"] .fm-bar, .forma[data-sheet="full"] .fm-hint, .forma[data-sheet="full"] .fm-hotspots { opacity: 0; pointer-events: none; }
    .forma[data-sheet="full"] .fm-hot { pointer-events: none; }
    .forma[data-sheet="full"] { --sheet-h: var(--sheet-full); }
    .fm-stage { position: absolute; inset: 0; }
    .fm-head { top: 16px; left: 18px; max-width: calc(100% - 150px); }
    .fm-brand { margin-bottom: 6px; gap: 8px; }
    .fm-brand__sub { display: none; }
    .fm-title { font-size: 58px; }
    .fm-subtitle { margin-top: 8px; font-size: 12.5px; }
    .fm-tools { top: 14px; right: 14px; gap: 6px; }
    .fm-tool { height: 38px; }
    .fm-tool--sq { width: 38px; }
    .fm-tool__label { display: none; }
    .fm-tool--quote { padding: 0 11px; }
    [data-tip]::after { display: none; }
    .fm-bar { bottom: calc(var(--sheet-h) + 12px); gap: 6px; max-width: calc(100% - 20px); }
    .fm-views { height: 38px; }
    .fm-views button { min-width: 0; padding: 0 11px; font-size: 12.5px; }
    .fm-hint { bottom: calc(var(--sheet-h) + 62px); font-size: 11.5px; }
    .fm-poster { inset: 0 0 var(--sheet-peek) 0; padding: 30% 8% 18%; }
    .forma[data-state="fallback"] .fm-poster { padding: 26% 6% 30%; }
    .fm-loader { bottom: calc(var(--sheet-peek) + 70px); }
    .fm-fallback { bottom: calc(var(--sheet-peek) + 14px); font-size: 12px; }
    .fm-toasts { left: 50%; top: 12px; width: calc(100% - 24px); }

    .fm-panel {
      position: absolute; left: 0; right: 0; bottom: 0; height: var(--sheet-h);
      border-left: 0; border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2);
      box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .65);
      transition: height .5s var(--spring);
    }
    .fm-panel.is-dragging { transition: none; }
    .fm-grip { display: grid; place-items: center; flex: none; height: 22px; width: 100%; border: 0; background: none; cursor: grab; touch-action: none; padding: 0; }
    .fm-grip i { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .2s, width .3s var(--spring); }
    .fm-grip:hover i, .fm-grip:focus-visible i { background: var(--ink-3); width: 52px; }
    .fm-tabs { position: relative; display: flex; flex: none; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
    .fm-tabs::-webkit-scrollbar { display: none; }
    .fm-tabs button {
      position: relative; flex: none; height: 40px; padding: 0 10px; border: 0; background: none; cursor: pointer; white-space: nowrap;
      color: var(--ink-3); font: 600 11px/1 var(--sans); font-stretch: 110%; letter-spacing: .12em; text-transform: uppercase; transition: color .25s;
    }
    .fm-tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transition: transform .35s var(--spring); }
    .fm-tabs button[aria-current="true"] { color: var(--ink); }
    .fm-tabs button[aria-current="true"]::after { transform: none; }

    .fm-steps { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
    .fm-steps::-webkit-scrollbar { display: none; }
    .fm-step { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; padding: 14px 18px 18px; border-bottom: 0; }
    .fm-step__head { margin-bottom: 12px; }
    .fm-model__card { padding: 10px 8px; }
    .fm-model__svg { height: 28px; margin-bottom: 4px; }
    .fm-model__name { font-size: 12.5px; }
    .fm-fabric__blurb { margin: 12px 0; }
    .fm-swatch { width: 38px; height: 38px; }
    .fm-swatches { gap: 11px; }
    .fm-sum li { padding: 7px 0; }
    .fm-sum__note { margin-top: 10px; }
    .fm-tabs { -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 28px), transparent); }
    .fm-foot { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
    .fm-total__value { font-size: 28px; }
    .fm-total__eta { font-size: 11.5px; }
    .fm-cta { height: 48px; padding: 0 16px 0 18px; font-size: 13.5px; }
    .fm-quote { width: 100vw; border-left: 0; }
  }
  @media (max-width: 380px) {
    .fm-cta span { display: none; }
    .fm-cta { width: 48px; padding: 0; }
    .fm-views button { padding: 0 9px; font-size: 12px; }
    .fm-title { font-size: 50px; }
  }
  @media (max-width: 899px) and (max-height: 700px) {
    .forma { --sheet-peek: min(50%, 340px); }
    .fm-title { font-size: 46px; }
    .fm-subtitle { display: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .forma *, .forma *::before, .forma *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .fm-hot::before { animation: none; display: none; }
  }
}
