/* ==========================================================================
   Cocktailor — one hand-written stylesheet. No build step, no purge, no npm.
   Read top to bottom: tokens, reset, primitives, the machine, the deck,
   the overlays.
   ========================================================================== */

:root {
  /* --- surface ---------------------------------------------------------- */
  --bg:        #0b0a09;
  --bg-elev:   #161311;
  --bg-lift:   #1e1a16;
  --bg-sink:   #070605;
  --hair:      #2a241c;

  /* --- ink -------------------------------------------------------------- */
  --ink:       #f4efe6;
  --ink-dim:   #b7a894;
  --ink-faint: #7c705f;

  /* --- brass ------------------------------------------------------------ */
  --brass:      #c4a46a;
  --brass-hot:  #e0c48a;
  --brass-deep: #8a6f3f;
  --accent:     var(--brass);

  --track:  #221d17;
  --fill:   var(--brass);
  --steel:  #4a423a;
  --danger: #b42318;
  --good:   #6f9e58;

  /* --- shape ------------------------------------------------------------ */
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  /* --- type ------------------------------------------------------------- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* --- motion (§7.3: nothing over 280ms) -------------------------------- */
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t:     220ms;
  --t-fast: 130ms;

  /* --- machined surfaces ------------------------------------------------ */
  --brass-face: linear-gradient(160deg, #f0dcae 0%, var(--brass-hot) 18%, var(--brass) 48%, var(--brass-deep) 78%, #6d5730 100%);
  --steel-face: linear-gradient(160deg, #6c6157 0%, #4a423a 45%, #322c26 100%);
  --glow: 0 0 0 1px rgba(196,164,106,.35), 0 6px 20px -6px rgba(196,164,106,.5);

  --tray-h: 92px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, figure, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brass-hot);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(196,164,106,.3); }

/* The night-bar grain. One gradient, no image request. */
body.guest-body::before {
  content: "";
  position: fixed;
  inset: -20vh -20vw;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 50vh at 78% -8%,  rgba(196,164,106,.13), transparent 62%),
    radial-gradient(52vw 44vh at 6%  108%, rgba(120,86,52,.14),  transparent 60%);
}

/* ==========================================================================
   Primitives
   ========================================================================== */

.smallcaps {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bg-lift);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) linear, border-color var(--t-fast) linear;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn--brass {
  border-color: transparent;
  background: var(--brass-face);
  color: #241a08;
  box-shadow: 0 8px 22px -10px rgba(196,164,106,.8), inset 0 1px 0 rgba(255,255,255,.45);
}

.ghost {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 12px;
  border: 1px dashed var(--hair);
  border-radius: 999px;
  background: none;
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.ghost:hover { color: var(--ink-dim); border-color: var(--brass-deep); }

/* ==========================================================================
   Shell
   ========================================================================== */

.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding-bottom: calc(var(--tray-h) + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: calc(env(safe-area-inset-top) + 16px) 20px 8px;
}

.topbar__name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.012em;
  background: var(--brass-face);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar__tag {
  margin-top: 2px;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.topbar__toggle {
  flex: none;
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--bg-elev);
  cursor: pointer;
}
.topbar__toggle svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-linecap: round;
}
.app[data-view="results"] .topbar__toggle { display: grid; }

/* ==========================================================================
   Boot (§7.2.0) — 400ms liquid fill, then the machine
   ========================================================================== */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  background: var(--bg);
  animation: bootOut 260ms var(--ease) 620ms both;
}
.boot__mark {
  position: relative;
  width: 62px;
  height: 62px;
  border: 1.5px solid var(--brass-deep);
  border-radius: 50%;
  overflow: hidden;
}
.boot__fill {
  position: absolute;
  inset: 0;
  background: var(--brass-face);
  transform: translateY(100%);
  animation: bootFill 460ms var(--ease) 60ms forwards;
}
.boot__name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--ink-dim);
  opacity: 0;
  animation: fadeIn 300ms var(--ease) 220ms forwards;
}
@keyframes bootFill { to { transform: translateY(8%); } }
@keyframes bootOut  { to { opacity: 0; visibility: hidden; } }
@keyframes fadeIn   { to { opacity: 1; } }

/* ==========================================================================
   Panel — the control surface
   ========================================================================== */

.panel { padding: 4px 18px 30px; }

.app[data-view="results"] .panel { display: none; }
.app[data-view="machine"] .results { display: none; }

.panel__intro { padding: 6px 2px 0; }
.panel__title {
  font-family: var(--font-display);
  font-size: clamp(23px, 6.6vw, 28px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.022em;
}
.panel__sub {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-faint);
}

/* --- the rack of tracks ------------------------------------------------- */

.rack {
  margin-top: 16px;
  padding: 4px 15px 8px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  background-color: var(--bg-elev);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 48px -30px #000;
}

/* Four brass screws — the faceplate detail that sells the cabinet. */
.rack {
  position: relative;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(4px 4px at 10px 10px,                           #8a7757, #16120e 76%),
    radial-gradient(4px 4px at calc(100% - 10px) 10px,              #8a7757, #16120e 76%),
    radial-gradient(4px 4px at 10px calc(100% - 10px),              #8a7757, #16120e 76%),
    radial-gradient(4px 4px at calc(100% - 10px) calc(100% - 10px), #8a7757, #16120e 76%),
    linear-gradient(180deg, rgba(255,255,255,.028), rgba(0,0,0,.25));
}

.track {
  --p: .5;
  position: relative;
  padding: 4px 0 1px;
}
.track + .track { border-top: 1px solid rgba(255,255,255,.035); }

.track__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 2px;
}

.track__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color var(--t) var(--ease);
}
.track.is-set .track__label { color: var(--ink); }

.track__value {
  flex: none;
  min-width: 38px;
  height: 24px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 7px;
  background: var(--bg-sink);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.7);
  cursor: default;
}
.track__digit {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #6a6053;
  transition: color var(--t) var(--ease), text-shadow var(--t) var(--ease);
}
.track.is-set .track__value { cursor: pointer; border-color: var(--brass-deep); }
.track.is-set .track__digit { font-size: 13px; letter-spacing: 0; color: var(--brass-hot); text-shadow: 0 0 12px rgba(224,196,138,.6); }

/* --- the groove --------------------------------------------------------- */

.track__groove {
  position: relative;
  height: 40px;                       /* thumb-sized hit area, §7.4 */
  touch-action: pan-y;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* the rail itself */
.track__groove::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #100d0a, #201b15);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.9),
    inset 0 -1px 0 rgba(255,255,255,.05),
    0 1px 0 rgba(255,255,255,.035);
}

.track__ticks {
  position: absolute;
  inset: 50% 19px auto;
  display: flex;
  justify-content: space-between;
  margin-top: -1px;
  pointer-events: none;
}
.track__ticks i {
  width: 1px;
  height: 3px;
  background: rgba(196,164,106,.28);
  border-radius: 1px;
}
.track__ticks i:nth-child(6) {
  height: 7px;
  margin-top: -2px;
  background: rgba(196,164,106,.5);
}

.track__fill {
  position: absolute;
  top: 50%;
  height: 9px;
  margin-top: -4.5px;
  left: calc(19px + (100% - 38px) * min(var(--p), .5));
  width: calc((100% - 38px) * (max(var(--p), .5) - min(var(--p), .5)));
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brass-deep), var(--brass));
  box-shadow: 0 0 14px rgba(196,164,106,.35);
  opacity: 0;
  transition: left var(--t-fast) linear, width var(--t-fast) linear, opacity var(--t) var(--ease);
}
/* Unipolar axes fill from the left end, not from the middle. */
.track:not(.track--bipolar) .track__fill {
  left: 19px;
  width: calc((100% - 38px) * var(--p));
}
.track.is-set .track__fill { opacity: 1; }

.track__thumb {
  position: absolute;
  top: 50%;
  left: calc(19px + (100% - 38px) * var(--p));
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: var(--steel-face);
  box-shadow:
    0 2px 5px rgba(0,0,0,.7),
    0 8px 16px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -2px 3px rgba(0,0,0,.5);
  transition: left var(--t-fast) linear, background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease);
  display: grid;
  place-items: center;
}
.track.is-set .track__thumb {
  background: var(--brass-face);
  box-shadow:
    0 2px 5px rgba(0,0,0,.7),
    0 10px 22px -8px rgba(196,164,106,.55),
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -2px 3px rgba(90,66,26,.6);
}
/* knurling */
.track__knurl {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
  opacity: .55;
}
.track__groove:active .track__thumb,
.track.is-dragging .track__thumb {
  transform: scale(1.08);
  transition: left 0ms linear, transform var(--t-fast) var(--ease);
}
.track.is-dragging .track__fill { transition: left 0ms linear, width 0ms linear; }

.track__ends {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #574d41;
}

/* --- chips -------------------------------------------------------------- */

.chipset { margin-top: 18px; }
.chipset__label {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 10px;
}
.chipset__row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.chip:active { transform: translateY(1px); }
.chip.is-on {
  border-color: transparent;
  background: var(--brass-face);
  color: #241a08;
  box-shadow: 0 6px 18px -8px rgba(196,164,106,.7);
}

/* ==========================================================================
   Results
   ========================================================================== */

.results { padding: 0 16px 24px; }

.mixbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -16px 14px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(11,10,9,.96) 60%, rgba(11,10,9,0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mixbar__back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px 0 9px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
}
.mixbar__back svg { width: 15px; height: 15px; fill: none; stroke: var(--brass); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mixbar__chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.mixbar__chips::-webkit-scrollbar { display: none; }

.mixchip {
  flex: none;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(196,164,106,.28);
  background: rgba(196,164,106,.09);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--brass-hot);
  white-space: nowrap;
}
.mixchip b { font-variant-numeric: tabular-nums; }

/* --- the deck ----------------------------------------------------------- */

.deck { display: flex; flex-direction: column; gap: 12px; }

.card {
  position: relative;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow: 0 16px 34px -26px #000;
  animation: cardIn 260ms var(--ease) both;
  animation-delay: calc(var(--rank, 0) * 26ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }

.card[hidden] { display: none; }
.card__hit { display: grid; grid-template-columns: 112px 1fr; }

.card__shot { position: relative; }
.card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 14px;
  min-width: 0;
}

.card__line { display: flex; align-items: baseline; gap: 10px; }
.card__name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.15;
}
.card__price {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brass);
}

.card__feel {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-faint);
  text-transform: lowercase;
  font-variant: small-caps;
  line-height: 1.35;
}

.card__meter { display: flex; align-items: center; gap: 10px; margin-top: 2px; }

.spark {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 18px;
}
.spark i {
  position: relative;
  width: 4px;
  height: var(--h, 10%);
  border-radius: 1.5px;
  background: rgba(196,164,106,.24);
  transition: background var(--t) var(--ease);
}
/* the guest's own request, as a hairline across the drink's bar */
.spark i[data-want]::after {
  content: "";
  position: absolute;
  left: -1.5px;
  right: -1.5px;
  bottom: calc(var(--want) - 1px);
  height: 1.5px;
  border-radius: 1px;
  background: var(--brass-hot);
  box-shadow: 0 0 6px rgba(224,196,138,.8);
}
.spark i.is-hit { background: rgba(196,164,106,.6); }

.card__because:not(:empty)::before { content: "matches "; color: #5b5245; }
.card__because {
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--brass-deep);
  font-variant: small-caps;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__match {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: baseline;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(11,10,9,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(196,164,106,.3);
  color: var(--brass-hot);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.card__match small { font-size: 8px; font-weight: 700; opacity: .75; }

.pin {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brass-face);
  color: #241a08;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* --- the payout: card ranked first gets the full-bleed treatment --------- */

.card.is-top { border-color: rgba(196,164,106,.35); }
.card.is-top .card__hit { display: block; }
.card.is-top .card__shot { aspect-ratio: 5 / 4; }
.card.is-top .shot__stage { padding: 2% 0 34%; }
.card.is-top .shot__stage::after { bottom: 32%; }
.card.is-top .card__body {
  position: absolute;
  inset: auto 0 0;
  padding: 54px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(7,6,5,.55) 34%, rgba(7,6,5,.93) 68%);
}
.card.is-top .card__name { font-size: 27px; }
.card.is-top .card__price { font-size: 17px; }
.card.is-top .card__feel { font-size: 13px; color: var(--ink-dim); }
.card.is-top .card__match { top: 12px; left: auto; right: 12px; font-size: 14px; padding: 5px 10px; }
.card.is-top .pin { top: 12px; left: 12px; bottom: auto; }

/* --- the shot (photo or drawn glass) ------------------------------------ */

.shot {
  position: relative;
  height: 100%;
  min-height: 104px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 4%, color-mix(in srgb, var(--liquid, #6b5a3d) 34%, transparent), transparent 68%),
    linear-gradient(168deg, #1d1813, #0d0b09 72%);
}
.shot__img { width: 100%; height: 100%; object-fit: cover; }

.shot__stage { position: absolute; inset: 0; display: grid; place-items: center; }
.shot__stage .glass {
  width: 72%;
  height: 86%;
  overflow: visible;
  filter:
    drop-shadow(0 14px 16px rgba(0,0,0,.55))
    drop-shadow(0 0 26px var(--liquid-glow, transparent));
}
/* the bar top the glass is standing on */
.shot__stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 62%;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent);
}

.shot__grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(80% 60% at 50% 110%, var(--liquid-glow, transparent), transparent 70%),
    linear-gradient(200deg, rgba(255,255,255,.055), transparent 44%);
}

.card.is-top .shot__stage .glass { width: 42%; height: 96%; }

/* glass parts — crystal is mostly edges and one highlight */
.glass__vessel   { fill: rgba(228,238,255,.05); }
.glass__rim      { fill: none; stroke: rgba(233,242,255,.5); stroke-width: 1.1; }
.glass__shine    { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round;
                   stroke-dasharray: 22 400; stroke-dashoffset: 10; opacity: .55; }
.glass__hardware { fill: rgba(228,238,255,.07); stroke: rgba(233,242,255,.42); stroke-width: .9; }
.glass__meniscus { fill: rgba(255,255,255,.42); }
.glass__ice rect { fill: rgba(240,248,255,.2); stroke: rgba(255,255,255,.4); stroke-width: .7; }
.glass__ice--crushed rect { fill: rgba(240,248,255,.28); stroke: none; }
/* The liquid already carries its own alpha from Palette. */
.glass__ice { mix-blend-mode: screen; opacity: .8; }

/* --- empty state -------------------------------------------------------- */

.dead {
  margin: 30px auto;
  max-width: 30ch;
  text-align: center;
  display: grid;
  gap: 18px;
  justify-items: center;
}
.dead__line {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.3;
  color: var(--ink-dim);
}

.deck__foot {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #4e463c;
}

/* ==========================================================================
   Tray — the payout shelf, always in thumb reach
   ========================================================================== */

.tray {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(196,164,106,.16);
  background: linear-gradient(180deg, rgba(11,10,9,.86), rgba(11,10,9,.98));
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.coins { display: flex; flex: none; }
.coin {
  width: 44px;
  height: 44px;
  margin-right: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(11,10,9,.95);
  background: var(--steel-face);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 4px 10px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.14),
    inset 0 6px 10px -6px rgba(255,255,255,.55),
    inset 0 -6px 10px -8px rgba(0,0,0,.7);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.coin:last-child { margin-right: 0; }
.coin.is-swap { animation: coinSwap 260ms var(--ease); }
@keyframes coinSwap {
  0%   { opacity: 0; transform: translateY(8px) scale(.9); }
  100% { opacity: 1; transform: none; }
}

.cta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--brass-face);
  color: #241a08;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow:
    0 10px 24px -12px rgba(196,164,106,.9),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -3px 0 rgba(90,66,26,.45);
  transition: transform 90ms var(--ease), box-shadow 90ms var(--ease), filter var(--t) var(--ease);
}
/* a real button travels */
.cta:active {
  transform: translateY(3px);
  box-shadow: 0 3px 8px -6px rgba(196,164,106,.9), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(90,66,26,.4);
}
.cta__n {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(36,26,8,.22);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.cta.is-empty { filter: grayscale(.7) brightness(.8); }

.app[data-view="results"] .coins { display: none; }
.app[data-view="results"] .cta   { background: var(--steel-face); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }

/* ==========================================================================
   Detail sheet
   ========================================================================== */

.sheet { position: fixed; inset: 0; z-index: 70; }
.sheet[hidden] { display: none; }

.sheet__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(4,3,3,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 200ms var(--ease) both;
  cursor: pointer;
}

.sheet__panel {
  position: absolute;
  transition: transform 220ms var(--ease);
  inset: auto 0 0;
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-top: 1px solid rgba(196,164,106,.25);
  background: var(--bg-elev);
  box-shadow: 0 -30px 60px -30px #000;
  animation: sheetUp 260ms var(--ease) both;
  overflow: hidden;
}
@keyframes sheetUp { from { transform: translateY(100%); } }

.sheet__grab {
  flex: none;
  display: grid;
  place-items: center;
  height: 30px;
  touch-action: none;
  border: 0;
  background: none;
  cursor: pointer;
}
.sheet__grab i { width: 40px; height: 4px; border-radius: 999px; background: var(--steel); }

.sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 18px;
}

/* The one action a guest came for stays on screen, always. */
.sheet__foot {
  flex: none;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(22,19,17,.6), var(--bg-elev) 40%);
}
.btn--wide { width: 100%; min-height: 54px; font-size: 16px; }

.detail__shot { position: relative; aspect-ratio: 3 / 2; }
.detail__shot .shot--drawn .glass { width: 46%; }
.detail__shot .shot { min-height: 0; }

.detail__head { padding: 18px 20px 0; }
.detail__line { display: flex; align-items: baseline; gap: 12px; }
.detail__name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.06;
}
.detail__price {
  flex: none;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brass);
}
.detail__feel {
  margin-top: 9px;
  font-size: 13.5px;
  letter-spacing: .07em;
  text-transform: lowercase;
  font-variant: small-caps;
  color: var(--ink-dim);
}

.detail__spec { padding: 20px 20px 0; }
.detail__spec h4 {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 10px;
}
.detail__ing { list-style: none; margin: 0; padding: 0; }
.detail__ing li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 14.5px;
}
.detail__ing li:last-child { border-bottom: 0; }
.detail__ing b { font-weight: 500; }
.detail__ing span { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.detail__actions { padding: 18px 20px 0; display: grid; gap: 10px; }
.sheet__panel { max-height: 90dvh; }

/* ==========================================================================
   Bartender billboard (§7.2.3) — the only screen that matters at the bar
   ========================================================================== */

.billboard {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background: #070605;
  animation: fadeIn 180ms var(--ease) both;
}
.billboard[hidden] { display: none; }
.billboard__kicker {
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #554c3f;
}
.billboard__name {
  font-family: var(--font-display);
  font-size: clamp(44px, 15vw, 92px);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.035em;
  background: var(--brass-face);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nameUp 340ms var(--ease) both;
}
@keyframes nameUp { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.billboard__price { font-size: 20px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.billboard__close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 16px);
  right: 16px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: none;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Desktop is a stretched phone, not a different product (§7)
   ========================================================================== */

@media (min-width: 720px) {
  .app { max-width: 560px; margin: 0 auto; }
  .tray { max-width: 560px; left: 50%; transform: translateX(-50%); border-radius: 22px 22px 0 0; border: 1px solid rgba(196,164,106,.16); border-bottom: 0; }
  .sheet__panel { max-width: 560px; left: 50%; transform: translateX(-50%); }
  @keyframes sheetUp { from { transform: translate(-50%, 100%); } }
  /* Desktop is a stretched phone, not a different product — one column,
     the same deck, just with more room around it. */
  .card.is-top .card__shot { aspect-ratio: 16 / 10; }
}

/* ==========================================================================
   Motion off
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
  .boot { display: none; }
}

/* View Transitions where the browser allows (§7.3) */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: fadeOut 140ms var(--ease) both; }
  ::view-transition-new(root) { animation: fadeIn 200ms var(--ease) both; }
  @keyframes fadeOut { to { opacity: 0; } }
}

/* A card that was 86'd after the phone loaded it. */
.eightysix {
  margin: 16px 20px 0;
  padding: 12px 14px;
  border: 1px solid rgba(180,35,24,.45);
  border-radius: 12px;
  background: rgba(180,35,24,.12);
  color: #f0a89f;
  font-size: 14px;
  line-height: 1.45;
}

/* The standalone detail page has no tray under it. */
.app--detail { padding-bottom: 30px; }
.standalone { padding-bottom: 20px; }

/* ------------------------------------------------------------- language */
/* Small, always reachable, never in front of a drink. Sits above the tray
   on the machine view and bottom-left everywhere else. */
.langswitch{
  position:fixed; left:max(12px, env(safe-area-inset-left)); bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:40; padding:.45rem .7rem; border-radius:999px;
  font-family:var(--font-ui, system-ui, sans-serif); font-size:.75rem; font-weight:600; letter-spacing:.01em;
  color:rgba(255,255,255,.82); text-decoration:none;
  background:rgba(16,14,12,.72); border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  transition:color .15s ease, border-color .15s ease, background .15s ease;
}
.langswitch:hover,.langswitch:focus-visible{
  color:#fff; border-color:var(--accent,#c4a46a); background:rgba(16,14,12,.9);
}
.langswitch:focus-visible{ outline:2px solid var(--accent,#c4a46a); outline-offset:2px; }
/* The machine's tray owns the bottom edge; lift clear of it. */
.app[data-view="machine"] ~ .langswitch,
.app[data-view="results"] ~ .langswitch{ bottom:calc(84px + env(safe-area-inset-bottom)); }
@media (min-width:900px){ .app ~ .langswitch{ bottom:calc(16px + env(safe-area-inset-bottom)); } }

/* ----------------------------------------------------------------- logo */
/* The bar's own mark. Capped by height so a wide wordmark and a square
   badge both sit correctly on the same shelf. */
.topbar__logo{
  display:block; height:clamp(30px, 7vw, 44px); width:auto; max-width:min(60vw, 300px);
  object-fit:contain;
}
.topbar__name.is-hidden{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
}
.boot__logo{
  display:block; margin:0 auto; height:clamp(38px, 11vw, 64px); width:auto;
  max-width:min(70vw, 340px); object-fit:contain;
}
