:root{
  --cream:#F4F2EC; --green:#4DAA50; --forest:#235326; --ink:#293041;
  --orange:#EE7A16; --chilli:#AD1C22; --brick:#A84E1F; --jade:#34926D;
  --sand:#E4D8CF; --sage:#CDD2C2;
  --fr:'Fraunces',Georgia,serif; --la:'Lato',system-ui,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:var(--ink);
  font-family:var(--la);touch-action:none;overscroll-behavior:none;
  user-select:none;-webkit-user-select:none}
#app{position:fixed;inset:0;display:flex;align-items:center;justify-content:center}
#stage{display:block;background:var(--cream);touch-action:none}

/* ---------- screens ---------- */
.screen{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  background:var(--cream);padding:16px;z-index:20}
.screen.hidden{display:none}
.card{width:min(420px,92vw);max-height:96vh;overflow:auto;text-align:center;
  background:#fff;border:1px solid var(--sand);border-radius:16px;padding:22px 20px;
  box-shadow:0 8px 26px rgba(41,48,65,.10)}
.brandmark{display:block;width:66px;height:auto;margin:0 auto 10px}
.wordmark{font-family:var(--la);font-size:30px;font-weight:400;color:var(--green);line-height:1;
  text-align:center;margin-bottom:2px}
.wordmark b{font-weight:900}
.wordmark span{color:var(--orange);font-weight:900}
.tag{font-size:13px;color:var(--ink);margin:2px 0 18px}
h2{font-family:var(--fr);font-weight:900;color:var(--forest);margin:0 0 10px;font-size:28px}
.hint{font-size:12.5px;color:var(--ink);opacity:.8;margin:8px 0 12px;line-height:1.5}
.foot{font-size:11px;color:var(--ink);opacity:.55;margin:14px 0 0}

.btn{display:block;width:100%;margin:8px 0;padding:14px 16px;border-radius:10px;
  border:1.5px solid var(--forest);background:#fff;color:var(--forest);
  font-family:var(--la);font-weight:900;font-size:15px;letter-spacing:.4px;cursor:pointer}
.btn.primary{background:var(--green);border-color:var(--green);color:#fff}
.btn.ghost{border-color:var(--sand);color:var(--ink);font-weight:700}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.45}

#code-input{width:100%;padding:16px;font-family:var(--fr);font-weight:900;font-size:34px;
  text-align:center;letter-spacing:10px;text-transform:uppercase;color:var(--forest);
  border:2px solid var(--sand);border-radius:10px;margin-bottom:12px;background:var(--cream)}
#code-input:focus{outline:none;border-color:var(--green)}
#roomcode{font-family:var(--fr);font-weight:900;font-size:52px;letter-spacing:8px;
  color:var(--forest);margin:4px 0}
#roster{list-style:none;padding:0;margin:10px 0;font-size:13px;color:var(--ink)}
#roster li{padding:7px 0;border-bottom:1px solid var(--sand)}
#roster li b{color:var(--forest)}
/* ---------- the board ---------- */
.pills{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:8px 0}
.pill{font:900 10px/1 var(--la);letter-spacing:.05em;text-transform:uppercase;
  color:var(--forest);background:#FFFDF6;border:2.2px solid var(--forest);
  border-radius:999px;padding:7px 12px;cursor:pointer;transition:.14s}
.pill:hover{background:rgba(77,170,80,.14)}
.pill.on{background:var(--forest);color:#F5C542;border-color:var(--forest)}
.bbox{background:rgba(35,83,38,.06);border-radius:14px;padding:11px 12px;margin:10px 0 4px}
.blab{font:900 11px/1 var(--la);letter-spacing:.06em;text-transform:uppercase;
  color:var(--forest);margin:0 0 6px}
.brow{display:flex;gap:8px;align-items:stretch;margin-top:6px}
/* .btn carries width:100%, which under flex let the button eat the whole row
   and squeezed the name field down to a sliver */
.brow .tin{flex:1 1 auto;min-width:0}
.btn.sm{padding:9px 18px;font-size:13px;flex:0 0 auto;width:auto;margin:0}
.brank{font:900 12px/1.4 var(--la);color:var(--forest);margin:8px 0 0}
.brank.miss{color:var(--chilli)}
.board-card{max-width:520px}
.blist{list-style:none;margin:10px 0 4px;padding:0;display:flex;
  flex-direction:column;gap:5px;text-align:left}
.blist li{display:grid;grid-template-columns:26px 30px 1fr auto;align-items:center;
  gap:8px;background:#FFFDF6;border:2.2px solid rgba(41,48,65,.14);
  border-radius:11px;padding:6px 10px}
.blist li.me{border-color:var(--green);background:rgba(77,170,80,.10)}
.blist li:nth-child(1){border-color:#F5C542;background:#FFF9E6}
.brk{font:900 13px/1 var(--fr);color:var(--forest);text-align:center}
.bav{width:30px;height:30px;object-fit:contain}
.bnm{font:900 13px/1.15 var(--la);color:var(--ink);overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.bnm small{display:block;font:700 9px/1.3 var(--la);color:#7A808C;
  letter-spacing:.04em;text-transform:uppercase}
.bsc{font:900 14px/1 var(--fr);color:var(--forest);white-space:nowrap}
.bst{color:#E0A21C;letter-spacing:.5px}
/* This sheet has NO generic .hidden rule -- every element that hides itself
   needs its own. Without these three the results-card board box showed on the
   two-player card too, and "no scores yet" sat under a full leaderboard. */
#bd-empty.hidden,#over-board.hidden,#over-rank.hidden{display:none}

/* ---------- two on one keyboard ---------- */
:root{--p1:#1B6CC9;--p2:#C4550A}
.nrow{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 4px}
.nfield{display:flex;flex-direction:column;gap:5px;text-align:left}
.pick{display:flex;align-items:center;justify-content:space-between;gap:4px;
  background:#FFFDF6;border:2.5px solid var(--ink);border-radius:12px;
  padding:5px 6px;margin-top:6px}
.parrow{font:900 13px/1 var(--la);color:var(--forest);background:transparent;
  border:0;border-radius:8px;padding:8px 7px;cursor:pointer;transition:.12s}
.parrow:hover{background:rgba(77,170,80,.16)}
.parrow:active{transform:scale(.9)}
.pface{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1;
  min-width:0;overflow:hidden}
.pface img{width:46px;height:46px;object-fit:contain}
.pface span{font:900 10px/1 var(--la);letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:100%}
.pick.pk1{border-color:var(--p1)} .pick.pk2{border-color:var(--p2)}
.nlab{font:900 10px/1 var(--la);letter-spacing:.09em;text-transform:uppercase}
.n1{color:var(--p1)} .n2{color:var(--p2)}
.tin{font:700 15px/1 var(--la);color:var(--ink);background:#FFFDF6;
  border:2.5px solid var(--ink);border-radius:11px;padding:9px 11px;width:100%;
  box-sizing:border-box;outline:none}
.tin:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(77,170,80,.22)}
/* this screen carries two of everything, so it gets more room than the rest */
#scr-names .card{max-width:600px}
/* the fitter measures the wrapper's scrollHeight, and a child's top margin
   collapsing THROUGH the wrapper makes that measurement short -- which shows up
   as a scrollbar over content that visibly fits. flow-root stops the collapse.
   transform-origin has to match the other fitted cards or the scaled content
   drifts off the top of the card. */
#names-fit,#board-fit{display:flow-root;transform-origin:top center}
.keymap{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}
.kcol{display:flex;flex-direction:column;gap:6px;align-items:center;
  background:rgba(35,83,38,.055);border-radius:12px;padding:9px 6px}
.kcol b{font:900 10px/1 var(--la);letter-spacing:.08em;text-transform:uppercase}
/* the cross, the plus and the wide key all on ONE row. The keys shrink here so
   Player 2's Enter is not clipped off the right edge of the card. */
.krow{display:flex;align-items:center;gap:6px}
.kpad{display:flex;flex-direction:column;align-items:center;gap:2.5px}
.kpad span{display:flex;gap:2.5px}
.keymap kbd{font-size:9px;padding:3px 4.5px;min-width:7px}
/* the arrow glyphs render far smaller than a letter at the same size */
.kpad kbd{font-size:11px;padding:2.5px 4px;min-width:12px;line-height:1.05}
.kplus{font:900 14px/1 var(--la);color:#98A0AC;font-style:normal}
.kwide{min-width:46px}
.kcap{font:700 9.5px/1.3 var(--la);color:#6B7280;letter-spacing:.02em;
  white-space:nowrap}
kbd{font:900 9.5px/1 var(--la);color:var(--ink);background:#FFFDF6;
  border:1.8px solid var(--ink);border-bottom-width:3px;border-radius:5px;
  padding:3px 5px;min-width:8px;text-align:center;display:inline-block}

/* ---------- end of shift ---------- */
/* Overcooked shape: the verdict headline on top, the chef centred under it,
   then three big stars that land one at a time. No score headline — the stars
   are the result and the numbers are a footnote. */
.over-card{text-align:center;position:relative}
.omoney{font-family:var(--fr);font-weight:900;font-size:44px;line-height:1.05;color:var(--forest);margin:8px 0 2px}
.ostats{display:flex;justify-content:center;gap:10px;margin:10px auto 4px;max-width:360px}
.ostat{flex:1;background:#F4F7F2;border:1.5px solid rgba(35,83,38,.14);border-radius:12px;padding:10px 4px 8px}
.ostat b{display:block;font-family:var(--fr);font-weight:900;font-size:22px;line-height:1;color:var(--forest)}
.ostat span{display:block;font:900 9px/1 var(--la);letter-spacing:.14em;color:#8A9099;margin-top:5px;text-transform:uppercase}
.ochef{margin:2px 0 0;font:900 13px var(--la);color:var(--ink)}
.obadge{position:absolute;top:12px;right:12px;transform:rotate(9deg);background:#F5C542;color:var(--forest);
  border:2px solid #A9760B;border-radius:12px;padding:8px 12px;font:900 12px/1.2 var(--la);
  letter-spacing:.08em;box-shadow:0 3px 10px rgba(169,118,11,.35)}
.obadge.hidden{display:none}
.keyhint{margin:7px 0 0;font:700 12px/1.45 var(--la);color:#8A9099}
#over-title{font-family:var(--fr);font-size:clamp(34px,8vw,46px);font-weight:900;
  letter-spacing:-.01em;line-height:1.04;color:var(--chilli);margin:0 0 4px;text-transform:uppercase;
  /* reserve two lines so a one-word verdict and a two-word one give the same card height */
  min-height:2.08em;display:flex;align-items:center;justify-content:center;text-align:center}
#over-title.win{color:var(--forest)}
.chefwrap{position:relative;width:116px;height:98px;margin:2px auto 0;
  display:flex;align-items:flex-end;justify-content:center}
.chefwrap::before{content:'';position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 50% 54%,
    rgba(205,210,194,.62) 0%, rgba(205,210,194,.30) 44%, rgba(205,210,194,0) 70%)}
.over-chef{position:relative;display:block;width:88px;height:auto;
  transform-origin:50% 100%;
  filter:drop-shadow(0 7px 9px rgba(35,83,38,.30));
  animation:bob 3.1s ease-in-out infinite}
.starrow{display:flex;justify-content:center;align-items:center;gap:6px;margin:4px 0 12px;
  min-height:78px}
.starrow svg{width:clamp(58px,16vw,76px);height:auto;
  fill:#DED7C9;stroke:#BDB4A3;stroke-width:1;stroke-linejoin:round;
  opacity:0;transform:scale(.2)}
.starrow svg.lit{fill:#F5C542;stroke:#A9760B;
  filter:drop-shadow(0 3px 0 rgba(0,0,0,.10))}
.starrow svg.pop{animation:starpop .52s cubic-bezier(.2,1.7,.35,1) forwards}
@keyframes starpop{
  0%  {opacity:0;transform:scale(.2) rotate(-28deg)}
  55% {opacity:1;transform:scale(1.22) rotate(7deg)}
  100%{opacity:1;transform:scale(1) rotate(0deg)}
}
.record{margin:0 0 4px;font-size:11px;font-weight:900;letter-spacing:.14em;
  text-transform:uppercase;color:var(--ink);opacity:.45;min-height:1.2em}
.record.new{color:#B8860B;opacity:1}
#over-detail{margin:0 0 16px;font-size:12.5px;opacity:.62}
.btnrow{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.btnrow .btn{margin:8px 0 0}
@media (prefers-reduced-motion:reduce){
  .over-chef{animation:none}
  .record.new{animation:none}
  .starrow svg{opacity:1;transform:none}
  .starrow svg.pop{animation:none}
}
@media (prefers-reduced-motion:reduce){.over-chef{animation:none}.targetfill{transition:none}}

/* ---------- touch ---------- */
#touch{position:absolute;inset:0;z-index:15;pointer-events:none}
#touch.hidden{display:none}
#stick{position:absolute;left:14px;bottom:10px;width:104px;height:104px;border-radius:50%;
  background:rgba(41,48,65,.07);border:2px solid rgba(41,48,65,.13);pointer-events:auto}
#knob{position:absolute;left:29px;top:29px;width:46px;height:46px;border-radius:50%;
  background:rgba(35,83,38,.42)}
#buttons{position:absolute;right:14px;bottom:10px;display:flex;gap:12px;align-items:flex-end;
  pointer-events:auto}
.pad{border:none;border-radius:50%;color:#fff;font-family:var(--la);font-weight:900;
  font-size:14px;letter-spacing:.5px;cursor:pointer}
.pad.act{width:92px;height:92px;background:var(--green);font-size:16px;opacity:.88}
.pad.bin{width:62px;height:62px;background:var(--chilli);font-size:11px;opacity:.85}
.pad:active{filter:brightness(.9)}

#rotate{position:absolute;inset:0;z-index:40;background:var(--forest);color:var(--cream);
  display:flex;align-items:center;justify-content:center;font-weight:900;font-size:20px;
  text-align:center;padding:30px}
#rotate.hidden{display:none}


/* ---------- menu screen ---------- */
.menu-bg{
  flex-direction:column;
  background:
    radial-gradient(circle at 12% 18%, rgba(238,122,22,.16), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(52,146,109,.18), transparent 40%),
    radial-gradient(circle at 78% 88%, rgba(214,69,80,.14), transparent 45%),
    radial-gradient(circle at 22% 82%, rgba(245,197,66,.18), transparent 44%),
    radial-gradient(circle at 50% 40%, #FBFAF6, var(--cream) 70%);
  overflow:hidden;
}
.menu-bg::before{
  content:'';position:absolute;inset:-10%;pointer-events:none;opacity:.05;
  background-image:radial-gradient(circle, var(--forest) 1.6px, transparent 1.7px);
  background-size:26px 26px;
}
.menu-bg .card{
  position:relative;z-index:2;border-radius:22px;border:none;
  box-shadow:0 18px 50px rgba(35,83,38,.16), 0 3px 10px rgba(35,83,38,.08);
  padding:26px 22px 20px;
}
.menu-bg .wordmark{font-size:40px;letter-spacing:-.5px}
.menu-bg .tag{margin-bottom:20px;color:#5C6672}
/* ---------- how to play ---------- */
.steps2{counter-reset:s2;list-style:none;padding:0;margin:0 0 14px;text-align:left;
  display:flex;flex-direction:column;gap:10px}
.steps2 li{counter-increment:s2;position:relative;padding-left:32px;font-size:13px;
  line-height:1.5;color:var(--ink)}
.steps2 li::before{content:counter(s2);position:absolute;left:0;top:1px;width:21px;height:21px;
  border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;
  font-size:11px;font-weight:900;font-family:var(--la)}
.steps2 li b{font-weight:900;color:var(--forest)}
.tips{text-align:left;background:var(--cream);border:1px solid var(--sand);border-radius:10px;
  padding:12px 14px;margin-bottom:16px}
.tips p{margin:0 0 8px;font-size:12px;line-height:1.5;color:var(--ink)}
.tips p:last-child{margin-bottom:0}
.tips b{color:var(--forest)}

/* ---------- settings ---------- */
.setrow{display:flex;align-items:center;gap:12px;margin:6px 0 12px;
  font-size:13px;font-weight:700;color:var(--ink)}
.setrow span{flex:0 0 62px;text-align:left}
.setrow b{flex:0 0 42px;text-align:right;font-variant-numeric:tabular-nums;color:var(--forest)}
#volRange{flex:1 1 auto;accent-color:var(--green);height:22px}
.btn.tog{margin:6px 0}
.btn.tog.off{color:var(--ink);border-color:var(--sand);opacity:.6}

/* ---------- pause ---------- */
#pause{position:absolute;inset:0;z-index:38;display:grid;place-items:center;
  background:rgba(41,48,65,.62);backdrop-filter:blur(3px)}
#pause.hidden{display:none}
.pausebox{width:min(300px,84vw);background:#fff;border-radius:18px;padding:22px 20px;text-align:center;
  box-shadow:0 20px 50px rgba(23,24,28,.28)}
.pausebox h2{margin-bottom:14px}
/* The two round chrome buttons, anchored to the CANVAS so they cannot drift onto
   the letterbox. Chunky border, a solid drop edge that compresses when pressed —
   the same toy language as the counter art. */
/* Sized and placed as a PERCENTAGE OF THE CANVAS, not of the window: #field
   shrink-wraps the canvas, so 4.6% is the same number of game pixels at every
   window size and the buttons can never creep left over the ticket row. */
.rbtn{position:absolute;top:2.4%;width:clamp(36px,4.6%,72px);aspect-ratio:1;height:auto;
  border-radius:50%;border:3px solid var(--forest);background:var(--cream);color:var(--forest);
  display:grid;place-items:center;padding:0;cursor:pointer;pointer-events:auto;
  box-shadow:0 4px 0 rgba(35,83,38,.32), 0 7px 16px rgba(41,48,65,.20);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease}
.rbtn svg{width:58%;height:58%;display:block;fill:currentColor}
.rbtn:hover{transform:translateY(-2px);background:#fff}
.rbtn:active{transform:translateY(3px);
  box-shadow:0 1px 0 rgba(35,83,38,.32), 0 3px 8px rgba(41,48,65,.18)}
.rbtn .slash{opacity:0}
.rbtn.off{background:#EDE8DF;border-color:#B9B1A4;color:#8C8579}
.rbtn.off .w1,.rbtn.off .w2{opacity:0}
.rbtn.off .slash{opacity:1}
/* sound clears the screen overlays (z 20) and the pause box (z 38); pause does
   not, which is exactly why it is invisible on the menu with no JS to hide it */
#btnSound{right:1.3%;z-index:39}
#btnPause{right:6.8%;z-index:16}
@media (prefers-reduced-motion:reduce){ .rbtn{transition:none} }

/* left-handed: mirror the stick and the buttons */
body.lefty #stick{left:auto;right:22px}
body.lefty #buttons{right:auto;left:22px}

/* ---------- stars + share + reward ---------- */
.starrow{display:flex;justify-content:center;gap:6px;margin:2px 0 8px;font-size:26px;line-height:1}
.starrow span{color:var(--sand)}
.starrow span.lit{color:#F5C542;text-shadow:0 2px 0 rgba(0,0,0,.08)}
.reward{border:2px dashed var(--green);border-radius:12px;background:#F1F9F1;
  padding:12px 14px;margin:4px 0 12px}
.reward.hidden{display:none}
.reward-h{margin:0 0 4px;font-family:var(--fr);font-weight:900;font-size:15px;color:var(--forest)}
.reward-b{margin:0 0 6px;font-size:12.5px;line-height:1.45;color:var(--ink)}
.reward-c{margin:0 0 6px;font-family:'JetBrains Mono',ui-monospace,monospace;font-weight:700;
  font-size:13px;letter-spacing:.06em;color:var(--forest)}
.reward-f{margin:0;font-size:9px;line-height:1.4;color:var(--ink);opacity:.55}

/* ---------- How to Play, as a visual brief ---------- */
.card.wide{width:min(760px,94vw);text-align:left}
.card.wide h2,.card.wide .tag{text-align:center}
.howto h3{font-family:var(--la);font-weight:900;font-size:15px;color:var(--forest);
  margin:0 0 6px;letter-spacing:.01em}
.howto p{font-size:13.5px;line-height:1.55;margin:6px 0 0;color:var(--ink)}
.howto p.tiny{font-size:12px;opacity:.72;margin-top:5px}
.horder{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px;
  margin:0 0 10px;font-size:11px;font-weight:900;letter-spacing:.03em;color:var(--ink)}
.horder b{display:inline-block;min-width:15px;height:15px;line-height:15px;margin-right:4px;
  border-radius:50%;background:var(--forest);color:#fff;font-size:9px;text-align:center}
.horder i{color:var(--sand);font-style:normal;font-size:14px}
.horder b.g{background:var(--jade);color:#fff}
.horder span.g{color:var(--jade)}
.hkeys{margin:14px 0 4px;text-align:center;font-size:13px;color:var(--ink);opacity:.75;
  border-top:1px solid var(--sand);padding-top:12px}
.hkeys b{color:var(--forest)}
.hstep{display:flex;gap:14px;align-items:flex-start;padding:14px 0;
  border-top:1px solid var(--sand)}
.hstep:first-of-type{border-top:0;padding-top:4px}
/* ONE SCREEN. Steps 1 and 2 sit side by side and step 3 runs across the bottom,
   which is what turns five stacked bands into two and kills the scrollbar. */
.hsteps{display:grid}
@media (min-width:740px){
  .hsteps{grid-template-columns:1fr 1fr;column-gap:26px}
  .hsteps .hstep:nth-child(1),.hsteps .hstep:nth-child(2){border-top:0;padding-top:2px}
  .hsteps .hstep:nth-child(3){grid-column:1 / -1}
}
/* five wells have to stay on ONE line inside half a card, or step 2 grows a row
   and step 1 is left staring at the gap */
@media (min-width:740px){ .hsteps .well{width:52px;height:42px} .hsteps .wells{gap:6px} }
/* Back on the left, the primary CTA on the right, neither one full width.
   On a phone they stack again, CTA on top. .solo = only one button: centre it. */
.hbtns{display:flex;justify-content:space-between;align-items:stretch;gap:12px;margin-top:12px}
.hbtns .btn{width:auto;margin:0;padding:14px 28px;min-width:140px}
.hbtns .btn.primary{min-width:230px}
.hbtns.solo{justify-content:center}
@media (max-width:519px){ .hbtns{flex-direction:column-reverse}
  .hbtns .btn{width:100%;min-width:0} }
/* the fitter scales these; origin has to be the top or the card jumps */
#how-fit,#chef-fit{transform-origin:top center}
.hnum{flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:var(--forest);
  color:#fff;font:900 13px/26px var(--la);text-align:center;margin-top:1px}
.hbody{flex:1 1 auto;min-width:0}

/* the mock ticket, built from the same parts the real one has */
.tkt{width:190px;background:#FFFDF6;border:2.5px solid var(--ink);border-radius:7px;
  padding:5px 8px 6px;position:relative;overflow:hidden;margin:8px 0 2px}
.tkt::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--tint)}
.tkt-top{display:flex;justify-content:space-between;align-items:baseline;padding-left:8px}
.tkt-top b{font:900 10px/1 var(--la);color:var(--forest)}
.tkt-top u{text-decoration:none;font:900 7px/12px var(--la);letter-spacing:.08em;color:#fff;
  background:var(--jade);border-radius:6px;padding:0 7px;display:inline-block}
.tkt-name{padding-left:8px;margin-top:4px;font:900 10px/1 var(--la);color:var(--forest)}
.tkt-top i{font:900 9px/1 var(--la);color:var(--orange);font-style:normal}
.tkt-row{display:flex;padding-left:8px;margin-top:3px}
.tkt-row span{flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:1px}
.tkt-row img{height:20px;width:auto;object-fit:contain}
.tkt-row em{font:900 8px/1 var(--la);font-style:normal;color:rgba(41,48,65,.72)}
.tkt-row em.hot{color:var(--orange)}
.tkt-bar{margin:5px 0 0 8px;height:4px;border-radius:2px;background:#fff;
  border:1.4px solid var(--ink);overflow:hidden}
.tkt-bar i{display:block;height:100%;width:62%;background:var(--green)}

/* wells, showing the order-colour ring */
.wells{display:flex;gap:7px;margin:9px 0 2px;flex-wrap:wrap}
.well{width:52px;height:40px;border:2.5px solid var(--ink);border-radius:6px;background:#fff;
  display:grid;place-items:center;position:relative}
.well img{max-width:80%;max-height:78%;object-fit:contain}
.well.lit{box-shadow:0 0 0 4px #2E7BC4;border-color:var(--ink)}
.well.lit.b{box-shadow:0 0 0 4px #C41E6B}

/* the three protein routes */
.routes{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:9px}
.route{border:1px solid var(--sand);border-radius:10px;padding:10px 11px;background:#FCFBF7}
.route.warn{border-color:#E7C9A8;background:#FDF8F1}
.route img.ri{display:block;height:34px;width:auto;margin:0 auto 6px}
/* direct child only — an inline <b> inside the paragraph was inheriting the
   centred block label style and breaking mid-sentence onto its own line */
.route > b{display:block;font:900 11px/1 var(--la);letter-spacing:.06em;color:var(--forest);
  text-align:center;margin-bottom:4px}
.route p b{color:var(--brick,#A84E1F)}
.route p{font-size:12.5px;line-height:1.5;margin:0}

/* ---------- 3 · 2 · 1 ---------- */
#countdown{position:absolute;inset:0;z-index:18;display:grid;place-items:center;
  background:rgba(24,43,31,.40);
  pointer-events:none;font-family:var(--fr);font-weight:900;
  font-size:clamp(90px,22vw,190px);color:#fff;line-height:1;
  text-shadow:0 6px 0 rgba(35,83,38,.85),0 12px 30px rgba(0,0,0,.35)}
#countdown.hidden{display:none}
#countdown.pop{animation:cpop .5s cubic-bezier(.2,1.5,.4,1) both}
@keyframes cpop{0%{transform:scale(.45);opacity:0}45%{transform:scale(1.12);opacity:1}
  100%{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){#countdown.pop{animation:none}}

/* ---------- the game field: overlays hug the canvas, not the window ---------- */
#field{position:relative;line-height:0;font-size:0}
#field>#touch,#field>#countdown{position:absolute;inset:0}
.pausebtn{position:absolute}

/* file:// warning — the music silently does not load and nothing said so */
#filewarn{position:absolute;top:0;left:0;right:0;z-index:45;display:flex;gap:10px;
  align-items:center;justify-content:center;padding:9px 44px 9px 16px;
  background:#7A4B12;color:#FFF3DF;font:400 13px/1.45 var(--la);text-align:center}
#filewarn.hidden{display:none}
#filewarn b{font-weight:900;color:#FFD79A}
#filewarn button{position:absolute;right:8px;top:50%;transform:translateY(-50%);
  width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.14);
  color:#FFF3DF;font-size:19px;line-height:1;cursor:pointer}

/* `.howto p` sets colour and beats a bare `.lvpill` on specificity, which is why
   this rendered as dark ink on dark green. Match the element, not just the class. */
.howto p.lvpill, .lvpill{display:block;width:max-content;margin:0 auto 8px;
  padding:7px 20px;border-radius:999px;background:var(--forest);color:#F5C542;
  font:900 14px/1.3 var(--la);letter-spacing:.14em;text-transform:uppercase}
/* the title is the screen: Fraunces, nearly poster-sized. Both faces of this
   screen get it -- Before you start pre-shift, How to Play from the menu. */
#how-title{font-size:clamp(34px,4.6vw,44px);line-height:1.06;margin:4px 0 8px}
#how-fit{position:relative}
.howfish{position:absolute;top:7px;right:12px;width:52px;height:auto}
@media (max-width:700px){ .howfish{width:40px;right:8px} }

/* ---------- the brief: two green panels ----------
   No numbered badges: the two boxes ARE the "there are only two things"
   message. The picture column is a FIXED 118px slot so PAN, TORCH and BIN all
   start their words at the same x -- it was flex:auto before, and at some
   window widths the pan photos ran under the text. */
.hpanel{background:#EAF3EA;border:2px solid rgba(35,83,38,.16);border-radius:16px;
  padding:13px 15px 14px;margin:12px 0 0;text-align:left}
.hpanel .ph{margin:0 0 11px;font:900 18px/1.25 var(--la);color:var(--forest);
  text-align:left}
.hseq{display:inline-block;margin-left:9px;padding:4px 11px;border-radius:999px;
  background:var(--forest);color:#F5C542;font:900 10px/1.2 var(--la);
  letter-spacing:.08em;text-transform:uppercase;vertical-align:2.5px}
.hpanel .hsub2{margin:0 0 10px}
.hpanel .hbig{margin:12px 0 1px}
/* the level pill, sized to sit as wide as the title under it */
.howto p.lvpill, .lvpill{font-size:17px;padding:9px 26px;min-width:310px;
  max-width:92%;text-align:center;box-sizing:border-box}
/* 310px = a shade wider than both title texts ("How to Play" runs 230px,
   "Before you start" 302px at 44px Fraunces) */
/* the picture column */
.crow .cimgs{flex:0 0 118px;display:flex;justify-content:center;align-items:center;
  gap:6px;align-self:center}
.crow .cimgs img{max-height:44px;max-width:55px;width:auto;height:auto;
  object-fit:contain;display:block}
.crow b.bad{color:var(--chilli);font-weight:900;letter-spacing:.03em}
@media (max-width:700px){ .hseq{display:block;width:max-content;margin:6px 0 0} }

/* ---------- the brief: two sections ---------- */
.hsec{display:flex;align-items:center;gap:9px;margin:14px 0 2px;
  border-top:1px solid var(--sand);padding-top:14px}
.hsec:first-of-type{border-top:0;padding-top:2px}
.snum{flex:0 0 auto;width:23px;height:23px;border-radius:7px;background:var(--forest);
  color:#fff;font:900 13px/23px var(--la);text-align:center}
.hsec h3{margin:0;font:900 16px/1.2 var(--la);color:var(--forest)}
.hsub2{margin:6px 0 0 32px;font-size:13px;line-height:1.5;color:var(--ink);opacity:.8}
.hsub2 b{opacity:1;color:var(--forest)}
/* pan states side by side, torch across the bottom with its own meter */
/* ONE cooking section, two rows, picture beside the words. Two stacked cards
   plus a separate torch strip was three blocks for what is really one idea:
   put the salmon in, take it out at the right moment. */
.cook1{display:flex;flex-direction:column;gap:8px;margin:10px 0 2px}
.crow{display:flex;align-items:center;gap:12px;text-align:left;
  border:1.5px solid var(--sand);border-radius:12px;background:#FCFBF7;padding:9px 12px}
.cimgs{display:flex;gap:5px;flex:0 0 auto;align-items:flex-end}
.cimgs img{height:46px;width:auto;object-fit:contain;display:block}
.crow>.ti{height:48px;width:auto;flex:0 0 auto}
.crow .tbody{flex:1 1 auto;min-width:0}
.crow p{margin:0;font-size:12.5px;line-height:1.45;color:var(--ink)}
.crow p+.meter{margin-top:6px}
.crow b.good{color:var(--green);font-weight:900;letter-spacing:.03em}
/* the brief names an ACTION, never a key: Space is player one's, Enter is
   player two's, and a phone has neither */
kbd.act{background:var(--forest);color:#F5C542;border-color:var(--forest);
  letter-spacing:.05em}
.ck{border:1.5px solid var(--sand);border-radius:12px;background:#FCFBF7;padding:11px 12px 12px;
  text-align:center;min-width:0}
.ck.warn{border-color:#E7C9A8;background:#FDF8F1}
.ck img{display:block;height:62px;width:auto;margin:0 auto 6px;object-fit:contain}
.ck b{display:block;font:900 11px/1.2 var(--la);letter-spacing:.05em;margin-bottom:5px}
.ck b.good{color:var(--green)}
.ck b.bad{color:var(--brick)}
.ck p{margin:0;font-size:12px;line-height:1.45;color:var(--ink)}
.ck.tor{grid-column:1 / -1;display:flex;align-items:center;gap:14px;text-align:left;
  border-color:#BFD8E6;background:#F6FAFC}
.ck.tor img.ti{height:52px;margin:0;flex:0 0 auto}
.ck.tor .tbody{flex:1 1 auto;min-width:0}
.ck.tor b{color:var(--forest);margin-bottom:7px}
.meter{position:relative;height:15px;border-radius:8px;background:#EFE9DE;
  border:1.5px solid var(--ink);overflow:hidden}
.meter .zone{position:absolute;top:0;bottom:0;left:60%;width:32%;background:var(--green)}
.meter .mark{position:absolute;top:-2px;bottom:-2px;left:75%;width:3px;background:var(--ink)}
.mlab{display:grid;grid-template-columns:60% 32% 8%;margin-top:4px;
  font:900 9.5px/1.3 var(--la);color:var(--ink);opacity:.6}
.mlab span:nth-child(2){text-align:center;opacity:1}
.mlab span:nth-child(3){text-align:right}
.mlab .g{color:var(--green)}
@media (max-width:660px){ .crow{flex-direction:column;text-align:center;gap:8px}
  .crow .tbody{width:100%} }

/* ---------- the brief, cut to one strip and two lines ----------
   Three steps of prose was a wall nobody reads before a 3-minute game. The
   sequence IS the game, so the sequence is the whole screen. */
.flow{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;list-style:none;
  margin:20px 0 2px;padding:0}
.flow li{position:relative;display:flex;flex-direction:column;align-items:center;
  text-align:center;min-width:0;border:1.5px solid var(--sand);border-radius:12px;
  padding:19px 4px 10px;background:#FCFBF7}
.flow li.last{border-color:#BFE3CC;background:#F4FAF5}
.fn{position:absolute;top:-11px;left:50%;transform:translateX(-50%);
  width:22px;height:22px;border-radius:50%;background:var(--forest);color:#fff;
  font:900 12px/22px var(--la);text-align:center}
.flow li.last .fn{background:var(--jade)}
.fpic{height:46px;display:flex;align-items:flex-end;justify-content:center;gap:3px}
.fpic img{max-height:46px;max-width:100%;width:auto;object-fit:contain}
.fpic.two img{max-height:40px;max-width:47%}
.flow b{display:block;margin-top:8px;font:900 10.5px/1.2 var(--la);
  letter-spacing:.03em;color:var(--forest)}
.flow em{display:block;margin-top:4px;font-style:normal;font-size:9px;line-height:1.35;
  color:var(--ink);opacity:.58}
.hbig{margin:14px 0 0;text-align:center;font-size:15px;line-height:1.5;color:var(--ink)}
.hbig b{color:var(--forest)}
kbd{display:inline-block;padding:2px 9px;border-radius:7px;background:var(--forest);
  color:#fff;font:900 13px/1.4 var(--la)}
.hsmall{margin:9px auto 0;max-width:620px;text-align:center;font-size:13px;
  line-height:1.55;color:var(--ink);opacity:.82}
.hsmall b{opacity:1;color:var(--brick)}
@media (max-width:660px){ .flow{grid-template-columns:repeat(4,1fr)} }
@media (max-width:380px){ .flow{grid-template-columns:repeat(3,1fr)} }

/* ---------- Select your PokeGeng ---------- */
.chefsel .geng{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:16px 0 4px}
@media (max-width:660px){ .chefsel .geng{grid-template-columns:repeat(3,1fr)} }
@media (max-width:400px){ .chefsel .geng{grid-template-columns:repeat(2,1fr)} }
.gcard{-webkit-appearance:none;appearance:none;display:flex;flex-direction:column;
  align-items:center;cursor:pointer;border:2px solid var(--sand);border-radius:14px;
  background:#FCFBF7;padding:12px 8px 13px;font-family:var(--la);text-align:center;
  transition:transform .16s ease,border-color .16s ease,background .16s ease}
/* fixed box, or five mascots of five different heights push five name rows to
   five different places and the row stops reading as a row */
.gcard img{width:100%;max-width:78px;height:clamp(56px,7vw,84px);object-fit:contain;
  object-position:bottom;margin-bottom:6px;filter:drop-shadow(0 3px 5px rgba(41,48,65,.16))}
.gcard b{font:900 14px/1 var(--la);letter-spacing:.08em;color:var(--forest)}
.gcard em{font:900 9px/1.3 var(--la);font-style:normal;letter-spacing:.09em;
  color:rgba(41,48,65,.5);margin:3px 0 6px}
.gcard span{font-size:11.5px;line-height:1.42;color:var(--ink);opacity:.86}
.gcard:hover{transform:translateY(-3px);border-color:var(--green);background:#fff}
.gcard.picked{border-color:var(--green);background:#F3F8F1;transform:translateY(-3px);
  box-shadow:0 7px 18px rgba(77,170,80,.22)}
.gcard.picked b{color:var(--green)}
.chefsel #chef-back{max-width:260px;margin:14px auto 0}

/* ---------- How to Play, enlarged for three steps ---------- */
.card.wide{width:min(820px,95vw)}
.howto h3{font-size:19px;margin-bottom:8px}
.howto p{font-size:15.5px;line-height:1.6}
.hstep{gap:18px;padding:20px 0}
  .hkeys{font-size:15px}
  .horder{font-size:12.5px;gap:7px}
  .horder b{min-width:18px;height:18px;line-height:18px;font-size:10px}
.hnum{flex:0 0 34px;width:34px;height:34px;font-size:17px;line-height:34px}
.tkt{width:250px;margin:12px 0 4px;padding:7px 10px 8px}
.tkt-top b{font-size:12.5px}
.tkt-top i{font-size:11.5px}
.tkt-row img{height:30px}
.tkt-row em{font-size:10px}
.tkt-bar{height:5px}
.wells{gap:10px;margin:12px 0 4px}
.well{width:74px;height:56px;border-radius:8px}
.routes{gap:14px;margin-top:12px;grid-template-columns:repeat(auto-fit,minmax(215px,1fr))}
.route{padding:14px 14px 15px}
.route img.ri{height:48px;margin-bottom:9px}
.route>b{font-size:13px;margin-bottom:6px}
.route p{font-size:14px;line-height:1.55}
