:root {
  --espresso: #1b0f07;
  --espresso-2: #2a170b;
  --brown: #5c3a21;
  --brown-2: #7a4e2c;
  --cream: #f6eedf;
  --paper: #fbf7ef;
  --sand: #e8d9bf;
  --brass: #c9a25a;
  --brass-hi: #f0d595;
  --brass-lo: #8f6a2c;
  --rust: #8a3b20;
  --ink: #2e1a0e;
  --font-display: "El Messiri", serif;
  --font-body: "Tajawal", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body); overflow-x: hidden; }
body.brewing { overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.brand-sticker { background: #fff; border-radius: 6px; padding: 6px 8px 4px; box-shadow: 0 8px 24px rgba(60, 35, 15, .18); width: 110px; transform: rotate(-2deg); }
.brand-sticker svg { display: block; width: 100%; height: auto; }
.brand-sticker.small { width: 84px; margin: 0 auto 8px; }

.btn-brass {
  border: 0; border-radius: 999px; padding: 14px 30px; font-size: 17px; font-weight: 800; color: var(--ink);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, var(--brass-lo));
  box-shadow: 0 10px 30px rgba(201, 162, 90, .35), inset 0 -3px 0 rgba(0, 0, 0, .18), inset 0 2px 0 rgba(255, 255, 255, .5);
  transition: transform .15s;
}
.btn-brass:active { transform: scale(.96); }
.btn-ghost { border: 1.5px solid var(--brass); background: rgba(27, 15, 7, .6); color: var(--brass-hi); border-radius: 999px; padding: 12px 22px; font-size: 15px; font-weight: 700; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(240, 213, 149, .35); background: rgba(27, 15, 7, .5); color: var(--cream); font-size: 26px; line-height: 1; flex: none; }
.icon-btn.dark { color: var(--ink); background: rgba(92, 58, 33, .1); border-color: rgba(92, 58, 33, .25); }
.top-spacer { width: 42px; }

/* ---------- The cup's decorative band, used as the menu's motif ---------- */
/* Shapes are SVG masks, so one file serves every colour. */
.band, .motif, .mascot {
  background: var(--brown);
  -webkit-mask: var(--m) no-repeat center / contain; mask: var(--m) no-repeat center / contain;
}
.band {
  --m: url("../assets/motifs/band.svg"); height: 26px;
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-size: auto 100%; mask-size: auto 100%;
  -webkit-mask-position: 0 50%; mask-position: 0 50%;
}
@keyframes bandSlide { to { transform: translateX(calc(var(--tile) * -1)); } }
.band.move { position: relative; overflow: hidden; background: none; -webkit-mask: none; mask: none; --tile: calc(var(--bh) * 4.441); }
.band.move::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + var(--tile)); background: var(--brown);
  -webkit-mask: url("../assets/motifs/band.svg") repeat-x 0 50% / auto 100%; mask: url("../assets/motifs/band.svg") repeat-x 0 50% / auto 100%;
  animation: bandSlide 9s linear infinite; will-change: transform;
}
.band.move.rev::before { animation-direction: reverse; }
.motif.flower { --m: url("../assets/motifs/flower.svg"); }
.motif.diamond { --m: url("../assets/motifs/diamond.svg"); }
.mascot { --m: url("../assets/motifs/sindbad.svg"); aspect-ratio: 583 / 510; }

/* ---------- Entry screen ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(ellipse at 50% 45%, #fffaf0, var(--cream) 60%, #ecdcbc);
  transition: opacity .7s ease, visibility .7s;
}
.splash.done { opacity: 0; visibility: hidden; }
.splash > .band { --bh: 34px; height: var(--bh); margin: 14px 0; }
.splash-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px; }
.splash-flower {
  --m: url("../assets/motifs/flower.svg"); position: absolute; top: 50%; left: 50%; width: min(80vw, 420px); aspect-ratio: 353 / 510;
  translate: -50% -50%; background: var(--brown); opacity: .07; -webkit-mask: var(--m) no-repeat center / contain; mask: var(--m) no-repeat center / contain;
  animation: spin 40s linear infinite;
}
.brand-sticker.big { width: 150px; transform: rotate(-3deg); animation: stickerIn .9s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stickerIn { from { transform: rotate(-20deg) scale(.4); opacity: 0; } }
.splash-sb { height: 180px; width: auto; margin-top: 14px; }
.splash-hi { font-family: var(--font-display); font-size: clamp(24px, 6.5vw, 32px); color: var(--brown); margin: 12px 0 18px; }
.splash-bar { width: min(70vw, 280px); height: 8px; border-radius: 4px; background: rgba(92, 58, 33, .12); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--brown); transition: width .3s ease; }
.splash-pct { margin: 8px 0 0; font-size: 14px; font-weight: 800; color: var(--brown-2); }

/* ---------- Header ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 70% 40%, #fff6e3, transparent 60%), linear-gradient(180deg, #f1e2c4, var(--cream)); }
.hero > .band { --bh: 28px; height: var(--bh); margin: 10px 0; }
.hero > .band.move::before { animation-duration: 16s; }
.hero-body { position: relative; display: grid; grid-template-columns: 1fr; align-items: center; gap: 6px; padding: 10px 16px 16px; }
.hero-text { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-family: var(--font-display); font-size: clamp(42px, 12vw, 72px); margin: 12px 0 0; line-height: 1.15; color: var(--brown); }
.hero-sub { margin: 4px 0 0; color: var(--brown-2); font-size: 16px; max-width: 340px; }
.hero-mascot { position: relative; display: flex; flex-direction: column; align-items: center; order: -1; }
.sb-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.hero-sb { height: min(62vw, 300px); width: auto; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.bubble {
  position: relative; margin: 0 0 8px; padding: 10px 16px; border-radius: 18px; background: #fff; color: var(--brown);
  font-weight: 800; font-size: 15px; box-shadow: 0 8px 20px rgba(92, 58, 33, .15); animation: pop .6s cubic-bezier(.2, 1.5, .4, 1) both 1s;
  transition: opacity .3s;
}
.bubble::after { content: ""; position: absolute; bottom: -9px; inset-inline-end: 34%; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble.swap { opacity: 0; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.motif { position: absolute; opacity: .09; pointer-events: none; }
.f1 { width: 120px; aspect-ratio: 353 / 510; top: 6%; inset-inline-start: -30px; animation: spin 50s linear infinite; }
.f2 { width: 60px; aspect-ratio: 249 / 510; bottom: 8%; inset-inline-end: 6%; animation: bob 6s ease-in-out infinite; }
.f3 { width: 90px; aspect-ratio: 353 / 510; bottom: -10px; inset-inline-start: 42%; animation: spin 36s linear infinite reverse; }
@media (min-width: 820px) {
  .hero-body { grid-template-columns: 1fr 1fr; padding: 24px 6vw 30px; min-height: 380px; }
  .hero-mascot { order: 0; }
  .hero-sb { height: 360px; }
}

/* ---------- Category chips ---------- */
.cats {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 14px; background: var(--cream);
  border-bottom: 1px solid rgba(92, 58, 33, .12);
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: none; text-decoration: none; color: var(--brown); border: 1.5px solid rgba(92, 58, 33, .2); border-radius: 999px;
  padding: 8px 16px; font-size: 15px; font-weight: 700; white-space: nowrap; transition: background .25s, color .25s, border-color .25s;
}
.cats a[aria-current="true"] { background: var(--brown); color: var(--cream); border-color: var(--brown); }
@media (min-width: 900px) { .cats { justify-content: center; } }

/* ---------- Menu sections ---------- */
.menu { max-width: 1180px; margin: 0 auto; padding: 8px 14px 110px; }
.cat-section { padding-top: 26px; content-visibility: auto; contain-intrinsic-size: auto 900px; }
.cat-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 14px; }
.cat-head h2 { font-family: var(--font-display); font-size: clamp(28px, 7vw, 38px); margin: 0; color: var(--brown); }
.cat-head span { color: var(--brass-lo); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; direction: ltr; }
.cat-head::after { content: ""; flex: 1; height: 20px; align-self: center; background: var(--brown); opacity: .75; -webkit-mask: url("../assets/motifs/band.svg") repeat-x 0 50% / auto 100%; mask: url("../assets/motifs/band.svg") repeat-x 0 50% / auto 100%; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* ---------- 3D product card ---------- */
.card { position: relative; z-index: 0; perspective: 900px; opacity: 0; }
.card.in { animation: cardIn .9s cubic-bezier(.2, .9, .25, 1.1) forwards; animation-delay: var(--d, 0s); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(50px) rotateX(55deg) scale(.9); }
  to { opacity: 1; transform: none; }
}
.card > button {
  all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; position: relative;
  transform-style: preserve-3d; border-radius: 22px;
  transform: rotateX(calc(var(--ry, 0) * -10deg)) rotateY(calc(var(--rx, 0) * 14deg));
  transition: transform .25s ease-out;
}
.card > button:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
.plinth {
  position: absolute; inset: 0; border-radius: 22px; transform: translateZ(0);
  background: radial-gradient(ellipse at 50% 30%, #fffaf0, #f1e3c7 70%), var(--paper);
  box-shadow: 0 18px 30px -12px rgba(92, 58, 33, .35), inset 0 0 0 1px rgba(92, 58, 33, .08);
}
.plinth::after { content: ""; position: absolute; inset-inline: 10px; bottom: 6px; height: 14px; background: var(--brown); opacity: .5; -webkit-mask: url("../assets/motifs/band.svg") repeat-x 50% 50% / auto 100%; mask: url("../assets/motifs/band.svg") repeat-x 50% 50% / auto 100%; }
.stage { position: relative; display: block; height: 190px; transform-style: preserve-3d; }
@media (min-width: 640px) { .stage { height: 220px; } }
.float {
  position: absolute; inset: 14px 10px 6px; display: block; transform-style: preserve-3d;
  animation: sway 6s ease-in-out infinite paused; animation-delay: var(--p, 0s); will-change: transform;
}
@keyframes sway {
  0%, 100% { transform: translateZ(46px) translateY(0) rotateY(-9deg); }
  50% { transform: translateZ(46px) translateY(-9px) rotateY(9deg); }
}
.float img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 14px 12px rgba(60, 35, 15, .3)); }
.card.plate .float img { top: auto; height: 80%; }
.glow { position: absolute; inset: 18% 18% 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 190, .9), transparent 70%); transform: translateZ(10px); animation: breathe 4s ease-in-out infinite paused; animation-delay: var(--p, 0s); }
@keyframes breathe { 50% { opacity: .55; transform: translateZ(10px) scale(1.08); } }
.shadow { position: absolute; left: 50%; bottom: 6px; width: 54%; height: 16px; margin-left: -27%; border-radius: 50%; background: radial-gradient(rgba(60, 35, 15, .35), transparent 70%); transform: translateZ(4px); animation: shadowPulse 6s ease-in-out infinite paused; animation-delay: var(--p, 0s); }
@keyframes shadowPulse { 50% { transform: translateZ(4px) scale(.82); opacity: .7; } }
/* Steam: a looping sprite of real steam (96 frames stacked), stepped frame by frame. */
.stage .steam { position: absolute; top: -78px; left: 50%; width: 92px; height: 138px; margin-left: -46px; transform: translateZ(60px); pointer-events: none; }
.steam { overflow: hidden; }
/* On the light card the white steam needs a faint warm shade around it to be seen. */
.stage .steam { filter: drop-shadow(0 0 2px rgba(92, 58, 33, .55)) drop-shadow(0 0 6px rgba(92, 58, 33, .25)); }
.steam i { position: absolute; left: 0; top: 0; width: 100%; height: 9600%; background: url("../assets/vessels/steam.webp?v=78") 0 0 / 100% 100% no-repeat; opacity: .9; animation: steamRun 6.5s steps(96) infinite paused; animation-delay: var(--p, 0s); }
@keyframes steamRun { to { transform: translateY(-100%); } }
.info { position: relative; display: block; padding: 4px 12px 16px; text-align: center; transform: translateZ(28px); }
.info .nm { display: block; margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.info .en { display: block; margin: 2px 0 0; font-size: 11px; letter-spacing: .1em; color: var(--brass-lo); direction: ltr; text-transform: uppercase; }
.info .ds { display: block; margin: 6px auto 0; max-width: 26ch; font-size: 12px; line-height: 1.5; color: var(--brown); opacity: .78; }
.play-chip { display: inline-flex; position: relative; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: var(--brown); color: var(--cream); font-size: 12px; font-weight: 700; }
.play-chip::before { content: ""; width: 0; height: 0; border-block: 5px solid transparent; border-inline-end: 8px solid var(--brass-hi); }
.card.live .float, .card.live .glow, .card.live .shadow, .card.live .steam i { animation-play-state: running; }
.card > button:hover .float img { filter: drop-shadow(0 22px 16px rgba(60, 35, 15, .38)); }

.foot { text-align: center; padding: 0 0 calc(100px + var(--safe-b)); color: var(--brown-2); }
.foot > .band { margin-bottom: 18px; }
.foot-sb { display: block; height: 130px; width: auto; margin: 0 auto 8px; animation: breathe2 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.foot p { margin: 0; font-size: 14px; }

/* ---------- Sindbad, full-body mascot ---------- */
.sb { display: block; transform-origin: 50% 100%; animation: breathe2 3.4s ease-in-out infinite; filter: drop-shadow(0 10px 10px rgba(60, 35, 15, .22)); }
@keyframes breathe2 { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, .985) translateY(1px); } }
.sb.pop { animation: posePop .38s cubic-bezier(.3, 1.6, .5, 1), breathe2 3.4s ease-in-out .38s infinite; }
@keyframes posePop { 0% { transform: scale(.92, 1.06); } 60% { transform: scale(1.05, .96); } 100% { transform: none; } }
.sb[data-pose="cheer"] { animation: cheer .55s ease-in-out 3; }
@keyframes cheer { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(0) scale(1.06, .92); } 60% { transform: translateY(-22px) scale(.97, 1.04); } }
.sb[data-pose="wave"] { animation: waveSway .9s ease-in-out infinite; }
@keyframes waveSway { 50% { transform: rotate(-3deg); } }
.sb[data-pose="talk"], .sb[data-pose="point"], .sb[data-pose="invite"] { animation: chatter .5s ease-in-out infinite; }
@keyframes chatter { 50% { transform: translateY(-3px) scale(1.01, .99); } }

/* ---------- Sindbad peeking out from behind a card ---------- */
/* Sits behind the card (z-index -1 inside the card's stacking context), so he
   rises from behind its top edge into the gap between products. */
.peek { position: absolute; z-index: -1; inset-inline: 0; top: 0; height: 0; pointer-events: none; }
.peek-btn {
  position: absolute; bottom: -8px; inset-inline-start: 10%; border: 0; background: none; padding: 0; cursor: pointer; pointer-events: auto;
  transform: translateY(100%) rotate(0); transition: transform .45s cubic-bezier(.3, 1.5, .5, 1);
}
.peek.end .peek-btn { inset-inline-start: auto; inset-inline-end: 10%; }
.peek-btn .sb { height: 118px; width: auto; }
@media (min-width: 640px) { .peek-btn .sb { height: 140px; } }
.peek.up .peek-btn { transform: translateY(38%) rotate(-6deg); }
.peek.end.up .peek-btn { transform: translateY(38%) rotate(6deg); }
.peek:not(.up) .peek-btn { transition-timing-function: cubic-bezier(.5, 0, .8, .4); transition-duration: .35s; }
/* The bubble sits beside his head (not above it), so it stays inside the section. */
.peek-bubble {
  position: absolute; bottom: 8px; inset-inline-start: 46%; inset-inline-end: 4px; padding: 6px 9px; border: 0; border-radius: 12px 12px 3px 12px; background: #fff; color: var(--brown);
  font-size: 12px; font-weight: 800; line-height: 1.4; text-align: start; box-shadow: 0 8px 18px rgba(60, 35, 15, .25); cursor: pointer;
  transform: scale(0); opacity: 0; transform-origin: 100% 100%; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), opacity .2s;
}
@media (max-width: 639px) { .peek-bubble { inset-inline-start: 38%; font-size: 11.5px; padding: 5px 8px; } .peek.end .peek-bubble { inset-inline-end: 38%; } }
@media (min-width: 640px) { .peek-bubble { font-size: 13px; } }
.peek.end .peek-bubble { inset-inline-start: 4px; inset-inline-end: 46%; border-radius: 12px 12px 12px 3px; transform-origin: 0 100%; }
.peek.talk .peek-bubble { transform: none; opacity: 1; pointer-events: auto; }

/* ---------- Preparation theatre (auto-play) ---------- */
.brew {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center;
  padding: 12px 16px calc(14px + var(--safe-b)); overflow: hidden;
  background: radial-gradient(ellipse at 50% 58%, #6b4326 0%, #3a2214 45%, var(--espresso) 80%), var(--espresso);
  color: var(--cream); animation: fadeIn .4s ease;
}
.brew::after { content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 22px; background: var(--brass-hi); opacity: .8; -webkit-mask: url("../assets/motifs/band.svg") repeat-x 0 50% / auto 100%; mask: url("../assets/motifs/band.svg") repeat-x 0 50% / auto 100%; }
@keyframes fadeIn { from { opacity: 0; } }
.brew-head { width: min(100%, 520px); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brew-head > div { text-align: center; }
.brew-kicker { margin: 0; font-size: 12px; color: var(--brass-hi); font-weight: 700; }
.brew-head h2 { font-family: var(--font-display); margin: 0; font-size: clamp(22px, 6vw, 28px); color: var(--cream); line-height: 1.3; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.brew-stage-wrap { position: relative; flex: 1; min-height: 0; width: calc(100% + 32px); margin: 8px -16px 0; overflow: hidden; }
/* The scene: Sindbad behind a real wooden counter, the real product in front of him.
   brew.js sizes and places every layer in units of Sindbad's height. */
.scene { position: absolute; left: 50%; top: 0; translate: -50% 0; user-select: none; -webkit-user-select: none; }
.scene > * { position: absolute; pointer-events: none; }
.scene canvas { left: 0; top: 0; width: 100%; height: 100%; }
.chef-sb { width: auto; transition: top .5s ease; }
.bar { left: -300%; width: 700%; bottom: -2px; background: url("../assets/vessels/counter.webp") repeat-x 50% 0; box-shadow: 0 -2px 0 rgba(255, 220, 160, .08); -webkit-mask: linear-gradient(#0000, #000 10px); mask: linear-gradient(#0000, #000 10px); }
.bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 10, 4, .75), transparent 30%, transparent 70%, rgba(20, 10, 4, .75)); }
.crate { object-fit: fill; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }
.feet-shadow { border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); }
.v-empty, .v-full { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.v-empty { transition: opacity .6s; }
/* Clear cups: an empty cup fills while he works; the finished drink appears at the end. */
.scene.cold .v-full { opacity: 0; transition: opacity .9s ease; }
.scene.cold.served .v-full { opacity: 1; }
.scene.cold #fxBack, .scene.cold #fxFront { transition: opacity .9s ease; }
.v-print { filter: none; }
.scene.cold.served #fxBack, .scene.cold.served #fxFront, .scene.cold.served .v-empty { opacity: 0; }
.v-full.land { animation: land .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes land { from { transform: translateY(-14%) scale(.92); opacity: 0; } }
/* Hot cup: the white paper lip all round, and inside it the bare cup or what he has poured. */
.mouth { border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #fffdf8, #f1ebe0 70%, #d9cfbf); box-shadow: 0 1px 2px rgba(60, 35, 15, .25); transition: opacity .3s; }
.mouth::before { content: ""; position: absolute; left: 4%; right: 4%; top: 8%; bottom: 14%; border-radius: 50%; background: var(--fill, radial-gradient(ellipse at 50% 30%, #f5eee2, #ddd1bd 55%, #b9a88d)); box-shadow: inset 0 6px 10px rgba(80, 50, 20, .35); }
#vSteam { opacity: 0; transition: opacity 1s; }
#vSteam.on { opacity: 1; }
#vSteam.on i { animation-play-state: running; }
.v-glow { border-radius: 50%; opacity: 0; background: radial-gradient(closest-side, rgba(232, 196, 120, .35), rgba(232, 196, 120, .12) 55%, transparent); transition: opacity 1.2s .2s; }
.brew-stage-wrap.reveal .v-glow { opacity: 1; }
.chef-say {
  left: 2%; top: 0; width: max-content; max-width: 96%; margin: 0;
  padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--cream); color: var(--brown);
  font-family: var(--font-display); font-size: clamp(15px, 4.2vw, 20px); line-height: 1.4; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); z-index: 5;
}
.chef-say.show { animation: sayIn .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes sayIn { from { transform: scale(.4) translateY(10px); opacity: 0; transform-origin: 10% 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.brew-final { position: absolute; bottom: calc(30px + var(--safe-b)); inset-inline: 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 16px; animation: rise .5s ease; }

.noscript { text-align: center; padding: 40px; }

@media (max-height: 640px) {
    }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card { opacity: 1; }
}

/* ---------- Cold cups sweat: drops run down the plastic and drip onto the counter ---------- */
/* .wet covers exactly the photo (same ratio, anchored bottom centre like the img). */
.wet { position: absolute; left: 50%; bottom: 0; height: 100%; aspect-ratio: var(--ar); max-width: 100%; translate: -50% 0; pointer-events: none; }
.run i { position: absolute; display: block; opacity: 0; animation: var(--dur) linear var(--delay) infinite paused; }
.card.live .run i { animation-play-state: running; }
/* A clear bead of water: dark rim where it bends the light, bright glint on top. */
.run .drop {
  width: var(--sz); aspect-ratio: .8; translate: -50% -100%; transform-origin: 50% 100%;
  background: url("../assets/vessels/drop.webp?v=78") 0 0 / 100% 100% no-repeat;
  animation-name: dropRun;
}
/* Water beads up, creeps, sticks, lets go and slides; it stretches while it moves and
   rounds up when it stops; at the base it hangs, then falls to the counter. */
@keyframes dropRun {
  0% { left: var(--x0); top: var(--y0); opacity: 0; scale: .2; }
  12% { left: var(--x0); top: var(--y0); opacity: 1; scale: 1; }
  18% { left: var(--x0); top: var(--y0); scale: 1.06 .96; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  27% { left: var(--xa); top: var(--ya); scale: .92 1.12; }
  30%, 40% { left: var(--xa); top: var(--ya); scale: 1.04 .97; animation-timing-function: cubic-bezier(.5, 0, .7, 1); }
  48% { left: var(--xb); top: var(--yb); scale: .9 1.15; }
  51%, 58% { left: var(--xb); top: var(--yb); scale: 1.03 .98; animation-timing-function: cubic-bezier(.6, 0, .9, .6); }
  72% { left: var(--x1); top: var(--y1); scale: .86 1.22; }
  76%, 80% { left: var(--x1); top: var(--y1); opacity: 1; scale: .95 1.12; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  86% { left: var(--x1); top: calc(var(--y1) + 3.5%); opacity: 1; scale: .75 1.3; }
  87%, 100% { left: var(--x1); top: calc(var(--y1) + 3.5%); opacity: 0; scale: .3; }
}
/* The wet streak left behind on the plastic, fading from the top. */
.run .trail {
  left: var(--x0); top: var(--y0); width: calc(var(--sz) * .45); min-width: 2px; height: 0; translate: -50% -40%; rotate: var(--ang); transform-origin: 50% 0;
  border-radius: 3px; background: linear-gradient(90deg, rgba(10, 20, 30, .28), rgba(255, 255, 255, .75) 40%, rgba(255, 255, 255, .25) 70%, rgba(10, 20, 30, .2));
  -webkit-mask: linear-gradient(transparent, #000 35%); mask: linear-gradient(transparent, #000 35%);
  animation-name: trail;
}
@keyframes trail {
  0%, 18% { height: 0; opacity: .9; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  27%, 40% { height: var(--lena); animation-timing-function: cubic-bezier(.5, 0, .7, 1); }
  48%, 58% { height: var(--lenb); animation-timing-function: cubic-bezier(.6, 0, .9, .6); }
  72% { height: var(--len); opacity: .9; }
  100% { height: var(--len); opacity: 0; }
}
}
/* Where it lands on the counter: a little splash, then a wet spot that dries. */
.run .spot {
  left: var(--x1); top: calc(var(--y1) + 3.5%); width: 16%; aspect-ratio: 3; translate: -50% -50%; border-radius: 50%; opacity: 0; scale: .2;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .35), rgba(150, 180, 200, .3) 55%, rgba(255, 255, 255, .7) 80%, transparent);
  animation-name: spot;
}
@keyframes spot {
  0%, 86% { opacity: 0; scale: .2; }
  88% { opacity: 1; scale: 1.1 .8; }
  94% { opacity: .7; scale: 1; }
  100% { opacity: 0; scale: 1.05; }
}
