:root {
  --ink: #332b27;
  --muted: #725f55;
  --paper: #fff8e9;
  --paper-deep: #f4dfb7;
  --red: #d64f46;
  --red-dark: #a93635;
  --gold: #e2a93f;
  --jade: #2c7967;
  --wood: #6b4030;
  --cream: #fffdf7;
  --shadow: 0 10px 28px rgba(83, 57, 42, 0.14);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(255, 206, 105, 0.32), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(103, 190, 167, 0.2), transparent 22rem),
    linear-gradient(145deg, #fff2d8, #f8ecd9 55%, #e9f2e8);
  font-family: ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button { font: inherit; }

button:focus-visible {
  outline: 4px solid #ffd46d;
  outline-offset: 3px;
}

ruby {
  ruby-align: center;
  ruby-position: over;
  line-height: 1.65;
}

rt {
  color: #765f53;
  font-family: ui-rounded, "PingFang SC", system-ui, sans-serif;
  font-size: 0.5em;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  user-select: none;
}

.topbar rt,
.primary-button rt,
.chef-card.working rt,
.age-mode-switch button.selected rt,
.customer-mode-button.active rt,
.toast rt { color: currentColor; opacity: 0.78; }

.hidden { display: none !important; }

.game-shell {
  width: min(1800px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px clamp(14px, 2vw, 34px) 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  margin-bottom: 14px;
  padding: 10px 18px;
  color: var(--cream);
  background: linear-gradient(105deg, #c84642, #e56854 65%, #df8b4d);
  border: 2px solid rgba(255, 224, 145, 0.75);
  border-radius: 18px;
  box-shadow: var(--shadow);
  position: relative;
}

.topbar::before,
.topbar::after { display: none; }

.brand, .restaurant-status, .recipe-title-row, .cooking-title {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; }

.brand-seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #7d1d16;
  background: #f1c967;
  border: 2px solid #fff1c2;
  box-shadow: inset 0 0 0 3px #bd8630;
  border-radius: 13px;
  font-size: 26px;
  font-weight: 900;
  transform: rotate(-3deg);
}

h1, h2, p { margin: 0; }
h1 { font-size: clamp(22px, 2vw, 32px); letter-spacing: 0.06em; }
h2 { font-size: 20px; }

.eyebrow {
  margin-bottom: 3px;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar .eyebrow { color: #fff0b5; }

.restaurant-status { gap: 9px; }

.status-item, .money-card {
  min-width: 82px;
  padding: 7px 13px;
  text-align: center;
  border-left: 1px solid rgba(255,255,255,0.15);
}

.status-item > span, .money-card > span {
  display: block;
  color: #fff1c8;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.status-item strong { font-size: 20px; white-space: nowrap; }
.streak-status strong { color: #f0c761; }

.money-card {
  min-width: 128px;
  color: #fff0bb;
  background: rgba(119, 40, 35, 0.28);
  border: 1px solid rgba(255, 230, 171, 0.65);
  border-radius: 12px;
}

.money-card strong { font-size: 24px; white-space: nowrap; }

.round-button {
  width: 38px;
  height: 38px;
  color: #fff5d7;
  background: rgba(255,255,255,0.12);
  border: 2px solid #ffd889;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}

.pause-button {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 76px;
  height: 40px;
  padding: 0 11px;
  color: #fff9e9;
  background: rgba(255,255,255,0.13);
  border: 2px solid #ffd889;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  pointer-events: auto;
  touch-action: manipulation;
}
.pause-button:hover { background: rgba(255,255,255,0.22); }
.pause-button:active { transform: scale(0.96); }
.pause-button.paused { color: #285f55; background: #fff0b7; border-color: #fff0b7; }
.music-button.playing { color: #285f55; background: #bfe9d4; border-color: #e4fff1; }
.music-button.playing #music-icon { animation: music-note 0.8s ease-in-out infinite alternate; }
.pause-button span { font-family: system-ui, sans-serif; }

@keyframes music-note {
  to { transform: translateY(-2px) rotate(8deg); }
}

.game-paused .game-board,
.game-paused .staff-panel,
.game-paused .cooking-station,
.game-paused .pantry { filter: saturate(0.65); }

.game-paused .restaurant-room::before {
  content: "游戏已暂停";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 12;
  padding: 12px 22px;
  color: white;
  background: rgba(30, 81, 70, 0.92);
  border: 3px solid #ffe09a;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(31, 40, 36, 0.25);
  font-size: 18px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.age-mode-switch {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 14px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 250, 239, 0.94);
  border: 2px solid #e2c58f;
  border-radius: 14px;
  box-shadow: 0 5px 15px rgba(83, 57, 42, 0.1);
}

.mode-switch-label {
  display: grid;
  padding: 0 10px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.age-mode-switch button {
  min-width: 116px;
  min-height: 48px;
  padding: 5px 14px;
  color: var(--ink);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

.age-mode-switch button:hover { background: #fff0d1; }
.age-mode-switch button.selected { color: white; background: var(--jade); border-color: #216252; }
.age-mode-switch .customer-mode-button { color: #783d17; background: #ffe3a1; border-color: #e5b858; }
.age-mode-switch .customer-mode-button:hover { background: #ffd77a; }
.age-mode-switch .customer-mode-button.active { color: white; background: #c54f48; border-color: #963a37; }
.age-mode-switch b, .age-mode-switch small { display: block; }
.age-mode-switch b { font-size: 14px; }
.age-mode-switch small { margin-top: 2px; color: inherit; font-size: 10px; opacity: 0.8; }

.game-board {
  display: grid;
  grid-template-columns: minmax(215px, 0.75fr) minmax(460px, 2.15fr) minmax(245px, 0.9fr);
  gap: 14px;
  height: clamp(510px, 60vh, 660px);
}

.panel-frame {
  overflow: hidden;
  background: rgba(255, 249, 234, 0.96);
  border: 2px solid #e2c58f;
  border-radius: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.panel-frame::after { display: none; }

.panel-heading, .room-header, .pantry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px 16px;
  border-bottom: 1px solid #d8bd8a;
}

.order-count, .mode-badge {
  padding: 5px 9px;
  color: var(--red);
  background: #f5e4c3;
  border: 1px solid #dec18a;
  font-family: system-ui, sans-serif;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100% - 74px);
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.order-card {
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: #f8edd8;
  border: 2px solid #e3cda2;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.order-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(77, 42, 24, 0.13); }
.order-card.selected { border-color: var(--red); box-shadow: inset 4px 0 var(--red); }
.order-card.urgent { animation: none; border-color: #d64f46; background: #fff0e7; }
.order-card.rush-order { border-color: #e1a42e; box-shadow: inset 4px 0 #e1a42e; }

@keyframes urgent-pulse {
  50% { box-shadow: inset 0 0 0 2px rgba(173, 39, 28, 0.32); }
}

.order-main {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px 10px 8px;
}

.order-dish-icon, .dish-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #fff9ea;
  border: 1px solid #dfc99c;
  border-radius: 50%;
  font-family: system-ui, sans-serif;
  font-size: 23px;
}

.order-info strong { display: block; font-size: 14px; }
.order-info small { color: var(--muted); font-family: system-ui, sans-serif; }
.order-info .chef-order-badge {
  display: block;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 5px;
  color: #fff4d5;
  background: var(--red);
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
}
.order-info .chef-order-badge:empty { display: none; }
.order-info .rush-order-badge {
  display: block;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 5px;
  color: #5f3909;
  background: #ffd978;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 900;
}
.order-info .rush-order-badge:empty { display: none; }
.order-price { color: var(--red); font-size: 13px; font-weight: 900; }

.patience-bar { height: 7px; background: #d8c6a3; }
.patience-fill { display: block; height: 100%; background: var(--jade); transition: width 0.2s linear; }
.urgent .patience-fill { background: #b52b21; }

.restaurant-panel { display: flex; flex-direction: column; }
.room-header { background: #f7ead0; }

.shift-status { width: 112px; }

.day-clock {
  color: var(--jade);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}
.day-clock strong { display: block; margin-top: 2px; color: var(--ink); font: 14px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0.03em; }

.clock-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  background: #43866f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(67, 134, 111, 0.13);
}

.shift-meter {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: #d7c297;
  border-radius: 5px;
}

.shift-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--jade), #78a889);
  transition: width 300ms ease;
}

.restaurant-room {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(92, 33, 21, 0.08) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(92, 33, 21, 0.06) 1px, transparent 1px) 0 0 / 62px 100%,
    linear-gradient(#d8bd88 0 57%, #9e7048 57%);
  position: relative;
}

.restaurant-room::after {
  content: "";
  position: absolute;
  inset: 57% 0 0;
  background: repeating-linear-gradient(90deg, transparent 0 60px, rgba(61, 33, 20, 0.15) 61px 63px);
  pointer-events: none;
}

.plaque {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  padding: 6px 22px;
  color: #e6c776;
  background: #48271d;
  border: 2px solid #b98538;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.3em;
  transform: translateX(-50%);
}

.rush-alert {
  position: absolute;
  top: 54px;
  left: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 190px;
  padding: 6px 10px;
  color: #315f55;
  background: rgba(255, 249, 226, 0.92);
  border: 2px solid #dfbb6c;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(70, 44, 28, 0.14);
  transform: translateX(-50%);
}
.rush-alert .rush-icon { font: 19px system-ui, sans-serif; }
.rush-alert strong, .rush-alert small { display: block; white-space: nowrap; }
.rush-alert strong { font-size: 10px; }
.rush-alert small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.rush-alert.active {
  color: white;
  background: #d64f46;
  border-color: #ffd56e;
  animation: rush-beat 0.8s ease-in-out infinite alternate;
}
.rush-alert.active small { color: #fff1c8; }

@keyframes rush-beat {
  to { box-shadow: 0 0 0 6px rgba(214, 79, 70, 0.16), 0 6px 15px rgba(70, 44, 28, 0.2); }
}

.window {
  position: absolute;
  top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 110px;
  height: 92px;
  padding: 6px;
  background: #744331;
  border: 5px solid #543024;
}

.window-left { left: 25px; }
.window-right { right: 25px; }
.window span { border: 1px solid #765540; background: linear-gradient(#a7c8b9, #e4d0a4); }

.wall-clock {
  position: absolute;
  top: 12px;
  right: 151px;
  z-index: 5;
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, #fffdf3 0 66%, #dfca9b 68% 73%, #614231 75%);
  border: 3px solid #523529;
  border-radius: 50%;
  box-shadow: 0 5px 10px rgba(48,25,15,.24), inset 0 0 8px rgba(98,69,41,.2);
}
.clock-face-markers { position: absolute; inset: 5px; border-radius: 50%; background: repeating-conic-gradient(from -1deg, #624637 0 2deg, transparent 2deg 30deg); -webkit-mask: radial-gradient(circle, transparent 0 70%, black 72%); mask: radial-gradient(circle, transparent 0 70%, black 72%); }
.clock-hand { position: absolute; bottom: 50%; left: 50%; z-index: 2; width: 2px; background: #342820; border-radius: 3px; transform-origin: 50% 100%; }
.hour-hand { height: 14px; width: 4px; margin-left: -2px; }
.minute-hand { height: 19px; margin-left: -1px; }
.second-hand { height: 21px; width: 1px; background: #cf3e37; }
.wall-clock b { position: absolute; top: 50%; left: 50%; z-index: 3; width: 6px; height: 6px; background: #422e24; border-radius: 50%; transform: translate(-50%,-50%); }

.lantern { position: absolute; top: -1px; z-index: 3; width: 43px; text-align: center; }
.lantern-one { left: 25%; }
.lantern-two { right: 25%; }
.lantern i { display: block; width: 2px; height: 20px; margin: auto; background: #5d251a; }
.lantern b {
  display: grid;
  width: 42px;
  height: 51px;
  place-items: center;
  color: #ffcf68;
  background: linear-gradient(90deg, #9a2118, #d44931 50%, #8f1b15);
  border-radius: 42% 42% 35% 35%;
  box-shadow: 0 5px 18px rgba(117, 22, 16, 0.32);
}

.floor-shadow {
  position: absolute;
  inset: 57% 5% auto;
  height: 20px;
  background: rgba(52, 24, 14, 0.16);
  border-radius: 50%;
  filter: blur(10px);
}

.restaurant-entrance {
  position: absolute;
  top: 126px;
  left: 50%;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 82px;
  height: 112px;
  padding: 7px 6px 0;
  background: linear-gradient(90deg, #4c2d21, #76503a 48%, #4a2c20);
  border: 6px solid #4a2b20;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 9px 13px rgba(47,25,15,0.22), inset 0 0 0 2px #a97948;
  transform: translateX(-50%);
}
.restaurant-entrance span { position: relative; background: linear-gradient(90deg, #69422d, #8b5c3b 48%, #583724); border: 1px solid #3e271d; }
.restaurant-entrance span:first-child::after,
.restaurant-entrance span:nth-child(2)::after { content: ""; position: absolute; top: 50%; width: 4px; height: 4px; background: #d4a64b; border-radius: 50%; box-shadow: 0 1px 2px #27150e; }
.restaurant-entrance span:first-child::after { right: 4px; }
.restaurant-entrance span:nth-child(2)::after { left: 4px; }
.restaurant-entrance i { position: absolute; right: -11px; bottom: -4px; left: -11px; height: 8px; background: #593828; border-radius: 50%; box-shadow: 0 4px 5px rgba(40,20,12,.25); }

.kitchen-stage {
  position: absolute;
  top: 132px;
  left: 12px;
  z-index: 1;
  width: 94px;
  height: 126px;
  color: #f8eacb;
  text-align: center;
  background: linear-gradient(#614536 0 74%, #443026 75%);
  border: 4px solid #4d3024;
  border-radius: 7px 7px 4px 4px;
  box-shadow: 0 8px 12px rgba(45,24,14,0.25), inset 0 0 15px rgba(255,212,139,0.1);
}
.kitchen-sign { position: absolute; top: -12px; left: 50%; padding: 2px 9px; color: #f4d789; background: #3d271f; border: 1px solid #b4813f; border-radius: 4px; font-size: 9px; font-weight: 900; transform: translateX(-50%); white-space: nowrap; }
.chef-person { position: absolute; top: 18px; left: 50%; width: 48px; height: 72px; transform: translateX(-50%); }
.chef-hat { position: absolute; top: 0; left: 7px; z-index: 3; width: 35px; height: 18px; background: #fffdf4; border: 2px solid #d8d0bd; border-radius: 50% 50% 20% 20%; }
.chef-hat i { position: absolute; top: -7px; width: 14px; height: 14px; background: #fffdf4; border: 2px solid #d8d0bd; border-radius: 50%; }
.chef-hat i:nth-child(1) { left: -2px; }
.chef-hat i:nth-child(2) { left: 9px; top: -10px; }
.chef-hat i:nth-child(3) { right: -2px; }
.chef-head { position: absolute; top: 15px; left: 12px; z-index: 2; width: 26px; height: 27px; background: radial-gradient(circle at 34% 48%, #30221d 0 1px, transparent 1.5px), radial-gradient(circle at 66% 48%, #30221d 0 1px, transparent 1.5px), radial-gradient(ellipse at 50% 72%, #a45f50 0 1px, transparent 1.5px), #e8b889; border: 2px solid #4f3125; border-radius: 48%; }
.chef-body { position: absolute; top: 39px; left: 7px; width: 36px; height: 34px; background: linear-gradient(90deg, #e9eee9, white 50%, #dbe1dc); border: 2px solid #9aaba2; border-radius: 10px 10px 4px 4px; box-shadow: inset 0 -8px 0 var(--chef-trim, #3e7b69); }
.chef-body::after { content: ""; position: absolute; top: 4px; left: 50%; height: 19px; border-left: 2px double #a8aaa5; }
.chef-arm { position: absolute; top: 3px; width: 8px; height: 28px; background: #f5f1e7; border: 2px solid #a6aaa4; border-radius: 6px; transform-origin: top center; }
.arm-left { left: -7px; transform: rotate(18deg); }
.arm-right { right: -7px; transform: rotate(-22deg); }
.chef-counter { position: absolute; left: 5px; right: 5px; bottom: 21px; z-index: 5; height: 17px; background: linear-gradient(#996747, #60402f); border: 2px solid #482e24; border-radius: 3px; }
.cutting-board { position: absolute; left: 8px; top: -5px; width: 31px; height: 9px; background: #d7ad70; border: 1px solid #765034; border-radius: 50%; }
.wok-pan { position: absolute; right: 6px; top: -8px; width: 31px; height: 14px; background: radial-gradient(ellipse at top, #56615e, #1f2927); border: 2px solid #1d2422; border-radius: 0 0 50% 50%; }
.wok-pan::after { content: ""; position: absolute; top: -1px; right: -13px; width: 15px; height: 3px; background: #202724; border-radius: 3px; transform: rotate(-14deg); }
.kitchen-stage small { position: absolute; right: 2px; bottom: 3px; left: 2px; overflow: hidden; color: #f0dcb1; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.steam { position: absolute; top: 20px; right: 9px; z-index: 6; }
.steam i { position: absolute; width: 5px; height: 20px; border-left: 2px solid rgba(255,255,255,0.72); border-radius: 50%; opacity: 0; }
.steam i:nth-child(2) { left: 8px; animation-delay: 220ms !important; }
.steam i:nth-child(3) { left: 15px; animation-delay: 420ms !important; }
.kitchen-stage.skilled { --chef-trim: #447b91; }
.kitchen-stage.master { --chef-trim: #c49a33; }
.kitchen-stage.master .chef-hat { border-color: #c99d3d; box-shadow: 0 -3px 0 #e8bf57; }
.kitchen-stage.working .arm-left { animation: chef-chop 380ms ease-in-out infinite alternate; }
.kitchen-stage.working .arm-right { animation: chef-stir 650ms ease-in-out infinite alternate; }
.kitchen-stage.working .wok-pan { animation: wok-toss 850ms ease-in-out infinite; }
.kitchen-stage.working .steam i { animation: kitchen-steam 1.4s ease-out infinite; }

@keyframes chef-chop { to { transform: rotate(-28deg) translateY(3px); } }
@keyframes chef-stir { to { transform: rotate(38deg) translate(4px, 2px); } }
@keyframes wok-toss { 45% { transform: translateY(-4px) rotate(5deg); } }
@keyframes kitchen-steam { from { opacity: 0; transform: translateY(8px) scale(.7); } 35% { opacity: .8; } to { opacity: 0; transform: translateY(-18px) scale(1.2); } }

.tables-grid {
  position: absolute;
  inset: 88px 6% 60px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--table-columns, 3), 1fr);
  grid-auto-rows: 1fr;
  gap: 10px 6%;
}

.table-scene { position: relative; min-width: 0; }

.table-top {
  position: absolute;
  top: 42%;
  left: 50%;
  width: clamp(75px, 10vw, 125px);
  height: clamp(42px, 6vw, 66px);
  background: radial-gradient(circle, #c54530 0 13%, #8e2019 14% 63%, #5f1d17 65%);
  border: 4px solid #54241b;
  border-radius: 50%;
  box-shadow: 0 10px 0 #4f2b20, 0 14px 10px rgba(42, 20, 12, 0.3);
  transform: translate(-50%, -50%);
}

.table-top::after {
  content: "茶";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 25px;
  height: 19px;
  place-items: center;
  color: #765337;
  background: #e9d8ac;
  border-radius: 50%;
  font-size: 9px;
  transform: translate(-50%, -50%);
}

.customer {
  position: absolute;
  z-index: 2;
  width: 35px;
  height: 43px;
  color: #43281c;
  text-align: center;
  background: var(--robe, #446d61);
  border-radius: 45% 45% 7px 7px;
  font-family: system-ui, sans-serif;
  font-size: 18px;
  filter: drop-shadow(0 4px 3px rgba(45, 25, 14, 0.2));
}

.customer::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: -11px auto 1px;
  background: #e6bc8c;
  border: 3px solid #4c2b20;
  border-radius: 50%;
}

.customer-left { top: 31%; left: 4%; }
.customer-right { top: 31%; right: 4%; }
.customer.waiting::after {
  content: "…";
  position: absolute;
  top: -27px;
  right: -16px;
  padding: 0 6px 3px;
  background: white;
  border-radius: 8px;
  font-weight: 900;
}

.customer.empty { opacity: 0.18; filter: grayscale(1); }
.table-number {
  position: absolute;
  bottom: 2px;
  left: 50%;
  padding: 2px 6px;
  color: #f5e6c8;
  background: rgba(71, 35, 25, 0.75);
  font: 9px system-ui, sans-serif;
  transform: translateX(-50%);
}

.host-stand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  max-width: 260px;
  padding: 7px 10px;
  color: #f8e9c7;
  background: rgba(52, 25, 18, 0.88);
  border: 1px solid #c8994a;
  font-size: 11px;
}

.chef-activity {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(280px, calc(100% - 290px));
  min-width: 225px;
  padding: 8px 10px;
  color: #f8e9c7;
  background: rgba(48, 26, 20, 0.93);
  border: 1px solid #bb8742;
  box-shadow: 0 5px 16px rgba(42, 22, 14, 0.25);
}

.activity-avatar {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  background: #e9c574;
  border: 2px solid #f1d898;
  border-radius: 50%;
  font: 24px system-ui, sans-serif;
}

.chef-activity.working .activity-avatar { animation: chef-bob 0.8s ease-in-out infinite alternate; }

@keyframes chef-bob {
  to { transform: translateY(-3px) rotate(3deg); }
}

.activity-copy { flex: 1; min-width: 0; }
.activity-copy strong, .activity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy strong { margin: 2px 0; font-size: 12px; }
.activity-copy small { color: #d8bd8a; font: 9px system-ui, sans-serif; }
.activity-label { display: flex; align-items: center; color: #79c49e; font: 8px system-ui, sans-serif; font-weight: 900; letter-spacing: 0.08em; }
.activity-label i { width: 6px; height: 6px; margin-right: 5px; background: #65c497; border-radius: 50%; box-shadow: 0 0 0 3px rgba(101, 196, 151, 0.16); }
.chef-activity.paused .activity-label { color: #d8b16a; }
.chef-activity.paused .activity-label i { background: #d8a64b; box-shadow: none; }
.activity-progress { display: block; height: 4px; margin-top: 5px; overflow: hidden; background: #21110e; }
.activity-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #d49a3d, #f0cf75); transition: width 180ms linear; }

.host-avatar {
  margin-right: 8px;
  padding: 5px;
  color: #521a14;
  background: #e9bc59;
  font-weight: 900;
  white-space: nowrap;
}

.recipe-panel { padding: 18px; overflow-y: auto; }

.empty-recipe {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.empty-recipe h2 { margin: 5px 0 10px; color: var(--ink); }
.empty-recipe > p:last-child { max-width: 210px; font-size: 13px; line-height: 1.8; }

.cloche {
  display: grid;
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
  place-items: center;
  color: #f1cc7a;
  background: var(--red);
  border: 7px double #d5a64b;
  border-radius: 50%;
  font-size: 36px;
}

.recipe-title-row { gap: 10px; padding-bottom: 13px; border-bottom: 1px solid #dac398; }
.recipe-title-row .dish-icon { width: 50px; height: 50px; flex: 0 0 auto; font-size: 28px; }
.recipe-title-row h2 { font-size: 21px; }
.recipe-price { margin-left: auto; color: var(--red); font-weight: 900; white-space: nowrap; }

.recipe-story {
  margin: 14px 0;
  color: #6f594e;
  font-size: 12px;
  line-height: 1.7;
}

.recipe-section { margin-top: 15px; }

.section-label {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.recipe-ingredients { display: flex; flex-wrap: wrap; gap: 6px; }

.recipe-chip {
  padding: 5px 8px;
  background: #f1e1c2;
  border: 1px solid #dfc79a;
  font: 11px system-ui, sans-serif;
}

.recipe-chip.missing { color: #a62219; background: #f8d9cf; border-color: #dfa195; }

.recipe-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  counter-reset: recipe-step;
  list-style: none;
}

.recipe-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  color: #6f594e;
  background: #fbf4e6;
  font-size: 11px;
}

.recipe-steps li::before {
  counter-increment: recipe-step;
  content: counter(recipe-step);
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--jade);
  border-radius: 50%;
  font: 10px system-ui, sans-serif;
}

.primary-button {
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  color: white;
  background: linear-gradient(#b33a2d, #8c2119);
  border: 1px solid #701812;
  box-shadow: inset 0 0 0 2px rgba(255, 215, 135, 0.25);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.primary-button:disabled { cursor: not-allowed; filter: grayscale(0.8); opacity: 0.55; }

.staff-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 92px;
  margin-top: 14px;
}

.staff-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: #f5e5c7;
  border-right: 1px solid #d8bd8a;
}

.staff-heading > p {
  max-width: 105px;
  color: var(--muted);
  font: 10px/1.5 system-ui, sans-serif;
}

.chef-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 9px;
}

.chef-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(110deg, #fffaf0, #ead8b7);
  border: 1px solid #d1b67f;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.chef-card:hover:not(:disabled) {
  border-color: var(--red);
  box-shadow: 0 5px 12px rgba(75, 36, 22, 0.14);
  transform: translateY(-2px);
}

.chef-card:disabled { cursor: not-allowed; opacity: 0.58; }
.chef-card.working { color: #f8e8c5; background: linear-gradient(110deg, #623025, #8c2a20); border-color: #b9833c; opacity: 1; }
.chef-card.active-chef { border-color: var(--red); box-shadow: inset 4px 0 var(--red); }
.chef-card.active-chef:not(.working) { background: linear-gradient(110deg, #fff8e8, #efd7a6); }
.chef-card.locked .chef-avatar { filter: grayscale(1); }
.restaurant-upgrade { background: linear-gradient(110deg, #fff8e8, #e8d09d); }
.restaurant-upgrade .chef-avatar { background: #a52d22; border-color: #d6a54b; }
.restaurant-upgrade.maxed { border-color: #5e8b75; box-shadow: inset 4px 0 #477560; }

.chef-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #f1d69d;
  border: 1px solid #d4ad65;
  border-radius: 50%;
  font-family: system-ui, sans-serif;
  font-size: 24px;
}

.master .chef-avatar { color: #8b2119; background: #e9bf59; }
.chef-copy { min-width: 0; }
.chef-copy strong { display: block; font-size: 14px; white-space: nowrap; }
.chef-copy small { display: block; margin-top: 3px; color: var(--muted); font: 10px system-ui, sans-serif; white-space: nowrap; }
.working .chef-copy small { color: #e5c995; }
.chef-price { color: var(--red); font: 11px system-ui, sans-serif; font-weight: 900; white-space: nowrap; }
.working .chef-price { color: #f4ce77; }

.cooking-station {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) minmax(210px, 1.2fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  color: #fff0d2;
  background:
    radial-gradient(circle at 60% 100%, rgba(224, 95, 38, 0.3), transparent 22%),
    linear-gradient(100deg, #371e18, #663021);
  border: 2px solid #bd8741;
  box-shadow: var(--shadow);
}

.cooking-title { gap: 9px; white-space: nowrap; }
.cooking-title .eyebrow { color: #cda967; }
.cooking-title h2 { font-size: 17px; }

.wok-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #422117;
  background: #d8a949;
  border-radius: 50% 50% 45% 45%;
  font-weight: 900;
}

.prep-bowl {
  min-height: 52px;
  padding: 8px 12px;
  color: #49271d;
  background: #ead3a7;
  border: 3px solid #9d6b35;
  border-radius: 5px 5px 40% 40%;
}

.bowl-label { display: block; color: #9b2a20; font: 9px system-ui, sans-serif; font-weight: 900; }
.bowl-items { margin-top: 4px; font: 12px system-ui, sans-serif; }

.cooking-progress-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 11px; }
.cooking-progress-label span { color: #d5b98c; }
.cooking-progress { height: 8px; background: #25120e; border: 1px solid #93683c; }
.cooking-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #d09339, #f4d275); transition: width 0.12s linear; }

.action-buttons { display: flex; gap: 6px; }

.action-button {
  min-width: 61px;
  padding: 9px 10px;
  color: #47241b;
  background: #ebce8b;
  border: 1px solid #c28a38;
  cursor: pointer;
  font-weight: 900;
}

.action-button:disabled { cursor: not-allowed; opacity: 0.28; }
.action-button.current { color: white; background: var(--red); }

.cancel-button {
  padding: 8px 10px;
  color: #d8b67b;
  background: transparent;
  border: 1px solid #8f6c47;
  cursor: pointer;
}

.pantry {
  display: grid;
  grid-template-columns: 185px 1fr;
  min-height: 135px;
  margin-top: 14px;
}

.pantry-heading { min-height: 100%; border-right: 1px solid #d8bd8a; border-bottom: 0; }
.pantry-heading { align-items: flex-start; justify-content: center; flex-direction: column; }
.pantry-heading h2 { font-size: 16px; }
.mode-badge { margin-top: 12px; }
.mode-badge.cooking { color: #f9e3aa; background: var(--red); border-color: var(--red-dark); }

.ingredient-list {
  display: grid;
  grid-template-columns: repeat(10, minmax(74px, 1fr));
  align-items: stretch;
  gap: 7px;
  padding: 10px;
  overflow-x: auto;
}

.ingredient-card {
  position: relative;
  min-width: 72px;
  padding: 8px 5px 6px;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(#fffaf0, #ead8b7);
  border: 1px solid #d1b67f;
  cursor: pointer;
  transition: transform 130ms ease, background 130ms ease;
}

.ingredient-card:hover { z-index: 3; background: #fff9e8; transform: translateY(-3px); }
.ingredient-card.needed { border: 2px solid #bd3d2c; box-shadow: 0 0 0 2px rgba(189, 61, 44, 0.13); }
.ingredient-card.complete { border-color: #4a7b66; opacity: 0.62; }
.ingredient-card.out { filter: grayscale(0.75); }

.ingredient-icon { display: block; height: 34px; font-family: system-ui, sans-serif; font-size: 28px; }
.ingredient-name { display: block; margin: 2px 0; font-size: 12px; font-weight: 900; }
.ingredient-meta { color: var(--muted); font: 9px system-ui, sans-serif; }

.stock-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  color: white;
  background: var(--jade);
  border-radius: 50%;
  font: 10px system-ui, sans-serif;
  font-weight: 900;
}

.stock-badge.low { background: var(--red); }

.toast-region {
  position: fixed;
  top: 100px;
  right: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  padding: 11px 14px;
  color: #fff5d9;
  background: rgba(59, 30, 22, 0.96);
  border-left: 4px solid #d5a54a;
  box-shadow: 0 8px 22px rgba(47, 23, 15, 0.25);
  font: 12px system-ui, sans-serif;
  animation: toast-in 220ms ease, toast-out 250ms 2.75s forwards;
}

.toast.danger { border-left-color: #d84432; }
.toast.success { border-left-color: #56a77f; }

@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

.help-dialog {
  width: min(540px, calc(100% - 28px));
  padding: 30px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid #bd8741;
  box-shadow: 0 25px 90px rgba(42, 15, 10, 0.55);
}

.help-dialog::backdrop { background: rgba(39, 17, 12, 0.72); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 8px; right: 10px; color: var(--red); background: none; border: 0; cursor: pointer; font-size: 28px; }
.help-dialog h2 { margin: 4px 0 20px; font-size: 27px; }
.help-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help-steps > div { display: flex; gap: 10px; padding: 11px; background: #efe0c3; }
.help-steps b { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; color: #f7e7c5; background: var(--red); border-radius: 50%; }
.help-steps p { color: var(--muted); font: 12px/1.6 system-ui, sans-serif; }
.help-steps strong { color: var(--ink); }
.help-warning { margin-top: 15px; color: var(--red); font: 11px/1.6 system-ui, sans-serif; }

.result-dialog {
  width: min(500px, calc(100% - 28px));
  padding: 34px;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(135deg, transparent 0 20px, rgba(159, 39, 30, 0.08) 21px 23px, transparent 24px),
    var(--paper);
  border: 3px double #b67c2d;
  box-shadow: 0 25px 90px rgba(42, 15, 10, 0.6);
}

.result-dialog::backdrop { background: rgba(39, 17, 12, 0.78); backdrop-filter: blur(5px); }

.result-seal {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  place-items: center;
  color: #f8dda0;
  background: var(--red);
  border: 5px double #d4a343;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 900;
  transform: rotate(-4deg);
}

.result-dialog h2 { margin: 4px 0 10px; font-size: 30px; }
.result-message { color: var(--muted); font: 13px/1.7 system-ui, sans-serif; }

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px 0 8px;
}

.result-stats > div { padding: 12px 5px; background: #ead8b7; border: 1px solid #d3b579; }
.result-stats span { display: block; margin-bottom: 4px; color: var(--muted); font: 10px system-ui, sans-serif; }
.result-stats strong { color: var(--red); font-size: 20px; }

.room-header,
.panel-heading,
.pantry-heading { background: #fff6e2; }

.room-header h2,
.panel-heading h2,
.pantry-heading h2,
.recipe-panel h2,
.staff-heading h2 { font-weight: 850; }

.order-main { min-height: 68px; }
.order-info strong { font-size: 15px; }
.order-info small { font-size: 11px; }
.order-price { font-size: 14px; }
.patience-bar { height: 9px; border-radius: 0 0 10px 10px; overflow: hidden; }

.recipe-panel { background: #fffaf0; }
.recipe-chip,
.recipe-steps li { border-radius: 9px; font-size: 12px; }
.recipe-story { font-size: 13px; }

.primary-button,
.action-button,
.cancel-button {
  min-height: 44px;
  border-radius: 10px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(#e66a59, #c94843);
  border: 0;
  box-shadow: 0 5px 12px rgba(184, 60, 55, 0.2);
}

.staff-panel { background: #fffaf0; }
.staff-heading { background: #f3ead3; }
.chef-card {
  min-height: 68px;
  background: linear-gradient(110deg, #fffdf7, #f6e8cb);
  border: 2px solid #e2c896;
  border-radius: 12px;
}
.chef-copy strong { font-size: 15px; }
.chef-copy small { font-size: 11px; }
.chef-price { padding: 4px 7px; background: rgba(255,255,255,0.55); border-radius: 999px; }
.chef-card.working { background: linear-gradient(110deg, #267867, #3d927b); border-color: #9bd1b8; }
.chef-card.active-chef { border-color: #e15c50; }

.cooking-station {
  background: linear-gradient(105deg, #315f58, #437f70);
  border: 2px solid #8bc4ad;
  border-radius: 16px;
}

.ingredient-card {
  min-height: 92px;
  background: linear-gradient(#fffef9, #f3e4c7);
  border: 2px solid #dfc793;
  border-radius: 12px;
}
.ingredient-name { font-size: 13px; }
.ingredient-meta { font-size: 10px; }

.chef-activity,
.host-stand {
  border-radius: 12px;
  background: rgba(48, 68, 61, 0.94);
  border-color: #a8d3be;
}
.activity-label { font-size: 10px; }
.activity-copy small { font-size: 10px; }

.toast {
  color: #fffef8;
  background: rgba(48, 69, 62, 0.96);
  border-radius: 10px;
  font-size: 13px;
}

.help-dialog,
.result-dialog {
  border: 2px solid #e0bd78;
  border-radius: 18px;
}
.help-steps > div,
.result-stats > div { border-radius: 10px; }
.help-steps p { font-size: 13px; }
.help-warning { font-size: 12px; }

.restaurant-room {
  background:
    linear-gradient(105deg, transparent 0 62%, rgba(255, 236, 178, 0.16) 62% 74%, transparent 74%),
    repeating-linear-gradient(0deg, rgba(116, 73, 39, 0.05) 0 1px, transparent 1px 46px),
    linear-gradient(#e7d6ad 0 56%, #a56f46 56% 57%, #865332 57% 100%);
  box-shadow: inset 0 15px 35px rgba(255,255,255,0.28), inset 0 -18px 30px rgba(48, 24, 13, 0.16);
}

.restaurant-room::after {
  inset: 57% 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(48, 26, 14, 0.22) 73px 75px),
    repeating-linear-gradient(0deg, transparent 0 62px, rgba(255,255,255,0.08) 63px 64px),
    linear-gradient(90deg, rgba(255,255,255,0.07), transparent 28%, rgba(24,12,7,0.1));
}

.window {
  background: linear-gradient(90deg, #68412f, #8b5a3e 50%, #5c392b);
  border-color: #4d2d21;
  border-radius: 3px;
  box-shadow: 0 7px 13px rgba(54, 30, 18, 0.24), inset 0 0 0 2px rgba(230, 180, 105, 0.2);
}
.window span {
  background:
    linear-gradient(150deg, rgba(255,255,255,0.55), transparent 34%),
    linear-gradient(#9bc8cf 0 52%, #b7cfac 53% 72%, #e1ca96 73%);
  box-shadow: inset 0 0 10px rgba(64, 99, 95, 0.2);
}

.plaque {
  background: linear-gradient(#5b3425, #352018);
  border: 3px ridge #bd8b42;
  box-shadow: 0 6px 10px rgba(53, 29, 17, 0.25), inset 0 0 8px rgba(255, 210, 115, 0.12);
}

.lantern b {
  background:
    repeating-linear-gradient(90deg, rgba(85, 12, 10, 0.26) 0 2px, transparent 2px 8px),
    radial-gradient(ellipse at 50% 42%, #ec6b48, #b1261c 68%, #791812);
  border-block: 3px solid #6e1b16;
  box-shadow: 0 7px 14px rgba(117, 22, 16, 0.38), 0 0 22px rgba(232, 104, 54, 0.18);
}

.table-top {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255,255,255,0.08) 0 25%, transparent 27%),
    repeating-radial-gradient(ellipse at center, rgba(71, 32, 18, 0.13) 0 2px, transparent 3px 9px),
    radial-gradient(ellipse, #a64d31 0 56%, #75321f 58% 72%, #4b251b 74%);
  border: 4px solid #4b2a20;
  box-shadow: 0 9px 0 #4c2b20, 0 13px 3px rgba(42, 20, 12, 0.2), 0 18px 14px rgba(42, 20, 12, 0.28);
}

.table-top::before {
  content: "";
  position: absolute;
  inset: 16% 12%;
  background:
    radial-gradient(ellipse at 18% 50%, #f8f1df 0 7%, #c7b99d 8% 10%, transparent 11%),
    radial-gradient(ellipse at 82% 50%, #f8f1df 0 7%, #c7b99d 8% 10%, transparent 11%),
    radial-gradient(ellipse at 50% 26%, #e8d6ad 0 5%, #8b6038 6% 8%, transparent 9%);
  filter: drop-shadow(0 2px 1px rgba(44, 22, 12, 0.26));
}

.table-top::after {
  content: "🍵";
  width: 24px;
  height: 19px;
  color: inherit;
  background: rgba(242, 229, 191, 0.9);
  box-shadow: 0 2px 3px rgba(49, 26, 14, 0.25);
  font: 12px system-ui, sans-serif;
}

.customer {
  background: linear-gradient(100deg, color-mix(in srgb, var(--robe, #446d61), #1e1713 18%), var(--robe, #446d61) 48%, color-mix(in srgb, var(--robe, #446d61), white 13%));
  border: 1px solid rgba(48, 27, 20, 0.4);
  border-radius: 48% 48% 8px 8px;
  box-shadow: inset 5px 0 8px rgba(255,255,255,0.09), inset -5px 0 8px rgba(35,19,13,0.12);
}

.customer::before {
  background:
    radial-gradient(circle at 34% 48%, #33221b 0 1px, transparent 1.5px),
    radial-gradient(circle at 66% 48%, #33221b 0 1px, transparent 1.5px),
    radial-gradient(ellipse at 50% 72%, #a86556 0 1px, transparent 1.5px),
    linear-gradient(#553526 0 24%, #e8bd8f 25% 100%);
  border: 2px solid #503125;
  box-shadow: inset 3px 0 5px rgba(255,255,255,0.16), 0 2px 3px rgba(52,28,18,0.25);
}

.customer-left.entering { animation: customer-enter-left 1.2s cubic-bezier(.2,.8,.25,1) both; }
.customer-right.entering { animation: customer-enter-right 1.2s cubic-bezier(.2,.8,.25,1) both; }

@keyframes customer-enter-left {
  from { opacity: 0; transform: translate(190%, -170%) scale(0.72); }
  70% { opacity: 1; transform: translate(8%, -4%) scale(1.02); }
  to { transform: translate(0, 0) scale(1); }
}

@keyframes customer-enter-right {
  from { opacity: 0; transform: translate(-190%, -170%) scale(0.72); }
  70% { opacity: 1; transform: translate(-8%, -4%) scale(1.02); }
  to { transform: translate(0, 0) scale(1); }
}

.serving-chef {
  position: absolute;
  top: 20%;
  left: -45%;
  z-index: 8;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 5px 3px rgba(47, 24, 14, 0.3));
  animation: serve-to-table 1.3s cubic-bezier(.25,.75,.25,1) forwards;
}
.walking-chef { position: relative; display: block; width: 31px; height: 51px; animation: walking-chef-step 240ms ease-in-out infinite alternate; }
.walking-hat { position: absolute; top: 0; left: 3px; z-index: 3; width: 26px; height: 12px; background: white; border: 1px solid #cfc8b8; border-radius: 50% 50% 20% 20%; box-shadow: -4px -3px 0 -1px white, 4px -3px 0 -1px white; }
.walking-head { position: absolute; top: 10px; left: 7px; z-index: 2; width: 19px; height: 20px; background: radial-gradient(circle at 34% 48%, #30211b 0 1px, transparent 1.4px), radial-gradient(circle at 66% 48%, #30211b 0 1px, transparent 1.4px), #e7b486; border: 1px solid #503025; border-radius: 48%; }
.walking-body { position: absolute; top: 27px; left: 3px; width: 27px; height: 23px; background: linear-gradient(90deg, #e6ebe6, white 50%, #d5ddd6); border: 1px solid #899990; border-radius: 7px 7px 3px 3px; box-shadow: inset 0 -6px 0 var(--walking-trim, #3e7b69); }
.walking-body::before, .walking-body::after { content: ""; position: absolute; bottom: -6px; width: 7px; height: 9px; background: #343b38; border-radius: 0 0 3px 3px; }
.walking-body::before { left: 4px; transform: rotate(7deg); }
.walking-body::after { right: 4px; transform: rotate(-7deg); }
.serving-chef.skilled { --walking-trim: #447b91; }
.serving-chef.master { --walking-trim: #c49a33; }
.serving-chef.owner { --walking-trim: #a54d43; }
.serving-chef i {
  display: grid;
  width: 31px;
  height: 20px;
  margin-left: -5px;
  place-items: center;
  background: #f4ead2;
  border: 2px solid #b9a886;
  border-radius: 50%;
  font: 16px system-ui, sans-serif;
  box-shadow: 0 3px 4px rgba(49,26,14,.28);
}

@keyframes walking-chef-step { to { transform: translateY(-2px) rotate(1deg); } }

@keyframes serve-to-table {
  0% { opacity: 0; transform: translate(-30%, 45%) scale(0.8); }
  20% { opacity: 1; }
  82% { opacity: 1; transform: translate(210%, 28%) scale(1); }
  100% { opacity: 0; transform: translate(235%, 28%) scale(1); }
}

.meal-dish {
  position: absolute;
  top: 32%;
  left: 50%;
  z-index: 5;
  display: grid;
  width: 34px;
  height: 23px;
  place-items: center;
  background: #f7efdc;
  border: 2px solid #c7b896;
  border-radius: 50%;
  box-shadow: 0 3px 4px rgba(49,26,14,0.3);
  font: 18px system-ui, sans-serif;
  transform: translate(-50%, -50%);
  animation: meal-arrive 300ms ease-out both;
}

@keyframes meal-arrive {
  from { opacity: 0; transform: translate(-50%, -85%) scale(0.65); }
}

.customer.eating { animation: customer-eat 0.65s ease-in-out infinite alternate; }
.customer.eating::after {
  content: "😋";
  position: absolute;
  top: -30px;
  right: -15px;
  padding: 2px 5px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(50,26,15,0.18);
  font: 14px system-ui, sans-serif;
}

@keyframes customer-eat {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(2px) rotate(2deg); }
}

.customer-left.leaving { animation: customer-leave-left 1.2s cubic-bezier(.65,0,.8,.35) both; }
.customer-right.leaving { animation: customer-leave-right 1.2s cubic-bezier(.65,0,.8,.35) both; }

@keyframes customer-leave-left {
  20% { transform: translateY(-4px) scale(1.02); }
  to { opacity: 0; transform: translate(190%, -170%) scale(.72); }
}

@keyframes customer-leave-right {
  20% { transform: translateY(-4px) scale(1.02); }
  to { opacity: 0; transform: translate(-190%, -170%) scale(.72); }
}

.timers-paused .customer,
.timers-paused .serving-chef,
.timers-paused .meal-dish,
.timers-paused .rush-alert,
.timers-paused .kitchen-stage *,
.timers-paused .kitchen-stage *::before,
.timers-paused .kitchen-stage *::after { animation-play-state: paused !important; }

.customer.empty { opacity: 0; }

.table-top { width: min(90%, 125px); height: min(58%, 66px); min-height: 38px; }

.floor-shadow { background: rgba(43, 22, 13, 0.23); filter: blur(13px); }

.customer-dialog {
  width: min(980px, calc(100% - 28px));
  max-height: min(88vh, 860px);
  padding: 26px;
  color: var(--ink);
  background: #fff9ec;
  border: 2px solid #dfbb73;
  border-radius: 20px;
  box-shadow: 0 25px 90px rgba(42, 31, 20, 0.45);
}

.customer-dialog::backdrop { background: rgba(36, 47, 43, 0.7); backdrop-filter: blur(4px); }
.customer-dialog-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.customer-dialog-header h2 { margin: 4px 0 5px; font-size: 29px; }
.customer-dialog-header > div > p:last-child { color: var(--muted); font-size: 13px; }

.customer-order-capacity {
  min-width: 105px;
  padding: 9px 13px;
  color: var(--muted);
  text-align: center;
  background: #f5e6c7;
  border-radius: 12px;
  font-size: 12px;
}
.customer-order-capacity strong { display: block; color: var(--red); font-size: 21px; }

.friend-name-field { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.friend-name-field span { font-size: 13px; font-weight: 900; white-space: nowrap; }
.friend-name-field input {
  width: min(360px, 100%);
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ink);
  background: white;
  border: 2px solid #d8bd88;
  border-radius: 10px;
  font: 14px ui-rounded, "PingFang SC", system-ui, sans-serif;
}

.customer-order-cart {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  padding: 10px 12px;
  background: #f5ead3;
  border: 1px solid #dfc797;
  border-radius: 12px;
}
.customer-cart-heading strong, .customer-cart-heading small { display: block; }
.customer-cart-heading strong { font-size: 13px; }
.customer-cart-heading small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.customer-order-list { display: flex; gap: 7px; overflow-x: auto; padding: 2px; }
.customer-cart-empty { color: var(--muted); font-size: 12px; }

.customer-order-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 6px 7px 6px 10px;
  background: white;
  border: 1px solid #ddc28e;
  border-radius: 999px;
}
.customer-order-item span { font-size: 12px; font-weight: 800; white-space: nowrap; }
.customer-order-item small { color: var(--red); font-size: 9px; white-space: nowrap; }
.customer-cancel-order {
  min-height: 32px;
  padding: 4px 9px;
  color: white;
  background: var(--red);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}
.customer-cancel-order:hover { background: var(--red-dark); }

.customer-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  max-height: 53vh;
  padding: 3px;
  overflow-y: auto;
}

.customer-dish-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  background: white;
  border: 2px solid #e4cea2;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.customer-dish-card:hover:not(:disabled) { border-color: var(--red); box-shadow: 0 5px 12px rgba(83,57,42,0.12); transform: translateY(-2px); }
.customer-dish-card:disabled { cursor: not-allowed; opacity: 0.48; }
.customer-dish-icon { font: 29px system-ui, sans-serif; }
.customer-dish-card strong { display: block; font-size: 13px; }
.customer-dish-card small { color: var(--muted); font-size: 10px; }
.customer-dish-price { color: var(--red); font-size: 12px; font-weight: 900; }

.customer-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #dfc797; }
.customer-dialog-footer p { color: var(--muted); font-size: 12px; }
.customer-dialog-actions { display: flex; align-items: center; gap: 8px; }
.customer-dialog-actions .primary-button { width: auto; min-width: 210px; margin: 0; padding-inline: 20px; }
.customer-dialog-actions .cancel-button { color: var(--red); background: white; border: 2px solid #d5a49b; }

body[data-age-mode="child"] {
  --red: #ef6657;
  --red-dark: #bd403d;
  --gold: #f1b943;
  --jade: #318b78;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 193, 76, 0.38), transparent 20rem),
    radial-gradient(circle at 92% 12%, rgba(76, 190, 174, 0.28), transparent 22rem),
    linear-gradient(145deg, #fff3cf, #fce9dc 55%, #dff3ea);
}

body[data-age-mode="child"] .topbar { background: linear-gradient(105deg, #e34f4a, #f17c59 62%, #efa649); }
body[data-age-mode="child"] .panel-frame { border-color: #e8bf70; }
body[data-age-mode="child"] .ingredient-icon,
body[data-age-mode="child"] .order-dish-icon { filter: saturate(1.15); }

body[data-age-mode="senior"] {
  --ink: #171717;
  --muted: #4c443e;
  --red: #b53131;
  --red-dark: #7e1e1e;
  --jade: #165f50;
  --paper: #fffdf5;
  background: #f7f1df;
}

body[data-age-mode="senior"] .topbar { background: #285f55; border-color: #f0cc70; }
body[data-age-mode="senior"] .panel-frame { border-color: #88765a; box-shadow: 0 5px 15px rgba(20, 20, 20, 0.12); }
body[data-age-mode="senior"] .eyebrow { font-size: 13px; letter-spacing: 0.08em; }
body[data-age-mode="senior"] h2 { font-size: 23px; }
body[data-age-mode="senior"] .order-info strong,
body[data-age-mode="senior"] .chef-copy strong,
body[data-age-mode="senior"] .ingredient-name { font-size: 17px; }
body[data-age-mode="senior"] .order-info small,
body[data-age-mode="senior"] .chef-copy small,
body[data-age-mode="senior"] .ingredient-meta,
body[data-age-mode="senior"] .recipe-story,
body[data-age-mode="senior"] .recipe-chip,
body[data-age-mode="senior"] .recipe-steps li,
body[data-age-mode="senior"] .customer-dish-card small,
body[data-age-mode="senior"] .customer-dialog-header > div > p:last-child { font-size: 14px; }
body[data-age-mode="senior"] .customer-dish-card strong { font-size: 17px; }
body[data-age-mode="senior"] .primary-button,
body[data-age-mode="senior"] .action-button,
body[data-age-mode="senior"] .cancel-button { min-height: 52px; }
body[data-age-mode="senior"] .chef-card { min-height: 76px; }
body[data-age-mode="senior"] .ingredient-card { min-height: 104px; }
body[data-age-mode="senior"] .activity-label,
body[data-age-mode="senior"] .activity-copy small { font-size: 12px; }
body[data-age-mode="senior"] .rush-alert strong,
body[data-age-mode="senior"] .rush-alert small,
body[data-age-mode="senior"] .table-number { font-size: 12px; }
body[data-age-mode="senior"] .serving-chef { left: 48%; opacity: 1; transform: translateY(28%); }
body[data-age-mode="senior"] *,
body[data-age-mode="senior"] *::before,
body[data-age-mode="senior"] *::after { animation: none !important; transition: none !important; }

.chef-copy small,
.chef-price { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1120px) {
  .game-board { grid-template-columns: 210px minmax(420px, 1fr); height: auto; }
  .orders-panel, .restaurant-panel { height: 560px; }
  .recipe-panel { grid-column: 1 / -1; min-height: 285px; }
  .empty-recipe { min-height: 240px; }
  .recipe-content { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .recipe-title-row, .recipe-story { grid-column: 1; }
  .recipe-section { grid-column: 2; }
  .recipe-section + .recipe-section { margin-top: 8px; }
  .primary-button { grid-column: 1; }
  .cooking-station { grid-template-columns: auto 1fr 1fr; }
  .action-buttons { grid-column: 2; }
  .cancel-button { grid-column: 3; grid-row: 2; justify-self: end; }
  .ingredient-list { grid-template-columns: repeat(10, 86px); }
  .staff-panel { grid-template-columns: 170px 1fr; }
  .staff-heading > p { display: none; }
  .chef-card { grid-template-columns: auto 1fr; }
  .chef-price { grid-column: 2; }
}

@media (max-width: 900px) {
  .restaurant-status .status-item:first-child,
  .restaurant-status .streak-status { display: none; }
}

@media (max-width: 720px) {
  body { background: linear-gradient(#fff2d8, #e9f2e8); }
  .game-shell { padding: 8px; }
  .topbar { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 9px 12px; }
  .restaurant-status { grid-column: 1 / -1; justify-content: center; gap: 6px; margin-top: 6px; }
  .brand-seal { width: 40px; height: 40px; }
  .brand .eyebrow, .status-item { display: none; }
  .brand h1 { font-size: 19px; }
  .money-card { min-width: 92px; padding: 5px 8px; }
  .money-card strong { font-size: 18px; }
  .round-button { width: 40px; height: 40px; }
  .pause-button { min-width: 40px; width: 40px; padding: 0; }
  .pause-button b { display: none; }
  .age-mode-switch { width: 100%; }
  .mode-switch-label { display: none; }
  .age-mode-switch button { flex: 1; min-width: 0; padding-inline: 5px; }
  .age-mode-switch b { font-size: 12px; }
  .age-mode-switch small { font-size: 9px; }
  .customer-dialog { padding: 20px 12px; }
  .customer-dialog-header { align-items: flex-start; }
  .customer-dialog-header h2 { font-size: 23px; }
  .customer-dialog-header > div > p:last-child { display: none; }
  .friend-name-field { align-items: stretch; flex-direction: column; gap: 5px; }
  .friend-name-field input { width: 100%; }
  .customer-order-cart { grid-template-columns: 1fr; gap: 6px; }
  .customer-menu { grid-template-columns: repeat(2, 1fr); max-height: 50vh; }
  .customer-dish-card { grid-template-columns: auto 1fr; }
  .customer-dish-price { grid-column: 2; }
  .customer-dialog-footer { align-items: stretch; flex-direction: column; gap: 8px; }
  .customer-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .customer-dialog-actions .primary-button { width: 100%; min-width: 0; }
  .game-board { display: flex; flex-direction: column; }
  .orders-panel { height: auto; }
  .order-list { height: auto; max-height: 225px; flex-direction: row; overflow-x: auto; }
  .order-card { min-width: 195px; }
  .restaurant-panel { height: 600px; }
  .room-header { min-height: 66px; }
  .room-header h2 { font-size: 15px; }
  .window { width: 78px; height: 72px; }
  .wall-clock { right: 8px; top: 112px; transform: scale(.82); }
  .kitchen-stage { top: 138px; left: 3px; transform: scale(.82); transform-origin: top left; }
  .tables-grid { inset: 88px 2% 112px; grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-auto-rows: 1fr; }
  .lantern-one { left: 20%; }
  .lantern-two { right: 20%; }
  .recipe-panel { min-height: 0; }
  .chef-activity { bottom: 56px; width: calc(100% - 20px); min-width: 0; }
  .activity-copy strong { font-size: 11px; }
  .host-stand { max-width: 180px; }
  .recipe-content { display: block; }
  .staff-panel { grid-template-columns: 1fr; }
  .staff-heading { border-right: 0; border-bottom: 1px solid #d8bd8a; }
  .chef-list { grid-template-columns: repeat(4, minmax(170px, 1fr)); overflow-x: auto; }
  .cooking-station { grid-template-columns: 1fr; }
  .action-buttons, .cancel-button { grid-column: auto; grid-row: auto; justify-self: stretch; }
  .action-buttons { overflow-x: auto; }
  .action-button { flex: 1; }
  .pantry { grid-template-columns: 1fr; }
  .pantry-heading { min-height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid #d8bd8a; }
  .mode-badge { position: absolute; right: 15px; top: 12px; margin: 0; }
  .ingredient-list { grid-template-columns: repeat(10, 82px); }
  .help-steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .serving-chef { left: 48%; opacity: 1; transform: translateY(28%); }
}
