/* The motion look (web/motion) · "See it in your room" */

/* ---------- header link and the "New" tag ---------- */
.nav a.nav-room {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 6px; padding: 9px 14px; border-radius: 999px; opacity: 1;
  background: color-mix(in srgb, var(--saffron) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--saffron) 55%, transparent);
  transition: background-color .3s, box-shadow .3s;
}
.nav a.nav-room::after { display: none; }
.nav a.nav-room[aria-current='page'] { background: var(--saffron); color: #1b1407; }
@media (hover: hover) { .nav a.nav-room:hover { background: var(--saffron); color: #1b1407; } }
.nav a.nav-room svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a { white-space: nowrap; }
/* narrow desktops: two links step aside for the room pill (both stay in the shop filters, menu and footer) */
@media (min-width: 961px) and (max-width: 1100px) {
  .nav a[href='#/shop?cat=round'], .nav a[href='#/#showroom'] { display: none; }
}
.new-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 4px 8px 3px; border-radius: 999px;
  background: var(--saffron); color: #1b1407; font: 800 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; font-style: normal;
}
.menu nav a.menu-room { font-style: italic; color: var(--lapis); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the room screen is an app: no footer, no page scroll while planning */
body[data-screen='room'] .ftr { display: none; }
.screen[data-screen='room'] { min-height: 0; }
.rp { padding-top: var(--hdr); }
.rp[data-state='start'] .rp-app, .rp[data-state='plan'] .rp-start { display: none; }

/* ---------- start ---------- */
.rp-start {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "intro demo" "more demo"; gap: 0 clamp(28px, 5vw, 88px); align-items: center; align-content: center;
  max-width: 1560px; margin: 0 auto; padding: clamp(24px, 5vh, 64px) var(--gutter) 72px; min-height: calc(100svh - var(--hdr));
}
.rp-intro { grid-area: intro; max-width: 580px; align-self: end; }
.rp-more { grid-area: more; max-width: 580px; align-self: start; }
.rp-title { font: 400 clamp(48px, 6.4vw, 104px)/.92 var(--serif); letter-spacing: -.025em; margin: 16px 0 20px; text-wrap: balance; }
.rp-title em { color: var(--lapis); font-weight: 400; }
.rp-lead { color: var(--ink-2); font-size: clamp(16px, 1.25vw, 18.5px); max-width: 33em; text-wrap: pretty; }
.rp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 12px; }
.rp-actions .btn { cursor: pointer; }
.rp-actions svg, .rp-act svg, .rp-private svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rp-actions .btn:focus-within { outline: 2px solid var(--saffron); outline-offset: 3px; }
.rp-take { display: none; }
.rp-drop { color: var(--ink-3); font-size: 13.5px; }
.rp-private { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--turq); font: 700 13.5px/1.35 var(--sans); }
[data-theme='dark'] .rp-private { color: #5fd0c4; }
.rp-error { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--madder) 12%, transparent); color: var(--madder); font-weight: 600; font-size: 14px; }
.rp-h { margin: 36px 0 12px; font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.rp-samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rp-sample {
  position: relative; display: block; padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4;
  background: var(--bg-2); cursor: pointer; box-shadow: var(--shadow); text-align: left; isolation: isolate;
}
.rp-sample img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--silk); }
.rp-sample::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8, 10, 20, .78)); }
.rp-sample span { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 1; color: #fff; font: 700 13px/1.2 var(--sans); }
.rp-sample small { display: block; font-weight: 500; font-size: 12px; opacity: .82; margin-top: 2px; }
.rp-sample:focus-visible img { transform: scale(1.07); }
@media (hover: hover) { .rp-sample:hover img { transform: scale(1.07); } }
.rp-mine-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rp-mine-list li { position: relative; }
.rp-mine-list .rp-sample { width: 100%; aspect-ratio: 4 / 3; }
.rp-forget {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(8, 10, 20, .6); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.rp-forget svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rp-tips { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--ink-2); font-size: 14.5px; }
.rp-tips summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.rp-tips summary::-webkit-details-marker { display: none; }
.rp-tips summary::before { content: '+'; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-weight: 700; line-height: 1; transition: transform .4s var(--silk); }
.rp-tips[open] summary::before { transform: rotate(45deg); }
.rp-tips ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.rp-tips b { color: var(--ink); }

/* the live demo: the same renderer, a sample room, rugs taking turns */
.rp-demo { grid-area: demo; margin: 0; position: relative; justify-self: center; width: 100%; }
.rp-demo-frame {
  position: relative; height: min(calc(100svh - var(--hdr) - 150px), 860px); width: auto; max-width: 100%; aspect-ratio: 3 / 4; margin: 0 auto;
  border-radius: 24px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-lg);
}
.rp-demo-frame > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.rp-demo-frame .rp-gl, .rp-demo-frame .rp-ui { pointer-events: none; }
.rp-demo figcaption { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; color: var(--ink-3); font-size: 13.5px; }
.rp-live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; background: color-mix(in srgb, var(--madder) 14%, transparent); color: var(--madder); font: 800 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.rp-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: rp-blink 1.6s ease-in-out infinite; }
@keyframes rp-blink { 50% { opacity: .25; } }

/* ---------- the planner ---------- */
.rp-app { display: grid; grid-template-columns: minmax(0, 1fr) 392px; height: calc(100svh - var(--hdr)); }
.rp-stage {
  position: relative; overflow: hidden; background: #0c0e17; touch-action: none; -webkit-user-select: none; user-select: none;
  outline: none; cursor: default;
}
.rp-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--saffron); }
.rp-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rp-amb { filter: blur(26px) saturate(1.2) brightness(.5); transform: scale(1.18); opacity: .9; }
.rp-ui { pointer-events: none; }
.rp-stage[data-cursor='grab'] { cursor: grab; }
.rp-stage[data-cursor='grabbing'] { cursor: grabbing; }
.rp-stage[data-cursor='ns'] { cursor: ns-resize; }
.rp-stage[data-cursor='cross'] { cursor: crosshair; }
.rp-stage[data-cursor='paint'] { cursor: none; }
.rp-marks { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.rp-marks > * { position: absolute; left: 0; top: 0; will-change: transform; }
.rp-dim {
  padding: 5px 9px; border-radius: 999px; background: rgba(12, 14, 24, .72); color: #fff; font: 700 12px/1 var(--sans);
  letter-spacing: .02em; white-space: nowrap; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .3s;
}
.rp-rot, .rp-pin {
  pointer-events: auto; display: grid; place-items: center; border: 0; padding: 0; cursor: grab; touch-action: none;
  transition: transform .25s var(--spring), opacity .3s;
}
.rp-rot {
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fbf8f3; color: #16192b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 0 3px rgba(226, 163, 58, .9);
}
.rp-rot svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .rp-rot:hover { transform: scale(1.08); } }
.rp-pin {
  width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--saffron); color: #1b1407;
  box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(0, 0, 0, .4); font: 800 12px/1 var(--sans);
}
.rp-pin::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; }   /* a bigger finger target */
@media (hover: hover) { .rp-pin:hover { transform: scale(1.1); } }
.rp-eye {
  padding: 4px 9px; border-radius: 999px; background: var(--saffron); color: #1b1407; font: 800 12px/1 var(--sans);
  letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.rp-brushdot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .55); margin: -5px 0 0 -5px; }
.rp-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.rp-chip {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px 0 11px; border: 0;
  border-radius: 999px; background: rgba(12, 14, 24, .62); color: #fff; font: 700 13px/1 var(--sans); cursor: pointer;
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3); box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: background-color .25s, transform .3s var(--spring);
}
.rp-chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .rp-chip:hover { background: rgba(12, 14, 24, .82); } }
.rp-top-l { display: flex; gap: 8px; min-width: 0; }
.rp-top-r { display: flex; gap: 8px; flex: none; }
.rp-ownchip { background: var(--saffron); color: #1b1407; }
@media (hover: hover) { .rp-ownchip:hover { background: #f0b952; } }
.rp-ownchip:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.rp-own-short { display: none; }
.rp-chip[aria-pressed='true'] { background: var(--saffron); color: #1b1407; }
.rp-toast {
  position: absolute; left: 50%; top: 66px; z-index: 3; width: max-content; max-width: min(560px, calc(100% - 28px)); translate: -50% 0;
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 16px; background: rgba(12, 14, 24, .78); color: #fff;
  font: 600 13.5px/1.4 var(--sans); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(-10px); transition: opacity .35s, transform .5s var(--silk); pointer-events: none;
}
.rp-toast.is-on { opacity: 1; transform: none; }
.rp-toast.is-on button { pointer-events: auto; }   /* the note never blocks the photo; only its button takes a tap */
.rp-toast button { flex: none; border: 0; border-radius: 999px; padding: 7px 12px; background: var(--saffron); color: #1b1407; font: 800 12px/1 var(--sans); cursor: pointer; }

/* reading the room */
.rp-scan { position: absolute; inset: 0; z-index: 4; background: rgba(8, 10, 20, .42); display: grid; place-items: center; overflow: hidden; }
.rp-scan-beam {
  position: absolute; left: 0; right: 0; top: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(244, 198, 106, .2) 70%, rgba(244, 198, 106, .75) 99%, transparent);
  animation: rp-beam 1.5s cubic-bezier(.45, 0, .2, 1) infinite;
}
@keyframes rp-beam { from { transform: translateY(-100%); } to { transform: translateY(300%); } }
.rp-scan ol { position: relative; list-style: none; margin: 0; padding: 18px 22px; border-radius: 18px; background: rgba(12, 14, 24, .72); color: #fff; display: grid; gap: 10px; font: 600 14px/1.2 var(--sans); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rp-scan li { display: flex; align-items: center; gap: 10px; opacity: .4; transition: opacity .3s; }
.rp-scan li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; flex: none; box-sizing: border-box; }
.rp-scan li.is-on { opacity: 1; }
.rp-scan li.is-on::before { border-color: var(--glow); border-right-color: transparent; animation: rp-spin .8s linear infinite; }
.rp-scan li.is-done { opacity: 1; }
.rp-scan li.is-done::before { border: 0; background: var(--saffron) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.3 2.6 2.6L12 5.6' fill='none' stroke='%231b1407' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; animation: none; }
@keyframes rp-spin { to { transform: rotate(1turn); } }

/* before / after */
.rp-split { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.rp-split-line { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .5); }
.rp-split-knob {
  position: absolute; top: 50%; left: var(--x, 50%); width: 48px; height: 48px; margin: -24px 0 0 -24px; border: 0; border-radius: 50%;
  background: #fff; color: #16192b; display: grid; place-items: center; pointer-events: auto; cursor: ew-resize; touch-action: none;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .4);
}
.rp-split-knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rp-split-tag { position: absolute; bottom: 18px; padding: 6px 11px; border-radius: 999px; background: rgba(12, 14, 24, .68); color: #fff; font: 700 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.rp-split-before { left: 14px; }
.rp-split-after { right: 14px; }

/* ---------- the side panel ---------- */
.rp-side {
  overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-left: 1px solid var(--line);
  padding: 18px 18px 96px; display: flex; flex-direction: column; gap: 16px;
}
.rp-side > * { flex: none; }   /* nothing in the panel gets squeezed (the rug strip scrolls sideways) */
.rp-rug { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.rp-rug-img { width: 76px; height: 96px; object-fit: contain; border-radius: 8px; background: var(--bg-2); padding: 4px; grid-row: span 1; }
.rp-rug-name { font: 400 26px/1.05 var(--serif); letter-spacing: -.01em; }
.rp-rug-meta { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }
.rp-rug-price { font: 700 16px/1.2 var(--sans); margin-top: 6px; }
.rp-rug-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.rp-rug-actions .btn { min-height: 44px; }
.rp-add.is-added { background: var(--turq); }
.rp-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; padding: 4px; border-radius: 16px; background: var(--bg-2); }
.rp-tools button {
  display: grid; justify-items: center; gap: 5px; padding: 9px 2px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink-2);
  font: 700 12px/1 var(--sans); cursor: pointer; transition: background-color .25s, color .25s, box-shadow .25s;
}
.rp-tools svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .rp-tools button:hover { color: var(--ink); } }
.rp-tools button[aria-pressed='true'] { background: var(--surface); color: var(--lapis); box-shadow: 0 1px 2px rgba(22, 25, 43, .1), 0 4px 12px -6px rgba(22, 25, 43, .3); }
[data-theme='dark'] .rp-tools button[aria-pressed='true'] { background: var(--night); }
.rp-pane { display: grid; gap: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; animation: rp-in .45s var(--silk) both; }
@keyframes rp-in { from { opacity: 0; transform: translateY(6px); } }
.rp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rp-row .chip-btn[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rp-slider { display: grid; grid-template-columns: 92px minmax(0, 1fr) 54px; align-items: center; gap: 10px; color: var(--ink); font: 700 13px/1 var(--sans); }
.rp-slider output { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.rp-slider input[type='range'] { width: 100%; height: 28px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.rp-slider input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.rp-slider input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.rp-slider input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--saffron); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.rp-slider input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--saffron); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.rp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--bg-2); }
.rp-seg button { min-height: 36px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: 700 12.5px/1 var(--sans); cursor: pointer; }
.rp-seg button[aria-checked='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(22, 25, 43, .15); }
[data-theme='dark'] .rp-seg button[aria-checked='true'] { background: var(--night); }
.rp-switch { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; cursor: pointer; }
.rp-switch input { width: 20px; height: 20px; accent-color: var(--lapis); }
.rp-match-size input, .rp-tape-real {
  width: 82px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
  color: var(--ink); font: 600 16px/1 var(--sans);   /* 16px: iPhones zoom in on smaller text fields */
}
.rp-tape-read { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; color: var(--ink); }
.rp-tape-read b { font-variant-numeric: tabular-nums; }
.rp-space-read b { color: var(--ink); }
.rp-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-act .btn { min-height: 46px; padding: 0 12px; font-size: 13.5px; }
.rp-h3 { font: 700 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.rp-count { letter-spacing: 0; text-transform: none; font-weight: 600; }
.rp-looks-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rp-looks-list li { position: relative; }
.rp-look { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-2); aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.rp-look img { width: 100%; height: 100%; object-fit: cover; }
.rp-looks-list .rp-forget { width: 24px; height: 24px; top: 4px; right: 4px; }
.rp-looks-list .rp-forget svg { width: 12px; height: 12px; }
.rp-list-head { display: grid; gap: 10px; }
.rp-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rp-filters::-webkit-scrollbar { display: none; }
.rp-filters button { flex: none; }
.rp-filters button[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rp-card {
  width: 100%; display: grid; gap: 4px; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  text-align: left; cursor: pointer; transition: border-color .25s, box-shadow .25s, transform .4s var(--silk);
}
@media (hover: hover) { .rp-card:hover { border-color: var(--line-2); transform: translateY(-2px); } }
.rp-card[aria-pressed='true'] { border-color: var(--lapis); box-shadow: 0 0 0 1.5px var(--lapis); }
.rp-card-pic { height: 108px; display: grid; place-items: center; border-radius: 9px; background: var(--bg-2); margin-bottom: 4px; overflow: hidden; }
.rp-card-pic img { max-width: 86%; max-height: 92px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .25)); }
.rp-card b { font: 500 15.5px/1.15 var(--serif); }
.rp-card small { color: var(--ink-3); font-size: 12px; line-height: 1.3; }
.rp-card .rp-card-price { font: 700 12.5px/1.2 var(--sans); color: var(--ink); }
.rp-card .rp-fit { color: var(--turq); font-weight: 700; }
[data-theme='dark'] .rp-card .rp-fit { color: #5fd0c4; }
.rp-empty { grid-column: 1 / -1; color: var(--ink-3); font-size: 14px; padding: 6px 0; }


/* ---------- tablets and phones ---------- */
@media (max-width: 1180px) {
  .rp-app { grid-template-columns: minmax(0, 1fr) 340px; }
  .rp-samples, .rp-mine-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-sample { aspect-ratio: 4 / 3; }
  .rp-act { grid-template-columns: 1fr; }   /* the 340 px panel: Save and Share one above the other, so their words stay whole */
}
@media (max-width: 960px) {
  .rp-start { grid-template-columns: 1fr; grid-template-areas: "intro" "demo" "more"; gap: 28px; padding-top: 22px; min-height: 0; }
  .rp-intro, .rp-more { max-width: none; }
  .rp-more > .rp-h, .rp-mine > .rp-h { margin-top: 6px; }
  /* phones: the tools stay pinned under the photo while the sheet scrolls; the rugs come right after */
  .rp-side > .rp-tools { order: -2; position: sticky; top: 0; z-index: 2; box-shadow: 0 -10px 0 14px var(--surface), 0 10px 0 14px var(--surface); }
  .rp-side > :not(.rp-tools), .rp-side > :not(.rp-tools) * { scroll-margin-top: 92px; }   /* whatever scrolls (or is focused) into view stays clear of the pinned tools (the tools themselves never need to) */
  .rp-side > .rp-panes { order: -1; }
  .rp-pane[data-pane="move"] > p { display: none; }
  .rp-side > .rp-looks { order: 2; }
  .rp-demo-frame { height: auto; width: min(100%, 520px, calc(58svh * var(--ar, .75))); }
  .rp-app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .rp-stage { height: var(--stage-h, 52svh); }
  .rp-side { border-left: 0; border-top: 1px solid var(--line); padding: 14px var(--gutter) 90px; gap: 14px; }
  .rp-list { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 136px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: thin; }
  .rp-list li { scroll-snap-align: start; }
  .rp-looks-list { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 120px; overflow-x: auto; }
  .rp-act { grid-template-columns: 1fr 1fr; }   /* full width again: side by side */
}
@media (hover: none) and (pointer: coarse) {
  .rp-take { display: inline-flex; }
  .rp-drop { display: none; }
}
@media (max-width: 560px) {
  .rp-title { font-size: clamp(42px, 13vw, 60px); }
  .rp-actions .btn { flex: 1 1 100%; }
  .rp-top { top: 10px; left: 10px; right: 10px; }
  .rp-chip { min-height: 38px; padding: 0 12px 0 9px; font-size: 12.5px; }
  .rp-compare span, .rp-reset span { display: none; }
  .rp-own-long { display: none; }
  .rp-own-short { display: inline; }
  .rp-roomchip span { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }   /* tall enough for the g of Living room */
  .rp-compare, .rp-reset { padding: 0 11px; }
  .rp-tools button { font-size: 12px; padding: 8px 0 7px; }
  .rp-slider { grid-template-columns: 78px minmax(0, 1fr) 48px; }
  .rp-rug { grid-template-columns: 58px minmax(0, 1fr); }
  .rp-rug-img { width: 58px; height: 72px; }
  .rp-rug-name { font-size: 22px; }
  .rp-act .btn { font-size: 13px; }
}
@media (max-width: 360px) {
  .rp-act { grid-template-columns: 1fr; }
  .rp-roomchip span { display: none; }   /* the back arrow alone: its name says the room */
  .rp-roomchip { padding: 0 11px; }
  .rp-tools svg { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-scan-beam, .rp-live::before, .rp-scan li.is-on::before { animation: none; }
  .rp-pane { animation: none; }
}

/* ---------- home page, chapter 02 · Your room ---------- */
.yr { padding: clamp(84px, 15vh, 170px) var(--gutter) clamp(84px, 14vh, 150px); }
.yr-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 88px); align-items: center; max-width: 1560px; margin: 0 auto; }
.yr .ch-title { margin-top: 14px; }
.yr .ch-lead { margin-top: 18px; }
.yr-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.yr-points li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 1px 12px; align-items: start; }
.yr-points li::before {
  content: ''; grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; margin-top: 1px;
  background: color-mix(in srgb, var(--saffron) 24%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='m9.5 15.4 3.6 3.6 7.4-7.6' fill='none' stroke='%23a26a12' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.yr-points b { font: 700 15.5px/1.3 var(--sans); }
.yr-points span { color: var(--ink-2); font-size: 15px; }
.yr-cta { margin-top: 30px; }
.yr-cta svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.yr-stage { margin: 0; }
.yr-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-lg); }
.yr-frame > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.yr-stage figcaption { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 960px) {
  .yr-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- on the floor or on the wall, and more than one rug ---------- */
.rp-place button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.rp-place svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rp-place button[aria-checked='true'] { color: var(--lapis); }
.rp-pl-short { display: none; }
.rp[data-count='0'] .rp-place { display: none; }
.rp[data-place='wall'] .rp-on-floor, .rp:not([data-place='wall']) .rp-on-wall { display: none; }

.rp-inroom { display: grid; gap: 10px; }
.rp-inroom-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rp-inroom-total { font: 700 13px/1 var(--sans); color: var(--ink); }
.rp[data-count='0'] .rp-inroom-head, .rp[data-count='1'] .rp-inroom-head { display: none; }
.rp-inroom-list { list-style: none; margin: 0; padding: 2px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.rp-inroom-list::-webkit-scrollbar { display: none; }
.rp-placed {
  display: flex; align-items: center; gap: 9px; min-height: 50px; padding: 5px 14px 5px 5px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg); color: var(--ink); text-align: left; cursor: pointer; white-space: nowrap; transition: border-color .25s, box-shadow .25s;
}
.rp-placed img { width: 34px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--bg-2); padding: 2px; }
.rp-placed span { display: grid; gap: 2px; font: 700 12.5px/1.2 var(--sans); }
.rp-placed small { font-weight: 500; font-size: 12px; color: var(--ink-3); }
@media (hover: hover) { .rp-placed:hover { border-color: var(--ink); } }
.rp-placed[aria-pressed='true'] { border-color: var(--lapis); box-shadow: 0 0 0 1.5px var(--lapis); }
.rp-addrug svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.rp-row .chip-btn.rp-addrug[aria-pressed='true'] { background: var(--saffron); border-color: var(--saffron); color: #1b1407; }
.rp-remove { color: var(--ink-2); }

.rp-li { position: relative; }
.rp-card-add {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer;
  transition: background-color .25s, color .25s, transform .3s var(--spring);
}
.rp-card-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.rp-card-add:focus-visible { background: var(--saffron); color: #1b1407; transform: scale(1.08); }
@media (hover: hover) { .rp-card-add:hover { background: var(--saffron); color: #1b1407; transform: scale(1.08); } }
.rp.is-adding .rp-card { border-color: color-mix(in srgb, var(--saffron) 70%, var(--line)); }
.rp.is-adding .rp-what::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--saffron); vertical-align: 1px; animation: rp-blink 1.6s ease-in-out infinite; }

/* ---------- touch screens: 44 px under every finger ---------- */
@media (pointer: coarse) {
  .rp-chip { min-height: 44px; }
  .rp-seg button { min-height: 44px; }
  .rp-tips summary { min-height: 44px; }
  .rp-switch { min-height: 44px; }
  .rp-slider { min-height: 44px; }
  .rp-slider input[type='range'] { height: 44px; }
  .rp-match-size input, .rp-tape-real { min-height: 44px; }
  .rp-forget::after, .rp-card-add::after, .rp-toast button::after { content: ''; position: absolute; inset: -7px; border-radius: inherit; }
  .rp-looks-list .rp-forget::after { inset: -10px; }
  .rp-card-add::after { inset: -5px; }
  .rp-toast button { position: relative; min-height: 34px; }
}

/* ---------- a phone on its side: the photo on the left, the tools on the right ---------- */
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .rp-app { grid-template-columns: minmax(0, 1fr) min(340px, 48vw); grid-template-rows: minmax(0, 1fr); height: calc(100svh - var(--hdr)); }
  .rp-stage { height: auto; }
  .rp-side { border-top: 0; border-left: 1px solid var(--line); padding: 10px max(14px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) 14px; gap: 12px; }
  .rp-side > .rp-tools { box-shadow: 0 -10px 0 10px var(--surface), 0 10px 0 10px var(--surface); }
  .rp-top { top: 10px; left: max(10px, env(safe-area-inset-left)); right: 10px; }   /* clear of a notch on the left */
  .rp-compare span, .rp-reset span, .rp-own-long { display: none; }
  .rp-own-short { display: inline; }
  .rp-compare, .rp-reset { padding: 0 11px; }
  .rp-split-before { left: max(14px, env(safe-area-inset-left)); }
  .rp-start { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); grid-template-areas: "intro demo" "more demo"; align-items: start; }
  .rp-demo-frame { width: min(100%, calc((100svh - var(--hdr) - 70px) * var(--ar, .75))); }
  .yr-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }   /* home chapter 02: words beside the live room */
}
@media (pointer: coarse) { .rp-chip { min-width: 44px; justify-content: center; } }
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .rp-act { grid-template-columns: 1fr; }   /* the narrow tools column: Save and Share one above the other, words whole */
}
