/* Tintame · wall lab v4: everything happens in the picture */
.lab { padding: clamp(96px, 14vh, 150px) var(--gutter) clamp(64px, 10vh, 120px); }
.lab__head { max-width: 62ch; margin-bottom: clamp(20px, 3vh, 32px); }

/* room + furniture: two quiet segmented rows */
.lab__pick { display: grid; gap: .55rem; margin: 0 0 1rem; }
.seg-row { display: inline-flex; justify-self: start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: .3rem; padding: .25rem; border-radius: 999px; background: rgba(46, 18, 11, .08); max-width: 100%; }
.seg { font: inherit; font-size: .95rem; line-height: 1; padding: .66em 1.05em; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; white-space: nowrap;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.seg[aria-pressed="true"] { background: #fbf8f2; color: var(--ink-terracotta); box-shadow: 0 1px 3px rgba(46, 18, 11, .25); }
.seg-row--sub { background: transparent; padding: 0; gap: .15rem; }
.seg-row--sub .seg { font-size: .88rem; padding: .5em .8em; opacity: .8; }
.seg-row--sub .seg[aria-pressed="true"] { opacity: 1; background: transparent; box-shadow: inset 0 -2px 0 var(--ink-terracotta); border-radius: 0; padding-bottom: .55em; }

/* the stage */
.lab__stage { position: relative; box-sizing: content-box; aspect-ratio: 1600 / 1073; overflow: visible; background: #cfc3b2; border: clamp(7px, .85vw, 13px) solid #fbf8f2; box-shadow: 0 1.2vw 2.4vw -1vw rgba(35, 15, 6, .45); cursor: pointer; touch-action: manipulation; max-width: 1180px; }
.lab__scene { position: absolute; inset: 0; overflow: hidden; --dir: 1; --zoom: 1; transition: transform .42s cubic-bezier(.4, 0, .2, 1), opacity .42s ease; }
.lab__scene.is-out { transform: translateX(calc(var(--dir) * -16%)) rotate(calc(var(--dir) * -1.5deg)) scale(.98); opacity: 0; }
.lab__scene.is-in  { transition: none; transform: translateX(calc(var(--dir) * 16%)) rotate(calc(var(--dir) * 1.5deg)) scale(.98); opacity: 0; }
.lab__scene > * { position: absolute; inset: 0; }
.lab__zoom { transform: scale(var(--zoom)); transform-origin: var(--ox, 50%) var(--oy, 50%); transition: transform .42s cubic-bezier(.4, 0, .2, 1); }   /* zooms the room towards furniture + prints; the scene clips it */
.lab__zoom > * { position: absolute; inset: 0; }
.lab__props { pointer-events: none; }
.lab__prop { position: absolute; }
.lab__prop img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lab__propshadow { mix-blend-mode: multiply; }
.lab__base { width: 100%; height: 100%; object-fit: cover; display: block; }
/* the furniture: a real object, placed by its size in cm; the colourable part is a mask on top of it */
.lab__zoom > .lab__obj { inset: auto; position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h); pointer-events: none; isolation: isolate; isolation: isolate; transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .45s ease; --dir: 1; }
.lab__obj.is-out { transform: translateX(calc(var(--dir) * -22%)) rotate(calc(var(--dir) * -1deg)); opacity: 0; }
.lab__obj.is-in { transition: none; transform: translateX(calc(var(--dir) * 22%)) rotate(calc(var(--dir) * 1deg)); opacity: 0; }
.lab__obj > * { position: absolute; inset: 0; z-index: 1; }
.lab__objimg { width: 100%; height: 100%; display: block; }
/* the shadow the image model gave the piece, as its own layer */
.lab__objshadow { width: 100%; height: 100%; display: block; z-index: 0 !important; mix-blend-mode: multiply; }

.lab__obj .lab__furn, .lab__obj .lab__sheen { mask-size: 100% 100%; -webkit-mask-size: 100% 100%; }
.lab__sheen { mix-blend-mode: soft-light; opacity: .55; background-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; pointer-events: none; }
.lab__sheen[hidden], .lab__furn[hidden] { display: none; }

.lab__wall::after { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; background: linear-gradient(96deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, .07) 40%, rgba(0, 0, 0, .2) 100%), radial-gradient(120% 95% at 20% 30%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .22) 100%); }   /* window light from the left falling off across the wall, and a soft vignette */
.lab__grain { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .5; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 220px 220px; }   /* plaster grain, so the paint is not a fill */
.lab__warm { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background: #f4ebd8; opacity: .14; }   /* one colour temperature for everything pasted in */
.lab__ao { position: absolute; inset: auto; pointer-events: none; mix-blend-mode: multiply; background: radial-gradient(60% 70% at 50% 85%, rgba(40, 20, 10, .32) 0%, rgba(40, 20, 10, .14) 45%, rgba(40, 20, 10, 0) 100%); filter: blur(1.2vw); }   /* the piece blocks light on the wall behind it */
.lab__contact { position: absolute; inset: 0; pointer-events: none; }
.lab__contact .ct { position: absolute; display: block; border-radius: 50%; mix-blend-mode: multiply; }
.lab__contact .ct--core { background: radial-gradient(50% 50% at 50% 50%, rgba(30, 18, 10, .72) 0%, rgba(30, 18, 10, .34) 40%, rgba(30, 18, 10, 0) 100%); filter: blur(.35vw); }   /* ambient occlusion right under the base */
.lab__contact .ct--cast { background: radial-gradient(50% 50% at 42% 45%, rgba(30, 18, 10, .28) 0%, rgba(30, 18, 10, .1) 50%, rgba(30, 18, 10, 0) 100%); filter: blur(1.4vw); }   /* broad penumbra cast to the right */
.lab__vignette { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background: radial-gradient(120% 95% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .2) 100%); }
.lab__wall, .lab__furn { mix-blend-mode: multiply; mask-size: 100% 100%; -webkit-mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; pointer-events: none; }
.lab__wall.is-pulse, .lab__furn.is-pulse { animation: labpulse .7s ease-out; }
@keyframes labpulse { 0% { filter: brightness(1); } 30% { filter: brightness(1.32); } 100% { filter: brightness(1); } }
.lab__hang { pointer-events: none; }

/* the prints */
.lab .hang__piece { position: absolute; opacity: 1; transform: none; transform-origin: 50% 0; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.lab .hang__piece .frame { display: block; position: relative; width: 100%; height: 100%; box-sizing: border-box; border: 0; background: #1d1714; box-shadow: .9vw 1.3vw 2.4vw rgba(35, 15, 6, .2), .3vw .45vw 1vw rgba(35, 15, 6, .3), .08vw .14vw .22vw rgba(35, 15, 6, .3), inset 1px 1px 0 rgba(255, 255, 255, .2), inset -1px -1px 0 rgba(0, 0, 0, .4); }   /* light from the left: shadow falls right and down; the moulding catches a highlight top-left */
.lab .hang__piece .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, .06) 26%, rgba(255, 255, 255, 0) 44%, rgba(0, 0, 0, 0) 100%), linear-gradient(90deg, rgba(255, 255, 255, .12) 0, rgba(255, 255, 255, 0) 7%), linear-gradient(0deg, rgba(255, 255, 255, .1) 0, rgba(255, 255, 255, 0) 7%); }   /* the glazing: soft sheet plus a brighter edge */
.lab .hang__piece:nth-child(even) .frame::after { background: linear-gradient(112deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, 0) 48%), linear-gradient(90deg, rgba(255, 255, 255, .12) 0, rgba(255, 255, 255, 0) 7%), linear-gradient(0deg, rgba(255, 255, 255, .1) 0, rgba(255, 255, 255, 0) 7%); }
.lab .hang__piece .mount { display: block; width: 100%; height: 100%; box-sizing: border-box; background: #fbf8f2; box-shadow: inset .14vw .2vw .4vw rgba(35, 15, 6, .3), inset 0 0 .2vw rgba(35, 15, 6, .12); }   /* the frame lip shades the mount on the lit side */
.lab .hang__piece .mount img { box-shadow: 0 0 0 1px rgba(35, 15, 6, .16), .1vw .12vw .2vw rgba(35, 15, 6, .38), inset 0 0 0 1px rgba(255, 255, 255, .25); }   /* bevel of the mount window */
.lab .hang__piece img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lab .hang__piece.is-slot .frame { box-shadow: 0 0 0 3px rgba(251, 248, 242, .9), 0 .4vw 1.2vw rgba(35, 15, 6, .4); }
.lab .hang__piece.is-swap .frame img { animation: labswap .5s ease-out; }
@keyframes labswap { 0% { opacity: 0; transform: scale(.94); } 100% { opacity: 1; transform: none; } }
.lab .hang__piece.is-drop { animation: labdrop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes labdrop { from { opacity: 0; transform: translateY(-16px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }

.lab__hint { margin: .9rem 0 0; font-size: .95rem; opacity: .85; }
.lab__rule { margin: .25rem 0 0; font-family: var(--f-pencil); font-size: 1.5rem; line-height: 1.1; color: var(--pencil); }

/* the paint card: a small card that opens where you tapped */
.paint { position: absolute; z-index: 5; width: min(300px, calc(100% - 16px)); padding: .85rem .95rem 1rem; border-radius: 10px; background: rgba(251, 248, 242, .96); color: var(--ink-terracotta); box-shadow: 0 14px 34px -10px rgba(35, 15, 6, .55), 0 0 0 1px rgba(46, 18, 11, .08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: default; animation: labcard .25s var(--ease-out) both; --ax: 50%; }
@keyframes labcard { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.paint::before { content: ""; position: absolute; left: var(--ax); top: -7px; width: 14px; height: 14px; margin-left: -7px; background: inherit; transform: rotate(45deg); box-shadow: -1px -1px 0 rgba(46, 18, 11, .08); }
.paint.is-above::before { top: auto; bottom: -7px; box-shadow: 1px 1px 0 rgba(46, 18, 11, .08); }
.paint[hidden] { display: none; }
.paint__head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.paint__tag { font-size: .9rem; opacity: .85; }
.paint__tag strong { font-family: var(--f-pencil); font-weight: 400; font-size: 1.55rem; line-height: 1; color: var(--pencil); margin-left: .15em; }
.paint__close { font: inherit; font-size: 1.4rem; line-height: 1; width: 1.6em; height: 1.6em; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .7; }
.paint__close:hover { background: rgba(46, 18, 11, .08); opacity: 1; }
.ribbon { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; border-radius: 11px; background: var(--ribbon); border: 1px solid rgba(60, 20, 10, .25); cursor: pointer; margin: 0; display: block; }
.ribbon::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fbf8f2; border: 3px solid var(--ink-terracotta); box-shadow: 0 2px 6px rgba(60, 20, 10, .35); cursor: grab; }
.ribbon::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fbf8f2; border: 3px solid var(--ink-terracotta); box-shadow: 0 2px 6px rgba(60, 20, 10, .35); cursor: grab; }
.ribbon:focus-visible, .shade:focus-visible { outline: 2px solid var(--ink-terracotta); outline-offset: 4px; }
.paint__shade { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; margin-top: .8rem; font-size: .78rem; opacity: .85; }
.shade { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2a1a12, #ece6dc 50%, #ffffff); border: 1px solid rgba(60, 20, 10, .25); cursor: pointer; margin: 0; }
.shade::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fbf8f2; border: 3px solid var(--ink-terracotta); cursor: grab; }
.shade::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fbf8f2; border: 3px solid var(--ink-terracotta); cursor: grab; }

/* the swap: arrows beside the chosen print, a tag under it */
.swap { position: absolute; z-index: 4; left: var(--l); top: var(--t); width: var(--w); height: var(--h); pointer-events: none; }
.swap[hidden] { display: none; }
.swap__arrow { position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%; background: rgba(251, 248, 242, .94); color: var(--ink-terracotta); box-shadow: 0 4px 12px rgba(35, 15, 6, .35); cursor: pointer; pointer-events: auto; display: grid; place-items: center;
  transition: transform .2s var(--ease-press), background-color .2s; }
.swap__arrow svg { width: 20px; height: 20px; }
.swap__arrow:hover { transform: scale(1.08); background: #fbf8f2; }
.swap__arrow--prev { left: -50px; } .swap__arrow--next { right: -50px; }
.swap__tag { position: absolute; left: var(--tx, 0); top: calc(100% + 12px); min-width: 0; max-width: none; width: min(380px, calc(100vw - 32px)); padding: .65rem .85rem; border-radius: 8px; background: rgba(251, 248, 242, .96); color: var(--ink-terracotta); box-shadow: 0 12px 30px -10px rgba(35, 15, 6, .55), 0 0 0 1px rgba(46, 18, 11, .08);
  display: grid; gap: .1rem; pointer-events: auto; cursor: default; animation: labcard .25s var(--ease-out) both; }
.swap.is-above .swap__tag { top: auto; bottom: calc(100% + 12px); }
.swap__artist { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.swap__title { font-size: 1rem; line-height: 1.25; }
.swap__meta { font-size: .85rem; opacity: .8; margin-top: .15rem; white-space: normal; line-height: 1.4; }
.swap__row { display: flex; flex-wrap: wrap; gap: .35rem .6rem; margin-top: .55rem; align-items: center; }
.swap__row .bar__group { gap: .25rem; } .swap__row .ico { width: 40px; height: 32px; } .swap__row .ico svg { width: 26px; height: 16px; }
.chip--size { font-size: .82rem; padding: .3em .6em; } .chip[disabled] { opacity: .35; cursor: not-allowed; }
@keyframes labhint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes labhintobj { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
.hang__piece.is-hint { animation: labhint 1.6s ease-in-out 3; transform-origin: 50% 50%; }
.lab__obj.is-hint .lab__objimg { animation: labhintobj 1.6s ease-in-out 3 .4s; }
.swap__acts { display: flex; gap: 1rem; margin-top: .5rem; }
.swap__link { font: inherit; font-size: .85rem; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.swap__link:hover { text-decoration-thickness: 2px; }

/* the bar under the picture */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: 1.2rem; max-width: 1180px; padding-top: 1rem; border-top: 1px solid rgba(46, 18, 11, .18); }
.bar__group { display: inline-flex; gap: .3rem; align-items: center; }
.ico { width: 46px; height: 36px; padding: 0; border: 1.5px solid rgba(46, 18, 11, .6); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; transition: background-color .25s, border-color .25s, opacity .25s; }
.ico svg { width: 30px; height: 19px; }
.ico rect { fill: none; stroke: currentColor; stroke-width: 1.6; }
.ico[aria-pressed="true"] { background: var(--ink-terracotta); border-color: var(--ink-terracotta); color: var(--terracotta); }
.ico[aria-pressed="true"] rect { fill: currentColor; }
.ico[disabled] { opacity: .3; cursor: not-allowed; }
.chip { font: inherit; font-size: .9rem; line-height: 1; display: inline-flex; align-items: center; gap: .45em; padding: .6em .9em .6em .55em; border: 1.5px solid rgba(46, 18, 11, .6); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; transition: border-color .25s, background-color .25s; }
.chip i { width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(46, 18, 11, .25); }
.chip[aria-pressed="true"] { border-color: var(--ink-terracotta); background: rgba(251, 248, 242, .55); }
.bar__buy { display: flex; align-items: center; gap: .9rem; margin-left: auto; flex-wrap: wrap; }
.bar__total { display: grid; line-height: 1.1; }
.bar__total small { font-size: .75rem; opacity: .75; }
.bar__total strong { font-size: 1.15rem; }
.bar .btn { font-size: .92rem; padding: .75em 1.2em; }
.lab__toast { margin: .8rem 0 0; padding: .7rem 1rem; border-radius: 8px; background: #fbf8f2; color: var(--ink-terracotta); display: inline-block; box-shadow: 0 6px 18px -6px rgba(35, 15, 6, .4); animation: labcard .25s var(--ease-out) both; }
.lab__toast[hidden] { display: none; }
.lab__toast a { color: inherit; }

/* the strip: your cart, then the collection, as one scrolling row each */
.strip { margin-top: 1.1rem; max-width: 1180px; display: grid; gap: .6rem; min-width: 0; }
.strip__sec { min-width: 0; max-width: 100%; }
.strip__h { margin: 0 0 .35rem; font-family: var(--f-pencil); font-size: 1.45rem; line-height: 1; color: var(--pencil); }
.strip__h span { font-family: var(--f-sans); font-size: .85rem; opacity: .8; }
.strip__row { display: flex; gap: .8rem; overflow-x: auto; padding: .35rem .1rem .6rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.work { flex: none; width: 108px; font: inherit; text-align: left; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: grid; gap: .25rem; scroll-snap-align: start; position: relative; }
.work__img { display: block; aspect-ratio: 5 / 7; background: #fbf8f2; overflow: hidden; box-shadow: 0 3px 10px -3px rgba(35, 15, 6, .45); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.work__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work:hover .work__img { transform: translateY(-2px); box-shadow: 0 8px 18px -6px rgba(35, 15, 6, .5); }
.work[aria-pressed="true"] .work__img { outline: 2.5px solid #fbf8f2; outline-offset: 3px; }
.work__img { position: relative; }
.work.is-hung .work__img::after { content: "on the wall"; position: absolute; left: 6px; bottom: 6px; font-size: .62rem; letter-spacing: .04em; padding: .25em .5em; border-radius: 999px; background: rgba(46, 18, 11, .82); color: #fbf8f2; }
.work.is-cart::before { content: "in cart"; position: absolute; right: 6px; top: 6px; z-index: 1; font-size: .62rem; letter-spacing: .04em; padding: .25em .5em; border-radius: 999px; background: #fbf8f2; color: var(--ink-terracotta); box-shadow: 0 1px 3px rgba(35, 15, 6, .3); }
.work__artist { font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work__title { font-size: .78rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 720px) {
  .lab__stage { border-width: 6px; }
  .swap__arrow { width: 36px; height: 36px; margin-top: -18px; }
  .swap__arrow--prev { left: -14px; } .swap__arrow--next { right: -14px; }
  .swap__tag { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-width: none; min-width: 0; padding: .85rem 1rem; z-index: 60; }
  .swap.is-above .swap__tag { top: auto; bottom: 12px; }
  .swap__meta { white-space: normal; }
  .paint { position: fixed; left: 12px !important; right: 12px !important; bottom: 12px; top: auto !important; width: auto; max-height: 62vh; z-index: 60; }
  .paint::before { display: none; }
  .lab__light { width: 34px; height: 34px; top: 6px; right: 6px; }
  .bar { gap: .7rem 1rem; }
  .bar__buy { margin-left: 0; width: 100%; }
  .work { width: 88px; }
  .seg { font-size: .88rem; padding: .6em .8em; }
  .seg-row { max-width: 100%; }
}

/* /try-on-a-wall/: the guide under the lab */
.labpage .guide { margin-top: 2.5rem; }
.labpage .guide h3 { margin: 1.8rem 0 .4rem; font-size: 1.15rem; }
.labpage .guide p { max-width: 68ch; }
.labpage .sizes { border-collapse: collapse; width: 100%; max-width: 72ch; margin: .6rem 0 1rem; font-size: .95rem; }
.labpage .sizes th, .labpage .sizes td { text-align: left; vertical-align: top; padding: .5rem .6rem .5rem 0; border-bottom: 1px solid rgba(46, 18, 11, .14); }
.labpage .sizes th { font-weight: 600; }
.labpage .faq { max-width: 68ch; }
.labpage .faq dt { font-weight: 600; margin-top: 1rem; }
.labpage .faq dd { margin: .25rem 0 0; }
.product__wall { margin: .8rem 0 0; }
.labpage .guide__jump { font-size: .92rem; margin: .2rem 0 .5rem; max-width: 68ch; }
.labpage .sizes th, .labpage .sizes td { padding-right: 1.2rem; }
@media (max-width: 640px) { .labpage .sizes { display: block; overflow-x: auto; white-space: nowrap; } .labpage .sizes td:last-child { white-space: normal; min-width: 14rem; } }
.labpage .market { margin-bottom: 0; }
/* /try-on-a-wall/: the room should be visible at once */
.labpage .j-main { padding-top: 0; }
.labpage .lab { padding-top: clamp(8px, 1.5vh, 20px); }
.labpage .lab__head { margin-bottom: .9rem; }
.labpage .lab__head .pencil { margin-top: 0; margin-bottom: .6rem; }
.labpage .lab__head .body { margin-top: .4rem; }
.labpage .lab__head .h2 { margin-bottom: .2rem; }
.bar__market { font-size: .78rem; opacity: .85; display: inline-flex; align-items: baseline; gap: .35em; white-space: nowrap; }
.bar__market select { -webkit-appearance: none; appearance: none; font: inherit; color: inherit; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%232e120b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .1em center / .75em .75em; border: 0; border-radius: 0; border-bottom: 1px solid currentColor; padding: .1em 1.1em .1em .05em; margin: 0; cursor: pointer; }
.lab .hang__piece.is-drop.is-hint { animation: labdrop .6s cubic-bezier(.34, 1.56, .64, 1) both, labhint 1.6s ease-in-out 3 .9s; }

.paint__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .2rem; }
.paint__chip { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(46, 18, 11, .25); background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.paint__chip[aria-pressed="true"] { box-shadow: 0 0 0 2px #fbf8f2, 0 0 0 3.5px var(--ink-terracotta); }
.bar__save { font-size: .92rem; padding: .75em 1.2em; }

.lab__rug { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--rug, #d9cdb8) 86%, #6b4a2a) 0%, var(--rug, #d9cdb8) 55%, color-mix(in srgb, var(--rug, #d9cdb8) 94%, #fff) 100%); }
.lab__rug[hidden] { display: none; }
.lab__rug::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 160px 160px; mix-blend-mode: soft-light; opacity: .8; }
.lab__evening { position: absolute; inset: 0; pointer-events: none; }
.lab__evening .ev { position: absolute; inset: 0; display: block; }
/* blue-hour ambient: cool and darker away from the lamp, deepest in the far corners */
.ev--ambient { mix-blend-mode: multiply;
  background: radial-gradient(90% 85% at 50% 55%, rgba(30, 18, 14, 0) 55%, rgba(30, 18, 14, .35) 100%), linear-gradient(180deg, rgba(58, 32, 16, .84) 0%, rgba(58, 32, 16, .68) 42%, rgba(58, 32, 16, .74) 100%);
  -webkit-mask-image: radial-gradient(30% 42% at var(--gx, 16%) var(--gy, 32%), rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .45) 38%, #000 82%), radial-gradient(calc(var(--pw, 8%) * 3.2) 46% at var(--px, -60%) calc(var(--py, 30%) + 20%), rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .5) 42%, #000 84%), radial-gradient(40% 24% at var(--gx, 16%) var(--fy, 78%), rgba(0, 0, 0, .3) 0%, #000 85%);
  -webkit-mask-composite: source-in, source-in, source-over; mask-image: radial-gradient(30% 42% at var(--gx, 16%) var(--gy, 32%), rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .45) 38%, #000 82%), radial-gradient(calc(var(--pw, 8%) * 3.2) 46% at var(--px, -60%) calc(var(--py, 30%) + 20%), rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .5) 42%, #000 84%), radial-gradient(40% 24% at var(--gx, 16%) var(--fy, 78%), rgba(0, 0, 0, .3) 0%, #000 85%); mask-composite: intersect, intersect, add; }
/* a dark, half-transparent layer with the lamps cut out of it: it looks the same whether or not the browser blends it (Safari drops blending while things move), so it can never turn into fog */
/* the lamp: a wide warm halo on the wall and ceiling, a pool on the floor, a bloom on the shade */
.ev--halo { mix-blend-mode: soft-light; background: radial-gradient(calc(var(--pw, 8%) * 3) 40% at var(--px, -60%) calc(var(--py, 30%) + 18%), rgba(255, 170, 90, .4) 0%, rgba(255, 170, 90, 0) 100%), radial-gradient(30% 40% at var(--gx, 16%) var(--gy, 32%), rgba(255, 170, 90, .5) 0%, rgba(255, 160, 90, .25) 50%, rgba(255, 160, 90, 0) 100%); }
.ev--ceiling { mix-blend-mode: soft-light; background: radial-gradient(30% 16% at var(--gx, 16%) 8%, rgba(255, 190, 130, .3) 0%, rgba(255, 190, 130, 0) 100%); }
.ev--floor { mix-blend-mode: soft-light; background: radial-gradient(36% 22% at var(--gx, 16%) var(--fy, 78%), rgba(255, 168, 100, .4) 0%, rgba(255, 160, 95, 0) 100%); }
.ev--bloom { mix-blend-mode: screen; background: radial-gradient(6% 8% at var(--gx, 16%) var(--gy, 32%), rgba(255, 214, 160, .55) 0%, rgba(255, 190, 120, .18) 50%, rgba(255, 190, 120, 0) 100%); filter: blur(.8vw); }
.ev--pend { mix-blend-mode: screen; background: radial-gradient(calc(var(--pw, 8%) * .55) 1.6% at var(--px, 70%) var(--py, 30%), rgba(255, 226, 176, .85) 0%, rgba(255, 200, 140, .3) 60%, rgba(255, 190, 120, 0) 100%), radial-gradient(calc(var(--pw, 8%) * 1.3) 9% at var(--px, 70%) calc(var(--py, 30%) + 2%), rgba(255, 190, 125, .22) 0%, rgba(255, 180, 115, 0) 100%); }
.lab__evening:not(.has-pend) .ev--pend { display: none; }
.lab__evening:not(.has-pend) { --px: -60%; }
.lab__evening:not(.has-lamp) .ev--bloom, .lab__evening:not(.has-lamp) .ev--ceiling { display: none; }
/* overall warmth where the light reaches, a faint blue window light opposite */
.ev--warm { mix-blend-mode: soft-light; background: radial-gradient(70% 65% at 45% 50%, rgba(255, 170, 100, .2) 0%, rgba(255, 170, 110, 0) 100%); }
.ev--blue { mix-blend-mode: multiply; background: linear-gradient(225deg, rgba(30, 36, 60, .16) 0%, rgba(30, 36, 60, 0) 35%); }
/* at evening the prints get a picture-light feel, the rug falls off into the dark, the furniture loses a little saturation */
.is-evening .hang__piece .frame::after { background: linear-gradient(180deg, rgba(255, 210, 160, .16) 0%, rgba(255, 210, 160, 0) 30%); mix-blend-mode: soft-light; }
.is-evening .lab__rug::before { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; background: linear-gradient(90deg, rgba(30, 20, 16, 0) 0%, rgba(30, 20, 16, .18) 60%, rgba(30, 20, 16, .3) 100%); }
.is-evening .lab__objimg, .is-evening .lab__propimg { filter: saturate(.96); }
.lab__evening[hidden] { display: none; }
.is-evening .lab__hang, .is-evening .lab__obj, .is-evening .lab__contact, .is-evening .lab__ao, .is-evening .lab__props { transform: none; }   /* no parallax at night: keeps the light layers steady */
.ev--halo { background-blend-mode: normal; }
.is-evening .hang__piece img { filter: saturate(1.18) contrast(1.06); }   /* the prints keep their colour under the warm light */
.lab__zoom { --par-x: 0; --par-y: 0; isolation: isolate; }
.lab__hang, .lab__obj, .lab__props, .lab__contact, .lab__ao { transition: transform .35s ease-out; }
.lab__hang { transform: translate(calc(var(--par-x) * -3px), calc(var(--par-y) * -2px)); }
.lab__obj, .lab__contact, .lab__ao { transform: translate(calc(var(--par-x) * -7px), calc(var(--par-y) * -3px)); }
.lab__props { transform: translate(calc(var(--par-x) * -10px), calc(var(--par-y) * -4px)); }
.lab__wall.is-spread, .lab__furn.is-spread { clip-path: circle(0% at var(--sx, 50%) var(--sy, 50%)); transition: clip-path .55s cubic-bezier(.3, .7, .3, 1); }
.lab__wall.is-spread.is-grown, .lab__furn.is-spread.is-grown { clip-path: circle(150% at var(--sx, 50%) var(--sy, 50%)); }
.bar__evening { font-size: .92rem; padding: .75em 1.2em; }

.paint__sec[hidden] { display: none; }
.paint__label { margin: .9rem 0 .35rem; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.paint__pick { display: flex; flex-direction: column; gap: .35rem; }
.paint__group { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.paint__room { font-size: .75rem; opacity: .6; width: 100%; }
.paint__piece { font: inherit; font-size: .82rem; line-height: 1; padding: .4em .7em; border: 1.5px solid rgba(46, 18, 11, .25); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.paint__piece[aria-pressed="true"] { border-color: var(--ink-terracotta); background: rgba(251, 248, 242, .9); box-shadow: inset 0 0 0 1px var(--ink-terracotta); }
.paint__pick--props { flex-direction: row; flex-wrap: wrap; }
.paint__chip--none { background: repeating-linear-gradient(45deg, #fbf8f2 0 3px, rgba(46, 18, 11, .25) 3px 4px); }
.paint { max-height: calc(100% - 16px); overflow: auto; }
.lab__light { position: absolute; z-index: 6; top: 10px; right: 10px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(251, 248, 242, .85); color: var(--ink-terracotta); cursor: pointer; box-shadow: 0 2px 8px rgba(35, 15, 6, .3); display: grid; place-items: center; }
.lab__light svg { width: 22px; height: 22px; } .lab__light .moon { display: none; } .lab__light[aria-pressed="true"] .sun { display: none; } .lab__light[aria-pressed="true"] .moon { display: block; }
.lab__light:hover { background: #fbf8f2; }

/* hotspots: one marker per thing you can change; they sit in the room and counter-scale against the zoom */
.lab__hs { position: absolute; inset: 0; pointer-events: none; }
.hs { position: absolute; pointer-events: auto; transform: translate(-50%, -50%) scale(calc(1 / var(--z, 1))); display: inline-flex; align-items: center; gap: 0; height: 30px; padding: 0; border: 0; border-radius: 999px; background: rgba(251, 248, 242, .9); color: var(--ink-terracotta); font: inherit; font-size: .78rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(35, 15, 6, .3), 0 0 0 1px rgba(46, 18, 11, .08); white-space: nowrap; transition: background .2s, box-shadow .2s; }
.hs svg { width: 30px; height: 30px; padding: 7px; box-sizing: border-box; border-radius: 50%; flex: none; }
.hs span { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .25s ease, opacity .2s, padding .25s; }
.hs--flip { flex-direction: row-reverse; }
.hs:hover span, .hs:focus-visible span, .lab__stage.is-fresh .hs span { max-width: 12em; opacity: 1; padding-right: 10px; }
.hs--flip:hover span, .hs--flip:focus-visible span, .lab__stage.is-fresh .hs--flip span { padding: 0 0 0 10px; }
.hs:hover { background: #fbf8f2; box-shadow: 0 4px 14px rgba(35, 15, 6, .35), 0 0 0 1px rgba(46, 18, 11, .12); }
@keyframes hspulse { 0%, 100% { box-shadow: 0 2px 8px rgba(35, 15, 6, .3), 0 0 0 0 rgba(251, 248, 242, .8); } 50% { box-shadow: 0 2px 8px rgba(35, 15, 6, .3), 0 0 0 7px rgba(251, 248, 242, 0); } }
.lab__stage.is-fresh .hs { animation: hspulse 1.6s ease-in-out 3; }
/* the rooms, inside the picture */
.lab__rooms { position: absolute; z-index: 6; left: 10px; top: 10px; display: flex; flex-wrap: nowrap; width: max-content; gap: 6px; padding: 5px; border-radius: 12px; background: rgba(251, 248, 242, .82); box-shadow: 0 2px 8px rgba(35, 15, 6, .3); }
.rm { position: relative; width: 64px; height: 46px; padding: 0; border: 0; border-radius: 8px; background-color: #e9e4dc; background-size: 74% auto, cover; background-repeat: no-repeat; background-position: center 30%, center; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(46, 18, 11, .12); }
.rm span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0 3px; font-size: .62rem; line-height: 1; text-align: center; color: #fbf8f2; background: rgba(46, 18, 11, .55); }
.rm[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink-terracotta); }
.swap__do { display: block; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: .2rem; }
.swap__rule { display: block; margin-top: .5rem; font-size: .78rem; line-height: 1.4; color: rgba(46, 18, 11, .72); white-space: normal; }
.swap__works { display: block; margin-top: .4rem; }
.swap__grid { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .3rem; scrollbar-width: thin; }
.swap__grid .work { flex: 0 0 auto; width: 64px; }
.swap__grid .work__artist, .swap__grid .work__title { display: none; }
.lab__hint[hidden], .strip[hidden] { display: none; }
@media (max-width: 720px) { .lab__rooms { left: 6px; top: 6px; gap: 4px; padding: 3px; border-radius: 9px; } .rm { width: 38px; height: 30px; border-radius: 6px; } .rm span { font-size: .46rem; padding: 1px 0 2px; } .hs { height: 26px; font-size: .72rem; } .hs svg { width: 26px; height: 26px; padding: 6px; } }
.lab__rooms ul, .lab__rooms li { all: unset; }
/* the room strip folds away to the left, so the lamp and the top of the wall show */
.rm-tog { align-self: stretch; width: 22px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #2e120b; display: grid; place-items: center; cursor: pointer; }
.rm-tog:hover { background: rgba(46, 18, 11, .08); }
.rm-tog svg { width: 16px; height: 16px; transition: transform .25s; }
.lab__rooms.is-shut { gap: 0; }
.lab__rooms.is-shut .rm { display: none; }
.lab__rooms.is-shut .rm-tog { width: 30px; height: 30px; }
.lab__rooms.is-shut .rm-tog svg { transform: rotate(180deg); }
.paint__label--tint { flex-basis: 100%; margin: .6rem 0 .3rem; }
.paint__tints { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.paint__tints .paint__chip--none { background: linear-gradient(135deg, #f1ebe0 50%, #c2a07c 50%); }
.lab__pick[hidden] { display: none; }
@media (max-width: 720px) { .lab__stage.is-fresh .hs span { max-width: 0; opacity: 0; } .swap, .paint { z-index: 70; } }
section.lab { position: relative; z-index: 3; }   /* the mobile sheets are position: fixed inside the section; it must stack above the footer that follows it */
@media (max-width: 720px) {
  .paint, .swap__tag { background: #fbf8f2; max-height: 70vh; overflow-y: auto; overflow-x: hidden; white-space: normal; box-shadow: 0 -6px 30px rgba(35, 15, 6, .35); }
  .swap__tag { grid-template-columns: minmax(0, 1fr); }
  .swap__tag .swap__row { flex-wrap: wrap; }
  .swap__tag .swap__meta, .swap__tag .swap__rule, .swap__tag .swap__title { white-space: normal; }
  .swap__grid { max-width: 100%; }
}
.swap__tag { grid-template-columns: minmax(0, 1fr); }   /* the card's single column never grows past the card: rows wrap instead */
.swap__tag .swap__row { flex-wrap: wrap; }
.swap__tag .swap__meta, .swap__tag .swap__rule { white-space: normal; }

/* markers: hidden until flashed (start, change, pointer in, empty tap); the things themselves stay tappable */
.lab__hs .hs { opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.lab__hs.is-show .hs { opacity: 1; pointer-events: auto; }

.lab__cord { position: absolute; width: 2px; margin-left: -1px; background: #1f1a17; display: block; }
.chip--size.is-rec { position: relative; border-color: var(--ink-terracotta); }
.chip--size.is-rec::after { content: "fits"; position: absolute; top: -.7em; right: -.4em; padding: .1em .4em; border-radius: 999px; background: var(--ink-terracotta); color: #fbf8f2; font-size: .62rem; line-height: 1.2; letter-spacing: .03em; }
@media (max-width: 520px) { .lab__stage { margin-inline: calc(4px - var(--gutter)); border-width: 4px; } }
/* pins: the familiar "lock" pattern — a pinned print stays while the others change */
.hang__piece .pin { position: absolute; top: -13px; right: -13px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fbf8f2; color: #2e120b; box-shadow: 0 2px 8px rgba(35, 15, 6, .3); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s, background .2s; cursor: pointer; z-index: 2; pointer-events: none; }
.hang__piece .pin::before { content: ""; position: absolute; inset: -5px; }
.hang__piece .pin svg { width: 14px; height: 14px; }
.lab__stage.is-swapping .hang__piece .pin, .hang__piece .pin:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
.hang__piece.is-pinned .pin { opacity: 1; transform: none; pointer-events: auto; background: var(--ink-terracotta, #b4532f); color: #fbf8f2; }
.hang__piece.is-pinned .pin svg path { fill: currentColor; }
.swap__pinhint { margin: .3rem 0 .45rem; font-size: .74rem; line-height: 1.35; color: rgba(46, 18, 11, .66); }
/* the picture to save, on a phone */
.lab__shot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(28, 14, 8, .72); }
.lab__shot-in { width: min(100%, 560px); background: #fbf8f2; border-radius: 14px; padding: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.lab__shot-in img { display: block; width: 100%; height: auto; border-radius: 6px; -webkit-touch-callout: default; }
.lab__shot-in p { margin: .7rem .2rem; font-size: .85rem; line-height: 1.4; color: #2e120b; }
.lab__shot-do { display: flex; gap: 8px; flex-wrap: wrap; }
.lab__shot-do .btn { flex: 1 1 auto; }
/* pendant: ceiling canopy and a soft shadow on the wall behind it */
.lab__canopy { position: absolute; display: block; background: linear-gradient(#f4f1ec, #d9d4cc); border-radius: 0 0 3px 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.lab__prop.is-pend img { filter: drop-shadow(0 1.2vw .9vw rgba(30, 18, 10, .16)); }
