/* Dar Anbar · the perfumer's counter. Daylight: ivory, sand, copper, a light olive; ink-brown text (no black, no gold). */
:root {
  --ivory: #F5EFE4; --paper: #FBF7F0; --sand: #E2D3BA; --copper: #A8653A; --copper-d: #84492A; --olive: #6F7B45;
  --ink: #2C2119; --ink-2: #4F4035; --muted: #6E5E50;
  --ar-display: 'Aref Ruqaa', serif; --en-display: 'Bodoni Moda', serif; --text: Tajawal, system-ui, sans-serif;
  --gut: clamp(16px, 3.4vw, 52px);
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--ivory); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { font-family: var(--text); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }

/* --- loader: the mark, a drop falling into the flacon */
.loader { position: fixed; inset: 0; z-index: 50; background: var(--ivory); display: grid; place-content: center; justify-items: center; gap: 4px; transition: opacity .8s ease, visibility .8s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark { width: 56px; height: 84px; margin-bottom: 12px; }
.loader-mark .drop { animation: drop 1.6s ease-in infinite; }
.loader-mark .fill { fill: #C9874E; opacity: .35; }
@keyframes drop { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(46px); opacity: 1; } 71%, 100% { transform: translateY(46px); opacity: 0; } }
.loader-name { font-family: var(--ar-display); font-size: 36px; line-height: 1.5; color: var(--copper-d); }
.loader-en { font-family: var(--en-display); font-size: 12px; letter-spacing: .4em; color: var(--muted); margin-inline-start: .4em; }
.loader-line { width: 120px; height: 2px; background: rgba(168,101,58,.18); margin-top: 16px; overflow: hidden; border-radius: 2px; }
.loader-line i { display: block; height: 100%; background: var(--copper); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .4s; }
html[dir="ltr"] .loader-line i { transform-origin: 0 50%; }

/* --- bar */
.bar { position: absolute; inset: 0 0 auto; z-index: 10; height: 76px; padding: 0 var(--gut); display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 20px; height: 30px; }
.brand-ar { font-family: var(--ar-display); font-size: 30px; color: var(--copper-d); line-height: 1.5; }
.brand-en { font-family: var(--en-display); font-size: 12px; letter-spacing: .34em; color: var(--ink-2); }
.lang { font-family: var(--en-display); font-size: 15px; color: var(--copper-d); text-decoration: none; border: 1px solid rgba(132,73,42,.45); min-width: 44px; height: 34px; display: grid; place-items: center; border-radius: 20px; background: rgba(251,247,240,.6); }
html[lang="en"] .lang { font-family: var(--ar-display); font-size: 18px; }

/* --- the counter: one screen, the tool, on photographs (counter.js) */
.counter { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; user-select: none; -webkit-user-select: none; background: #EFE4D2; }
canvas#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.still { display: none; }
/* a soft ivory veil behind the guide, so it reads over the shop wall */
/* the guide stays on the right in both languages: over the calm wall and shelves, away from the bright window */
.counter::before { content: ''; position: absolute; z-index: 1; pointer-events: none; top: 0; right: 0; width: min(780px, 58vw); height: 560px;
  background: radial-gradient(ellipse 62% 60% at 78% 24%, rgba(245,239,228,.95) 30%, rgba(245,239,228,.72) 56%, rgba(245,239,228,0) 100%); }

.guide { position: absolute; z-index: 3; top: 104px; right: var(--gut); width: min(370px, 27vw); }
.kick { font-size: 15px; font-weight: 700; color: var(--olive); letter-spacing: .02em; }
h1 { font-family: var(--ar-display); font-weight: 400; font-size: clamp(42px, 3.6vw, 58px); line-height: 1.45; color: var(--ink); }
html[lang="en"] h1 { font-family: var(--en-display); font-size: clamp(36px, 3vw, 50px); line-height: 1.15; margin: 6px 0 8px; }
.how { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.layers { list-style: none; padding: 0; margin-top: 20px; display: grid; gap: 8px; }
.layers li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--muted); }
.layers li i { width: 26px; height: 14px; border-radius: 4px; border: 1px solid rgba(110,94,80,.5); transition: background .8s, border-color .8s; }
.layers li b { font-weight: 700; color: var(--ink); }
.layers li.next span { color: var(--copper-d); font-weight: 700; }
.layers li.next i { border-color: var(--copper); border-style: dashed; }
.layers li.filled i { background: var(--c); border-color: rgba(44,33,25,.25); }

/* the finished blend: in the guide, where the instructions were */
.result { display: none; margin-top: 6px; }
.result.on { display: block; animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.result .kick { font-size: 14px; }
.result h2 { font-family: var(--ar-display); font-weight: 400; font-size: 44px; line-height: 1.4; color: var(--copper-d); }
html[lang="en"] .result h2 { font-family: var(--en-display); font-style: italic; font-size: 38px; line-height: 1.2; }
.recipe { font-size: 16px; color: var(--ink-2); }
.btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; padding: 12px 24px; border-radius: 32px; border: 1px solid var(--copper); color: var(--copper-d); background: rgba(251,247,240,.9); cursor: pointer; }
.btn.solid { background: var(--olive); border-color: var(--olive); color: #fbf8f1; }
.btn:hover { filter: brightness(1.05); }
.done .how, .done .layers { display: none; }

/* the character scale: a slim instrument on the marble, under the flacon */
.scale { position: absolute; z-index: 3; left: 50%; bottom: max(18px, 3vh); transform: translateX(-50%); width: min(700px, 62vw);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 14px 30px 12px; border-radius: 999px;
  background: rgba(251,247,240,.66); box-shadow: 0 10px 30px -18px rgba(70,40,18,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.scale h2 { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); white-space: nowrap; font-family: var(--ar-display); font-weight: 400; font-size: 21px; line-height: 1.4; color: var(--ink-2); text-shadow: 0 1px 8px rgba(251,247,240,.9); }
html[lang="en"] .scale h2 { font-family: var(--en-display); font-size: 17px; letter-spacing: .02em; }
.axis { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.axis i { position: relative; height: 3px; min-width: 50px; border-radius: 3px; background: linear-gradient(90deg, #d6b18a, #cdbf98, #a9b07f); }
html[dir="rtl"] .axis i { background: linear-gradient(270deg, #d6b18a, #cdbf98, #a9b07f); }
.axis i::after { content: ''; position: absolute; left: 50%; top: -4px; width: 2px; height: 11px; margin-left: -1px; background: rgba(79,64,53,.3); border-radius: 1px; }
.axis em { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3c9a0, var(--copper) 55%, var(--copper-d)); box-shadow: 0 2px 5px rgba(80,45,20,.35); transition: left 1.2s cubic-bezier(.3,1.35,.5,1); }

/* the vials' names: under each vial; buttons (tap or Enter pours) */
.vials { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.vial-l { position: absolute; transform: translate(-50%, 0); pointer-events: auto; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink); background: rgba(251,247,240,.8); box-shadow: 0 1px 4px rgba(60,35,15,.12); border: 0; padding: 3px 11px 4px; cursor: pointer; white-space: nowrap; border-radius: 12px; visibility: hidden; transition: opacity .4s; }
.ready .vial-l { visibility: visible; }
.vial-l:hover, .vial-l:focus-visible { background: #fbf7f0; outline: 1px solid rgba(168,101,58,.55); }
.vial-l small { display: block; font-family: var(--en-display); font-style: italic; font-weight: 500; font-size: 12px; color: var(--muted); }
.vial-l.used { opacity: .4; pointer-events: none; }
.busy .vial-l { pointer-events: none; }
.meta { position: absolute; z-index: 2; bottom: 6px; inset-inline-start: 10px; font: 11px/1.4 ui-monospace, monospace; color: var(--muted); }

.foot { padding: 28px var(--gut) 34px; border-top: 1px solid rgba(168,101,58,.2); text-align: center; font-size: 14px; color: var(--muted); display: grid; gap: 4px; background: var(--paper); }

/* --- phones and portrait screens (the portrait plate): the guide on top, the vials in front, the scale at the bottom */
@media (max-width: 760px), (max-aspect-ratio: 6/5) {
  .bar { height: 60px; } .brand-ar { font-size: 25px; } .brand-en { display: none; }
  .counter { min-height: 640px; }
  .guide { position: static; padding: 62px var(--gut) 0; width: auto; max-width: 560px; }
  .counter::before { left: 0; width: 100%; height: 300px; background: linear-gradient(rgba(245,239,228,.92) 50%, rgba(245,239,228,0)); }
  .guide > * { position: relative; z-index: 3; }
  .how { transition: opacity .4s; } .busy .how { opacity: .3; }
  .kick { font-size: 13px; }
  h1 { font-size: 34px; line-height: 1.4; } html[lang="en"] h1 { font-size: 30px; margin: 2px 0; }
  .how { font-size: 14.5px; line-height: 1.6; max-width: 72%; }
  .layers { position: absolute; z-index: 3; top: 66px; inset-inline-end: var(--gut); margin: 0; gap: 4px; }
  .layers li { font-size: 13px; gap: 6px; } .layers li i { width: 20px; height: 11px; } .layers li b { display: none; }
  .done .layers { display: grid; }
  .scale { left: var(--gut); right: var(--gut); bottom: 10px; transform: none; width: auto; grid-template-columns: 1fr; gap: 4px; padding: 8px 18px 9px; border-radius: 16px; }
  .scale h2 { display: none; }
  .axis { font-size: 13px; grid-template-columns: 52px 1fr 52px; gap: 8px; }
  .axis span:last-child { text-align: end; }
  .vial-l { font-size: 12.5px; line-height: 1.35; padding: 1px 8px; } .vial-l small { display: none; }
  .result { position: absolute; z-index: 5; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: 14px 16px 16px; text-align: center; background: rgba(251,247,240,.96); border-radius: 20px; box-shadow: 0 14px 40px rgba(60,35,15,.2); }
  .result h2 { font-size: 34px; } html[lang="en"] .result h2 { font-size: 30px; }
  .btns { justify-content: center; }
  .btn { font-size: 15px; padding: 11px 18px; }
  .done .scale { opacity: 0; pointer-events: none; }
}

/* --- no WebGL: a photo of a finished counter */
.static canvas#gl, .static .vials, .static .scale { display: none; }
.static .still { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ============ below the counter: an ordinary scroll, in daylight ============ */
.sec { position: relative; padding: clamp(72px, 9vw, 128px) var(--gut); }
.sec-head { max-width: 640px; }
.sec h2 { font-family: var(--ar-display); font-weight: 400; font-size: clamp(36px, 3.6vw, 54px); line-height: 1.45; color: var(--ink); margin: 12px 0 10px; }
html[lang="en"] .sec h2 { font-family: var(--en-display); font-size: clamp(32px, 3.1vw, 48px); line-height: 1.15; margin: 6px 0 14px; }
.lede { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.fine { margin-top: 22px; font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
bdi { unicode-bidi: isolate; }
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease var(--d, 0ms), transform .9s cubic-bezier(.2,.7,.2,1) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

/* the house blends: four label cards on paper, the afternoon's lattice light drifting over them */
.blends { background: var(--paper); overflow: hidden; }
.blends::before { content: ''; position: absolute; inset: -20% -10%; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background: url(assets/web/mashrabiya-light.webp) center / 760px auto repeat; animation: drift 90s linear infinite alternate; }
@keyframes drift { to { transform: translate(-6%, 4%) rotate(1.5deg); } }
.blends > * { position: relative; }
.bl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 26px); margin-top: 44px; }
.bl-card { display: flex; flex-direction: column; background: #fffdf9; border: 1px solid rgba(168,101,58,.18); border-radius: 22px; padding: 18px 20px 20px; box-shadow: 0 18px 40px -26px rgba(80,50,25,.35); }
.bl-art { position: relative; height: 170px; margin: -4px -6px 10px; border-radius: 16px; background: radial-gradient(ellipse 70% 60% at 50% 62%, #f1e4cf, #f7efe3 70%); display: grid; place-items: center; overflow: hidden; }
.bl-art img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(70,40,18,.22)); }
.bl-vial { position: absolute; bottom: 14px; inset-inline-end: 16px; width: 22px; height: 46px; border-radius: 5px 5px 7px 7px; border: 1.5px solid rgba(110,80,55,.45); background: rgba(255,255,255,.4); display: flex; flex-direction: column-reverse; padding: 3px; gap: 1px; }
.bl-vial::before { content: ''; position: absolute; top: -8px; left: 50%; width: 9px; height: 7px; margin-left: -4.5px; border-radius: 2px; background: #c9965f; }
.bl-vial i { flex: 1; border-radius: 2px; background: var(--c); opacity: .9; }
.bl-card h3 { font-family: var(--ar-display); font-weight: 400; font-size: 32px; line-height: 1.4; color: var(--copper-d); }
html[lang="en"] .bl-card h3 { font-family: var(--en-display); font-style: italic; font-size: 28px; line-height: 1.2; }
.bl-en { font-family: var(--en-display); font-style: italic; font-size: 15px; color: var(--muted); margin-top: -2px; }
html[lang="en"] .bl-en { font-family: var(--ar-display); font-style: normal; font-size: 18px; margin-top: 2px; }
.bl-line { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); margin: 10px 0 12px; }
.bl-notes { list-style: none; padding: 12px 0; border-block: 1px solid rgba(168,101,58,.16); display: grid; gap: 6px; }
.bl-notes li { display: grid; grid-template-columns: 14px 74px 1fr; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.bl-notes i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(44,33,25,.15); }
.bl-notes b { color: var(--ink); font-weight: 700; }
.bl-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 12px 0 16px; }
.bl-meta span:last-child { color: var(--ink); font-weight: 700; }
.bl-btns { margin-top: auto; display: grid; gap: 8px; }
.bl-btns .btn { text-align: center; padding: 11px 16px; font-size: 15px; }

/* bakhoor: the text on ivory; the photo the full height of the section, bleeding off the screen's end edge */
.bakhoor { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); min-height: max(720px, 100vh); padding: 0; background: var(--ivory); overflow: hidden; }
.bk-text { padding: clamp(72px, 8vw, 120px) var(--gut); padding-inline-end: clamp(28px, 4vw, 64px); align-self: center; max-width: 620px; justify-self: end; }
.bk-photo { position: relative; margin: 0; order: 2; }
.bk-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 64% 50%; }
.bk-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to left, var(--ivory) 0, rgba(245,239,228,0) 14%); }
html[dir="ltr"] .bk-photo::after { background: linear-gradient(to right, var(--ivory) 0, rgba(245,239,228,0) 14%); }
.list { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid rgba(132,73,42,.25); }
.list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(132,73,42,.18); }
.list b { display: block; font-size: 17px; color: var(--ink); }
.list span { font-size: 14.5px; color: var(--ink-2); }
.list em { font-style: normal; font-size: 15px; font-weight: 700; color: var(--copper-d); white-space: nowrap; }
.bk-how { margin: 24px 0 26px; }
.bk-how h3 { font-size: 15px; font-weight: 700; color: var(--olive); margin-bottom: 6px; }
.bk-how ol { padding-inline-start: 20px; display: grid; gap: 4px; font-size: 15.5px; color: var(--ink-2); }
.bakhoor .btn { display: inline-block; }

/* gift sets: the sets on the start side, the photo tall on the other */
.gifts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 80px); align-items: center; background: var(--ivory); }
.sets { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.set { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'd p' 'd b'; gap: 6px 18px; align-items: center; padding: 18px 20px; border-radius: 18px; background: #fffdf9; border: 1px solid rgba(168,101,58,.18); }
.set > div { grid-area: d; }
.set h3 { font-size: 18px; font-weight: 700; color: var(--ink); }
.set p { font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.set .set-p { grid-area: p; justify-self: end; font-weight: 700; color: var(--copper-d); white-space: nowrap; }
.set .btn { grid-area: b; justify-self: end; padding: 9px 18px; font-size: 14.5px; white-space: nowrap; }
.set.mine { background: linear-gradient(135deg, #f3ecd9, #fffdf9); border-color: rgba(111,123,69,.35); }
.set.mine h3 { color: var(--olive); }
.gf-photo { margin: 0; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -36px rgba(70,45,20,.5); }
.gf-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 44% 50%; }

/* the boutiques and the close */
.boutiques { background: var(--paper); }
.bt-photo { margin: 40px 0 0; border-radius: 26px; overflow: hidden; aspect-ratio: 21 / 8; }
.bt-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.bt-grid { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.bt-card { padding: 22px 22px 20px; border-radius: 20px; background: #fffdf9; border: 1px solid rgba(168,101,58,.18); }
.bt-card h3 { font-family: var(--ar-display); font-weight: 400; font-size: 30px; line-height: 1.4; color: var(--copper-d); }
html[lang="en"] .bt-card h3 { font-family: var(--en-display); font-size: 26px; line-height: 1.25; margin-bottom: 4px; }
.bt-card p { font-size: 15.5px; color: var(--ink-2); }
.bt-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.bt-btns .btn { padding: 9px 16px; font-size: 14.5px; }
.end { margin: clamp(64px, 8vw, 110px) auto 0; max-width: 620px; text-align: center; }
.end-line { font-family: var(--ar-display); font-size: clamp(40px, 4.4vw, 64px); line-height: 1.45; color: var(--copper-d); }
html[lang="en"] .end-line { font-family: var(--en-display); font-style: italic; line-height: 1.2; margin-bottom: 12px; }
.end .btns { margin-top: 24px; }

/* the floating WhatsApp button: the official glyph; away while the counter fills the screen */
/* the container never moves (sections.js measures it); only the button inside shrinks away */
.fab { position: fixed; z-index: 30; inset-inline-end: clamp(14px, 2vw, 24px); bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(14px, 2vw, 24px)); opacity: 0; pointer-events: none; transition: opacity .4s; }
.fab.show { opacity: 1; pointer-events: auto; }
.fab .fab-wa { scale: .85; translate: 0 14px; transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .3s, scale .5s cubic-bezier(.2,.8,.2,1), translate .5s cubic-bezier(.2,.8,.2,1); }
.fab.show .fab-wa { scale: 1; translate: none; }
.fab-wa { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #1FCF86; color: #fff; box-shadow: 0 14px 30px -12px rgba(40,60,30,.5); transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .3s; }
.fab-wa svg { width: 29px; height: 29px; fill: currentColor; }
.fab-wa:hover, .fab-wa:focus-visible { transform: scale(1.07); background: #19B874; }
.fab-wa-label { position: absolute; top: 50%; inset-inline-end: calc(100% + 12px); translate: 0 -50%; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); white-space: nowrap; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.fab-wa:hover .fab-wa-label, .fab-wa:focus-visible .fab-wa-label { opacity: 1; }

@media (max-width: 1100px) {
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
  .gifts { grid-template-columns: 1fr; } .gf-photo { aspect-ratio: 16 / 10; order: -1; }
  .bakhoor { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sec { padding: 64px var(--gut); }
  .lede { font-size: 16.5px; }
  /* the four blends: a row to swipe, the next card showing at the edge */
  .bl-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 12px; margin: 28px calc(-1 * var(--gut)) 0; padding: 4px var(--gut) 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain; scrollbar-width: none; }
  .bl-grid::-webkit-scrollbar { display: none; }
  .bl-card { scroll-snap-align: start; }
  .bl-art { height: 150px; }
  .bakhoor { display: flex; flex-direction: column; min-height: 0; padding: 0 0 56px; }
  .bk-photo { aspect-ratio: 4 / 3; order: -1; }
  .bk-photo::after, html[dir="ltr"] .bk-photo::after { background: linear-gradient(to top, var(--ivory) 0, rgba(245,239,228,0) 30%); }
  .bk-text { padding: 8px var(--gut) 0; max-width: none; }
  .set { grid-template-columns: 1fr auto; grid-template-areas: 'd d' 'p b'; padding: 16px; }
  .set .set-p { justify-self: start; }
  .bt-photo { aspect-ratio: 4 / 3; margin-top: 28px; }
  .bt-grid { grid-template-columns: 1fr; }
  .fab-wa { width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .blends::before { animation: none; } .rv { transition: none; } }

/* ============ the extras: basket, sound, «help me choose», the finished blend's size, gift, journey and actions */
.bar-end { display: flex; align-items: center; gap: 10px; }
.cart-b { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border-radius: 20px; border: 1px solid rgba(132,73,42,.45); background: rgba(251,247,240,.78); color: var(--copper-d); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.cart-b[hidden] { display: none; }
.cart-b svg, .cart-fab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.cart-n { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--copper); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.bump { animation: bump .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 35% { transform: scale(1.14); } }
.snd { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(132,73,42,.45); background: rgba(251,247,240,.6); color: var(--copper-d); display: grid; place-items: center; cursor: pointer; padding: 0; }
.snd svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.snd path:first-child { fill: currentColor; fill-opacity: .18; }
.snd .w1, .snd .w2 { display: none; } .snd.on .w1, .snd.on .w2 { display: inline; } .snd.on .x { display: none; }
.snd.on { background: #eef0e2; border-color: var(--olive); color: var(--olive); }

.quiz-b { display: block; margin-top: 10px; background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--copper-d); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(168,101,58,.45); cursor: pointer; text-align: start; }
.quiz-b:hover { text-decoration-color: var(--copper); }
.busy .quiz-b { opacity: .4; pointer-events: none; }
.quiz { position: absolute; z-index: 6; top: 92px; right: var(--gut); width: min(400px, 31vw); padding: 22px 24px 20px; border-radius: 22px; background: rgba(251,247,240,.97); border: 1px solid rgba(168,101,58,.2); box-shadow: 0 24px 60px -24px rgba(60,35,15,.45); animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.quiz[hidden] { display: none; }
.quiz h2 { font-family: var(--ar-display); font-weight: 400; font-size: 32px; line-height: 1.45; color: var(--ink); margin: 2px 0 14px; }
html[lang="en"] .quiz h2 { font-family: var(--en-display); font-size: 28px; line-height: 1.2; margin-top: 6px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opts .btn { width: 100%; text-align: start; }
.quiz-opts .btn:hover { background: #fff; border-color: var(--olive); color: var(--olive); }
.quiz-step { margin-top: 12px; font-size: 13px; color: var(--muted); }
.x-b { position: absolute; top: 10px; inset-inline-end: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.x-b:hover { background: rgba(168,101,58,.1); }
.quizzing .guide { visibility: hidden; }

/* the finished blend: its journey on the skin, the size, the gift; the guide's title steps aside for it */
.done .guide > .kick, .done .guide > h1, .done .quiz-b { display: none; }
.journey { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; }
.journey::before { content: ''; position: absolute; top: 5px; inset-inline: 6px 18%; height: 2px; background: rgba(132,73,42,.22); border-radius: 2px; }
.journey li { position: relative; display: grid; align-content: start; gap: 1px; padding-top: 18px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.journey li i { position: absolute; top: 0; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(245,239,228,.95), inset 0 0 0 1px rgba(44,33,25,.15); }
.journey b { font-size: 15px; color: var(--ink); }
.sizes { display: flex; gap: 8px; margin-top: 16px; }
.sizes button { flex: 1; display: grid; gap: 0; padding: 7px 8px 8px; border-radius: 14px; border: 1px solid rgba(168,101,58,.32); background: rgba(251,247,240,.86); font: inherit; color: var(--ink-2); cursor: pointer; }
.sizes button b { font-size: 15px; color: var(--ink); }
.sizes button span { font-size: 13px; }
.sizes [aria-checked="true"] { border-color: var(--olive); background: #eef0e2; box-shadow: inset 0 0 0 1px var(--olive); }
.gift { display: grid; gap: 4px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.gift input { font: inherit; font-size: 16px; padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(168,101,58,.32); background: rgba(255,253,249,.92); color: var(--ink); width: 100%; }
.gift input:focus { outline: 2px solid rgba(111,123,69,.45); outline-offset: 1px; }

/* the actions under the flacon (in place of the scale once the blend is done) */
.actions { position: absolute; z-index: 4; left: 50%; bottom: max(18px, 3vh); transform: translateX(-50%); display: none; align-items: center; gap: 10px; padding: 9px; border-radius: 999px; background: rgba(251,247,240,.88); box-shadow: 0 16px 40px -20px rgba(60,35,15,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; }
.done .actions { display: flex; animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.done .scale { display: none; }
.actions .btn { padding: 11px 20px; font-size: 15px; }
.act-more { display: flex; gap: 2px; padding-inline-start: 6px; border-inline-start: 1px solid rgba(168,101,58,.25); }
.ib { font: inherit; font-size: 14px; font-weight: 700; color: var(--copper-d); background: none; border: 0; padding: 10px 12px; border-radius: 20px; cursor: pointer; }
.ib:hover { background: rgba(168,101,58,.09); }

/* the basket */
.cart { position: fixed; inset: 0; z-index: 60; background: rgba(44,33,25,0); transition: background .3s; }
.cart[hidden] { display: none; }
.cart.open { background: rgba(44,33,25,.35); }
.cart-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 92vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: 0 0 60px -20px rgba(60,35,15,.5); transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.7,.2,1); }
html[dir="rtl"] .cart-panel { transform: translateX(-100%); }
.cart.open .cart-panel { transform: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 8px 24px; }
html[dir="rtl"] .cart-head { padding: 20px 24px 8px 20px; }
.cart-head h2 { font-family: var(--ar-display); font-weight: 400; font-size: 34px; line-height: 1.4; color: var(--ink); }
html[lang="en"] .cart-head h2 { font-family: var(--en-display); font-size: 30px; }
.cart-head .x-b { position: static; }
.cart-list { list-style: none; margin: 0; padding: 0 24px; flex: 1; overflow: auto; }
.cart-list li { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid rgba(168,101,58,.18); }
.ci-text b { display: block; font-size: 16px; color: var(--ink); }
.ci-text span { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.ci-row { display: flex; align-items: center; gap: 12px; }
.ci-row em { margin-inline-start: auto; font-style: normal; font-weight: 700; color: var(--copper-d); }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(168,101,58,.35); border-radius: 20px; }
.qty button { width: 34px; height: 32px; border: 0; background: none; font-size: 18px; color: var(--copper-d); cursor: pointer; }
.qty bdi { min-width: 18px; text-align: center; font-weight: 700; }
.ci-rm { width: 30px; height: 30px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; border-radius: 50%; }
.ci-rm:hover { background: rgba(168,101,58,.1); }
li.ci-empty { display: block; padding: 18px 0; border: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.cart-foot { display: grid; gap: 10px; padding: 16px 24px calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(168,101,58,.2); }
.cart-total { display: flex; justify-content: space-between; font-size: 17px; }
.cart-total b { color: var(--copper-d); }
.cart-foot .btn { text-align: center; }
.cart-foot .fine { margin: 0; }
.btn.off { opacity: .45; pointer-events: none; }
.cart-fab { position: fixed; z-index: 30; inset-inline-end: clamp(16px, 2vw, 26px); bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(14px, 2vw, 24px) + 70px); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(132,73,42,.3); background: var(--paper); color: var(--copper-d); display: grid; place-items: center; box-shadow: 0 14px 30px -12px rgba(60,40,20,.45); opacity: 0; pointer-events: none; translate: 0 10px; transition: opacity .35s, translate .35s; cursor: pointer; padding: 0; }
.cart-fab.show { opacity: 1; pointer-events: auto; translate: none; }
.cart-fab svg { width: 22px; height: 22px; }
.cart-fab .cart-n { position: absolute; top: -4px; inset-inline-end: -4px; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); max-width: 90vw; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 15px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .35s, transform .35s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* in the sections: add to the basket */
.bl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bl-row .btn { padding: 10px 8px; font-size: 14.5px; }
.list li { align-items: center; }
.add-b { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(132,73,42,.45); background: none; color: var(--copper-d); font-size: 19px; line-height: 1; cursor: pointer; padding: 0; }
.add-b:hover { background: var(--copper); color: #fff; }
.set { grid-template-areas: 'd p' 'b b'; }
.set > .set-btns { grid-area: b; justify-self: end; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 760px), (max-aspect-ratio: 6/5) {
  .bar-end { gap: 8px; }
  .cart-b span { display: none; }
  .cart-b { padding: 0 8px; }
  .quizzing .guide { visibility: visible; }
  .quiz { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; }
  .done .guide > .kick, .done .guide > h1 { display: revert; }
  .result { bottom: calc(10px + var(--acth, 118px)); max-height: calc(100% - 150px - var(--acth, 118px)); overflow: auto; border-radius: 20px 20px 0 0; padding-bottom: 6px; box-shadow: 0 -10px 30px -18px rgba(60,35,15,.3); }
  .journey { text-align: start; margin-top: 10px; }
  .sizes { margin-top: 12px; }
  .gift { text-align: start; }
  .actions { left: 10px; right: 10px; bottom: 10px; transform: none; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px 12px 12px; border-radius: 0 0 20px 20px; white-space: normal; background: rgba(251,247,240,.96); box-shadow: 0 14px 30px -14px rgba(60,35,15,.3); backdrop-filter: none; }
  .actions > .btn { flex: 1 1 40%; padding: 11px 10px; font-size: 14.5px; text-align: center; }
  .act-more { flex-basis: 100%; justify-content: center; border: 0; padding: 0; }
  .ib { font-size: 13.5px; padding: 8px 9px; }
  .bl-row .btn { font-size: 14px; }
  .set > .set-btns { justify-self: stretch; justify-content: flex-start; }
  /* the finished blend on a phone: a compact sheet, the scene lifted so the flacon's label shows above it */
  canvas#gl { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
  .done canvas#gl { transform: translateY(-9%); }
  .done .vials, .done .layers { display: none; }
  .result .recipe { display: none; }
  .result .kick { font-size: 12.5px; }
  .result h2 { font-size: 30px; line-height: 1.35; } html[lang="en"] .result h2 { font-size: 27px; }
  .journey { margin-top: 6px; gap: 6px; } .journey li { font-size: 11.5px; padding-top: 16px; } .journey b { font-size: 13.5px; }
  .sizes { margin-top: 10px; gap: 6px; } .sizes button { padding: 5px 6px 6px; border-radius: 12px; } .sizes button b { font-size: 14px; } .sizes button span { font-size: 12px; }
  .gift { margin-top: 8px; } .gift > span { display: none; } .gift input { padding: 8px 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .result.on, .done .actions, .quiz, .bump { animation: none; } .cart-panel, .toast, .cart-fab { transition: none; } }

/* short desktop screens: the finished blend keeps clear of the vials on the right */
@media (min-width: 761px) and (min-aspect-ratio: 6/5) and (max-height: 860px) {
  .guide { top: 86px; }
  .result .recipe, .gift > span { display: none; }
  .result h2 { font-size: 38px; } html[lang="en"] .result h2 { font-size: 32px; }
  .journey { margin-top: 8px; } .sizes { margin-top: 10px; } .sizes button { padding: 5px 8px 6px; }
  .gift { margin-top: 8px; } .gift input { padding: 7px 12px; }
}

/* the flight into the basket */
.fly { position: fixed; left: 0; top: 0; z-index: 80; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; pointer-events: none; background: var(--paper); color: var(--copper-d); box-shadow: 0 10px 24px -8px rgba(60,35,15,.45), 0 0 0 1px rgba(168,101,58,.25); will-change: transform, opacity; }
.fly svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fly-vial { width: 20px; height: 32px; border-radius: 4px 4px 6px 6px; overflow: hidden; display: flex; flex-direction: column; box-shadow: inset 0 0 0 1.5px rgba(110,80,55,.45); }
.fly-vial i { flex: 1; }
.cart-b.bump, .cart-fab.bump { animation: bump .55s cubic-bezier(.3,1.6,.5,1); }
.foot .credit { font-size: 12px; opacity: .8; } .foot .credit a { color: inherit; }
