@charset "UTF-8";
:root{font-family:ui-rounded,"Hiragino Kaku Gothic ProN","Yu Gothic",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f6ead6;background:#14100d;font-synthesis:none;--ink:#f6ead6;--muted:#c2b3a0;--glass:#1a130ee0;--line:#ffffff24;--accent:#f4b64a;--accent-ink:#2a1602;--red:#ff7a5c;--green:#a8e09a}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{overscroll-behavior:none}
button,select{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0}button:disabled{cursor:default}
button:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
#app{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:54px minmax(0,1fr);height:100%;height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
.toolbar{display:flex;align-items:center;gap:14px;padding:0 18px;background:#17110d;border-bottom:1px solid var(--line);z-index:3}
.brand{display:flex;align-items:center;gap:8px;font-weight:850;font-size:16px;text-decoration:none;color:var(--ink);white-space:nowrap}
.brand-mark{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--accent);color:var(--accent-ink);font-weight:950;font-size:21px;font-style:italic}
.toolbar-rule{height:22px;width:1px;background:var(--line)}h1{font-size:15px;margin:0;font-weight:800;white-space:nowrap}
.toolbar-actions{margin-inline-start:auto;display:flex;align-items:center;gap:8px}
.icon-button{display:grid;place-items:center;min-width:42px;height:42px;border:1px solid var(--line);background:#ffffff0d;border-radius:12px;font-size:19px;font-weight:700}
.icon-button[aria-pressed=false]{opacity:.45;text-decoration:line-through}
.language-wrap select{height:42px;min-width:104px;border:1px solid var(--line);border-radius:12px;padding:0 10px;background:#241a12;font-size:12px}
.stage{position:relative;overflow:hidden;isolation:isolate;background:#080605}
.stage>canvas{display:block;width:100%;height:100%;touch-action:none;outline:none;user-select:none;-webkit-user-select:none}
.loading{position:absolute;inset:0;display:grid;place-items:center;background:#080605;color:var(--muted);font-weight:700;z-index:2;transition:opacity .5s}.loading.done{opacity:0;pointer-events:none}
/* what this scene is, what to do in it, and how it is going */
.top{position:absolute;top:10px;left:12px;right:12px;display:grid;gap:6px;justify-items:center;pointer-events:none;text-align:center}
.hint{margin:0;padding:7px 14px;border-radius:14px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:14.5px;font-weight:800;line-height:1.4;max-width:min(560px,100%);text-shadow:0 1px 2px #0008}
.feedback{position:absolute;left:50%;top:calc(var(--top,150px) + 8px);transform:translate(-50%,0) scale(.94);padding:10px 18px;border-radius:16px;background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);font-weight:900;font-size:16px;text-align:center;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;max-width:86%;line-height:1.4}
.feedback.show{opacity:1;transform:translate(-50%,0) scale(1)}.feedback.bad{color:#ffb7a3}.feedback.good{color:var(--green)}
.primary-button,.secondary-button{min-height:48px;padding:0 18px;border-radius:14px;font-weight:850;font-size:15px;touch-action:manipulation}
.primary-button{background:var(--accent);color:var(--accent-ink)}.secondary-button{background:#ffffff12;border:1px solid var(--line)}
.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:18px;background:radial-gradient(ellipse at center,#08060599 0%,#080605d9 100%);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);z-index:2}
.overlay.clear{background:linear-gradient(180deg,#08060500 38%,#080605d0 100%);backdrop-filter:none;-webkit-backdrop-filter:none;place-items:end center;pointer-events:none}.overlay.clear .panel{pointer-events:auto}
.overlay.clear .panel{width:min(400px,100%)}
.panel{width:min(460px,100%);max-height:100%;overflow:auto;padding:24px 24px 20px;border-radius:22px;background:#241a12f2;border:1px solid var(--line);box-shadow:0 24px 70px #000a;text-align:center}
.panel.result{padding:16px 20px 14px;background:#241a12ee}
.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--accent)}
h2{margin:8px 0 6px;font-size:30px;letter-spacing:-.02em}.panel.result h2{font-size:25px;margin:4px 0 0}.lead{margin:0 0 16px;font-size:15px;line-height:1.55;color:#eadfce}
.actions{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:12px}
.text-button{padding:4px 10px;min-height:30px;background:none;color:var(--muted);font-size:13px;font-weight:750;text-decoration:underline;text-underline-offset:4px;border-radius:10px}.text-button:hover{color:var(--ink)}
.fine-print{margin:8px 0 0;font-size:12px;color:var(--muted);line-height:1.5}.fine-print:empty,.record:empty{display:none}
.record{margin:6px 0 0;font-weight:800;color:var(--accent)}
.result-top{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:2px}
.result-score{display:flex;align-items:baseline;gap:6px;direction:ltr}.result-score strong{font-size:50px;letter-spacing:-.04em;line-height:1.05;font-variant-numeric:tabular-nums;color:var(--accent)}.result-score span{font-size:15px;color:var(--muted);font-weight:800}
#help-steps{text-align:start;margin:10px 0 0;padding-inline-start:20px;font-size:14px;line-height:1.6}#help-steps li{margin-bottom:4px}
.tips{text-align:start;margin:10px 0 0;padding-inline-start:20px;font-size:13px;line-height:1.6;color:var(--muted)}
/* The counter is the control. What is written on it: a name under every dish, and on a first game where to begin */
.top{justify-items:center}
.labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.dish-label-set{position:absolute;inset:0}
.labels span{position:absolute;left:0;top:0;padding:2px 8px;border-radius:9px;background:#0c0806d0;border:1px solid #ffffff1c;font-size:12.5px;font-weight:800;line-height:1.2;color:#f3e6d2;text-align:center;width:max-content;max-width:24.5vw;overflow-wrap:anywhere}
.ring{position:absolute;width:108px;height:108px;margin:-54px 0 0 -54px;border-radius:50%;border:4px solid var(--accent);box-shadow:0 0 22px #f4b64acc,inset 0 0 14px #f4b64a66;pointer-events:none;animation:beckon 1.2s ease-in-out infinite}
@keyframes beckon{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.12);opacity:.5}}
.coach{position:absolute;display:flex;align-items:center;gap:8px;padding:9px 8px 9px 16px;border-radius:18px;background:#2a1a0ef5;border:2px solid var(--accent);box-shadow:0 6px 24px #000a;font-size:15.5px;font-weight:850;line-height:1.35;width:max-content;max-width:min(78%,340px);text-align:start;z-index:1}
[dir=rtl] .coach{padding:9px 16px 9px 8px}
.coach button{flex:none;width:30px;height:30px;border-radius:50%;background:#ffffff14;color:var(--muted);font-size:18px;line-height:1}
.feedback{top:calc(var(--top,60px) + 10px);font-size:18px}
.result-top{justify-content:space-between;align-items:flex-start;gap:12px;margin-top:4px}.panel.result h2{margin:0;text-align:start;font-size:27px;line-height:1.22;letter-spacing:-.01em}
/* the verdict on the box: the thing the cook reads first */
.review{margin:8px 0 4px;font-size:15.5px;line-height:1.62;font-weight:700;color:#f6ead6;text-align:start}
.marks{display:grid;gap:5px;margin:8px 0 0;padding:0;list-style:none;text-align:start}
.marks li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:baseline;font-size:13.5px;font-weight:800;border-bottom:1px solid #ffffff14;padding-bottom:4px}
.marks li span{color:var(--muted);white-space:nowrap}.marks li em{font-style:normal;color:#f6ead6}.marks li b{font-variant-numeric:tabular-nums;direction:ltr;color:var(--accent);white-space:nowrap}.marks li b i{font-style:normal;color:var(--muted);font-weight:700;margin-inline-start:2px}.marks li.low b{color:#ffb7a3}.marks li.low em{color:#ffd9cf}
@media (max-width:640px){.toolbar{padding:0 10px;gap:8px}.toolbar-rule,h1,.wide-tool,.brand span:last-child{display:none}.top{top:8px;left:8px;right:8px}.hint{font-size:13.5px;padding:6px 11px}.primary-button,.secondary-button{min-height:46px;font-size:14.5px;padding:0 12px}h2{font-size:26px}.panel{padding:20px 16px 16px}.panel.result{padding:12px 14px 12px}.panel.result h2{font-size:24px}.review{font-size:14.5px}.result-score strong{font-size:40px}.marks li{font-size:12.5px;gap:8px}.coach{font-size:14.5px}.feedback{font-size:16px}.labels span{font-size:11.5px;padding:1px 6px}.bar{left:8px;right:8px;bottom:8px}.ring{width:84px;height:84px;margin:-42px 0 0 -42px}}
@media (prefers-reduced-motion:reduce){.feedback{transition:none}.ring{animation:none}}
@media (orientation:landscape) and (max-height:560px),(orientation:landscape) and (min-width:820px){.overlay.clear{place-items:center end}.overlay.clear .panel{width:min(340px,46vw)}.labels span{max-width:12vw}}
/* under the tray: walk back, sit down, walk on. Always left to right, as the counter runs */
.bar{position:absolute;left:12px;right:12px;bottom:12px;display:grid;grid-template-columns:1fr 1.15fr 1fr;gap:8px;direction:ltr;max-width:520px;margin:0 auto;z-index:1}
.bar button{min-height:50px;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar .secondary-button{background:#1a130ee6;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.bar .primary-button{box-shadow:0 6px 20px #0008}
.bar button:disabled{opacity:.32}
.bar i{font-style:normal;font-size:20px;line-height:1;vertical-align:-1px;unicode-bidi:isolate;direction:ltr;display:inline-block}

/* Keep the result actions in view when the score details need to scroll. */
.toolbar {
  padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
}
.icon-button, .language-wrap select, .coach button { min-width: 44px; min-height: 44px; }
.world-button {
  display: inline-flex;
  gap: 6px;
  padding-inline: 9px;
  white-space: nowrap;
  color: var(--accent);
  font-size: 13px;
}
.world-button span:first-child { font-size: 17px; }
#ready-panel {
  place-self: center;
  width: min(400px, 100%);
  min-height: 0;
}
#ready-panel .actions, .result-footer .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
}
#ready-panel .actions > button, .result-footer .actions > button {
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
#rank-start-status:not(:empty) { color: var(--accent); }
#result-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  max-height: 100%;
}
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 8px;
  padding: 12px 14px 6px;
}
.result-heading > :first-child { min-width: 0; overflow-wrap: anywhere; }
.result-heading > .result-score { flex: none; }
.result-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 14px 6px;
  text-align: start;
}
.result-footer {
  flex: none;
  padding: 6px 8px 2px;
  border-top: 1px solid var(--line);
}
#submit-status:not(:empty) {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  color: var(--ink);
  text-align: start;
}
.result-footer .actions { margin: 0; }
.result-footer .text-button { min-height: 44px; }
.result-body .end-game-share { margin-block: 4px; }
.coach { pointer-events: none; }
.coach button { pointer-events: auto; }

@media (max-width: 700px) {
  .toolbar { gap: 6px; padding-inline: max(6px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-right)); }
  .toolbar-actions { min-width: 0; gap: 5px; }
  .toolbar .brand span:last-child, .toolbar #game-name, .toolbar .toolbar-rule, .toolbar .wide-tool { display: none; }
  .world-button { justify-content: center; padding-inline: 6px; }
  .world-button span:last-child { display: none; }
  .language-wrap select { width: 96px; max-width: 34vw; padding-inline: 5px; }
}

@media (orientation: landscape) and (max-height: 350px) {
  .top { top: 5px; }
  .hint { padding-block: 4px; font-size: 12px; }
  .overlay { padding-block: 6px; }
  #ready-panel { max-width: min(400px, 66vw); padding: 9px 12px; }
  #ready-panel .lead { margin-bottom: 4px; font-size: 12px; }
  #ready-panel .actions { margin-top: 6px; }
  #result-panel:not([hidden]) {
    display: grid;
    grid-template: auto minmax(0, 1fr) / repeat(2, minmax(0, 1fr));
    width: min(550px, 100%);
    height: 100%;
  }
  #result-panel > .end-game-home {
    grid-area: 1 / 2;
    align-self: center;
    margin: 4px auto;
    padding-inline: 8px;
    font-size: 13px;
  }
  #result-panel .result-heading { grid-area: 1 / 1; padding-block: 8px 4px; }
  #result-panel .result-heading h2 { font-size: 18px; }
  #result-panel .result-score strong { font-size: 32px; }
  .result-body { grid-area: 2 / 1; border-top: 1px solid var(--line); }
  .result-footer {
    grid-area: 2 / 2;
    align-content: safe center;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .result-footer .actions > button {
    padding-inline: 6px;
    overflow-wrap: anywhere;
    font-size: 13px;
  }
}

/* Move the controls beside the tray when a landscape stage runs out of height. */
.stage.short-counter {
  --counter-rail: clamp(112px, 22%, 140px);
}
.short-counter::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: calc(var(--counter-rail) + 16px);
  background: linear-gradient(90deg, #17100a55, #17100af2 15%);
  pointer-events: none;
}
.short-counter .top, .short-counter .bar, .short-counter .coach, .short-counter .feedback {
  right: 8px;
  left: auto;
  width: var(--counter-rail);
  max-width: none;
}
.short-counter .top {
  top: 8px;
}
.short-counter .hint {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 9px;
}
.short-counter .bar {
  bottom: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "prev next" "sit sit";
  gap: 4px;
  margin: 0;
}
.short-counter .bar button {
  min-height: 44px;
  padding: 3px 6px;
  border-radius: 10px;
}
.short-counter #prev-button { grid-area: prev; }
.short-counter #next-button { grid-area: next; }
.short-counter #sit-button {
  grid-area: sit;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.13;
  font-size: 13px;
}
.short-counter .bar .secondary-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.short-counter .bar i {
  font-size: 26px;
  vertical-align: 0;
}
.short-counter .labels { right: calc(var(--counter-rail) + 16px); }
.short-counter .labels span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  padding: 1px 4px;
  font-size: 11px;
  line-height: 1.05;
}
.short-counter .coach {
  top: 8px;
  flex-wrap: wrap;
  gap: 1px;
  padding: 5px 6px 3px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
}
.short-counter .coach button {
  margin-inline-start: auto;
}
.short-counter .ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-width: 3px;
}
.short-counter .feedback {
  top: auto;
  bottom: 106px;
  padding: 3px 5px;
  font-size: 12px;
  line-height: 1.25;
  transform: translateY(4px);
  border-radius: 8px;
}
.short-counter .feedback.show {
  transform: translateY(0);
}
