/* ==========================================================================
   Meet Me After Midnight — guest page (index.html)
   Builds on brand.css: tokens, surfaces, .btn, .card-*, .tape, .sticker,
   .field, .seatmap. Everything here is specific to the public queue page.

   1. Frame            5. Called            9. Posters (menu / hours / location)
   2. Top bar + hero   6. Notes (seated…)  10. Footer
   3. Booking sheet    7. Tickers          11. Banner, toasts, dialog
   4. Waiting ticket   8. —                12. Motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Frame
   -------------------------------------------------------------------------- */

:root {
  --gutter: clamp(14px, 4.5vw, 22px);
  --col: 520px;
  --drop: rgba(20, 23, 80, 0.42);
}

html {
  background: var(--mm-red);
  scroll-behavior: smooth;
  scroll-padding-top: 8px;
}

body {
  min-height: 100vh;
  min-height: 100svh; /* not dvh: that one changes while an iPhone scrolls (see .stage) */
  background: var(--mm-red);
  color: var(--mm-ink);
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* stickers and the tilted tickers are allowed to hang over the paper's edge */
.page {
  overflow: hidden;
  overflow: clip;
}

.col {
  position: relative;
  width: 100%;
  max-width: var(--col);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* focus rings need a different colour on every ground (innermost surface wins) */
.on-red :focus-visible {
  outline-color: var(--mm-white);
}

.on-blue :focus-visible {
  outline-color: var(--mm-yellow);
}

.on-cream :focus-visible {
  outline-color: var(--mm-blue);
}

.hero__title:focus,
.hero__title:focus-visible {
  outline: none;
}

.card-cream .credit {
  color: rgba(30, 34, 102, 0.7);
}

.card-cream .credit:hover,
.card-cream .credit:focus-visible {
  color: var(--mm-ink);
  outline-color: var(--mm-blue);
}

.skip {
  position: absolute;
  top: -90px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--mm-cream);
  color: var(--mm-ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--drop);
}

.skip:focus {
  top: calc(10px + env(safe-area-inset-top));
}

.sticker img {
  display: block;
  width: 100%;
  height: auto;
}

.btn__icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

.btn.is-busy {
  pointer-events: none;
}

.btn.is-busy::before {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: mm-spin 0.7s linear infinite;
}

.btn--danger,
.btn--danger.btn--ghost {
  color: var(--mm-red-deep);
}

.cta {
  min-height: 62px;
  font-size: 1.22rem;
}

/* --------------------------------------------------------------------------
   2. Stage, top bar, hero
   -------------------------------------------------------------------------- */

.stage {
  position: relative;
  min-height: 100vh;
  /* svh, not dvh: on an iPhone the browser bars slide away during a scroll and dvh follows them,
     so the stage would grow and shrink under the finger and the page below it would pulse. */
  min-height: 100svh;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: clamp(70px, 18vw, 104px);
  transition: background-color 0.45s var(--ease-out);
}

.stage > .col {
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
}

.topbar .logo {
  --logo-size: 0.78rem;
  flex: none;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 32px;
  padding: 0 0.85em;
  border-radius: 999px;
  background: var(--mm-yellow);
  color: var(--mm-ink);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--drop);
}

.chip::before {
  content: "";
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--mm-blue);
}

.chip[data-state="open"]::before {
  animation: mm-blink 1.6s ease-in-out infinite;
}

.chip[data-state="closed"],
.chip[data-state="paused"],
.chip[data-state="full"] {
  background: var(--mm-cream);
}

.chip[data-state="closed"]::before,
.chip[data-state="paused"]::before,
.chip[data-state="full"]::before {
  background: var(--mm-red);
}

.lang {
  appearance: none;
  min-width: 46px;
  min-height: 44px;
  padding: 0 0.95em;
  border: 0;
  border-radius: 999px;
  background: var(--mm-cream);
  color: var(--mm-ink);
  font-family: var(--font-en);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--drop);
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
}

.lang[lang="ar"] {
  font-family: var(--font-ar);
  font-weight: 700;
}

.lang:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--drop);
}

.hero {
  position: relative;
  padding: clamp(22px, 7.5vw, 42px) 0 clamp(20px, 6vw, 30px);
}

.hero__title {
  position: relative;
  z-index: 1;
  gap: 0.02em;
  outline-offset: 8px;
}

.hero__title .bi-title__ar {
  font-size: clamp(2.7rem, 14vw, 4.4rem);
  font-weight: 800;
  line-height: 1.24;
  text-wrap: balance;
}

.hero__title .bi-title__en {
  font-size: clamp(1.45rem, 7.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

/* the page headline wears the two colours the other way round: Arabic in the accent, English in the main colour */
.hero__title .bi-title__ar {
  color: var(--accent);
}

.hero__title .bi-title__en {
  color: var(--fg);
}

/* while waiting the headline is the guest's name: a little smaller, and never wider than the page */
.hero__title--name .bi-title__ar {
  font-size: clamp(2.3rem, 11.5vw, 3.7rem);
  overflow-wrap: anywhere;
}

.hero__title--name.hero__title--long .bi-title__ar {
  font-size: clamp(1.7rem, 8.4vw, 2.7rem);
  line-height: 1.32;
}

.hero__title .bi-title__en:empty {
  display: none;
}

/* the people count and the phone, under the name */
.hero__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.hero__meta[hidden] {
  display: none;
}

.hero__meta li {
  max-width: 100%;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--mm-blue);
  color: var(--mm-white);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 0 rgba(30, 34, 102, 0.3);
}

.hero__meta li:empty {
  display: none;
}

.hero__num {
  display: inline-block;
  margin: 0 0.1em;
  font-size: 1.1em;
  line-height: 1;
}

.hero__star {
  position: absolute;
  fill: var(--mm-yellow);
  filter: drop-shadow(2px 3px 0 rgba(30, 34, 102, 0.28));
  pointer-events: none;
}

.hero__star--a {
  top: 10px;
  left: 2%;
  width: 30px;
  height: 30px;
  transform: rotate(-16deg);
}

.hero__star--b {
  right: 4%;
  bottom: 16px;
  width: 18px;
  height: 18px;
  transform: rotate(14deg);
}

/* live strip: a little blue sticker */
.live {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin-bottom: 44px;
}

.live__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.5em 0.85em;
  border-radius: 14px;
  background: var(--mm-blue);
  color: var(--mm-white);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  transform: rotate(-1.6deg);
  box-shadow: var(--shadow-sticker);
}

.live__n {
  display: inline-flex;
  align-items: baseline;
  direction: ltr;
  color: var(--mm-yellow);
  font-size: 1.4rem;
  line-height: 1;
}

/* The incoming view: its pieces arrive one after the other. "translate" and
   "scale" are used rather than "transform", which many pieces already use
   for their tilt. */
.view:not([hidden]) :is(.sheet, .note, .called) > :not(.tape, .sticker, .skel),
.view:not([hidden]) .ticket__part {
  animation: mm-enter 0.5s var(--ease-out) backwards;
}

.view:not([hidden]) :is(.sheet, .note, .called) > :nth-child(2),
.view:not([hidden]) .ticket__part:nth-child(2) { animation-delay: 0.06s; }
.view:not([hidden]) :is(.sheet, .note, .called) > :nth-child(3),
.view:not([hidden]) .ticket__part:nth-child(3) { animation-delay: 0.12s; }
.view:not([hidden]) :is(.sheet, .note, .called) > :nth-child(4) { animation-delay: 0.18s; }
.view:not([hidden]) :is(.sheet, .note, .called) > :nth-child(5) { animation-delay: 0.24s; }
.view:not([hidden]) :is(.sheet, .note, .called) > :nth-child(6) { animation-delay: 0.3s; }
.view:not([hidden]) :is(.sheet, .note, .called) > :nth-child(n + 7) { animation-delay: 0.36s; }

/* tape and stickers are slapped on last */
.view:not([hidden]) :is(.tape, .sticker):not(.called__heart) {
  animation: mm-stick 0.42s var(--ease-pop) 0.3s backwards;
}

/* --------------------------------------------------------------------------
   3. The blue sheet: booking form, closed notice, skeleton
   -------------------------------------------------------------------------- */

.sheet {
  display: grid;
  gap: 22px;
  margin-top: 8px;
  padding: 46px 20px 28px;
}

@media (max-width: 380px) {
  .sheet {
    padding-right: 16px;
    padding-left: 16px;
  }
}

.sheet__slice {
  position: absolute;
  top: -52px;
  right: -14px;
  z-index: 3;
  width: 104px;
}

.sheet__h {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
  line-height: 1.25;
}

.sheet__h-ar {
  font-family: var(--font-ar);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--mm-yellow);
}

.sheet__h-en {
  font-family: var(--font-en);
  font-size: 1.17rem;
  font-weight: 800;
  color: var(--mm-red-soft);
}

.sheet__wait {
  text-align: center;
  font-weight: 700;
  color: var(--mm-yellow);
}

.skel {
  height: 54px;
  border-radius: 14px;
  background: var(--mm-blue-deep);
  animation: mm-breathe 1.1s ease-in-out infinite alternate;
}

.skel--short {
  width: 62%;
  margin-inline: auto;
}

/* chair picker */
.picker__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 16px;
}

@media (max-width: 349px) {
  .picker__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

.picker__item {
  position: relative;
}

.picker__opt {
  display: grid;
  place-items: center;
  min-height: 62px;
  border: 2px solid var(--mm-yellow);
  border-radius: 14px;
  color: var(--mm-yellow);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--ease-pop), background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.picker__opt:active {
  transform: scale(0.94);
}

.picker__item input:checked + .picker__opt {
  background: var(--mm-yellow);
  color: var(--mm-ink);
  transform: translateY(-5px) rotate(-4deg) scale(1.08);
  box-shadow: 0 7px 0 var(--mm-blue-deep);
}

.picker__item input:focus-visible + .picker__opt {
  outline: 3px solid var(--mm-white);
  outline-offset: 3px;
}

.picker__hint {
  margin-top: 12px;
  font-size: 0.82rem;
  text-align: center;
  color: var(--muted);
}

/* live estimate for the chosen size */
.estimate {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--mm-blue-deep);
  text-align: center;
  transition: background-color 0.25s;
}

.estimate__main {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--mm-yellow);
}

.estimate__sub {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.estimate__sub:empty {
  display: none;
}

.estimate[data-now="true"] {
  background: var(--mm-yellow);
}

.estimate[data-now="true"] .estimate__main,
.estimate[data-now="true"] .estimate__sub {
  color: var(--mm-ink);
}

/* fields (brand.css draws them; these are page tweaks) */
.sheet .field__label small {
  color: var(--mm-red-soft);
}

.field__hint {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

html[dir="rtl"] .field__input[dir="ltr"] {
  text-align: right;
}

.field__error:empty {
  min-height: 0;
}

/* a refused booking that no field is to blame for: stays right above the button */
.form-error {
  padding: 12px 16px;
  border: 2px solid var(--mm-white);
  border-radius: 14px;
  background: var(--mm-red-deep);
  color: var(--mm-white);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  animation: mm-rise 0.35s var(--ease-out) backwards;
}

.form-error:empty {
  display: none;
}

/* closed notice */
.closed {
  text-align: center;
}

.closed__stamp {
  position: absolute;
  top: -48px;
  right: -10px;
  z-index: 3;
  width: 94px;
}

.closed__body {
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.8;
}

.closed__open {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 16px 12px 18px;
  border-radius: 14px;
  background: var(--mm-blue-deep);
}

.closed__when {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mm-yellow);
}

.closed__count {
  font-size: clamp(2rem, 10.5vw, 2.9rem);
  line-height: 1;
  color: var(--mm-white);
}

.closed__auto {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--muted);
}

.closed__actions {
  display: grid;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   4. The waiting ticket — three cream pieces with real perforation notches
   -------------------------------------------------------------------------- */

.ticket-wrap {
  position: relative;
  margin: 16px 2px 18px;
  transform: rotate(-1.2deg);
  filter: drop-shadow(0 14px 12px rgba(30, 34, 102, 0.34));
}

.ticket.card-cream {
  --c: var(--mm-cream);
  --n: 11px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.ticket__part {
  position: relative;
  padding: 20px 18px;
}

.ticket__part + .ticket__part {
  margin-top: -1px;
}

/* the dashed tear line between two pieces */
.ticket__part + .ticket__part::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  border-top: 2px dashed rgba(57, 64, 170, 0.38);
}

.ticket__part--top {
  padding-top: 24px;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(circle var(--n) at 0 100%, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 0 100% / 51% 100% no-repeat,
    radial-gradient(circle var(--n) at 100% 100%, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 100% 100% / 51% 100% no-repeat;
}

.ticket__part--mid {
  display: grid;
  gap: 14px;
  background:
    radial-gradient(circle var(--n) at 0 0, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle var(--n) at 100% 0, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle var(--n) at 0 100%, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle var(--n) at 100% 100%, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 100% 100% / 51% 51% no-repeat;
}

.ticket__part--stub {
  display: grid;
  gap: 16px;
  padding-bottom: 22px;
  background:
    radial-gradient(circle var(--n) at 0 0, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 0 0 / 51% 100% no-repeat,
    radial-gradient(circle var(--n) at 100% 0, transparent calc(var(--n) - 0.5px), var(--c) var(--n)) 100% 0 / 51% 100% no-repeat;
}

/* torn bottom edge */
.ticket__part--stub::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  left: 0;
  height: 11px;
  background:
    linear-gradient(135deg, var(--c) 7.8px, transparent 8.3px) 0 0 / 22px 11px repeat-x,
    linear-gradient(225deg, var(--c) 7.8px, transparent 8.3px) 0 0 / 22px 11px repeat-x;
}

.ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--mm-blue);
}

.ticket__brand {
  font-family: var(--font-logo);
  font-stretch: 125%;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mm-red-deep);
}

.ticket__name {
  margin: 14px 0 14px;
  font-size: clamp(2rem, 10vw, 2.9rem);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  color: var(--mm-blue);
  overflow-wrap: anywhere;
}

/* the place in the queue, where the name used to be */
.ticket__turn {
  margin: 12px 0 6px;
}

.ticket__ahead[hidden] {
  display: none;
}

.ticket__ahead {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.eta {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--mm-yellow);
  color: var(--mm-ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

/* the hold rule, said next to the estimate and not only on the countdown */
.hold-note {
  padding: 10px 12px;
  border: 2px dashed rgba(57, 64, 170, 0.38);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  color: var(--mm-blue);
}

.hold-note:empty,
.reassure:empty {
  display: none;
}

.reassure {
  font-size: 0.84rem;
  line-height: 1.75;
  text-align: center;
  color: var(--muted);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stepper__label {
  font-weight: 700;
}

.stepper__ctrl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.stepper__btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mm-blue);
  color: var(--mm-yellow);
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--mm-blue-deep);
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
}

.stepper__btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--mm-blue-deep);
}

.stepper__btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  transform: none;
}

.stepper__val {
  display: inline-block;
  min-width: 1.5em;
  font-size: 1.9rem;
  line-height: 1;
  text-align: center;
  color: var(--mm-blue);
}

.ticket__part--stub .btn--danger {
  justify-self: center;
}

/* --------------------------------------------------------------------------
   5. Called — the stage turns blue
   -------------------------------------------------------------------------- */

.called {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding-top: 2px;
  text-align: center;
}

.called__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.28em 1.05em;
  border-radius: 16px;
  background: var(--mm-cream);
  color: var(--mm-blue);
  max-width: 100%;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
  transform: rotate(-3deg);
  box-shadow: 4px 6px 0 var(--mm-blue-deep);
}

.called__badge:empty {
  display: none;
}

.ring {
  position: relative;
  width: min(66vw, 256px);
  height: min(66vw, 256px);
  margin: 8px 0 4px;
}

.ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring__track,
.ring__bar {
  fill: none;
  stroke-width: 10;
}

.ring__track {
  stroke: var(--mm-blue-deep);
}

.ring__bar {
  stroke: var(--mm-yellow);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.ring[data-urgent="true"] .ring__bar {
  stroke: var(--mm-red);
}

.ring[data-urgent="true"] .ring__time {
  animation: mm-pulse 1s ease-in-out infinite;
}

.ring__center {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 26px;
}

.ring__time {
  font-size: clamp(2.5rem, 13.5vw, 3.5rem);
  line-height: 1;
  color: var(--mm-white);
}

/* ten minutes and more: five glyphs have to fit where four do */
.ring[data-wide="true"] .ring__time {
  font-size: clamp(2.05rem, 11vw, 2.85rem);
}

.ring__label {
  max-width: 10.5em;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
}

/* the last word of the line under the time: it fidgets more the less time is left (.called[data-mood]) */
.ring__hurry {
  display: inline-block;
  margin-top: -2px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--mm-yellow);
}

.called[data-mood="uneasy"] .ring__hurry {
  animation: mm-hurry 1.8s ease-in-out infinite;
}

.called[data-mood="nervous"] .ring__hurry {
  animation: mm-hurry 0.9s ease-in-out infinite;
}

.called[data-mood="panic"] .ring__hurry {
  font-size: 1.12rem;
  animation: mm-hurry 0.42s ease-in-out infinite;
}

@keyframes mm-hurry {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-2px) rotate(-2.5deg); }
  75% { transform: translateX(2px) rotate(2.5deg); }
}

/* (.called__keeper, the little character at the ring's top right corner: see "The chair keeper" at the end of this file) */

.called__heart {
  position: absolute;
  bottom: -8px;
  left: -34px;
  width: 84px;
  animation: mm-wobble 1.7s ease-in-out infinite reverse;
}

.called__lead {
  max-width: 22em;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.75;
}

.called__acked {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--mm-yellow);
  color: var(--mm-ink);
  font-weight: 800;
  line-height: 1.4;
  animation: mm-pop 0.4s var(--ease-pop) backwards;
}

.called__actions {
  display: grid;
  gap: 13px;
  justify-items: center;
  width: 100%;
}

/* pizza-slice confetti: little triangles with a crust and one pepperoni */
.confetti {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

.stage[data-view="called"] .confetti {
  display: block;
}

.confetti i {
  position: absolute;
  top: -44px;
  left: var(--x, 50%);
  width: var(--s, 18px);
  height: calc(var(--s, 18px) * 1.28);
  background:
    radial-gradient(circle at 50% 44%, var(--mm-red) 0 22%, transparent 23.5%),
    linear-gradient(var(--mm-cream) 0 17%, var(--mm-yellow) 17%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  opacity: 0;
}

.confetti.is-on i {
  animation: mm-fall var(--t, 3.2s) var(--d, 0s) cubic-bezier(0.3, 0.15, 0.6, 1) both;
}

/* --------------------------------------------------------------------------
   6. Cream notes: seated, ended, restoring
   -------------------------------------------------------------------------- */

.note {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 16px 2px 0;
  padding: 32px 20px 24px;
  text-align: center;
  transform: rotate(-1deg);
}

.note__body {
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.8;
}

/* seated: how long the table is theirs once the order is served - said plainly, and kindly */
.sit-time {
  display: grid;
  gap: 6px;
  padding: 14px 16px 15px;
  border: 2px dashed var(--mm-blue);
  border-radius: 18px;
  background: rgba(250, 204, 96, 0.3);
  color: var(--mm-ink);
}

.sit-time__lead {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--mm-blue);
}

.sit-time__why {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.7;
}

.note__slice {
  position: absolute;
  top: -46px;
  left: -14px;
  width: 94px;
}

/* --------------------------------------------------------------------------
   7. Tickers between the posters
   -------------------------------------------------------------------------- */

.ticker {
  position: relative;
  z-index: 3;
  width: 108%;
  margin: -19px -4%;
  overflow: hidden;
  direction: ltr;
  transform: rotate(-1.6deg);
  box-shadow: 0 5px 0 rgba(20, 23, 80, 0.28);
}

.ticker--yellow {
  background: var(--mm-yellow);
  color: var(--mm-ink);
}

.ticker--blue {
  background: var(--mm-blue);
  color: var(--mm-yellow);
  transform: rotate(1.4deg);
}

.ticker__track {
  display: flex;
  width: max-content;
  padding: 10px 0;
  white-space: nowrap;
  font-family: var(--font-logo);
  font-stretch: 125%;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  animation: mm-marquee 60s linear infinite;
}

.ticker--blue .ticker__track {
  animation-direction: reverse;
}

.ticker__track span {
  padding: 0 14px;
}

.ticker__ar {
  font-family: var(--font-ar);
  font-weight: 800;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   9. Posters
   -------------------------------------------------------------------------- */

.poster {
  position: relative;
  padding: clamp(62px, 17vw, 96px) 0 clamp(64px, 17vw, 100px);
}

.poster .bi-title__ar {
  font-size: clamp(2rem, 9.4vw, 2.7rem);
}

.poster .bi-title__en {
  font-size: clamp(1.8rem, 8.4vw, 2.4rem);
}

.poster__logo {
  display: flex;
  justify-content: center;
  margin-top: 46px;
}

.poster__logo .logo {
  --logo-size: 1.15rem;
}

/* menu */
.menu__heart {
  position: absolute;
  top: -30px;
  left: max(2px, calc(var(--gutter) - 10px));
  width: 94px;
}

.menu__body {
  display: grid;
  gap: 20px;
  max-width: 420px;
  margin: 36px auto 0;
}

.menu__list {
  display: grid;
  gap: 15px;
  padding: 0 4px;
}

.menu__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.menu__name {
  display: grid;
  gap: 1px;
  text-align: right;
}

.menu__ar {
  font-family: var(--font-ar);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--mm-yellow);
}

.menu__en {
  font-family: var(--font-en);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mm-red-soft);
}

.menu__price {
  flex: none;
  padding-top: 0.22em;
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--mm-yellow);
}

/* working hours */
.hours__sheet {
  max-width: 400px;
  margin: 46px auto 0;
  padding: 48px 18px 62px;
  text-align: center;
}

.hours__every .bi-title__ar {
  font-size: clamp(2.3rem, 11vw, 3rem);
  font-weight: 500;
}

.hours__every .bi-title__en {
  font-size: clamp(1.9rem, 9vw, 2.5rem);
}

.hours__list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.hours__row {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: var(--mm-yellow);
}

.hours__row.is-closed .hours__time {
  color: var(--muted);
  font-weight: 600;
}

.hours__every[hidden] {
  display: none;
}

.hours__row.is-today {
  border-color: var(--mm-yellow);
  background: var(--mm-blue-deep);
}

.hours__days {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.hours__tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--mm-yellow);
  color: var(--mm-ink);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.4;
}

.hours__time {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mm-white);
}

.hours__stamp {
  position: absolute;
  right: -16px;
  bottom: -40px;
  z-index: 2;
  width: 100px;
}

/* location */
.loc {
  padding-bottom: clamp(150px, 40vw, 190px);
  text-align: center;
}

.loc__pin {
  position: absolute;
  top: -34px;
  left: max(4px, calc(var(--gutter) - 8px));
  width: 84px;
}

.loc__dot {
  display: block;
  width: 12px;
  height: 22px;
  margin: 46px auto 8px;
}

.loc__addr {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--mm-cream);
  color: var(--mm-ink);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  transform: rotate(-1.5deg);
  box-shadow: var(--shadow-sticker);
}

.loc__link {
  margin-top: 24px;
}

.pill {
  min-height: 54px;
  padding: 0.6em 1.3em;
  font-size: 1.12rem;
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
}

.pill:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.14);
}

.pill:focus-visible {
  outline-color: var(--mm-blue);
}

.pill__icon {
  flex: none;
  width: 1.3em;
  height: 1.3em;
}

.loc__slice {
  position: absolute;
  right: -30px;
  bottom: -132px;
  width: 150px;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */

.foot {
  padding: 60px 0 calc(48px + env(safe-area-inset-bottom));
  text-align: center;
}

.foot__logo {
  --logo-size: clamp(1.4rem, 6.8vw, 2.6rem);
}

.foot__line {
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   11. Connection banner, toasts, confirm dialog
   -------------------------------------------------------------------------- */

.conn {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6em;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 9px 16px;
  border: 2px solid var(--mm-yellow);
  border-radius: 999px;
  background: var(--mm-ink);
  color: var(--mm-white);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  transform: translateX(-50%);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}

.conn__dot {
  flex: none;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--mm-yellow);
  animation: mm-blink 1s ease-in-out infinite;
}

.toasts {
  position: fixed;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 0;
  z-index: 50;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 0 14px;
  pointer-events: none;
}

.toast {
  max-width: 440px;
  padding: 12px 18px;
  border: 2px solid var(--mm-yellow);
  border-radius: 16px;
  background: var(--mm-ink);
  color: var(--mm-white);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  pointer-events: auto;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28);
  animation: mm-rise 0.35s var(--ease-out) backwards;
  transition: opacity 0.3s, transform 0.3s;
}

.toast[data-kind="ok"] {
  background: var(--mm-blue);
}

.toast[data-kind="error"] {
  border-color: var(--mm-white);
  background: var(--mm-red-deep);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(10px);
}

.dlg {
  width: calc(100% - 32px);
  max-width: 420px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mm-ink);
  overflow: visible;
}

.dlg:not([open]) {
  display: none;
}

.dlg::backdrop {
  background: rgba(30, 34, 102, 0.74);
}

.dlg[open] .dlg__card {
  animation: mm-pop 0.28s var(--ease-pop) backwards;
}

/* the credit line inside the window, under its buttons: dark letters on the cream card */
.dlg__card .credit {
  margin: 0 auto -8px;
  color: rgba(30, 34, 102, 0.62);
}

.dlg__card .credit:hover,
.dlg__card .credit:focus-visible {
  color: var(--mm-ink);
}

.dlg__card .credit:focus-visible {
  outline-color: var(--mm-blue);
}

.dlg__card {
  display: grid;
  gap: 14px;
  padding: 28px 22px 22px;
  text-align: center;
}

.dlg__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--mm-blue);
}

.dlg__body {
  font-size: 1rem;
  line-height: 1.75;
}

.dlg__actions {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

/* browsers without <dialog>.showModal() */
.dlg--fallback[open] {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 16px;
  align-content: center; /* the card and the line under it stay together */
  background: rgba(30, 34, 102, 0.74);
}

.dlg--fallback .dlg__card {
  width: 100%;
  max-width: 420px;
}

/* --------------------------------------------------------------------------
   12. Motion
   -------------------------------------------------------------------------- */

.flip {
  display: inline-block;
}

.flip.is-flipping {
  animation: mm-flip 0.55s var(--ease-pop);
}

.is-bump {
  animation: mm-bump 0.5s var(--ease-pop);
}

@keyframes mm-bump {
  0% { transform: scale(0.93); }
  100% { transform: scale(1); }
}

@keyframes mm-flip {
  0% { transform: translateY(-0.35em) scale(0.7); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes mm-spin {
  to { transform: rotate(360deg); }
}

@keyframes mm-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes mm-breathe {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@keyframes mm-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes mm-fall {
  0% { transform: translate3d(0, -6vh, 0) rotate(0deg); opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translate3d(var(--dx, 0px), 108vh, 0) rotate(var(--r, 480deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .confetti {
    display: none !important;
  }

  .ticker__track,
  .called__heart,
  .ring__hurry {
    animation: none !important;
  }
}

/* a little more room for the paper on tablets and desktops */
@media (min-width: 700px) {
  .stage {
    padding-top: 26px;
  }

  .topbar .logo {
    --logo-size: 0.95rem;
  }

  .sheet {
    padding: 52px 30px 34px;
  }

  .sheet__slice {
    top: -62px;
    right: -34px;
    width: 128px;
  }

  .hours__stamp {
    right: -34px;
    width: 116px;
  }

  .loc__slice {
    right: -70px;
    width: 180px;
  }
}

/* --------------------------------------------------------------------------
   Moving between views, and through the page
   -------------------------------------------------------------------------- */

@keyframes mm-enter {
  from { opacity: 0; translate: 0 18px; }
}

@keyframes mm-stick {
  from { opacity: 0; scale: 1.55; }
}

/* the headline changes with the view */
.hero__title.is-swap {
  animation: mm-headline 0.55s var(--ease-pop) backwards;
}

@keyframes mm-headline {
  from { opacity: 0; translate: 0 -16px; scale: 0.94; }
}

/* Where the browser can (View Transitions; app.js asks for one on every change
   of view): the old screen lifts away while the new one comes up from below. */
@keyframes mm-leave {
  to { opacity: 0; transform: translateY(-20px) scale(0.985); }
}

@keyframes mm-arrive {
  from { opacity: 0; transform: translateY(24px); }
}

/* "your turn": the blue screen opens like an iris from the middle of the headline */
@keyframes mm-iris {
  from { clip-path: circle(0% at 50% 30%); }
  to { clip-path: circle(150% at 50% 30%); }
}

::view-transition-old(root) {
  animation: mm-leave 0.22s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: mm-arrive 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-swap="call"]::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}

html[data-swap="call"]::view-transition-new(root) {
  animation: mm-iris 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  mix-blend-mode: normal;
}

/* The posters below arrive as they are scrolled to (app.js marks them; without
   it, or with reduced motion, they are simply there). */
.reveal {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.6s var(--ease-out), translate 0.6s var(--ease-out);
}

.reveal.is-seen {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    translate: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   The chair keeper (index.html: .called__keeper > svg.keeper)
   A pizza slice standing behind the guest's chair, holding it for them.
   Its mood - calm | uneasy | nervous | panic - is data-mood on .called, set by
   app.js (holdMood) from the time left on the hold; with no data-mood, or an
   unknown one, it is calm. Every part that changes is drawn once per mood in
   the inline SVG (.kp-m-<mood>) and switched here; motion is transform and
   opacity only.
   -------------------------------------------------------------------------- */

.keeper { overflow: visible; }

/* ---- where it sits: top right corner of the ring ----------------------------
   Percentages of the ring, so it shrinks with the ring on a narrow phone:
   on the 256px ring this is top -34px, right -48px, width 118px.
   The slight lean toward the timer is the brand's "slapped-on sticker" tilt; it
   also swings the chair's left foot away from the digits and the crust's left
   corner down, away from the name badge above the ring. */
/* no shadow filter on it: its parts never stop moving, and a filter would be redrawn on every frame */
.called__keeper { position: absolute; z-index: 1; top: -13.28%; right: -18.75%; width: 46.09%; transform: rotate(-6deg); pointer-events: none; }
.called__keeper .keeper { display: block; width: 100%; height: auto; transform: none; }

/* ---- which drawing is visible -------------------------------------------- */
.keeper .kp-m { display: none; }
.keeper .kp-m-calm { display: inline; }

.called[data-mood="uneasy"] .keeper .kp-m,
.called[data-mood="nervous"] .keeper .kp-m,
.called[data-mood="panic"] .keeper .kp-m { display: none; }

.called[data-mood="uneasy"] .keeper .kp-m-uneasy,
.called[data-mood="nervous"] .keeper .kp-m-nervous,
.called[data-mood="panic"] .keeper .kp-m-panic { display: inline; }

/* ---- transform plumbing --------------------------------------------------- */
.keeper .kp-all,
.keeper .kp-slice,
.keeper .kp-chair,
.keeper .kp-blink,
.keeper .kp-dart,
.keeper .kp-jitter,
.keeper .kp-chatter,
.keeper .kp-scream,
.keeper .kp-scratch,
.keeper .kp-wave-l,
.keeper .kp-wave-r,
.keeper .kp-drip,
.keeper .kp-fly { transform-box: fill-box; transform-origin: 50% 50%; }
.keeper .kp-slice,
.keeper .kp-chair { transform-origin: 50% 100%; }   /* the slice's tip, the chair's feet */
.keeper .kp-wave-l { transform-origin: 100% 100%; } /* left shoulder */
.keeper .kp-wave-r { transform-origin: 0% 100%; }   /* right shoulder */

/* ---- calm: slow breathing and a blink ------------------------------------- */
.keeper .kp-slice { animation: kp-breathe 3.8s ease-in-out infinite; }
.keeper .kp-blink { animation: kp-blink 4.6s ease-in-out infinite; }

@keyframes kp-breathe {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-0.6px) scaleY(1.018); }
}
@keyframes kp-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94.5% { transform: scaleY(0.1); }
}

/* ---- uneasy: small tics, one after the other ------------------------------ */
.called[data-mood="uneasy"] .keeper { animation: kp-pop-uneasy 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1; }
.called[data-mood="uneasy"] .keeper .kp-slice { animation: kp-fidget 3.2s ease-in-out infinite; }
.called[data-mood="uneasy"] .keeper .kp-dart { animation: kp-dart 3.2s ease-in-out infinite; }
.called[data-mood="uneasy"] .keeper .kp-scratch { animation: kp-scratch 3.2s ease-in-out infinite; }
.called[data-mood="uneasy"] .keeper .kp-drip { animation: kp-drip 3.2s ease-in infinite; }

@keyframes kp-fidget {
  0%, 58%, 82%, 100% { transform: translateX(0) rotate(0deg); }
  64% { transform: translateX(-1.2px) rotate(-1.2deg); }
  70% { transform: translateX(1px) rotate(1deg); }
  76% { transform: translateX(-0.6px) rotate(-0.5deg); }
}
@keyframes kp-dart {
  0%, 30%, 56%, 100% { transform: translate(0, 0); }
  36%, 50% { transform: translate(7px, -1.5px); }
}
@keyframes kp-scratch {
  0%, 6%, 34%, 100% { transform: translateY(0); }
  11%, 21% { transform: translateY(-2.4px); }
  16%, 26% { transform: translateY(1.6px); }
}
@keyframes kp-drip {
  0%, 20% { transform: translateY(0); opacity: 1; }
  78% { transform: translateY(11px); opacity: 1; }
  90% { transform: translateY(14px); opacity: 0; }
  91% { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---- nervous: trembling, chattering teeth, dripping ----------------------- */
.called[data-mood="nervous"] .keeper { animation: kp-pop-nervous 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1; }
.called[data-mood="nervous"] .keeper .kp-all { animation: kp-tremble 0.22s linear infinite; }
.called[data-mood="nervous"] .keeper .kp-slice { animation: kp-hunch 0.9s ease-in-out infinite; }
.called[data-mood="nervous"] .keeper .kp-jitter { animation: kp-jitter 0.9s steps(1, end) infinite; }
.called[data-mood="nervous"] .keeper .kp-chatter { animation: kp-chatter 0.22s linear infinite; }
.called[data-mood="nervous"] .keeper .kp-drip { animation: kp-drip 1.5s ease-in infinite; }
.called[data-mood="nervous"] .keeper .kp-d2 { animation-delay: -0.5s; }
.called[data-mood="nervous"] .keeper .kp-d3 { animation-delay: -1s; }

@keyframes kp-tremble {
  0%, 100% { transform: translateX(-1.2px); }
  50% { transform: translateX(1.2px); }
}
@keyframes kp-hunch {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.4px); }
}
@keyframes kp-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.6px, 0.6px); }
  50% { transform: translate(1.4px, -0.4px); }
  75% { transform: translate(-0.6px, -0.8px); }
}
@keyframes kp-chatter {
  0%, 100% { transform: translateY(-0.5px); }
  50% { transform: translateY(0.8px); }
}

/* ---- panic: jumping, flailing, sweat flying, the chair rattling ----------- */
.called[data-mood="panic"] .keeper { animation: kp-pop-panic 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 1; }
.called[data-mood="panic"] .keeper .kp-all { animation: kp-shake 0.15s linear infinite; }
.called[data-mood="panic"] .keeper .kp-slice { animation: kp-jump 0.6s cubic-bezier(0.3, 0, 0.5, 1) infinite; }
.called[data-mood="panic"] .keeper .kp-chair { animation: kp-rattle 0.3s ease-in-out infinite; }
.called[data-mood="panic"] .keeper .kp-wave-l { animation: kp-wave-l 0.3s ease-in-out infinite; }
.called[data-mood="panic"] .keeper .kp-wave-r { animation: kp-wave-r 0.3s ease-in-out infinite; }
.called[data-mood="panic"] .keeper .kp-jitter { animation: kp-jitter 0.5s steps(1, end) infinite; }
.called[data-mood="panic"] .keeper .kp-scream { animation: kp-scream 0.3s ease-in-out infinite; }
.called[data-mood="panic"] .keeper .kp-fly { animation: kp-fly 0.76s linear infinite; }
.called[data-mood="panic"] .keeper .kp-d2 { animation-delay: -0.38s; }
.called[data-mood="panic"] .keeper .kp-d3 { animation-delay: -0.19s; }
.called[data-mood="panic"] .keeper .kp-d4 { animation-delay: -0.57s; }

@keyframes kp-shake {
  0%, 100% { transform: translateX(-1.6px); }
  50% { transform: translateX(1.6px); }
}
@keyframes kp-jump {
  0%, 100% { transform: translateY(0) scaleY(0.97); }
  14% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-6px) scaleY(1.02); }
  86% { transform: translateY(0) scaleY(1); }
}
@keyframes kp-rattle {
  0%, 100% { transform: rotate(-2.4deg); }
  50% { transform: rotate(2.4deg); }
}
@keyframes kp-wave-l {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(7deg); }
}
@keyframes kp-wave-r {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(4deg); }
}
@keyframes kp-scream {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(0.94, 1.1); }
}
@keyframes kp-fly {
  0% { transform: translateY(-4px) scale(0.7); opacity: 0; }
  18% { transform: translateY(0) scale(1); opacity: 1; }
  70% { transform: translateY(10px) scale(1); opacity: 1; }
  100% { transform: translateY(16px) scale(0.8); opacity: 0; }
}

/* a little pop each time the mood steps up (one name per mood so it replays) */
@keyframes kp-pop-uneasy { 0% { transform: scale(0.9); } 100% { transform: scale(1); } }
@keyframes kp-pop-nervous { 0% { transform: scale(0.9); } 100% { transform: scale(1); } }
@keyframes kp-pop-panic { 0% { transform: scale(0.88); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { .keeper, .keeper * { animation: none !important; } }
