/* ===========================================================================
   MEAT DEPARTMENT
   ---------------------------------------------------------------------------
   A production shop with a storefront attached. Three columns:

     ┌───────────────┬──────────────────────────┬──────────────┐
     │ BACK OF HOUSE │  case: side │  COUNTER   │  double-     │
     │  cooler       ├─────────────┴────────────┤  sided       │
     │  block        │     case: front arm      │  floor       │
     │  landing rail ├──────────────────────────┤  fridge      │
     │  grinder      │     counter queue        │              │
     └───────────────┴──────────────────────────┴──────────────┘

   The L-shaped case still wraps the counter — one arm beside it, one in front
   — but it is now the shop's OUTPUT, fed from the block on the left, and it
   sells itself to the tickets on the right.
   =========================================================================== */

.meat-overlay {
  /* Fixed rather than absolute: the department takes over the whole screen,
     covering the checkout HUD and footer, not just the store shell. */
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 0%, rgba(248, 250, 252, 0.06), transparent 55%),
    linear-gradient(180deg, #1a1410 0%, #120d09 45%, #0b0806 100%);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #f8fafc;
  overflow: hidden;
}

.meat-overlay.show { display: flex; }

/* While the department is up, let the shared toast float above it. */
body:has(.meat-overlay.show) .toast { z-index: 210; }

/* Freshness bands — one palette, used by every product surface in the shop. */
.band-prime   { --band: #4ade80; }
.band-good    { --band: #a3e635; }
.band-seconds { --band: #f59e0b; }
.band-spoiled { --band: #ef4444; }

/* ---------- HUD ---------- */

.meat-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(76, 29, 29, 0.9), rgba(28, 16, 12, 0.92));
  border-bottom: 2px solid rgba(248, 113, 113, 0.35);
  flex: 0 0 auto;
}

.meat-hud-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.meat-hud-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2px;
  color: #fecaca;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

.meat-waste-stat b { color: #fca5a5; }

.meat-exit-btn {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 12px;
  color: #fee2e2;
  background: rgba(127, 29, 29, 0.7);
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 6px;
  cursor: pointer;
}
.meat-exit-btn:hover { background: rgba(153, 27, 27, 0.9); }

/* ---------- Shift timeline ----------
   The department runs in named phases with a customerless prep window. Without
   a visible playhead and countdown, quiet stretches read as a broken game. */

.meat-phase-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 14px;
  background: rgba(2, 6, 23, 0.75);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.meat-phase-segs {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.meat-phase-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #64748b;
  background: rgba(15, 23, 42, 0.8);
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  transition: background 0.3s ease, color 0.3s ease;
}
.meat-phase-seg:last-child { border-right: none; }
.meat-phase-seg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meat-phase-seg.active {
  color: #1c1008;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  font-weight: 800;
}

.meat-phase-head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f8fafc;
  box-shadow: 0 0 6px rgba(248, 250, 252, 0.9);
  pointer-events: none;
}

.meat-phase-read {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10px;
  color: #94a3b8;
}
.meat-phase-read b {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #fcd34d;
}

/* ---------- Banner ----------
   The shared toast() is disabled project-wide, so phase changes, deliveries and
   refusals surface here instead. */

.meat-banner {
  position: relative;
  flex: 0 0 auto;
  height: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.meat-banner-msg {
  position: absolute;
  /* Straddles the timeline strip rather than covering the counter header. */
  top: -13px;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  white-space: nowrap;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  animation: meatBannerIn 0.25s ease-out;
}
.meat-banner-msg.good  { border-color: #4ade80; color: #bbf7d0; }
.meat-banner-msg.warn  { border-color: #f87171; color: #fecaca; }
.meat-banner-msg.phase {
  border-color: #fbbf24;
  color: #1c1008;
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  font-size: 12px;
  letter-spacing: 1.4px;
}

@keyframes meatBannerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Shell ---------- */

.meat-shell {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  min-height: 0;
}

/* ---------- Crew panel ---------- */

.meat-backroom {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #263238 0%, #16211f 100%);
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
}

.meat-backroom h2 {
  margin: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #cbd5e1;
}

.meat-staff-pool { display: flex; flex-direction: column; gap: 5px; }

.meat-staff-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  text-align: left;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.meat-staff-card:hover { border-color: rgba(248, 250, 252, 0.6); transform: translateY(-1px); }
.meat-staff-card.selected {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.6), 0 0 12px rgba(251, 146, 60, 0.35);
}
.meat-staff-card.on-duty { background: linear-gradient(180deg, rgba(6, 78, 59, 0.6), rgba(2, 6, 23, 0.9)); }

.meat-staff-card .cashier-sprite { flex: 0 0 auto; transform: scale(0.74); transform-origin: left center; margin-right: -8px; }

.meat-staff-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.meat-staff-info b { font-size: 12px; }
.meat-staff-trait { font-size: 9px; color: #fbbf24; letter-spacing: 0.3px; }
.meat-staff-status { font-size: 9px; color: #94a3b8; }

.meat-backroom-hint {
  font-size: 9px;
  line-height: 1.5;
  color: #94a3b8;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
  padding-top: 6px;
}
.meat-hint-green { color: #4ade80; font-weight: 700; }

.meat-fresh-key { display: flex; flex-wrap: wrap; gap: 4px; }
.meat-fresh-key .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.meat-fresh-key .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* Permanent yield reference — the player should never have to memorise which
   carcass produces what. */
.meat-yield-table {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.3);
}
.meat-yield-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #64748b;
  margin-bottom: 2px;
}
.meat-yield-row { display: flex; flex-direction: column; line-height: 1.3; }
.meat-yield-name { font-size: 9px; font-weight: 700; color: #e2e8f0; }
.meat-yield-out { font-size: 8px; color: #94a3b8; }

/* ---------- Floor ---------- */

.meat-floor {
  position: relative;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 274px;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 8px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 46px),
    linear-gradient(180deg, #3b302a 0%, #2a221d 100%);
  border: 2px solid rgba(120, 113, 108, 0.4);
}

/* ---------- Back of house ---------- */

.meat-back { display: flex; flex-direction: column; gap: 7px; min-width: 0; align-content: start; }

.meat-panel {
  border-radius: 8px;
  padding: 6px 7px 7px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(2, 6, 23, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.meat-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.meat-truck { font-size: 8px; letter-spacing: 0.4px; color: #7dd3fc; }
.meat-rail-warn { font-size: 8px; letter-spacing: 0.4px; color: #f87171; font-weight: 700; }

/* The cooler — carcass chips, oldest first. */
.meat-cooler { display: flex; flex-wrap: wrap; gap: 4px; }

.meat-primal-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'emoji name fresh' 'emoji yield fresh';
  align-items: center;
  gap: 0 5px;
  width: 100%;
  padding: 4px 6px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-left: 3px solid var(--band, #94a3b8);
  background: rgba(15, 23, 42, 0.85);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.meat-primal-chip:hover { border-color: #f8fafc; transform: translateX(2px); }
.meat-chip-emoji { grid-area: emoji; font-size: 15px; }
.meat-chip-name { grid-area: name; font-size: 10px; font-weight: 700; letter-spacing: 0.4px; }
.meat-chip-yield { grid-area: yield; font-size: 9px; color: #94a3b8; }
.meat-chip-fresh { grid-area: fresh; font-size: 11px; font-weight: 700; color: var(--band, #94a3b8); }

.meat-cooler-empty, .meat-cooler-more, .meat-rail-empty {
  font-size: 9px;
  color: #64748b;
  font-style: italic;
  padding: 2px 0;
}
.meat-cooler-more { font-style: normal; color: #94a3b8; }

/* The block. */
.meat-block { cursor: pointer; }
.meat-block-idle, .meat-block-busy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 6px;
  border: 1px dashed rgba(203, 213, 225, 0.35);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.3), rgba(2, 6, 23, 0.6));
}
.meat-block-busy { border-style: solid; border-color: var(--band, #94a3b8); }
.meat-block-idle.droppable { border-color: #fb923c; }
.meat-block-empty { font-size: 9px; color: #94a3b8; font-style: italic; }
.meat-block-name { font-size: 11px; font-weight: 700; }
.meat-block-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}
.meat-block-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fbbf24, #f97316);
}
/* A carcass on an unstaffed block is the loudest failure in the back. */
.meat-block.stalled .meat-block-busy {
  border-color: #ef4444;
  animation: meatAlert 1.1s ease-in-out infinite;
}

@keyframes meatAlert {
  0%, 100% { background-color: rgba(127, 29, 29, 0); }
  50%      { background-color: rgba(127, 29, 29, 0.5); }
}

/* The landing rail — loose cuts, burning freshness fast. */
.meat-rail { display: flex; flex-wrap: wrap; gap: 4px; }

.meat-stack {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 4px 6px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-left: 3px solid var(--band, #94a3b8);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--section-color), #000 55%), rgba(2, 6, 23, 0.9));
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.meat-stack:hover { border-color: #f8fafc; transform: translateX(2px); }
.meat-stack.selected {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.7), 0 0 10px rgba(251, 146, 60, 0.4);
}
.meat-stack.band-seconds, .meat-stack.band-spoiled { animation: meatAlert 1.1s ease-in-out infinite; }
.meat-stack-emoji { font-size: 14px; }
.meat-stack-count { font-size: 12px; font-weight: 800; }
.meat-stack-name { font-size: 9px; letter-spacing: 0.8px; color: #cbd5e1; }
.meat-stack-fresh { font-size: 11px; font-weight: 700; color: var(--band, #94a3b8); }

/* The grinder. */
.meat-grinder { cursor: pointer; }
.meat-grinder-body { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meat-grinder-trim { font-size: 9px; letter-spacing: 1px; color: #94a3b8; }
.meat-grinder-trim b { font-size: 13px; color: #f8fafc; }
.meat-grinder-bar {
  flex: 1 1 60px;
  height: 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}
.meat-grinder-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f472b6, #9f1239);
}

/* Who is standing at a post. */
.meat-post-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #a7f3d0;
}
.meat-post-badge.empty { color: #64748b; font-style: italic; letter-spacing: 0.6px; }
.meat-post-badge .cashier-sprite { transform: scale(0.55); transform-origin: left center; margin-right: -16px; }
.meat-post-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Front of house: the L case around the counter ---------- */

.meat-front {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  /* Row 3 takes the slack so the counter line has real floor to walk up. */
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  min-height: 0;
}

.meat-case-arm {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(203, 213, 225, 0.16) 0%, rgba(30, 41, 59, 0.85) 40%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid rgba(203, 213, 225, 0.4);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), inset 0 -3px 8px rgba(0, 0, 0, 0.5);
}

/* Beside the counter — the vertical arm of the L, at the butcher's elbow. */
.meat-case-side {
  grid-column: 1;
  grid-row: 1;
  flex-direction: column;
  border-bottom-left-radius: 0;
  border-bottom: none;
}

/* In front of the counter — the horizontal arm, a corner walk away. */
.meat-case-front {
  grid-column: 1 / span 2;
  grid-row: 2;
  flex-direction: row;
  border-top-left-radius: 0;
}

.meat-case-section {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 6px 6px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0 6px, transparent 6px),
    linear-gradient(180deg, color-mix(in srgb, var(--section-color), #000 45%) 0%, rgba(2, 6, 23, 0.92) 100%);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.meat-case-section:hover { border-color: #f8fafc; transform: translateY(-1px); }
.meat-case-section.empty { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.7); }
/* A tray is in hand and this is where it goes. */
.meat-case-section.droppable {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.7), 0 0 14px rgba(251, 146, 60, 0.4);
}

.meat-case-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
}
.meat-reach {
  font-size: 7px;
  letter-spacing: 0.6px;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 0 4px;
}

/* Trays behind the glass — one pip per unit, tinted by that unit's freshness. */
.meat-case-trays { display: flex; flex-wrap: wrap; gap: 2px; }
.meat-tray {
  width: 8px;
  height: 5px;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.26);
}
.meat-tray.filled {
  background: var(--band, #94a3b8);
  border-color: color-mix(in srgb, var(--band, #94a3b8), #000 45%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.meat-case-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.meat-case-count { font-size: 9px; color: #cbd5e1; }
.meat-case-band {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--band, #94a3b8);
}

/* ---------- The counter ---------- */

.meat-counter {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.55) 0%, rgba(28, 16, 12, 0.95) 100%);
  border: 2px solid rgba(217, 119, 6, 0.45);
  border-bottom: none;
}

.meat-counter-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fcd34d;
}
.meat-counter-sub {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #a8a29e;
  text-transform: none;
}

/* Ticket board — the department's instruction manual. Green means the case can
   cover it; red means go cut that. */
.meat-tickets { display: flex; flex-direction: column; gap: 3px; min-height: 44px; }
.meat-tickets-empty { font-size: 9px; color: #78716c; font-style: italic; }

.meat-ticket {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-left-width: 4px;
}
.meat-ticket.ready {
  border-color: rgba(74, 222, 128, 0.75);
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.55), rgba(2, 6, 23, 0.8));
}
.meat-ticket.blocked {
  border-color: rgba(239, 68, 68, 0.8);
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.55), rgba(2, 6, 23, 0.8));
}
.meat-ticket.head { box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.5); }

.meat-ticket-no {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fcd34d;
}
.meat-ticket-lines { display: flex; flex-wrap: wrap; gap: 6px; }
.meat-ticket-line { font-size: 10px; font-weight: 600; color: #e2e8f0; }
.meat-ticket-line.short { color: #fca5a5; text-decoration: underline wavy rgba(248, 113, 113, 0.7); }
.meat-ticket-state {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #cbd5e1;
  min-width: 34px;
  text-align: right;
}
.meat-ticket.ready .meat-ticket-state { color: #4ade80; }
.meat-ticket.blocked .meat-ticket-state { color: #fca5a5; }

.meat-counter-rail {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #cbd5e1, #64748b);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ---------- Counter queue ---------- */

.meat-queue-area {
  grid-column: 1 / span 2;
  grid-row: 3;
  position: relative;
  min-height: 96px;
}

/* A painted line on the floor where the counter line forms. */
.meat-queue-area::before {
  content: 'PLEASE WAIT HERE';
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 84px;
  padding-bottom: 3px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(252, 211, 77, 0.35);
  border-bottom: 2px dashed rgba(252, 211, 77, 0.22);
  pointer-events: none;
}

.meat-queue {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 70px;
  padding-top: 3px;
}
.meat-queue .meat-shopper { transition: transform 0.18s linear; transform-origin: left top; }

/* ---------- Double-sided floor fridge ---------- */

.meat-fridge-island {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: start;
  min-height: 0;
  padding: 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(30, 58, 78, 0.7), rgba(2, 6, 23, 0.95));
  border: 2px solid rgba(56, 189, 248, 0.35);
}

.meat-fridge-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #7dd3fc;
  text-align: center;
}

/* The two faces sit back-to-back with a chrome spine between them, so it reads
   as one double-sided unit rather than two cabinets. */
.meat-fridge { display: flex; flex-direction: column; min-height: 0; }

.meat-fridge-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, color-mix(in srgb, var(--side-color), #000 55%), rgba(2, 6, 23, 0.9));
  transition: border-color 0.15s ease;
}
.meat-fridge-side:first-child { border-radius: 8px 8px 0 0; }
.meat-fridge-side:last-child {
  border-radius: 0 0 8px 8px;
  border-top: 4px solid #94a3b8;   /* the chrome spine between the two faces */
}
.meat-fridge-side:hover { border-color: #f8fafc; }
.meat-fridge-side.droppable {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.7), 0 0 14px rgba(251, 146, 60, 0.4);
}

.meat-fridge-label {
  display: flex;
  flex-direction: column;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #e2e8f0;
}
.meat-fridge-label small {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #94a3b8;
}

/* Six divided seafood areas; the chicken/beef face has two. */
.meat-fridge-areas { display: grid; gap: 3px; }
.meat-fridge-areas.areas-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meat-fridge-areas.areas-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.meat-fridge-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.meat-fridge-area.empty {
  border-color: rgba(239, 68, 68, 0.85);
  animation: meatAlert 1.1s ease-in-out infinite;
}

.meat-area-emoji { font-size: 13px; line-height: 1; }
.meat-area-name {
  font-size: 8px;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.meat-area-bar {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}
.meat-area-fill { display: block; height: 100%; background: var(--band, #38bdf8); }

/* Self-serve shoppers browsing the aisle beside the island. */
.meat-fridge-aisle { position: relative; height: 70px; flex: 0 0 auto; }
.meat-fridge-shopper { position: absolute; left: 4px; top: 0; }
.meat-fridge-shopper .meat-shopper { transform-origin: left top; }
.meat-fridge-want {
  position: absolute;
  left: 8px;
  top: -14px;
  padding: 1px 4px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

/* ---------- Score pops ---------- */

.meat-pops {
  position: absolute;
  left: 50%;
  top: 26%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  z-index: 3;
}

.meat-pop {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
  animation: meatPopRise 1.1s ease-out forwards;
}
.meat-pop.good { color: #4ade80; }
.meat-pop.ok { color: #fcd34d; }
.meat-pop.bad { color: #f87171; }

@keyframes meatPopRise {
  0%   { opacity: 0; transform: translateY(6px) scale(0.85); }
  20%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-26px) scale(1); }
}

/* ---------- Footer ---------- */

.meat-footer {
  flex: 0 0 auto;
  padding: 5px 14px;
  font-size: 10px;
  color: #fcd34d;
  background: rgba(2, 6, 23, 0.8);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

/* ---------- Yield sheet ---------- */

.meat-report {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 10, 0.88);
  backdrop-filter: blur(8px);
}
.meat-report.show { display: flex; }

.meat-report-card {
  width: min(660px, 90%);
  padding: 20px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1f1512 0%, #0d0908 100%);
  border: 2px solid rgba(248, 113, 113, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.meat-report-card h2 {
  margin: 0 0 14px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #fecaca;
}

.meat-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 8px;
}
.meat-report-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.meat-report-stat b { font-size: 17px; color: #f8fafc; letter-spacing: 0; }

.meat-report-note {
  margin-top: 12px;
  font-size: 10px;
  line-height: 1.5;
  color: #94a3b8;
}

.meat-report-actions { display: flex; gap: 10px; margin-top: 16px; }
.meat-report-btn {
  flex: 1 1 0;
  padding: 10px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  cursor: pointer;
}
.meat-report-btn.primary {
  color: #1c1008;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border-color: #b45309;
}
.meat-report-btn:hover { filter: brightness(1.12); }

/* ===========================================================================
   LONG WHITE MEAT JACKET
   ---------------------------------------------------------------------------
   Department uniform: the butchers wear the long white coat instead of the
   beige shirt + black apron the front-end crew wears. Built on the shared
   .cashier-sprite so the silhouette, faces and hair styles stay identical.
   =========================================================================== */

.cashier-sprite.outfit-meatcoat { --cashier-uniform: #f8fafc; }

/* Coat torso — white, with a faint seam down the button placket. */
.cashier-sprite.outfit-meatcoat::before {
  background:
    linear-gradient(90deg, transparent 47%, rgba(148, 163, 184, 0.5) 47% 53%, transparent 53%),
    linear-gradient(180deg, #ffffff 0%, #e2e8f0 65%, #cbd5e1 100%);
  border-color: #94a3b8;
}

/* Long sleeves, cuffed at the wrist. */
.cashier-sprite.outfit-meatcoat .cashier-arm-l,
.cashier-sprite.outfit-meatcoat .cashier-arm-r {
  height: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 78%, #cbd5e1 100%);
  border-color: #94a3b8;
}

/* The skirt of the coat — this is what makes it read as LONG: the white panel
   runs past the hem of the torso and down over the trousers. */
.cashier-sprite.outfit-meatcoat .cashier-apron {
  left: 7px;
  top: 26px;
  width: 24px;
  height: 22px;
  border-radius: 2px 2px 4px 4px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(148, 163, 184, 0.55) 46% 54%, transparent 54%),
    linear-gradient(180deg, #ffffff 0%, #eef2f7 60%, #cbd5e1 100%);
  border: 1px solid #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Notched collar instead of the apron's neck strap. */
.cashier-sprite.outfit-meatcoat .cashier-apron::before {
  content: '';
  left: 50%;
  top: -5px;
  width: 14px;
  height: 5px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff, #dbe3ec);
  border: 1px solid #94a3b8;
  border-radius: 2px 2px 0 0;
  clip-path: polygon(0 0, 100% 0, 74% 100%, 26% 100%);
}

/* Two coat buttons on the placket. */
.cashier-sprite.outfit-meatcoat .cashier-apron::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 5px;
  width: 3px;
  height: 12px;
  transform: translateX(-50%);
  background-image:
    radial-gradient(circle at 50% 1.5px, #64748b 1.2px, transparent 1.8px),
    radial-gradient(circle at 50% 9px, #64748b 1.2px, transparent 1.8px);
}

/* Butcher's nametag pinned to the coat, in department red. */
.cashier-sprite.outfit-meatcoat .cashier-tag {
  left: 21px;
  top: 24px;
  background: linear-gradient(180deg, #fca5a5 0%, #b91c1c 100%);
  border-color: #7f1d1d;
  box-shadow: 0 0 3px rgba(248, 113, 113, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- Title-screen section bays ----------
   Shared by every playable window on the storefront (produce, bakery, chef,
   service, grocery, deli/cheese, meat/seafood). */

.mm-bay-sect { cursor: pointer; }
.mm-bay-sect:hover { filter: brightness(1.2); }
.mm-bay-sect .mm-bay-enter {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 2px 6px;
  color: #1c1008;
  background: linear-gradient(180deg, #fca5a5, #ef4444);
  border-radius: 999px;
  white-space: nowrap;
  animation: meatBayPulse 1.8s ease-in-out infinite;
}

@keyframes meatBayPulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(0.96); }
  50%      { opacity: 1;    transform: translateX(-50%) scale(1.04); }
}

@media (max-width: 1250px) {
  .meat-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .meat-floor { grid-template-columns: 230px minmax(0, 1fr) 240px; }
  .meat-front { grid-template-columns: 140px minmax(0, 1fr); }
}
