/* ============================================================
   Atelier 3D (composer-canape.html): the sofa composer.
   Same language as styles.css: monochrome, sharp corners,
   light Inter, small uppercase labels.
   ============================================================ */
:root {
  --cfg-seat: #ebe7e0;
  --cfg-back: #c9c2b6;
  --cfg-arm: #d8d2c8;
  --cfg-stage-a: #fbfaf7;
  --cfg-stage-b: #f0eee9;
  --cfg-stage-c: #e3e0da;
}

/* the header stays solid on this page: the app starts right under it */
body.solid-header header { background: var(--header-bg); box-shadow: 0 1px 0 rgba(255,255,255,.07); }
body.solid-header header::before { opacity: 0; }
body.solid-header .header-inner { padding-top: calc(11px + env(safe-area-inset-top)); padding-bottom: 11px; }
body.solid-header .logo img { height: 42px; }
@media (max-width: 700px) { body.solid-header .logo img { height: 36px; } }

.cfg { padding-top: calc(var(--header-h) + env(safe-area-inset-top)); background: var(--paper); }
.cfg-app {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 420px);
  height: calc(100svh - var(--header-h) - env(safe-area-inset-top)); min-height: 600px;
  border-bottom: 1px solid var(--line);
}

/* ---------- the 3D view ---------- */
.cfg-stage {
  position: relative; overflow: hidden; min-width: 0;
  background: radial-gradient(120% 90% at 50% 38%, var(--cfg-stage-a) 0%, var(--cfg-stage-b) 55%, var(--cfg-stage-c) 100%);
  user-select: none; -webkit-user-select: none;
}
.cfg-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; touch-action: none; }
.cfg-stage canvas:active { cursor: grabbing; }

.cfg-overlay { position: absolute; inset: 0; pointer-events: none; }
.cfg-overlay > * { position: absolute; left: 0; top: 0; will-change: transform; }
.cfg-plus {
  pointer-events: auto; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.18), 0 0 0 5px rgba(255,255,255,.55);
  transition: background-color .2s, box-shadow .2s;
}
.cfg-plus:hover { background: #333; box-shadow: 0 8px 22px rgba(0,0,0,.22), 0 0 0 7px rgba(255,255,255,.7); }
.cfg-plus svg { transition: transform .3s var(--ease); }
.cfg-plus:hover svg { transform: rotate(90deg); }
.cfg-dim {
  margin: 0; translate: -50% -50%; white-space: nowrap; font-size: 11px; font-weight: 500; letter-spacing: .06em;
  color: var(--ink); background: rgba(255,255,255,.88); padding: 3px 7px; box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.cfg-chip {
  pointer-events: auto; translate: -50% calc(-100% - 10px);
  display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 14px; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.14);
}
.cfg-chip-t { display: flex; flex-direction: column; margin-right: 10px; line-height: 1.25; }
.cfg-chip-t b { font-size: 13px; font-weight: 500; }
.cfg-chip-t small { font-size: 11px; color: var(--mute); }
.cfg-chip button, .cfg-tools button, .cfg-item-a button, .cfg-step button {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; transition: background-color .2s, opacity .2s;
}
.cfg-chip button:hover, .cfg-tools button:hover, .cfg-item-a button:hover, .cfg-step button:hover { background: var(--paper-alt); }
.cfg-chip button:disabled, .cfg-tools button:disabled, .cfg-item-a button:disabled, .cfg-step button:disabled { opacity: .28; cursor: default; background: transparent; }
.cfg-chip .cfg-chip-x { border-left: 1px solid var(--line); margin-left: 4px; color: var(--mute); }

.cfg-views, .cfg-tools {
  position: absolute; top: 16px; display: flex; background: rgba(255,255,255,.9); border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0,0,0,.06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.cfg-views { left: max(16px, env(safe-area-inset-left)); }
.cfg-tools { right: 16px; }
.cfg-views button {
  height: 36px; padding: 0 14px; border: 0; background: transparent; cursor: pointer; color: var(--mute);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; transition: color .2s, background-color .2s;
}
.cfg-views button:hover { color: var(--ink); }
.cfg-views button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cfg-tools .cfg-dims-btn { width: auto; display: inline-flex; align-items: center; padding: 0 12px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); border-right: 1px solid var(--line); }
.cfg-tools .cfg-dims-btn[aria-pressed="true"] { color: var(--ink); }
.cfg-tools .cfg-dims-btn[aria-pressed="true"]::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: 7px; }

.cfg-hint {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; padding: 9px 16px; white-space: nowrap;
  background: rgba(15,15,15,.82); color: #fff; font-size: 12px; letter-spacing: .02em; pointer-events: none;
  transition: opacity .6s, translate .6s var(--ease);
}
.cfg-hint.gone { opacity: 0; translate: -50% 8px; }
.cfg-toast {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 12px; max-width: calc(100% - 32px);
  padding: 11px 18px; background: var(--ink); color: #fff; font-size: 13px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .3s, translate .3s var(--ease); z-index: 6;
}
.cfg-toast.show { opacity: 1; translate: -50% 0; }

.cfg-pop {
  position: absolute; z-index: 7; width: 248px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,.16); padding: 6px;
}
.cfg-pop-t { font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); padding: 8px 10px 6px; }
.cfg-pop button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; background: transparent;
  text-align: left; cursor: pointer; color: var(--ink); transition: background-color .2s;
}
.cfg-pop button:hover:not(:disabled), .cfg-pop button:focus-visible { background: var(--paper-alt); outline: none; }
.cfg-pop button:disabled { opacity: .35; cursor: default; }
.cfg-pop button svg { flex-shrink: 0; }
.cfg-pop span { display: flex; flex-direction: column; line-height: 1.3; }
.cfg-pop b { font-size: 13.5px; font-weight: 500; }
.cfg-pop small { font-size: 11.5px; color: var(--mute); }

.cfg-loading {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 38%, var(--cfg-stage-a) 0%, var(--cfg-stage-b) 55%, var(--cfg-stage-c) 100%);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); transition: opacity .6s; z-index: 8;
}
.cfg-loading span { max-width: 360px; line-height: 1.8; }
.cfg-loading.gone { opacity: 0; pointer-events: none; }
.cfg-loading a, .cfg-retry { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cfg-retry { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }

/* ---------- the options ---------- */
.cfg-panel { min-width: 0; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--paper); }
.cfg-intro { padding: 30px 28px 22px; }
.cfg-intro .eyebrow { margin-bottom: 14px; }
.cfg-intro h1 { font-size: clamp(28px, 2.4vw, 36px); font-weight: 200; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.cfg-intro p { font-size: 14px; color: var(--mute); line-height: 1.7; margin: 14px 0 0; font-weight: 300; }

.cfg-sec { padding: 24px 28px 26px; border-top: 1px solid var(--line); }
.cfg-sec > h2 {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px;
  font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.cfg-sec > h2 span { font-weight: 300; color: var(--mute-light); letter-spacing: .08em; }
/* sections are numbered in order, the hidden ones (« Libre » options) left out */
.cfg-panel { counter-reset: cfgsec; }
.cfg-sec:not([hidden]) { counter-increment: cfgsec; }
.cfg-sec > h2 span::before { content: counter(cfgsec, decimal-leading-zero); }

/* the models: a strip of cards */
.cfg-models-wrap { position: relative; margin: 0 -28px; }
.cfg-models {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 28px;
  padding: 2px 28px 4px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.cfg-models::-webkit-scrollbar { display: none; }
.cfg-model {
  flex: 0 0 118px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 7px; padding: 0 0 9px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.cfg-model img, .cfg-model-ic { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--paper-alt); }
.cfg-model-ic { display: grid; place-items: center; }
.cfg-model-ic svg { width: 78%; height: auto; }
.cfg-model > span:last-child { font-size: 12.5px; font-weight: 500; padding: 0 9px; }
.cfg-model:hover { border-color: #bdbdb7; }
.cfg-model[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cfg-models-nav {
  position: absolute; top: 24px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.94); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); transition: background-color .2s;
}
.cfg-models-nav:hover { background: #fff; }
.cfg-models-nav.prev { left: 8px; }
.cfg-models-nav.next { right: 8px; }
@media (hover: none) { .cfg-models-nav { display: none; } }
.cfg-spec { display: flex; flex-direction: column; gap: 3px; margin: 14px 0 0; line-height: 1.5; }
.cfg-spec b { font-size: 13.5px; font-weight: 500; }
.cfg-spec span { font-size: 12px; color: var(--mute); }
.cfg-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 20px 0 10px;
  font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
}
.cfg-label:first-child, .cfg-group:first-child .cfg-label { margin-top: 0; }
.cfg-label span { letter-spacing: .02em; text-transform: none; font-size: 12.5px; font-weight: 400; color: var(--ink); text-align: right; }
.cfg-label em { font-style: normal; letter-spacing: .02em; text-transform: none; font-size: 12px; font-weight: 400; color: var(--mute-light); }

.cfg-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cfg-preset {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px 8px; min-width: 0;
  border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.cfg-preset svg { width: 100%; max-width: 64px; height: auto; }
.cfg-preset span { font-size: 11px; line-height: 1.2; text-align: center; }
.cfg-preset:hover { border-color: #bdbdb7; }
.cfg-preset[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.cfg-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cfg-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 6px 4px 6px 8px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .2s;
  position: relative;
}
.cfg-item:hover { background: #faf9f7; }
.cfg-item.on { background: var(--paper-alt); }
.cfg-item.on::before { content: ''; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px; background: var(--ink); }
.cfg-item-ic { display: grid; place-items: center; color: var(--mute); }
.cfg-item-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cfg-item-t b { font-size: 13.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.cfg-item-t small { font-size: 11.5px; color: var(--mute); }
.cfg-item-a { display: flex; }
.cfg-item-a button { width: 32px; height: 32px; color: var(--mute); }
.cfg-item-a button:hover:not(:disabled) { color: var(--ink); }
.cfg-item-arm .cfg-item-t b { font-weight: 400; color: var(--mute); }

.cfg-add { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cfg-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 9px; min-width: 0;
  border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; color: var(--ink);
  transition: border-color .2s, background-color .2s;
}
.cfg-tile:hover { border-color: var(--ink); }
.cfg-tile b { font-size: 12px; font-weight: 500; line-height: 1.25; }
.cfg-tile small { font-size: 11px; color: var(--mute); }
.cfg-tile[aria-disabled="true"] { opacity: .4; cursor: default; }
.cfg-tile[aria-disabled="true"]:hover { border-color: var(--line); }
/* relax, on an element that can have it */
.cfg-rx {
  height: 26px; align-self: center; padding: 0 9px; margin-right: 4px; border: 1px solid var(--line); background: #fff;
  color: var(--mute); font-size: 11px; letter-spacing: .04em; cursor: pointer; white-space: nowrap; transition: border-color .2s, color .2s, background-color .2s;
}
.cfg-item-a .cfg-rx { width: auto; height: 26px; }
.cfg-rx:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.cfg-rx[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cfg-chip .cfg-rx-chip { width: auto; height: 30px; margin: 0 4px 0 0; padding: 0 10px; }
.cfg-chip .cfg-rx-chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.cfg-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; }
.cfg-toggles { display: flex; gap: 6px; }
.cfg-toggle {
  height: 36px; padding: 0 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--mute);
  font-size: 12.5px; display: inline-flex; align-items: center; gap: 8px; transition: border-color .2s, color .2s;
}
.cfg-toggle::before { content: ''; width: 12px; height: 12px; border: 1px solid currentColor; flex-shrink: 0; }
.cfg-toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.cfg-toggle[aria-pressed="true"]::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center/10px no-repeat; }
.cfg-step { display: inline-flex; align-items: center; border: 1px solid var(--line); background: #fff; }
.cfg-step b { min-width: 26px; text-align: center; font-size: 13.5px; font-weight: 500; }
.cfg-step-l { font-size: 12.5px; color: var(--mute); margin-right: 10px; }

.cfg-group + .cfg-group { margin-top: 22px; }
.cfg-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.cfg-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 11px; min-width: 0;
  border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.cfg-opt:hover { border-color: #bdbdb7; }
.cfg-opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cfg-opt svg { margin-bottom: 4px; }
.cfg-opt b { font-size: 12.5px; font-weight: 500; }
.cfg-opt small { font-size: 11px; color: var(--mute); }
.cfg-dot { width: 18px; height: 18px; border-radius: 50%; display: block; margin-bottom: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

.cfg-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.cfg-tab {
  position: relative; padding: 9px 0; border: 0; background: none; cursor: pointer; color: var(--mute);
  font-size: 13px; transition: color .2s;
}
.cfg-tab:hover { color: var(--ink); }
.cfg-tab[aria-selected="true"] { color: var(--ink); }
.cfg-tab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--ink); }
.cfg-tab i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); margin-left: 6px; vertical-align: 2px; }
.cfg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 12px 8px; }
.cfg-sw { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--mute); min-width: 0; }
.cfg-sw span {
  width: 48px; height: 48px; border-radius: 50%; background-size: cover; display: block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .2s, transform .3s var(--ease);
}
.cfg-sw:hover span { transform: scale(1.05); }
.cfg-sw[aria-pressed="true"] span { outline-color: var(--ink); }
.cfg-sw[aria-pressed="true"] { color: var(--ink); }
.cfg-sw small { font-size: 11px; line-height: 1.25; text-align: center; }
.cfg-note { font-size: 12px; color: var(--mute); line-height: 1.65; margin: 18px 0 0; }

.cfg-foot {
  position: sticky; bottom: 0; margin-top: auto; z-index: 3; background: #fff; border-top: 1px solid var(--line);
  padding: 16px 28px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px rgba(0,0,0,.04);
}
.cfg-sum { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; line-height: 1.35; }
.cfg-sum b { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.cfg-sum span { font-size: 12px; color: var(--mute); }
/* the price, on the right of the dimensions */
.cfg-sum.has-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px; align-items: end; }
.cfg-sum.has-price > b, .cfg-sum.has-price .cfg-sum-desc { grid-column: 1; min-width: 0; }
.cfg-sum .cfg-price { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; color: var(--ink); }
.cfg-price em { font-style: normal; font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.cfg-price strong { font-size: 24px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cfg-price-note { grid-column: 1 / -1; font-size: 11.5px; color: var(--mute); margin-top: 4px; }
.cfg-tile em { font-style: normal; font-size: 11px; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.cfg-tab small { font-size: 10px; letter-spacing: .04em; color: var(--mute); margin-left: 5px; font-weight: 400; text-transform: none; }
.cfg-actions { display: flex; gap: 6px; }
.cfg-actions .btn-dark { flex: 1; justify-content: center; padding: 0 18px; white-space: nowrap; }
.cfg-short { display: none; }
.cfg-actions .cfg-icon-btn {
  width: 48px; flex-shrink: 0; display: inline-grid; place-items: center; border: 1px solid var(--ink); background: #fff;
  color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s;
}
.cfg-actions .cfg-icon-btn:hover { background: var(--ink); color: #fff; }
.cfg-links { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11.5px; }
.cfg-links button { border: 0; background: none; padding: 4px 0; color: var(--mute); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.cfg-links button:hover { color: var(--ink); }

/* ---------- quote ---------- */
.cfg-dialog { border: 0; padding: 0; width: min(580px, calc(100vw - 32px)); max-height: calc(100svh - 32px); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.cfg-dialog::backdrop { background: rgba(10,10,10,.55); }
.cfg-dialog form { padding: 30px 30px 26px; }
.cfg-dialog h2 { font-size: 26px; font-weight: 200; letter-spacing: -0.02em; margin-bottom: 8px; }
.cfg-dialog .lead { font-size: 13.5px; color: var(--mute); line-height: 1.6; margin: 0 0 24px; }
.cfg-dialog .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.cfg-dialog textarea { min-height: 190px; font-size: 13px; }
.cfg-dialog .x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.cfg-dialog .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .cfg-dialog .grid2 { grid-template-columns: 1fr; } .cfg-dialog form { padding: 26px 20px 22px; } }

/* ---------- phones and tablets: the view stays on top while the options scroll ---------- */
@media (max-width: 899px) {
  .cfg-app { display: block; height: auto; min-height: 0; }
  .cfg-stage { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top)); height: 46svh; min-height: 280px; z-index: 5; border-bottom: 1px solid var(--line); }
  .cfg-panel { border-left: 0; overflow: visible; }
  .cfg-intro { padding: 24px max(20px, env(safe-area-inset-left)) 18px; }
  .cfg-sec { padding: 22px max(20px, env(safe-area-inset-left)) 24px; }
  .cfg-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; z-index: 6;
    padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  }
  .cfg-sum { margin: 0; min-width: 0; }
  .cfg-sum b { font-size: 13.5px; white-space: nowrap; }
  .cfg-sum span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* phones: the price takes the description's line */
  .cfg-sum.has-price { display: flex; flex-direction: column; gap: 1px; }
  .cfg-sum.has-price .cfg-sum-desc, .cfg-price-note { display: none; }
  .cfg-sum .cfg-price { flex-direction: row; align-items: baseline; gap: 6px; }
  .cfg-price strong { font-size: 17px; font-weight: 400; }
  .cfg-price em { font-size: 9.5px; letter-spacing: .12em; }
  .cfg-sum.has-price > b { order: 1; font-size: 11.5px; font-weight: 400; color: var(--mute); }
  .cfg-actions .btn-dark { flex: none; min-height: 44px; height: 44px; padding: 0 16px; font-size: 11px; letter-spacing: .12em; }
  .cfg-actions .cfg-icon-btn { width: 44px; height: 44px; }
  .cfg-actions #cfg-image, .cfg-links, .cfg-long { display: none; }
  .cfg-short { display: inline; }
  .cfg-views, .cfg-tools { top: 10px; }
  .cfg-views { left: 10px; }
  .cfg-tools { right: 10px; }
  .cfg-views button { padding: 0 10px; letter-spacing: .1em; }
  .cfg-tools .cfg-dims-btn { padding: 0 10px; }
  .cfg-hint { bottom: 12px; font-size: 11.5px; }
  .cfg-chip { padding-left: 10px; }
  .cfg-chip button { width: 34px; height: 34px; }
}
@media (max-width: 420px) {
  .cfg-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cfg-add { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg-chip-t { display: none; }
  .cfg-tools #cfg-center { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cfg-plus svg, .cfg-sw span, .cfg-toast, .cfg-hint { transition: none; }
}
.cfg-links a { color: var(--mute); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.cfg-links a:hover { color: var(--ink); }
.cfg-item .cfg-item-a .cfg-rx[aria-pressed="true"], .cfg-chip .cfg-rx-chip[aria-pressed="true"]:hover { background: var(--ink); color: #fff; }
.cfg-item-a .cfg-rx-ic { width: 30px; height: 30px; padding: 0; margin-right: 2px; display: inline-flex; align-items: center; justify-content: center; gap: 1px; border-radius: 50%; }
.cfg-rx-ic i { font-style: normal; font-size: 10px; font-weight: 600; }

/* signed in to /admin: hidden models shown, marked « brouillon » */
.cfg-editor { margin: 0; padding: 10px 28px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.5; }
.cfg-model em, .cfg-spec em { font-style: normal; font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #9a6a1f; margin-left: 4px; }
/* the 3D files on their way */
.cfg-files {
  position: absolute; left: 50%; top: 62px; translate: -50% 0; z-index: 4; padding: 7px 14px;
  background: rgba(255,255,255,.92); border: 1px solid var(--line); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
}
/* nothing to show yet: the message takes the whole width */
.cfg-app.cfg-empty { grid-template-columns: minmax(0, 1fr); }
.cfg-app.cfg-empty .cfg-loading a { color: var(--ink); }

/* composer-canape?diagnostic: what the page does, step by step */
.cfg-diag {
  position: fixed; left: 12px; bottom: 12px; z-index: 9999; width: min(640px, calc(100vw - 24px)); max-height: 46vh;
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.25);
}
.cfg-diag-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--ink); color: #fff; font-size: 12px; }
.cfg-diag-head button { border: 1px solid #fff; background: none; color: #fff; font-size: 11px; padding: 4px 10px; cursor: pointer; }
.cfg-diag pre { margin: 0; padding: 10px; overflow: auto; font: 11px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; }
