/* The living room: hang a piece on a real wall */
body.lr { background: #0f0f0f; color: #fff; overflow: hidden; }
body.lr main { height: 100vh; height: 100svh; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.lr-panel, .lr-view { min-width: 0; }

.lr-view { position: relative; overflow: hidden; background: #111; --px: 0px; --py: 0px; }
.lr-view > .lr-stage, .lr-view > .lr-blur { animation: lr-arrive 2s cubic-bezier(.2,.7,.1,1) both; }
@keyframes lr-arrive { from { scale: 1.16; filter: brightness(.25) blur(6px); } }
.lr-stage { translate: var(--px) var(--py); }
.lr-fg { translate: calc(var(--px) * .9) calc(var(--py) * .6); }
.lr-blur { position: absolute; inset: -40px; background-size: cover; background-position: center; transform: scale(1.1); }
.lr-blur::after { content: ""; position: absolute; inset: 0; -webkit-backdrop-filter: blur(28px) brightness(.55); backdrop-filter: blur(28px) brightness(.55); }
.lr-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; transition: transform 1s cubic-bezier(.2,.7,.1,1), opacity .35s ease; }
.lr-stage.is-swapping { opacity: 0; }
.lr-plate { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.lr-wall { position: absolute; overflow: hidden; }
.lr-fg { position: absolute; max-width: none; pointer-events: none; }

.lr-art { position: absolute; margin: 0; transform-origin: 50% -6%; }
.lr-art img { width: 100%; height: 100%; display: block; }
.lr-art::after { content: ""; position: absolute; inset: 0; background: var(--tint, transparent); mix-blend-mode: multiply; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.28), inset 0 2px 3px rgba(255,255,255,.14), inset 0 -3px 5px rgba(0,0,0,.2); }
/* light sliding across the surface as the piece settles on the wall */
.lr-art::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.34) 50%, transparent 62%); background-size: 300% 100%; background-position: 130% 0; animation: lr-sheen 1.6s cubic-bezier(.3,.6,.2,1) .35s both; }
@keyframes lr-sheen { to { background-position: -40% 0; } }
.lr-art.is-leaving { transition: opacity .35s ease, transform .35s ease; opacity: 0; transform: translateY(-4%); }

.lr-view[data-room="green"] .lr-art { filter: brightness(.86) saturate(.95) drop-shadow(0 3px 3px rgba(0,0,0,.5)) drop-shadow(0 26px 22px rgba(0,0,0,.5)); --tint: linear-gradient(180deg, rgba(255,236,200,.0) 0%, rgba(10,28,26,.22) 100%); }
.lr-view[data-room="yellow"] .lr-art { filter: brightness(1.02) drop-shadow(4px 3px 3px rgba(80,50,0,.45)) drop-shadow(30px 22px 20px rgba(110,70,0,.4)); --tint: linear-gradient(118deg, rgba(255,236,190,.05) 30%, rgba(160,110,40,.16) 100%); }
.lr-view[data-room="purple"] .lr-art { filter: brightness(.97) drop-shadow(0 3px 3px rgba(20,5,40,.5)) drop-shadow(0 22px 22px rgba(40,10,70,.5)); --tint: radial-gradient(120% 90% at 30% 10%, rgba(255,255,255,0) 40%, rgba(70,30,120,.18) 100%); }

.lr-measure { --line: 2px; position: absolute; pointer-events: none; color: #fff; font-weight: 600; font-size: 1.125rem; }
.lr-measure[hidden] { display: none; }
.lr-measure__w, .lr-measure__h { position: absolute; display: flex; align-items: center; justify-content: center; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.lr-measure__w { left: 0; right: 0; bottom: -46px; height: 30px; border-left: var(--line) solid #fff; border-right: var(--line) solid #fff; }
.lr-measure__w::before, .lr-measure__h::before { content: ""; position: absolute; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); }
.lr-measure__w::before { left: 0; right: 0; top: 50%; height: var(--line); }
.lr-measure__w span, .lr-measure__h span { position: relative; background: rgba(0,0,0,.72); padding: .1em .55em; border-radius: .25em; }
.lr-measure__h { top: 0; bottom: 0; right: -52px; width: 30px; border-top: var(--line) solid #fff; border-bottom: var(--line) solid #fff; }
.lr-measure__h::before { top: 0; bottom: 0; left: 50%; width: var(--line); }
.lr-measure__h span { writing-mode: vertical-rl; transform: rotate(180deg); padding: .55em .1em; }

.lr-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.6);
  background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.lr-arrow:hover { background: #fff; color: #000; }
.lr-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lr-arrow--prev { left: var(--gutter); }
.lr-arrow--next { right: var(--gutter); }

.lr-panel { background: #0f0f0f; padding: 16px var(--gutter) 14px; border-top: 1px solid #262626; }
.lr-panel__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 28px; flex-wrap: wrap; margin-bottom: 12px; }
.lr-info__title { margin: 0; font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.05; }
.lr-info__meta { margin: 4px 0 4px; color: rgba(255,255,255,.8); }
.lr-info__links { margin: 0; display: flex; gap: 6px 22px; flex-wrap: wrap; }
.lr-info__links a { font-weight: 600; text-underline-offset: 4px; }
.lr-info__links a:hover { color: #7fe0d8; }
.lr-tools { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.lr-chip { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.5); background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.lr-chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }
.lr-rooms { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.lr-room { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; }
.lr-room input { position: absolute; opacity: 0; pointer-events: none; }
.lr-room__sw { width: 26px; height: 26px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.lr-room:has(input:checked) { border-color: rgba(255,255,255,.85); }
.lr-room:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }

.lr-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.lr-strip:focus-visible { outline: 3px solid var(--teal); }
.lr-thumb { all: unset; flex: 0 0 auto; height: 76px; padding: 6px; border-radius: 6px; background: #1a1a1a; cursor: pointer; scroll-snap-align: center; display: grid; place-items: center; box-sizing: border-box; border: 2px solid transparent; }
.lr-thumb img { height: 60px; width: auto; max-width: 120px; object-fit: contain; }
.lr-thumb:hover { background: #262626; }
.lr-thumb[aria-selected="true"] { border-color: #fff; background: #262626; }
.lr-thumb:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

@media (max-width: 760px) {
  .lr-arrow { width: 46px; height: 46px; top: auto; bottom: 14px; transform: none; }
  .lr-panel { padding-top: 12px; }
  .lr-panel__top { align-items: flex-start; margin-bottom: 8px; }
  .lr-room span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lr-room { padding: 6px; }
  .lr-thumb { height: 64px; } .lr-thumb img { height: 48px; }
}

.lr-chip--next { text-decoration: none; display: inline-flex; align-items: center; background: #fff; color: #000; border-color: #fff; }
.lr-chip--next:hover { background: #e2bd55; border-color: #e2bd55; }

.lr-wall { touch-action: none; }
.lr-art { cursor: grab; transition: scale .25s ease, filter .25s ease; -webkit-user-select: none; user-select: none; }
.lr-art img { pointer-events: none; -webkit-user-drag: none; }
.lr-art.is-held { cursor: grabbing; scale: 1.015; }
.lr-info__tip { margin: 6px 0 0; color: rgba(255,255,255,.75); }

/* the room fills the whole screen; the options float over it on a pane of glass */
body.lr main { display: block; position: relative; height: 100vh; height: 100svh; }
.lr-view { position: absolute; inset: 0; }
.lr-panel {
  position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); bottom: clamp(10px, 2vh, 20px);
  padding: 14px 20px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)), rgba(14,14,14,.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.35); backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.08);
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
.lr-panel__top { align-items: center; margin-bottom: 10px; }
.lr-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; }
.lr-info__title { font-size: clamp(1.6rem, 2.2vw, 2rem); }
.lr-info__meta { margin: 0; color: rgba(255,255,255,.9); }
.lr-chip, .lr-room, .lr-thumb { text-shadow: none; }
.lr-chip { border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.06); }
.lr-strip { padding: 2px 2px 8px; scrollbar-color: rgba(255,255,255,.4) transparent; }
.lr-thumb { height: 66px; background: rgba(255,255,255,.1); border-radius: 12px; }
.lr-thumb img { height: 50px; }
.lr-thumb:hover, .lr-thumb[aria-selected="true"] { background: rgba(255,255,255,.24); }
.lr-arrow { top: calc(50% - 70px); background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.55); }
.lr-hint {
  position: absolute; z-index: 4; left: 50%; top: 96px; translate: -50% 0; margin: 0; padding: 8px 18px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  border: 1px solid rgba(255,255,255,.3); background: rgba(14,14,14,.32); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); font-weight: 600;
  transition: opacity .8s ease, translate .8s ease;
}
.lr-hint.is-gone { opacity: 0; translate: -50% -10px; }
@media (max-width: 760px) {
  .lr-panel { left: 8px; right: 8px; bottom: 8px; padding: 12px 14px 8px; border-radius: 20px; }
  .lr-arrow { top: 132px; bottom: auto; width: 42px; height: 42px; } .lr-arrow--prev { left: 10px; } .lr-arrow--next { right: 10px; }
  .lr-thumb { height: 56px; } .lr-thumb img { height: 42px; }
  .lr-info__meta { font-size: 1.125rem; }
  .lr-hint { top: 78px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .lr-panel, .lr-hint { background: rgba(14,14,14,.78); } }

.lr-chip--next { background: #fff; color: #000; border-color: #fff; }
.lr-chip--next:hover { background: #e2bd55; border-color: #e2bd55; }
.lr-chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }
.lr-tools { margin-left: auto; }

/* the big pane is nearly clear so the room reads through it; each option sits on its own piece of frosted glass */
.lr-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.015));
  -webkit-backdrop-filter: blur(1.5px) saturate(1.08); backdrop-filter: blur(1.5px) saturate(1.08);
  border-color: rgba(255,255,255,.34);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(255,255,255,.12);
}
.lr-info, .lr-chip, .lr-rooms {
  background: rgba(14,14,14,.3); border: 1px solid rgba(255,255,255,.26);
  -webkit-backdrop-filter: blur(20px) saturate(1.35); backdrop-filter: blur(20px) saturate(1.35);
}
.lr-info { padding: 8px 18px 9px; border-radius: 18px; }
.lr-rooms { padding: 3px; border-radius: 999px; }
.lr-chip { border-width: 1px; }
.lr-chip--next, .lr-chip[aria-pressed="true"] { background: #fff; border-color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lr-thumb { background: rgba(14,14,14,.42); border: 1px solid rgba(255,255,255,.2); }
.lr-thumb:hover { background: rgba(14,14,14,.6); }
.lr-thumb[aria-selected="true"] { background: rgba(255,255,255,.3); border-color: #fff; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .lr-panel { background: rgba(14,14,14,.25); } .lr-info, .lr-chip, .lr-rooms { background: rgba(14,14,14,.75); } }

/* eleven rooms: each is a small picture of itself; only the one you are in shows its name */
.lr-rooms { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lr-rooms::-webkit-scrollbar { display: none; }
.lr-room { flex: none; }
.lr-room__sw { background-size: cover; background-position: center; }
.lr-room:not(:has(input:checked)) { padding: 6px; }
.lr-room:not(:has(input:checked)) span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Phone: the room and the art come first. The panel is the title and the rooms; raise it for the rest. ---------- */
.lr-more { display: none; }
@media (max-width: 760px) {
  .lr-panel { padding: 8px; border-radius: 26px; }
  .lr-panel__top { display: block; margin: 0; }
  .lr-info { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 4px 4px 4px 16px; border-radius: 20px; }
  .lr-info__title { flex: 1; min-width: 0; font-size: 1.4rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lr-panel.is-raised .lr-info__title { white-space: normal; }
  .lr-more { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 44px; padding: 0 12px 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.34); background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
  .lr-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .35s cubic-bezier(.2,.7,.1,1); }
  .lr-panel.is-raised .lr-more svg { rotate: 180deg; }
  .lr-info__meta, .lr-info__links, .lr-info__tip { flex-basis: 100%; }
  .lr-info__meta { margin: 6px 0 4px; } .lr-info__links { margin: 0 0 10px; }
  .lr-tools { margin: 8px 0 0; gap: 8px; }
  .lr-rooms { flex: 1 1 100%; }
  .lr-strip { margin-top: 8px; }
  .lr-panel:not(.is-raised) .lr-info__meta, .lr-panel:not(.is-raised) .lr-info__links, .lr-panel:not(.is-raised) .lr-info__tip,
  .lr-panel:not(.is-raised) #measure-btn, .lr-panel:not(.is-raised) .lr-chip--next, .lr-panel:not(.is-raised) .lr-strip { display: none; }
  .lr-arrow { top: 50%; bottom: auto; translate: 0 -50%; }
  .lr-hint { top: 76px; font-size: 1.125rem; }
}
@media (max-width: 760px) { .lr-arrow { top: auto; bottom: 150px; translate: none; } .lr-panel.is-raised ~ .lr-arrow, body:has(.lr-panel.is-raised) .lr-arrow { opacity: 0; pointer-events: none; } }
