/* =========================================================
   KEBAB CRUSHER — styles
   ========================================================= */
:root {
  /* Layout: fixed 1280x720 stage scaled to fit the window; ticket rail on top,
     one station scene in the middle, chef hint + station tabs along the bottom. */
  --ink: #2a1610;
  --paper: #fff6e4;
  --night: #121a3f;
  --cobalt: #1f3c96;
  --tile: #15a39f;
  --tomato: #e4402f;
  --saffron: #ffb81c;
  --leaf: #3fa652;
  --font-display: "Shrikhand", "Cooper Black", Georgia, serif;
  --font-ui: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --bleed: 320px; /* how far the scenery reaches past the 1280px play area on wide windows */
  --tile-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Crect width='84' height='84' fill='%23f4efe2'/%3E%3Cpath d='M42 12 C48 26 56 34 72 42 C56 50 48 58 42 72 C36 58 28 50 12 42 C28 34 36 26 42 12Z' fill='%231f3c96'/%3E%3Cpath d='M42 24 C45 32 50 37 60 42 C50 47 45 52 42 60 C39 52 34 47 24 42 C34 37 39 32 42 24Z' fill='%23f4efe2'/%3E%3Ccircle cx='42' cy='42' r='8' fill='%23e4402f'/%3E%3Ccircle cx='42' cy='42' r='3.5' fill='%23ffb81c'/%3E%3Cpath d='M0 0 Q14 2 16 16 Q2 14 0 0Z M84 0 Q70 2 68 16 Q82 14 84 0Z M0 84 Q14 82 16 68 Q2 70 0 84Z M84 84 Q70 82 68 68 Q82 70 84 84Z' fill='%2315a39f'/%3E%3Crect x='1' y='1' width='82' height='82' fill='none' stroke='%23d3c8ae' stroke-width='2'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: none;
  overscroll-behavior: none;
}
button { font-family: inherit; color: inherit; }
button:focus-visible { outline: 4px solid #6fd3ff; outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }

/* ---------- Stage ---------- */
#viewport {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #243276 0%, #121a3f 60%, #090d22 100%);
}
#stage {
  position: relative; flex: none;
  width: 1280px; height: 720px;
  overflow: hidden;
  background: #0e1430;
  transform-origin: 50% 50%;
}

/* ---------- Top bar ---------- */
#topbar {
  position: absolute; left: 0; top: 0; z-index: 50;
  width: 100%; height: 96px;
  display: flex;
  background: linear-gradient(#1d2c70, #141f58);
  border-bottom: 4px solid var(--ink);
}
#hud { width: 222px; padding: 8px 8px 8px 14px; display: flex; flex-direction: column; justify-content: center; gap: 7px; color: #fff; }
.hud-row { display: flex; align-items: center; gap: 8px; }
.hud-day { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: #b9c6ff; }
.hud-day b { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: 0; color: var(--saffron); text-shadow: 0 3px 0 var(--ink); }
.hud-money {
  margin-left: auto; padding: 0 10px;
  font-weight: 800; font-size: 23px; line-height: 34px; color: #fff;
  background: #0c1540; border: 3px solid var(--ink); border-radius: 12px;
  font-variant-numeric: tabular-nums;
  transition: transform .2s;
}
.hud-money.bump { animation: bump .5s ease-out; }
.rank-badge { position: relative; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--saffron); font-size: 36px; flex: none; }
.rank-badge b { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 14px; font-weight: 800; color: var(--ink); }
.rank-badge.big { width: 64px; height: 64px; font-size: 64px; }
.rank-badge.big b { font-size: 22px; }
.rank-bar { flex: 1; height: 14px; background: #0c1540; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffe08a, var(--saffron)); transition: width .8s ease; }
.rank-bar.big { flex: none; height: 22px; border-radius: 14px; }
.hud-guests { display: flex; align-items: center; gap: 3px; font-weight: 800; font-size: 16px; color: #cfd8ff; font-variant-numeric: tabular-nums; }
.hud-guests .ico { font-size: 17px; color: #8fa2ff; }

#rail { position: relative; flex: 1; height: 100%; overflow: hidden; }
.rail-wire {
  position: absolute; left: 4px; right: 4px; top: 13px; height: 7px;
  background: linear-gradient(#eef2f5, #8d98a2); border: 2px solid var(--ink); border-radius: 4px;
}
#tickets { position: absolute; left: 8px; right: 8px; top: 4px; bottom: 0; display: flex; align-items: flex-start; }
#rail-empty { position: absolute; left: 0; right: 0; top: 42px; text-align: center; color: #7f8fd6; font-weight: 700; font-size: 16px; pointer-events: none; }

.ticket-mini {
  position: relative; flex: none;
  width: 112px; height: 84px; margin-top: 6px; margin-left: var(--tk-gap, 8px); padding: 7px 6px 4px;
  background: var(--paper);
  border: 3px solid var(--ink); border-radius: 5px 5px 10px 10px;
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
  cursor: pointer; text-align: left;
  transform-origin: 50% 0;
  animation: tk-in .5s cubic-bezier(.2,1.5,.4,1);
  transition: transform .15s, margin .25s;
}
.ticket-mini::before {
  content: ""; position: absolute; left: 50%; top: -13px;
  width: 14px; height: 22px; margin-left: -7px;
  background: #d9a066; border: 2px solid var(--ink); border-radius: 3px;
}
.ticket-mini:first-child { margin-left: 0; }
.ticket-mini.group { background: #ffe6ad; }
.ticket-mini:hover { transform: rotate(-2deg) translateY(2px); z-index: 3; }
.ticket-mini.selected { box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 0 4px var(--saffron); z-index: 2; }
.tm-head { display: flex; align-items: baseline; gap: 4px; font-weight: 800; line-height: 1; }
.tm-num { font-size: 15px; color: var(--tomato); }
.tm-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-body { display: flex; align-items: center; gap: 3px; margin-top: 3px; height: 26px; }
.tm-body .bread-ico { width: 34px; height: 26px; flex: none; }
.tm-meat { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.tm-status {
  position: absolute; left: 4px; right: 4px; bottom: 9px;
  text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .08em; line-height: 16px;
  color: #fff; background: #8a8f99; border-radius: 6px;
}
.tm-status.s-grill { background: #e07b1a; }
.tm-status.s-build { background: var(--leaf); }
.tm-status.s-press { background: var(--cobalt); }
.tm-status.s-pressing { background: var(--tomato); }
.tm-status.s-ready { background: var(--saffron); color: var(--ink); animation: ready-blink .8s infinite alternate; }
.tm-mood { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #e6dcc8; border-radius: 0 0 7px 7px; overflow: hidden; }
.tm-mood i { display: block; height: 100%; width: 100%; background: var(--leaf); transition: width .5s linear, background-color .5s; }

#hud-buttons { width: 128px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.icon-btn {
  width: 50px; height: 50px; padding: 0;
  display: grid; place-items: center;
  font-size: 28px; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink); cursor: pointer;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Stations ---------- */
/* z-index 1 gives the stations their own layer, so nothing inside them (counter, customers, bubbles)
   can ever draw over the HUD, toasts or the overlay screens */
#stations { position: absolute; left: 0; top: 96px; z-index: 1; width: 100%; height: 552px; overflow: hidden; overflow: clip; }
/* Each station keeps a fixed 1280px play area, centred. On windows wider than 16:9 the stage grows
   sideways and the scenery (walls, floors, counters) bleeds out to fill the extra width. */
.station { position: absolute; top: 0; bottom: 0; left: 50%; width: 1280px; margin-left: -640px; display: none; }
.station.active { display: block; animation: st-in .22s ease-out; }

/* ---------- Bottom bar ---------- */
#bottombar {
  position: absolute; left: 0; top: 648px; z-index: 50;
  width: 100%; height: 72px;
  display: flex; align-items: center;
  background: linear-gradient(#1d2c70, #111a4a);
  border-top: 4px solid var(--ink);
}
#hint { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 12px; transition: opacity .3s; }
#hint.off { opacity: 0; pointer-events: none; }
.chef-face { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); }
#hint-text {
  position: relative; flex: 1; margin: 0; min-height: 50px; padding: 4px 12px;
  display: flex; align-items: center;
  font-size: 16px; font-weight: 700; line-height: 1.15;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 14px;
}
#hint-text::before {
  content: ""; position: absolute; left: -12px; top: 50%; margin-top: -8px;
  border: 8px solid transparent; border-right: 11px solid var(--ink); border-left: 0;
}
#hint-text.flash { animation: hint-flash .6s ease-out; }
#tabs { flex: none; display: flex; gap: 8px; padding-right: 12px; }
.tab {
  position: relative; width: 166px; height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 20px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: #2b3d8f;
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink); cursor: pointer;
  transition: background .15s, transform .08s, box-shadow .08s;
}
.tab .ico { font-size: 32px; }
.tab:hover { background: #3a4fa8; }
.tab.active { background: var(--saffron); color: var(--ink); transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tab .badge {
  position: absolute; top: -12px; right: -8px;
  min-width: 26px; height: 26px; padding: 0 6px;
  display: none; align-items: center; justify-content: center;
  font-style: normal; font-size: 14px; font-weight: 800; color: #fff;
  background: var(--tomato); border: 3px solid var(--ink); border-radius: 13px;
}
.tab .badge.on { display: flex; }
.tab.alert:not(.active) { animation: tab-alert .8s ease-in-out infinite; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-ui); font-weight: 800; font-size: 20px; line-height: 1;
  letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--tomato);
  padding: 12px 18px;
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 0 6px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, filter .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .5; filter: saturate(.3); cursor: default; transform: none; box-shadow: 0 6px 0 var(--ink); }
.btn-big { font-size: 26px; padding: 15px 28px; border-radius: 18px; }
.btn-alt { background: var(--saffron); color: var(--ink); }
.btn-green { background: var(--leaf); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-blue { background: var(--cobalt); }
.guide { animation: guide-pulse 1.1s ease-in-out infinite !important; }

/* =========================================================
   ORDER STATION
   ========================================================= */
.order-wall {
  position: absolute; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed)); top: 0; height: 396px;
  background-color: #f4efe2; background-image: var(--tile-img); background-size: 84px 84px;
}
.order-wall::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(18,26,63,.5), rgba(18,26,63,.05) 45%, rgba(18,26,63,.15)); }
.order-wall::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: repeating-linear-gradient(90deg, #8e4f25 0 78px, #7a431e 78px 82px);
  border-top: 4px solid var(--ink);
}
.order-floor {
  position: absolute; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed)); top: 396px; height: 156px;
  background: repeating-conic-gradient(#ead9bc 0 25%, #c8ae84 0 50%) 0 0 / 64px 64px;
  border-top: 4px solid var(--ink);
}
.order-floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(20,14,40,.35), rgba(20,14,40,0) 70%); }

.neon-sign {
  position: absolute; left: 386px; top: 16px; z-index: 2;
  width: 508px; height: 98px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #151a33; border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 0 8px 0 rgba(0,0,0,.35), inset 0 0 34px rgba(255,110,50,.22);
}
.neon-text {
  font-family: var(--font-display); font-size: 46px; line-height: 1;
  color: #fff3d6;
  text-shadow: 0 0 3px #fff, 0 0 12px #ff9a3c, 0 0 26px #ff5a1f, 0 0 44px #ff3d1f;
  animation: neon-flicker 7s infinite;
}
.neon-sub { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #9df5ee; text-shadow: 0 0 8px var(--tile); }

.menu-board {
  position: absolute; left: 948px; top: 14px; z-index: 2;
  width: 306px; height: 172px; padding: 8px 16px;
  color: #f2efe6; font-weight: 700;
  background: #22302a;
  border: 8px solid #7a431e; border-radius: 8px;
  outline: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(0,0,0,.3);
}
.menu-board h4 { margin: 0 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--saffron); }
.menu-board p { margin: 0; font-size: 15px; line-height: 1.35; }
.menu-board .mb-meats { color: #9fe3dc; }
.menu-board .mb-foot { color: #ffb3a6; font-style: italic; }

.door {
  position: absolute; left: 22px; top: 100px; z-index: 1;
  width: 152px; height: 296px; padding: 12px;
  background: #6b3a19; border: 4px solid var(--ink); border-bottom: none; border-radius: 10px 10px 0 0;
}
.door-glass { position: relative; width: 100%; height: 196px; overflow: hidden; background: linear-gradient(140deg, #1c2a63, #3b58b8 55%, #1c2a63); border: 4px solid var(--ink); border-radius: 6px; }
.door-glass::after { content: ""; position: absolute; left: 22%; top: 0; width: 26%; height: 100%; background: rgba(255,255,255,.16); transform: skewX(-18deg); }
.door-sign {
  position: absolute; left: 36px; top: 58px; width: 76px; height: 32px;
  font-weight: 800; font-size: 18px; line-height: 26px; text-align: center; color: var(--tomato);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 6px;
  transform: rotate(-4deg);
}
.door-handle { position: absolute; right: 18px; top: 224px; width: 12px; height: 40px; background: #e2c052; border: 3px solid var(--ink); border-radius: 6px; }

.lobby-table { position: absolute; z-index: 470; width: 120px; height: 120px; pointer-events: none; }
.lobby-table.t1 { left: 990px; top: 404px; }
.lobby-table.t2 { left: 1140px; top: 404px; }
.lobby-table::before { content: ""; position: absolute; left: 0; top: 0; width: 120px; height: 34px; background: radial-gradient(ellipse at 50% 40%, #f0c890, #c98c4c); border: 4px solid var(--ink); border-radius: 50%; z-index: 2; }
.lobby-table i { position: absolute; left: 52px; top: 26px; width: 16px; height: 74px; background: #5b3418; border: 3px solid var(--ink); border-radius: 4px; }
.lobby-table i::after { content: ""; position: absolute; left: -24px; bottom: -10px; width: 58px; height: 16px; background: #5b3418; border: 3px solid var(--ink); border-radius: 50%; }

#scene { position: absolute; inset: 0; }
.customer {
  position: absolute; left: -100px; top: -320px;
  width: 200px; height: 320px;
  transform-origin: 100px 320px;
  pointer-events: none;
}
.customer .cust-body { width: 100%; height: 100%; transform-origin: 50% 100%; }
.customer .cust-body svg { display: block; width: 100%; height: 100%; overflow: visible; }
.customer.walking .cust-body { animation: walk-bob .34s ease-in-out infinite alternate; }
.customer.leaving { transition: opacity .6s; }
.mood-bubble {
  position: absolute; left: 77%; top: 14px; width: 42px; height: 42px; margin-left: -6px;
  display: none;
  border: 4px solid var(--ink); border-radius: 50%;
  background: conic-gradient(var(--mc, #3fa652) calc(var(--mp, 100) * 1%), #e8dcc4 0);
  box-shadow: 0 3px 0 rgba(0,0,0,.3);
}
.mood-bubble::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.customer.show-mood .mood-bubble { display: block; }
.kebab-tag {
  position: absolute; left: 50%; top: 150px; transform: translateX(-50%);
  display: none; padding: 2px 12px;
  font-size: 24px; font-weight: 800; line-height: 1.15; white-space: nowrap; color: var(--ink);
  background: #ffe6ad; border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.customer.show-mood .kebab-tag { display: block; }

.counter { position: absolute; left: 440px; top: 334px; z-index: 600; width: 460px; height: 218px; pointer-events: none; }
.counter-top { position: absolute; left: -12px; right: -12px; top: 0; height: 30px; z-index: 2; background: linear-gradient(#dc9a62, #b06a32); border: 4px solid var(--ink); border-radius: 8px; }
.counter-front {
  position: absolute; left: 0; right: 0; top: 26px; bottom: 0;
  display: flex; justify-content: center;
  background: var(--tomato);
  border: 4px solid var(--ink); border-bottom: none;
}
.counter-front::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 74px;
  background-color: #f4efe2; background-image: var(--tile-img); background-size: 56px 56px;
  border-top: 4px solid var(--ink);
}
.counter-front span { margin-top: 22px; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--paper); text-shadow: 0 3px 0 var(--ink); }
.register { position: absolute; right: 18px; top: -74px; width: 116px; height: 80px; }
.reg-screen {
  position: absolute; left: 22px; top: 0; width: 72px; height: 30px;
  font-size: 13px; font-weight: 800; line-height: 24px; text-align: center; color: #8fffa0; letter-spacing: .08em;
  background: #10241a; border: 3px solid var(--ink); border-radius: 6px;
}
.reg-keys { position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(#5a6070, #3b3f4a); border: 4px solid var(--ink); border-radius: 10px 10px 6px 6px; }
.reg-keys::after { content: ""; position: absolute; left: 10px; right: 10px; top: 8px; height: 22px; background: repeating-linear-gradient(90deg, #d8dde3 0 14px, transparent 14px 20px); border-radius: 3px; opacity: .85; }
.printer { position: absolute; left: 22px; top: -42px; width: 78px; height: 46px; background: #3b3f4a; border: 4px solid var(--ink); border-radius: 8px; }
.printer-slot { position: absolute; left: 10px; right: 10px; top: 6px; height: 6px; background: #111; border-radius: 3px; }
.printer-paper {
  position: absolute; left: 14px; bottom: 34px; width: 42px; height: 0;
  background: var(--paper); border: 3px solid var(--ink); border-bottom: none;
  background-image: repeating-linear-gradient(transparent 0 6px, rgba(42,22,16,.35) 6px 8px);
  transition: height .6s ease-out;
}
.printer-paper.printing { height: 52px; }

#btn-take-order { position: absolute; left: 558px; top: 452px; z-index: 700; display: none; width: 224px; }
#btn-take-order.show { display: block; animation: pop-in .35s cubic-bezier(.2,1.6,.4,1); }

.speech {
  position: absolute; z-index: 800;
  padding: 12px 16px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: 0 6px 0 rgba(0,0,0,.3);
}
#order-bubble { left: 738px; top: 92px; width: 330px; display: none; }
#order-bubble.show { display: block; animation: pop-in .3s cubic-bezier(.2,1.6,.4,1); }
#order-bubble::after { content: ""; position: absolute; left: -26px; top: 96px; border: 14px solid transparent; border-right: 24px solid var(--ink); border-left: 0; }
.ob-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.ob-items { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-item {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px;
  font-weight: 800; font-size: 14px;
  background: #fff; border: 2px solid var(--ink); border-radius: 14px;
  opacity: 0; animation: ob-in .25s ease-out forwards;
}
.ob-item svg { width: 26px; height: 26px; }
#order-bubble.wide { left: 726px; width: 446px; }
.ob-rows { display: flex; flex-direction: column; gap: 5px; }
.ob-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 3px 8px 3px 4px;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px;
  opacity: 0; animation: ob-in .3s ease-out forwards;
}
.ob-row > svg { width: 24px; height: 24px; flex: none; }
.ob-row > svg:first-of-type { width: 32px; }
.ob-row b { margin: 0 2px 0 -2px; font-size: 11px; font-weight: 800; color: var(--tomato); }
.ob-k { width: 20px; height: 20px; margin-right: 2px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--paper); background: var(--ink); border-radius: 50%; }
.ob-meat { width: 13px; height: 13px; flex: none; display: inline-block; border: 2px solid var(--ink); border-radius: 50%; }
.order-empty {
  position: absolute; left: 470px; top: 132px; z-index: 650; width: 400px;
  padding: 10px 16px; text-align: center; font-weight: 800; font-size: 17px;
  color: var(--paper); background: rgba(21,26,51,.82); border: 3px solid var(--ink); border-radius: 16px;
  display: none;
}
.order-empty.show { display: block; }

/* =========================================================
   GRILL STATION
   ========================================================= */
.grill-wall {
  position: absolute; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed)); top: 0; height: 400px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 64px),
    linear-gradient(#8e9aa5, #c9d0d6 35%, #a5b0b9);
}
.grill-wall::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 42px;
  background-color: #f4efe2; background-image: var(--tile-img); background-size: 42px 42px;
  border-bottom: 4px solid var(--ink);
}
.grill-counter { position: absolute; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed)); top: 396px; bottom: 0; background: linear-gradient(#70492a, #4c311c); border-top: 5px solid var(--ink); }

.bread-bin {
  position: absolute; left: 14px; top: 14px; z-index: 5;
  width: 190px; height: 524px; padding: 10px;
  display: flex; flex-direction: column; gap: 14px;
  background: repeating-linear-gradient(#9a6332 0 58px, #84522a 58px 62px);
  border: 4px solid var(--ink); border-radius: 16px;
  box-shadow: 0 8px 0 rgba(0,0,0,.3);
}
.bin-title { font-family: var(--font-display); font-size: 28px; line-height: 1.1; text-align: center; color: var(--paper); text-shadow: 0 3px 0 var(--ink); }
.bread-btn {
  flex: 1; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 16px;
  box-shadow: 0 6px 0 var(--ink); cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s;
}
.bread-btn svg { width: 140px; height: 110px; }
.bread-btn span { font-size: 23px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.bread-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.bread-btn.chosen { background: #ffe199; }

#spits { position: absolute; left: 0; top: 0; width: 1280px; height: 400px; pointer-events: none; }
.spit-col { position: absolute; top: 46px; width: 240px; height: 346px; pointer-events: auto; }
.spit-label {
  position: absolute; left: 22px; top: 0; z-index: 2; width: 146px;
  font-weight: 800; font-size: 16px; line-height: 26px; letter-spacing: .12em; text-transform: uppercase; text-align: center;
  color: var(--paper); background: var(--ink); border-radius: 10px;
}
.spit-wrap { position: absolute; left: 0; top: 14px; width: 190px; height: 270px; cursor: grab; touch-action: none; }
.spit-wrap:active { cursor: grabbing; }
.spit-svg { display: block; width: 190px; height: 270px; overflow: visible; }
.cone-spin { animation: spin-marks 5s linear infinite; }
.heater-glow { animation: heat 1.8s ease-in-out infinite alternate; }
.knife { position: absolute; left: 22px; top: 22px; width: 150px; height: 40px; opacity: 0; pointer-events: none; }
.knife svg { width: 100%; height: 100%; display: block; }
.spit-col.shaving .knife { animation: knife-shave .36s ease-in; }
.spit-col.trimming .knife { animation: knife-shave .36s ease-in; }
.spit-smoke { position: absolute; left: 60px; top: 10px; width: 70px; height: 90px; pointer-events: none; display: none; }
.spit-col.burnt .spit-smoke { display: block; }
.spit-smoke i { position: absolute; bottom: 0; width: 26px; height: 26px; border-radius: 50%; background: rgba(70,70,80,.55); animation: smoke 1.6s ease-out infinite; }
.spit-smoke i:nth-child(2) { left: 22px; animation-delay: .5s; }
.spit-smoke i:nth-child(3) { left: 40px; animation-delay: 1s; }

.meter { position: absolute; left: 196px; top: 40px; width: 30px; height: 214px; border: 4px solid var(--ink); border-radius: 12px; background: #fff; }
.meter-zones { position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(to top, #f4b3ad 0 50%, #ffd166 50% 62%, #5cc46b 62% 82%, #ffa04d 82% 92%, #e5383b 92% 100%); }
.meter-needle { position: absolute; left: -15px; right: -6px; bottom: 0; height: 0; border-top: 4px solid var(--ink); }
.meter-needle::before { content: ""; position: absolute; left: -2px; top: -12px; border: 10px solid transparent; border-left: 13px solid var(--ink); border-right: 0; }
.meter-tag {
  position: absolute; left: 50%; top: -28px; transform: translateX(-50%);
  padding: 0 6px; white-space: nowrap;
  font-size: 12px; font-weight: 800; line-height: 18px; letter-spacing: .06em;
  color: #fff; background: #8a8f99; border: 3px solid var(--ink); border-radius: 8px;
}
.spit-col.zone-good .meter-tag { background: var(--leaf); }
.spit-col.zone-raw .meter-tag { background: #d2737b; }
.spit-col.zone-over .meter-tag { background: #e07b1a; }
.spit-col.burnt .meter-tag { background: var(--tomato); animation: blink .45s infinite alternate; }
.spit-col.zone-good .meter { box-shadow: 0 0 0 4px rgba(92,196,107,.55); }
.spit-btns { position: absolute; left: 4px; top: 290px; display: flex; gap: 8px; align-items: center; }
.shave-btn { width: 132px; font-size: 21px; padding: 11px 0; }
.trim-btn { font-size: 14px; padding: 9px 10px; border-radius: 12px; box-shadow: 0 5px 0 var(--ink); }

.prep-board {
  position: absolute; left: 300px; top: 408px; z-index: 4;
  width: 650px; height: 132px;
  background: linear-gradient(#e6b97f, #c89255);
  border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 0 8px 0 rgba(0,0,0,.35);
}
.prep-board::after { content: ""; position: absolute; right: 18px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #8c5a2b; border: 3px solid var(--ink); }
#grill-board { position: absolute; left: 190px; top: -34px; width: 300px; height: 170px; overflow: visible; }
.board-empty { position: absolute; left: 150px; right: 40px; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; font-size: 19px; color: rgba(42,22,16,.6); }
.scrap-tray {
  position: absolute; left: 14px; top: 16px; width: 120px; height: 94px;
  background: linear-gradient(#c5cdd4, #8d98a2); border: 4px solid var(--ink); border-radius: 12px; overflow: hidden;
}
.scrap-tray span { position: absolute; left: 0; right: 0; top: 2px; z-index: 2; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
#scrap-pile { position: absolute; inset: 18px 4px 4px; }
#scrap-pile svg { position: absolute; width: 38px; height: 22px; }

.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.float-text {
  position: absolute; z-index: 40; transform: translate(-50%, 0);
  font-family: var(--font-display); font-size: 30px; line-height: 1; white-space: nowrap;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
  pointer-events: none;
  animation: float-up 1.1s ease-out forwards;
}
#build-svg .pc { transform-box: fill-box; transform-origin: center; animation: pc-drop .2s ease-out; }
.fx-strip { position: absolute; left: 0; top: 0; width: 46px; height: 27px; transition: transform .5s cubic-bezier(.45,0,.8,.6), opacity .2s .45s; }
.fx-strip svg { width: 100%; height: 100%; display: block; }

/* Ticket holder */
.ticket-holder { position: absolute; left: 1036px; top: 12px; width: 232px; height: 418px; z-index: 6; }
#build-ticket { height: 528px; }
.ticket-big {
  position: relative; height: 100%; padding: 26px 14px 12px;
  display: flex; flex-direction: column; gap: 5px; overflow: hidden;
  background: var(--paper);
  border: 4px solid var(--ink); border-radius: 8px 8px 16px 16px;
  box-shadow: 0 8px 0 rgba(0,0,0,.35);
  animation: pop-in .3s ease-out;
}
.ticket-big::before {
  content: ""; position: absolute; left: 50%; top: -4px; width: 96px; height: 20px; margin-left: -48px;
  background: linear-gradient(#eef2f5, #8d98a2); border: 4px solid var(--ink); border-top: none; border-radius: 0 0 12px 12px;
}
.tb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding-bottom: 6px; border-bottom: 3px dashed rgba(42,22,16,.3); }
.tb-num { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--tomato); }
.tb-name { font-weight: 800; font-size: 18px; line-height: 1.1; text-align: right; }
.tb-name small { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tomato); }
.tb-sec { margin-top: 3px; font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: rgba(42,22,16,.55); }
.tb-bread { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.tb-bread svg { width: 54px; height: 40px; }
.tb-bread.wrong { color: var(--tomato); }
.tb-wrong { margin-left: auto; padding: 0 6px; font-size: 11px; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--tomato); border: 2px solid var(--ink); border-radius: 8px; white-space: nowrap; }
.ticket-big.compact { gap: 3px; padding-top: 24px; }
.ticket-big.compact .tb-head { padding-bottom: 4px; }
.ticket-big.compact .tb-num { font-size: 26px; }
.ticket-big.compact .tb-sec { margin-top: 1px; font-size: 11px; }
.ticket-big.compact .tb-bread { font-size: 17px; }
.ticket-big.compact .tb-bread svg { width: 42px; height: 30px; }
.ticket-big.compact .tb-list { gap: 2px; }
.ticket-big.compact .tb-item { font-size: 14px; }
.ticket-big.compact .tb-item > svg { width: 22px; height: 22px; }
.ticket-big.compact .meat-chip { font-size: 12px; padding: 0 6px 0 2px; }
.ticket-big.compact .meat-chip i { width: 14px; height: 14px; }
.ticket-big.compact .tb-toast { font-size: 16px; }
.ticket-big.compact .tb-toast svg { width: 30px; height: 30px; }
.ticket-big.cols .tb-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; row-gap: 3px; }
.ticket-big.cols .tb-item { font-size: 13px; }
.tb-meats { display: flex; flex-wrap: wrap; gap: 5px; }
.meat-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 3px;
  font-weight: 800; font-size: 13px; letter-spacing: .03em;
  background: #fff; border: 3px solid var(--ink); border-radius: 20px;
}
.meat-chip i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); }
.meat-chip.done { background: #d6f3cd; }
.meat-chip .ico { font-size: 14px; color: var(--leaf); }
.tb-list { display: flex; flex-direction: column; gap: 4px; }
.tb-item { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; line-height: 1.05; }
.tb-item > svg { width: 28px; height: 28px; flex: none; }
.tb-item .amt { font-weight: 800; color: var(--tomato); }
.gauge { position: relative; margin-left: auto; width: 52px; height: 11px; flex: none; overflow: hidden; background: #eee3cc; border: 2px solid var(--ink); border-radius: 6px; }
.gauge i { display: block; height: 100%; width: 0; background: #ffa04d; transition: width .15s; }
.gauge::after { content: ""; position: absolute; left: 66.6%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.gauge.ok i { background: var(--leaf); }
.gauge.over i { background: var(--tomato); }
.tb-toast { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.tb-toast svg { width: 38px; height: 38px; }
.ticket-placeholder {
  height: 100%; padding: 20px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 800; font-size: 18px; color: rgba(255,255,255,.85);
  background: rgba(10,14,36,.25); border: 4px dashed rgba(255,255,255,.55); border-radius: 16px;
}

.station-actions { position: absolute; left: 1036px; top: 444px; z-index: 6; width: 232px; display: flex; flex-direction: column; gap: 12px; }
.station-actions .btn { width: 100%; }
#btn-send-build { font-size: 22px; padding: 14px 10px; }
#btn-grill-trash { font-size: 15px; padding: 8px 10px; box-shadow: 0 5px 0 var(--ink); }

/* =========================================================
   BUILD STATION
   ========================================================= */
.build-wall {
  position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed));
  background:
    linear-gradient(rgba(18,26,63,.25), rgba(18,26,63,.25)) 0 0 / 100% 120px no-repeat,
    linear-gradient(#f4efe2, #f4efe2) 0 0 / 100% 120px no-repeat,
    linear-gradient(170deg, #3d6b66, #24504c);
}
.build-wall::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px;
  background-color: #f4efe2; background-image: var(--tile-img); background-size: 60px 60px;
  border-bottom: 5px solid var(--ink);
}
.build-wall::after {
  content: ""; position: absolute; left: calc(148px + var(--bleed)); top: 128px; width: 868px; height: 342px;
  background: radial-gradient(ellipse at 50% 45%, #e8d7b9, #cdb48a);
  border: 4px solid var(--ink); border-radius: 26px;
  box-shadow: 0 8px 0 rgba(0,0,0,.3);
}
#topping-bins { position: absolute; left: 150px; top: 7px; z-index: 5; width: 864px; height: 108px; display: flex; justify-content: center; gap: 6px; }
.bin {
  position: relative; width: 90px; height: 104px; padding: 0;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(#eef2f5, #9aa5ae);
  border: 4px solid var(--ink); border-radius: 12px;
  box-shadow: 0 5px 0 var(--ink); cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.bin-pile { width: 82px; height: 70px; display: block; }
.bin-name {
  width: 100%; margin-top: auto;
  font-size: 12px; font-weight: 800; line-height: 22px; letter-spacing: .02em; text-transform: uppercase; text-align: center;
  white-space: nowrap; overflow: hidden;
  background: var(--paper); border-top: 3px solid var(--ink); border-radius: 0 0 8px 8px;
}
.bin.selected { transform: translateY(-5px); box-shadow: 0 10px 0 var(--ink), 0 0 0 5px var(--saffron); }
.bin.wanted .bin-name { background: #ffe199; }

#sauce-rack { position: absolute; left: 10px; top: 128px; z-index: 5; width: 134px; display: flex; flex-direction: column; gap: 6px; }
.bottle {
  position: relative; height: 98px; padding: 0 4px;
  display: flex; align-items: center; gap: 2px;
  background: rgba(10,20,40,.35); border: 3px solid var(--ink); border-radius: 14px;
  cursor: pointer; text-align: left;
  transition: background .15s, box-shadow .12s;
}
.bottle svg { width: 52px; height: 92px; flex: none; transition: transform .15s; transform-origin: 50% 80%; }
.bottle span { font-size: 14px; font-weight: 800; line-height: 1.05; text-transform: uppercase; color: var(--paper); text-shadow: 0 2px 0 var(--ink); }
.bottle.selected { background: rgba(255,184,28,.35); box-shadow: 0 0 0 5px var(--saffron); }
.bottle.selected svg { transform: rotate(-16deg) translateY(-4px); }
.bottle.wanted span { color: #ffe199; }

.build-board { position: absolute; left: 152px; top: 128px; z-index: 4; width: 860px; height: 340px; }
#build-svg { display: block; width: 860px; height: 340px; touch-action: none; cursor: crosshair; overflow: visible; }
#build-svg .zone { fill: rgba(255,255,255,.1); stroke: rgba(255,255,255,.9); stroke-width: 3; stroke-dasharray: 10 9; pointer-events: none; }
#build-svg.has-tool .zone { stroke: var(--saffron); fill: rgba(255,184,28,.1); }
#build-svg.wrapping { animation: wrap-up .5s ease-in forwards; }
.build-empty {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center;
  font-weight: 800; font-size: 24px; line-height: 1.3; color: rgba(42,22,16,.6);
}
.build-empty.show { display: flex; }
.tool-ghost { position: absolute; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.tool-ghost.on { opacity: .85; }
.tool-ghost svg { width: 100%; height: 100%; }

#build-queue { position: absolute; left: 152px; top: 480px; z-index: 5; width: 400px; height: 62px; display: flex; align-items: center; gap: 8px; }
.bq-label { font-weight: 800; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); }
.bq-chip {
  display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 4px;
  font-weight: 800; font-size: 16px; cursor: pointer;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink);
}
.bq-chip svg { width: 40px; height: 30px; }
.build-actions { left: 560px; top: 482px; width: 452px; flex-direction: row; justify-content: flex-end; gap: 14px; }
.build-actions .btn { width: auto; }
#btn-wrap { font-size: 22px; padding: 14px 22px; }
#btn-scrape { font-size: 15px; padding: 10px 14px; box-shadow: 0 5px 0 var(--ink); align-self: center; }

/* =========================================================
   CRUSH STATION
   ========================================================= */
.crush-wall {
  position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--bleed)); right: calc(-1 * var(--bleed));
  background: linear-gradient(rgba(14,20,52,.78), rgba(14,20,52,.86)), var(--tile-img);
  background-size: 100% 100%, 70px 70px;
}
.crush-wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(#70492a, #4c311c); border-top: 5px solid var(--ink); }
.tray {
  position: absolute; top: 12px; z-index: 5;
  width: 222px; height: 528px; padding: 8px;
  background: rgba(8,12,34,.6); border: 4px solid var(--ink); border-radius: 18px;
}
.tray-in { left: 12px; }
.tray-out { left: 1046px; }
.tray h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.2; text-align: center; color: var(--paper); text-shadow: 0 3px 0 var(--ink); }
.tray-list { display: flex; flex-direction: column; gap: 9px; }
.tray-card {
  position: relative; padding: 2px 6px 6px;
  display: flex; flex-direction: column; align-items: center;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 0 4px 0 var(--ink); cursor: pointer;
  animation: pop-in .3s ease-out;
}
.tray-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tray-card svg.wrapped { width: 150px; height: 70px; display: block; }
.tc-label { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; line-height: 1.1; }
.tc-label .tc-num { color: var(--tomato); }
.tc-toast { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: rgba(42,22,16,.7); }
.tc-toast svg { width: 22px; height: 22px; }
.tray-card .btn { margin-top: 4px; padding: 7px 26px; font-size: 17px; box-shadow: 0 4px 0 var(--ink); }
.tray-empty { margin: 0; padding: 12px 10px; text-align: center; font-size: 15px; font-weight: 700; line-height: 1.3; color: rgba(255,255,255,.65); }
.tray-card.guide, .tray-card .btn.guide { position: relative; }

.crusher { position: absolute; left: 246px; top: 6px; z-index: 4; width: 792px; height: 540px; }
.crusher-body {
  position: absolute; left: 0; right: 0; top: 286px; height: 196px;
  background: linear-gradient(#d3dadf, #8f9aa4);
  border: 5px solid var(--ink); border-radius: 26px;
  box-shadow: 0 10px 0 rgba(0,0,0,.4), inset 0 6px 0 rgba(255,255,255,.4);
}
.crusher-plate-label {
  position: absolute; left: 50%; top: 486px; transform: translateX(-50%); z-index: 3;
  padding: 0 22px;
  font-family: var(--font-display); font-size: 28px; line-height: 44px; color: var(--paper);
  background: var(--tomato); border: 4px solid var(--ink); border-radius: 14px;
  text-shadow: 0 3px 0 var(--ink); box-shadow: 0 6px 0 rgba(0,0,0,.35);
  white-space: nowrap;
}
#press-slots { position: absolute; inset: 0; display: flex; justify-content: center; }
.slot { position: relative; width: 240px; height: 100%; flex: none; }
.slot-bar { position: absolute; left: 4px; right: 4px; top: 8px; height: 30px; z-index: 1; background: linear-gradient(#eef2f5, #8d98a2); border: 4px solid var(--ink); border-radius: 12px; }
.slot-rail { position: absolute; top: 24px; width: 18px; height: 270px; background: linear-gradient(90deg, #8d98a2, #eef2f5 45%, #8d98a2); border: 3px solid var(--ink); border-radius: 8px; }
.slot-rail.l { left: 14px; }
.slot-rail.r { right: 14px; }
.slot-piston { position: absolute; left: 104px; top: 30px; width: 32px; height: 24px; background: linear-gradient(90deg, #6b7780, #dfe5ea 45%, #6b7780); border: 3px solid var(--ink); border-radius: 6px; transition: height .38s cubic-bezier(.55,1.7,.5,1); }
.slot.closed .slot-piston { height: 102px; }
.slot-lid {
  position: absolute; left: 0; right: 0; top: 44px; height: 58px; z-index: 3;
  background: linear-gradient(#eef2f5, #a3aeb7 60%, #7d8892);
  border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: inset 0 -10px 0 #3b3f4a;
  transition: transform .38s cubic-bezier(.55,1.7,.5,1);
}
.slot-lid::after { content: ""; position: absolute; left: 30px; right: 30px; top: 12px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.55); }
.slot.closed .slot-lid { transform: translateY(78px); }
.slot-item { position: absolute; left: 10px; right: 10px; top: 144px; height: 108px; z-index: 2; display: flex; align-items: flex-end; justify-content: center; }
.slot-item svg { width: 214px; height: 107px; display: block; transform-origin: 50% 100%; transition: transform .3s; }
.slot.closed .slot-item svg { transform: scaleY(.82) scaleX(1.04); }
.slot-plate {
  position: absolute; left: 6px; right: 6px; top: 248px; height: 42px; z-index: 2;
  background: repeating-linear-gradient(90deg, #2a2d35 0 10px, #4a4f5a 10px 16px);
  border: 4px solid var(--ink); border-radius: 10px;
}
.slot.closed .slot-plate { box-shadow: 0 -6px 18px rgba(255,120,40,.55); }
.slot-empty { position: absolute; left: 20px; right: 20px; top: 196px; z-index: 2; text-align: center; font-weight: 800; font-size: 16px; color: rgba(255,255,255,.55); letter-spacing: .1em; text-transform: uppercase; }
.slot-dial { position: absolute; left: 10px; top: 302px; z-index: 3; width: 108px; height: 108px; }
.slot-dial svg { width: 100%; height: 100%; display: block; overflow: visible; }
.slot-tag { position: absolute; left: 0; top: 412px; z-index: 3; width: 128px; text-align: center; font-weight: 800; font-size: 14px; line-height: 1.1; color: var(--ink); }
.slot-btn { position: absolute; left: 126px; top: 330px; z-index: 3; width: 106px; padding: 14px 0; font-size: 21px; }
.slot-steam { position: absolute; left: 60px; top: 100px; width: 120px; height: 60px; z-index: 4; pointer-events: none; display: none; }
.slot.closed .slot-steam { display: block; }
.slot-steam i { position: absolute; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.6); animation: steam 1.4s ease-out infinite; }
.slot-steam i:nth-child(1) { left: 10px; }
.slot-steam i:nth-child(2) { left: 50px; animation-delay: .45s; }
.slot-steam i:nth-child(3) { left: 90px; animation-delay: .9s; }
.slot.burnt .slot-steam i { background: rgba(50,50,58,.75); }
.slot.hot .slot-dial { animation: dial-hot .5s ease-in-out infinite alternate; }

/* =========================================================
   OVERLAYS
   ========================================================= */
.overlay { position: absolute; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(9,13,34,.74); }
.overlay.show { display: flex; animation: fade-in .2s ease-out; }
.panel { position: relative; background: var(--paper); border: 5px solid var(--ink); border-radius: 26px; box-shadow: 0 12px 0 rgba(0,0,0,.45); }
.panel h2 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.1; text-wrap: balance; }

/* Title */
#ov-title { background: var(--night); z-index: 300; overflow: hidden; }
.title-tiles { position: absolute; inset: 0; background-image: var(--tile-img); background-size: 96px 96px; opacity: .14; }
.title-glow { position: absolute; inset: 0; background: radial-gradient(circle at calc(50% + 405px) 52%, rgba(255,110,40,.45), transparent 45%), radial-gradient(circle at calc(50% - 250px) 42%, rgba(31,60,150,.6), transparent 60%); }
.title-inner { position: absolute; left: calc(50% - 590px); top: 0; bottom: 0; width: 780px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.logo { width: 760px; height: 300px; overflow: visible; }
.logo text { font-family: var(--font-display); paint-order: stroke fill; stroke: var(--ink); stroke-linejoin: round; }
.logo-k { font-size: 156px; fill: var(--saffron); stroke-width: 20px; }
.logo-c { font-size: 122px; fill: var(--tomato); stroke-width: 18px; }
.logo { filter: drop-shadow(0 10px 0 rgba(0,0,0,.55)); animation: logo-in .8s cubic-bezier(.2,1.4,.4,1); }
.title-tag { margin: 4px 0 26px; font-weight: 800; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; color: #9df5ee; text-shadow: 0 3px 0 var(--ink); }
.title-buttons { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.title-best { margin: 22px 0 0; min-height: 26px; font-weight: 700; font-size: 18px; color: #b9c6ff; }
.title-install { margin: 6px 0 0; min-height: 22px; font-weight: 700; font-size: 17px; color: #9df5ee; text-align: center; }
.title-spit { position: absolute; left: calc(50% + 240px); top: 50%; margin-top: -270px; z-index: 1; width: 330px; height: 560px; }
.title-spit svg { width: 100%; height: 100%; overflow: visible; }

/* How to */
.howto-panel { width: 1040px; padding: 26px 34px 30px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.howto-panel h2 { font-size: 40px; color: var(--tomato); }
.howto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.howto-card { padding: 14px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.howto-card .ico { font-size: 54px; }
.howto-card h3 { margin: 4px 0 6px; font-size: 22px; font-weight: 800; }
.howto-card p { margin: 0; font-size: 16px; line-height: 1.35; font-weight: 600; }
.howto-card b.g { color: var(--leaf); }
.howto-foot { margin: 0; max-width: 820px; text-align: center; font-size: 17px; font-weight: 600; line-height: 1.4; }

/* Day intro */
#ov-dayintro { background: rgba(9,13,34,.55); z-index: 210; }
.dayintro { text-align: center; color: var(--paper); animation: logo-in .6s cubic-bezier(.2,1.4,.4,1); }
.dayintro h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 120px; line-height: 1; color: var(--saffron); text-shadow: 0 8px 0 var(--ink); -webkit-text-stroke: 3px var(--ink); }
.di-small { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: #9df5ee; }
#di-sub { margin: 8px 0 0; font-size: 28px; font-weight: 800; }

/* Judge */
.judge-panel { width: 1130px; height: 610px; padding: 22px; display: grid; grid-template-columns: 330px 300px 1fr; gap: 12px; overflow: hidden; }
.judge-left { position: relative; }
.judge-cust { position: absolute; left: 30px; bottom: -30px; width: 260px; height: 416px; }
.judge-cust svg { width: 100%; height: 100%; overflow: visible; }
.judge-quote { position: absolute; left: 0; top: 0; right: -10px; z-index: 2; font-size: 21px; font-weight: 800; line-height: 1.2; padding: 14px 18px; }
.judge-quote::after { content: ""; position: absolute; left: 120px; bottom: -26px; border: 14px solid transparent; border-top: 24px solid var(--ink); border-bottom: 0; }
.judge-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.judge-ticket { margin: 0; font-weight: 800; font-size: 24px; }
.judge-plate { position: relative; width: 300px; height: 210px; }
.judge-plate::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 70px; background: radial-gradient(ellipse, #fff 55%, #dfe5ea 56%, #f7f9fa 70%, #c9d1d7 72%); border: 4px solid var(--ink); border-radius: 50%; }
.judge-plate svg { position: absolute; left: 30px; bottom: 34px; width: 240px; height: 120px; }
.judge-plate.multi svg { width: 150px; height: 75px; }
.judge-plate.multi svg:nth-child(1) { left: 6px; bottom: 30px; }
.judge-plate.multi svg:nth-child(2) { left: 144px; bottom: 30px; }
.judge-plate.multi svg:nth-child(3) { left: 75px; bottom: 82px; }
.judge-right { display: flex; flex-direction: column; gap: 10px; padding-left: 6px; }
.score-rows { display: flex; flex-direction: column; gap: 9px; }
.score-row { display: grid; grid-template-columns: 40px 92px 1fr 62px; align-items: center; gap: 8px; opacity: .25; transition: opacity .2s; }
.score-row.on { opacity: 1; }
.score-row .ico { font-size: 38px; }
.score-row .sr-label { font-weight: 800; font-size: 19px; }
.sr-bar { height: 24px; background: #eadfc8; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
.sr-bar i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .55s cubic-bezier(.3,1.2,.5,1); }
.sr-pct { font-weight: 800; font-size: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.judge-total { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.jt-num { font-family: var(--font-display); font-size: 72px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.jt-stamp {
  padding: 4px 16px; transform: rotate(-8deg) scale(0);
  font-family: var(--font-display); font-size: 32px; line-height: 1.2;
  color: var(--tomato); border: 5px solid currentColor; border-radius: 14px;
  transition: transform .35s cubic-bezier(.2,1.8,.4,1);
}
.jt-stamp.on { transform: rotate(-8deg) scale(1); }
.judge-earn { display: flex; gap: 20px; font-weight: 700; font-size: 20px; opacity: 0; transition: opacity .3s; }
.judge-earn.on { opacity: 1; }
.judge-earn b { font-weight: 800; }
.judge-earn .ico { font-size: 28px; margin-right: 4px; }
.je-pts .ico { color: var(--saffron); }
.judge-rankup { min-height: 0; font-weight: 800; font-size: 20px; color: var(--cobalt); }
.judge-rankup:empty { display: none; }
#btn-judge-ok { margin-top: auto; align-self: flex-end; }

/* Summary */
.summary-panel { width: 820px; padding: 26px 34px 30px; display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.summary-panel h2 { font-size: 46px; text-align: center; color: var(--tomato); }
.sum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 10px 8px; text-align: center; background: #fff; border: 4px solid var(--ink); border-radius: 16px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(42,22,16,.6); }
.sum-rank { display: flex; flex-direction: column; gap: 6px; }
.sum-rank-head { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; }
.sum-unlocks { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.sum-unlocks:empty { display: none; }
.unlock-chip { padding: 6px 14px; font-weight: 800; font-size: 17px; background: #ffe199; border: 3px solid var(--ink); border-radius: 20px; animation: pop-in .4s cubic-bezier(.2,1.6,.4,1) backwards; }
.unlock-chip.title { background: var(--cobalt); color: #fff; }
.sum-buttons { display: flex; justify-content: center; gap: 16px; }

/* Shop */
.shop-panel { width: 980px; padding: 24px 30px 28px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.shop-head { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.shop-head h2 { font-size: 42px; color: var(--cobalt); }
.shop-money { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 28px; }
.shop-money .ico { font-size: 34px; }
.shop-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shop-card { padding: 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; }
.shop-card h3 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.1; }
.shop-card p { margin: 0; flex: 1; font-size: 15px; font-weight: 600; line-height: 1.3; }
.shop-card .btn { align-self: flex-start; font-size: 17px; padding: 9px 16px; }
.shop-card.owned { background: #e6f6df; }
.shop-card .owned-tag { font-weight: 800; color: var(--leaf); font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }

/* Pause / confirm */
.pause-panel { width: 420px; padding: 26px 34px 32px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.pause-panel h2 { font-size: 46px; text-align: center; color: var(--cobalt); margin-bottom: 4px; }
#ov-howto { z-index: 320; }
#ov-confirm { z-index: 340; }
.confirm-panel { width: 480px; padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.confirm-panel h2 { font-size: 34px; color: var(--tomato); }
.confirm-panel p { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
.confirm-buttons { display: flex; justify-content: center; gap: 14px; }

/* Toasts */
#toasts { position: absolute; left: 50%; top: 106px; z-index: 150; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast {
  padding: 6px 18px; white-space: nowrap;
  font-weight: 800; font-size: 17px; color: var(--paper);
  background: var(--ink); border: 3px solid var(--paper); border-radius: 20px;
  animation: toast-in .25s ease-out, toast-out .35s ease-in 1.8s forwards;
}
.toast.good { background: var(--leaf); border-color: var(--ink); color: #fff; }
.toast.bad { background: var(--tomato); border-color: var(--ink); color: #fff; }
.toast.gold { background: var(--saffron); border-color: var(--ink); color: var(--ink); }

/* Rotate hint (phones held upright) */
#rotate-hint { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; background: rgba(9,13,34,.95); }
@media (orientation: portrait) and (max-width: 820px) {
  body:not(.rotate-ok) #rotate-hint { display: flex; }
}
.rotate-card { max-width: 320px; padding: 24px; text-align: center; font-weight: 800; font-size: 21px; line-height: 1.3; color: var(--paper); }
.rotate-card svg { width: 120px; height: 120px; animation: rot 2.2s ease-in-out infinite; }
.rotate-card p { margin: 10px 0 18px; }

/* =========================================================
   KEYFRAMES
   ========================================================= */
@keyframes tk-in { 0% { transform: translateY(-60px) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes ready-blink { from { filter: brightness(1); } to { filter: brightness(1.25); } }
@keyframes st-in { from { opacity: .4; } to { opacity: 1; } }
@keyframes guide-pulse { 0%, 100% { box-shadow: 0 5px 0 var(--ink), 0 0 0 0 rgba(255,184,28,.95); } 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 12px rgba(255,184,28,0); } }
@keyframes tab-alert { 0%, 100% { background: #2b3d8f; } 50% { background: #c2332a; } }
@keyframes walk-bob { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-8px) rotate(1.5deg); } }
@keyframes neon-flicker { 0%, 93%, 95.5%, 100% { opacity: 1; } 94% { opacity: .55; } 96.5% { opacity: .75; } }
@keyframes heat { from { opacity: .82; } to { opacity: 1; } }
@keyframes spin-marks { to { transform: translateX(-200px); } }
@keyframes knife-shave { 0% { opacity: 1; transform: translate(14px, 0) rotate(8deg); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-4px, 200px) rotate(3deg); } }
@keyframes smoke { 0% { transform: translateY(0) scale(.6); opacity: .8; } 100% { transform: translateY(-80px) scale(1.6); opacity: 0; } }
@keyframes steam { 0% { transform: translateY(0) scale(.5); opacity: .9; } 100% { transform: translateY(-70px) scale(1.6); opacity: 0; } }
@keyframes blink { from { opacity: 1; } to { opacity: .45; } }
@keyframes pop-in { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ob-in { from { opacity: 0; transform: translateY(8px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); background: var(--leaf); } 100% { transform: scale(1); } }
@keyframes hint-flash { 0% { background: #ffe199; } 100% { background: var(--paper); } }
@keyframes wrap-up { 0% { transform: none; opacity: 1; } 60% { transform: scaleY(.25) scaleX(.9); opacity: 1; } 100% { transform: scaleY(.2) scaleX(.5) translateX(600px); opacity: 0; } }
@keyframes logo-in { 0% { transform: scale(.6) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes rot { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@keyframes dial-hot { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes float-up { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }
@keyframes pc-drop { from { transform: scale(1.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
