/* Spud & Root: retail/production/index.html, the Packing Floor's menu
   (packaging-menu.js). The Flat look of the games: no outlines, flat fills,
   calm, chunky for a phone; a column no wider than 520 px. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --pm-page: #102229;
  --pm-floor: #16303b;
  --pm-wall: #1c3a47;
  --pm-circle: #21434f;
  --pm-rail: #1f3e4a;
  --pm-teal: #2a9d8f;
  --pm-hero: #e76f51;
  --pm-belt: #264653;
  --pm-bag: #e9c46a;
  --pm-card: #f4f1de;
  --pm-ink: #16303b;
  --pm-muted: #8fa8b2;
  --pm-alarm: #ff4438;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.pm-page {
  min-height: 100vh;
  background: var(--pm-page);
  color: var(--pm-card);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.pm {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
  background: var(--pm-floor);
}
.js .pm-noscript { display: none; }
.pm-noscript a { color: var(--pm-bag); }

/* The header: back, the title, the boss button. */
.pm-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 -14px;
  padding: 10px 14px 14px;
  background: var(--pm-wall);
}
.pm-leave {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--pm-circle);
  color: var(--pm-card);
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
}
.pm-kicker { margin: 0; color: var(--pm-muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.pm-title { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.05; }
.pm-boss {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--pm-alarm);
  color: #fff;
  font: 700 16px/1 "Fredoka", system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.pm-boss:active { transform: translateY(2px); }
.pm-pitch { margin: 16px 2px 6px; color: var(--pm-card); font-size: 17px; font-weight: 500; line-height: 1.35; }
.pm-total { margin: 0 2px 16px; color: var(--pm-muted); font-size: 15px; }
.pm-total b { color: var(--pm-bag); font-size: 20px; font-variant-numeric: tabular-nums; }

/* The line: the stations down a belt, in the order the potatoes go. */
.pm-line {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}
.pm-line::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 4px;
  width: 8px;
  border-radius: 4px;
  background: var(--pm-belt);
}
.pm-stop { position: relative; }
.pm-stop::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 14px;
  height: 6px;
  margin-top: -3px;
  background: var(--pm-rail);
}
.pm-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px 10px 10px;
  border-radius: 8px;
  background: var(--pm-card);
  color: var(--pm-ink);
  text-decoration: none;
  transition: transform 0.12s ease-out;
}
.pm-card:hover { transform: translateX(3px); }
.pm-card:active { transform: scale(0.98); }
.pm-card:focus-visible { outline: 4px solid var(--pm-bag); outline-offset: 3px; }
.pm-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--pm-circle);
}
.pm-card__icon svg { width: 44px; height: 44px; }
.pm-card__text { display: grid; gap: 3px; min-width: 0; }
.pm-card__name { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; line-height: 1.1; }
.pm-card__n {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--pm-teal);
  color: #fff;
  font: 700 14px/1 system-ui, sans-serif;
}
.pm-card__job { font-size: 15px; font-weight: 600; line-height: 1.25; }
.pm-card__tag { color: #5a6f78; font-size: 14px; font-weight: 500; }
.pm-stars { display: flex; gap: 2px; }
.pm-stars i {
  width: 18px;
  height: 18px;
  background: #d6d2bd;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.pm-stars i.is-on { background: var(--pm-bag); }
.pm-start {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--pm-hero);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pm-card--start { box-shadow: inset 0 0 0 3px var(--pm-hero); }

@media (max-width: 380px) {
  .pm-card { grid-template-columns: 48px 1fr; }
  .pm-card__icon { width: 48px; height: 48px; }
  .pm-stars { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-card { transition: none; }
}


/* The production floor map, above the cards: packaging-map.js and .css. */
.pm-map { margin: 0 0 18px; }
