/* ==========================================================================
   The Atelier Viewer — product showcase & quote request
   ========================================================================== */

.av {
  --av-bg: #0e0809;
  --av-panel: rgba(28, 18, 21, .72);
  --av-panel-solid: #1a1114;
  --av-line: rgba(245, 238, 230, .1);
  --av-line-2: rgba(245, 238, 230, .18);
  --av-text: #f5eee6;
  --av-dim: rgba(245, 238, 230, .55);
  --av-accent: var(--gold-soft);

  position: fixed; inset: 0; z-index: 200;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr) auto;
  grid-template-areas: "side bar" "side stage" "side dock";
  gap: 14px;
  padding: 22px;
  background:
    radial-gradient(50% 60% at 60% 45%, rgba(116, 32, 58, .28), transparent 70%),
    var(--av-bg);
  color: var(--av-text);
  font-family: var(--sans);
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease), visibility 0s .6s;
}
.av.is-open { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.av::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--av-line) 1px, transparent 1px), linear-gradient(90deg, var(--av-line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .35;
  -webkit-mask: radial-gradient(70% 70% at 60% 50%, #000, transparent);
  mask: radial-gradient(70% 70% at 60% 50%, #000, transparent);
}
.av .corner { border-color: var(--gold); opacity: .8; }
.av .corner--tl { top: 8px; left: 8px; } .av .corner--tr { top: 8px; right: 8px; }
.av .corner--bl { bottom: 8px; left: 8px; } .av .corner--br { bottom: 8px; right: 8px; }

.av-panel { background: var(--av-panel); border: 1px solid var(--av-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 4px; }
.av-ibtn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--av-line-2); border-radius: 4px; color: var(--av-accent); background: rgba(14, 8, 9, .5); transition: background .3s, border-color .3s, color .3s; }
.av-ibtn:hover { border-color: var(--av-accent); background: rgba(216, 189, 143, .08); }
.av-ibtn[aria-pressed="true"] { background: var(--av-accent); color: var(--night); border-color: var(--av-accent); }
.av-ibtn svg { width: 18px; height: 18px; }
.av-ibtn:disabled { opacity: .35; cursor: default; }
.av-group { display: inline-flex; }
.av-group .av-ibtn { border-radius: 0; }
.av-group .av-ibtn:first-child { border-radius: 4px 0 0 4px; }
.av-group .av-ibtn:last-child { border-radius: 0 4px 4px 0; }
.av-group .av-ibtn + .av-ibtn { border-left: 0; }
.av-h { font: 500 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--av-text); }
.av-h small { color: var(--av-dim); font-size: inherit; margin-left: 6px; }

/* ---------- Top bar ---------- */
.av__bar { grid-area: bar; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 3; }
.av__bar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.av__count { font: 500 10.5px/1 var(--sans); letter-spacing: .2em; color: var(--av-dim); white-space: nowrap; }
.av__brand { display: flex; align-items: center; gap: 10px; color: var(--av-text); }
.av__brand .mono { height: 26px; color: var(--av-accent); }
.av__brand span { font-family: var(--serif); letter-spacing: .32em; font-size: 12px; text-transform: uppercase; }

/* ---------- Side panel ---------- */
.av__side { grid-area: side; display: flex; flex-direction: column; gap: 14px; min-height: 0; position: relative; z-index: 2; }
.av-sketch { position: relative; padding: 12px; }
.av-sketch__box { position: relative; aspect-ratio: 1 / 1.05; border: 1px dashed rgba(216, 189, 143, .35); border-radius: 2px; overflow: hidden; background: #0f090b; }
.av-sketch__box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.25); transform-origin: 50% 35%; }
.av-sketch__label { position: absolute; left: 22px; bottom: 20px; font: 500 9.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--av-dim); }
.av-sketch__btn { position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; }
.av-sketch__btn svg { width: 14px; height: 14px; }

.av-fabric { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px 16px 12px; }
.av-fabric__list { overflow-y: auto; margin-top: 14px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(245, 238, 230, .2) transparent; }
.av-fabric details { border-top: 1px solid var(--av-line); }
.av-fabric details:first-child { border-top: 0; }
.av-fabric summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; cursor: pointer; font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--av-dim); }
.av-fabric summary::-webkit-details-marker { display: none; }
.av-fabric summary::after { content: ""; width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
.av-fabric details[open] summary { color: var(--av-accent); }
.av-fabric details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.av-fabric__tiles { display: grid; gap: 8px; padding-bottom: 12px; }
.fabric-tile { position: relative; height: 54px; border-radius: 3px; overflow: hidden; text-align: left; padding: 0 12px; display: flex; align-items: flex-end; padding-bottom: 9px; font-size: 12.5px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); border: 1px solid transparent; transition: border-color .3s, transform .3s var(--ease); }
.fabric-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .42), transparent 75%); }
.fabric-tile span { position: relative; z-index: 1; }
.fabric-tile:hover { transform: translateX(3px); }
.fabric-tile[aria-pressed="true"] { border-color: var(--av-accent); box-shadow: inset 0 0 0 1px var(--av-accent); }
.fabric-tile[aria-pressed="true"]::before { content: ""; position: absolute; right: 10px; top: 10px; z-index: 2; width: 7px; height: 7px; border-radius: 50%; background: var(--av-accent); }

.av-summary { padding: 16px; display: grid; gap: 8px; }
.av-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 6px 0 0; font-size: 12.5px; }
.av-summary dt { color: var(--av-dim); font: 500 9.5px/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.av-summary dd { margin: 0; text-align: right; color: var(--av-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Stage ---------- */
.av__stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.av__glow { position: absolute; left: 50%; top: 52%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(184, 146, 90, .16), transparent); pointer-events: none; }
.av__viewport { position: relative; perspective: 1400px; }
.av__frame { position: relative; overflow: hidden; border-radius: 2px; box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .8); background: #0f090b; }
.av__cam { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 1.3s var(--ease); will-change: transform; }
.av__cam.is-dragging { transition: none; }
.av__tilt { position: absolute; inset: 0; transition: transform .9s var(--ease); transform-style: preserve-3d; }
.av__breathe { position: absolute; inset: 0; animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.018); } }
.av__photo, .av__sketch { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.av__sketch { background: #0f090b; }
.av__scan { position: absolute; left: -10%; right: -10%; height: 2px; top: 100%; background: linear-gradient(90deg, transparent, var(--gold-soft) 30%, #fff 50%, var(--gold-soft) 70%, transparent); box-shadow: 0 0 24px 4px rgba(216, 189, 143, .45); opacity: 0; pointer-events: none; }
.av__loader { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 1px dashed rgba(216, 189, 143, .7); animation: spin 2.4s linear infinite; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 5; }
.av.is-loading .av__loader { opacity: 1; }

/* hotspots */
.hotspot { position: absolute; z-index: 4; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; transition: opacity .5s, transform .5s var(--ease); }
.hotspot i { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); animation: hot 2.2s infinite; }
@keyframes hot { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 70% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.hotspot span { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 8px 12px; background: rgba(14, 8, 9, .82); border: 1px solid var(--av-line-2); border-radius: 3px; font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: 0; transition: opacity .3s, transform .3s var(--ease); pointer-events: none; }
.hotspot:hover span, .hotspot:focus-visible span { opacity: 1; transform: translate(4px, -50%); }
.hotspot.is-active i { background: var(--av-accent); }
.av.is-zoomed .hotspot, .av.is-revealing .hotspot, .av.is-sketch-view .hotspot { opacity: 0; pointer-events: none; }

/* overlays */
.av__info { position: absolute; left: 22px; top: 18px; z-index: 6; max-width: min(42%, 380px); pointer-events: none; }
.av__info .av-h { color: var(--av-accent); }
.av__name { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 40px); line-height: 1.02; margin: 12px 0 10px; }
.av__piece { font-size: 13.5px; color: var(--av-dim); }
.av__piece b { font-weight: 500; color: var(--av-text); }
.av__note { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--av-dim); }
.av__rail { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 6; display: grid; gap: 10px; }
.av__rail .av-group { flex-direction: column; }
.av__rail .av-group .av-ibtn { border-radius: 0; }
.av__rail .av-group .av-ibtn:first-child { border-radius: 4px 4px 0 0; }
.av__rail .av-group .av-ibtn:last-child { border-radius: 0 0 4px 4px; border-top: 0; border-left: 1px solid var(--av-line-2); }
.av__hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; font: 500 9.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--av-dim); opacity: 0; transition: opacity .4s; pointer-events: none; }
.av.is-zoomed .av__hint { opacity: 1; }
.av__nav { position: absolute; top: 50%; z-index: 6; transform: translateY(-50%); }
.av__nav--prev { left: 18px; }
.av__nav--next { right: 74px; }

/* ---------- Dock ---------- */
.av__dock {
  grid-area: dock; position: relative; z-index: 3;
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center;
  grid-template-areas: "sw sw sw" "pc sz cta";
}
.av-panes, .av-panes > [data-pane] { display: contents; }
.av-fabric--m { display: none; }
.av-swatches { grid-area: sw; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 18px; padding: 16px 20px 12px; border-bottom: 1px solid var(--av-line); }
.av-swatches__row { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: center; gap: 14px; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: none; }
.av-swatches__row::-webkit-scrollbar { display: none; }
.swatch { flex: none; display: grid; justify-items: center; gap: 7px; width: 64px; }
.swatch__ball { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset -4px -6px 10px rgba(0, 0, 0, .45), inset 3px 4px 8px rgba(255, 255, 255, .25), 0 6px 14px -6px rgba(0, 0, 0, .8); transition: transform .4s var(--ease), box-shadow .4s; background-size: cover; background-position: center; position: relative; }
.swatch__ball::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid transparent; transition: border-color .3s; }
.swatch:hover .swatch__ball { transform: translateY(-2px); }
.swatch[aria-pressed="true"] .swatch__ball::after { border-color: var(--av-accent); }
.swatch__name { font-size: 10.5px; color: var(--av-dim); white-space: nowrap; line-height: 1.2; text-align: center; }
.swatch[aria-pressed="true"] .swatch__name { color: var(--av-text); }
.av-tabs { grid-column: 1 / -1; display: flex; justify-content: center; gap: 4px 26px; flex-wrap: wrap; }
.av-tab { font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--av-dim); padding: 10px 0 4px; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.av-tab[aria-selected="true"] { color: var(--av-text); border-color: var(--av-accent); }

.av-pieces { grid-area: pc; display: flex; gap: 6px; padding: 12px 18px 12px 16px; border-right: 1px solid var(--av-line); }
.piece-btn { display: grid; justify-items: center; gap: 7px; min-width: 92px; padding: 8px 10px 9px; border-radius: 4px; font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--av-dim); border: 1px solid transparent; transition: color .3s, border-color .3s, background .3s; }
.piece-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.piece-btn:hover { color: var(--av-text); }
.piece-btn[aria-pressed="true"] { color: var(--av-text); border-color: var(--av-line-2); background: rgba(245, 238, 230, .05); }
.piece-btn[aria-pressed="true"] svg { stroke: var(--av-accent); }
.av-size { grid-area: sz; display: grid; gap: 10px; min-width: 0; padding: 12px 18px; }
.av-size__list { display: flex; gap: 6px; flex-wrap: wrap; }
.av-size__chips { display: contents; }
.size-chip { min-width: 40px; height: 34px; padding: 0 10px; border: 1px solid var(--av-line-2); border-radius: 3px; font-size: 12px; color: var(--av-dim); transition: all .3s; }
.size-chip:hover { color: var(--av-text); border-color: rgba(245, 238, 230, .4); }
.size-chip[aria-pressed="true"] { color: var(--night); background: var(--av-accent); border-color: var(--av-accent); }
.size-chip--measure { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--av-accent); border-color: rgba(216, 189, 143, .45); white-space: nowrap; }
.size-chip--measure svg { width: 15px; height: 15px; flex: none; }

/* ---------- Measurements drawer ---------- */
.av-measure {
  position: absolute; z-index: 20;
  top: 22px; right: 22px; bottom: 22px; width: min(440px, calc(100% - 44px));
  display: flex; flex-direction: column;
  background: rgba(22, 14, 17, .97);
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .7);
  transform: translateX(24px); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
}
.av-measure.is-open { transform: none; opacity: 1; }
.av-measure[hidden] { display: none; }
.av-measure__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 20px 0; }
.av-measure__for { margin-top: 8px; font-family: var(--serif); font-size: 20px; }
.av-measure__intro { padding: 10px 20px 0; font-size: 12.5px; line-height: 1.6; color: var(--av-dim); }
.av-unit { display: inline-flex; margin: 16px 20px 4px; border: 1px solid var(--av-line-2); border-radius: 100px; padding: 3px; align-self: flex-start; }
.av-unit button { padding: 8px 16px; border-radius: 100px; font: 500 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--av-dim); transition: background .3s, color .3s; }
.av-unit button[aria-pressed="true"] { background: var(--av-accent); color: var(--night); }
.av-measure__body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 16px; scrollbar-width: thin; scrollbar-color: rgba(245, 238, 230, .2) transparent; }
.m-group { border: 0; margin: 0; padding: 14px 0 6px; border-top: 1px solid var(--av-line); }
.m-group:first-child { border-top: 0; }
.m-group legend { float: left; width: 100%; padding: 0 0 12px; font: 500 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--av-accent); }
.m-grid { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
.m-field { display: grid; gap: 6px; min-width: 0; }
.m-field > span:first-child { font-size: 12px; color: var(--av-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-field small { font-size: 10.5px; line-height: 1.35; color: rgba(245, 238, 230, .4); }
.m-input { position: relative; display: block; }
.m-input input, .m-notes textarea {
  width: 100%; background: rgba(245, 238, 230, .04); border: 1px solid var(--av-line-2); border-radius: 3px;
  color: var(--av-text); font-size: 16px; padding: 10px 38px 10px 12px; transition: border-color .3s, background .3s;
}
.m-input input::placeholder, .m-notes textarea::placeholder { color: rgba(245, 238, 230, .28); }
.m-input input:focus, .m-notes textarea:focus { outline: none; border-color: var(--av-accent); background: rgba(216, 189, 143, .06); }
.m-input i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; letter-spacing: .1em; color: var(--av-dim); pointer-events: none; }
.m-field.is-invalid input { border-color: #c4564f; }
.m-notes { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--av-line); margin-top: 8px; font-size: 12px; }
.m-notes textarea { padding-right: 12px; resize: vertical; font-family: var(--sans); font-size: 15px; }
.av-measure__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 18px; border-top: 1px solid var(--av-line); }
.av-measure__clear { font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--av-dim); padding: 10px 0; }
.av-measure__clear:hover { color: var(--av-text); }
.av-measure__save { height: 48px; padding: 0 22px; border-radius: 4px; background: var(--av-accent); color: var(--night); font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.av-measure__save:hover { background: #e6cfa6; }
.av-cta { grid-area: cta; justify-self: end; margin-right: 16px; display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px; border: 1px solid var(--av-accent); border-radius: 4px; color: var(--av-accent); font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; position: relative; overflow: hidden; isolation: isolate; transition: color .4s; }
.av-cta::before { content: ""; position: absolute; inset: 0; background: var(--av-accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); z-index: -1; }
.av-cta:hover { color: var(--night); }
.av-cta:hover::before { transform: scaleX(1); }
.av-cta svg { width: 18px; height: 18px; flex: none; }
.av-cta .wa { width: 16px; height: 16px; fill: currentColor; }
.av-mobile-head, .av-mtabs { display: none; }

/* reduced chrome when viewport is short */
@media (max-height: 760px) and (min-width: 901px) {
  .av { grid-template-rows: 56px minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .av-swatches { padding-block: 10px 8px; }
  .swatch__ball { width: 32px; height: 32px; }
  .av-pieces, .av-size { padding-block: 8px; }
  .av__note { display: none; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .av { grid-template-columns: 240px minmax(0, 1fr); }
  .av__note { display: none; }
  .piece-btn { min-width: 76px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .av {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 56px minmax(0, 1fr) auto;
    grid-template-areas: "bar" "stage" "dock";
    gap: 0; padding: 0;
    height: 100dvh;
  }
  .av .corner, .av__side, .av__info, .av__nav, .av__brand span { display: none; }
  .av__bar { padding: 0 12px; border-bottom: 1px solid var(--av-line); }
  .av-ibtn { width: 38px; height: 38px; }
  .av__rail { right: 10px; gap: 8px; }
  .av__rail .av-ibtn { width: 36px; height: 36px; }
  .hotspot span { display: none; }
  .av__dock { border-radius: 14px 14px 0 0; border-bottom: 0; border-inline: 0; max-height: 54dvh; display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 0 16px max(14px, env(safe-area-inset-bottom)); }
  .av-mobile-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 16px; }
  .av-mobile-head .av__name { font-size: 24px; margin: 6px 0 0; }
  .av-mobile-head .av-h { color: var(--av-accent); font-size: 9.5px; }
  .av-mobile-head .av__count { display: none; }
  .av-pieces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; border: 0; }
  .piece-btn { min-width: 0; border-color: var(--av-line); padding: 8px 4px; }
  .piece-btn svg { width: 20px; height: 20px; }
  .av-mtabs { display: flex; gap: 20px; border-bottom: 1px solid var(--av-line); }
  .av-mtabs button { font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--av-dim); padding: 10px 0; border-bottom: 1px solid transparent; margin-bottom: -1px; }
  .av-mtabs button[aria-selected="true"] { color: var(--av-text); border-color: var(--av-accent); }
  .av-panes { display: block; min-width: 0; min-height: 96px; overflow-y: auto; }
  .av-panes > [data-pane] { display: none; }
  .av-size { padding: 4px 0 0; }
  .av-panes > [data-pane].is-active { display: block; }
  .av-swatches { border: 0; padding: 0; display: block; }
  .av-tabs { justify-content: flex-start; gap: 16px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .av-tab { flex: none; font-size: 9.5px; }
  .av-swatches__row { justify-content: flex-start; padding-top: 10px; gap: 6px; }
  .swatch { width: 58px; }
  .swatch__ball { width: 34px; height: 34px; }
  .av-size__list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .av-size .av-h { display: none; }
  .av-fabric--m { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
  .av-fabric--m .fabric-tile { flex: 0 0 132px; height: 64px; }
  .av-measure { inset: 0; width: auto; border-radius: 0; border: 0; transform: translateY(24px); padding-bottom: env(safe-area-inset-bottom); }
  .av-measure.is-open { transform: none; }
  .m-grid { gap: 12px 10px; }
  .av-size__list { flex-wrap: wrap; overflow: visible; }
  .size-chip { flex: 1 1 0; min-width: 0; padding: 0 4px; }
  .size-chip--measure { order: -1; flex: 1 0 100%; justify-content: center; height: 42px; }
  .av-cta { margin: 0; flex: none; width: 100%; justify-content: center; height: 54px; background: var(--av-accent); color: var(--night); }
  .av-cta::before { display: none; }
}
