/* Concept A: Ticket Machine. Four brand colours plus white; flavour colour comes only from the gelato photos. */
:root {
  --navy: #1B2A5E;
  --black: #2A2422;
  --pink: #F2B8C6;
  --beige: #F5F0E4;
  --white: #FFFFFF;

  --ink: var(--black);
  --ink-soft: rgba(42, 36, 34, .8);
  --on-navy: var(--beige);
  --on-navy-soft: rgba(245, 240, 228, .82);
  --rule-navy: rgba(245, 240, 228, .16);
  --rule-beige: rgba(27, 42, 94, .18);
  --shade: rgba(42, 36, 34, .45);

  --display: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
  --text: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --r-cab: 28px;
  --r-panel: 18px;
  --r-key: 14px;
  --slot-w: 392px;
  --gut: clamp(16px, 2.2vw, 28px);
  --ring: var(--pink);

  --screw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6' fill='%23F5F0E4' fill-opacity='.26' stroke='%232A2422' stroke-opacity='.6'/%3E%3Cpath d='M3.6 9.4l6.8-4.8' stroke='%232A2422' stroke-opacity='.75' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --screw-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6' fill='%231B2A5E' fill-opacity='.16' stroke='%231B2A5E' stroke-opacity='.45'/%3E%3Cpath d='M4.2 4.4l5.6 5.2' stroke='%231B2A5E' stroke-opacity='.6' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --chev-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B2A5E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");

  color-scheme: light;
  scrollbar-color: var(--navy) var(--beige);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--beige) url(/shared/img/brand/gelato-lab-pattern-rice.svg) 0 0 / 160px auto; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: transparent;
  color: var(--on-navy);
  font: 400 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--pink); color: var(--navy); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--beige); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 10px; border: 3px solid var(--beige); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select { caret-color: var(--navy); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic--lg { width: 30px; height: 30px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--navy); color: var(--beige); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Cabinet ---------- */
.cabinet {
  max-width: 1400px;
  margin: 20px auto 40px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 220px),
    var(--navy);
  border-radius: var(--r-cab);
  box-shadow: 0 30px 60px -30px rgba(42,36,34,.55), 0 2px 0 rgba(255,255,255,.08) inset;
  padding: 0 var(--gut) var(--gut);
}

/* ---------- Marquee ---------- */
.marquee {
  display: flex; align-items: center; gap: 24px;
  margin: 0 calc(var(--gut) * -1);
  padding: 14px var(--gut);
  background: var(--black);
  border-radius: var(--r-cab) var(--r-cab) 0 0;
  box-shadow: 0 6px 16px -8px rgba(42,36,34,.8);
  position: relative; z-index: 2;
}
.marquee__plate {
  display: block; flex: none;
  background: var(--beige);
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 0 0 1px rgba(245,240,228,.4), 0 0 22px rgba(245,240,228,.28), inset 0 -3px 8px rgba(27,42,94,.08);
}
.marquee__plate img { width: 210px; height: auto; }
.marquee__nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: auto; }
.marquee__nav a {
  color: var(--beige); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 8px;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.marquee__nav a:hover { background: rgba(245,240,228,.1); color: var(--white); }
.marquee__bag {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy); border: 1px solid rgba(245,240,228,.22); border-radius: 12px;
  padding: 8px 10px 8px 14px; cursor: pointer; font-weight: 700; color: var(--beige);
  transition: background-color .2s var(--ease-out);
}
.marquee__bag:hover { background: #22336f; }
.marquee__bag:active { transform: translateY(1px); }

/* ---------- Readouts ---------- */
.readout {
  display: inline-flex; align-items: center; justify-content: flex-end;
  min-width: 4.6em;
  padding: 3px 9px;
  background: var(--black);
  color: var(--pink);
  border-radius: 6px;
  font-weight: 700; font-size: 15px; line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: .03em;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.35);
  white-space: nowrap;
}
.readout--sm { min-width: 2.2em; justify-content: center; font-size: 14px; }

/* ---------- Machine grid ---------- */
.machine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--slot-w);
  gap: var(--gut);
  padding-top: var(--gut);
  align-items: start;
}
.machine__panels { display: grid; gap: var(--gut); min-width: 0; }

.panel {
  position: relative;
  border-radius: var(--r-panel);
  padding: 26px 28px 30px;
  background:
    var(--screw) left 10px top 10px / 14px 14px no-repeat,
    var(--screw) right 10px top 10px / 14px 14px no-repeat,
    var(--screw) left 10px bottom 10px / 14px 14px no-repeat,
    var(--screw) right 10px bottom 10px / 14px 14px no-repeat,
    linear-gradient(180deg, rgba(42,36,34,.18), rgba(42,36,34,.06));
  box-shadow: inset 0 2px 10px rgba(42,36,34,.45), inset 0 0 0 1px rgba(245,240,228,.08), 0 1px 0 rgba(255,255,255,.07);
}

/* Pickup head */
.panel--pickup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: end; }
.panel__head { min-width: 0; }
.panel--pickup h1 {
  font: 700 clamp(34px, 3.3vw, 50px)/1.05 var(--display);
  letter-spacing: -.01em;
  color: var(--beige);
  margin-bottom: 10px;
}
.lede { font-size: clamp(17px, 1.35vw, 19px); color: var(--beige); max-width: 46ch; }
.laneline { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 15px; color: var(--on-navy-soft); }
.laneline .ic { margin-top: 2px; color: var(--pink); }

.controls { display: grid; gap: 8px; justify-items: end; }
.sample { font-size: 13px; color: var(--on-navy-soft); }

/* Rocker switch */
.rocker {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 0; padding: 5px; border: 0; min-width: 0;
  background: var(--black);
  border-radius: 14px;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.08);
}
.rocker legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rocker__side { position: relative; cursor: pointer; }
.rocker__side input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rocker__face {
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 6px 16px 6px 10px;
  border-radius: 10px;
  color: var(--on-navy-soft);
  font-size: 14px; line-height: 1.25;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.rocker__face b { display: block; font-size: 15px; color: inherit; }
.rocker__face img { width: auto; height: 40px; opacity: .55; transition: opacity .25s var(--ease-out); }
.rocker__side input:checked + .rocker__face {
  background: var(--beige); color: var(--navy);
  box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 -5px 8px -5px rgba(27,42,94,.12);
  transform: translateY(-1px);
}
.rocker__side input:checked + .rocker__face img { opacity: 1; }
.rocker__side input:focus-visible + .rocker__face { outline: 3px solid var(--pink); outline-offset: 2px; }

/* Flavour buttons */
.buttons {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  padding: 16px;
  margin-top: 6px;
  background: rgba(42,36,34,.32);
  border-radius: 16px;
  box-shadow: inset 0 3px 10px rgba(0,0,0,.35);
}
.fkey {
  --ring: var(--navy);
  position: relative;
  display: grid; grid-template-rows: auto 1fr auto; gap: 8px;
  padding: 9px 9px 11px;
  background: var(--beige);
  color: var(--black);
  border: 0; border-radius: var(--r-key);
  text-align: left; cursor: pointer;
  box-shadow: 0 5px 12px rgba(0,0,0,.38), inset 0 -5px 8px -5px rgba(27,42,94,.1), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .12s var(--ease-out), box-shadow .5s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.fkey:hover { box-shadow: 0 7px 16px rgba(0,0,0,.42), inset 0 -5px 8px -5px rgba(27,42,94,.1), inset 0 1px 0 rgba(255,255,255,.9); }
.fkey:active, .fkey.is-pressing {
  transform: translateY(3px) scale(.99);
  box-shadow: 0 1px 3px rgba(0,0,0,.4), inset 0 4px 10px rgba(42,36,34,.28);
  transition-duration: .06s;
}
.fkey__win {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 2 / 1;
  border-radius: 9px;
  background: var(--black);
  box-shadow: inset 0 0 0 1px rgba(42,36,34,.25);
}
.fkey__win img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) brightness(.94); transition: filter .5s var(--ease-out), transform .6s var(--ease-out); }
.fkey__win::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), inset 0 -18px 26px -16px rgba(42,36,34,.5);
  pointer-events: none;
}
.fkey:hover .fkey__win img { transform: scale(1.03); }
.fkey__name { font: 700 17px/1.2 var(--display); color: var(--navy); align-self: start; padding: 0 2px; }
.fkey__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fkey__count { display: none; font-size: 13px; font-weight: 700; color: var(--navy); }
.fkey__add { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.fkey__add .ic { width: 16px; height: 16px; stroke-width: 2; }
.fkey.is-lit {
  box-shadow: 0 0 0 3px var(--pink), 0 4px 28px 6px rgba(242,184,198,.5), 0 5px 12px rgba(0,0,0,.38), inset 0 -5px 8px -5px rgba(27,42,94,.1);
}
.fkey.is-lit .fkey__win img { filter: saturate(1.05) brightness(1.04); }
.fkey.is-lit .fkey__count { display: inline; }
.fkey.is-lit .fkey__add { display: none; }
.fkey.is-lit:active, .fkey.is-lit.is-pressing {
  box-shadow: 0 0 0 3px var(--pink), 0 3px 20px 4px rgba(242,184,198,.45), inset 0 4px 10px rgba(42,36,34,.28);
}
.fkey.is-warming { animation: warm .7s var(--ease-out); }
@keyframes warm {
  0% { box-shadow: 0 0 0 0 rgba(242,184,198,0), 0 0 0 0 rgba(242,184,198,0), 0 1px 3px rgba(0,0,0,.4); }
  35% { box-shadow: 0 0 0 4px var(--pink), 0 4px 44px 12px rgba(242,184,198,.75), 0 4px 10px rgba(0,0,0,.38); }
  100% { box-shadow: 0 0 0 3px var(--pink), 0 4px 28px 6px rgba(242,184,198,.5), 0 5px 12px rgba(0,0,0,.38); }
}

/* ---------- Orders panel (cakes, catering, gifts) ---------- */
.plate-title, .unit__plate h2, .menuplate h2, .visit h2 { font: 700 clamp(26px, 2.2vw, 34px)/1.15 var(--display); letter-spacing: -.005em; }
.plate-title { color: var(--beige); }
.panel__sub { color: var(--on-navy-soft); margin-top: 4px; }
.wide {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.4fr);
  gap: 14px 28px; align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--rule-navy);
  scroll-margin-top: 16px;
}
.panel--orders .wide:first-of-type { margin-top: 18px; }
.wide:last-child { padding-bottom: 0; }
.wide__label { grid-row: span 3; display: flex; gap: 14px; align-items: flex-start; align-self: start; }
.wide__label .ic { color: var(--pink); margin-top: 2px; }
.wide h3 { font: 700 21px/1.2 var(--display); color: var(--beige); margin-bottom: 4px; }
.wide__label p { color: var(--on-navy-soft); font-size: 15px; max-width: 40ch; }
.wide__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide__row--3 .key { flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 12px 14px; }

.key {
  --ring: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 10px 12px 10px 16px;
  background: var(--beige); color: var(--navy);
  border: 0; border-radius: var(--r-key); cursor: pointer; text-align: left;
  box-shadow: 0 5px 12px rgba(0,0,0,.36), inset 0 -5px 8px -5px rgba(27,42,94,.1), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .12s var(--ease-out), box-shadow .5s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.key:active, .key.is-pressing { transform: translateY(3px); box-shadow: 0 1px 3px rgba(0,0,0,.4), inset 0 4px 10px rgba(42,36,34,.28); transition-duration: .06s; }
.key__name { font: 700 17px/1.2 var(--display); }
.key__name small { display: block; font: 500 13px/1.3 var(--text); color: var(--ink-soft); margin-top: 2px; }
.key.is-lit { box-shadow: 0 0 0 3px var(--pink), 0 4px 26px 5px rgba(242,184,198,.45), 0 5px 12px rgba(0,0,0,.36); }
.key.is-warming { animation: warm .7s var(--ease-out); }
.key[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--pink), 0 5px 12px rgba(0,0,0,.36); }

/* Fields */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; letter-spacing: .01em; color: var(--on-navy-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px;
  padding: 10px 12px;
  background: var(--beige); color: var(--black);
  border: 1.5px solid transparent; border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(42,36,34,.18);
  transition: border-color .2s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 84px; }
.field select, .field--ticket select { appearance: none; -webkit-appearance: none; background-image: var(--chev-navy); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-color: var(--navy); }
.field input[aria-invalid="true"] { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.field--dark { max-width: 340px; }

/* Quote form */
.quote { grid-column: 2; padding: 18px; background: rgba(42,36,34,.35); border-radius: 14px; box-shadow: inset 0 2px 8px rgba(0,0,0,.3); }
.quote__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field--full { grid-column: 1 / -1; }
.quote__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; }
.quote__note { font-size: 14px; color: var(--on-navy-soft); flex: 1 1 220px; }
.quote__error { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--pink); color: var(--navy); font-weight: 700; font-size: 14px; }
.quote__done { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--beige); color: var(--navy); font-weight: 700; }

.go {
  --ring: var(--beige);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px;
  background: var(--pink); color: var(--navy);
  border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 16px;
  box-shadow: 0 5px 12px rgba(0,0,0,.3), inset 0 -5px 8px -5px rgba(27,42,94,.15);
  transition: transform .12s var(--ease-out), box-shadow .3s var(--ease-out);
}
.go:hover { box-shadow: 0 7px 16px rgba(0,0,0,.34), inset 0 -5px 8px -5px rgba(27,42,94,.15); }
.go:active { transform: translateY(2px); box-shadow: 0 1px 3px rgba(0,0,0,.3), inset 0 3px 8px rgba(27,42,94,.2); }
.go--full { width: 100%; }

/* ---------- Delivery unit ---------- */
.unit {
  position: relative;
  margin-top: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 160px),
    var(--black);
  border-radius: 22px;
  padding: 26px 24px 24px;
  box-shadow: 0 16px 30px -16px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(245,240,228,.1);
  scroll-margin-top: 16px;
}
.unit__bolts {
  position: absolute; left: 0; right: 0; top: -26px;
  display: flex; justify-content: space-around; pointer-events: none;
}
.unit__bolts i {
  display: block; width: 44px; height: 34px;
  border-radius: 6px;
  background:
    var(--screw) center 6px / 13px 13px no-repeat,
    var(--screw) center 20px / 13px 13px no-repeat,
    rgba(245,240,228,.22);
  box-shadow: 0 2px 4px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.unit__plate {
  --ring: var(--navy);
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  background:
    var(--screw-dark) left 8px top 8px / 12px 12px no-repeat,
    var(--screw-dark) right 8px top 8px / 12px 12px no-repeat,
    var(--screw-dark) left 8px bottom 8px / 12px 12px no-repeat,
    var(--screw-dark) right 8px bottom 8px / 12px 12px no-repeat,
    var(--beige);
  color: var(--black);
  border-radius: 14px;
  box-shadow: 0 0 22px rgba(245,240,228,.18), inset 0 -3px 8px rgba(27,42,94,.08);
}
.unit__plate .ic { color: var(--navy); margin: 4px 0 0 8px; }
.unit__plate h2 { color: var(--navy); margin-bottom: 4px; }
.unit__plate p { color: var(--ink-soft); font-size: 15px; max-width: 64ch; }
.unit__body { display: grid; gap: 20px; margin-top: 22px; }
.sgroup h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--on-navy-soft); margin: 0 0 8px 4px; }
.sgroup ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.srow {
  display: grid; grid-template-columns: 12ch minmax(0, 1fr) auto 48px;
  align-items: center; gap: 16px;
  padding: 8px 8px 8px 10px;
  background: rgba(245,240,228,.05);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(245,240,228,.1);
  transition: box-shadow .4s var(--ease-out), background-color .4s var(--ease-out);
}
.srow.is-lit { box-shadow: inset 0 0 0 2px var(--pink), 0 3px 18px rgba(242,184,198,.25); background: rgba(242,184,198,.07); }
.srow__code { background: rgba(0,0,0,.35); min-width: 0; justify-content: flex-start; font-size: 14px; letter-spacing: .06em; }
.srow__name { color: var(--beige); font-weight: 700; line-height: 1.3; }
.srow__name small { display: block; font-weight: 400; font-size: 14px; color: var(--on-navy-soft); }
.srow__price { color: var(--beige); font-weight: 700; font-variant-numeric: tabular-nums; }
.srow__add {
  --ring: var(--beige);
  position: relative;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  background: var(--pink); color: var(--navy);
  border: 0; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 -5px 8px -5px rgba(27,42,94,.15);
  transition: transform .12s var(--ease-out), box-shadow .3s var(--ease-out);
}
.srow__add .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.srow__add:active, .srow__add.is-pressing { transform: translateY(2px); box-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 3px 8px rgba(27,42,94,.25); }
.srow__qty {
  position: absolute; top: -7px; right: -7px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--beige); color: var(--navy);
  border-radius: 11px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.unit__foot { margin-top: 16px; font-size: 13px; color: var(--on-navy-soft); }

/* ---------- Ticket slot (the live bag) ---------- */
.slot {
  position: sticky; top: 16px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 32px);
  padding: 16px 16px 18px;
  background:
    var(--screw) left 10px top 10px / 13px 13px no-repeat,
    var(--screw) right 10px top 10px / 13px 13px no-repeat,
    var(--black);
  border-radius: 20px;
  box-shadow: 0 18px 34px -18px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(245,240,228,.08);
  outline: none;
}
.slot__tab { display: none; }
.slot__mouth {
  position: relative; z-index: 2;
  height: 22px; margin: 14px 4px 0;
  border-radius: 11px;
  background: rgba(0,0,0,.55);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.12);
}
.slot__mouth span {
  position: absolute; left: 18px; right: 18px; top: 9px; height: 3px; border-radius: 3px;
  background: var(--pink); opacity: .25;
  transition: opacity .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.slot.is-printing .slot__mouth span { opacity: 1; box-shadow: 0 2px 12px 2px rgba(242,184,198,.7); transition-duration: .12s; }
.slot__paper {
  position: relative; z-index: 1;
  margin: -12px 14px 0;
  padding-top: 12px;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--pink) transparent;
  min-height: 0;
}
.ticket {
  --ring: var(--navy);
  position: relative;
  background: var(--beige);
  color: var(--black);
  padding: 22px 18px 24px;
  -webkit-mask:
    radial-gradient(circle 5px at 50% 100%, transparent 96%, #000) bottom / 13px 51% repeat-x,
    radial-gradient(circle 5px at 50% 0, transparent 96%, #000) top / 13px 51% repeat-x;
          mask:
    radial-gradient(circle 5px at 50% 100%, transparent 96%, #000) bottom / 13px 51% repeat-x,
    radial-gradient(circle 5px at 50% 0, transparent 96%, #000) top / 13px 51% repeat-x;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.ticket.is-feeding { animation: feed .5s var(--ease-out); }
@keyframes feed { from { transform: translateY(-18px); } to { transform: none; } }
.ticket__head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px dashed rgba(42,36,34,.28); }
.ticket__stamp { width: 54px; height: 54px; transform: rotate(-12deg); flex: none; }
.ticket.is-feeding .ticket__stamp { animation: stamp .5s var(--ease-out); }
@keyframes stamp { 0% { transform: rotate(-12deg) scale(1.25); opacity: .4; } 60% { transform: rotate(-12deg) scale(.94); opacity: 1; } 100% { transform: rotate(-12deg) scale(1); } }
.ticket h2 { font: 700 22px/1.15 var(--display); color: var(--navy); }
.ticket__meta { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ticket__empty { padding: 18px 0 4px; color: var(--ink-soft); font-size: 15px; }

.lane { padding: 14px 0 16px; border-bottom: 2px dashed rgba(42,36,34,.28); }
.lane__title { display: flex; align-items: center; gap: 8px; font: 700 16px/1.3 var(--display); color: var(--navy); margin-bottom: 8px; }
.lane__title .ic { width: 18px; height: 18px; }
.lane__note { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.lane__note .ic { width: 16px; height: 16px; margin-top: 1px; }
.lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(42,36,34,.3);
}
.line:last-child { border-bottom: 0; }
.line__name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.line__name small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.line__price { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 5.2ch; text-align: right; font-size: 15px; }
.line__price--tbc { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.step { display: inline-flex; align-items: center; border-radius: 9px; box-shadow: inset 0 0 0 1.5px rgba(27,42,94,.3); }
.step button {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: transparent; border: 0; color: var(--navy); cursor: pointer; border-radius: 8px;
}
.step button:hover { background: rgba(27,42,94,.08); }
.step .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.step output { min-width: 1.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.line.is-printing { animation: print .55s var(--ease-out) both; }
@keyframes print {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-6px); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}

.when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field--ticket > span { color: var(--ink-soft); font-size: 12px; }
.field--ticket select, .field--ticket input {
  min-height: 42px; padding: 8px 10px; font-size: 15px;
  background-color: var(--white); color: var(--black);
  border: 1.5px solid rgba(27,42,94,.3); border-radius: 9px; box-shadow: none;
}
.field--ticket select { padding-right: 30px; background-position: right 6px center; }
.field--ticket input::placeholder { color: rgba(42,36,34,.6); }
.postal-msg { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--navy); }

.ticket__mixed { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--pink); color: var(--navy); font-size: 14px; font-weight: 700; line-height: 1.4; }
.ticket__total { padding-top: 14px; }
.ticket__sum { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 17px; color: var(--navy); }
.ticket__num { font-variant-numeric: tabular-nums; font-size: 22px; font-family: var(--display); }
.ticket__fine { margin: 4px 0 14px; font-size: 13px; color: var(--ink-soft); }
.ticket .go { --ring: var(--navy); background: var(--navy); color: var(--beige); }
.ticket__msg { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--navy); font-weight: 500; }

/* ---------- In-store menu plate ---------- */
.menuplate {
  margin-top: calc(var(--gut) * 1.6);
  padding: 34px 40px 36px;
  background:
    var(--screw-dark) left 12px top 12px / 14px 14px no-repeat,
    var(--screw-dark) right 12px top 12px / 14px 14px no-repeat,
    var(--screw-dark) left 12px bottom 12px / 14px 14px no-repeat,
    var(--screw-dark) right 12px bottom 12px / 14px 14px no-repeat,
    var(--beige);
  color: var(--black);
  border-radius: var(--r-panel);
  box-shadow: 0 0 30px rgba(245,240,228,.14), inset 0 -4px 10px rgba(27,42,94,.08);
}
.menuplate__inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 24px 48px; }
.menuplate h2 { color: var(--navy); margin-bottom: 10px; }
.menuplate__intro p { color: var(--ink-soft); max-width: 36ch; }
.menuplate__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; }
.menu { width: 100%; border-collapse: collapse; }
.menu caption { text-align: left; font: 700 17px/1.3 var(--display); color: var(--navy); padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
.menu th, .menu td { padding: 10px 0; border-bottom: 1px dotted rgba(42,36,34,.35); vertical-align: baseline; text-align: left; }
.menu th { font-weight: 700; padding-right: 12px; }
.menu th small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.menu td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--navy); }

/* ---------- Visit ---------- */
.visit {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px 48px; align-items: center;
  margin-top: calc(var(--gut) * 1.6);
  padding: 8px 8px 8px 12px;
  scroll-margin-top: 16px;
}
.visit h2 { color: var(--beige); margin-bottom: 20px; }
.visit address { font-style: normal; display: grid; gap: 4px; }
.visit__row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; color: var(--beige); text-decoration: none; font-size: 17px; line-height: 1.45; }
.visit__row .ic { color: var(--pink); margin-top: 3px; }
.visit__row small { display: block; font-size: 14px; color: var(--on-navy-soft); text-decoration: underline; text-underline-offset: .25em; }
a.visit__row:hover span { text-decoration: underline; }
.visit__photo { margin: 0; border-radius: var(--r-panel); overflow: hidden; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6), 0 0 0 1px rgba(245,240,228,.12); }
.visit__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Footer ---------- */
.foot {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px 40px; align-items: center;
  margin: calc(var(--gut) * 1.6) calc(var(--gut) * -1) calc(var(--gut) * -1);
  padding: 32px calc(var(--gut) + 8px);
  background: var(--black) url(/shared/img/brand/gelato-lab-pattern-black.svg) 0 0 / 160px auto;
  border-radius: 0 0 var(--r-cab) var(--r-cab);
}
.foot__logo { width: 120px; height: auto; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.foot__nav a { color: var(--beige); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.foot__nav a:hover { background: rgba(245,240,228,.1); }
.foot__small { font-size: 14px; color: var(--on-navy-soft); display: grid; gap: 4px; text-align: right; }

/* ---------- Medium ---------- */
@media (max-width: 1180px) {
  :root { --slot-w: 340px; }
  .panel--pickup { grid-template-columns: 1fr; align-items: start; }
  .controls { justify-items: start; }
  .marquee__nav a { padding: 8px 9px; }
}
@media (max-width: 1000px) {
  .wide { grid-template-columns: 1fr; }
  .wide__label { grid-row: auto; }
  .quote { grid-column: 1; }
  .menuplate__inner { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 11ch minmax(0, 1fr) auto 48px; gap: 12px; }
}

/* ---------- Phone: machine stays a machine, slot becomes a bottom tray ---------- */
@media (max-width: 820px) {
  :root { --gut: 14px; --r-cab: 20px; }
  .cabinet { margin: 8px 8px 96px; }
  .marquee { flex-wrap: wrap; gap: 10px 12px; padding: 12px 14px; }
  .marquee__plate { padding: 6px 12px; }
  .marquee__plate img { width: 160px; }
  .marquee__bag { margin-left: auto; }
  .marquee__nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: 0; }
  .marquee__nav a { padding: 8px 6px; font-size: 14px; }

  .machine { grid-template-columns: 1fr; }
  .panel { padding: 20px 16px 22px; }
  .panel--pickup h1 { font-size: 34px; }
  .rocker { width: 100%; }
  .controls { justify-items: stretch; }
  .rocker__face { padding: 6px 10px 6px 8px; gap: 8px; }
  .buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 10px; }
  .fkey { padding: 7px 7px 9px; gap: 6px; }
  .fkey__name { font-size: 15px; }
  .fkey__foot { flex-wrap: wrap; gap: 4px 6px; }
  .readout { font-size: 14px; padding: 2px 7px; }
  .wide__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .wide__row .key { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .quote { padding: 14px; }
  .quote__grid { grid-template-columns: 1fr; }
  .unit { padding: 22px 14px 18px; }
  .unit__plate { padding: 16px 16px 16px 14px; gap: 10px; }
  .unit__plate .ic { margin-left: 4px; }
  .srow { grid-template-columns: minmax(0, 1fr) 48px; grid-template-areas: "code add" "name add" "price add"; gap: 6px 12px; padding: 10px 10px 10px 12px; }
  .srow__code { grid-area: code; justify-self: start; }
  .srow__name { grid-area: name; }
  .srow__price { grid-area: price; }
  .srow__add { grid-area: add; align-self: center; }
  .menuplate { padding: 26px 20px 28px; }
  .menuplate__cols { grid-template-columns: 1fr; }
  .visit { grid-template-columns: 1fr; padding: 0 4px; }
  .foot { grid-template-columns: 1fr; text-align: left; padding: 28px 20px; }
  .foot__small { text-align: left; }
  .foot__nav { margin-left: -12px; }

  .slot {
    position: fixed; z-index: 30; top: auto; left: 8px; right: 8px; bottom: 0;
    max-height: min(78vh, 640px);
    padding: 0 10px 10px;
    border-radius: 18px 18px 0 0;
    background: var(--black);
    box-shadow: 0 -10px 30px rgba(42,36,34,.45), 0 0 0 1px rgba(245,240,228,.1);
  }
  .slot__tab {
    --ring: var(--pink);
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-height: 60px; padding: 10px 6px;
    background: transparent; border: 0; color: var(--beige); cursor: pointer; text-align: left;
  }
  .slot__tab .ic { color: var(--pink); }
  .slot__tabtext { flex: 1; display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
  .slot__tabtext b { font-weight: 700; }
  .slot__tabtext span { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pink); }
  .slot__chev { transition: transform .35s var(--ease-out); }
  .slot.is-open .slot__chev { transform: rotate(180deg); }
  .slot__mouth { margin: 0 2px; height: 16px; }
  .slot__mouth span { top: 6px; }
  .slot__paper { display: none; margin: -10px 8px 0; }
  .slot.is-open .slot__paper { display: block; }
  .slot.is-open .slot__paper { animation: tray .4s var(--ease-out); }
  @keyframes tray { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .fkey:active, .fkey.is-pressing, .key:active, .key.is-pressing { transform: none; }
}
