/* =====================================================================
   CHERUB WAITLIST · HERO WARDROBE
   A CSS 3D wardrobe in navy-painted oak with brass hardware and
   photographed pieces. Materials and size are the --wd-* tokens in
   tokens.css. Positions below are in px on an 840 × 640 scene that
   js/wardrobe.js scales to fit the screen.

   Inside the wardrobe (px from the top, set on .wardrobe below):
     0 – --y-shelf    hanging rail and dresses
     --y-shelf        shelf board between dresses and shoes
     --y-floor        floor the shoes stand on (bottom of the doors)
     then             jewellery drawer (64px), plinth (26px), feet
   ===================================================================== */

.hero--wardrobe { padding-bottom: clamp(56px, 8vw, 104px); }
/* Space above the headline, as a share of the screen height, so the headline sits near eye level */
.hero--wardrobe { padding-top: clamp(40px, 16vh, 200px); }
.hero--wardrobe .hero__title { font-size: clamp(2.25rem, 1.3rem + 2.6vw, 3.375rem); } /* caps at 54px from about 1280px wide */
.hero--wardrobe .hero__lead { margin-top: var(--space-md); }
.hero--wardrobe .join { margin-top: var(--space-lg); max-width: 75%; } /* 6 of the hero text's 8 columns */
@media (max-width: 560px) { .hero--wardrobe .join { max-width: 100%; } }
.hero--wardrobe .fineprint { margin-top: 0; }
/* Cherub mark in the middle of the nav bar */
.nav__inner { position: relative; }
.nav__cherub { position: absolute; left: 50%; top: 50%; width: clamp(60px, 6vw, 78px); height: auto; translate: -50% -50%; pointer-events: none; }

/* ---------- Stage ---------------------------------------------------- */
.stage {
  --scene-w: 840px; --scene-h: 640px; --scene-fit: 840;
  position: relative; width: 100%; max-width: 1440px; margin: clamp(40px, 10vh, 120px) auto 0; /* gap below the sign-up form */
  height: calc(var(--scene-h) * var(--s, 1)); overflow-x: clip;
}
/* --shift and --zoom are set by js/wardrobe.js when the close-up opens:
   the wardrobe glides right and grows a little (wardrobe.lookZoom). */
.scene {
  --zoom-y: 310px; /* zoom around the middle of the wardrobe */
  position: absolute; z-index: 12; left: 50%; top: 0; width: var(--scene-w); height: var(--scene-h); margin-left: calc(var(--scene-w) / -2);
  transform: translateX(var(--shift, 0px)) scale(var(--s, 1)) translateY(var(--zoom-y)) scale(calc(var(--zoom, 1) * var(--grow, 1))) translateY(calc(var(--zoom-y) * -1));
  transform-origin: 50% 0; perspective: 1500px; perspective-origin: 50% 36%;
  transition: transform 0.8s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.4s ease;
}
/* ---------- Floor --------------------------------------------------- */
/* A flat grid lying on the floor at the wardrobe's feet (572px down the scene). It has its own
   camera (perspective on .floor) so its lines run to a vanishing point behind the wardrobe.
   It fades out towards you, towards the back and to the sides, and spreads out from under
   the wardrobe as --floor (set by js/wardrobe.js) goes from 0 to 1. */
@property --floor { syntax: '<number>'; inherits: true; initial-value: 0; }
/* Clipped at the page grid's outer edges (the left and right margins), but free above and below */
.floor-clip {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 1; pointer-events: none; translate: -50% 0;
  width: min(100% - 2 * var(--gutter), var(--content-max)); overflow-x: clip; overflow-y: visible;
}
/* The copy of the scene: same size, place and movement as the wardrobe's, but behind it */
.scene--floor { z-index: auto; pointer-events: none; }
.stage { transition: --floor 0.7s ease-out; }
.motion-off .stage { transition: none; }
.floor {
  --floor-line: rgba(36, 56, 255, 0.22);  /* grid line colour */
  --floor-cell: 64px;                     /* grid square size */
  --floor-eye: 300px;                     /* camera height, px down the scene; the horizon sits here */
  position: absolute; inset: 0; pointer-events: none;
  perspective: 720px; perspective-origin: 50% var(--floor-eye);
}
.floor__plane {
  position: absolute; left: 50%; top: calc(572px - 2200px); width: 3600px; height: 2460px; margin-left: -1800px;
  transform-origin: 50% 2200px; transform: rotateX(90deg);
  background-image:
    linear-gradient(to right, var(--floor-line) 2px, transparent 2px),
    linear-gradient(to bottom, var(--floor-line) 2px, transparent 2px);
  background-size: var(--floor-cell) var(--floor-cell);
  background-position: calc(50% + var(--floor-cell) / 2) 2200px;
  /* Spread from the feet outwards, and fade to nothing at the back and in front */
  --r: calc(var(--floor, 0) * 1px);
  -webkit-mask-image:
    radial-gradient(ellipse calc(var(--r) * 1500) calc(var(--r) * 1400) at 50% 2200px, #000 25%, rgba(0, 0, 0, 0.5) 60%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 72%, #000 89.4%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse calc(var(--r) * 1500) calc(var(--r) * 1400) at 50% 2200px, #000 25%, rgba(0, 0, 0, 0.5) 60%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 72%, #000 89.4%, transparent 100%);
  mask-composite: intersect;
}
.scene__shadow {
  position: absolute; left: 50%; top: 574px; width: 660px; height: 44px; margin-left: -330px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(10, 16, 50, calc(0.28 * var(--shadow-strength))), rgba(10, 16, 50, 0) 70%);
}

/* ---------- Carcass -------------------------------------------------- */
.wardrobe {
  --y-shelf: 334px;   /* raise for a taller dress section */
  --y-floor: 432px;   /* shoe floor; the doors end here    */
  --y-drawer: calc(var(--y-floor) + 7px);
  --y-plinth: calc(var(--y-floor) + 72px);
  position: absolute; left: calc((var(--scene-w) - var(--wd-w)) / 2); top: 40px; width: var(--wd-w); height: var(--wd-h);
  transform-style: preserve-3d; transform-origin: 50% 50% calc(var(--wd-d) / -2);
  transform: rotateX(var(--rx, -6deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s var(--ease-out);
  pointer-events: none; /* only items, doors and the drawer front take clicks */
}
.wardrobe * { box-sizing: border-box; }
.wd-item, .drawer__front, .wardrobe:not(.is-open) .door { pointer-events: auto; }
.wd-face, .wd-frame, .wd-rail, .wd-foot, .wd-items, .door, .drawer, .drawer__tray { position: absolute; }

/* Painted oak: texture, tint, then light and shade per face */
.wd-face, .wd-frame, .wd-foot, .door__face--out, .drawer__front {
  background-color: #141d4a;
  background-size: cover; background-position: center;
}
.wd-back {
  left: 0; top: 0; width: 100%; height: var(--y-floor); transform: translateZ(calc(var(--wd-d) * -1));
  background-image:
    radial-gradient(ellipse 62% 24% at 50% 0%, rgba(255, 236, 205, 0.34), rgba(255, 236, 205, 0) 78%),
    radial-gradient(ellipse 62% 18% at 50% calc(var(--y-shelf) + 4px), rgba(255, 236, 205, 0.2), rgba(255, 236, 205, 0) 78%),
    linear-gradient(to bottom, rgba(3, 7, 30, 0) 40%, rgba(3, 7, 30, 0.28)),
    linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood);
  box-shadow: inset 0 0 70px rgba(2, 5, 25, 0.6);
}
.wd-side { top: 0; width: var(--wd-d); height: 100%; }
.wd-side--left {
  left: 0; transform-origin: 0 50%; transform: rotateY(90deg);
  background-image: linear-gradient(to right, rgba(140, 160, 230, 0.10), rgba(2, 5, 25, 0.45)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h);
}
.wd-side--right {
  left: calc(100% - var(--wd-d)); transform-origin: 100% 50%; transform: rotateY(-90deg);
  background-image: linear-gradient(to left, rgba(140, 160, 230, 0.08), rgba(2, 5, 25, 0.4)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h);
}
.wd-top {
  left: 0; top: 0; width: 100%; height: var(--wd-d); transform-origin: 50% 0; transform: rotateX(-90deg);
  background-image: linear-gradient(to bottom, rgba(2, 5, 25, 0.35), rgba(255, 236, 205, 0.22)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h);
}
/* Horizontal boards facing up, at the y given by their top + depth */
.wd-plane {
  left: 0; width: 100%; height: var(--wd-d); transform-origin: 50% 100%; transform: rotateX(90deg);
  background-image: linear-gradient(to bottom, rgba(2, 5, 25, 0.5), rgba(160, 180, 245, 0.12)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h);
}
.wd-plane--shelf { top: calc(var(--y-shelf) - var(--wd-d)); }
.wd-plane--floor { top: calc(var(--y-floor) - var(--wd-d)); }
/* Hanging rail: brushed nickel tube */
.wd-rail { left: 14px; right: 14px; top: 24px; height: 7px; transform: translateZ(calc(var(--wd-d) * -0.5)); transform-style: preserve-3d; }
.wd-rail span { position: absolute; inset: 0; border-radius: 4px; background: var(--wd-rail); box-shadow: 0 3px 5px rgba(0, 3, 20, calc(0.5 * var(--shadow-strength))); }

/* Front frame: a little proud of the carcass, with soft bevels */
.wd-frame {
  transform: translateZ(1px);
  background-image: linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood);
  box-shadow: inset 1px 1px 0 rgba(170, 190, 255, 0.22), inset -1px -1px 0 rgba(0, 2, 15, 0.55);
}
.wd-frame--top { left: 0; top: 0; width: 100%; height: 12px; background-image: linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h); }
.wd-frame--shelf { left: 0; top: calc(var(--y-shelf) - 4px); width: 100%; height: 8px; background-image: linear-gradient(to bottom, rgba(170, 190, 255, 0.22), rgba(0, 2, 15, 0.3)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h); }
.wd-frame--mid { left: 0; top: var(--y-floor); width: 100%; height: 7px; background-image: linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h); }
.wd-frame--left { left: 0; top: 0; width: 12px; height: 100%; }
.wd-frame--right { left: calc(100% - 12px); top: 0; width: 12px; height: 100%; }
.wd-frame--plinth {
  left: 0; top: var(--y-plinth); width: 100%; height: 26px;
  background-image: linear-gradient(to bottom, rgba(170, 190, 255, 0.14), rgba(0, 2, 15, 0.35)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h);
}
.wd-foot {
  top: calc(var(--y-plinth) + 25px); width: 26px; height: 14px; border-radius: 0 0 5px 5px; transform: translateZ(-6px);
  background-image: linear-gradient(to bottom, rgba(0, 2, 15, 0.5), rgba(0, 2, 15, 0.15)), var(--wd-wood);
}
.wd-foot--left { left: 18px; }
.wd-foot--right { left: calc(100% - 44px); }

/* ---------- Items (built by js/wardrobe.js) -------------------------- */
.wd-items { inset: 0; transform-style: preserve-3d; pointer-events: none; }
.wd-item {
  position: absolute; display: grid; place-items: end center; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
  transform: translateZ(var(--z, 0px)) rotateY(var(--r, 0deg)); -webkit-tap-highlight-color: transparent;
}
.wd-item:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.wd-item img {
  display: block; width: var(--iw); height: var(--ih); max-width: none; pointer-events: none; user-select: none;
  filter: drop-shadow(0 6px 6px rgba(0, 3, 25, calc(0.5 * var(--shadow-strength)))) drop-shadow(0 1px 1px rgba(0, 3, 25, calc(0.4 * var(--shadow-strength))));
  transition: transform 0.6s var(--ease-out), filter 0.3s ease;
}
.wd-item--dress { place-items: start center; }
.wd-item--dress img { transform-origin: 50% 3%; filter: drop-shadow(7px 14px 12px rgba(0, 3, 25, calc(0.6 * var(--shadow-strength)))) drop-shadow(0 1px 1px rgba(0, 3, 25, calc(0.35 * var(--shadow-strength)))); }
.wd-item--dress:hover img, .wd-item--dress:focus-visible img { transform: rotate(2.5deg); }
.wd-item--shoes::before {
  content: ""; position: absolute; left: 12%; right: 8%; bottom: -3px; height: 9px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 3, 25, calc(0.6 * var(--shadow-strength))), rgba(0, 3, 25, 0) 70%);
}
.wd-item--shoes:hover img, .wd-item--accessory:hover img,
.wd-item--shoes:focus-visible img, .wd-item--accessory:focus-visible img { transform: translateY(-5px); }
.wd-item.is-picked img { filter: drop-shadow(0 0 4px var(--wd-picked-glow)) drop-shadow(0 0 1px var(--wd-picked-glow)); }
.wd-item.is-bagged::after {
  content: ""; position: absolute; z-index: 2; top: -6px; right: -4px; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, calc(0.3 * var(--shadow-strength)));
  background: var(--color-cobalt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.5l2.6 2.6L11 4.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.wd-item--dress.is-bagged::after { top: 40px; right: 30%; }
.wd-item.is-hinted img { animation: wd-hint 0.9s var(--ease-in-out) 2; }
@keyframes wd-hint { 50% { transform: translateY(-8px); filter: drop-shadow(0 0 5px var(--wd-picked-glow)); } }

/* ---------- Jewellery drawer ----------------------------------------- */
.drawer {
  --dd: calc(var(--wd-d) - 30px);
  left: 14px; top: var(--y-drawer); width: calc(100% - 28px); height: 64px; transform-style: preserve-3d;
  transform: translateZ(calc(var(--drawer-open, 0) * var(--drawer-pull, 140px)));
  transition: transform 0.7s var(--ease-out);
}
.drawer.is-open { --drawer-open: 1; }
.drawer__side { top: 0; width: var(--dd); height: 100%; background-image: linear-gradient(to right, rgba(170, 190, 255, 0.1), rgba(0, 2, 15, 0.45)), var(--wd-wood-h); }
.drawer__side--left { left: 0; transform-origin: 0 50%; transform: rotateY(90deg); }
.drawer__side--right { left: calc(100% - var(--dd)); transform-origin: 100% 50%; transform: rotateY(-90deg); background-image: linear-gradient(to left, rgba(170, 190, 255, 0.1), rgba(0, 2, 15, 0.45)), var(--wd-wood-h); }
.drawer__back { left: 0; top: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--dd) * -1)); background-image: linear-gradient(rgba(0, 2, 15, 0.4), rgba(0, 2, 15, 0.4)), var(--wd-wood-h); }
.drawer__bottom { left: 0; top: calc(100% - var(--dd)); width: 100%; height: var(--dd); transform-origin: 50% 100%; transform: rotateX(90deg); background: #1c2a86 var(--wd-velvet) center / cover; }
.drawer__tray {
  inset: 0; transform-style: preserve-3d;
  transform: translateY(calc(var(--drawer-open, 0) * var(--tray-lift, 40px) * -1));
  transition: transform 0.6s var(--ease-out) 0.2s;
}
/* Velvet display board leaning back inside the drawer */
.drawer__board {
  position: absolute; left: 8px; right: 8px; bottom: 6px; height: 100px; transform-style: preserve-3d;
  transform-origin: 50% 100%; transform: translateZ(-30px) rotateX(52deg);
  background: #1c2a86 var(--wd-velvet) center / cover; border-radius: 4px;
  box-shadow: inset 0 0 18px rgba(5, 10, 50, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 0 0 1.5px #c9a24f;
  opacity: 0; transition: opacity 0.25s ease 0.45s; /* out of sight while the drawer is shut */
}
.drawer.is-open .drawer__board { opacity: 1; transition-delay: 0s; }
.drawer__front {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 0; border: 0; cursor: pointer; transform: translateZ(1px); -webkit-tap-highlight-color: transparent;
  background-image: linear-gradient(to bottom, rgba(170, 190, 255, 0.14), rgba(0, 2, 15, 0.2)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood-h);
  box-shadow: inset 1px 1px 0 rgba(170, 190, 255, 0.25), inset -1px -1px 0 rgba(0, 2, 15, 0.6), 0 0 0 1px rgba(0, 2, 15, 0.4);
}
.drawer__front:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Brass bar pull */
.drawer__handle {
  position: relative; width: 92px; height: 9px; border-radius: 5px; background: var(--wd-brass);
  box-shadow: 0 3px 5px rgba(0, 2, 15, calc(0.55 * var(--shadow-strength))), inset 0 1px 0 rgba(255, 255, 255, 0.6); transition: transform 0.3s ease;
}
.drawer__handle::before, .drawer__handle::after { content: ""; position: absolute; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--wd-brass); box-shadow: 0 2px 2px rgba(0, 2, 15, calc(0.45 * var(--shadow-strength))); }
.drawer__handle::before { left: 6px; } .drawer__handle::after { right: 6px; }
.drawer__front:hover .drawer__handle { transform: translateY(1px); }

/* ---------- Doors ---------------------------------------------------- */
/* --door-open (0 to 1) is set by js/wardrobe.js as the page scrolls */
.door {
  top: 0; width: 50%; height: var(--y-floor); transform-style: preserve-3d; cursor: pointer;
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.door--left { left: 0; transform-origin: 0 50%; transform: translateZ(2px) rotateY(calc(var(--door-angle, 112deg) * var(--door-open, 0) * -1)); }
.door--right { left: 50%; transform-origin: 100% 50%; transform: translateZ(2px) rotateY(calc(var(--door-angle, 112deg) * var(--door-open, 0))); }
.wardrobe.is-open .door { cursor: default; }
.wardrobe.is-instant, .wardrobe.is-instant .door { transition: none; }
.door__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.door__face--out {
  background-image: linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood);
  box-shadow: inset 1px 1px 0 rgba(170, 190, 255, 0.22), inset -1px -1px 0 rgba(0, 2, 15, 0.6), 0 0 0 1px rgba(0, 2, 15, 0.4);
}
.door__face--in {
  transform: rotateY(180deg);
  background: #121a42 var(--wd-wood) center / cover;
  background-image: linear-gradient(rgba(0, 2, 15, 0.25), rgba(0, 2, 15, 0.25)), linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood);
}
/* Shaker panel: a recessed field with bevelled edges */
.door__panel {
  position: absolute; inset: 22px 16px; border-radius: 2px;
  background-image: linear-gradient(var(--wd-wash), var(--wd-wash)), var(--wd-wood); background-size: cover;
  box-shadow: inset 2px 2px 5px rgba(0, 2, 15, 0.6), inset -2px -2px 3px rgba(170, 190, 255, 0.18), 0 0 0 1px rgba(170, 190, 255, 0.12);
}
/* Brass knob */
.door__knob {
  position: absolute; top: 51%; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c8 0%, #e1bf6c 30%, #a57c2c 70%, #6f5016 100%);
  box-shadow: 0 3px 5px rgba(0, 2, 15, calc(0.6 * var(--shadow-strength)));
}
.door--left .door__knob { right: 6px; }
.door--right .door__knob { left: 6px; }
.door__mirror {
  position: absolute; inset: 24px 18px; border-radius: 90px 90px 4px 4px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.5) 42%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(160deg, #eef0f4 0%, #c9ced9 45%, #b3b9c6 70%, #dde1e8 100%);
  box-shadow: inset 0 0 0 3px #c9a24f, inset 0 0 0 4px rgba(0, 2, 15, 0.35), inset 0 0 24px rgba(10, 20, 60, 0.3);
}

/* ---------- Hint ----------------------------------------------------- */
/* Sits in the gap above the wardrobe's top-left corner, so the open doors never cover it */
.stage__hint {
  position: absolute; z-index: 5; top: -78px; left: max(4px, calc(50% - 240px * var(--s, 1) - 170px)); width: 200px; margin: 0;
  font-size: 1.7rem; line-height: 1.05; transform: rotate(-4deg); pointer-events: none; transition: opacity 0.3s ease;
}
.stage__hint-arrow { display: block; width: 60px; height: 40px; margin: 2px 0 0 110px; }
.stage.is-looking .stage__hint { opacity: 0; }

/* ---------- Look panel (the close-up) -------------------------------- */
/* Icons in the look panel (Phosphor, Regular weight) */
.slot-icon { display: block; width: 22px; height: 22px; fill: #3a3d42; }
.look-chip {
  position: absolute; z-index: 16; top: 4px; right: max(8px, calc(50% - 420px * var(--s, 1)));
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 14px; border: 0; border-radius: var(--radius-pill);
  background: var(--color-surface); box-shadow: inset 0 0 0 var(--border) var(--color-line), 0 10px 24px -14px rgba(23, 24, 27, calc(0.4 * var(--shadow-strength)));
  font: 600 14px/1 var(--font-ui); color: var(--color-ink); cursor: pointer;
}
.look-chip span { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--color-cobalt); color: #fff; font-size: 12px; }
.look-backdrop { display: none; }
/* Desktop: the close-up is a frosted-glass panel on the left of the stage */
.look {
  position: absolute; z-index: 20; left: 24px; top: 50%; width: 360px; max-height: calc(100% - 16px); overflow: auto;
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 26px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6); backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.25), 0 30px 60px -26px rgba(10, 18, 60, calc(0.45 * var(--shadow-strength)));
  opacity: 0; transform: translate(-28px, -50%); transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.22, 0.8, 0.2, 1);
}
.look.is-open { opacity: 1; transform: translate(0, -50%); }
.look__head { display: flex; align-items: center; gap: 10px; }
.look__title { margin-right: auto; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 26px; letter-spacing: -0.02em; outline: none; }
.look__bag { display: none; position: relative; width: 30px; height: 40px; }
.look__bag img { width: 100%; height: 100%; object-fit: contain; }
.look__bag b { position: absolute; left: 50%; top: 64%; translate: -50% -50%; font-size: 11px; color: var(--color-cobalt); }
.look__close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); cursor: pointer; }
.look__close svg { width: 14px; height: 14px; fill: none; stroke: var(--color-ink); stroke-width: 1.8; stroke-linecap: round; }
.look__close:hover { background: rgba(255, 255, 255, 0.85); }

.slot-remove {
  position: absolute; top: -6px; right: -6px; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%; background: var(--color-ink); color: #fff; cursor: pointer;
}
.slot-remove svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* The look as a canvas, laid out like the app's V13 look builder: the dress large in the
   middle, accessories at the top corners and bottom left, shoes at the bottom right.
   Pieces sit straight on the glass as cut-outs. Spot sizes are px inside the 330px-wide canvas. */
.look__canvas { position: relative; flex: none; height: 424px; }
.spot { position: absolute; }
.spot--dress { left: 50%; top: 0; width: 176px; height: 306px; translate: -50% 0; }
.spot--acc-0 { left: 0; top: 12px; width: 92px; height: 92px; }
.spot--acc-1 { right: 0; top: 12px; width: 92px; height: 92px; }
.spot--acc-2 { left: 0; bottom: 0; width: 120px; height: 106px; }
.spot--shoes { right: 0; bottom: 0; width: 146px; height: 110px; }
.spot__piece { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; }
.spot__media { display: block; width: 100%; height: 100%; }
.spot__media img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(10, 18, 60, calc(0.24 * var(--shadow-strength)))) drop-shadow(0 1px 1px rgba(10, 18, 60, calc(0.2 * var(--shadow-strength))));
  transition: transform 0.3s var(--ease-out);
}
.spot__piece:hover img, .spot__piece:focus-visible img { transform: translateY(-3px); }
.spot__piece:focus-visible { outline: 2px solid var(--color-cobalt); outline-offset: 4px; }
/* Price tag: the piece's name and price, shown while you hover or focus it. Left-hand spots
   align it to their left edge and right-hand spots to their right, so it stays in the panel. */
.spot__tag {
  position: absolute; z-index: 3; bottom: -6px; left: 50%; translate: -50% 4px; display: flex; align-items: baseline; gap: 6px;
  max-width: 220px; padding: 6px 10px; border-radius: 999px; background: var(--color-ink); color: #fff;
  font-size: 12px; line-height: 16px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.18s ease, translate 0.25s var(--ease-out);
  box-shadow: 0 6px 14px -6px rgba(10, 18, 60, calc(0.5 * var(--shadow-strength)));
}
.spot__tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, 0.82); }
.spot__tag b { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.spot--acc-0 .spot__tag, .spot--acc-2 .spot__tag { left: 0; translate: 0 4px; }
.spot--acc-1 .spot__tag, .spot--shoes .spot__tag { left: auto; right: 0; translate: 0 4px; }
.spot--dress .spot__tag { bottom: 8px; }
.spot:has(.spot__piece:hover) .spot__tag, .spot:has(.spot__piece:focus-visible) .spot__tag { opacity: 1; translate: -50% 0; }
.spot--acc-0:has(.spot__piece:hover) .spot__tag, .spot--acc-2:has(.spot__piece:hover) .spot__tag,
.spot--acc-1:has(.spot__piece:hover) .spot__tag, .spot--shoes:has(.spot__piece:hover) .spot__tag,
.spot--acc-0:has(.spot__piece:focus-visible) .spot__tag, .spot--acc-2:has(.spot__piece:focus-visible) .spot__tag,
.spot--acc-1:has(.spot__piece:focus-visible) .spot__tag, .spot--shoes:has(.spot__piece:focus-visible) .spot__tag { translate: 0 0; }
/* Touch screens have no hover, so the tags show all the time, a little smaller */
@media (hover: none) {
  .spot__tag { opacity: 1; translate: -50% 0; padding: 4px 8px; font-size: 11px; max-width: 160px; }
  .spot--acc-0 .spot__tag, .spot--acc-2 .spot__tag, .spot--acc-1 .spot__tag, .spot--shoes .spot__tag { translate: 0 0; }
  .spot__tag span { display: none; }
}
.spot--dress .slot-remove { top: 4px; right: 18px; }
/* Empty spots: thin dashed outline and a grey icon box; a little greyer on hover */
.slot-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; padding: 6px;
  border: 1px dashed rgba(23, 24, 27, 0.22); border-radius: 16px; background: rgba(255, 255, 255, 0.14); cursor: pointer;
  text-align: center; font-size: 12px; line-height: 15px; color: var(--color-ink-muted); transition: background-color var(--dur-fast) ease;
}
.slot-empty:hover, .slot-empty:focus-visible { background: rgba(23, 24, 27, 0.06); }
.slot-empty:focus-visible { outline: 2px solid var(--color-cobalt); outline-offset: 2px; }
.slot-empty b { display: block; font-weight: 600; font-size: 13px; color: var(--color-ink); }
.slot-empty small { display: block; font-size: 12px; }
.slot-empty__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; background: rgba(23, 24, 27, 0.07); }
.spot--dress .slot-empty { gap: 10px; }
.spot--dress .slot-empty__icon { width: 64px; height: 64px; border-radius: 16px; }
.spot--dress .slot-empty__icon .slot-icon { width: 30px; height: 30px; }
.spot--acc-0 .slot-empty small, .spot--acc-1 .slot-empty small { display: none; }

.look__foot { display: grid; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(23, 24, 27, 0.12); }
.look__total { display: grid; gap: 2px; margin: 0; font-size: 13px; line-height: 18px; color: var(--color-ink-muted); font-variant-numeric: tabular-nums; }
.look__total-label { font-size: 13px; line-height: 16px; color: var(--color-ink-muted); }
.look__total-price { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 28px; letter-spacing: -0.02em; color: var(--color-ink); }
.look__add { width: 100%; }
/* Secondary: glass button under Add to bag */
.look__more { width: 100%; height: 44px; background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 1px rgba(23, 24, 27, 0.14); color: var(--color-ink); }
.look__more:hover { background: rgba(255, 255, 255, 0.8); color: var(--color-ink); }

/* ---------- Bag (inside the scene, so it moves and scales with it) ---- */
.bag {
  --bag-x: 330px; /* from the middle of the wardrobe */
  position: absolute; z-index: 2; width: 124px; aspect-ratio: 576 / 760; left: calc(50% + var(--bag-x)); top: 424px;
}
.bag__img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 14px rgba(10, 16, 50, calc(0.3 * var(--shadow-strength)))) drop-shadow(0 2px 2px rgba(10, 16, 50, calc(0.22 * var(--shadow-strength)))); }
.bag__count {
  position: absolute; left: 50%; top: 66%; translate: -50% -50%; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 999px; background: var(--color-cobalt); color: #fff; font: 700 14px/1 var(--font-ui); font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(20, 30, 120, calc(0.35 * var(--shadow-strength)));
}
.bag-prompt {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  width: min(560px, calc(100% - 32px)); margin: 8px auto 0; padding: 12px 14px 12px 18px; border-radius: 18px;
  background: var(--color-surface); box-shadow: inset 0 0 0 var(--border) var(--color-line-soft), 0 16px 32px -20px rgba(23, 24, 27, calc(0.35 * var(--shadow-strength)));
}
.bag-prompt p { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 20px; color: var(--color-ink-muted); }
.bag-prompt b { color: var(--color-ink); }
.bag-prompt .btn { height: 42px; padding: 0 18px; font-size: 14px; }
.has-joined .bag-prompt { display: none !important; }

/* ---------- Flying pieces (into the bag, whole) ---------------------- */
.wd-ghost, .flyer { position: fixed; z-index: 300; pointer-events: none; margin: 0; }
.wd-ghost img { width: 100%; height: 100%; object-fit: contain; }
.flyer { background: center / contain no-repeat; transform-origin: 50% 50%; filter: drop-shadow(0 8px 10px rgba(10, 16, 50, calc(0.3 * var(--shadow-strength)))); }

/* ---------- Smaller screens ------------------------------------------ */
/* Below 1100px the close-up opens as a glass sheet from the bottom */
@media (max-width: 1099px) {
  .stage__hint { position: static; width: auto; margin: 0 auto 2px; text-align: center; transform: none; font-size: 1.3rem; }
  .stage__hint br, .stage__hint-arrow { display: none; }
  .stage { height: calc(var(--scene-h) * var(--s, 1) + 30px); }
  .scene { top: 30px; }
  .look-chip { top: 34px; }
  .stage.is-looking .scene { opacity: 0.55; pointer-events: none; }
  .look-backdrop { display: block; position: fixed; inset: 0; z-index: 140; background: rgba(10, 16, 50, 0.32); opacity: 0; transition: opacity 0.3s ease; }
  .look-backdrop.is-open { opacity: 1; }
  .look {
    position: fixed; z-index: 150; left: 50%; right: auto; top: auto; bottom: 0; width: min(100%, 460px); max-height: 90vh;
    padding: 14px max(16px, env(safe-area-inset-left, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
    border-radius: 26px 26px 0 0; border-bottom: 0; transform: translate(-50%, 100%); opacity: 1;
    background: var(--glass-fill-sheet);
  }
  .look.is-open { transform: translate(-50%, 0); }
  .look__bag { display: block; }
}
@media (max-width: 700px) {
  .hero--wardrobe { padding-top: clamp(32px, 11vh, 96px); }
  .stage { --scene-fit: 640; margin-top: 36px; }
  .bag { --bag-x: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .wardrobe, .door, .drawer, .drawer__tray, .look, .wd-item img { transition: none; }
  .wd-item.is-hinted img { animation: none; }
}
.motion-off .wardrobe, .motion-off .door, .motion-off .drawer, .motion-off .drawer__tray { transition: none; }
