* {
  box-sizing: border-box;
}
:root {
  --ink: #342f23;
  --quiet: #706c57;
  --line: #c9c1a6;
  --paper: #faf4e4;
  --forest: #39533d;
  --soft: #e5e5cd;
  --rim: #706f56;
  color: var(--ink);
  font-family: "Trebuchet MS", system-ui, sans-serif;
  background: #ece9da;
}
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #766e34;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.46;
  cursor: default;
}
button:not(:disabled):active {
  filter: brightness(0.94);
}
[hidden] {
  display: none !important;
}
.layout {
  height: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(30px, 5vw, 110px);
  background: radial-gradient(ellipse at 53% 30%, #f6f3e8, #e7e5d4);
}
.game {
  width: min(100vw, 56.25dvh);
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #b3bc8b;
  box-shadow:
    0 0 0 1px #888c6b,
    0 13px 52px #4d523424;
  container-type: inline-size;
}
.rail {
  height: min(88%, 880px);
  width: clamp(155px, 18vw, 256px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rail-main {
  margin: auto 0;
}
.wordmark,
.smallcaps,
.studio-head small,
.panel small,
.sectionline {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 750;
  text-transform: uppercase;
  color: #626d51;
}
.wordmark,
.connection,
.keys,
.textbtn,
.pill,
.round,
.mini {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark i {
  width: 26px;
  height: 26px;
}
.rail h1 {
  font:
    normal clamp(37px, 4.2vw, 76px) / 0.92 Georgia,
    serif;
  letter-spacing: -0.06em;
  margin: 0.4em 0 0.55em;
}
.rail h1 em {
  color: #63744e;
  font-weight: 400;
}
.rail h2 {
  font:
    normal 27px Georgia,
    serif;
  margin: 12px 0 5px;
}
.rail p,
.hint,
.caption {
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.45;
}
.rail nav button,
.textbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  width: 100%;
  padding: 13px 0;
  text-align: left;
}
.rail nav button span:last-child {
  margin-left: auto;
}
.connection,
.keys {
  font-size: 12px;
  color: var(--quiet);
}
.connection b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b8658;
}
.rail.right .rail-main {
  width: 100%;
}
#plateIllustration {
  width: min(100%, 210px);
  height: auto;
  margin-top: 15px;
  display: block;
}
.keys {
  gap: 6px;
}
kbd {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 10px monospace;
}
i[data-icon],
.ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
i svg,
.ico svg {
  width: 100%;
  height: 100%;
}
#scene {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: 0;
}
.pill,
.round,
.bag,
#interact {
  background: #f8f0d9f2;
  border: 1.5px solid #514f37;
  box-shadow: 0 2px 0 #4c4b362b;
}
.pill {
  padding: 7px 13px;
  border-radius: 100px;
  font:
    600 15px Georgia,
    serif;
}
.caret {
  color: #716b51;
}
.round,
.mini {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  justify-content: center;
}
.round.live,
.mini.live {
  background: #cbd9ac;
}
#mic, #studioMic {
  position: absolute;
  right: max(4%, calc(env(safe-area-inset-right) + 8px));
  bottom: max(5%, calc(env(safe-area-inset-bottom) + 14px));
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  padding: 0;
  align-items: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#studioMic { z-index: 3; display: flex; }
#mic { z-index: 4; }
/* Placing a restaurant: a small bar while the player walks the plot into place. */
#placeBar { position: absolute; left: 50%; bottom: max(150px, calc(env(safe-area-inset-bottom) + 140px)); translate: -50% 0; z-index: 4; width: min(92%, 380px); padding: 10px 12px; border-radius: 16px; background: #faf4e4f2; border: 1px solid #776f51; box-shadow: 0 4px 16px #292c1b30; text-align: center; }
#placeBar p { margin: 0 0 8px; font-size: 13px; color: #2f5a36; font-weight: 600; }
#placeBar p.bad { color: #a8402f; }
#placeBar div { display: flex; gap: 8px; justify-content: center; }
#placeBar button { min-height: 42px; padding: 8px 14px; border-radius: 21px; border: 1px solid #776f51; background: #fffaf0; font-weight: 650; }
#placeBar button.primary { background: #3f6a45; color: #fff8e2; border-color: #2f4a35; }
#placeBar button:disabled { opacity: .45; }
/* Designing: one low sheet, part tabs on top, four big looks below. */
#designer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 10px 12px max(12px, env(safe-area-inset-bottom)); background: #faf4e4f5; border: 1px solid #776f51; border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -5px 22px #292c1b25; }
#designer header { display: flex; align-items: center; gap: 8px; }
#designer header strong { font: normal 20px Georgia, serif; }
#designCredits { margin-left: auto; padding: 3px 10px; border-radius: 12px; background: #f3e2a9; color: #5b4a1c; font-weight: 700; font-size: 13px; }
#designDone { min-height: 38px; padding: 6px 16px; border-radius: 19px; background: #3f6a45; color: #fff8e2; border: 1px solid #2f4a35; font-weight: 700; }
#designTabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 10px 0 8px; }
#designTabs button { min-height: 40px; padding: 4px 0; border-radius: 12px; border: 1px solid #d3c9ad; background: #fffaf0; font-size: 12px; font-weight: 650; color: #4f4a39; }
#designTabs button.on { background: #3f6a45; color: #fff8e2; border-color: #2f4a35; }
#designOptions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 46vh; overflow-y: auto; }
#designOptions button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 5px 3px 6px; border-radius: 14px; border: 2px solid #d3c9ad; background: #fffaf0; font-size: 11.5px; color: #3c3a2c; }
#designOptions canvas { width: 100%; aspect-ratio: 7 / 5; border-radius: 9px; background: #e9efd9; }
#designOptions button.on { border-color: #3f6a45; box-shadow: 0 0 0 2px #3f6a4544; background: #f1f6e8; }
#designOptions small { position: absolute; top: 3px; right: 4px; padding: 1px 5px; border-radius: 8px; background: #f3e2a9; color: #5b4a1c; font-weight: 700; font-size: 10px; }
#designBuy { margin-top: 8px; }
#designNote { margin: 6px 0 0; min-height: 1.2em; font-size: 12px; color: #706c57; text-align: center; }
#designExtra input { width: 100%; box-sizing: border-box; margin-top: 6px; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid #b8ad8d; font: 16px Georgia, serif; }
#game.designing #stick, #game.designing #bag, #game.designing #callout { visibility: hidden; }
.net-badge { position: absolute; left: 8px; top: calc(max(8px, env(safe-area-inset-top)) + 44px); z-index: 13; padding: 3px 8px; border-radius: 10px; background: #263a2ad9; color: #f5f0dc; font: 600 11px/1.3 ui-monospace, monospace; pointer-events: none; }
/* The kitchen at a bench (test2.html) fills the game area. The mic stays on
   top, beside the board and clear of the rack, so the cook and watchers can talk. */
#kitchenFrame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 5; background: #e9dcc0; }
#game.in-kitchen #mic { z-index: 6; bottom: max(232px, calc(env(safe-area-inset-bottom) + 232px)); right: 10px; width: 46px; height: 46px; }
#game.in-kitchen #stick, #game.in-kitchen #bag, #game.in-kitchen #callout, #game.in-kitchen #exportLog { visibility: hidden; }
#studio.counter-open #studioMic { bottom: max(70px, calc(env(safe-area-inset-bottom) + 62px)); }
#mic i, #studioMic i { width: 26px; height: 26px; }
:is(#mic, #studioMic) {
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
:is(#mic, #studioMic)::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid #708764;
  border-radius: 50%;
  opacity: 0;
  transform: scale(.83);
  transition: opacity 160ms, transform 200ms ease-out;
  pointer-events: none;
}
:is(#mic, #studioMic).arming::before, :is(#mic, #studioMic).live::before {
  opacity: .95;
  transform: scale(1);
}
:is(#mic, #studioMic) i, .mic-meter {
  transition: opacity 150ms ease, transform 190ms ease;
}
:is(#mic, #studioMic).arming i { transform: scale(.82); }
:is(#mic, #studioMic).live i { opacity: 0; transform: scale(.65); }
#mic.live, #studio #studioMic.live {
  background: #365842;
  color: #fff6dc;
  box-shadow: inset 0 1px 2px #203b2a55, 0 2px 6px #32422c36;
}
.mic-meter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  transform: scale(.65);
  pointer-events: none;
}
.live > .mic-meter { opacity: 1; transform: scale(1); }
.mic-meter > span {
  width: 4px;
  height: 12px;
  background: currentColor;
  border-radius: 3px;
  transform: scaleY(calc(.46 + var(--voice-level, 0) * .74));
  transition: transform 85ms linear;
}
.mic-meter > span:nth-child(even) { height: 21px; }
.mic-meter > span:nth-child(3) { height: 30px; }
:is(#mic, #studioMic)::after {
  content: attr(data-cue);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 4px 8px;
  border-radius: 8px;
  background: #344b38f5;
  color: #fff6df;
  font: 600 11px/1.25 system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
:is(#mic, #studioMic):is(:not([data-cue]), [data-cue=""])::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  :is(#mic, #studioMic), :is(#mic, #studioMic)::before, :is(#mic, #studioMic) i,
  .mic-meter, .mic-meter > span { transition: none; }
  .mic-meter > span { transform: none; }
}
.bag {
  position: absolute;
  bottom: max(3%, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 5px 12px;
  font-size: 13px;
}
.bag i {
  width: 23px;
  height: 23px;
}
#stick {
  position: absolute;
  bottom: 7%;
  left: 4%;
  width: 24%;
  min-width: 88px;
  aspect-ratio: 1;
  border: 2px solid #fff2d2cc;
  background: #fff3d530;
  border-radius: 100%;
  touch-action: none;
  display: grid;
  place-items: center;
  cursor: grab;
}
#knob {
  width: 42%;
  height: 42%;
  border: 1.6px solid #504c35;
  background: #f4e8cddf;
  border-radius: 100%;
}
#callout {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  white-space: nowrap;
  display: grid;
  justify-items: center;
  gap: 5px;
}
#tasteServed {
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  max-width: calc(100vw - 32px);
  white-space: normal;
  padding: 7px 15px;
  border: 1px solid #40533c;
  border-radius: 24px;
  background: #405c44;
  color: #fff8e6;
  font-weight: 650;
}
#testKitchen2 {
  padding: 9px 15px;
  color: var(--forest);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
#tasteServed:not([hidden]), .row .taste-plate {
  display: inline-flex;
  align-items: center;
}
.row .taste-plate {
  min-height: 44px;
  padding: 4px 9px;
}
#tasteServed canvas, .taste-plate canvas {
  width: 50px;
  height: 34px;
  flex: none;
}
#interact {
  padding: 9px 16px;
  border-radius: 22px;
  font-weight: bold;
  font-size: 13px;
}
.toast {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translate(-50%, -5px);
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
  background: #354638ed;
  color: #fff9e6;
  padding: 8px 13px;
  border-radius: 12px;
  text-align: center;
  max-width: 88%;
  width: max-content;
  line-height: 1.4;
  font-size: 12px;
  z-index: 12;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.panel-wrap {
  position: absolute;
  inset: 0;
  background: #26332246;
  display: flex;
  align-items: flex-end;
  z-index: 4;
}
.panel {
  width: 100%;
  max-height: 88%;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  padding: 20px 20px max(18px, env(safe-area-inset-bottom));
  border: 1px solid #776f51;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -5px 25px #292c1b25;
}
.panel header,
.studio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel h2,
.studio-head h2 {
  font:
    normal clamp(24px, 6.2cqw, 36px) / 1.06 Georgia,
    serif;
  letter-spacing: -0.025em;
  margin: 3px 0 0;
}
.panel header {
  margin-bottom: 12px;
}
/* Gathering: a low sheet so the garden, a partner and the mic stay in view. */
#gather {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: #faf4e4f2;
  border: 1px solid #776f51;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 22px #292c1b25;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
}
#gather header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#gather small { color: var(--quiet); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
#gather h2 { font: normal 21px/1.1 Georgia, serif; margin: 2px 0 0; }
#gatherPad {
  display: block;
  width: 100%;
  height: clamp(130px, 25vh, 210px);
  margin: 9px 0 6px;
  border-radius: 14px;
  border: 1px solid #a99f81;
  touch-action: none;
  cursor: grab;
}
#gatherHow { margin: 0 0 7px; font-size: 13px; color: var(--ink); }
.gather-progress { height: 7px; border-radius: 4px; background: #e2dcc6; overflow: hidden; margin-right: 66px; }
#gatherBar { display: block; height: 100%; width: 0; background: #6f8c5c; transition: width .25s ease; }
#gatherWith { margin: 6px 66px 0 0; font-size: 12px; line-height: 1.35; color: var(--quiet); min-height: 2.7em; }
#gatherWith[data-together="true"] { color: #2f5a36; font-weight: 650; }
.close,
.mini {
  border: 1px solid var(--line);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
}
.close {
  font-size: 23px;
  line-height: 1;
}
.row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #d8d1b9;
}
.row .desc {
  flex: 1;
  min-width: 0;
}
.row .table-doneness {
  color: var(--forest);
  font-size: 12px;
}
.table-doneness:empty { display: none; }
.center-sample {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 8px;
  margin-right: 5px;
  border: 1px solid #735340;
  border-top-width: 2px;
  border-radius: 4px;
}
.desc strong {
  display: block;
  font-size: 14px;
}
.desc small {
  display: block;
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  margin-top: 2px;
}
.row button,
.chip,
.tool,
.primary,
.secondary {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
.primary,
.chip.on,
.tool.on,
.tabs button.on,
.bowl.on {
  background: var(--forest);
  color: #fff6db;
  border-color: var(--forest);
}
.primary.wide,
.wide {
  width: 100%;
  margin-top: 10px;
}
.controls,
.picks,
.tools,
.tabs,
.bowls,
.burners,
.options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.controls select,
.row select,
.fields input,
.options select {
  border: 1px solid var(--line);
  background: #fffaec;
  border-radius: 7px;
  font-size: 12px;
  padding: 7px;
  min-width: 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0;
}
.butcher-portion { display: flex; margin: 10px 0; }
.butcher-cuts { min-width: 0; margin: 0; padding: 0; border: 0; }
.butcher-cuts legend { font-size: 12px; color: var(--quiet); padding: 0 0 5px; }
.butcher-cuts > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.butcher-cuts button {
  display: grid; justify-items: center; gap: 1px; padding: 4px;
  border-radius: 9px; font-size: 12px;
}
.butcher-cuts canvas { width: 60px; height: 31px; max-width: 100%; }
.butcher-cuts button span { font-size: 10px; }
.butcher-cuts button small { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: normal; color: #394d37; }
.butcher-cuts button[aria-pressed="true"] { background: #e2e8d1; border-color: #728361; }
.fields label,
.options label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--quiet);
  font-size: 12px;
}
.sectionline {
  margin: 13px 0 6px;
}
.hint {
  margin: 7px 0;
}
.records {
  padding: 8px 0;
  font-size: 13px;
}
.empty {
  margin: 10px 0;
  color: var(--quiet);
  font:
    italic 15px Georgia,
    serif;
}
.routebtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin: 5px 0;
  padding: 10px 12px;
}
.routebtn .place-label {
  flex: 1;
  min-width: 0;
}
.place-label strong,
.place-label small {
  display: block;
}
.place-label small,
.place-distance {
  color: var(--quiet);
  font-size: 12px;
}
.place-distance { white-space: nowrap; }
.place-label small[data-cooking-at] {
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.3;
}
.district-picker {
  width: 100%;
  min-height: 44px;
}
.place-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border-top: 1px solid var(--line);
}
.place-pair .routebtn {
  flex-wrap: wrap;
  gap: 3px 5px;
  padding: 7px;
}
.place-pair .place-distance {
  flex-basis: 100%;
  margin-left: 0;
}
#menu {
  max-width: calc(100% - 54px);
  display: flex;
  align-items: center;
  gap: 5px;
}
#zone {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#studio {
  position: absolute;
  inset: 0;
  background: var(--paper);
  z-index: 5;
  display: flex;
  flex-direction: column;
}
.studio-head {
  padding: max(10px, env(safe-area-inset-top)) 13px 9px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.studio-head > div {
  flex: 1;
}
.studio-head small {
  font-size: 9px;
}
.studio-head h2 {
  font-size: 25px;
}
.studio-head .mini i {
  width: 17px;
  height: 17px;
}
#studioScroll {
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.tabs {
  padding: 9px 12px 0;
  gap: 3px;
}
.tabs button,
.burners button {
  flex: 1;
  min-height: 32px;
  border-radius: 7px;
  font-size: 12px;
}
.tabs:empty,
#upper:empty {
  display: none;
}
#upper,
#lower {
  padding: 5px 13px;
}
.surface {
  position: relative;
  margin: 5px 0;
  background: #c9c6ae;
}
.surface canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5/4;
  touch-action: none;
}
.surface #surfaceCaption {
  position: absolute;
  left: 8px;
  bottom: 7px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fbf4e4eb;
  font-size: 10px;
  pointer-events: none;
}
.surface #surfaceCaption:empty {
  display: none;
}
.bowls {
  justify-content: space-between;
  flex-wrap: nowrap;
}
.bowl {
  background: #eee5cd;
  border-radius: 50%;
  height: 38px;
  width: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  position: relative;
}
.bowl i {
  width: 22px;
  height: 22px;
}
.bowl small {
  position: absolute;
  right: -1px;
  bottom: -2px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0 3px;
  border-radius: 5px;
  font-size: 9px;
  color: var(--ink);
}
.bowl .plus {
  color: #827c64;
  font:
    22px Georgia,
    serif;
}
.tools {
  margin: 5px 0;
}
.tool {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.tool i,
.chip i {
  width: 17px;
  height: 17px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 31px;
  padding: 4px 8px;
  border-radius: 15px;
}
.burners {
  flex-wrap: nowrap;
}
.burners button {
  font-size: 12px;
}
.burners .active {
  box-shadow: inset 0 0 0 1.5px #53664e;
  background: #e1e6cd;
}
.burners .hot {
  color: #985031;
}
.options {
  margin-top: 7px;
}
.options input[type="range"] {
  max-width: 105px;
  accent-color: var(--forest);
}
.offer {
  padding: 8px;
  background: #e9ead6;
  border-radius: 8px;
}
.tally {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.meter {
  height: 5px;
  background: #ddd8c2;
  border-radius: 9px;
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  background: #728553;
}
.tasting-tools input[type="color"] {
  border: 1px solid var(--line);
  width: 33px;
  height: 32px;
  padding: 2px;
  background: var(--paper);
  border-radius: 6px;
}
.utensil-color {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}
.caption {
  font-size: 12px;
  margin: 5px 0;
}
.keys,
.wordmark,
.rail nav,
.textbtn,
.bag,
#stick,
.tools,
.tabs,
.picks,
.bowls,
.burners {
  user-select: none;
  -webkit-user-select: none;
}
.work-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.work-title .sectionline {
  margin: 4px 0;
}
.slotnum {
  font:
    15px Georgia,
    serif;
  color: var(--quiet);
  min-width: 18px;
}
.shine {
  color: #866125;
}
@media (max-width: 900px) {
  .rail {
    display: none;
  }
  .layout {
    gap: 0;
  }
}
@media (max-width: 600px) {
  .game {
    width: min(100vw, 56.25dvh);
    height: auto;
    aspect-ratio: 9/16;
    box-shadow: none;
  }
  .panel {
    max-height: 88%;
  }
}
@media (max-height: 650px) {
  .studio-head {
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .studio-head h2 {
    font-size: 21px;
  }
  .surface {
    margin: 2px auto;
    max-width: min(100%, 58dvh);
  }
  .tabs {
    padding-top: 5px;
  }
  .sectionline {
    margin-top: 7px;
  }
  .panel {
    padding: 12px 14px;
  }
  .rail {
    height: 90%;
  }
}
#studio[data-mode="eat"] .studio-head {
  border: 0;
  padding: max(14px, env(safe-area-inset-top)) 14px 10px;
}
#studio[data-mode="eat"] .studio-head h2 {
  overflow-wrap: anywhere;
}
#studio[data-mode="eat"] .studio-head :is(.close, .mini) {
  width: 44px;
  height: 44px;
}
#studio[data-tasting="table"] .studio-head {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 2;
  max-width: calc(100% - 85px);
  padding: max(8px, env(safe-area-inset-top)) 8px;
  pointer-events: none;
}
#studio[data-tasting="table"] .studio-head button {
  pointer-events: auto;
  background: #fff7e5ef;
}
#studio[data-tasting="table"] .studio-head > div,
#studio[data-tasting="table"] #upper {
  background: #fff7e5eb;
  border-radius: 8px;
  padding: 5px 10px;
  color: #40382c;
}
#studio[data-tasting="table"] .studio-head small { display: none; }
#studio[data-tasting="table"] .studio-head h2 { font-size: 16px; }
#studio[data-tasting="table"] #upper {
  position: absolute;
  top: max(17px, env(safe-area-inset-top));
  right: 10px;
  z-index: 1;
  font-size: 12px;
  pointer-events: none;
}
#studio[data-tasting="table"] #studioScroll {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: minmax(0,1fr) clamp(100px,15%,120px) / 100%;
  padding: 0;
  overflow: hidden;
  background: #e9e0ca;
}
#studio[data-tasting="table"] .surface {
  grid-row: 1;
  margin: 0;
  display: grid;
  place-items: center;
  container-type: size;
  background: #d5ccb4;
}
#studio[data-tasting="table"] #worktop {
  width: min(100cqw,62.992cqh);
  height: auto;
  aspect-ratio: 400 / 635;
  user-select: none;
  -webkit-touch-callout: none;
}
#studio[data-tasting="table"] #lower {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 6px max(4px,env(safe-area-inset-bottom));
  background: #f9f2df;
  border-top: 1px solid #b6a88b;
  touch-action: none;
}
#studio[data-phase="plate"] #lower { padding-right: 52px; }
.table-hint { margin: 4px 0 0; font-size: 12px; text-align: center; color: #474631; }
.tasting-tools { display:flex; align-items:center; justify-content:center; gap:4px; }
.tasting-tools .tool { padding:4px 6px; min-height:38px; gap:3px; }
.tasting-tools .tool i { width:24px; height:24px; }
.tasting-tools .tool.on { color:#33472e; background:#dce6c7; border-color:#788968; }
.chew-ball {
  width: 70px;
  height: 70px;
  box-sizing: border-box;
  padding: 5px;
  border-radius: 50%;
  border: 1px solid #7c684a;
  background: conic-gradient(#62814c var(--filled),#d6c7a9 0);
  box-shadow: 0 2px 3px #51412640;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.chew-ball:active { cursor: grabbing; }
.chew-ball:focus-visible { outline: 2px solid #49653a; outline-offset: 3px; }
.ball-surface {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 29% 23%,#fff5d5 2%,#edc17e 32%,#c28045 63%,#845338 87%);
  box-shadow: inset 0 0 0 1px #855f3e;
  pointer-events: none;
}
.ball-surface::before {
  content: "";
  position: absolute;
  inset: 0 24%;
  border: 2px solid #845d3b91;
  border-radius: 50%;
  transform: rotate(calc(var(--spin) + .4rad));
}
.ball-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 17%,#fff5d9 0 3px,#80603e 3.5px 4.5px,transparent 5px);
  transform: rotate(var(--spin));
}
.primary i {
  vertical-align: middle;
  margin-right: 4px;
}
.textbtn {
  color: var(--forest);
}
.tasting-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tasting-entry summary {
  cursor: pointer;
  font:
    600 16px Georgia,
    serif;
}
.tasting-entry .records {
  padding: 3px 0;
  font-size: 12px;
}


.game:has(#studio:not([hidden])) > :is(#mic, #bag, #stick, #callout) {
  visibility: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .counter-open .counter-scene > canvas {
    animation: approach-counter 620ms cubic-bezier(.22,.72,.22,1) both;
    transform-origin: 50% 48%;
  }
  @keyframes approach-counter {
    0%, 18% { opacity: 0; transform: scale(.75) translateY(8%); }
    100% { opacity: 1; transform: scale(1); }
  }
}

.character-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.character-choices button { display:grid; justify-items:center; padding:10px 6px 12px; border:2px solid #c8bea6; border-radius:18px; background:#fbf6e9; color:#343b30; font:inherit; font-weight:700; }
.character-choices button[aria-pressed="true"] { border-color:#617b59; background:#e4ead6; }
.character-choices canvas { display:block; width:min(100%,142px); height:auto; }
#exportLog {
  position:absolute; z-index:15; top:max(6px,env(safe-area-inset-top)); right:max(7px,env(safe-area-inset-right));
  width:44px; height:44px; padding:10px; display:grid; place-items:center;
  background:#fbf3dfef; color:#514938; border:1px solid #76674e70; border-radius:50%;
  box-shadow:0 2px 5px #352f2624; touch-action:manipulation;
}
#exportLog svg {width:23px;height:23px;}
#exportLog:active {background:#d0dac1;}
#logReceipt {
  position:absolute; z-index:16; top:calc(max(6px,env(safe-area-inset-top)) + 49px);
  right:8px; max-width:min(280px,85%); padding:9px 13px; border-radius:12px;
  color:#fff8e8; background:#384638; font:500 13px/1.4 system-ui; user-select:text;
}
#logReceipt[hidden] {display:none;}
#studio[data-tasting="table"] #upper {right:58px;}
.game .counter-open #kitchenGuests {margin-right:48px;}
.character-option { display:grid; align-content:start; gap:5px; }
.character-choices .suit-choice { padding:7px; font-size:.85em; border-radius:10px; }
.character-choices .suit-choice[aria-pressed="true"]::before { content:"✓ "; }
.character-choices .suit-choice { display:block; }
#homeButton { position: absolute; left: 10px; top: max(10px, env(safe-area-inset-top)); z-index: 3; font-size: 14px; }
#designExtra .stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; font: 15px Georgia, serif; color: #4b4737; }
#designExtra .stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #b8ad8d; background: #fff8e6; font: bold 22px Georgia, serif; color: #4b4737; }
#designExtra .stepper button:disabled { opacity: .35; }

#gatherCard { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: #f1f5e4; border: 1px solid #b9c79a; }
#gatherCard small { display: block; color: #2f5a36; font-weight: 650; letter-spacing: .02em; text-transform: none; font-size: 12px; }
#gatherCard p { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink); }
#gatherCardFact { font-style: italic; color: #5d5a47 !important; }
#gatherCardAsk { font-weight: 650; }

#gatherCard[data-waiting="true"] { background: #fbf3dc; border-color: #d9c48a; border-style: dashed; }
#gatherCard[data-waiting="true"] small { color: #7a5a1c; }
#gatherCard p[hidden] { display: none; }

/* ---- Profiles (profile.js) ---- */
#profileButton {
  position: absolute; z-index: 15; top: max(6px, env(safe-area-inset-top)); right: calc(max(7px, env(safe-area-inset-right)) + 52px);
  width: 44px; height: 44px; padding: 10px; display: grid; place-items: center;
  background: #fbf3dfef; color: #514938; border: 1px solid #76674e70; border-radius: 50%;
  box-shadow: 0 2px 5px #352f2624; touch-action: manipulation;
}
#profileButton svg { width: 23px; height: 23px; }
#profileButton:active { background: #d0dac1; }
#game.in-kitchen #profileButton, #game.in-kitchen #profileNear, #game.designing #profileButton, #game.designing #profileNear { visibility: hidden; }
#profileNear {
  position: absolute; z-index: 3; left: 50%; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 176px); transform: translateX(-50%);
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px;
  background: #fffaf0f2; border: 1px solid #b8ad8d; box-shadow: 0 2px 6px #352f2622;
}
.pf { display: grid; gap: 12px; color: var(--ink); }
.pf small { text-transform: none; letter-spacing: 0; font-weight: normal; }
.pf-head { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.pf-avatar { width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #f3ecd6, #dfe6c9); border: 2px solid #fffaf0; box-shadow: 0 0 0 1px #b8ad8d, 0 3px 8px #352f2620; }
.pf-who { min-width: 0; display: grid; gap: 4px; }
.pf-name { display: flex; align-items: center; gap: 10px; }
.pf-name h3 { margin: 0; font: normal 23px/1.1 Georgia, serif; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-edit { flex: none; padding: 4px 11px; border-radius: 12px; border: 1px solid #b8ad8d; background: #fffaf0; font-size: 12px; color: #4b4737; }
.pf-bio { margin: 0; font-size: 13.5px; line-height: 1.35; color: #4b4737; }
.pf-bio.empty { color: #8a836c; font-style: italic; }
.pf-tags { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pf-tags span { padding: 2px 9px; border-radius: 10px; background: #ece5cf; font-size: 11.5px; color: #5b553f; }
.pf-tags span.on { background: #dfead0; color: #37562f; }
.pf-tags span.on::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #5e9a4e; }
.pf-field { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #7a735b; }
.pf input, .pf textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 12px; border: 1px solid #b8ad8d; background: #fffdf5; font: 15px/1.35 Georgia, serif; color: var(--ink); resize: none; }
.pf input:focus, .pf textarea:focus { outline: 2px solid #3f6a4580; outline-offset: 1px; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pf-tiles div { display: grid; gap: 2px; padding: 9px 4px 8px; border-radius: 14px; background: #fffaf0; border: 1px solid #e0d6b8; text-align: center; }
.pf-tiles b { font: normal 21px/1 Georgia, serif; }
.pf-tiles span { font-size: 10.5px; line-height: 1.15; color: #7a735b; }
.pf-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 14px; background: #e9e1c9; }
.pf-tabs button { padding: 9px 6px; border: 0; border-radius: 11px; background: transparent; font: 14px Georgia, serif; color: #5b553f; }
.pf-tabs button.on { background: #fffaf0; color: var(--ink); box-shadow: 0 1px 3px #352f2626; }
.pf-tabs small { margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: #d9d0b4; font: 11px system-ui, sans-serif; color: #5b553f; }
.pf-tabs button.on small { background: #dfead0; color: #37562f; }
.pf-sorts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pf-sorts button { flex: none; padding: 5px 12px; border-radius: 14px; border: 1px solid #cfc5a6; background: transparent; font-size: 12.5px; color: #5b553f; }
.pf-sorts button.on { border-color: #3f6a45; background: #3f6a45; color: #fff8e2; }
.pf-list { display: grid; gap: 8px; }
.pf-card { border-radius: 16px; background: #fffaf0; border: 1px solid #e0d6b8; overflow: hidden; min-width: 0; }
.pf-list, .pf-list > * { min-width: 0; }
.pf-card.open { border-color: #b8ad8d; box-shadow: 0 2px 8px #352f261c; }
.pf-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 10px 12px; border: 0; background: transparent; text-align: left; color: inherit; font: inherit; }
.pf-row.static { grid-template-columns: 1fr auto; }
.pf-plate { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #f1ead4; overflow: hidden; }
.pf-plate canvas { width: 100%; height: 100%; object-fit: contain; }
.pf-body { min-width: 0; display: grid; gap: 2px; }
.pf-body strong { font: 16px/1.2 Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-body small { font-size: 12px; color: #7a735b; }
.pf-by { padding: 0; border: 0; background: none; font: inherit; color: #3f6a45; text-decoration: underline; text-decoration-color: #3f6a4555; text-underline-offset: 2px; }
.pf-score { flex: none; min-width: 46px; display: inline-flex; align-items: baseline; justify-content: center; gap: 1px; padding: 6px 8px; border-radius: 12px; background: #ece5cf; color: #6f684f; }
.pf-score b { font: 17px/1 Georgia, serif; }
.pf-score small { font-size: 10px; opacity: .75; }
.pf-score.high { background: #dfead0; color: #2f5a2a; }
.pf-score.mid { background: #f3e2a9; color: #6a5212; }
.pf-score.low { background: #f1d5c8; color: #7b3a25; }
.pf-comment { margin: -2px 12px 10px; font: italic 14px/1.4 Georgia, serif; color: #4b4737; }
.pf-foot { display: flex; justify-content: flex-end; padding: 0 12px 10px; }
.pf-rate { padding: 5px 12px; border-radius: 12px; border: 1px solid #b8ad8d; background: #fffdf5; font-size: 12.5px; color: #4b4737; }
.pf-more { display: grid; gap: 8px; padding: 0 12px 12px; border-top: 1px dashed #e0d6b8; }
.pf-made { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: #6f684f; }
.pf-said { display: grid; gap: 8px; }
.pf-quote { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 9px; }
.pf-quote .pf-score { min-width: 40px; padding: 4px 6px; }
.pf-quote .pf-by { justify-self: start; font-size: 13.5px; }
.pf-quote p { grid-column: 2; margin: 0; font: italic 13.5px/1.4 Georgia, serif; color: #4b4737; }
.pf-hint { margin: 0; font-size: 12.5px; color: #7a735b; }
.pf-empty { margin: 6px 0; padding: 22px 16px; border-radius: 16px; border: 1px dashed #cfc5a6; text-align: center; font: 14px/1.45 Georgia, serif; color: #7a735b; }
.pf-editor { display: grid; gap: 8px; padding: 2px 12px 12px; min-width: 0; }
.pf-editor > * { min-width: 0; }
.pf-ask .pf-editor { padding: 0; }
.pf-pips { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.pf-pips button { aspect-ratio: 1; min-width: 0; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid #cfc5a6; background: #fffdf5; font: 13px Georgia, serif; color: #6f684f; }
.pf-pips button.on { border-color: transparent; color: #fff8e2; background: #b8862f; }
.pf-pips button.on[data-tone="high"] { background: #3f6a45; }
.pf-pips button.on[data-tone="low"] { background: #a8563a; }
.pf-pips button[aria-checked="true"] { box-shadow: 0 0 0 2px #fffaf0, 0 0 0 4px #3d352866; }
.pf-count { justify-self: end; margin-top: -4px; font-size: 11px; color: #8a836c; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-actions button { padding: 8px 16px; border-radius: 14px; border: 1px solid #b8ad8d; background: #fffdf5; font-size: 13.5px; color: #4b4737; }
.pf-actions button.primary { background: #3f6a45; color: #fff8e2; border-color: #2f4a35; }
.pf-actions button.quiet { margin-left: auto; border-color: transparent; background: transparent; color: #a8563a; text-decoration: underline; }
.pf-actions button:disabled { opacity: .5; }
.pf-lead { margin: 0; font: 15px/1.45 Georgia, serif; }

/* ---- Accounts and review votes ---- */
.pf-account { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: #f6edd2; border: 1px solid #e0d1a3; }
.pf-account.in { background: #e9f0dc; border-color: #c9d8b4; }
.pf-account p { margin: 0; font-size: 13px; line-height: 1.4; color: #4b4737; }
.pf-account strong { font: 17px Georgia, serif; }
.pf-account form { display: grid; gap: 8px; }
.pf-votes { display: flex; gap: 6px; padding: 0 12px 10px; }
.pf-vote { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 16px; border: 1px solid #d8cfb4; background: #fffdf5; font-size: 13px; color: #5b553f; }
.pf-vote b { font: 13px Georgia, serif; }
.pf-vote.on { border-color: #3f6a45; background: #dfead0; color: #2f5a2a; }
.pf-vote:disabled { opacity: .75; }

/* ---- Tips and the coffee ---- */
.pf-tip { display: grid; gap: 7px; margin-top: 4px; padding: 11px 12px; border-radius: 14px; background: #f6edd2; border: 1px solid #e0d1a3; }
.pf-tip strong, .pf-cooktips strong { font: 16px Georgia, serif; }
.pf-tip-chips { display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 6px; }
.pf-tip-chips button { min-height: 38px; border-radius: 12px; border: 1px solid #cfc5a6; background: #fffdf5; font: 15px Georgia, serif; color: #4b4737; }
.pf-tip-chips button.on { border-color: #3f6a45; background: #3f6a45; color: #fff8e2; }
.pf-tip-chips input { min-height: 38px; padding: 6px 9px; }
.pf-tip > button.primary { min-height: 42px; border-radius: 14px; border: 1px solid #2f4a35; background: #3f6a45; color: #fff8e2; font: 600 15px system-ui, sans-serif; }
.pf-tip > button.primary:disabled { opacity: .5; }
.pf-cooktips { display: grid; gap: 7px; margin-top: 4px; padding-top: 10px; border-top: 1px dashed #c9d8b4; }
.pf-cooktips select { min-height: 40px; padding: 6px 9px; border-radius: 12px; border: 1px solid #b8ad8d; background: #fffdf5; font: 14px system-ui, sans-serif; color: var(--ink); }
.pf-coffee { margin: 4px 0 0; text-align: center; font-size: 13px; color: #7a735b; }
.pf-coffee a { color: #7b4a1e; font-weight: 600; text-decoration: none; border-bottom: 1px solid #7b4a1e55; }
