/* Cottage interior behind the avatar and ingredient display: all drawn in code (CSS + small inline SVGs from roomDecor()),
   tinted per cottage. The scene is a size container so every piece is placed in scene units and fits phone, laptop and landscape. */
.room-scene{container:scene/size;--avl:3cqw;--avw:min(44cqw,400px);--avtop:max(3cqh,calc(52cqh - var(--avw) * .9636));--floor:74cqh;
  --soft:#A88763;--wood:#D6B285;--wood-dk:#B98F63;--beam:clamp(10px,2.6cqh,24px)}
.room-bg,.room-bg>*{position:absolute;pointer-events:none}
.room-bg{inset:0}
/* The cottage's own ingredients form the backdrop and a little harvest display. */
.room-scene{background:radial-gradient(ellipse at 24% 30%,#FFFDF3 0,transparent 58%),linear-gradient(145deg,var(--tint-1),var(--tint-2) 76%)}
.rb-garden-arch{left:3cqw;top:5cqh;width:42cqw;height:65cqh;border:3px solid color-mix(in srgb,var(--roof) 45%,#E5D8B7);border-radius:48% 48% 12px 12px;background:linear-gradient(180deg,#FFFCED,var(--tint-1));box-shadow:inset 0 0 0 6px #FFF8E680}
.rb-botanical{width:clamp(55px,15cqw,120px);opacity:.3;filter:saturate(.8)}
.rb-botanical.first{left:-3cqw;top:0;transform:rotate(-24deg)}
.rb-botanical.second{left:32cqw;top:2cqh;transform:rotate(24deg)}
.rb-harvest{z-index:3;left:3cqw;bottom:3cqh;width:41cqw;max-width:330px;filter:drop-shadow(0 3px 2px #7A553526)}
.room-head{background:linear-gradient(145deg,#FFFCF2 50%,var(--tint-1));border-color:color-mix(in srgb,var(--roof) 45%,#7A5535)}


.room-bg>div>svg{display:block;width:100%;height:auto;overflow:visible}
.rb-beam{left:0;right:0;top:0;height:var(--beam);background:linear-gradient(180deg,#DDBC90 0 55%,#CFA97C 55% 100%);border-bottom:2px solid var(--wood-dk);box-shadow:0 3px 6px rgba(110,75,46,.12)}
.rb-bunting{left:0;right:0;top:calc(var(--beam) + 2px);height:clamp(14px,3.4cqh,30px);background-repeat:repeat-x;background-size:auto 100%;background-position:center top;opacity:.75}
.rb-wains{left:0;right:0;bottom:calc(100% - var(--floor));height:15cqh;background:repeating-linear-gradient(90deg,transparent 0 30px,rgba(122,85,53,.08) 30px 32px),var(--tint-2);border-top:clamp(5px,1cqh,9px) solid #E2C69E;box-shadow:0 -1px 0 rgba(122,85,53,.18)}
.rb-floor{left:0;right:0;bottom:0;height:calc(100% - var(--floor));
  background:linear-gradient(180deg,rgba(122,85,53,.12),transparent 30%),repeating-linear-gradient(180deg,transparent 0 21px,rgba(122,85,53,.13) 21px 23px),repeating-linear-gradient(90deg,transparent 0 120px,rgba(122,85,53,.09) 120px 122px),#EBD6B0;
  border-top:clamp(5px,1.1cqh,10px) solid var(--wood)}
.rb-window{--ww:min(30cqw,24cqh,230px);width:var(--ww);left:calc(65cqw - var(--ww) / 2);top:calc(var(--beam) + 3.4cqh)}
.rb-herbs{--hw:min(5cqw,38px);width:var(--hw);top:var(--beam)}
.rb-herbs.h1{left:calc(65cqw + min(30cqw,24cqh,230px) / 2 + 4cqw)}
.rb-herbs.h2{left:calc(65cqw + min(30cqw,24cqh,230px) / 2 + 4cqw + var(--hw) * 1.6);--hw:min(4cqw,30px)}
.rb-shelf{width:min(15cqw,130px);right:2.5cqw;top:41cqh}
.rb-crate{width:min(14cqw,118px);right:2cqw;bottom:6cqh}
.rb-rug{left:65cqw;bottom:16cqh;width:calc(clamp(170px,22vw,250px) * 1.5);aspect-ratio:3.6;transform:translate(-50%,50%);border-radius:50%;
  background:radial-gradient(closest-side,var(--tint-2) 0 40%,var(--tint-1) 41% 52%,var(--tint-2) 53% 64%,var(--tint-1) 65% 76%,var(--tint-3) 77% 100%);
  border:2px solid rgba(122,85,53,.35);box-shadow:0 4px 8px rgba(110,75,46,.1)}
/* Counter the avatar stands behind, so the bust sits on something instead of floating on the wall */
.room-counter{position:absolute;z-index:2;pointer-events:none;left:calc(var(--avl) - 1.5cqw);width:calc(var(--avw) + 3cqw);top:calc(var(--avtop) + var(--avw) * .955);
  height:max(16px,calc(var(--floor) + 5cqh - var(--avtop) - var(--avw) * .955));
  background:repeating-linear-gradient(90deg,transparent 0 16px,rgba(122,85,53,.13) 16px 18px),var(--tint-2);border:2px solid var(--soft);border-top:0;
  box-shadow:inset 0 10px 10px -8px rgba(110,75,46,.25),0 6px 10px rgba(110,75,46,.12)}
.room-counter::before{content:"";position:absolute;left:-1.2cqw;right:-1.2cqw;top:0;height:clamp(9px,1.8cqw,16px);background:linear-gradient(180deg,#E4C59B,var(--wood));border:2px solid var(--soft);border-radius:4px}
@container scene (aspect-ratio > 1.4){
  .rb-window{--ww:min(15cqw,27cqh,90px);left:auto;right:3cqw;top:31cqh}
  .rb-herbs.h1{left:calc(var(--avl) + var(--avw) + 2cqw);--hw:min(4cqw,17px)}
  .rb-herbs.h2,.rb-shelf,.rb-crate{display:none}
  .room-counter::after{display:none}
  .rb-wains{height:8cqh}
}
@container scene (aspect-ratio <= 1.4) and (max-height:560px){
  .rb-window,.rb-shelf{display:none}
  .rb-herbs.h1{left:auto;right:10cqw}
  .rb-herbs.h2{left:auto;right:3cqw}
}
.room-counter::after{content:"";position:absolute;left:9%;right:9%;top:max(18px,14%);bottom:max(8px,12%);border:2px solid rgba(122,85,53,.22);border-radius:6px;background:rgba(255,250,238,.28)}
.room-avatar{position:absolute;left:var(--avl);top:var(--avtop);width:var(--avw);max-width:400px;z-index:1}
.room-avatar img{display:block;width:100%;height:auto;filter:drop-shadow(0 6px 8px rgba(70,50,20,.2))}
.room-card{padding:clamp(28px,5vw,64px) clamp(20px,5vw,64px);display:flex;flex-direction:column;justify-content:center;gap:14px;background:var(--paper)}
.room-concern{margin:0;font-size:16px;font-weight:900}
.room-step{margin:0;font-family:var(--display);font-style:italic;font-weight:600;font-size:clamp(44px,7vw,84px);line-height:.95;letter-spacing:-.02em;text-wrap:balance;color:var(--roof-dark)}
.room-product-label{margin:10px 0 0;font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-soft)}
.room-product{margin:0;font-family:var(--display);font-weight:600;font-size:22px;line-height:1.25;max-width:28ch}
.room-ingredient{margin:0;padding:10px 14px;border-radius:12px;border:2px dashed #C9AE85;font-size:14px;font-weight:700;line-height:1.45;color:var(--ink-soft);max-width:48ch}
.room-ingredient b{color:var(--roof-dark)}
.room-ingredient p{margin:0 0 6px;font-size:12px;font-weight:900;letter-spacing:.04em;color:var(--ink-soft)}
.room-ingredient ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.room-ingredient li{display:flex;align-items:center;gap:10px}
.ing-pic{flex:none;width:46px;height:46px;border-radius:50%;background:#FFFBF0;border:2px solid #E1CDA6;display:grid;place-items:center}
.ing-pic svg{width:38px;height:38px}
.room-ingredient{width:fit-content;box-sizing:border-box}
@media (min-width:761px){.room-ingredient{padding:10px 16px 12px}.room-ingredient ul{gap:8px}.room-ingredient li{gap:12px}.ing-pic{width:54px;height:54px}.ing-pic svg{width:44px;height:44px}}
.room-tagline{margin:-4px 0 0;font-size:17px;font-weight:700;color:var(--ink-soft)}
.room-picks{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));align-items:start;gap:14px 10px;padding:14px 2px 10px;margin:0 -2px;max-width:52ch}
.room-picks button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:54px;padding:10px 8px;border-radius:14px;border:2px solid #E1CDA6;background:#FFFBF0;font:inherit;font-size:11.5px;font-weight:800;line-height:1.2;color:var(--ink);cursor:pointer;touch-action:manipulation}
/* Product names only; the picked card shows its photo */
.room-picks button img{height:72px;width:auto;max-width:84px;object-fit:contain}
.pick-goal{font-size:11.5px;font-weight:700;line-height:1.3;color:var(--ink-soft);text-wrap:balance}
.pick-goal[hidden]{display:none}
.room-picks button{transition:transform .15s,box-shadow .15s}
.room-picks button[aria-pressed="true"]{border-color:var(--roof-dark);background:#E5F0CF;color:#29451D;transform:translateY(-4px);box-shadow:inset 0 0 0 1px var(--roof-dark),0 5px 0 var(--roof-dark),0 8px 14px rgba(70,50,20,.18);opacity:1}
.room-picks:has([aria-pressed="true"]) button:not([aria-pressed="true"]){background:#F6EEDC}
.room-picks:has([aria-pressed="true"]) button:not([aria-pressed="true"]) img{opacity:.75}
.room-card{min-width:0}
@media (min-width:761px){.room-scene{position:sticky;top:0;height:100vh;height:100dvh;min-height:420px;align-self:start}}
.pick-hint[hidden]{display:none}
.pick-hint{margin:-4px 0 0;font-size:14px;font-weight:700;color:var(--ink-soft)}
.details-img{--ar:.5;--s:1.41;--mw:min(70vw,300px);--mh:min(36dvh,300px);--a:min(52vw,220px);display:block;margin:-8px auto 14px;width:auto;
  height:min(var(--mh),calc(var(--a) * var(--s)),calc(var(--mw) / var(--ar)));filter:drop-shadow(0 6px 8px rgba(70,50,20,.18))}
.room .room-lang{position:fixed;top:calc(10px + env(safe-area-inset-top,0px));right:12px;z-index:5;height:44px;min-width:44px;padding:0 10px;font-size:16px}
.skin-chips{display:flex;flex-wrap:wrap;gap:8px}
.skin-chips button{padding:8px 14px;min-height:40px;border-radius:999px;border:2px solid #E1CDA6;background:#FFFBF0;font:inherit;font-size:14px;font-weight:800;color:var(--ink);cursor:pointer;touch-action:manipulation}
.skin-chips button[aria-pressed="true"]{border-color:var(--roof-dark);background:var(--roof-dark);color:#FFF8E6}
.skin-hint{margin:8px 0 0;max-width:52ch;font-size:14px;font-weight:700;line-height:1.4;color:var(--ink-soft)}
.skin-tip{margin:6px 0 0;max-width:52ch}
.skin-tip p{margin:0 0 6px;font-size:14px;line-height:1.4;font-weight:800;color:var(--ink)}
.skin-tip ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.skin-tip li button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;padding:10px 12px;border-radius:12px;border:2px solid #E1CDA6;background:#fff;font:inherit;font-size:14px;font-weight:700;color:var(--ink);cursor:pointer;touch-action:manipulation}
.skin-tip li button b{flex:none;padding:2px 10px;border-radius:999px;background:var(--roof-dark);color:#FFF8E6;font-size:12px;font-weight:900}
.nw{white-space:nowrap}
.room-picks button span:not(.tag):not(.nw){text-wrap:balance}
.room-match p,.room-goal,.room-ingredient,.room-benefits span,.room-facts dd,.room-tagline,.skin-tip p{text-wrap:pretty}
.room-match p,.room-goal{text-wrap:balance}
.room-picks button{position:relative}
.room-picks .tag{position:absolute;top:-11px;left:50%;transform:translateX(-50%);padding:3px 9px;border-radius:999px;background:#5E8B3A;color:#fff;border:2px solid #fff;box-shadow:0 1px 3px rgba(70,50,20,.3);font-size:11px;font-weight:900;line-height:1.1;letter-spacing:.02em;white-space:nowrap}
.room-picks .tag[hidden]{display:none}
.room-picks button.no{opacity:.55}
.room-goal{margin:0;font-size:15px;font-weight:700;line-height:1.4;color:var(--ink)}
.room-goal b{font-size:11px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:var(--roof-dark);margin-right:6px}
.room-match{margin:0;padding:10px 14px;border-radius:14px;border:2px dashed var(--outline);background:#FFFBF0;font-size:14.5px;font-weight:700;line-height:1.45;max-width:52ch}
.room-match.best{border-style:solid;background:#EEF5DC}
.room-match.no{background:#FBEAD9}
.room-match ul{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.room-match li button{width:100%;text-align:left;padding:8px 10px;border-radius:10px;border:2px solid #E1CDA6;background:#fff;font:inherit;font-size:13.5px;font-weight:700;color:var(--ink);cursor:pointer;touch-action:manipulation}
.room-match li b{display:block;font-weight:900}
.room-match li button[aria-pressed="true"]{border-color:#43672F;background:#E5F0CF;box-shadow:inset 0 0 0 1px #43672F;color:#29451D}
.selection-label{display:none;border-radius:999px;padding:3px 7px;background:#43672F;color:#fff;font-size:11px;font-weight:900;line-height:1.3}
button[aria-pressed="true"] > .selection-label{display:block}
.room-picks .selection-label{margin-top:auto}
.room-match .selection-label{width:fit-content;margin-top:6px}

.room-size{display:inline-block;vertical-align:middle;margin-left:4px;padding:2px 9px;border-radius:999px;background:var(--ink);color:#FFF8E6;font-family:var(--body,inherit);font-size:12px;font-weight:800}
.product-details{box-sizing:border-box;width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:20px;border:3px solid var(--outline);border-radius:20px;background:var(--paper);color:var(--ink);box-shadow:0 12px 40px rgba(59,42,26,.3);overflow:auto;overscroll-behavior:contain}
.product-details::backdrop{background:rgba(59,42,26,.45)}
.product-details form{display:flex;justify-content:flex-end;margin:0 0 12px}
.details-close{min-height:44px;padding:8px 16px;border:2px solid var(--outline);border-radius:12px;background:#F6EBCF;font-weight:900}
/* round arrows beside the photo flip through this cottage's products (swiping works too) */
.details-photo{display:flex;align-items:center;justify-content:space-between;gap:8px;height:min(36dvh,300px);margin:-8px 0 14px}
.details-photo .details-img{min-width:0;margin:0 auto;max-height:100%}
/* on phones the popup sits at the top so the arrows stay put while products change */
@media (max-width:760px){.product-details{margin-top:16px}}
.details-step{flex:none;width:44px;height:44px;padding:0 0 4px;border-radius:50%;border:2px solid var(--outline);background:#FFFBF0;color:var(--ink);font:inherit;font-size:30px;font-weight:700;line-height:1;box-shadow:0 3px 0 var(--outline);cursor:pointer;touch-action:manipulation}
.details-step:active{transform:translateY(2px);box-shadow:0 1px 0 var(--outline)}
.details-step[hidden]{display:none}
.product-details .room-goal,.product-details .room-match{margin:-8px 0 16px}
/* keep the shop button in view while the popup scrolls */
.product-details .room-shop{position:sticky;bottom:0;box-shadow:0 4px 0 var(--outline),0 -10px 14px 6px var(--paper)}
.product-details h2{margin:0 0 14px;font-size:20px;line-height:1.3;overflow-wrap:anywhere}
.product-details .room-facts{grid-template-columns:1fr;gap:4px}
.product-details .room-facts dd{margin-bottom:12px;overflow-wrap:anywhere}
.room-facts{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:0;font-size:15px;line-height:1.45;max-width:48ch}
.room-facts dt{font-size:11px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:var(--roof-dark);padding-top:3px}
.room-facts dd{margin:0;font-weight:600}
.gold-note{display:block;margin-top:4px;padding:3px 9px 3px 7px;width:fit-content;max-width:100%;border-radius:10px;background:linear-gradient(90deg,#FFF3C4,#FCE3A1);border:1px solid #E3B648;color:#7A5410;font-size:12.5px;font-weight:700;line-height:1.35}
.gold-note::before{content:'✦ ';color:#C8921A}
/* The shop link is the main button at the bottom of the product popup */
.room-shop{display:grid;margin-top:16px;place-items:center;text-align:center;border-radius:16px;padding:11px 20px;background:var(--roof-dark);color:#fff;font-weight:900;font-size:16px;text-decoration:none;border:3px solid var(--outline);box-shadow:0 4px 0 var(--outline);touch-action:manipulation}
.room-shop:active{transform:translateY(3px);box-shadow:0 1px 0 var(--outline)}
/* Out of stock: same spot, greyed out, nothing to tap */
.room-shop.sold-out,.room-shop.sold-out:active{background:#D9D0BE;color:#6E6352;border-color:#A89C86;transform:none;cursor:default}
.product-details .room-shop.sold-out{box-shadow:0 4px 0 #A89C86,0 -10px 14px 6px var(--paper)}
.room-head{display:flex;flex-direction:column;gap:14px}
.room-benefits{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px 18px;max-width:52ch;font-size:15px;line-height:1.25}
.room-benefits li{display:flex;align-items:center;gap:8px;font-weight:900}
.ben-ic{flex:none;width:30px;height:30px}
.ben-ic svg{display:block;width:100%;height:100%}
.room-benefits span{color:var(--ink-soft);font-weight:600}
.room-actions{position:sticky;bottom:0;z-index:2;display:flex;gap:12px;margin-top:10px;padding:10px 0 calc(12px + env(safe-area-inset-bottom,0px));background:var(--paper);border-top:2px solid #E8D6B0;max-width:52ch}
.room-actions button{border-radius:16px;padding:11px 20px;font-weight:900;font-size:15px;border:3px solid var(--outline);box-shadow:0 4px 0 var(--outline)}
.room-actions button:active{transform:translateY(3px);box-shadow:0 1px 0 var(--outline)}
#roomBack{background:#E9A35A}
#roomPrev,#roomNext{background:var(--paper)}

.loading{position:fixed;inset:0;display:grid;place-items:center;background:var(--grass);font-family:var(--display);font-style:italic;font-size:22px;color:#3B4A1A;transition:opacity .5s}
.loading.gone{opacity:0;pointer-events:none}
