/* editor.css — storefront lookbook editor chrome (edit mode only).
   Loaded on the storefront; every selector is scoped to .is-look-edit or the
   editor's own sb-led-/sb-insp- classes, so it has no effect for retailers. */

:root { --led-rail: 244px; --led-insp: 324px; --led-top: 38px; }

/* Inset the page for the fixed panels; hide the order rail to avoid clashing. */
.app.is-look-edit .main { padding-left: var(--led-rail); transition: padding 0.18s ease; }
.app.is-look-edit.has-inspector .main { padding-right: var(--led-insp); }
.app.is-look-edit .panel,
.app.is-look-edit .panel-rail { display: none !important; }

/* ── Left rail ───────────────────────────────────────────────────────────── */
.sb-led-rail {
  position: fixed; left: 0; top: var(--led-top); bottom: 0; width: var(--led-rail);
  z-index: 900; display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-1);
}
.sb-led-rail-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; letter-spacing: 0.18em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.sb-led-rail .dim { color: var(--fg-3); }
.sb-led-list { flex: 1; overflow-y: auto; padding: 8px; }
.sb-led-look {
  display: flex; align-items: center; gap: 8px; padding: 9px 8px; cursor: pointer;
  border: 1px solid transparent; user-select: none;
}
.sb-led-look + .sb-led-look { margin-top: 2px; }
.sb-led-look:hover { background: var(--bg-3); }
.sb-led-look.is-active { background: var(--sb-ink); color: var(--sb-bone); }
.sb-led-look.is-active .sb-led-n, .sb-led-look.is-active .dim { color: var(--sb-bone); }
.sb-led-look.is-dragging { opacity: 0.4; }
.sb-led-look.is-hidden .sb-led-name, .sb-led-look.is-hidden .sb-led-n { opacity: 0.4; text-decoration: line-through; }
.sb-led-grip { cursor: grab; color: var(--fg-3); font-size: 12px; }
.sb-led-look.is-active .sb-led-grip { color: rgba(236,232,224,0.6); }
.sb-led-n { font-variant-numeric: tabular-nums; color: var(--fg-3); min-width: 18px; }
.sb-led-name { flex: 1; text-transform: lowercase; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-led-eye, .sb-led-del {
  background: none; border: none; cursor: pointer; color: inherit; opacity: 0.45;
  font-size: 12px; padding: 2px 4px; line-height: 1;
}
.sb-led-eye:hover, .sb-led-del:hover { opacity: 1; }
.sb-led-del.danger:hover { color: #b4493f; }
.sb-led-look.is-active .sb-led-del.danger:hover { color: #f0a097; }

.sb-led-add {
  margin: 8px; padding: 11px; cursor: pointer;
  background: none; border: 1px dashed var(--line-strong); color: var(--fg-1);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.sb-led-add:hover { background: var(--sb-ink); color: var(--sb-bone); border-style: solid; }

.sb-led-publish { border-top: 1px solid var(--line-strong); padding: 12px 14px; }
.sb-led-pub-status { display: flex; align-items: center; gap: 8px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; }
.sb-led-dot { width: 7px; height: 7px; border-radius: 50%; background: #8fae86; }
.sb-led-dot.is-dirty { background: #c8993f; }
.sb-led-pub-btns { display: flex; gap: 8px; margin-top: 10px; }
.sb-led-pub-btn {
  flex: 1; padding: 10px; cursor: pointer; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  background: none; border: 1px solid var(--line-strong); color: var(--fg-1);
}
.sb-led-pub-btn.primary { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
.sb-led-pub-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.sb-led-pub-btn:not(:disabled):hover { opacity: 0.8; }

/* ── Inspector ───────────────────────────────────────────────────────────── */
.sb-insp {
  position: fixed; right: 0; top: var(--led-top); bottom: 0; width: var(--led-insp);
  z-index: 900; overflow-y: auto;
  background: var(--bg-2); border-left: 1px solid var(--line-strong);
  font-family: var(--font-mono); color: var(--fg-1);
}
.sb-insp-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.sb-insp-close { background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--fg-3); }
.sb-insp-close:hover { color: var(--fg-1); }
.sb-insp-body { padding: 4px 16px 40px; }
.sb-insp-sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sb-insp-sec:last-child { border-bottom: none; }
.sb-insp-h { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 12px; }
.sb-insp .dim { color: var(--fg-3); }

.sb-insp-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.sb-insp-field:last-child { margin-bottom: 0; }
.sb-insp-field label, .sb-insp-range label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
}
.sb-insp-row-2 { display: flex; gap: 10px; }
.sb-insp-field input, .sb-insp-field textarea, .sb-insp-select, .sb-insp-meta-in {
  width: 100%; background: var(--bg-1); border: 1px solid var(--line-strong); color: var(--fg-1);
  font-family: var(--font-ui); font-size: 13px; padding: 8px 9px; border-radius: 0;
}
.sb-insp-field textarea { resize: vertical; font-size: 12px; line-height: 1.5; }
.sb-insp-field input:focus, .sb-insp-field textarea:focus, .sb-insp-select:focus, .sb-insp-meta-in:focus {
  outline: none; border-color: var(--sb-ink);
}

/* photos */
.sb-insp-photo { display: flex; gap: 10px; margin-bottom: 12px; }
.sb-insp-thumb { width: 52px; height: 66px; flex: none; background-size: cover; background-position: center; border: 1px solid var(--line); }
.sb-insp-thumb.sm { width: 30px; height: 38px; }
.sb-insp-photo-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sb-insp-photo-top { display: flex; align-items: center; justify-content: space-between; }
.sb-insp-role { font-size: 10px; letter-spacing: 0.12em; color: var(--fg-3); }
.sb-insp-photo-acts { display: flex; gap: 2px; }
.sb-insp-photo-acts button, .sb-insp-mini {
  background: none; border: 1px solid var(--line); color: var(--fg-2); cursor: pointer;
  font-size: 11px; line-height: 1; padding: 3px 6px; min-width: 22px; text-align: center;
}
.sb-insp-photo-acts button:hover, .sb-insp-mini:hover { border-color: var(--sb-ink); color: var(--fg-1); }
.sb-insp-photo-acts button:disabled { opacity: 0.3; cursor: not-allowed; }
.sb-insp-photo-acts .danger:hover { color: #b4493f; border-color: #b4493f; }
.sb-insp-mini { display: inline-flex; align-items: center; }
.sb-insp-meta-in { font-size: 11px !important; padding: 5px 7px !important; }
.sb-insp-add {
  display: block; text-align: center; padding: 9px; cursor: pointer; margin-top: 4px;
  background: none; border: 1px dashed var(--line-strong); color: var(--fg-2);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.sb-insp-add:hover { color: var(--fg-1); border-color: var(--sb-ink); }

/* sliders */
.sb-insp-range { margin-bottom: 14px; }
.sb-insp-range label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.sb-insp-range-val { color: var(--fg-1); font-variant-numeric: tabular-nums; }
.sb-insp-range input[type=range] { width: 100%; accent-color: var(--sb-ink); }

/* composition */
.sb-insp-photocomp-h { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.sb-insp-comp { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
/* min-width:0 lets the name actually shrink+ellipsis so a long name can't push
   the × button outside the panel. */
.sb-insp-comp-name { flex: 1 1 auto; min-width: 0; font-family: var(--font-ui); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.sb-insp-comp-cw { color: var(--fg-3); }
.sb-insp-comp-x { flex: none; }
.sb-insp-select { margin-top: 8px; cursor: pointer; }

/* Product picker (add-to-photo) — searchable, image + name + colour, multi-add. */
.sb-insp-addbtn {
  margin-top: 8px; width: 100%; text-align: left;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--line);
  padding: 8px 10px; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.sb-insp-addbtn:hover { color: var(--fg-1); border-color: var(--fg-3); }
.sb-insp-addbtn.is-open { color: var(--fg-1); border-color: var(--sb-ink); }
.sb-insp-picker { margin-top: 6px; border: 1px solid var(--line); background: var(--bg-1); }
.sb-insp-search {
  width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line);
  padding: 9px 10px; font-family: var(--font-ui); font-size: 12px; color: var(--fg-1); background: var(--bg-2);
}
.sb-insp-search:focus { outline: none; background: var(--bg-1); }
.sb-insp-picker-list { max-height: 240px; overflow-y: auto; }
.sb-insp-pick {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 6px 10px; background: none; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background 0.12s ease;
}
.sb-insp-pick:last-child { border-bottom: 0; }
.sb-insp-pick:hover { background: var(--bg-2); }
.sb-insp-pick-thumb { width: 30px; height: 38px; flex: none; background-size: contain; background-repeat: no-repeat; background-position: center; background-color: var(--bg-2); border: 1px solid var(--line); }
.sb-insp-pick-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.sb-insp-pick-name { font-family: var(--font-ui); font-size: 12px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-insp-pick-cw { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.sb-insp-pick-tick { flex: none; font-size: 14px; color: var(--fg-3); width: 18px; text-align: center; }
.sb-insp-pick.is-added { background: var(--bg-2); }
.sb-insp-pick.is-added .sb-insp-pick-tick { color: var(--sb-moss); }
.sb-insp-pick.is-added .sb-insp-pick-name { color: var(--fg-2); }
.sb-insp-pick-empty { padding: 14px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }

/* ── Canvas selection affordances ────────────────────────────────────────── */
.lb-look.lb-edit { position: relative; cursor: pointer; transition: outline-color 0.12s ease; outline: 2px solid transparent; outline-offset: -2px; }
.lb-look.lb-edit:hover { outline-color: var(--line-strong); }
.lb-look.lb-edit.is-selected { outline-color: var(--sb-ink); }
.lb-look.lb-edit.is-hidden { opacity: 0.5; }
.lb-hidden-badge {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  background: var(--sb-ink); color: var(--sb-bone);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; padding: 4px 8px;
}

/* ── Data-driven look layout (applies to retailers too) ──────────────────── */
.lb { overflow-x: clip; }

/* No scroll snap on the lookbook — every variant (mandatory, proximity,
   per-frame, per-look) fought iOS momentum and felt catchy on device. The feed
   scrolls free; the 86dvh look cap keeps each look within one screen. */
.lb-look-grid { display: flex; align-items: stretch; position: relative; width: 100%; max-width: 100%; box-sizing: border-box; }
.lb-look-grid.lb-is-single { justify-content: center; }
/* The frame is the positioning context; .lb-frame-clip does the cropping so the
   transform box + handles (rendered in the frame, outside the clip) stay grabbable
   even when the image is scaled past the frame edges. */
.lb-frame { position: relative; min-width: 0; box-sizing: border-box; align-self: stretch; }
.lb-frame-clip { position: absolute; inset: 0; overflow: hidden; }
/* cover: the image always fills the frame; pan/zoom is stored as ratios so the
   crop reproduces identically at any size (object-position + scale set inline) */
.lb-frame .photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-frame .photo-fill { width: 100%; height: 100%; }

/* Transform box = the frame itself (image fills it). Body pans, corners zoom. */
.lb-tbox { position: absolute; inset: 0; z-index: 8; border: 1px solid var(--sb-ink); box-shadow: 0 0 0 1px rgba(255,255,255,0.5); cursor: move; touch-action: none; }
.lb-tbox-label { position: absolute; top: -22px; left: 0; background: var(--sb-ink); color: var(--sb-bone); font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; letter-spacing: 0.06em; }
.lb-tbox-h { position: absolute; width: 12px; height: 12px; background: var(--sb-bone); border: 1px solid var(--sb-ink); touch-action: none; }
.lb-tbox-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.lb-tbox-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.lb-tbox-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.lb-tbox-se { right: -6px; bottom: -6px; cursor: nwse-resize; }

/* collection drag-reorder affordances (edit mode) */
.gcard-edit { cursor: grab; }
.gcard-edit:active { cursor: grabbing; }
.gcard.is-dragging { opacity: 0.4; }
.lsheet-row-edit { cursor: grab; }
.lsheet-row.is-dragging { opacity: 0.4; }

/* image-replace chip (corner, never blocks text/clicks beneath) */
.sb-img-edit-wrap { position: absolute; inset: 0; pointer-events: none; z-index: 12; }
.sb-img-chip {
  position: absolute; top: 10px; right: 10px; pointer-events: auto; cursor: pointer;
  background: rgba(22,20,15,0.82); color: var(--sb-bone); border: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 10px; opacity: 0; transition: opacity 0.12s ease;
}
.lb-frame:hover .sb-img-chip, .sb-img-chip.is-over { opacity: 1; }
.sb-img-chip.is-over { outline: 1px dashed var(--sb-bone); }

/* Library picker — the "▤ library" chip sits under the replace chip; the popover
   is a frosted sheet of the tagged media library. Picking an image also assigns
   its tagged products to the frame's composition. */
.lb-lib-chip {
  position: absolute; top: 42px; right: 10px; z-index: 12; cursor: pointer;
  background: rgba(22,20,15,0.82); color: var(--sb-bone); border: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 10px; opacity: 0; transition: opacity 0.12s ease;
}
.lb-frame:hover .lb-lib-chip { opacity: 1; }
.lb-lib-chip:hover { background: var(--sb-ink); }
.lb-lib-pop {
  position: absolute; top: 76px; right: 10px; z-index: 30;
  width: min(420px, calc(100% - 20px)); max-height: min(480px, 70vh);
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: rgba(236, 232, 224, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 14px 40px rgba(22,20,15,0.3);
}
.lb-lib-pop-head { flex: none; display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid rgba(22,20,15,0.1); }
.lb-lib-search {
  flex: 1; border: 1px solid rgba(22,20,15,0.16); background: rgba(255,255,255,0.6);
  font-family: var(--font-mono); font-size: 11px; padding: 7px 10px; border-radius: 8px; outline: none;
}
.lb-lib-x { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--fg-2); padding: 0 6px; }
.lb-lib-grid {
  overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px;
}
.lb-lib-tile {
  position: relative; padding: 0; border: 0; cursor: pointer; aspect-ratio: 3/4;
  background: var(--bg-2); overflow: hidden; border-radius: 8px;
}
.lb-lib-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1); }
.lb-lib-tile:hover img { transform: scale(1.05); }
.lb-lib-badge {
  position: absolute; left: 5px; bottom: 5px;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px; background: rgba(236,232,224,0.9); color: var(--fg-3);
}
.lb-lib-badge.has { background: var(--sb-ink); color: var(--sb-bone); }
.lb-lib-model {
  position: absolute; right: 5px; top: 5px;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px; background: rgba(236,232,224,0.9); color: var(--fg-2);
}
.lb-lib-empty { grid-column: 1 / -1; padding: 22px 8px; color: var(--fg-3); font-size: 12px; }

/* on-canvas drag handles (edit only) */
.lb-divider-handle {
  position: absolute; top: 0; bottom: 0; width: 14px; margin-left: -7px; z-index: 7;
  cursor: ew-resize; display: flex; align-items: center; justify-content: center;
}
.lb-divider-handle::before { content: ""; width: 2px; height: 100%; background: rgba(255,255,255,0); transition: background 0.12s ease; }
.lb-look.lb-edit:hover .lb-divider-handle::before, .lb-divider-handle:hover::before { background: var(--sb-ink); }
.lb-height-handle {
  position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); z-index: 7;
  cursor: ns-resize; background: var(--sb-ink); color: var(--sb-bone);
  font-size: 11px; line-height: 1; padding: 4px 12px; opacity: 0; transition: opacity 0.12s ease;
}
.lb-look.lb-edit:hover .lb-height-handle { opacity: 0.9; }

/* 1 / 2 image toggle — z 13 to float above the frame transform box (.lb-tbox,
   z 8), or the 1/2/⇄ buttons are unclickable wherever a photo sits underneath */
.lb-cols-toggle { position: absolute; top: 10px; left: 10px; z-index: 13; display: flex; gap: 0; }
.lb-cols-toggle button {
  background: rgba(22,20,15,0.7); color: rgba(236,232,224,0.7); border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; padding: 5px 10px; width: 30px;
}
.lb-cols-toggle button.is-on { background: var(--sb-ink); color: var(--sb-bone); }

/* right-click context menu */
.lb-ctx {
  position: fixed; z-index: 1100; min-width: 180px; background: var(--bg-2);
  border: 1px solid var(--line-strong); box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  font-family: var(--font-mono); font-size: 11px;
}
.lb-ctx button {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 9px 14px; color: var(--fg-1); letter-spacing: 0.04em; text-transform: lowercase;
}
.lb-ctx button:hover { background: var(--sb-ink); color: var(--sb-bone); }
.lb-ctx button.danger { color: #b4493f; }
.lb-ctx button.danger:hover { background: #b4493f; color: var(--sb-bone); }

/* inspector grips, undo, hints, inline swap */
.sb-insp-grip { cursor: grab; color: var(--fg-3); font-size: 12px; flex: none; }
.sb-insp-photo.is-dragging, .sb-insp-comp.is-dragging { opacity: 0.4; }
.sb-insp-select.inline { flex: 1; margin: 0; }
.sb-insp-hint { font-size: 10px; color: var(--fg-3); letter-spacing: 0.04em; margin-top: 8px; }
.sb-led-head-r { display: flex; align-items: center; gap: 10px; }
.sb-led-undo {
  background: none; border: 1px solid var(--line-strong); color: var(--fg-1); cursor: pointer;
  font-size: 13px; line-height: 1; padding: 2px 7px;
}
.sb-led-undo:disabled { opacity: 0.3; cursor: not-allowed; }
.sb-led-undo:not(:disabled):hover { background: var(--sb-ink); color: var(--sb-bone); }

/* ── Edit-bar device + preview controls ──────────────────────────────────── */
.sb-edit-bar-devices { display: flex; gap: 0; margin-left: 4px; }
.sb-edit-bar-devices button, .sb-edit-bar-preview {
  background: none; border: 1px solid rgba(236,232,224,0.3); color: rgba(236,232,224,0.7);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; cursor: pointer;
}
.sb-edit-bar-devices button + button { border-left: none; }
.sb-edit-bar-devices button.is-on { background: var(--sb-bone); color: var(--sb-ink); }
.sb-edit-bar-preview { margin-left: 10px; }
.sb-edit-bar-preview:hover { background: rgba(236,232,224,0.12); color: var(--sb-bone); }

/* clean-preview floating pill (the only editor UI shown in preview) */
.sb-preview-pill {
  position: fixed; bottom: 18px; right: 22px; z-index: 1000;
  background: var(--sb-ink); color: var(--sb-bone); border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 16px; box-shadow: 0 6px 24px rgba(0,0,0,0.25); opacity: 0.55; transition: opacity 0.15s ease;
}
.sb-preview-pill:hover { opacity: 1; }
.sb-preview-pill b { font-weight: 700; }

/* Click affordances to open the look page */
.lb-frame-click { cursor: pointer; }
/* compound selector so it beats the later `.lb-indicator { pointer-events:none }` */
.lb-indicator.lb-indicator-click { pointer-events: auto; cursor: pointer; touch-action: manipulation; }
.lb-indicator.lb-indicator-click:hover { box-shadow: 0 14px 50px rgba(22, 20, 15, 0.24); }

/* ── Look page (full-screen, one look focused on a photo) ─────────────────── */
.lookpage { min-height: 100vh; background: var(--bg-1); }
.lookpage-head { display: flex; align-items: center; gap: 22px; padding: 16px 28px; border-bottom: 1px solid var(--line); }
.lookpage-back { background: none; border: none; cursor: pointer; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-1); }
.lookpage-back:hover { opacity: 0.55; }
.lookpage-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
.lookpage-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); align-items: start; }
.lookpage-hero { position: relative; height: 86vh; min-height: 460px; overflow: hidden; background: var(--bg-2); }
.lookpage-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lookpage-hero-fill { width: 100%; height: 100%; background: var(--bg-3); }
.lookpage-hero-meta { position: absolute; left: 18px; bottom: 18px; background: rgba(22, 20, 15, 0.7); color: var(--sb-bone); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; padding: 6px 10px; }
.lookpage-thumbs { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; }
.lookpage-thumb { width: 46px; height: 58px; background-size: cover; background-position: center; border: none; cursor: pointer; opacity: 0.65; box-shadow: 0 2px 10px rgba(0,0,0,0.25); transition: opacity 0.15s ease; }
.lookpage-thumb:hover { opacity: 0.9; }
.lookpage-thumb.is-active { opacity: 1; outline: 2px solid var(--sb-bone); outline-offset: 1px; }
.lookpage-aside { padding: 36px 28px 90px; }
.lookpage-body { font-family: var(--font-ui); font-size: 14px; line-height: 1.6; color: var(--fg-2); margin: 0 0 30px; max-width: 46ch; }
.lookpage-aside-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 22px; }
.lookpage-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 24px; }
.lookpage-empty { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
.app.is-device-mobile .lookpage-main { grid-template-columns: 1fr; }
.app.is-device-mobile .lookpage-hero { height: 66vh; }
.app.is-device-mobile .lookpage-products { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) {
  .lookpage-main { grid-template-columns: 1fr; }
  .lookpage-hero { height: 64vh; }
  .lookpage-products { grid-template-columns: 1fr 1fr; }
  .lookpage-head { padding: 12px 16px; }
  .lookpage-aside { padding: 28px 16px 80px; }
}

/* PDP "also in" brother colourways */
.pdp-brothers { margin: 2px 0 24px; }
.pdp-brothers-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-3); margin-bottom: 12px; }
.pdp-brothers-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pdp-brother { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; }
.pdp-brother-thumb { width: 48px; height: 60px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.pdp-brother:hover .pdp-brother-thumb { outline: 1px solid var(--sb-ink); outline-offset: 1px; }
.pdp-brother-c { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; color: var(--fg-3); text-transform: uppercase; }

/* "more looks" gallery + lightbox */
.lookpage-more { padding: 40px 28px 90px; border-top: 1px solid var(--line); }
.lookpage-more-h { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-1); margin-bottom: 26px; }
.lookpage-more-h .dim { color: var(--fg-3); }
.lookpage-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.lookpage-gtile { padding: 0; border: none; cursor: zoom-in; background: var(--bg-2); aspect-ratio: 3 / 4; overflow: hidden; }
.lookpage-gtile img { width: 100%; height: 100%; display: block; transition: transform 0.4s cubic-bezier(0.32,0.72,0,1); }
.lookpage-gtile.is-look img { object-fit: cover; }
.lookpage-gtile.is-product img { object-fit: contain; background: #ECE8E0; }
.lookpage-gtile:hover img { transform: scale(1.03); }
@media (max-width: 700px) { .lookpage-more { padding: 28px 16px 80px; } .lookpage-gallery { grid-template-columns: 1fr 1fr; gap: 10px; } }

.lookpage-lightbox {
  position: fixed; inset: 0; z-index: 1200; background: rgba(16, 14, 10, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
  cursor: zoom-out; animation: lb-fade 0.2s ease;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lookpage-lightbox img { max-width: 100%; max-height: 92vh; object-fit: contain; box-shadow: 0 20px 80px rgba(0,0,0,0.5); }
.lookpage-lightbox-close { position: fixed; top: 18px; right: 22px; background: none; border: none; color: var(--sb-bone); font-size: 30px; line-height: 1; cursor: pointer; opacity: 0.8; }
.lookpage-lightbox-close:hover { opacity: 1; }

/* ── Floating "current look" indicator (storefront, lookbook) ────────────── */
/* Apple "Dynamic Island" style: the pill resizes smoothly (measured width) while
   the old content blurs/fades out and the new fades in. */
/* Fixed, centered wrapper. Its ::before is a soft frosted scrim that blurs +
   fades the content immediately around the pill, so a look-border seam scrolling
   behind the floating bubble never shows as a hard line through its shadow.
   It is lifted clear of the bottom safe area + a margin so neither the shadow nor
   the scrim is clipped by the viewport edge / iOS Safari's bottom toolbar. */
.lb-ind-wrap {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 800;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 44px);
  pointer-events: none;
  /* smooth entrance: scrim + pill fade and rise together (easeOutQuint) */
  animation: lb-ind-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  /* glide to the new centre as the order drawer opens/collapses, in lock-step
     with the panel's own grid transition (app.css: grid-template-columns 0.44s) */
  transition: left 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes lb-ind-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.lb-ind-wrap::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: calc(100% + 120px); height: calc(100% + 60px);
  -webkit-backdrop-filter: blur(11px); backdrop-filter: blur(11px);
  -webkit-mask: radial-gradient(closest-side, #000 38%, transparent 80%);
  mask: radial-gradient(closest-side, #000 38%, transparent 80%);
}
.lb-indicator {
  position: relative;
  box-sizing: border-box; padding: 14px 25px; border-radius: 999px;   /* ×1.15 */
  max-width: 92vw; overflow: hidden;
  background: rgba(236, 232, 224, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  /* small, soft shadow — most of the separation comes from the scrim, so the
     shadow never extends far enough to be clipped at the screen edge */
  box-shadow: 0 4px 18px rgba(22, 20, 15, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--fg-1);
  pointer-events: none;
  /* width morph easing; opacity/position handled by the wrapper, scale here only */
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  animation: lb-ind-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes lb-ind-pop { from { transform: scale(0.97); } to { transform: scale(1); } }
/* graceful, eased out animation when the bubble has nothing to show */
.lb-ind-wrap.is-exiting { animation: lb-ind-out 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes lb-ind-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
/* chapter label in the bubble: a quiet uppercase section marker */
.lb-indicator.is-chapter .lb-ind-meta { text-transform: uppercase; letter-spacing: 0.16em; color: var(--fg-1); }

.lb-ind-content { display: flex; align-items: center; gap: 21px; width: max-content; }
.lb-ind-current { position: relative; animation: lb-ind-enter 0.46s cubic-bezier(0.32, 0.72, 0, 1) both; }
.lb-ind-leaving { position: absolute; top: 14px; left: 25px; pointer-events: none; animation: lb-ind-leave 0.46s cubic-bezier(0.32, 0.72, 0, 1) both; }
@keyframes lb-ind-enter { from { opacity: 0; transform: translateY(9px); filter: blur(7px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes lb-ind-leave { from { opacity: 1; transform: translateY(0); filter: blur(0); } to { opacity: 0; transform: translateY(-9px); filter: blur(7px); } }

.lb-ind-skus { display: flex; align-items: center; gap: 21px; }
.lb-ind-sku { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; text-transform: lowercase; }
.lb-ind-thumb { width: 37px; height: 44px; object-fit: contain; object-position: center; flex: none; filter: drop-shadow(0 3px 8px rgba(22, 20, 15, 0.26)); }
.lb-ind-thumb-color { border-radius: 2px; }
.lb-ind-meta { white-space: nowrap; color: var(--fg-3); letter-spacing: 0.1em; padding-left: 18px; border-left: 1px solid rgba(22, 20, 15, 0.15); flex: none; }
@media (max-width: 600px) {
  .lb-indicator { padding: 10px 18px; font-size: 11.5px; }
  .lb-ind-content { gap: 14px; }
  .lb-ind-skus { gap: 14px; }
  .lb-ind-thumb { width: 30px; height: 37px; }
  .lb-ind-name { display: none; }   /* thumbnails only when tight */
}
@media (prefers-reduced-motion: reduce) {
  .lb-ind-wrap, .lb-indicator, .lb-ind-current, .lb-ind-leaving { animation: none; transition: none; }
}

/* ── Mobile device mode ──────────────────────────────────────────────────── */
/* Shared: constrain the storefront to phone width and reproduce the real mobile
   layout (so the editing breakpoint matches an actual phone, not a squished
   desktop). EDITING shows a plain scrollable long feed; PREVIEW wraps it in a
   realistic device mock (bezel, notch, internal scroll). */
.app.is-device-mobile .main {
  width: 430px; margin: 56px auto 48px;
  padding-left: 0 !important; padding-right: 0 !important;
  overflow-x: hidden; position: relative; background: var(--bg-1);
}
.app.is-device-mobile .main-header { position: static; }

/* Phone header safe zone (mobile editing only): on a real phone the retail
   header is a FIXED overlay on the opening image, so its band is covered.
   Hatch that zone at the top of the canvas — compose faces/type below it.
   Height ≈ the ≤600px header (wordmark row + tabs row); keep in sync. */
.lb-mob-safe {
  position: absolute; top: 0; left: 0; right: 0; height: 98px;
  z-index: 55; pointer-events: none;
  border-bottom: 1px dashed rgba(22, 20, 15, 0.5);
  background: repeating-linear-gradient(-45deg, rgba(22, 20, 15, 0.06) 0 6px, transparent 6px 12px);
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.lb-mob-safe-label {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(22, 20, 15, 0.6);
  padding: 2px 8px 3px; background: rgba(236, 232, 224, 0.8);
}

/* Editing mobile = scrollable long feed (no device chrome) */
.app.is-device-mobile:not(.is-preview) .main { outline: 1px dashed var(--line-strong); }

/* Preview mobile = device mock */
.app.is-device-mobile.is-preview .main {
  height: calc(100vh - 96px); margin: 62px auto 24px;
  overflow-y: auto; scrollbar-width: none;
  border: 12px solid #17150f; border-radius: 46px; box-shadow: 0 24px 70px rgba(0,0,0,0.32);
}
.app.is-device-mobile.is-preview .main::-webkit-scrollbar { display: none; }
.app.is-device-mobile.is-preview::after {
  content: ""; position: fixed; top: 66px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 22px; background: #17150f; border-radius: 0 0 16px 16px;
  z-index: 950; pointer-events: none;
}

/* Mobile content layout (mirrors the real @media(max-width:600px) rules so the
   frame renders like a phone regardless of the actual window width). */
.app.is-device-mobile .main .lb-look-grid.lb-is-pair { flex-direction: column; height: auto !important; gap: 0 !important; }
.app.is-device-mobile .main .lb-look-grid.lb-is-pair > .lb-frame { width: 100% !important; flex: none !important; height: var(--look-h, 70vh); }
.app.is-device-mobile .main .lb-divider-handle { display: none; }
.app.is-device-mobile .main .main-header { flex-wrap: wrap; padding: 12px 16px; gap: 10px 14px; }
.app.is-device-mobile .main .main-header .nav-tabs { order: 3; flex: 0 0 100%; width: 100%; gap: 16px; overflow-x: auto; white-space: nowrap; }
.app.is-device-mobile .main .main-header .meta-right .meta-pill:first-child { display: none; }
.app.is-device-mobile .main .cover-stage { padding: 24px 18px; min-height: 56vh; }
.app.is-device-mobile .main .cover-title { font-size: clamp(40px, 13vw, 72px); }
.app.is-device-mobile .main .cover-deetz { grid-template-columns: repeat(2, 1fr); padding: 28px 18px; gap: 24px 18px; }
.app.is-device-mobile .main .cover-letter { grid-template-columns: 1fr; padding: 28px 18px; }
.app.is-device-mobile .main .lb-head { grid-template-columns: 1fr; padding: 28px 18px; gap: 14px; }
.app.is-device-mobile .main .grid-page,
.app.is-device-mobile .main .concepts-index,
.app.is-device-mobile .main .concept-page { padding: 20px 16px 96px; }
.app.is-device-mobile .main .concepts-grid { grid-template-columns: 1fr; }

/* ── Chapter / opener band ──────────────────────────────────────────────────
   Full-width editorial section in the lookbook flow. Background image (cover
   pan/zoom) with a title + text freely placed over it. Positions are %-of-band,
   stored per device, so the layout survives any screen size. Styles apply to
   retailers too (loaded globally); .lb-edit/.lb-ch-grip gate the editing UI. */
.lb-chapter {
  position: relative; width: 100%; box-sizing: border-box; overflow: hidden;
  border-bottom: var(--border-1); background: var(--bg-2);
  /* container so the title/text font-size can scale with the band width (cqw),
     making the whole composition zoom as one unit → text stays locked to the image. */
  container-type: inline-size;
}
.lb-ch-bg { position: absolute; inset: 0; overflow: hidden; }
.lb-ch-bg .photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-ch-bg .photo-fill { width: 100%; height: 100%; background: var(--bg-2); }

/* Placed elements: center-anchored at their stored (x%,y%). Sit ABOVE the image
   transform box (.lb-tbox, z-index 8) so the title/text stay draggable once a
   background image is added; the image still pans on the empty areas around them. */
.lb-ch-el {
  position: absolute; transform: translate(-50%, -50%); z-index: 12;
  max-width: 92%; text-align: center; box-sizing: border-box;
}
/* Retailers (no .lb-edit) never interact with the placed text — let clicks pass
   through to nothing, and keep them above the image either way. */
.lb-chapter:not(.lb-edit) .lb-ch-el { pointer-events: none; }
.lb-ch-title {
  font-family: var(--font-display); font-weight: 400; margin: 0;
  font-size: clamp(34px, 6vw, 72px); line-height: 0.96; letter-spacing: -0.02em;
}
.lb-ch-text {
  font-family: var(--font-body, var(--font-mono)); white-space: pre-wrap;
  font-size: 15px; line-height: 1.65; margin: 0;
}
/* Legibility over arbitrary images: light = bone text w/ soft shadow, dark = ink. */
.lb-ch-light .lb-ch-el { color: var(--sb-bone); text-shadow: 0 1px 22px rgba(0,0,0,0.42), 0 0 2px rgba(0,0,0,0.35); }
.lb-ch-dark  .lb-ch-el { color: var(--sb-ink); }

/* Edit affordances — mirror the look-card outline language. */
.lb-chapter.lb-edit { cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color 0.12s ease; }
.lb-chapter.lb-edit:hover { outline-color: var(--line-strong); }
.lb-chapter.lb-edit.is-selected { outline-color: var(--sb-ink); }
.lb-chapter.lb-edit.is-hidden { opacity: 0.5; }
.lb-chapter.lb-edit .lb-ch-el { outline: 1px dashed transparent; outline-offset: 6px; transition: outline-color 0.12s ease; }
.lb-chapter.lb-edit .lb-ch-el:hover { outline-color: rgba(127,127,127,0.7); }
/* floating on-canvas toolbar (move grip + per-text alignment), like a Figma chip */
.lb-ch-tools {
  position: absolute; left: 50%; top: -42px; transform: translateX(-50%); z-index: 14;
  display: flex; align-items: center; gap: 2px; padding: 3px; white-space: nowrap;
  background: var(--sb-ink); box-shadow: 0 6px 20px rgba(22,20,15,0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.12s ease;
}
/* invisible bridge so moving from the text up to the toolbar keeps it open */
.lb-ch-tools::before { content: ""; position: absolute; left: -6px; right: -6px; top: 100%; height: 16px; }
.lb-ch-el:hover .lb-ch-tools, .lb-ch-tools:hover { opacity: 1; pointer-events: auto; }
.lb-ch-grip {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 22px;
  cursor: move; touch-action: none; color: var(--sb-bone); font-size: 12px; line-height: 1;
}
.lb-ch-tools-sep { width: 1px; height: 16px; background: rgba(236,232,224,0.25); margin: 0 2px; }
.lb-ch-al {
  width: 24px; height: 22px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: rgba(236,232,224,0.6); font-size: 13px; line-height: 1;
}
.lb-ch-al:hover { color: var(--sb-bone); }
.lb-ch-al.is-on { background: var(--sb-bone); color: var(--sb-ink); }
.lb-ch-badge {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  background: var(--sb-ink); color: var(--sb-bone);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; padding: 4px 8px;
}
.lb-ch-bg:hover .sb-img-chip, .lb-chapter.lb-edit:hover .sb-img-chip { opacity: 1; }
.lb-chapter.lb-edit:hover .lb-ch-height { opacity: 0.9; }

/* Concepts index — edit mode: drag cards to reorder, drop an SVG on one to set
   its logo. The media box hosts the replace-logo chip; whole card is draggable. */
.concept-card-edit { cursor: grab; }
.concept-card-edit:active { cursor: grabbing; }
.concept-card-edit .concept-card-media { position: relative; }
.concept-card-edit:hover .sb-img-chip { opacity: 1; }
.concept-card-edit.is-dragging { opacity: 0.4; }
.concept-card-edit .concept-card-arrow { cursor: grab; }
/* while a file is dragged over the card, the chip highlights (handled by .is-over) */

/* rail: chapter rows + the look/chapter add buttons */
.sb-led-add-row { display: flex; gap: 8px; margin: 8px; }
.sb-led-add-row .sb-led-add { margin: 0; flex: 1; text-align: center; }
.sb-led-look.is-chapter:not(.is-active) { background: rgba(127,127,127,0.06); }
.sb-led-n-ch { font-size: 13px; line-height: 1; text-align: center; }
.sb-led-look.is-active .sb-led-n-ch { color: var(--sb-bone); }
/* inline rename field in the rail */
.sb-led-rename {
  flex: 1; min-width: 0; background: var(--bg-1); color: var(--fg-1);
  border: 1px solid var(--sb-ink); padding: 2px 5px; margin: -2px 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em;
}
.sb-led-rename:focus { outline: none; }

/* inspector: theme toggle + reset link */
.sb-insp-theme { display: flex; gap: 6px; }
.sb-insp-theme button {
  flex: 1; padding: 8px; cursor: pointer; background: none; border: 1px solid var(--line-strong);
  color: var(--fg-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.sb-insp-theme button.is-on { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
.sb-insp-align { display: flex; gap: 6px; }
.sb-insp-align button {
  flex: 1; padding: 7px; cursor: pointer; background: none; border: 1px solid var(--line-strong);
  color: var(--fg-2); font-size: 14px; line-height: 1;
}
.sb-insp-align button.is-on { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
.sb-insp-reset {
  margin: 2px 0 6px; padding: 0; background: none; border: none; cursor: pointer;
  color: var(--fg-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}
.sb-insp-reset:hover { color: var(--fg-1); }

/* mobile device frame: chapters stack normally; full width inside the 430px feed */
.app.is-device-mobile .main .lb-chapter, .app.is-device-mobile .main .lb-canvas { width: 100%; }

/* ── Floating look page — the indicator bubble expands into this card with a
   Dynamic-Island spring (it grows from the bubble's bottom-centre spot; the bubble
   is hidden while open). Closing collapses it back to the pill. ───────────────── */
.flp-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(22, 20, 15, 0); animation: flp-scrim-in 0.42s ease forwards;
}
@keyframes flp-scrim-in { to { background: rgba(22, 20, 15, 0.44); } }
.flp-overlay.is-closing { animation: flp-scrim-out 0.34s ease forwards; }
@keyframes flp-scrim-out { from { background: rgba(22, 20, 15, 0.44); } to { background: rgba(22, 20, 15, 0); } }

.flp-card {
  position: relative; width: min(1280px, 96vw); max-height: calc(100dvh - 96px);
  margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 82px);   /* sits above the pill */
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-1); border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 36px 100px rgba(22, 20, 15, 0.42);
  border-radius: 26px; transform-origin: bottom center;
  /* the page literally grows OUT OF the pill: it starts as a small rounded shape
     at the pill's spot and unfolds up into a floating tab, focusing in (Apple-like). */
  animation: flp-in 0.66s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity, filter;
}
@keyframes flp-in {
  from { opacity: 0; transform: translateY(50px) scale(0.34); border-radius: 90px; filter: blur(7px); }
  40%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0) scale(1); border-radius: 26px; filter: blur(0); }
}
.flp-overlay.is-closing .flp-card { animation: flp-out 0.38s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
@keyframes flp-out {
  from { opacity: 1; transform: translateY(0) scale(1); border-radius: 26px; filter: blur(0); }
  to   { opacity: 0; transform: translateY(50px) scale(0.34); border-radius: 90px; filter: blur(6px); }
}
@media (prefers-reduced-motion: reduce) { .flp-overlay, .flp-card, .flp-closepill { animation-duration: 0.001s; } }

.flp-head {
  flex: none; display: flex; align-items: center; justify-content: flex-start;
  padding: 15px 22px; border-bottom: 1px solid var(--line);
  background: rgba(236, 232, 224, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: padding 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, border-color 0.3s ease;
}
.flp-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); transition: font-size 0.3s cubic-bezier(0.22, 1, 0.36, 1); white-space: nowrap; overflow: hidden; }
.flp-title b { font-weight: 600; color: var(--fg-1); }
.flp-title-name { transition: opacity 0.24s ease, max-width 0.3s cubic-bezier(0.22, 1, 0.36, 1); display: inline-block; max-width: 60ch; vertical-align: bottom; overflow: hidden; }
/* collapsed (scrolling down): thinner, blurrier bar, name minimised away */
.flp-head.is-collapsed { padding: 8px 22px; background: rgba(236, 232, 224, 0.55); -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); border-color: transparent; }
.flp-head.is-collapsed .flp-title { font-size: 10px; }
.flp-head.is-collapsed .flp-title-name { opacity: 0; max-width: 0; }

/* close pill — sits at the indicator bubble's EXACT spot + style, so the bubble
   reads as having stayed in place and become the close button (its content swaps
   to "✕ close"), while the page unfolds out of it. */
.flp-closepill {
  position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 44px); left: 50%; transform: translateX(-50%);
  z-index: 1260; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(236, 232, 224, 0.72); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  color: var(--fg-1); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 4px 18px rgba(22, 20, 15, 0.16);
  animation: flp-pill-in 0.22s ease both;   /* near-instant — it "was already there" */
}
.flp-closepill:hover { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
@keyframes flp-pill-in { from { opacity: 0; } to { opacity: 1; } }
.flp-overlay.is-closing .flp-closepill { animation: flp-pill-out 0.34s ease forwards; }
@keyframes flp-pill-out { to { opacity: 0; transform: translateX(-50%) translateY(6px); } }

.flp-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Shared entrance for the page's sections — a soft rise, staggered per item via
   inline animation-delay. */
@keyframes flp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.flp-head-meta { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--fg-3); white-space: nowrap; }

/* THE COMPOSITION — big packshot rows lead the page (the look's garments);
   the source photo is only a small sticky context column on the right. */
.flp-comp {
  display: grid; grid-template-columns: minmax(0, 1fr) 224px;
  gap: 36px; padding: 24px 30px 30px; align-items: start;
}
.flp-comp-main { min-width: 0; }
.flp-side-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3); padding: 4px 0 12px;
  animation: flp-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}
.flp-items-empty { padding: 32px 0; color: var(--fg-3); font-size: 13px; }
/* one garment = a generous lay-flat + its facts side by side */
.flp-comp-row {
  display: grid; grid-template-columns: minmax(200px, 44%) minmax(0, 1fr);
  gap: 28px; align-items: center; padding: 18px 0;
  border-top: 1px solid var(--line);
  animation: flp-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;   /* delay set inline */
}
.flp-comp-row:first-of-type { border-top: 0; padding-top: 4px; }
.flp-comp-img {
  display: flex; align-items: center; justify-content: center;
  padding: 20px; border: 0; cursor: pointer;
  background: var(--bg-2); border-radius: 16px; min-height: 220px;
}
.flp-comp-img img { max-width: 100%; max-height: 280px; object-fit: contain; display: block; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.flp-comp-img:hover img { transform: scale(1.045); }
.flp-comp-fill { width: 55%; aspect-ratio: 3/4; border-radius: 2px; }
.flp-comp-info { min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.flp-comp-name {
  padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-family: var(--font-ui); font-size: 17px; font-weight: 500; color: var(--fg-1); line-height: 1.25;
}
.flp-comp-name:hover { opacity: 0.7; }
.flp-comp-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fg-3); }
.flp-comp-price { color: var(--fg-2); }
.flp-sizes { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 4px; }
.flp-comp-view {
  margin-top: 2px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
}
.flp-comp-view:hover { color: var(--fg-1); }
.flp-comp-row.is-in-order .flp-comp-img { box-shadow: inset 0 0 0 1px var(--line-strong); }

/* CONTEXT — the ONE photo this page came from, sticky, with the caption body.
   Click the photo to zoom. It's the only photo here (no sibling-frame thumbs),
   so it gets the column: tall, near-uncropped. */
.flp-context { position: sticky; top: 18px; min-width: 0; animation: flp-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both; }
.flp-ctx-photo {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: var(--bg-2); border-radius: 12px; overflow: hidden;
}
.flp-ctx-photo img { display: block; width: 100%; height: auto; max-height: min(58vh, 520px); object-fit: cover; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.flp-ctx-photo:hover img { transform: scale(1.03); }
.flp-hero-none { display: flex; align-items: center; justify-content: center; aspect-ratio: 3/4; color: var(--fg-3); font-size: 40px; }
.flp-ctx-body { margin: 12px 0 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; line-height: 1.6; color: var(--fg-3); text-transform: uppercase; }

/* "these pieces in other looks" — the deep-dive gallery */
.flp-sec-h {
  display: flex; align-items: baseline; gap: 10px;
  padding: 20px 30px 14px; margin-top: 4px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
}
.flp-sec-count { color: var(--fg-2); }
.flp-more { padding-bottom: 28px; animation: flp-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.flp-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 30px; }
.flp-gtile { position: relative; padding: 0; border: none; cursor: pointer; background: var(--bg-2); aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; }
.flp-gtile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.flp-gtile:hover img { transform: scale(1.05); }
.flp-gtile-chip {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; color: var(--fg-1);
  background: rgba(236, 232, 224, 0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 4px 8px; border-radius: 999px; pointer-events: none;
}

.flp-lightbox { position: fixed; inset: 0; z-index: 1300; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.flp-lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; }
.flp-lightbox-close { position: fixed; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }

@media (max-width: 700px) {
  /* phone: near-fullscreen sheet — packshots lead, the context photo follows as a
     compact horizontal strip, gallery 2-up */
  .flp-card { width: 96vw; max-height: calc(100dvh - 132px); margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 94px); }
  .flp-comp { grid-template-columns: 1fr; gap: 22px; padding: 14px 16px 20px; }
  .flp-context {
    position: static; order: 2;
    display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 4px 14px; align-items: start;
  }
  .flp-context .flp-side-label { grid-column: 1 / -1; padding-bottom: 8px; }
  /* no frame thumbs anymore — the single photo can run taller and the body
     text sits beside it instead of below the strip */
  .flp-ctx-photo img { max-height: 190px; }
  .flp-ctx-body { grid-column: auto; margin-top: 0; align-self: center; }
  .flp-comp-row { grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 16px; padding: 14px 0; }
  .flp-comp-img { min-height: 0; padding: 12px; }
  .flp-comp-img img { max-height: 170px; }
  .flp-comp-name { font-size: 15px; }
  .flp-head-meta { display: none; }
  .flp-sec-h { padding: 18px 16px 12px; }
  .flp-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; }
}

/* Centre the floating bubble, close pill and look card in the MAIN area — offset
   left by the order rail/panel on the right, so they sit in the middle of what
   you can actually see (not hidden behind / under the order drawer). */
@media (min-width: 768px) {
  .lb-ind-wrap, .flp-closepill { left: calc(50% - 28px); }              /* order rail (56px) */
  .flp-overlay { padding-right: 56px; box-sizing: border-box; }
  .app:not(.is-collapsed) .lb-ind-wrap,
  .app:not(.is-collapsed) .flp-closepill { left: calc(50% - 220px); }   /* order panel (440px) */
  .app:not(.is-collapsed) .flp-overlay { padding-right: 440px; }
}

/* ── SEQUENCE MODE — the whole book zoomed out; drag photos between sections
      to swap them; red = the photo that landed back at the drag origin ─────── */
.sb-seq {
  position: fixed; inset: 38px 0 0 0;   /* sits below the fixed edit bar */
  z-index: 950;
  background: var(--bg-1); display: flex; flex-direction: column;
  font-family: var(--font-mono); color: var(--fg-1);
}
.sb-seq-head {
  flex: none; display: flex; align-items: center; gap: 16px;
  padding: 13px 20px; border-bottom: 1px solid var(--line-strong);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
}
.sb-seq-title { letter-spacing: 0.22em; }
.sb-seq-hint { color: var(--fg-3); text-transform: none; letter-spacing: 0.06em; }
.sb-seq-hint-red { color: #A72A1D; }
.sb-seq-btn {
  border: 1px solid var(--line-strong); background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-1); padding: 6px 12px;
}
.sb-seq-btn:hover { background: var(--sb-ink); color: var(--sb-bone); }
.sb-seq-done { margin-left: auto; }
.sb-seq-btn + .sb-seq-done { margin-left: 0; }
.sb-seq-hint + .sb-seq-btn { margin-left: auto; }

.sb-seq-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-end;
  gap: 26px 30px; padding: 24px 26px 40px;
}
.sb-seq-chapter {
  flex: 1 1 100%; padding: 8px 2px 0; color: var(--fg-3);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.sb-seq-look.is-hidden { opacity: 0.4; }
.sb-seq-label {
  font-size: 10px; letter-spacing: 0.1em; color: var(--fg-2);
  margin-bottom: 6px; cursor: default; user-select: none; white-space: nowrap;
}
.sb-seq-n { color: var(--fg-3); }
.sb-seq-imgs { display: flex; gap: 6px; }
.sb-seq-ph {
  position: relative; width: var(--seq-ph, 96px); aspect-ratio: 3 / 4;
  border: 1px solid var(--line); background: var(--bg-2);
  cursor: grab; box-sizing: border-box;
}
.sb-seq-ph:active { cursor: grabbing; }
.sb-seq-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sb-seq-ph.is-over { outline: 2px solid var(--sb-ink); outline-offset: 2px; }
.sb-seq-ph.is-swapped { border: 2px solid #A72A1D; }
.sb-seq-flag {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #A72A1D; color: #fff; text-align: center;
  font-size: 8px; letter-spacing: 0.12em; padding: 3px 2px 2px;
}
.sb-seq-empty {
  width: var(--seq-ph, 96px); aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); color: var(--fg-3); font-size: 9px;
}

/* sequence mode v2 — section drag handle, rename, pool, right-click picker */
.sb-seq-label { display: flex; align-items: center; gap: 6px; cursor: grab; }
.sb-seq-label:active { cursor: grabbing; }
.sb-seq-grip { color: var(--fg-3); font-size: 9px; }
.sb-seq-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sb-seq-look.is-secdrag { opacity: 0.35; }
.sb-seq-jump {
  border: 0; background: none; cursor: pointer; color: var(--fg-3);
  font-family: var(--font-mono); font-size: 11px; padding: 0 2px; line-height: 1;
}
.sb-seq-jump:hover { color: var(--fg-1); }
.sb-seq-rename {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-1);
  padding: 2px 5px; width: 120px; outline: none;
}
.sb-seq-empty.is-over { outline: 2px solid var(--sb-ink); outline-offset: 2px; }

.sb-seq-pool {
  flex: none; height: 30vh; min-height: 180px; display: flex; flex-direction: column;
  border-top: 1px solid var(--line-strong); background: var(--bg-2);
}
.sb-seq-pool-head {
  flex: none; display: flex; align-items: center; gap: 14px;
  padding: 9px 20px; border-bottom: 1px solid var(--line);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
}
.sb-seq-pool-q {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  border: 1px solid var(--line-strong); background: var(--bg-1); color: var(--fg-1);
  padding: 5px 10px; width: 280px; outline: none;
}
.sb-seq-pool-grid {
  flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start;
  gap: 8px; padding: 12px 20px 20px;
}
.sb-seq-pool-ph {
  position: relative; flex: none; width: 74px; aspect-ratio: 3 / 4;
  border: 1px solid var(--line); background: var(--bg-1); cursor: grab; box-sizing: border-box;
}
.sb-seq-pool-ph:active { cursor: grabbing; }
.sb-seq-pool-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sb-seq-pool-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 3px 1px;
  background: rgba(22, 20, 15, 0.72); color: var(--sb-bone);
  font-size: 7px; letter-spacing: 0.1em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sb-seq-picker {
  position: fixed; z-index: 980; width: 380px;
  background: var(--bg-1); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(22, 20, 15, 0.28); padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.sb-seq-picker-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
}
.sb-seq-picker-head button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--fg-1); }
.sb-seq-picker .sb-seq-pool-q { width: 100%; box-sizing: border-box; }
.sb-seq-picker-grid {
  max-height: 320px; overflow-y: auto; display: flex; flex-wrap: wrap;
  align-content: flex-start; gap: 6px;
}
.sb-seq-picker-ph {
  flex: none; width: 64px; aspect-ratio: 3 / 4; padding: 0;
  border: 1px solid var(--line); background: var(--bg-2); cursor: pointer;
}
.sb-seq-picker-ph:hover { border-color: var(--sb-ink); }
.sb-seq-picker-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* sequence mode — hover tooltip: products tagged in the hovered image */
.sb-seq-tip {
  position: fixed; z-index: 990; min-width: 170px; max-width: 240px;
  background: var(--bg-1); border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(22, 20, 15, 0.25); padding: 8px 10px;
  pointer-events: none; display: flex; flex-direction: column; gap: 5px;
}
.sb-seq-tip-model {
  font-size: 9px; letter-spacing: 0.18em; color: var(--fg-3);
  padding-bottom: 3px; border-bottom: 1px solid var(--line);
}
.sb-seq-tip-item { display: flex; align-items: center; gap: 8px; }
.sb-seq-tip-thumb {
  flex: none; width: 26px; height: 34px;
  background: var(--bg-2); border: 1px solid var(--line-faint);
}
.sb-seq-tip-name { font-size: 10px; letter-spacing: 0.05em; color: var(--fg-1); text-transform: none; }
.sb-seq-tip-name em { font-style: normal; color: var(--fg-3); }
.sb-seq-tip-none { font-size: 10px; color: var(--fg-3); text-transform: none; letter-spacing: 0.05em; }

/* sequence mode — product checklist sidebar, hover-highlight, ↻ random chip */
.sb-seq-mid { flex: 1; min-height: 0; display: flex; }
.sb-seq-mid .sb-seq-body { flex: 1; min-width: 0; }
.sb-seq-prods {
  flex: none; width: 320px; display: flex; flex-direction: column;
  border-left: 1px solid var(--line-strong); background: var(--bg-2);
}
.sb-seq-prods-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
}
.sb-seq-prods-list { flex: 1; overflow-y: auto; padding: 6px 0 20px; }
.sb-seq-prod {
  display: flex; align-items: center; gap: 9px; padding: 5px 14px;
  cursor: pointer; user-select: none; border-bottom: 1px solid var(--line-faint);
}
.sb-seq-prod:hover, .sb-seq-prod.is-hot { background: var(--bg-1); }
.sb-seq-prod-thumb { flex: none; width: 26px; height: 34px; border: 1px solid var(--line-faint); background-color: var(--bg-1); }
.sb-seq-prod-name {
  flex: 1; min-width: 0; font-size: 10px; letter-spacing: 0.05em; text-transform: none;
  color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-seq-prod-name em { font-style: normal; color: var(--fg-3); }
.sb-seq-prod-count { flex: none; font-size: 10px; color: var(--fg-2); min-width: 26px; text-align: right; }
.sb-seq-prod.is-missing .sb-seq-prod-count { color: #A72A1D; }
.sb-seq-prod-tick { flex: none; font-size: 10px; color: #A72A1D; width: 12px; text-align: center; }
.sb-seq-prod-tick.is-on { color: var(--fg-2); }

/* hovering a product dims everything except the photos wearing it */
.sb-seq.has-hl .sb-seq-body .sb-seq-ph { opacity: 0.16; }
.sb-seq.has-hl .sb-seq-body .sb-seq-ph.is-hl { opacity: 1; outline: 2px solid var(--sb-ink); outline-offset: 2px; }

/* ↻ — re-roll a random-added image (another shot of the same item) */
.sb-seq-rand {
  position: absolute; right: 3px; top: 3px; width: 20px; height: 20px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(236, 232, 224, 0.95); color: var(--sb-ink);
  font-size: 12px; line-height: 1; cursor: pointer; padding: 0;
}
.sb-seq-rand:hover { background: var(--sb-ink); color: var(--sb-bone); }

/* ── PDP edit mode — WORN toggles, DETAILS library picker, mobile frame ── */
.pp-worn-toggle {
  position: relative; padding: 0; border: 1px solid var(--line-faint);
  background: var(--bg-2); cursor: pointer; display: block;
}
.pp-worn-toggle img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.pp-worn-toggle:not(.is-on) img { opacity: 0.35; filter: grayscale(0.6); }
.pp-worn-toggle.is-on { border-color: var(--sb-ink); }
.pp-worn-state {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(236,232,224,0.92); color: var(--fg-3);
}
.pp-worn-toggle.is-on .pp-worn-state { background: var(--sb-ink); color: var(--sb-bone); }
/* lookbook-usage badge: know at a glance whether a WORN pick would repeat a
   photo the buyer already scrolled past in the book */
.pp-worn-book {
  position: absolute; left: 8px; top: 8px;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.12em;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(236,232,224,0.92); color: var(--fg-3); border: 1px dashed var(--line-strong);
}
.pp-worn-book.is-in { background: var(--sb-ink); color: var(--sb-bone); border: 1px solid var(--sb-ink); }

.pp-det-x {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; z-index: 30;
  border: 1px solid var(--line-strong); background: rgba(236,232,224,0.95);
  color: var(--sb-ink); font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.pp-det-x:hover { background: #A72A1D; color: #fff; border-color: #A72A1D; }
/* ⠿ drag-to-reorder grip (details) — sits above the crop transform box */
.pp-det-grip {
  position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: rgba(236,232,224,0.95);
  color: var(--fg-2); font-size: 12px; line-height: 1; cursor: grab; user-select: none;
}
.pp-det-grip:active { cursor: grabbing; }
/* WORN header: page-preview toggle (hide the HIDDEN picks while editing) */
.pp-worn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pp-worn-preview {
  border: 1px solid var(--line-strong); background: none; cursor: pointer; border-radius: 999px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-3); padding: 4px 10px;
}
.pp-worn-preview:hover { color: var(--fg-1); border-color: var(--sb-ink); }
.pp-worn-preview.is-on { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
.pp-det-add { position: relative; display: flex; flex-direction: column; gap: 8px; aspect-ratio: 4/3; }
.pp-det-addbtn {
  width: 100%; flex: 1; min-height: 0; border: 1px dashed var(--line-strong);
  background: none; cursor: pointer; color: var(--fg-3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  display: flex; align-items: center; justify-content: center;
}
.pp-det-addbtn:hover { color: var(--fg-1); border-color: var(--sb-ink); }
.pp-det-picker {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: 380px; max-width: 82vw;
  background: var(--bg-1); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(22,20,15,0.25); padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.pp-det-q {
  font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--fg-1); padding: 6px 10px; outline: none; width: 100%;
  box-sizing: border-box;
}
.pp-det-grid {
  max-height: 300px; overflow-y: auto; display: flex; flex-wrap: wrap;
  align-content: flex-start; gap: 6px;
}
.pp-det-tile { flex: none; width: 64px; aspect-ratio: 3/4; padding: 0; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.pp-det-tile:hover { border-color: var(--sb-ink); }
.pp-det-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-det-empty { padding: 10px; font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }

/* the PDP inside the editor's mobile frame = the real @media(600) layout */
.app.is-device-mobile .pp { padding: 12px 16px 96px; }
.app.is-device-mobile .pp-grid { grid-template-columns: 1fr; grid-template-areas: "media" "info"; gap: 18px; }
.app.is-device-mobile .pp-info { position: static; max-height: none; }
.app.is-device-mobile .pp-details-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.app.is-device-mobile .pp-frame { max-height: none; }
.app.is-device-mobile .pp-worn-grid { gap: 10px; }

/* pool — collapsible + adjustable tile size */
.sb-seq-pool.is-collapsed { height: auto; min-height: 0; }
.sb-seq-pool-fold {
  border: 0; background: none; cursor: pointer; padding: 0;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-1);
}
.sb-seq-pool-fold:hover { color: var(--fg-3); }

/* edit chrome keeps its REAL size on the scaled editor canvas (--lb-inv) */
.lb-ctx { transform: scale(var(--lb-inv, 1)); transform-origin: top left; }
.lb-lib-pop { transform: scale(var(--lb-inv, 1)); transform-origin: top right; }
.lb-cols-toggle { transform: scale(var(--lb-inv, 1)); transform-origin: top left; }
.sb-img-chip, .lb-lib-chip { transform: scale(var(--lb-inv, 1)); transform-origin: top right; }
.lb-tbox-label { transform: scale(var(--lb-inv, 1)); transform-origin: bottom left; }
.lb-tbox-h { width: calc(12px * var(--lb-inv, 1)); height: calc(12px * var(--lb-inv, 1)); }
.lb-hidden-badge, .lb-ch-badge { transform: scale(var(--lb-inv, 1)); transform-origin: top left; }
.lb-height-handle { transform: translateX(-50%) scale(var(--lb-inv, 1)); transform-origin: bottom center; }

.sb-seq-copyname {
  margin-left: auto; margin-right: 10px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-3);
}
.sb-seq-copyname:hover { color: var(--fg-1); }

/* sequence — section remove, image remove, add-mode toggle */
.sb-seq-remove {
  border: 0; background: none; cursor: pointer; color: var(--fg-3);
  font-family: var(--font-mono); font-size: 12px; line-height: 1; padding: 0 2px;
}
.sb-seq-remove:hover { color: #A72A1D; }
.sb-seq-removeimg {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-3);
}
.sb-seq-removeimg:hover { color: #A72A1D; }
.sb-seq-picker .sb-seq-copyname { margin-left: 0; }
.sb-seq-addmode { display: inline-flex; }
.sb-seq-addmode button {
  border: 1px solid var(--line-strong); background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 9px; width: 20px; padding: 3px 0;
  color: var(--fg-3);
}
.sb-seq-addmode button + button { border-left: 0; }
.sb-seq-addmode button.is-on { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }

/* ── Lookbook versions (rail footer popover) ─────────────────────────────── */
.sb-led-publish { position: relative; }
.sb-led-versions-btn { width: 100%; margin-top: 6px; }
.sb-led-versions-btn.is-on { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
.sb-led-versions {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px); z-index: 220;
  background: var(--bg-1); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(22, 20, 15, 0.25); padding: 10px;
  display: flex; flex-direction: column; gap: 8px; max-height: 46vh;
}
.sb-led-ver-save { display: flex; gap: 6px; }
.sb-led-ver-name {
  flex: 1; min-width: 0; border: 1px solid var(--line-strong); background: var(--bg-1);
  padding: 7px 9px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-1);
}
.sb-led-ver-name:focus { outline: none; border-color: var(--sb-ink); }
.sb-led-ver-err { font-family: var(--font-mono); font-size: 10px; color: #A72A1D; }
.sb-led-ver-list { overflow-y: auto; display: flex; flex-direction: column; }
.sb-led-ver {
  display: flex; align-items: center; gap: 8px; padding: 7px 2px;
  border-bottom: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: 11px;
}
.sb-led-ver:last-child { border-bottom: none; }
.sb-led-ver-name-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-1); cursor: default; }
.sb-led-ver-name-l .dim { color: var(--fg-3); }
.sb-led-ver-acts { display: flex; gap: 4px; flex: none; }
.sb-led-ver-acts button {
  border: 1px solid var(--line-strong); background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); padding: 3px 8px;
}
.sb-led-ver-acts button:hover { background: var(--sb-ink); color: var(--sb-bone); border-color: var(--sb-ink); }
.sb-led-ver-acts button.danger:hover { background: #A72A1D; border-color: #A72A1D; }
.sb-led-ver-empty { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); padding: 8px 2px; }

/* ── Canvas block edit chrome ────────────────────────────────────────────── */
.lb-canvas.lb-edit .lb-cv-el.is-editable { cursor: grab; }
.lb-canvas.lb-edit .lb-cv-el.is-editable:active { cursor: grabbing; }
.lb-canvas.lb-edit .lb-cv-el.is-editable:hover { outline: 1px dashed rgba(22,20,15,0.45); outline-offset: 2px; }
.lb-cv-el.is-selected { outline: 1px solid var(--sb-ink) !important; outline-offset: 2px; }
/* floating bar sits above the element, chapter-style */
.lb-cv-tools { left: 0; transform: none; top: -38px; z-index: 20; }
/* reveal on hover (chapter language) and pin while the element is selected */
.lb-cv-el:hover .lb-cv-tools, .lb-cv-el.is-selected .lb-cv-tools, .lb-cv-tools:hover { opacity: 1; pointer-events: auto; }
/* colour chips in the bar */
.lb-cv-chip {
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(236,232,224,0.5);
  padding: 0; cursor: pointer; flex: none;
}
.lb-cv-chip.is-on { outline: 2px solid var(--sb-bone); outline-offset: 1px; }
.lb-cv-chip-custom { position: relative; overflow: hidden; background: conic-gradient(#e33, #ee3, #3e6, #36e, #e3e, #e33); display: inline-block; }
.lb-cv-chip-custom input { position: absolute; inset: -4px; opacity: 0; cursor: pointer; }
.lb-cv-font { min-width: 52px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; }
.lb-cv-el .lb-tbox-h { z-index: 12; }
.lb-cv-empty {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3;
  border: 1px dashed var(--line-strong); color: var(--fg-3);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
}
.lb-cv-svg-loading { color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; }
.lb-cv-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  pointer-events: none;
}
/* inspector: element list + colour swatches */
.sb-cv-add { display: flex; gap: 6px; margin-bottom: 8px; }
.sb-cv-add .sb-insp-add { flex: 1; text-align: center; }
.sb-cv-els { display: flex; flex-direction: column; }
.sb-cv-el-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px; cursor: pointer;
  border-bottom: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: 11px; color: var(--fg-2);
}
.sb-cv-el-row.is-on { background: var(--bg-2); color: var(--fg-1); }
.sb-cv-el-t { flex: none; width: 16px; text-align: center; color: var(--fg-3); }
.sb-cv-el-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-cv-el-acts { display: flex; gap: 2px; }
.sb-cv-el-acts button {
  border: none; background: none; cursor: pointer; color: var(--fg-3); font-size: 11px; padding: 2px 5px;
}
.sb-cv-el-acts button:hover { color: var(--fg-1); }
.sb-cv-el-acts button.danger:hover { color: #A72A1D; }
.sb-cv-colors { display: flex; align-items: center; gap: 6px; }
.sb-cv-swatch { width: 22px; height: 22px; border: 1px solid var(--line-strong); cursor: pointer; padding: 0; }
.sb-cv-swatch.is-on { outline: 2px solid var(--sb-ink); outline-offset: 1px; }
.sb-cv-colors input[type="color"] { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line-strong); background: none; cursor: pointer; }

/* canvas snap guides (Figma red lines) + draggable layer rows */
.lb-cv-guide { position: absolute; z-index: 40; background: #E0483B; pointer-events: none; }
.lb-cv-guide-v { top: 0; bottom: 0; width: 1px; }
.lb-cv-guide-h { left: 0; right: 0; height: 1px; }
.sb-cv-el-row { cursor: grab; }
.sb-cv-el-row.is-dragging { opacity: 0.45; }
.sb-cv-el-row .sb-led-grip { flex: none; }

/* ── concept-page canvases: borrowed lookbook canvas editor chrome ── */
/* floating inspector — same skin as the lookbook one, but a panel that hugs
   the right edge of the viewport only while a canvas block is selected */
.cc-insp {
  /* sits left of the 56px order rail so neither hides the other */
  position: fixed; right: 66px; top: calc(38px + 60px); bottom: 24px; width: 264px;
  z-index: 920; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 48px rgba(22, 20, 15, 0.18);
  font-family: var(--font-mono); color: var(--fg-1);
}
.cc-insp-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.cc-insp-head button { background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1; color: var(--fg-3); }
.cc-insp-head button:hover { color: var(--fg-1); }
/* add-a-section button — same voice as the editor's + chips */
.cc-add {
  align-self: flex-start;
  background: transparent; border: 1px dashed var(--line-strong); cursor: pointer;
  padding: 10px 16px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
}
.cc-add:hover { color: var(--fg-1); border-color: var(--fg-1); }
/* per-section move chips (top-right of each canvas while editing) */
.cc-move {
  position: absolute; top: 8px; right: 8px; z-index: 30;
  display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s ease;
}
.concept-canvas:hover .cc-move { opacity: 1; }
.cc-move button {
  background: var(--bg-1); border: 1px solid var(--line-strong); cursor: pointer;
  width: 24px; height: 24px; font-family: var(--font-mono); font-size: 12px;
  line-height: 1; color: var(--fg-2); display: flex; align-items: center; justify-content: center;
}
.cc-move button:hover { color: var(--fg-1); }

/* ── gate page inside the mobile device frame: reproduce the phone media query
      (the frame's vw is the real window, so @media(600) never fires here) ── */
.app.is-device-mobile .gate2-top { padding: 22px 20px 0; }
.app.is-device-mobile .gate2-low { padding: 0 20px 30px; gap: 26px; }
.app.is-device-mobile .gate2-hero { font-size: 44px; }
.app.is-device-mobile .gate2-fields { gap: 16px; }
.app.is-device-mobile .gate2-input { width: 136px; }

/* device-mobile frame mirrors of the PDP phone rules (real vw ≠ frame width) */
.app.is-device-mobile .pp-shots {
  flex-direction: row; gap: 10px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 0 16px;
}
.app.is-device-mobile .pp-shots::-webkit-scrollbar { display: none; }
.app.is-device-mobile .pp-shots .pp-frame { flex: 0 0 88%; scroll-snap-align: center; }
.app.is-device-mobile .pp-shots .pp-frame-natural { display: flex; align-items: center; }
.app.is-device-mobile .pp-shots .pp-frame-add { flex: 0 0 40%; height: auto; }
.app.is-device-mobile .cp-prods.is-bare {
  flex-wrap: nowrap; justify-content: flex-start;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px;
}
.app.is-device-mobile .cp-prods.is-bare .cp-prod { flex: 0 0 96px; }
