﻿/* ==========================================================================
   Service demo panel — one illustrated scene per service card

   Sits directly under the four service cards and shows a picture of whichever
   service the visitor is pointing at or tabbing through:

     queue     a counter with a "now serving" board and a line of people
     booking   a calendar with a chosen day and a slot, beside a sweeping clock
     takeaway  a collection shelf with numbered bags and a cup on the pass

   Everything is CSS gradients, borders and inline SVG. There are no image
   files: the whole panel adds nothing to the download beyond this stylesheet,
   stays sharp at any width and can be recoloured from the same palette as the
   rest of the page. That matters here because the page already ships no other
   imagery and the hero next to it is pure CSS.

   Only one scene is visible at a time. The container carries `data-scene`, and
   the matching figure is the only one with opacity 1. Each scene's animations
   are declared under that same selector, so they start from frame zero every
   time a scene becomes active — the panel animates on switch instead of
   sitting on a still frame.
   ========================================================================== */

.svc-demo {
  margin-top: 1.5rem;
}

/*
  The stage is a fixed canvas for every scene.

  `aspect-ratio` rather than a fixed height: the width comes from the column, the
  height follows at the artwork's own 8:3, so the banner fills it exactly on any
  screen without cropping, stretching or letterboxing.

  Crucially this is ONE rule for all four scenes, not a per-scene height. When the
  queue scene had its own aspect ratio and the others kept a fixed height, switching
  scenes changed the stage height by 168px, which dragged the button row out from
  under the pointer. That produced a mouseenter / mouseleave loop and the violent
  flash on hover. A stage that cannot change size cannot cause that.

  `min-height` keeps a floor on very short viewports so the ratio cannot squeeze the
  panel into a sliver on a wide, short window.
*/
/*
  Fixed-height band, two-thirds of the original.

  The original derived its height from the 1600/600 artwork ratio, capped at 27rem
  and floored at 13.5rem, which measured 432px on a 1152px column. That is the
  "original value" restored in step 1; this rule is step 2, which takes a third off
  it to 288px and locks it, so widening the window no longer makes the panel taller.

  Nothing scales the drawing any more. An earlier attempt put `transform: scale()`
  on .scene-frame to shrink the artwork with the band, but that shrank the people
  inside it too — they came out 8px wide and read as specks. The frame now keeps its
  natural size and the band simply shows a little less of the room.
*/
.svc-demo-stage {
  position: relative;
  height: 18rem;           /* 288px — the restored 432px, minus one third */
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--h-line);
  background: #f8fafc;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);

  /* Establishes the query container the scenes measure themselves against. */
  container-type: size;
  container-name: stage;
}

.scene {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.42s ease, visibility 0s linear 0.42s;
}

/* ------------------------------------------------------------------ frame --- */

/*
  The stage spans the whole card grid — over 1100px on a desktop — but the
  drawings inside it do not. Left to fill that width, five people spread out
  read as a decorative stripe rather than a queue, and the calendar floats in
  an empty field. So each scene composes inside a fixed-width frame that stays
  centred; the bloom and the floor run full-bleed behind it.
*/
/*
  The stage spans the whole card grid — over 1100px on a desktop — but the
  drawings inside it do not. At that width the window and the counter ended up
  pinned to the two edges with a stretch of empty floor between them, which read
  as a diagram rather than a room. The frame is a fixed 46rem, centred, which is
  just wide enough for the props a real scene needs (window, bench, counter) and
  no wider. The bloom and the floor still run full-bleed behind it.
*/
/*
  The drawing keeps its natural size.

  The stage used to span over 1100px, and at that width the window and counter sat
  pinned to the far edges with a stretch of empty floor between them, reading as a
  diagram rather than a room. Capping the frame at 46rem and centring it fixes that,
  while the bloom and the floor still run full-bleed behind it.

  No transform here on purpose. An earlier version scaled the whole frame down with
  the band height, which is correct for the furniture but wrong for the people: at
  0.33 they rendered 8px wide and stopped looking like a queue. The band is shorter
  now, so the frame simply overflows a little at the top and is clipped by
  .svc-demo-stage's overflow: hidden — the figures stay at the size they were drawn,
  which is the one thing in the scene that has to stay legible.

  The frame is anchored to the bottom so the cut happens at the ceiling (window,
  sign, board) rather than at the floor, where the people stand.
*/
.scene-frame {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 46rem;
  margin: 0 auto;
  height: 27rem;                  /* the composition's own design height */
}

/* Full-bleed bloom in the scene's accent. This is the first and strongest cue
   for which service is showing, before any detail is read. */
.scene-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-floor {
  position: absolute;
  inset: auto 0 0 0;
  height: 3.4rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.1));
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

/* A person: head plus shoulders, used by both the clerk and the queue. */
.q-head,
.q-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: block;
}

.q-head {
  top: 0;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
}

.q-body {
  top: 0.92rem;
  width: 1.5rem;
  height: 2.1rem;
  border-radius: 0.72rem 0.72rem 0.22rem 0.22rem;
}

/* ------------------------------------------------- card ↔ scene pairing --- */

/*
  The card whose scene is on screen gets a light outline, so the panel and the
  row of cards read as one control. It deliberately does not borrow the primary
  blue for the planned two: a blue ring on "Booking" would look like the live
  service, and the whole point of the tag is that it is not live yet. Planned
  cards get a muted dashed ring instead — a "you are previewing this" cue.
*/
.svc-card.is-active:not([aria-disabled="true"]) {
  border-color: var(--h-blue-1, #3b82f6);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.14);
}

.svc-card.is-active[aria-disabled="true"] {
  border-style: dashed;
  border-color: rgba(100, 116, 139, 0.55);
  background: rgba(255, 255, 255, 0.86);
}

.svc-card.is-active[aria-disabled="true"] .svc-card-icon {
  background: rgba(15, 23, 42, 0.07);
}
/* ============================================================== QUEUE ===== */

/*
  The queue scene is a single finished illustration drawn at 1600x600 — exactly 8:3.

  object-fit alone could not make it fill the old stage: `contain` shrank the picture
  until its height fitted, leaving wide empty bands either side, and `cover` cropped
  the top and bottom captions off.

  The real fix is not the image at all — it is the stage. The stage carries the
  artwork's own 8:3 ratio for EVERY scene (see .svc-demo-stage above), so the banner
  fills it exactly, and the height no longer depends on which scene is showing.

  That second part matters more than it looks. An earlier version gave only the queue
  scene an aspect ratio, which meant the stage was 432px tall on queue and 264px on
  every other scene. Hovering a button switched the scene, the stage shrank by 168px,
  and the button row jumped up with it — out from under the pointer. The pointer was
  then over nothing, which fired mouseleave, which switched back to queue, which
  pushed the row down again, which put the pointer back over the button. A loop at
  frame rate: the intense flash on hover.
*/
.scene-queue { color: #2563eb; }

/*
  The stage keeps ONE height for all four scenes.

  This is the fix for the hover flash: a stage that changed height per scene moved the
  button row out from under the pointer, which fired mouseleave, which changed the
  scene back, which moved the row back under the pointer, which fired mouseenter —
  a loop at frame rate.

  The ratio now lives on .svc-demo-stage itself (top of this file) and applies to
  every scene, so switching scenes cannot change the layout by a single pixel.
*/

.q-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* ---------------------------------------------------------- queue scene --- */

/*
  A shop interior: window and sign on the back wall, a bench, a plant, a counter with
  a staff member and a QR stand, and a line of six people with the one at the head
  drawn darkest.

  Every part is a gradient, border or pseudo-element. No image file, so the scene
  costs nothing to download and stays sharp at any width.
*/

/* Faint vertical tile lines on the back wall, so the room has depth rather than
   being a flat gradient. */
.scene-queue::before {
  content: "";
  position: absolute;
  inset: 0 0 3.4rem 0;
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.55), rgba(226, 232, 240, 0.32)),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.04) 0 1px, transparent 1px 3.4rem);
}

.scene-queue .scene-glow {
  background:
    radial-gradient(38% 60% at 74% 20%, rgba(59, 130, 246, 0.3), transparent 70%),
    radial-gradient(34% 50% at 18% 74%, rgba(6, 182, 212, 0.2), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
}

.q-room {
  position: absolute;
  top: 1.15rem;
  left: 0;
  right: 0;
  bottom: 3.4rem;
}

/* Window on the back wall: four panes of daylight, drawn with two crossing bars. */
.q-window {
  position: absolute;
  top: 0.1rem;
  left: 0;
  width: 7.6rem;
  height: 4.6rem;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 48.5%, rgba(255, 255, 255, 0.92) 48.5% 51.5%, transparent 51.5%),
    linear-gradient(180deg, transparent 47%, rgba(255, 255, 255, 0.92) 47% 53%, transparent 53%),
    linear-gradient(180deg, #dbeafe, #eff6ff);
  border: 2px solid rgba(37, 99, 235, 0.2);
  box-shadow: inset 0 -12px 26px rgba(37, 99, 235, 0.12);
}

/* Shop sign strip above the window. */
.q-strip {
  position: absolute;
  top: -0.55rem;
  left: 0;
  width: 7.6rem;
  height: 0.36rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.52), rgba(6, 182, 212, 0.42));
}

/* The "now serving" board. Dark panel, cyan digits — the same visual language as the
   real display screen, so the demo and the product look like one thing. */
.q-board {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  gap: 0.12rem;
  padding: 0.5rem 0.85rem 0.55rem;
  border-radius: 11px;
  background: linear-gradient(160deg, #0f172a, #1e293b);
  text-align: center;
  animation: qBoardGlow 3.4s ease-in-out infinite;
}

.q-board-label {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 197, 255, 0.88);
}

.q-board-no {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: #7dd3fc;
  text-shadow: 0 0 14px rgba(125, 211, 252, 0.55);
}

/* Waiting bench beside the window. */
.q-bench {
  position: absolute;
  bottom: 2.2rem;
  left: 8.4rem;
  width: 7.4rem;
  height: 2.1rem;
}

.q-bench::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.52rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.q-bench i {
  position: absolute;
  top: 0.52rem;
  width: 0.34rem;
  height: 1.5rem;
  border-radius: 0 0 2px 2px;
  background: rgba(100, 116, 139, 0.55);
}

.q-bench i:first-child { left: 0.5rem; }
.q-bench i:last-child { right: 0.5rem; }

/* Potted plant in the corner. */
.q-plant {
  position: absolute;
  bottom: 0.5rem;
  left: 16.4rem;
  width: 1.7rem;
  height: 2.6rem;
}

.q-plant i {
  position: absolute;
  bottom: 0.72rem;
  left: 50%;
  display: block;
  width: 1.05rem;
  height: 1.6rem;
  margin-left: -0.525rem;
  border-radius: 50% 50% 38% 38%;
  background: linear-gradient(180deg, #6ee7b7, #10b981);
  transform-origin: 50% 100%;
}

.q-plant i:nth-child(1) { transform: rotate(-26deg) scaleY(0.86); }
.q-plant i:nth-child(2) { transform: rotate(0deg); height: 1.85rem; background: linear-gradient(180deg, #86efac, #22c55e); }
.q-plant i:nth-child(3) { transform: rotate(26deg) scaleY(0.86); }

.q-plant::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1.35rem;
  height: 0.82rem;
  margin-left: -0.675rem;
  border-radius: 0.1rem 0.1rem 0.36rem 0.36rem;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border: 1px solid rgba(180, 83, 9, 0.22);
}

/* Counter on the right: the destination the line is moving toward. */
.q-counter {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11rem;
  height: 4.6rem;
}

.q-clerk {
  position: absolute;
  bottom: 1.95rem;
  left: 50%;
  width: 1.5rem;
  height: 2.9rem;
  margin-left: -3.4rem;
}

/* Skin-toned head so the figure reads as a person, not a blue pin. */
.q-clerk .q-head {
  background: linear-gradient(180deg, #f8d9bd, #eab894);
  width: 0.86rem;
  height: 0.86rem;
}

.q-clerk .q-body {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  width: 1.5rem;
  height: 1.95rem;
}

/* The counter slab, drawn over the clerk's waist so they stand behind it. */
.q-counter-top {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.95rem;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #ffffff, #e2e8f0);
  border-top: 2px solid rgba(37, 99, 235, 0.36);
  box-shadow: 0 -10px 24px rgba(37, 99, 235, 0.18);
}

/* QR stand on the counter — what the guest actually walks up to. */
.q-qr {
  position: absolute;
  bottom: 2.05rem;
  left: 0.15rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 5px;
  background:
    linear-gradient(90deg, #1e293b 0 30%, transparent 30% 62%, #1e293b 62% 100%) 0.19rem 0.19rem / 1.47rem 0.36rem no-repeat,
    linear-gradient(90deg, transparent 0 24%, #1e293b 24% 46%, transparent 46% 64%, #1e293b 64% 84%, transparent 84%) 0.19rem 0.75rem / 1.47rem 0.33rem no-repeat,
    linear-gradient(90deg, #1e293b 0 24%, transparent 24% 58%, #1e293b 58% 100%) 0.19rem 1.29rem / 1.47rem 0.33rem no-repeat,
    #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.24);
}

/* The line. Silhouettes rather than faces: at this size detail would be mush, and a
   silhouette still reads as "people waiting" instantly. */
.q-line {
  position: absolute;
  bottom: 0.5rem;
  left: 1rem;
  right: 12.4rem;
  height: 3.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 1.1rem;
}

.q-line li {
  position: relative;
  flex: none;
  width: 1.5rem;
  height: 3.15rem;
  animation: qLineBob 3.2s ease-in-out infinite;
}

.q-line li:nth-child(1) { animation-delay: 0s; }
.q-line li:nth-child(2) { animation-delay: 0.22s; }
.q-line li:nth-child(3) { animation-delay: 0.44s; }
.q-line li:nth-child(4) { animation-delay: 0.66s; }
.q-line li:nth-child(5) { animation-delay: 0.88s; }
.q-line li:nth-child(6) { animation-delay: 1.1s; }

/* The line recedes: the person nearest the counter is the darkest, because they are
   the one being served, and the tail fades out as it goes back. */
.q-line li .q-head,
.q-line li .q-body { background: rgba(37, 99, 235, 0.2); }

.q-line li:nth-child(1) .q-head,
.q-line li:nth-child(1) .q-body { background: #1d4ed8; }
.q-line li:nth-child(2) .q-head,
.q-line li:nth-child(2) .q-body { background: rgba(37, 99, 235, 0.66); }
.q-line li:nth-child(3) .q-head,
.q-line li:nth-child(3) .q-body { background: rgba(37, 99, 235, 0.52); }
.q-line li:nth-child(4) .q-head,
.q-line li:nth-child(4) .q-body { background: rgba(37, 99, 235, 0.42); }
.q-line li:nth-child(5) .q-head,
.q-line li:nth-child(5) .q-body { background: rgba(37, 99, 235, 0.33); }

@keyframes qBoardGlow {
  0%, 100% { box-shadow: 0 10px 22px rgba(15, 23, 42, 0.26); }
  50%      { box-shadow: 0 12px 26px rgba(37, 99, 235, 0.4); }
}

@keyframes qLineBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}


/* ============================================================ BOOKING ===== */

.scene-booking { color: #7c3aed; }

.scene-booking .scene-glow {
  background:
    radial-gradient(48% 62% at 32% 26%, rgba(139, 92, 246, 0.24), transparent 72%),
    radial-gradient(40% 54% at 76% 74%, rgba(236, 72, 153, 0.14), transparent 74%),
    linear-gradient(180deg, #fdfcff 0%, #f5f3ff 100%);
}

.scene-booking::before {
  content: "";
  position: absolute;
  inset: 0 0 3.1rem 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(15, 23, 42, 0.03) 0 1px,
    transparent 1px 2.6rem
  );
}

.b-group {
  position: absolute;
  top: 1.3rem;
  left: 0;
  right: 0;
  bottom: 3.4rem;
}

/* The booking card. A calendar rather than a photo of a reception desk: it is
   the screen the customer actually sees when booking, and it fits the width. */
.b-calendar {
  position: absolute;
  top: 0;
  left: 0;
  width: 13.4rem;
  padding: 0.7rem 0.8rem 0.8rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 18px 38px rgba(76, 29, 149, 0.15);
  animation: bCardFloat 5.4s ease-in-out infinite;
}

.b-cal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.45rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.14);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #6d28d9;
}

.b-cal-year {
  font-size: 0.56rem;
  font-weight: 700;
  color: rgba(109, 40, 217, 0.5);
}

.b-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
}

.b-cal-grid span {
  height: 0.6rem;
  border-radius: 0.16rem;
  background: rgba(139, 92, 246, 0.13);
}

/* The chosen day: the only saturated cell on the card. It pulses so the eye
   lands on the decision, not on the grid. */
.b-cal-grid .is-picked {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  animation: bPickPulse 2.8s ease-in-out infinite;
}

.b-slots {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.62rem;
}

.b-slots span {
  flex: 1;
  padding: 0.24rem 0;
  border-radius: 0.34rem;
  background: rgba(139, 92, 246, 0.09);
  color: rgba(109, 40, 217, 0.66);
  font-size: 0.5rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.02em;
}

.b-slots .is-picked {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  color: #ffffff;
  animation: bPickPulse 2.8s ease-in-out infinite;
}

/* Clock: hands sweeping slowly. This is what makes the panel feel like a live
   booking screen rather than a printed poster. */
.b-clock {
  position: absolute;
  top: 0.15rem;
  right: 0.3rem;
  width: 5.8rem;
  height: 5.8rem;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #ffffff, #ede9fe 76%);
  border: 1px solid rgba(139, 92, 246, 0.26);
  box-shadow: 0 16px 32px rgba(76, 29, 149, 0.16);
}

.b-clock::after {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.14);
}

.b-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 999px;
  background: #7c3aed;
}

.b-hand-h {
  width: 0.17rem;
  height: 1.35rem;
  margin-left: -0.085rem;
  animation: bHourSpin 36s linear infinite;
}

.b-hand-m {
  width: 0.11rem;
  height: 1.95rem;
  margin-left: -0.055rem;
  background: #a78bfa;
  animation: bMinSpin 9s linear infinite;
}

.b-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 0.36rem;
  height: 0.36rem;
  margin: -0.18rem 0 0 -0.18rem;
  border-radius: 50%;
  background: #6d28d9;
}

/* Confirmation pill, tucked under the clock, carrying the booked time so the
   panel states a concrete outcome instead of just a checkmark. */
.b-ok {
  position: absolute;
  top: 6.4rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.75rem;
  padding: 0 0.7rem 0 0.42rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(109, 40, 217, 0.32);
  animation: bOkPop 3.6s ease-in-out infinite;
}

.b-ok svg { width: 0.9rem; height: 0.9rem; flex: none; }

.b-ok-text {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Today's list, on the right below the clock: what the shop sees when it opens
   the booking tab. One row is highlighted because it is the one just taken. */
.b-agenda {
  position: absolute;
  top: 8.6rem;
  right: 0.3rem;
  width: 10.4rem;
  margin: 0;
  padding: 0.48rem 0.6rem;
  list-style: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(139, 92, 246, 0.16);
  box-shadow: 0 12px 26px rgba(76, 29, 149, 0.1);
  display: grid;
  gap: 0.28rem;
}

.b-agenda li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.b-agenda i {
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 800;
  color: rgba(109, 40, 217, 0.6);
  letter-spacing: 0.02em;
}

.b-agenda b {
  flex: 1;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
}

.b-agenda .is-now i { color: #6d28d9; }
.b-agenda .is-now b { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* Reception desk along the bottom, so the calendar and clock sit in a room
   rather than floating on a gradient. */
.b-desk {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.2rem;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #ffffff, #ede9fe);
  border-top: 2px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 -10px 24px rgba(139, 92, 246, 0.13);
}

/* Floor lamp in the corner, the one piece of furniture in the room. */
.b-lamp {
  position: absolute;
  bottom: 2.2rem;
  left: 14.4rem;
  width: 2.2rem;
  height: 3.4rem;
}

.b-lamp::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.9rem;
  height: 1.05rem;
  margin-left: -0.95rem;
  border-radius: 0.6rem 0.6rem 0.12rem 0.12rem;
  background: linear-gradient(180deg, #ddd6fe, #c4b5fd);
  border: 1px solid rgba(109, 40, 217, 0.26);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.28);
}

.b-lamp::after {
  content: "";
  position: absolute;
  top: 1.05rem;
  bottom: 0;
  left: 50%;
  width: 0.14rem;
  margin-left: -0.07rem;
  background: rgba(109, 40, 217, 0.32);
  border-radius: 999px;
}

/* =========================================================== TAKEAWAY ===== */

.scene-takeaway { color: #ea580c; }

.scene-takeaway .scene-glow {
  background:
    radial-gradient(48% 60% at 40% 24%, rgba(249, 115, 22, 0.24), transparent 72%),
    radial-gradient(38% 52% at 80% 76%, rgba(234, 179, 8, 0.18), transparent 74%),
    linear-gradient(180deg, #fffdfa 0%, #fff7ed 100%);
}

.scene-takeaway::before {
  content: "";
  position: absolute;
  inset: 0 0 3.1rem 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.028) 0 1px,
    transparent 1px 3rem
  );
}

.t-group {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  bottom: 3.4rem;
}

/* Sign above the collection point. Says what the shelf is for, in the same
   uppercase idiom as the real display. */
.t-sign {
  position: absolute;
  top: -1.05rem;
  left: 0.3rem;
  padding: 0.2rem 0.58rem 0.22rem;
  border-radius: 5px;
  background: linear-gradient(160deg, #0f172a, #1e293b);
  color: #fed7aa;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

/* The shelf: three paper bags with order numbers. Bags, not plates, because
   takeaway means "packed and waiting for you". */
.t-shelf {
  position: absolute;
  top: 0.9rem;
  left: 0.3rem;
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
}

.t-bag {
  position: relative;
  display: block;
  width: 3.1rem;
  height: 3.7rem;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #ffedd5, #fdba74);
  border: 1px solid rgba(234, 88, 12, 0.26);
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.14);
}

/* Bag handle. */
.t-bag::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 50%;
  width: 1.45rem;
  height: 0.72rem;
  margin-left: -0.725rem;
  border: 2px solid rgba(234, 88, 12, 0.3);
  border-bottom: none;
  border-radius: 0.7rem 0.7rem 0 0;
}

.t-bag i {
  position: absolute;
  inset: auto 0.3rem 0.42rem;
  display: block;
  padding: 0.15rem 0;
  border-radius: 0.22rem;
  background: rgba(255, 255, 255, 0.88);
  color: #c2410c;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
}

/* The bag whose number has been called lifts and glows. */
.t-bag.is-ready {
  background: linear-gradient(180deg, #fdba74, #fb923c);
  border-color: rgba(234, 88, 12, 0.55);
  animation: tBagReady 3s ease-in-out infinite;
}

.t-bag.is-ready i {
  background: #ffffff;
  color: #ea580c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.26);
}

/* The plank the bags stand on. Without it they read as floating stickers
   rather than stock waiting to be collected. */
.t-shelf-board {
  position: absolute;
  top: 4.72rem;
  left: 0.05rem;
  width: 14.3rem;
  height: 0.42rem;
  border-radius: 3px;
  background: linear-gradient(180deg, #fed7aa, #fbbf24);
  border: 1px solid rgba(180, 83, 9, 0.24);
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.18);
}

/* The pass: a cup with rising steam, and the order ticket clipped beside it. */
.t-pass {
  position: absolute;
  right: 0.4rem;
  bottom: 1.9rem;
  width: 7.6rem;
  height: 6.6rem;
}

.t-cup {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3.6rem;
}

.t-cup-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 2.95rem;
  display: block;
  border-radius: 0.28rem 0.28rem 0.95rem 0.95rem;
  background: linear-gradient(180deg, #ffffff, #ffedd5);
  border: 1.5px solid rgba(234, 88, 12, 0.42);
  box-shadow: 0 14px 26px rgba(234, 88, 12, 0.16);
}

/* A band across the cup, so it reads as a takeaway cup and not a plain box. */
.t-cup-body::after {
  content: "";
  position: absolute;
  inset: 0.8rem -1.5px auto -1.5px;
  height: 0.55rem;
  background: rgba(249, 115, 22, 0.26);
}

/* Lid. */
.t-cup-body::before {
  content: "";
  position: absolute;
  top: -0.32rem;
  left: -0.18rem;
  right: -0.18rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #fed7aa;
  border: 1.5px solid rgba(234, 88, 12, 0.42);
}

.t-steam {
  position: absolute;
  bottom: 3.05rem;
  width: 0.18rem;
  height: 1.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(249, 115, 22, 0.42));
  opacity: 0;
  animation: tSteam 2.6s ease-out infinite;
}

.t-steam.s1 { left: 0.72rem; animation-delay: 0s; }
.t-steam.s2 { left: 1.4rem; animation-delay: 0.85s; }
.t-steam.s3 { left: 2.08rem; animation-delay: 1.7s; }

.t-ticket {
  position: absolute;
  right: 0;
  bottom: 0.65rem;
  display: grid;
  gap: 0.22rem;
  width: 2.7rem;
  padding: 0.42rem 0.34rem 0.46rem;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid rgba(234, 88, 12, 0.28);
  box-shadow: 0 14px 26px rgba(234, 88, 12, 0.15);
  transform: rotate(-6deg);
  animation: tTicketSway 4.4s ease-in-out infinite;
}

.t-ticket em {
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 800;
  color: #c2410c;
  text-align: center;
}

.t-ticket i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.2);
}

.t-ticket i:last-child { width: 62%; }

/* The collection counter itself, so the cup and ticket stand on something. */
.t-counter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.1rem;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #ffffff, #ffedd5);
  border-top: 2px solid rgba(234, 88, 12, 0.32);
  box-shadow: 0 -10px 24px rgba(249, 115, 22, 0.14);
}

/* Menu rail on the wall behind the shelf: three cards, so the back of the shop
   is not bare. */
.t-menu {
  position: absolute;
  top: 0.2rem;
  left: 14.6rem;
  right: 0.4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.t-menu span {
  display: block;
  height: 1.35rem;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 237, 213, 0.7));
  border: 1px solid rgba(234, 88, 12, 0.16);
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.08);
}

/* ============================================================== MEMBER ==== */

/*
  Teal rather than a fourth shade of blue or purple: the member service belongs
  to a different app, and giving it its own hue keeps it from reading as "another
  queue feature". Everything else follows the same recipe as the other scenes —
  a full-bleed bloom, a faint wall pattern, props on a fixed frame, and a floor.
*/
.scene-member { color: #0d9488; }

.scene-member .scene-glow {
  background:
    radial-gradient(48% 60% at 34% 26%, rgba(13, 148, 136, 0.26), transparent 72%),
    radial-gradient(38% 52% at 78% 74%, rgba(45, 212, 191, 0.2), transparent 74%),
    linear-gradient(180deg, #fafffe 0%, #f0fdfa 100%);
}

.scene-member::before {
  content: "";
  position: absolute;
  inset: 0 0 3.4rem 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.026) 0 1px,
    transparent 1px 3rem
  );
}

.m-group {
  position: absolute;
  top: 1.2rem;
  left: 0;
  right: 0;
  bottom: 3.4rem;
}

/* The loyalty card, tilted as if held. This is the object that says "member"
   before any text is read. */
.m-card {
  position: absolute;
  top: 0.2rem;
  left: 0.4rem;
  width: 12.4rem;
  height: 7.4rem;
  border-radius: 11px;
  background: linear-gradient(142deg, #0f766e, #0d9488 46%, #14b8a6);
  box-shadow: 0 18px 36px rgba(13, 148, 136, 0.3);
  transform: rotate(-4deg);
  overflow: hidden;
  animation: mCardFloat 6s ease-in-out infinite;
}

/* Sheen across the card face. */
.m-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 70%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: rotate(14deg);
}

/* The gold chip. */
.m-card-chip {
  position: absolute;
  top: 1.15rem;
  left: 1.15rem;
  width: 1.5rem;
  height: 1.15rem;
  border-radius: 3px;
  background: linear-gradient(160deg, #fde68a, #d97706);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.m-card-name {
  position: absolute;
  top: 1.2rem;
  right: 1.15rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.82);
}

.m-card-no {
  position: absolute;
  bottom: 1.05rem;
  left: 1.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.9);
}

/* Stamp row: the paper card, one stamp landing as the scene plays. */
.m-stamps {
  position: absolute;
  top: 8.4rem;
  left: 0.4rem;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.34rem;
  width: 12.4rem;
  padding: 0.5rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 148, 136, 0.2);
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.1);
}

.m-stamp {
  display: grid;
  place-items: center;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px dashed rgba(13, 148, 136, 0.34);
  font-size: 0.5rem;
  font-weight: 800;
  color: transparent;
}

.m-stamp.is-on {
  border-style: solid;
  border-color: transparent;
  background: linear-gradient(180deg, #0d9488, #0f766e);
  color: #ffffff;
}

/* The stamp that has just been added. */
.m-stamp.is-new {
  border-style: solid;
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.16);
  color: #0f766e;
  animation: mStampIn 2.9s ease-in-out infinite;
}

/* Points balance, on the right. */
.m-points {
  position: absolute;
  top: 1rem;
  right: 3.2rem;
  display: grid;
  gap: 0.1rem;
  text-align: right;
}

.m-points-num {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #0f766e;
  animation: mPointsCount 4.2s ease-in-out infinite;
}

.m-points-label {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(13, 148, 136, 0.66);
}

/* Phone showing the member QR: what the guest actually presents at the counter. */
.m-phone {
  position: absolute;
  right: 0.3rem;
  bottom: 0.2rem;
  width: 5.2rem;
  height: 9.4rem;
  border-radius: 0.85rem;
  background: linear-gradient(170deg, #134e4a, #0f172a);
  padding: 0.28rem;
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.26);
  animation: mPhoneSettle 5.6s ease-in-out infinite;
}

.m-phone-screen {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 0.62rem;
  background: #ffffff;
  overflow: hidden;
}

/* A QR-shaped block, drawn with gradients so it needs no image. */
.m-qr {
  display: block;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 2px;
  background:
    linear-gradient(90deg, #0f766e 0 28%, transparent 28% 44%, #0f766e 44% 72%, transparent 72%) 0.2rem 0.2rem / 3rem 0.42rem no-repeat,
    linear-gradient(90deg, transparent 0 22%, #0f766e 22% 40%, transparent 40% 58%, #0f766e 58% 76%, transparent 76%) 0.2rem 1.05rem / 3rem 0.4rem no-repeat,
    linear-gradient(90deg, #0f766e 0 34%, transparent 34% 62%, #0f766e 62% 100%) 0.2rem 1.85rem / 3rem 0.4rem no-repeat,
    repeating-linear-gradient(90deg, #0f766e 0 0.3rem, transparent 0.3rem 0.6rem) 0.2rem 2.6rem / 3rem 0.5rem no-repeat;
  background-color: #ffffff;
}

/* The counter the phone and stamps rest on. */
.m-counter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2rem;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #ffffff, #f0fdfa);
  border-top: 2px solid rgba(13, 148, 136, 0.3);
  box-shadow: 0 -10px 24px rgba(13, 148, 136, 0.13);
}

@keyframes mCardFloat {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%      { transform: rotate(-2.4deg) translateY(-4px); }
}

@keyframes mStampIn {
  0%, 58%, 100% { transform: scale(1); }
  68%           { transform: scale(1.24); }
  80%           { transform: scale(0.96); }
}

@keyframes mPointsCount {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.72; }
}

@keyframes mPhoneSettle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-3px) rotate(-1deg); }
}

/* ------------------------------------------------ which scene is showing --- */

.svc-demo[data-scene="queue"] .scene-queue,
.svc-demo[data-scene="booking"] .scene-booking,
.svc-demo[data-scene="takeaway"] .scene-takeaway,
.svc-demo[data-scene="member"] .scene-member {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.42s ease, visibility 0s;
  animation: sceneIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Caption styles were removed along with the caption itself: it repeated the first
   card's description verbatim directly above it, so the same sentence appeared
   twice. The cards carry the name and description; the panel only shows the scene. */

/* -------------------------------------------------------- the keyframes --- */

@keyframes sceneIn {
  0%   { opacity: 0; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes qBoardGlow {
  0%, 100% { box-shadow: 0 10px 22px rgba(15, 23, 42, 0.26); }
  50%      { box-shadow: 0 12px 26px rgba(37, 99, 235, 0.4); }
}

@keyframes qLineBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

@keyframes bCardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes bPickPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.18); }
  50%      { box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08); }
}

@keyframes bHourSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bMinSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bOkPop {
  0%, 62%, 100% { transform: scale(1); }
  72%           { transform: scale(1.16); }
  82%           { transform: scale(0.96); }
}

@keyframes tBagReady {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@keyframes tSteam {
  0%   { opacity: 0; transform: translateY(0) scaleY(0.6); }
  28%  { opacity: 0.85; }
  100% { opacity: 0; transform: translateY(-0.85rem) scaleY(1.15); }
}

@keyframes tTicketSway {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(-2deg); }
}

/* ------------------------------------------------------------ responsive --- */

/*
  Height is fixed at every breakpoint, and gets shorter as the screen narrows.

  The old rules capped a ratio-derived height (max-height: 21rem / 17rem). With the
  band locked to an explicit height those caps do nothing, so each breakpoint sets
  the height directly. Smaller screens get a shorter band because 288px of
  illustration still eats most of a phone screen.

  Nothing here scales the drawing. The people are drawn at fixed rem sizes and have
  to stay that way — an earlier revision scaled the whole frame with the band and the
  figures shrank to 8px wide, which is what prompted this fix. Where the frame is
  taller than the band it is simply clipped, and it is anchored to the bottom so the
  trim lands on the back wall rather than on the people.
*/
@media (max-width: 48rem) {
  .svc-demo-stage { height: 15rem; }   /* 240px */
}

@media (max-width: 34rem) {
  .svc-demo { margin-top: 1.05rem; }
  .svc-demo-stage { height: 12rem; border-radius: 15px; }   /* 192px */

  /*
    The frame gets shorter here too, not scaled.

    The people are drawn at fixed rem sizes, so leaving the frame at its full 27rem
    inside a 12rem band would crop them off at the waist — the cut happens at the
    top of the box, and the counter they stand at is near the bottom. Keeping the
    frame a little taller than the band still shows the figures and the counter,
    and only trims the back wall above them.
  */
  .scene-frame { height: 15rem; }

  /*
    The figures are enlarged on a phone, not scaled down.

    At the desktop size each person is 1.5rem wide against a 46rem-wide frame, which
    reads fine on a 1152px column but becomes a 24px blob once the same frame is
    squeezed into 390px. The drawing keeps its geometry; the people alone get bigger
    so they stay identifiable as a queue. Only the queue scene has figures with a
    body — the other scenes are furniture and cards, which read at any size.
  */
  .q-line {
    gap: 0.7rem;
    right: 11rem;
  }

  .q-line li {
    width: 2.1rem;
    height: 4.2rem;
  }

  /* Scaled with the li above: 0.82 → 1.15, 1.5x2.1 → 2.1x2.95. */
  .q-head {
    width: 1.15rem;
    height: 1.15rem;
  }

  .q-body {
    top: 1.29rem;
    width: 2.1rem;
    height: 2.95rem;
  }
}


/* Nothing in the panel carries information — the caption below it is real text
   and stays put — so reduced motion simply freezes each scene on its most
   legible frame. */
/* --------------------------------------------------- guest screen in scene --- */

/*
  The guest's phone screen inside the shop drawing.

  Sits in the empty left third of the stage, so it reads as the same moment seen
  from both sides: the counter and the line on the right, the ticket the guest is
  holding on the left. It is laid out over the scene rather than beside it because
  the panel keeps its original size — nothing on the right moves.

  Every size inside is in `em` against --d, so the whole widget scales as one
  object. That matters because the stage is 1152px wide on a desktop and about
  350px on a phone; a fixed px layout would either overflow or turn to mush.
*/
.q-ticket {
  /*
    Sized from the stage's height, not the viewport width.

    vw was right when the stage was an aspect-ratio box: height followed width, so
    the two moved together. Now the band is a fixed 144px tall at every width, and a
    vw-based circle would keep growing sideways until it was taller than the band —
    spilling out of the top and bottom of a 9rem-tall card.

    cqh ties it to the container instead, so the circle is always a proportion of the
    height it has to live in: 62cqh ≈ 89px inside a 144px band, with room above and
    below. clamp keeps a usable floor so it never becomes a dot.
  */
  --d: clamp(4.25rem, 62cqh, 9rem);
  --q-ring: #2563eb;

  position: absolute;
  left: 4.5%;
  top: 50%;
  transform: translateY(-50%);
  width: var(--d);
  height: var(--d);
  font-size: calc(var(--d) * 0.082);
  display: grid;
  place-items: center;
  isolation: isolate;
  z-index: 4;
  pointer-events: none;
}

/* Aurora and pulse are the same shapes as the full-size hero, scaled down. They are
   what makes this read as "live" rather than a static screenshot. */
.q-ticket-aurora {
  position: absolute;
  width: 106%;
  height: 106%;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.68;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    var(--h-blue-1) 0deg,
    var(--h-blue-4) 110deg,
    var(--h-blue-2) 195deg,
    var(--h-blue-3) 275deg,
    var(--h-blue-1) 360deg
  );
  -webkit-mask-image: radial-gradient(circle, #000 46%, transparent 78%);
  mask-image: radial-gradient(circle, #000 46%, transparent 78%);
  animation: homeSpinPulse 7s linear infinite;
}

.q-ticket-pulse {
  position: absolute;
  width: 96%;
  height: 96%;
  border-radius: 50%;
  border: 1.5px solid rgba(96, 165, 250, 0.7);
  opacity: 0;
  z-index: 0;
  animation: homeRadarPulse 2.9s ease-out infinite;
}

.q-ticket-pulse.is-delay { animation-delay: 1.45s; }

/* The progress ring. 46 is the radius in the viewBox, so the circumference is
   2πr ≈ 289.03; the offset leaves about a third of the arc open, the resting state
   the hero also opens on. */
.q-ticket-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  z-index: 2;
  overflow: visible;
}

.q-ticket-track {
  fill: none;
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 4;
}

.q-ticket-fill {
  fill: none;
  stroke: var(--q-ring);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 289.03;
  stroke-dashoffset: 185;
  filter: drop-shadow(0 0 3px var(--h-glow));
}

/* The sphere: same glass treatment as the hero bubble, at a third of the size.

   90% rather than 86%: the widest line inside is "Waiting · 3 groups ahead", and at
   86% of a 184px widget the bubble was 158px while that pill measured 163px — it hung
   over the ring. The extra 4% plus the smaller type below is what makes it fit without
   truncating the copy the hero uses. */
.q-ticket-bubble {
  position: relative;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 3;
  background: radial-gradient(
    circle at 30% 28%,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.82) 58%,
    rgba(241, 245, 249, 0.7) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.9),
    0 0 18px var(--h-glow),
    0 8px 20px rgba(15, 23, 42, 0.14);
}

.q-ticket-bubble::before {
  content: "";
  position: absolute;
  top: 13%;
  left: 17%;
  width: 24%;
  height: 11%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  transform: rotate(-35deg);
  filter: blur(1px);
}

.q-ticket-badge {
  font-size: 0.66em;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.18em 0.6em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.16);
  color: var(--h-soft);
  white-space: nowrap;
}

.q-ticket-label {
  margin-top: 0.42em;
  font-size: 0.66em;
  color: var(--h-faint);
  white-space: nowrap;
}

.q-ticket-no {
  font-size: 2.5em;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--h-ink);
  text-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.q-ticket-status {
  margin-top: 0.38em;
  font-size: 0.6em;
  font-weight: 800;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.2px solid var(--q-ring);
  color: var(--q-ring);
  box-shadow: 0 0 8px var(--h-glow);
  white-space: nowrap;
}

/*
  Small stages get a simplified ticket, not a missing one.

  Previously this was `display: none` below 46rem: the reasoning was that a
  full-detail circle would sit on top of the counter in a narrow drawing. But the
  ticket is the one element that says what the product does — a guest holding a
  number — so dropping it leaves the panel showing a queue with nothing being
  called.

  Instead, strip the parts that need room and keep the part that carries the
  meaning: the number and its blue ring. Aurora, pulse, the badge and the status
  pill all go, because at this size they are the first things to turn to mud. The
  number stays legible because it is the only thing in the circle.

  `left: 3%` pulls it tighter to the edge so it clears the counter, which sits at
  the right of the frame.
*/
@media (max-width: 46rem) {
  .q-ticket {
    --d: clamp(3.5rem, 58cqh, 6rem);
    left: 3%;
  }

  .q-ticket-aurora,
  .q-ticket-pulse,
  .q-ticket-badge,
  .q-ticket-label,
  .q-ticket-status {
    display: none;
  }

  /* With the label gone the number becomes the whole bubble, so it can grow into
     the space and stay readable. */
  .q-ticket-no {
    font-size: 3.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc-demo .scene,
  .svc-demo .scene *,
  .svc-demo .scene *::before,
  .svc-demo .scene *::after {
    animation: none !important;
    transition: opacity 0.2s ease !important;
  }

  .t-steam { opacity: 0.35; }
}

/* ===================================================== product UI mockups === */

/*
  These replace the illustrated shop/calendar/shelf scenes with renderings of the
  actual screens. Everything is HTML and CSS: no images, so the panels stay sharp at
  any zoom, inherit the page's font, and can be edited by changing a number rather
  than redrawing a vector.

  The frame is a phone-width column centred in the 288px stage. It is deliberately
  taller than the stage and clipped at the bottom, so it reads as "here is the top of
  the real screen" rather than a squeezed diagram — the header and the first
  meaningful block are the parts a visitor needs to see.

  Sizing uses cqh so the mockup scales with the stage height instead of assuming a
  desktop pixel count. The stage is a size container (set on .svc-demo-stage), so cqh
  resolves against its 288px.
*/
.ui-frame {
  position: absolute;
  left: 50%;
  /* Anchored to the top: the header row is the first thing that must be visible. */
  top: 4cqh;
  transform: translateX(-50%);
  /*
    Phone width, not stage width.

    This was `min(54rem, 88%)`, which on a 1152px column made the frame 864px wide —
    and because the calendar cells are square, each one grew to 119px and pushed the
    whole grid out of a 261px-tall box. A mockup of a phone screen has to be roughly
    phone-shaped: capping at 20rem keeps the proportions honest and the type readable
    at the same time.
  */
  width: min(20rem, 74%);
  height: calc(100% - 8cqh);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  /* Sized from the stage height so the mockup scales with the band, with a floor
     that keeps 10px-ish text legible on the 192px phone breakpoint. */
  font-size: clamp(0.55rem, 3.4cqh, 0.8rem);
  line-height: 1.5;
  letter-spacing: 0;

  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.06);
}

/* --- the browser chrome strip: makes it read as a screen, not a card --- */
.ui-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.42em 0.75em;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ui-dots { display: flex; gap: 0.28em; flex: none; }

.ui-dots i {
  display: block;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.18);
}

.ui-url {
  flex: 1;
  min-width: 0;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  background: #ffffff;
  color: var(--h-faint);
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- the app content itself --- */
.ui-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding: 0.85em 0.95em 1em;
  overflow: hidden;
}

.ui-shop {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  font-size: 1em;
  font-weight: 800;
  color: var(--h-ink);
}

.ui-live {
  font-size: 0.8em;
  font-weight: 700;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  white-space: nowrap;
}

.ui-live-violet { background: rgba(109, 40, 217, 0.1); color: #6d28d9; }
.ui-live-orange { background: rgba(194, 65, 12, 0.1); color: #c2410c; }
.ui-live-teal   { background: rgba(15, 118, 110, 0.1); color: #0f766e; }

/* --- buttons: two kinds, matching the real ticket page --- */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em 0.9em;
  border-radius: 0.6em;
  font-size: 0.92em;
  font-weight: 700;
  white-space: nowrap;
}

.ui-btn-ghost {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: var(--h-soft);
}

.ui-btn-solid {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.ui-btn-violet {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.28);
}

/* ------------------------------------------------------------- queue screen --- */

.ui-ticket {
  padding: 0.7em 0.8em 0.75em;
  border-radius: 0.75em;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 70%),
    #f8fafc;
  border: 1px solid rgba(37, 99, 235, 0.2);
  text-align: center;
}

.ui-ticket-label {
  margin: 0;
  font-size: 0.82em;
  color: var(--h-faint);
}

/* Tabular figures so the number does not jitter as it changes. */
.ui-ticket-no {
  margin: 0.1em 0 0;
  font-size: 2.6em;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--h-ink);
}

.ui-ticket-status {
  margin: 0.15em 0 0;
  font-size: 0.85em;
  font-weight: 700;
  color: #1d4ed8;
}

.ui-progress {
  margin: 0.55em auto 0;
  width: 82%;
  height: 0.32em;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  overflow: hidden;
}

.ui-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.ui-ticket-eta {
  margin: 0.35em 0 0;
  font-size: 0.78em;
  color: var(--h-faint);
}

.ui-actions { display: flex; gap: 0.5em; }
.ui-actions .ui-btn { flex: 1; font-size: 0.85em; padding: 0.42em 0.4em; }

/* -------------------------------------------------------------- shared list --- */

.ui-list {
  border-radius: 0.65em;
  border: 1px solid rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.ui-list-head {
  padding: 0.32em 0.7em;
  font-size: 0.75em;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--h-faint);
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.ui-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.34em 0.7em;
  font-size: 0.88em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.ui-list-row:last-child { border-bottom: 0; }

.ui-list-row > span {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--h-ink);
}

.ui-list-row em {
  font-style: normal;
  font-size: 0.86em;
  color: var(--h-faint);
}

.ui-list-row em.is-called {
  color: #1d4ed8;
  font-weight: 800;
}

.ui-list-row em.is-ready {
  color: #0f766e;
  font-weight: 800;
}

.ui-list-row em.is-cooking {
  color: #c2410c;
  font-weight: 800;
}

/* ----------------------------------------------------------- booking screen --- */

.ui-cal {
  border-radius: 0.7em;
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 0.55em 0.65em 0.6em;
  background: #ffffff;
}

.ui-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86em;
  font-weight: 800;
  color: var(--h-ink);
}

.ui-cal-nav { color: rgba(15, 23, 42, 0.3); letter-spacing: 0.2em; }

.ui-cal-days,
.ui-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.18em;
  text-align: center;
}

.ui-cal-days { margin-top: 0.4em; }

.ui-cal-days b {
  font-size: 0.66em;
  font-weight: 700;
  color: var(--h-faint);
}

.ui-cal-grid { margin-top: 0.2em; }

.ui-cal-grid i {
  display: grid;
  place-items: center;
  /* Fixed height, not aspect-ratio: square cells grow with the column width and
     pushed the grid past the bottom of a short stage. 1.35em is tall enough to read
     a two-digit date and short enough that three rows fit. */
  height: 1.35em;
  border-radius: 0.28em;
  font-size: 0.72em;
  font-style: normal;
  color: var(--h-soft);
}

.ui-cal-grid i.is-dim { color: rgba(15, 23, 42, 0.22); }

.ui-cal-grid i.is-picked {
  background: #6d28d9;
  color: #fff;
  font-weight: 800;
}

.ui-slots-head {
  margin-top: 0.6em;
  font-size: 0.76em;
  font-weight: 800;
  color: var(--h-faint);
}

.ui-slot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3em;
  margin-top: 0.35em;
}

.ui-slot {
  display: grid;
  place-items: center;
  padding: 0.42em 0;
  border-radius: 0.45em;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 0.78em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--h-soft);
  background: #fff;
}

.ui-slot.is-taken {
  color: rgba(15, 23, 42, 0.28);
  text-decoration: line-through;
  background: #f8fafc;
}

.ui-slot.is-picked {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}

/* ---------------------------------------------------------- takeaway screen --- */

.ui-order {
  display: flex;
  align-items: stretch;
  gap: 0.6em;
  padding: 0.55em 0.65em;
  border-radius: 0.7em;
  background: #fffaf4;
  border: 1px solid rgba(194, 65, 12, 0.18);
}

/* The order number is the anchor of this screen, so it gets its own column. */
.ui-order-no {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 3.2em;
  border-radius: 0.5em;
  background: linear-gradient(160deg, #f97316, #ea580c);
  color: #fff;
  font-size: 1.35em;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.ui-order-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.18em; }

.ui-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  font-size: 0.82em;
  color: var(--h-soft);
}

.ui-order-row em {
  font-style: normal;
  font-size: 0.92em;
  color: var(--h-faint);
  flex: none;
}

.ui-order-row em.is-cooking { color: #c2410c; font-weight: 800; }

.ui-steps {
  display: flex;
  align-items: center;
  gap: 0.25em;
  font-size: 0.76em;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.28);
}

.ui-steps span {
  flex: 1;
  text-align: center;
  padding: 0.32em 0;
  border-radius: 999px;
  background: #f1f5f9;
}

.ui-steps span.is-done { background: rgba(249, 115, 22, 0.14); color: #c2410c; }
.ui-steps span.is-now  { background: #ea580c; color: #fff; }

/* ------------------------------------------------------------ member screen --- */

.ui-card {
  padding: 0.7em 0.8em 0.75em;
  border-radius: 0.7em;
  background: linear-gradient(150deg, #0f172a, #1e293b 55%, #134e4a);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

.ui-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* The gold chip is what makes it read as a card rather than a dark rectangle. */
.ui-card-chip {
  display: block;
  width: 1.75em;
  height: 1.3em;
  border-radius: 0.22em;
  background: linear-gradient(135deg, #fde68a, #d4a017 60%, #b8860b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.ui-card-brand {
  font-size: 0.7em;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
}

.ui-card-no {
  margin-top: 1em;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.9);
}

.ui-points { display: flex; align-items: baseline; gap: 0.5em; }

.ui-points-num {
  font-size: 1.75em;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--h-ink);
}

.ui-points-label { font-size: 0.75em; color: var(--h-faint); }

.ui-stamps { display: flex; gap: 0.3em; }

.ui-stamps span {
  flex: 1;
  display: grid;
  place-items: center;
  /* Fixed, for the same reason as the calendar cells: a square that scales with the
     column turns into a row of dinner plates inside a 261px-tall frame. */
  height: 1.5em;
  border-radius: 50%;
  border: 1.5px dashed rgba(15, 118, 110, 0.35);
  font-size: 0.7em;
  color: transparent;
}

.ui-stamps span.is-on {
  border: 1.5px solid #0f766e;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-weight: 800;
}

.ui-stamps-note {
  margin: 0;
  font-size: 0.74em;
  color: var(--h-faint);
}

/* --------------------------------------------------------------- responsive --- */

/*
  On a phone the frame widens to almost the full stage and the type steps up, because
  the same cqh that keeps it proportional on a desktop leaves the text too small once
  the band drops to 192px. The layout is identical; only the scale changes.
*/
@media (max-width: 34rem) {
  .ui-frame {
    width: 94%;
    font-size: 0.52rem;
  }

  .ui-body { gap: 0.55em; padding: 0.7em 0.8em 0.85em; }

  /* Two calendar rows are all that fit; the rest is below the fold anyway. */
  .ui-cal { padding: 0.45em 0.55em 0.5em; }
  .ui-cal-grid i:nth-child(n + 15) { display: none; }
}
