/* ============================================================
   LIVSTYL — 3D DIY Room (/3d-diy/room). Uses tokens.css variables.
   Desktop: stage + glass side panel. ≤900px: full stage + bottom sheet.
   ============================================================ */
.rd {
  --rd-h: calc(100vh - var(--header-h));
  --rd-panel-w: 392px;
  --rd-bg: #E7E1D8;
  --rd-sheet-peek: 148px;
  position: relative; height: var(--rd-h); min-height: 620px; overflow: hidden; isolation: isolate;
  background: var(--rd-bg); transition: background .8s var(--ease);
  font-family: var(--font-body); color: var(--ink);
}
@supports (height: 100svh) { .rd { --rd-h: calc(100svh - var(--header-h)); } }
.rd[data-mood="golden"] { --rd-bg: #E6D2BA; }
.rd[data-mood="evening"] { --rd-bg: #2C2A31; }
.rd[data-mood="night"] { --rd-bg: #131419; }
.rd .sr-only, .ds-print .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rd [hidden] { display: none !important; }
.rd button { font-family: inherit; }
.rd :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Stage ─────────────────────────────────────────────── */
.rd-stage { position: absolute; inset: 0 calc(var(--rd-panel-w) + 24px) 0 0; }
.rd-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.rd-stage canvas:active { cursor: grabbing; }
.rd-stage canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.rd-stage.is-drop::after { content: "Drop to place"; position: absolute; inset: 12px; border: 2px dashed var(--coral); border-radius: var(--r-lg); display: grid; place-items: center; color: var(--coral-deep); font-weight: 700; background: rgba(232,93,95,.06); pointer-events: none; }
.rd-plan2d:not([hidden]) { display: block !important; }
.rd-plan2d { position: absolute; inset: 70px 20px 90px; width: calc(100% - 40px); height: calc(100% - 160px); touch-action: none; }
.rd-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rd-lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 11.5px/1 var(--font-body); padding: 6px 9px; border-radius: var(--r-pill); will-change: transform; }
.rd-lbl--sel { background: var(--charcoal); color: var(--white); box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
.rd-lbl--meas { background: var(--coral); color: var(--white); font-size: 11px; padding: 4px 7px; }
.rd-lbl--dim { background: rgba(250,247,242,.9); color: var(--charcoal); border: 1px solid var(--line); }

.rd-loading {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center;
  color: var(--ink); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .03em;
  background: radial-gradient(70% 60% at 50% 45%, #F6E3C6 0%, #E6D2BA 55%, #D9C3A8 100%); transition: opacity .5s var(--ease);
}
.rd-loading.is-done { opacity: 0; }
.rd-loading__sun { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #FFE9C4 0 30%, #F6B26B 55%, rgba(232,93,95,.0) 72%); box-shadow: 0 0 60px 10px rgba(255,190,120,.55); animation: rd-sun 2.4s var(--ease) infinite alternate; }
@keyframes rd-sun { from { transform: translateY(8px) scale(.94); } to { transform: translateY(-6px) scale(1.04); } }
.rd-nogl { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 3; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); font-size: 13px; }
.rd-nogl i { color: var(--gold); margin-top: 3px; }
.rd-nogl p { margin: 0; }
.rd.is-2d .rd-bar { display: none; }

/* Glass chips shared look */
.rd-titlechip, .rd-seg, .rd-bar, .rd-inspector, .rd-walk__pad, .rd-walk__hint {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: 0 10px 30px -14px rgba(30,29,27,.35);
}
.rd[data-mood="evening"] .rd-titlechip, .rd[data-mood="night"] .rd-titlechip,
.rd[data-mood="evening"] .rd-seg, .rd[data-mood="night"] .rd-seg,
.rd[data-mood="evening"] .rd-bar, .rd[data-mood="night"] .rd-bar { background: rgba(250,247,242,.82); }

.rd-top { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; pointer-events: none; }
.rd-top > * { pointer-events: auto; }
.rd-titlechip { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: var(--r-pill); margin-right: auto; }
.rd-titlechip__back { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--charcoal); color: var(--white); text-decoration: none; flex-shrink: 0; transition: transform .2s var(--ease); }
.rd-titlechip__back:hover { transform: translateX(-2px); }
.rd-titlechip__eyebrow { margin: 0 0 2px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.rd-titlechip__title { margin: 0; font: 400 clamp(1.05rem, .9rem + .5vw, 1.35rem)/1.1 var(--font-display); color: var(--charcoal); white-space: nowrap; }
.rd-titlechip__title em { font-style: italic; color: var(--muted); font-size: .8em; margin-left: 4px; }

.rd-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); }
.rd-seg__btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font: 600 13px/1 var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.rd-seg__btn i { font-size: .85rem; opacity: .8; }
.rd-seg__btn:hover { background: rgba(255,255,255,.7); }
.rd-seg__btn[aria-pressed="true"] { background: var(--charcoal); color: var(--white); }
.rd-seg__btn:disabled { opacity: .35; cursor: not-allowed; }
.rd-seg--mood .rd-seg__lbl { display: none; }
.rd-seg--mood .rd-seg__btn { padding: 0 11px; }
.rd-seg--mood .rd-seg__btn[aria-pressed="true"] { background: var(--grad-brand); }
.rd-seg--mood .rd-seg__btn[aria-pressed="true"] .rd-seg__lbl { display: inline; }

/* Bottom toolbar */
.rd-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: var(--r-pill); max-width: calc(100% - 32px); }
.rd-bar__sep { width: 1px; height: 26px; background: var(--line-strong); margin: 0 4px; flex-shrink: 0; }
.rd-tool { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 54px; min-height: 48px; padding: 4px 8px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); font: 600 10.5px/1 var(--font-body); cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.rd-tool i { font-size: 15px; }
.rd-tool:hover:not(:disabled) { background: rgba(255,255,255,.75); }
.rd-tool:active:not(:disabled) { transform: scale(.95); }
.rd-tool:disabled { opacity: .35; cursor: not-allowed; }
.rd-tool[aria-pressed="true"] { color: var(--coral-deep); background: rgba(232,93,95,.12); }
.rd-tool[aria-pressed="true"]#rdWish i { color: var(--coral); }
.rd-tool--danger:hover { color: var(--danger); }

/* Inspector */
.rd-inspector { position: absolute; left: 16px; bottom: 88px; z-index: 3; width: min(360px, calc(100% - 32px)); border-radius: var(--r-lg); padding: 14px 14px 10px; animation: rd-pop .35s var(--ease-spring); max-height: calc(100% - 180px); overflow: auto; }
@keyframes rd-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.rd-inspector__head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.rd-inspector__cat { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.rd-inspector__name { margin: 2px 0 4px; font: 400 1.2rem/1.15 var(--font-display); color: var(--charcoal); }
.rd-inspector__meta { margin: 0; font-size: 12px; color: var(--muted); }
.rd-inspector__meta strong { color: var(--charcoal); }
.rd-inspector__body { margin: 10px 0 4px; display: grid; gap: 10px; }
.rd-inspector__tools { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
.rd-inspector__tools .rd-tool { min-width: 0; flex: 1; }
.rd-ins-row { display: grid; gap: 6px; }
.rd-ins-row > span, .rd-ins-row > label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rd-ins-row > label b { color: var(--charcoal); letter-spacing: 0; }
.rd-icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(30,29,27,.06); color: var(--ink); cursor: pointer; flex-shrink: 0; }
.rd-icon-btn:hover { background: rgba(30,29,27,.12); }

/* Walkthrough */
.rd-walk { position: absolute; right: 16px; bottom: 88px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.rd-walk__hint { margin: 0; padding: 8px 14px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.rd-walk__pad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 46px); gap: 4px; padding: 6px; border-radius: 20px; }
.rd-walk__pad button { border: 0; border-radius: 12px; background: rgba(255,255,255,.75); color: var(--charcoal); cursor: pointer; font-size: 15px; touch-action: none; user-select: none; }
.rd-walk__pad button:active { background: var(--charcoal); color: var(--white); }
.rd-walk__pad [data-walk="f"] { grid-column: 2; grid-row: 1; }
.rd-walk__pad [data-walk="l"] { grid-column: 1; grid-row: 2; }
.rd-walk__pad [data-walk="b"] { grid-column: 2; grid-row: 2; }
.rd-walk__pad [data-walk="r"] { grid-column: 3; grid-row: 2; }

/* Restyle shimmer */
.rd.is-restyling .rd-stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(255,226,180,.45) 50%, transparent 70%); background-size: 250% 100%; animation: rd-sweep 1.1s var(--ease) forwards; }
@keyframes rd-sweep { from { background-position: 120% 0; } to { background-position: -40% 0; opacity: 0; } }

/* ── Panel ─────────────────────────────────────────────── */
.rd-panel {
  position: absolute; top: 16px; right: 16px; bottom: 16px; width: var(--rd-panel-w); z-index: 5;
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(250,247,242,.9); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.rd-sheet-handle { display: none; }
.rd-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.rd-tab { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 2px 8px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font: 600 11px/1 var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.rd-tab i { font-size: 15px; }
.rd-tab:hover { color: var(--charcoal); background: rgba(255,255,255,.7); }
.rd-tab[aria-selected="true"] { background: var(--charcoal); color: var(--white); }
.rd-tab[aria-selected="true"] i { color: var(--gold-2); }
.rd-panel__body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rd-pane { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 22px; scrollbar-width: thin; }

.rd-field { margin-bottom: 20px; }
.rd-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rd-label--inline { margin: 0; }
.rd-label--range { margin-top: 16px; }
.rd-label__hint, .rd-label__val { font-size: 11px; letter-spacing: .02em; text-transform: none; font-weight: 600; color: var(--ink); }
.rd-label__hint { color: var(--gold-deep); }
.rd-hint { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rd-fine { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 12px 0; }
.rd-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: 12px; }
.rd-row--wrap { flex-wrap: wrap; justify-content: flex-start; margin-top: 0; }
.rd-sub { padding: 14px 14px 2px; margin: -6px 0 18px; border-radius: var(--r); background: rgba(255,255,255,.6); border: 1px solid var(--line); }

.rd-rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rd-room { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 74px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255,255,255,.7); color: var(--ink); font: 600 11.5px/1.2 var(--font-body); text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.rd-room i { font-size: 18px; color: var(--gold); }
.rd-room:hover { border-color: var(--line-strong); background: var(--white); transform: translateY(-1px); }
.rd-room[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.rd-room[aria-pressed="true"] i { color: var(--gold-3); }

.rd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: rgba(255,255,255,.75); color: var(--ink); font: 600 12px/1.1 var(--font-body); cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.rd-chip i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.rd-chip:hover { border-color: var(--line-strong); background: var(--white); }
.rd-chip[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.rd-chip--size { flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 12px; border-radius: 14px; flex: 1 1 calc(50% - 6px); }
.rd-chip--size span { font-weight: 500; font-size: 11px; opacity: .75; }
.rd-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.rd-num { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.8); }
.rd-num span { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rd-num input { width: 100%; min-width: 0; border: 0; background: transparent; font: 700 14px var(--font-body); color: var(--charcoal); padding: 2px 0; text-align: right; }
.rd-num input:focus { outline: none; }
.rd-num:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.rd-num em { font-style: normal; font-size: 11px; color: var(--muted); }
.rd-mini-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: rgba(30,29,27,.06); }
.rd-mini-seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: var(--r-pill); font: 600 12px/1 var(--font-body); color: var(--ink); cursor: pointer; }
.rd-mini-seg button[aria-pressed="true"] { background: var(--white); color: var(--charcoal); box-shadow: var(--shadow-sm); }
.rd-btn-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: rgba(255,255,255,.7); color: var(--charcoal); font: 600 12.5px/1 var(--font-body); cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.rd-btn-ghost i { color: var(--gold); }
.rd-btn-ghost:hover { background: var(--white); transform: translateY(-1px); }
.rd-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; color: var(--charcoal); font: 600 13px/1.2 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rd-link:disabled { opacity: .4; cursor: default; }
.rd-help { padding: 12px 14px; border-radius: var(--r); background: rgba(176,141,87,.08); font-size: 12px; color: var(--ink); line-height: 1.55; }
.rd-help p { margin: 0 0 6px; } .rd-help p:last-child { margin: 0; }
.rd-help i { color: var(--gold); width: 16px; }
.rd-help kbd { font: 600 10.5px var(--font-body); padding: 1px 5px; border-radius: 4px; background: var(--white); border: 1px solid var(--line-strong); }

.rd-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.rd-sw { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--sw, var(--white)); box-shadow: inset 0 0 0 1px rgba(30,29,27,.14); transition: transform .2s var(--ease), box-shadow .2s; }
.rd-swatches--sm .rd-sw { width: 26px; height: 26px; }
.rd-sw:hover { transform: scale(1.1); }
.rd-sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(30,29,27,.14), 0 0 0 2px var(--ivory), 0 0 0 4px var(--charcoal); }
.rd-sw--custom { display: grid; place-items: center; background: conic-gradient(from 0deg, #E85D5F, #D9A441, #9AA58E, #2F4A6D, #6E2A35, #E85D5F); color: var(--white); font-size: 11px; overflow: hidden; }
.rd-sw--custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.rd-sw--custom i { pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

.rd-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 13px/1.2 var(--font-body); cursor: pointer; text-align: left; margin-top: 4px; }
.rd-toggle__track { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--beige-2); transition: background .2s; flex-shrink: 0; }
.rd-toggle__track span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease-spring); }
.rd-toggle[aria-pressed="true"] .rd-toggle__track { background: var(--coral); }
.rd-toggle[aria-pressed="true"] .rd-toggle__track span { transform: translateX(16px); }

/* Tiles with CSS material previews */
.rd-tiles { display: grid; gap: 7px; margin-bottom: 8px; }
.rd-tiles--3 { grid-template-columns: repeat(3, 1fr); }
.rd-tile { display: flex; flex-direction: column; gap: 6px; padding: 5px 5px 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.75); cursor: pointer; text-align: left; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.rd-tile:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.rd-tile[aria-pressed="true"] { border-color: var(--charcoal); box-shadow: 0 0 0 2px var(--charcoal); }
.rd-tile__img { display: block; aspect-ratio: 4 / 3; border-radius: 10px; background: #ddd; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.rd-tile__lbl { font: 600 11px/1.25 var(--font-body); color: var(--ink); padding: 0 3px; }
.rd-wf--paint { background: #E9E2D7; }
.rd-wf--limewash { background: radial-gradient(circle at 30% 30%, #EFE6D6, transparent 50%), radial-gradient(circle at 70% 70%, #D8CBB6, transparent 55%), #E3D8C6; }
.rd-wf--texture { background: repeating-radial-gradient(circle at 20% 30%, #DDD3C4 0 1px, #E8DFD1 1px 3px); }
.rd-wf--wp-botanic { background: radial-gradient(ellipse 6px 3px at 30% 30%, #6E745C 98%, transparent), radial-gradient(ellipse 6px 3px at 70% 65%, #6E745C 98%, transparent), #EFE6D6; background-size: 24px 24px; }
.rd-wf--wp-geo { background: radial-gradient(circle at 50% 100%, transparent 9px, #B08D57 10px, transparent 11px), #F3EEE6; background-size: 20px 20px; }
.rd-wf--wp-stripe { background: repeating-linear-gradient(90deg, #E7DED0 0 6px, #D6CCBC 6px 8px); }
.rd-wf--fluted { background: repeating-linear-gradient(90deg, #CDBFAA 0, #EFE6D6 3px, #CDBFAA 6px); }
.rd-wf--slats { background: repeating-linear-gradient(90deg, #A87B52 0 6px, #3A2E25 6px 9px); }
.rd-wf--moulding { background: linear-gradient(#EFE8DC, #EFE8DC) padding-box, #EFE8DC; box-shadow: inset 0 0 0 6px #EFE8DC, inset 0 0 0 8px #D6CCBC, inset 0 0 0 14px #EFE8DC, inset 0 0 0 16px #D6CCBC; }
.rd-wf--stone { background: linear-gradient(90deg, transparent 48%, #8f877c 48% 52%, transparent 52%) 0 0 / 36px 14px, linear-gradient(0deg, #8f877c 2px, transparent 2px) 0 0 / 36px 14px, #BFB5A6; }
.rd-wf--brick { background: linear-gradient(90deg, #D6CCBC 2px, transparent 2px) 0 0 / 22px 11px, linear-gradient(0deg, #D6CCBC 2px, transparent 2px) 0 0 / 22px 11px, #9A5B44; }
.rd-fl { --c: #ccc; background-color: var(--c); }
.rd-fl--tile, .rd-fl--tile-small, .rd-fl--marble { background-image: linear-gradient(rgba(0,0,0,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.18) 1px, transparent 1px); background-size: 50% 50%; }
.rd-fl--tile-small { background-size: 25% 25%; }
.rd-fl--marble { background-image: linear-gradient(120deg, transparent 40%, rgba(120,110,100,.25) 42%, transparent 46%), linear-gradient(rgba(0,0,0,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.12) 1px, transparent 1px); background-size: 100% 100%, 50% 50%, 50% 50%; }
.rd-fl--planks, .rd-fl--deck { background-image: linear-gradient(rgba(0,0,0,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08), rgba(0,0,0,.08)); background-size: 100% 20%, 40% 20%; }
.rd-fl--deck { background-image: linear-gradient(rgba(0,0,0,.6) 2px, transparent 2px); background-size: 100% 16%; }
.rd-fl--herringbone { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.18) 0 1px, transparent 1px 10px), repeating-linear-gradient(-45deg, rgba(255,255,255,.12) 0 1px, transparent 1px 10px); }
.rd-fl--terrazzo { background-image: radial-gradient(#B5583A 1.5px, transparent 2px), radial-gradient(#6E745C 1.5px, transparent 2px), radial-gradient(#2B2A28 1px, transparent 1.5px); background-size: 14px 14px, 18px 18px, 11px 11px; background-position: 0 0, 5px 7px, 3px 2px; }
.rd-fl--concrete { background-image: radial-gradient(circle at 30% 40%, rgba(255,255,255,.2), transparent 40%), radial-gradient(circle at 70% 70%, rgba(0,0,0,.08), transparent 50%); }
.rd-ce { background: #F4F0EA; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.rd-ce--peripheral { box-shadow: inset 0 0 0 9px #E6E0D6, inset 0 0 0 10px rgba(0,0,0,.08); }
.rd-ce--cove { box-shadow: inset 0 0 0 9px #E6E0D6, inset 0 0 0 10px #FFC68A, inset 0 0 14px 12px rgba(255,198,138,.6); }
.rd-ce--tray { box-shadow: inset 0 0 0 7px #E6E0D6, inset 0 0 0 8px rgba(0,0,0,.08), inset 0 0 0 14px #EDE7DE, inset 0 0 0 15px #FFC68A; }
.rd-ce--rafters { background: repeating-linear-gradient(90deg, #F4F0EA 0 8px, #8A6446 8px 11px); }
.rd-ce--coffered { background: linear-gradient(90deg, #DCD4C8 2px, transparent 2px) 0 0 / 33.3% 50%, linear-gradient(#DCD4C8 2px, transparent 2px) 0 0 / 33.3% 50%, #F4F0EA; }

.rd-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rd-mood { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 84px; padding: 12px; border: 0; border-radius: 16px; color: var(--white); cursor: pointer; text-align: left; position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.rd-mood i { font-size: 16px; margin-bottom: 4px; }
.rd-mood strong { font-size: 13px; }
.rd-mood span { font-size: 11px; opacity: .85; line-height: 1.3; }
.rd-mood--day { background: linear-gradient(160deg, #9CC3E6, #E8EEF0); color: var(--charcoal); }
.rd-mood--golden { background: linear-gradient(160deg, #F2A86B, #FFD9A0 70%, #FFF0D6); color: #3B2414; }
.rd-mood--evening { background: linear-gradient(160deg, #2D2F5A, #8C5A86 60%, #F08A5C); }
.rd-mood--night { background: linear-gradient(160deg, #070A18, #26304F); }
.rd-mood:hover { transform: translateY(-2px); }
.rd-mood[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ivory), 0 0 0 4px var(--charcoal); }
.rd-range { width: 100%; accent-color: var(--coral); }

.rd-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.rd-style { display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.75); cursor: pointer; text-align: left; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.rd-style:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.rd-style[aria-pressed="true"] { border-color: var(--charcoal); box-shadow: 0 0 0 2px var(--charcoal); }
.rd-style__pal { display: flex; height: 46px; border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.rd-style__pal i { flex: 1; }
.rd-style__pal i:first-child { flex: 2; }
.rd-style strong { font: 400 1.05rem/1.1 var(--font-display); color: var(--charcoal); padding: 0 4px; }
.rd-style span { font-size: 11px; color: var(--muted); padding: 0 4px; }

/* Catalogue */
.rd-search { position: relative; margin-bottom: 10px; }
.rd-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.rd-search input { width: 100%; min-height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--white); font: 500 14px var(--font-body); color: var(--charcoal); }
.rd-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.rd-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin: 0 -18px 6px; padding-left: 18px; padding-right: 18px; scrollbar-width: none; }
.rd-cats::-webkit-scrollbar { display: none; }
.rd-cat { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: rgba(255,255,255,.75); font: 600 12px/1 var(--font-body); color: var(--ink); cursor: pointer; }
.rd-cat i { color: var(--gold); font-size: 11px; }
.rd-cat[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.rd-cat[aria-pressed="true"] i { color: var(--gold-3); }
.rd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rd-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 5px 5px 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); cursor: pointer; text-align: left; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.rd-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.rd-card:active { transform: scale(.97); }
.rd-card__img { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; background: radial-gradient(90% 90% at 50% 30%, #FFFFFF, #F1ECE3); color: var(--gold); font-size: 22px; overflow: hidden; }
.rd-card__img img { width: 100%; height: 100%; object-fit: contain; animation: rd-fade .4s var(--ease); }
@keyframes rd-fade { from { opacity: 0; transform: scale(.94); } }
.rd-card__name { font: 600 11.5px/1.25 var(--font-body); color: var(--charcoal); padding: 0 3px; }
.rd-card__price { font-size: 10.5px; color: var(--muted); padding: 0 3px; }
.rd-card__add { position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: var(--white); font-size: 10px; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s var(--ease-spring); }
.rd-card:hover .rd-card__add, .rd-card:focus-visible .rd-card__add { opacity: 1; transform: scale(1); }

/* Budget */
.rd-tiers { display: grid; gap: 6px; }
.rd-tier { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.75); text-align: left; cursor: pointer; }
.rd-tier strong { font-size: 13px; color: var(--charcoal); }
.rd-tier span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.rd-tier[aria-pressed="true"] { border-color: var(--charcoal); box-shadow: 0 0 0 2px var(--charcoal); background: var(--white); }
.rd-budget__total { display: grid; gap: 4px; padding: 16px; margin-bottom: 10px; border-radius: 18px; color: var(--white); background: var(--grad-dark); }
.rd-budget__total span { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-3); }
.rd-budget__total strong { font: 400 1.5rem/1.15 var(--font-display); }
.rd-budget__total em { font-style: normal; font-size: 11.5px; opacity: .75; }
.rd-budget__grp { border-bottom: 1px solid var(--line); }
.rd-budget__grp summary, .rd-budget__sub { display: flex; justify-content: space-between; gap: 8px; padding: 10px 2px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--charcoal); list-style: none; margin: 0; }
.rd-budget__grp summary::-webkit-details-marker { display: none; }
.rd-budget__grp summary::after { content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--muted); margin-left: 6px; }
.rd-budget__grp[open] summary::after { content: "\f106"; }
.rd-budget__grp summary span { flex: 1; }
.rd-budget__grp ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.rd-budget__grp li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink); padding: 0 2px; }
.rd-budget__grp li b { font-weight: 600; white-space: nowrap; }
.rd-budget__grp li i { font-style: normal; color: var(--muted); font-weight: 500; }

/* Compare */
.rd-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rd-slot { display: grid; gap: 6px; justify-items: start; }
.rd-slot__thumb { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; border: 1px dashed var(--line-strong); display: grid; place-items: center; font: 400 1.6rem var(--font-display); color: var(--sand); background: center / cover no-repeat rgba(255,255,255,.5); }
.rd-slot__thumb.is-filled { border-style: solid; }
.rd-slot__thumb.is-filled span { display: none; }

/* Panel footer: budget + CTA */
.rd-panel__foot { flex-shrink: 0; display: flex; gap: 8px; align-items: stretch; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: rgba(255,255,255,.6); }
.rd-est { flex: 1; display: grid; gap: 2px; align-content: center; padding: 6px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; cursor: pointer; }
.rd-est:hover { background: rgba(255,255,255,.8); }
.rd-est__lbl { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rd-est__val { font: 400 1.12rem/1.1 var(--font-display); color: var(--charcoal); white-space: nowrap; }
.rd-cta { white-space: nowrap; box-shadow: var(--glow-gold); padding-left: 18px; padding-right: 18px; }

/* Dialogs */
.rd-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--ivory); color: var(--ink); box-shadow: var(--shadow-xl); overflow: auto; }
.rd-dialog--wide { width: min(1100px, calc(100vw - 24px)); }
.rd-dialog::backdrop { background: rgba(20,19,17,.6); backdrop-filter: blur(4px); }
.rd-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--ivory); z-index: 1; }
.rd-dialog__head h2 { margin: 0; font: 400 1.35rem/1.2 var(--font-display); }
.rd-dialog__close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer; flex-shrink: 0; }
.rd-quote__preview { display: grid; grid-template-columns: 180px 1fr; gap: 14px; padding: 16px 22px 0; align-items: start; }
.rd-quote__preview img { width: 100%; border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; }
.rd-quote__preview img[hidden] + div { grid-column: 1 / -1; }
.rd-quote__est { margin: 0 0 6px; font-size: 13px; }
.rd-quote__est strong { font: 400 1.1rem var(--font-display); color: var(--charcoal); }
.rd-quote__preview ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.rd-quote__form { padding: 16px 22px 22px; }
.rd-quote__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.rd-quote__fine { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }
.rd-compare { position: relative; margin: 16px 22px 8px; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--beige); user-select: none; touch-action: none; cursor: ew-resize; }
.rd-compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd-compare__top { position: absolute; inset: 0; }
.rd-compare__line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--white); box-shadow: 0 0 10px rgba(0,0,0,.3); }
.rd-compare__line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: var(--shadow); }
.rd-compare__tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(20,19,17,.7); color: var(--white); font: 700 12px var(--font-body); }
.rd-compare__tag--a { left: 12px; } .rd-compare__tag--b { right: 12px; }
.rd-compare__range { display: block; width: calc(100% - 44px); margin: 0 22px 22px; }

/* Explainer section */
.rd-explainer__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.rd-explainer__title { margin: 8px 0 16px; }
.rd-explainer__title em { font-style: italic; color: var(--gold); }
.rd-explainer__more { font-size: var(--fs-sm); color: var(--muted); }
.rd-explainer__more a { color: var(--charcoal); font-weight: 600; }
.rd-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.rd-steps li { counter-increment: s; position: relative; padding: 16px 18px 16px 62px; border-radius: var(--r); background: var(--white); box-shadow: var(--shadow-sm); display: grid; gap: 4px; }
.rd-steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); color: var(--white); font: 700 13px var(--font-body); }
.rd-steps strong { font-size: 15px; color: var(--charcoal); }
.rd-steps span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ── Phones & small tablets: bottom sheet ───────────────── */
@media (max-width: 900px) {
  .rd { --rd-sheet-peek: 138px; min-height: 560px; }
  .rd-stage { inset: 0 0 var(--rd-sheet-peek) 0; transition: bottom .35s var(--ease); }
  .rd-top { top: 10px; left: 10px; right: 10px; gap: 6px; }
  .rd-titlechip { padding: 5px 12px 5px 5px; gap: 8px; width: 100%; }
  .rd-titlechip__back { width: 32px; height: 32px; }
  .rd-titlechip__eyebrow { display: none; }
  .rd-titlechip__title { font-size: 1.02rem; }
  .rd-seg__btn { min-height: 34px; padding: 0 11px; font-size: 12px; }
  .rd-seg--mood .rd-seg__btn[aria-pressed="true"] .rd-seg__lbl { display: none; }
  .rd-bar { bottom: 10px; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .rd-bar::-webkit-scrollbar { display: none; }
  .rd-tool { min-width: 46px; min-height: 44px; font-size: 9.5px; padding: 3px 5px; }
  .rd-tool span { display: none; }
  .rd-bar .rd-tool span { display: none; }
  .rd-inspector { left: 8px; right: 8px; width: auto; bottom: 70px; max-height: 52%; padding: 12px; }
  .rd-inspector .rd-tool span { display: block; }
  .rd-walk { right: 10px; bottom: 70px; }
  .rd-walk__hint { display: none; }
  .rd-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--rd-sheet-peek); border-radius: 22px 22px 0 0; transition: height .35s var(--ease); box-shadow: 0 -12px 40px -16px rgba(0,0,0,.35); }
  .rd.sheet-open .rd-panel { height: min(60%, 600px); }
  .rd.sheet-open .rd-stage { bottom: min(60%, 600px); }
  .rd-sheet-handle { display: flex; justify-content: center; padding: 8px 0 2px; border: 0; background: none; cursor: pointer; flex-shrink: 0; }
  .rd-sheet-handle__bar { width: 44px; height: 5px; border-radius: 99px; background: var(--line-strong); }
  .rd-tabs { order: 1; display: flex; overflow-x: auto; padding: 4px 8px 6px; scrollbar-width: none; border-bottom: 0; }
  .rd-tabs::-webkit-scrollbar { display: none; }
  .rd-tab { flex: 1 0 auto; flex-direction: row; gap: 6px; padding: 9px 12px; font-size: 12px; }
  .rd-tab i { font-size: 13px; }
  .rd-panel__body { order: 3; }
  .rd-panel__foot { order: 2; padding: 4px 10px 8px; border-top: 0; background: transparent; }
  .rd:not(.sheet-open) .rd-panel__body { display: none; }
  .rd.sheet-open .rd-panel__body { border-top: 1px solid var(--line); }
  .rd-cta { padding: 0 14px; font-size: 13px; }
  .rd-pane { padding: 14px 14px 30px; }
  .rd-rooms { grid-template-columns: repeat(4, 1fr); }
  .rd-room { min-height: 66px; font-size: 10.5px; }
  .rd-grid { grid-template-columns: repeat(3, 1fr); }
  .rd-cats { margin: 0 -14px 6px; padding-left: 14px; padding-right: 14px; }
  .rd-plan2d { inset: 60px 10px 20px; width: calc(100% - 20px); height: calc(100% - 80px); }
  .rd-explainer__grid { grid-template-columns: 1fr; }
  .rd.has-sel .rd-bar { display: none; }
}
@media (max-width: 560px) {
  .rd-rooms { grid-template-columns: repeat(3, 1fr); }
  .rd-quote__preview { grid-template-columns: 1fr; }
  .rd-quote__preview img { max-height: 160px; }
  .rd-quote__grid { grid-template-columns: 1fr; }
  .rd-grid { grid-template-columns: repeat(2, 1fr); }
  .rd-seg--view .rd-seg__btn span { display: none; }
  .rd-cta { padding: 0 14px; }
  .rd-cta span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ── Printable summary (shared with designers.css) ── */
.ds-print { display: none; }
@media print {
  body.ds-printing * { visibility: hidden !important; }
  body.ds-printing .ds-print, body.ds-printing .ds-print * { visibility: visible !important; }
  body.ds-printing .ds-print { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 0 8mm; font: 11pt/1.45 var(--font-body); color: #1E1D1B; }
  .ds-print__head { display: flex; justify-content: space-between; border-bottom: 2px solid #E85D5F; padding-bottom: 6px; margin-bottom: 12px; font-size: 10pt; }
  .ds-print__head strong { letter-spacing: .2em; color: #E85D5F; }
  .ds-print h1 { font: 400 20pt/1.2 var(--font-display); margin: 0 0 4px; }
  .ds-print h2 { font-size: 12pt; margin: 14px 0 4px; }
  .ds-print__sub { color: #77716A; margin: 0 0 10px; font-size: 9.5pt; }
  .ds-print img { width: 100%; max-height: 95mm; object-fit: cover; border-radius: 6px; margin: 6px 0; }
  .ds-print__est { font-size: 12pt; margin: 8px 0; }
  .ds-print table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .ds-print td { padding: 3px 4px; border-bottom: 1px solid #e5ded2; vertical-align: top; }
  .ds-print td:last-child { text-align: right; white-space: nowrap; }
  .ds-print__link, .ds-print__fine { font-size: 8.5pt; color: #77716A; margin-top: 10px; }
}

/* The app has its own CTA — hide the site's mobile quick-action bar here (layout untouched). */
@media (max-width: 899px) { body:has(#rd) .mbar { display: none !important; } }
@media (min-width: 900px) and (max-width: 1180px) { body:has(#rd) .cw { display: none; } }
@media (max-width: 900px) {
  .rd-inspector { padding: 10px 12px 6px; }
  .rd-inspector__name { font-size: 1.05rem; margin: 0 0 2px; }
  .rd-inspector__body { gap: 8px; margin: 8px 0 2px; }
  .rd-ins-row { grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
  .rd-inspector .rd-chips, .rd-inspector .rd-swatches, .rd-inspector .rd-mini-seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rd-inspector .rd-chips::-webkit-scrollbar, .rd-inspector .rd-swatches::-webkit-scrollbar { display: none; }
  .rd-inspector .rd-chip, .rd-inspector .rd-sw, .rd-inspector .rd-mini-seg button { flex-shrink: 0; }
  .rd-inspector .rd-swatches { padding: 4px 2px; }
  .rd-inspector .rd-hint { display: none; }
  .rd-inspector .rd-tool { min-height: 40px; }
}
