/* ═══════════════════════════════════════════
   How Cooked? — neon pub at closing time
   ═══════════════════════════════════════════ */

:root {
  --bg: #170c12;
  --card: #25141f;
  --card-2: #321c2b;
  --line: #4a2c3e;
  --slab: #0a0508;
  --ink: #fff1dc;
  --ink-2: #e2cfd8;
  --muted: #b39aa8;
  --pink: #ff4f8b;
  --pink-glow: #ff2d75;
  --gold: #ffc94a;
  --lime: #c7f464;
  --red: #ff4b3e;
  --paper: #fbf3e4;
  --paper-ink: #2a1a12;
  --z: #7cc6fe;
  --sway: 0deg;

  --display: 'Shrikhand', 'Georgia', serif;
  --ui: 'Bricolage Grotesque', system-ui, sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --mono: 'VT323', ui-monospace, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}

/* The carpet, with a vignette so the middle stays readable */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--carpet);
  background-size: 96px 96px;
  transition: filter .6s;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255, 79, 139, .13), transparent 70%),
    radial-gradient(ellipse at 50% 40%, rgba(23, 12, 18, .35), rgba(10, 5, 8, .88) 85%);
}

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
a { color: var(--ink-2); }

/* ── Header + neon sign ── */
.top {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sign {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.3rem, 6.4vw, 3.8rem);
  line-height: 1.05;
  color: #ffe0ea;
  letter-spacing: .01em;
  text-shadow:
    0 0 2px #fff,
    0 0 10px var(--pink),
    0 0 24px var(--pink-glow),
    0 0 46px var(--pink-glow);
  display: inline-flex;
  align-items: baseline;
  gap: .28em;
  transform-origin: 30% 80%;
  animation: sway 5.5s ease-in-out infinite;
  user-select: none;
  cursor: default;
}
.sign-word { transition: color .4s, text-shadow .4s; }
.flicker { animation: flicker 7s linear infinite; }

.sign-q {
  font: inherit;
  color: inherit;
  text-shadow: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin-left: -.22em;
  display: inline-block;
  transform-origin: 20% 10%;
  animation: flicker 4.3s linear infinite 1.1s;
  cursor: pointer;
}
.sign-q.fallen { animation: dangle 2.4s cubic-bezier(.3, 1.6, .5, 1) forwards; }

.tagline {
  color: var(--muted);
  font-weight: 600;
  font-size: .98rem;
  margin-top: 4px;
}

.brand { flex: 1; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.egg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px 5px 8px;
  box-shadow: 0 4px 0 var(--slab);
  color: var(--slab);
  transition: transform .08s, box-shadow .08s, border-color .2s;
}
.egg-btn:hover { border-color: var(--gold); }
.egg-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--slab); }
.egg-svg { width: 26px; height: 30px; display: block; }
.egg-chick { font-size: 1.6rem; line-height: 1; }
.egg-count { color: var(--ink); font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--slab);
  font-size: 1.15rem;
  transition: transform .08s, box-shadow .08s;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--slab); }

/* ── Layout ── */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px 120px;
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  gap: 18px 32px;
  align-items: start;
}
.plan, .results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.section-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.section-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card-2);
  border: 2px solid var(--line);
  font-size: .9rem;
  letter-spacing: 0;
}

.card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--slab);
  padding: 18px;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  padding: .72rem 1.1rem;
  border-radius: 16px;
  border: 2px solid var(--slab);
  background: var(--card-2);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--slab);
  transition: transform .08s, box-shadow .08s, filter .15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--slab); }
.btn-gold { background: var(--gold); color: #2a1407; }
.btn-pink { background: var(--pink); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); box-shadow: none; }
.btn-ghost:hover { color: var(--ink); }
.btn-big { font-size: 1.12rem; padding: .95rem 1.4rem; }

.nudge {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--card-2);
  border: 2px solid var(--slab);
  box-shadow: 0 3px 0 var(--slab);
  font-weight: 800;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  transition: transform .08s, box-shadow .08s;
}
.nudge:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--slab); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  border-radius: 999px;
  padding: .38rem .75rem;
  font-size: .82rem;
  font-weight: 700;
  background: transparent;
  border: 2px dashed var(--line);
  color: var(--muted);
  transition: background .15s, color .15s, border-color .15s, transform .08s;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip:active { transform: scale(.95); }

/* ── The punter ── */
.punter { display: flex; flex-direction: column; gap: 10px; }
.punter-row { display: flex; align-items: center; gap: 12px; }
.punter-label { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.punter-label .label { font-weight: 800; font-size: 1.02rem; }
.punter-label .sub { color: var(--gold); font-family: var(--hand); font-size: 1.25rem; line-height: 1; margin-top: 2px; }
.big-readout {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.unit-toggle {
  display: inline-flex;
  border: 2px solid var(--slab);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 3px 0 var(--slab);
}
.unit-toggle button {
  background: var(--card-2);
  border: 0;
  padding: .3rem .65rem;
  font-weight: 800;
  font-size: .82rem;
  color: var(--muted);
}
.unit-toggle button[aria-pressed="true"] { background: var(--gold); color: #2a1407; }

.weight-ctrl { display: flex; align-items: center; gap: 12px; }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 36px;
  background: transparent;
  cursor: grab;
}
input[type=range]:active { cursor: grabbing; }
input[type=range]::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 99px;
  border: 2px solid var(--slab);
  background: linear-gradient(90deg, var(--gold) var(--fill, 30%), var(--card-2) var(--fill, 30%));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--slab);
  box-shadow: 0 3px 0 var(--slab);
  transition: transform .1s;
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 99px; border: 2px solid var(--slab); background: var(--card-2); }
input[type=range]::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--gold); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 3px solid var(--slab); }

.kickoff { padding-top: 12px; border-top: 2px dashed var(--line); }
.kickoff-ctrl { display: flex; align-items: center; gap: 10px; }
.kickoff-time { color: var(--gold); min-width: 4.6ch; text-align: center; }

/* ── Presets ── */
.presets-wrap { display: flex; flex-direction: column; gap: 8px; }
.presets-label { font-family: var(--hand); font-size: 1.35rem; color: var(--gold); line-height: 1; padding-left: 4px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: .42rem .8rem .42rem .6rem;
  font-weight: 700;
  font-size: .86rem;
  box-shadow: 0 3px 0 var(--slab);
  transition: transform .08s, box-shadow .08s, border-color .15s;
  white-space: nowrap;
}
.preset span { font-size: 1.05rem; }
.preset:hover { border-color: var(--gold); }
.preset:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--slab); }

/* ── Rounds ── */
.rounds { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.round {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--slab);
  padding: 14px 14px 12px 20px;
  transition: border-color .3s;
}
.round::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 16px;
  width: 5px;
  border-radius: 99px;
  background: var(--z);
  box-shadow: 0 0 12px var(--z);
  transition: background .4s, box-shadow .4s;
}
.round.fresh { animation: drop-in .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d, 0ms); }

.round-head { display: flex; align-items: center; gap: 10px; }
.round-time { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.round-clock { font-family: var(--display); font-size: 1.45rem; color: var(--gold); line-height: 1.1; }
.round-no { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.round-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 800;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--z) 15%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--z) 55%, transparent);
  color: var(--ink);
  white-space: nowrap;
}
.round-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--z); }
.round-del {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  flex: none;
}
.round-del:hover { background: rgba(255, 75, 62, .15); color: var(--red); }

.round-drinks { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.drink-line {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 2px;
  border-radius: 14px;
}
.drink-glass .glass { width: 30px; height: 42px; display: block; color: var(--ink); }
.drink-name { font-weight: 700; font-size: .95rem; line-height: 1.2; min-width: 0; }
.drink-name small { display: block; font-weight: 600; font-size: .74rem; color: var(--muted); margin-top: 1px; }

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--card-2);
  border: 2px solid var(--slab);
  border-radius: 999px;
  padding: 2px;
}
.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: background .12s, transform .08s;
}
.step:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.step:active:not(:disabled) { transform: scale(.88); }
.step[data-act="dec"] { font-size: .95rem; }
.stepper output { min-width: 24px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

.round-empty { color: var(--muted); font-style: italic; font-size: .9rem; margin: 10px 0 6px; }

.round-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.add-drink {
  border-radius: 999px;
  padding: .45rem .9rem;
  font-weight: 800;
  font-size: .86rem;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 2px solid color-mix(in srgb, var(--gold) 55%, transparent);
  color: var(--gold);
  transition: background .15s, transform .08s;
}
.add-drink:hover { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.add-drink:active { transform: scale(.95); }

.chunder[aria-pressed="true"] {
  background: color-mix(in srgb, #8bd450 22%, transparent);
  border: 2px solid #8bd450;
  color: #d8f7b8;
}
.extras-toggle[aria-expanded="true"] { border-style: solid; color: var(--ink); }

.extras-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; animation: fade-up .25s ease-out; }
.extra[aria-pressed="true"] {
  background: color-mix(in srgb, var(--x) 22%, transparent);
  border: 2px solid var(--x);
  color: var(--ink);
}

.rounds-empty {
  text-align: center;
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--muted);
  padding: 22px 12px;
  border: 2px dashed var(--line);
  border-radius: 22px;
  line-height: 1.15;
}

.round-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.round-actions .btn { flex: 1; }

.bell {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--slab);
  color: var(--slab);
  display: grid;
  place-items: center;
  transform-origin: 50% 10%;
}
.bell svg { width: 30px; height: 30px; }
.bell:hover { border-color: var(--gold); }
.bell.ringing { animation: ring .9s ease-out; }

/* ── Hero ── */
.hero { container-type: inline-size; overflow: hidden; border-color: color-mix(in srgb, var(--z) 45%, var(--line)); transition: border-color .5s; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 30%, color-mix(in srgb, var(--z) 22%, transparent), transparent 60%);
  pointer-events: none;
  transition: background .5s;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 6px; justify-items: center; text-align: center; }
.hero-dial { width: 210px; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.dial { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 6px 0 var(--slab)); }
.hero-copy { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }

.zone-name {
  font-family: var(--display);
  font-size: clamp(2.5rem, 13cqi, 3.9rem);
  line-height: 1.02;
  color: var(--z);
  text-shadow: 0 3px 0 var(--slab), 0 0 30px color-mix(in srgb, var(--z) 45%, transparent);
  transition: color .4s;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.zone-name.stamp-in { animation: stamp-in .45s cubic-bezier(.3, 1.5, .5, 1); }

.doneness {
  display: inline-block;
  background: var(--z);
  color: #1a0d14;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 2px solid var(--slab);
  box-shadow: 0 3px 0 var(--slab);
  transform: rotate(-2.5deg);
  transition: background .4s;
}
.fop {
  font-size: 1.22rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  margin-top: 10px;
  text-wrap: balance;
}
.fop::before { content: '“'; color: var(--z); }
.fop::after { content: '”'; color: var(--z); }
.zone-desc { color: var(--muted); font-size: .88rem; line-height: 1.5; margin-top: 4px; max-width: 52ch; text-wrap: pretty; }

.stamp {
  position: relative;
  display: inline-block;
  margin: 12px auto 0;
  width: fit-content;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .12em;
  padding: .35rem .8rem;
  border: 3px solid currentColor;
  border-radius: 8px;
  color: var(--red);
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent);
  animation: stamp-down .5s cubic-bezier(.3, 1.6, .5, 1);
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.stamp[data-level="medium"] { color: #ff9a3c; }
.hero > .stamp { display: block; }
.stamp[hidden] { display: none !important; }

.hero-notes { position: relative; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.hero-notes:empty { display: none; }
.note {
  --x: var(--red);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  background: color-mix(in srgb, var(--x) 10%, var(--card));
  border: 2px solid color-mix(in srgb, var(--x) 45%, transparent);
  border-radius: 16px;
  padding: 10px 12px;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.note.fight[data-level="medium"] { --x: #ff9a3c; }
.note-icon { font-size: 1.2rem; line-height: 1.2; }

@container (min-width: 560px) {
  .hero-grid { grid-template-columns: 220px 1fr; gap: 26px; justify-items: stretch; text-align: left; align-items: center; }
  .hero-dial { width: 220px; }
  .hero-copy { align-items: flex-start; }
  .zone-name { font-size: clamp(2.6rem, 9cqi, 4rem); }
  .hero > .stamp { position: absolute; top: 18px; right: 18px; margin: 0; transform: rotate(7deg); }
}

/* Dial details */
.dial-seg { transition: opacity .4s; }
.dial-seg.dim { opacity: .25; }
.dial-lbl { font: 800 7.6px var(--ui); letter-spacing: .3px; fill: #1a0d14; opacity: .55; transition: opacity .3s; }
.dial-lbl.on { opacity: 1; }
.dial-brand { font: 11px var(--display); fill: #c2203f; }
.dial-sub { font: 800 5.4px var(--ui); letter-spacing: 1.3px; fill: #8a7680; }
.dial-lcd { font: 21px var(--mono); fill: var(--lime); }
.dial-cracks { opacity: 0; transition: opacity .3s; }
.cracked .dial-cracks { opacity: .85; }
.needle {
  transform-box: view-box;
  transform-origin: 120px 120px;
  transition: transform 1s cubic-bezier(.34, 1.56, .64, 1);
}
.needle-wrap { transform-box: view-box; transform-origin: 120px 120px; }
.pinned .needle-wrap { animation: jitter .14s linear infinite; }
.prodded .needle-wrap { animation: boing .7s ease-out; }
.prodded .dial { animation: squish .25s ease-out; }

/* ── Chart ── */
.chart-card { padding: 16px 14px 10px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 4px 6px; }
.card-head h3 { font-size: 1.05rem; font-weight: 800; }
.card-head .hint { font-family: var(--hand); font-size: 1.15rem; color: var(--gold); line-height: 1; }
.chart { position: relative; touch-action: pan-y; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.band-lbl { font: 700 11px var(--ui); opacity: .4; transition: opacity .3s; }
.band-lbl.on { opacity: 1; }
.x-lbl { font: 700 11px var(--ui); fill: var(--muted); }
.curve { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.curve-glow { fill: none; stroke: var(--pink); stroke-width: 11; stroke-opacity: .28; stroke-linecap: round; filter: blur(3px); }
.dot { stroke: var(--bg); stroke-width: 2.5; transition: r .15s; }
.dot.peak { stroke: var(--ink); stroke-width: 2.5; animation: peak-pulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; cursor: pointer; }
.dot.hover { stroke: var(--ink); stroke-width: 3; }
.scrawl { font: 700 19px var(--hand); fill: var(--gold); }
.scribble { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }

.chart-tip {
  position: absolute;
  top: 0;
  z-index: 3;
  background: var(--paper);
  color: var(--paper-ink);
  border: 2px solid var(--slab);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--slab);
  padding: 8px 12px;
  font-size: .82rem;
  max-width: 240px;
  pointer-events: none;
}
.tip-time { font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #7a5d4f; }
.tip-zone { font-family: var(--display); font-size: 1.2rem; -webkit-text-stroke: .6px var(--paper-ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--paper-ink); }
.tip-zone span { font-family: var(--ui); font-weight: 800; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-ink); -webkit-text-stroke: 0; text-shadow: none; }
.tip-drinks { margin-top: 2px; }
.tip-bac { color: #7a5d4f; font-size: .74rem; margin-top: 2px; }

/* ── Slips: odds + receipt ── */
.slips { display: grid; grid-template-columns: 1fr; gap: 22px; }
.slip {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--mono);
  font-size: 1.25rem;
  line-height: 1.15;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  margin-bottom: 12px;
}
.slip::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 12px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 12px repeat-x,
    linear-gradient(225deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 12px repeat-x;
}

.odds { transform: rotate(.5deg); overflow: hidden; }
.slip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #c2203f;
  color: #fff;
  padding: 8px 14px 6px;
  border-radius: 6px 6px 0 0;
}
.slip-brand { font-size: 1.6rem; letter-spacing: .04em; }
.slip-sub { font-size: 1.05rem; opacity: .85; }
.odds-list { list-style: none; padding: 8px 14px 4px; }
.odds-list li { display: flex; align-items: baseline; gap: 6px; padding: 5px 4px; border-radius: 4px; }
.odds-list li.nap { background: #ffe58a; }
.o-icon { font-family: var(--ui); font-size: 1rem; }
.o-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nap-tag { font-weight: 400; background: #c2203f; color: #fff; padding: 0 5px; border-radius: 3px; font-size: 1rem; margin-left: 4px; }
.o-dots { flex: 1; min-width: 10px; border-bottom: 2px dotted rgba(42, 26, 18, .35); transform: translateY(-5px); }
.o-price { font-size: 1.55rem; color: #c2203f; font-variant-numeric: tabular-nums; }
.slip-foot { font-size: 1rem; color: #7a5d4f; padding: 6px 18px 16px; line-height: 1.15; }

.receipt { transform: rotate(-.6deg); padding: 18px 18px 14px; font-size: 1.15rem; }
.rc-head { text-align: center; }
.rc-pub { font-size: 1.9rem; letter-spacing: .06em; }
.rc-tag { font-size: .95rem; color: #7a5d4f; }
.rc-rule { border-top: 2px dashed rgba(42, 26, 18, .45); margin: 10px 0; }
.rc-rule.double { border-top-style: double; border-top-width: 5px; }
.rc-round { margin-bottom: 8px; }
.rc-row { display: flex; justify-content: space-between; gap: 10px; }
.rc-row span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rc-time { color: #7a5d4f; }
.rc-state { border-left: 7px solid var(--z); padding-left: 6px; margin-top: 2px; color: #4a3226; }
.rc-row.muted { color: #9a8072; }
.rc-note { font-size: 1rem; color: #7a5d4f; }
.rc-big { font-size: 1.7rem; margin: 4px 0; }
.rc-thanks { text-align: center; font-size: 1.05rem; margin: 6px 0 10px; }
.barcode {
  display: block;
  width: 72%;
  height: 46px;
  margin: 0 auto;
  border: 0;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg,
    var(--paper-ink) 0 2px, transparent 2px 4px,
    var(--paper-ink) 4px 7px, transparent 7px 8px,
    var(--paper-ink) 8px 9px, transparent 9px 12px,
    var(--paper-ink) 12px 13px, transparent 13px 15px);
  position: relative;
  overflow: hidden;
}
.barcode::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -10%;
  width: 6px;
  background: #ff2d2d;
  box-shadow: 0 0 10px 3px rgba(255, 45, 45, .8);
  opacity: 0;
}
.scanning .barcode::after { animation: scan .6s ease-in-out; }

/* ── Share row ── */
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-row .btn-big { flex: 1 1 100%; }
.share-row .btn:not(.btn-big) { flex: 1; }

/* ── Footer ── */
.foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 20px 110px;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.6;
}
.disclaimer { cursor: default; }
.disclaimer strong { color: #ff7a7a; }
.credit { margin-top: 10px; }

/* ── Sticky mini-meter ── */
.minimeter {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 2px solid var(--z);
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--slab), 0 0 24px color-mix(in srgb, var(--z) 35%, transparent);
  transform: translate(-50%, 160%);
  transition: transform .35s cubic-bezier(.3, 1.3, .5, 1), border-color .4s;
  max-width: calc(100vw - 24px);
}
.minimeter.show { transform: translate(-50%, 0); }
.mm-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .55rem .6rem .55rem 1rem;
  background: none;
  border: 0;
  white-space: nowrap;
  min-width: 0;
}
.mm-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--z); box-shadow: 0 0 10px var(--z); flex: none; }
.mm-label { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mm-zone { font-family: var(--display); font-size: 1.1rem; color: var(--z); }
.mm-done { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.mm-time { font-size: .74rem; color: var(--muted); }
.mm-share {
  border: 0;
  border-left: 2px solid var(--line);
  background: none;
  padding: 0 .9rem 0 .7rem;
  font-size: 1.15rem;
}

/* ── Toasts ── */
.toasts[popover], .fx-layer[popover] {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}
.toasts[popover]:not(:popover-open), .fx-layer[popover]:not(:popover-open) { display: none; }
.toasts {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(440px, calc(100vw - 24px));
  height: auto;
  inset: auto auto 84px 50%;
  pointer-events: none;
}
body:has(dialog[open]) .toasts { inset: 14px auto auto 50%; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--paper);
  color: var(--paper-ink);
  border: 2px solid var(--slab);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--slab), 0 16px 40px rgba(0, 0, 0, .45);
  padding: 12px 14px;
  animation: toast-in .35s cubic-bezier(.3, 1.4, .5, 1);
}
.toast.leaving { animation: toast-out .25s ease-in forwards; }
.toast.egg { background: var(--gold); }
.toast.warn { background: #ffd0c8; }
.toast-icon { font-size: 1.6rem; line-height: 1.1; }
.toast-text { flex: 1; min-width: 0; }
.toast-title { font-weight: 800; font-size: .98rem; }
.toast-body { font-size: .9rem; line-height: 1.4; }
.toast-action {
  align-self: center;
  border: 2px solid var(--slab);
  background: var(--slab);
  color: var(--paper);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-weight: 800;
  font-size: .82rem;
}

/* ── FX ── */
.fx-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; overflow: hidden !important; }
.flyer { position: absolute; left: 0; line-height: 1; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.flyer .spin { display: inline-block; animation: spin 1.2s linear infinite; }
.taxi { position: relative; display: inline-block; transform: scaleX(-1); }
.taxi-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) scaleX(-1);
  font: 700 14px var(--ui);
  background: var(--paper);
  color: var(--paper-ink);
  border: 2px solid var(--slab);
  border-radius: 12px;
  padding: 3px 10px;
  white-space: nowrap;
}
.water { display: inline-block; animation: bob 1s ease-in-out infinite; }
.confetto { position: absolute; width: 9px; height: 13px; border-radius: 2px; }
.float-up {
  position: absolute;
  font: 800 1rem var(--ui);
  color: var(--gold);
  text-shadow: 0 2px 0 var(--slab);
  white-space: nowrap;
}

/* ── Dialogs ── */
dialog.sheet {
  margin: auto;
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--slab);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--slab), 0 30px 80px rgba(0, 0, 0, .6);
  padding: 0;
  overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .3s cubic-bezier(.3, 1.3, .5, 1); }
dialog.sheet::backdrop { background: rgba(10, 4, 8, .72); backdrop-filter: blur(3px); }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 2px solid var(--line);
}
.sheet-head h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--gold); line-height: 1.1; }
.bar-body { overflow-y: auto; padding: 6px 18px 18px; flex: 1; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 18px; border-top: 2px solid var(--line); font-size: .92rem; color: var(--ink-2); }

.bar-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 18px 2px;
  flex: none;
}
.bar-tabs::-webkit-scrollbar { display: none; }
.bar-tab {
  flex: none;
  border-radius: 999px;
  padding: .3rem .75rem;
  font-weight: 800;
  font-size: .8rem;
  background: var(--card-2);
  border: 2px solid var(--line);
  color: var(--ink-2);
}
.bar-tab:hover { border-color: var(--gold); color: var(--ink); }
.bar-body { position: relative; }
.bar-section { margin-top: 14px; }
.bar-section h4 { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bar-section h4 span { font-family: var(--hand); font-size: 1.15rem; letter-spacing: 0; text-transform: none; color: var(--gold); margin-left: 6px; }
.bar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.bar-tile { position: relative; }
.tile-add {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  background: var(--card-2);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 12px 8px 10px;
  box-shadow: 0 4px 0 var(--slab);
  transition: transform .08s, box-shadow .08s, border-color .15s, background .15s;
}
.tile-add:hover { border-color: var(--gold); }
.tile-add:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--slab); }
.bar-tile.has .tile-add { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--card-2)); }
.tile-glass .glass { width: 42px; height: 58px; display: block; color: var(--ink); }
.tile-glass.wiggle { animation: wiggle .45s ease-out; }
.tile-name { font-weight: 800; font-size: .84rem; line-height: 1.15; }
.tile-meta { font-size: .72rem; color: var(--muted); font-weight: 600; }
.tile-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1407;
  border: 2px solid var(--slab);
  font-weight: 800;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: pop-in .25s cubic-bezier(.3, 1.6, .5, 1);
}
.tile-minus {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--slab);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.eggs-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 12px; }
.egg-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--muted);
}
.egg-card.found { border: 2px solid var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); color: var(--ink); }
.egg-card-icon { grid-row: span 2; font-size: 1.5rem; }
.egg-card-name { font-weight: 800; font-size: .92rem; }
.egg-card-msg { font-size: .8rem; line-height: 1.35; color: var(--muted); }
.eggs-reset { margin-top: 16px; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .8rem; }

/* ═════════════ The drunker you plan, the drunker the page ═════════════ */
body[data-zone="2"] { --sway: .6deg; }
body[data-zone="3"] { --sway: 1.2deg; }
body[data-zone="4"] { --sway: 2deg; }
body[data-zone="5"] { --sway: 3deg; }
body[data-zone="6"] { --sway: 4deg; }

body[data-zone="4"] .zone-name,
body[data-zone="5"] .zone-name,
body[data-zone="6"] .zone-name { animation: wobble 2.8s ease-in-out infinite; }

body[data-zone="5"] .zone-name,
body[data-zone="6"] .zone-name { animation: wobble 2.2s ease-in-out infinite, double-vision 3s ease-in-out infinite; }

body[data-zone="6"] .hero-dial { animation: tremble 4s ease-in-out infinite; }

/* Possible death: half the sign goes out, a ghost leaves the thermometer */
body[data-zone="7"] .sign { animation: none; }
body[data-zone="7"] .sign-word:first-child { color: #4a3540; text-shadow: none; }
body[data-zone="7"] .hero-dial::after {
  content: '👻';
  position: absolute;
  left: 50%;
  top: 30%;
  font-size: 2rem;
  animation: ghost 3.5s ease-in infinite;
  pointer-events: none;
}

/* ── Egg modes ── */
body.lockin::after {
  background:
    radial-gradient(ellipse 60% 50% at 50% 35%, rgba(255, 170, 60, .16), transparent 70%),
    radial-gradient(ellipse at 50% 40%, rgba(20, 8, 4, .5), rgba(5, 2, 1, .94) 80%);
}
body.lockin .sign { color: #ffe6b8; text-shadow: 0 0 2px #fff, 0 0 10px #ff9a3c, 0 0 26px #ff7a1a, 0 0 46px #ff6a00; }
body.lockin .top::before,
body.lockin .top::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: clamp(18px, 6vw, 90px);
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #5a0b18 0 10px, #7d1426 10px 18px, #4a0812 18px 26px);
  box-shadow: 0 0 30px rgba(0, 0, 0, .7);
  animation: curtain .8s ease-out;
}
body.lockin .top::before { left: 0; }
body.lockin .top::after { right: 0; }

body.carpet-mode::before { background-image: var(--carpet-loud); }
body.carpet-mode::after { opacity: .25; transition: opacity .6s; }

body.blackout .sign { animation: blackout 1.4s steps(1) forwards; }
body.queasy main { animation: queasy 1.6s ease-in-out; }

/* ── Keyframes ── */
@keyframes sway { 0%, 100% { transform: rotate(calc(var(--sway) * -1)); } 50% { transform: rotate(var(--sway)); } }
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: .25; }
}
@keyframes dangle {
  0% { transform: rotate(0); }
  35% { transform: rotate(118deg) translateY(4px); }
  55% { transform: rotate(72deg) translateY(4px); }
  72% { transform: rotate(98deg) translateY(4px); }
  86% { transform: rotate(84deg) translateY(4px); }
  100% { transform: rotate(90deg) translateY(4px); }
}
@keyframes blackout {
  0% { color: #4a3540; text-shadow: none; }
  15% { color: #ffe0ea; }
  25% { color: #4a3540; text-shadow: none; }
  70% { color: #4a3540; text-shadow: none; }
  100% { color: #ffe0ea; }
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes stamp-in { 0% { transform: scale(1.35) rotate(-4deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes stamp-down { 0% { transform: scale(2) rotate(-12deg); opacity: 0; } 100% { opacity: 1; } }
@keyframes ring {
  0% { transform: rotate(0); } 15% { transform: rotate(22deg); } 30% { transform: rotate(-20deg); }
  45% { transform: rotate(14deg); } 60% { transform: rotate(-10deg); } 80% { transform: rotate(4deg); } 100% { transform: rotate(0); }
}
@keyframes jitter { 0% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } 100% { transform: rotate(-1.5deg); } }
@keyframes boing {
  0% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } 100% { transform: rotate(0); }
}
@keyframes squish { 0% { transform: scale(1); } 40% { transform: scale(.96, 1.03); } 100% { transform: scale(1); } }
@keyframes peak-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes scan { 0% { left: -10%; opacity: 1; } 100% { left: 105%; opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wiggle { 0% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.1); } 55% { transform: rotate(9deg); } 80% { transform: rotate(-4deg); } 100% { transform: none; } }
@keyframes pop-in { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes wobble { 0%, 100% { transform: rotate(-1.2deg) translateX(0); } 50% { transform: rotate(1.4deg) translateX(3px); } }
@keyframes double-vision {
  0%, 100% { text-shadow: 0 3px 0 var(--slab), 0 0 0 transparent; }
  50% { text-shadow: 0 3px 0 var(--slab), 7px 2px 0 color-mix(in srgb, var(--z) 45%, transparent); }
}
@keyframes tremble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
@keyframes ghost {
  0% { transform: translate(-50%, 0) scale(.6); opacity: 0; }
  20% { opacity: .9; }
  100% { transform: translate(-30%, -120px) scale(1.1); opacity: 0; }
}
@keyframes curtain { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes queasy {
  0%, 100% { transform: none; filter: none; }
  25% { transform: skewX(2deg) rotate(.6deg); filter: hue-rotate(40deg) saturate(1.3); }
  50% { transform: skewX(-2deg) rotate(-.6deg); filter: hue-rotate(70deg); }
  75% { transform: skewX(1deg); filter: hue-rotate(30deg); }
}

/* ── Mobile ── */
@media (max-width: 900px) {
  main { display: flex; flex-direction: column; align-items: stretch; padding: 4px 16px 120px; gap: 16px; }
  .plan, .results { display: contents; }
  #results-h { order: 1; }
  .hero { order: 2; }
  #plan-h { order: 3; margin-top: 14px; }
  .punter { order: 4; }
  .presets-wrap { order: 5; }
  .rounds { order: 6; }
  .round-actions { order: 7; }
  .chart-card { order: 8; margin-top: 14px; }
  .slips { order: 9; }
  .share-row { order: 10; }

  .presets {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 2px 16px 6px;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent);
  }
  .presets::-webkit-scrollbar { display: none; }
  .preset { scroll-snap-align: start; }
}

@media (min-width: 1180px) {
  .slips { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 600px) {
  .top { padding: 16px 16px 4px; align-items: flex-start; gap: 10px; }
  .sign { font-size: clamp(1.55rem, 7.2vw, 2.4rem); }
  .tagline { font-size: .84rem; }
  .top-actions { flex-direction: column; align-items: flex-end; gap: 8px; }
  .egg-btn { padding: 3px 10px 3px 6px; }
  .egg-svg { width: 22px; height: 26px; }
  .icon-btn { width: 38px; height: 38px; font-size: 1rem; }
  .card { padding: 16px 14px; border-radius: 22px; }
  .round { padding: 12px 10px 10px 18px; }
  .round-no { display: none; }
  .drink-name { font-size: .9rem; }
  .round-foot { gap: 6px; }
  .round-foot .long { display: none; }
  .round-foot .chip-label { text-transform: capitalize; }
  .round-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
  .round-actions .btn { padding-inline: .5rem; font-size: .95rem; }
  .bell { width: 48px; height: 48px; }

  dialog.sheet {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
  }
  dialog.sheet[open] { animation: sheet-up .32s cubic-bezier(.3, 1.2, .5, 1); }
  .bar-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tile-add { padding: 10px 4px 8px; }
  .tile-name { font-size: .78rem; }
  .eggs-grid { grid-template-columns: 1fr; }
  .mm-time { display: none; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 380px) {
  .mm-done { display: none; }
}
@media (max-width: 340px) {
  .bar-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Motion off ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .sign, .flicker, .sign-q { animation: none !important; }
}
