@font-face {
  font-family: Montserrat;
  src: url("/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Light, bright palette. Guide-like shapes and type, not the guide's station colors. */
:root {
  --ink: #222222;
  --text: #2c2c2c;
  --muted: #6e6e6e;
  --paper: #fffdf8;
  --tile: #f6f4ef;
  --white: #ffffff;
  --line: #cfc8bc;
  --gold: #e0b422;
  --ok: #2eb872;
  --warn: #ef6b73;
  --shadow: none;
  --slice: #ff6b57;
  --slice-bg: #ffeae6;
  --prep: #3db8e8;
  --prep-bg: #e7f6fd;
  --portion: #3dcc86;
  --portion-bg: #e8faf0;
  --cook: #ff9f2e;
  --cook-bg: #fff1de;
  --clean: #8b7cff;
  --clean-bg: #efedff;
  --dough: #c4a35a;
  --dough-bg: #f7f0e0;
  --ft-produce: #2f9e4f;
  --ft-produce-bg: #e8f7ed;
  --ft-frozen: #c4853c;
  --ft-frozen-bg: #f7efe5;
  --ft-meat: #e14545;
  --ft-meat-bg: #fdeaea;
  --ft-poultry: #e6c200;
  --ft-poultry-bg: #fff8d4;
  --ft-seafood: #2d7ee0;
  --ft-seafood-bg: #e7f1fc;
  --ft-dairy: #b7b1a6;
  --ft-dairy-bg: #faf9f6;
  --ft-cooked: #c4853c;
  --ft-cooked-bg: #f7efe5;
  --ft-neutral: #9aa0a8;
  --ft-neutral-bg: #f3f4f6;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.35;
  min-height: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}
button, a, .check, .pin, .task-complete, .station-remove, .confirm-btn,
[data-check], [data-pin], [data-complete-task], [data-station-remove],
[data-station-restore], [data-add-card], [data-activate-card] {
  touch-action: manipulation;
}
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 2px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}
.btn.secondary { background: var(--white); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.full { width: 100%; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 2px;
  border: 2px solid var(--line);
  background: var(--white);
  font-weight: 900;
  color: var(--ink);
  flex: none;
}
.chip, .tab {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 2px;
  border: 2px solid var(--line);
  background: var(--white);
  font-weight: 700;
  color: var(--text);
}
.chip[aria-pressed="true"], .tab[aria-selected="true"] {
  background: #fff3c0;
  border-color: var(--ink);
}

/* Top tabs, filter chips, and ? / menu — light tint, stronger border, filled when active */
.tab[data-tab="kitchen"] {
  background: var(--cook-bg);
  border-color: var(--cook);
  color: #9a5a00;
}
.tab[data-tab="kitchen"][aria-selected="true"] {
  background: var(--cook);
  border-color: #e88810;
  color: var(--ink);
}
.tab[data-tab="drivers"] {
  background: #e6faf6;
  border-color: #2eb8a0;
  color: #0f7a6a;
}
.tab[data-tab="drivers"][aria-selected="true"] {
  background: #2eb8a0;
  border-color: #1e9a86;
  color: #fff;
}
.header-tools .icon-btn {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
}
.filters .chip-all {
  background: #fff8e4;
  border-color: var(--gold);
  color: #7a5a00;
}
.filters .chip-all[aria-pressed="true"] {
  background: var(--gold);
  border-color: #c9a01a;
  color: var(--ink);
}
.filters .chip-slice {
  background: var(--slice-bg);
  border-color: var(--slice);
  color: #c43d2c;
}
.filters .chip-slice[aria-pressed="true"] {
  background: var(--slice);
  border-color: #e85a48;
  color: #fff;
}
.filters .chip-prep {
  background: var(--prep-bg);
  border-color: var(--prep);
  color: #1a7aa3;
}
.filters .chip-prep[aria-pressed="true"] {
  background: var(--prep);
  border-color: #2aa3d4;
  color: #fff;
}
.filters .chip-portion {
  background: var(--portion-bg);
  border-color: var(--portion);
  color: #1d8a58;
}
.filters .chip-portion[aria-pressed="true"] {
  background: var(--portion);
  border-color: #2bb572;
  color: var(--ink);
}
.filters .chip-cook {
  background: var(--cook-bg);
  border-color: var(--cook);
  color: #9a5a00;
}
.filters .chip-cook[aria-pressed="true"] {
  background: var(--cook);
  border-color: #e88810;
  color: var(--ink);
}
.filters .chip-clean {
  background: var(--clean-bg);
  border-color: var(--clean);
  color: #5b4ed4;
}
.filters .chip-clean[aria-pressed="true"] {
  background: var(--clean);
  border-color: #7a6bf0;
  color: #fff;
}

/* LOGIN */
.login-body { min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.login-wrap { max-width: 420px; margin: 0 auto; padding: calc(28px + var(--safe-top)) 22px calc(28px + var(--safe-bot)); }
.login-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 2px;
  padding: 22px;
  box-shadow: none;
}
.login-card label { display: block; font-weight: 700; margin-bottom: 8px; }
.login-card input[type="password"], .login-card input[type="text"] {
  width: 100%; min-height: 52px; border: 2px solid var(--ink); border-radius: 2px; padding: 10px 14px; background: #fff; margin-bottom: 14px;
}
.login-note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
.err { color: #c0392b; font-weight: 700; min-height: 1.2em; margin: 0 0 10px; }

/* HEADER: date + seasonal art only (tools sit quietly underneath) */
.app { padding-bottom: calc(24px + var(--safe-bot)); }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  padding: calc(0px + var(--safe-top)) 0 8px;
}
.header-banner {
  position: relative;
  width: 100%;
  min-height: 132px;
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
}
.season {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.season svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}
.season picture,
.season .season-photo {
  width: 100%;
  height: 100%;
  display: block;
}
.season .season-photo {
  object-fit: cover;
  object-position: 50% 50%;
}
.header-banner.has-photo {
  background: #3a1408;
}
.header-banner.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 8, 0, 0.18), rgba(20, 8, 0, 0.08) 45%, rgba(20, 8, 0, 0.22));
  pointer-events: none;
  z-index: 0;
}
.date-badge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  width: max-content;
  max-width: calc(100% - 16px);
  margin: 28px auto 24px;
  padding: 6px 8px 8px;
  background: rgba(255, 253, 248, 0.96);
  border: 3px solid var(--ink);
  border-radius: 2px;
  box-shadow: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.date-badge-main {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0 6px;
  text-align: center;
  cursor: pointer;
  min-width: 0;
}
.date-badge.is-today .date-badge-main { cursor: default; }
.day-nav {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
}
.date-today-hint {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
@media (min-width: 700px) {
  .header-banner { min-height: 152px; }
  .date-badge { margin: 34px auto 28px; }
}
.date-badge .dow {
  display: block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.date-badge .fulldate {
  display: block;
  font-weight: 900;
  font-size: clamp(1.6rem, 6.5vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 14px; position: relative; }
.header-tools .tabs { display: flex; gap: 6px; flex: 1; }
.header-tools .tab { flex: 1; }
.header-tools .tabs[hidden], .header-tools .tabs.hidden { display: none; }

/* TRAY: compact chips, several visible, swipe left to right */
.tray-wrap { padding: 4px 0 8px; }
.tray-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 2px 14px 6px;
}
.tray-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.tray-title span { font-weight: 650; color: var(--muted); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 0; -webkit-overflow-scrolling: touch; flex: 1; min-width: 0; }
.suggest-note { margin: 0 14px 6px; font-size: 0.8rem; font-weight: 700; color: var(--ft-meat); }
.tray-row {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 14px 4px;
}
.tray-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 40px;
  border-radius: 2px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1;
  box-shadow: none;
}
#tray-prev { left: 8px; }
#tray-next { right: 8px; }
.tray, .wheel {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding: 14px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding: 4px 14px 12px;
}
.tray {
  flex: 1;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  padding: 4px 4px 8px;
  scroll-padding: 8px;
  touch-action: pan-x;
}
.tray .card-btn {
  touch-action: pan-x;
  cursor: grab;
  width: 136px;
  min-width: 136px;
  max-width: 150px;
  min-height: 92px;
  height: auto;
  border-radius: 2px;
  box-shadow: none;
  scroll-snap-align: start;
  overflow: hidden;
}
.tray .card-btn .strip-inner {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  min-height: 92px;
  height: auto;
  gap: 0 6px;
  padding: 8px 8px 8px 0;
  align-items: stretch;
}
.tray .card-btn .stripe { width: 6px; border-radius: 0; }
.tray .card-btn .main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
}
.tray .card-btn .name {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: break-word;
  width: 100%;
}
.tray .card-btn .art { display: none !important; }
.tray-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tray .card-btn .amt-line {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}
.tray .card-btn .badge-suggest {
  position: static;
  top: auto; right: auto;
  font-size: 0.62rem;
  padding: 1px 5px;
  line-height: 1.2;
}
.name-short { display: none; }
.name-full { display: inline; }

.strip, .card-btn, .task {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(86vw, 420px);
  min-width: 260px;
  min-height: 88px;
  max-height: none;
  border-radius: 2px;
  border: 3px solid var(--stripe, var(--line));
  background: var(--tint, var(--white));
  box-shadow: none;
  position: relative;
  overflow: hidden;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
}
.card-btn { cursor: grab; touch-action: pan-x; padding: 0; }
.card-btn.dragging, .drag-ghost { touch-action: none; cursor: grabbing; }
.card-btn:active { cursor: grabbing; }

.strip-inner {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 88px;
  padding: 8px 10px 8px 0;
}
.stripe {
  width: 10px;
  align-self: stretch;
  background: var(--stripe);
  border-radius: 0;
}
.topline { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.strip .name, .task .name, .card-btn .name {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  min-height: 0;
}
.amt-line { font-weight: 800; color: var(--stripe, var(--ink)); white-space: nowrap; }
.art {
  width: 52px; height: 42px;
  margin: 4px 0 0;
  display: flex; align-items: center; justify-content: flex-start;
  background: transparent;
}
.art svg, .art img { max-width: 52px; max-height: 42px; width: auto; height: auto; background: transparent; }
.meta { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.assumed { font-size: 0.65rem; font-weight: 800; color: var(--cook); letter-spacing: 0.04em; }
.notes { font-size: 0.78rem; color: var(--muted); margin: 2px 0 0; }
.badge-suggest {
  position: absolute; top: 6px; right: 8px;
  background: var(--ft-meat); color: #fff;
  font-size: 0.62rem; font-weight: 800; border-radius: 2px; padding: 2px 6px;
}

/* HACCP cutting-board tints + stronger stripe/border */
.ft-produce { --tint: var(--ft-produce-bg); --stripe: var(--ft-produce); }
.ft-frozen { --tint: var(--ft-frozen-bg); --stripe: var(--ft-frozen); }
.ft-meat { --tint: var(--ft-meat-bg); --stripe: var(--ft-meat); }
.ft-poultry { --tint: var(--ft-poultry-bg); --stripe: var(--ft-poultry); }
.ft-seafood { --tint: var(--ft-seafood-bg); --stripe: var(--ft-seafood); }
.ft-dairy { --tint: var(--ft-dairy-bg); --stripe: var(--ft-dairy); }
.ft-cooked { --tint: var(--ft-cooked-bg); --stripe: var(--ft-cooked); }
.ft-neutral { --tint: var(--ft-neutral-bg); --stripe: var(--ft-neutral); }

/* BOARD: stacked short section blocks */
.kitchen-main { padding: 0 0 8px; }
.board { display: flex; flex-direction: column; gap: 12px; padding: 0 14px; }
.section {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: none;
}
.section[data-section="dough"],
.section[data-section="slice"],
.section[data-section="prep"],
.section[data-section="portion"],
.section[data-section="cook"],
.section[data-section="clean"] {
  background: var(--white);
  border-color: var(--ink);
  --section-bar: var(--ink);
  --section-ink: #fff;
}
.section.do-first {
  background: var(--white);
  border: 3px solid #c62828;
  box-shadow: none;
  --section-bar: #c62828;
  --section-ink: #fff;
}
.section.do-first .section-h h2 {
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--section-ink);
}
.do-first-hint { color: var(--muted); font-weight: 650; font-size: 0.9rem; }
.section-h {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 10px 12px; background: var(--section-bar, var(--ink)); color: var(--section-ink, #fff); cursor: pointer;
}
.section-h h2 {
  margin: 0; font-size: 1.5rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: inherit;
}
.section-h .add-free {
  min-height: 36px; border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  font-weight: 800; border-radius: 2px; padding: 6px 10px;
}
.section .wheel { padding-left: 10px; padding-right: 10px; }
.task { display: block; }

/* Compact main-board cards: essentials only, so a section's cards fit at a glance */
.section .wheel {
  flex-wrap: wrap;
  overflow: visible;
  scroll-snap-type: none;
  touch-action: auto;
  gap: 8px;
  padding: 8px 10px 10px;
}
.section .wheel {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}
.section .active-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  align-items: stretch;
}
.section .faded-row {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}
.section .task.compact {
  flex: 0 0 calc(50% - 6px);
  width: calc(50% - 6px);
  max-width: calc(50% - 6px);
  min-width: 0;
  min-height: 208px;
  height: auto;
  border-radius: 2px;
  box-shadow: none;
  cursor: pointer;
  transition: opacity 0.28s ease, transform 0.28s ease;
  overflow: hidden;
}
.section .task.compact .strip-inner {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  min-height: 100%;
  height: 100%;
  gap: 0 6px;
  padding: 6px 6px 6px 0;
  align-items: stretch;
}
.section .task.compact .tile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  height: 100%;
  padding: 2px 2px 2px 0;
  text-align: center;
}
.section .task.compact .check {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 2px;
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ok);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.section .task.compact.leaving,
.slide .task.leaving,
.task.leaving,
.task.is-leaving {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.section .task.compact .stripe {
  width: 6px;
  border-radius: 0;
}
.section .task.compact .name {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.12;
  color: var(--ink);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  width: 100%;
  text-align: center;
}
.section .task.compact .name-full { display: inline; }
.section .task.compact .name-short { display: none; }
.section .task.compact .amt-line {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  padding-right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 0.25em;
  width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}
.section .task.compact .amt-num,
.section .task.compact .amt-dough {
  font-weight: 900;
  overflow-wrap: break-word;
}
.section .task.compact .amt-unit {
  font-weight: 800;
}
.section .task.compact .amt-note {
  display: block;
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 1px;
  overflow-wrap: break-word;
}
@media (max-width: 699px) {
  .section .task.compact { min-height: 208px; }
  .section .task.compact .amt-line {
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1;
  }
  .section .task.compact .amt-num {
    font-size: 36px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
  }
  .section .task.compact .amt-unit {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 1px;
  }
  .section .task.compact .amt-note {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 4px;
    max-width: 100%;
  }
  .section .task.compact .amt-dough {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
  }
  .section .task.compact .art,
  .section .task.compact .art img,
  .section .task.compact .art svg {
    width: 32px;
    height: 26px;
    max-width: 34px;
    max-height: 28px;
  }
}
.section .task.compact .art,
.section .task.compact .art img,
.section .task.compact .art svg {
  width: 40px;
  height: 32px;
  max-width: 44px;
  max-height: 34px;
  margin: 2px auto 0;
}
.section .task.compact .check {
  margin-top: auto;
}
.section .task.compact .who-badge {
  position: absolute;
  top: 4px;
  left: 10px;
  right: auto;
  max-width: none;
  font-size: 0.62rem;
  padding: 1px 6px;
  line-height: 1.2;
}
.section .task.compact .pin {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #c9a01a;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  opacity: 0.55;
}
.section .task.compact .pin[aria-pressed="true"],
.section.do-first .task.compact .pin { opacity: 1; color: #e08a00; }
@media (min-width: 700px) {
  .section .task.compact {
    flex: 0 0 156px;
    width: 156px;
    min-width: 156px;
    max-width: 168px;
    min-height: 176px;
  }
  .tray .card-btn {
    width: 148px;
    min-width: 148px;
    max-width: 160px;
    min-height: 100px;
  }
}
@media (min-width: 1100px) {
  .section .task.compact {
    flex: 0 0 156px;
    width: 156px;
  }
}

.task .strip-inner { grid-template-columns: 10px 44px 1fr auto; }
.task .check {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px;
  border-radius: 2px; border: 3px solid var(--ink); background: #fff;
  color: var(--ok); font-size: 1.25rem; font-weight: 900; line-height: 1;
  padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.dough-pickers { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.dough-row { width: 100%; justify-content: space-between; }
.dough-row .meta { flex: 1; font-weight: 700; font-size: 0.85rem; }
.dough-row .per-tray { font-weight: 650; color: var(--muted); font-size: 0.78rem; }
.dough-total { font-weight: 800; font-size: 0.9rem; padding: 4px 0 2px; }
.task.done .check { background: var(--ok); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button {
  width: 40px; height: 40px; border-radius: 2px; border: 2px solid var(--ink); background: var(--white); font-weight: 900; font-size: 1.15rem;
}
.qty .amt { min-width: 48px; text-align: center; font-weight: 900; background: none; border: 0; padding: 6px 0; color: var(--ink); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.quick button, .choice {
  min-height: 36px; padding: 4px 10px; border-radius: 2px; border: 2px solid var(--ink); background: var(--white); font-weight: 800;
}
.choice[aria-pressed="true"] { background: #fff3c0; border-color: var(--ink); }
.empty { color: var(--muted); font-weight: 600; padding: 16px 8px; text-align: center; }
.who-badge {
  position: absolute; top: 6px; right: 8px; max-width: 46%;
  background: var(--white); color: var(--ink); border: 2px solid var(--ink);
  font-size: 0.68rem; font-weight: 800; border-radius: 2px; padding: 2px 8px; z-index: 1;
}
.assign {
  margin-top: 4px; min-height: 32px; padding: 3px 8px; border-radius: 2px;
  border: 2px solid var(--line); background: var(--white); font-weight: 800; font-size: 0.78rem;
}

.banner {
  margin: 8px 14px;
  background: var(--white); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 2px; padding: 10px 14px;
  font-weight: 900; letter-spacing: 0.04em; text-align: center; text-transform: uppercase; font-size: 1rem;
  position: relative;
  z-index: 1;
}
.banner[contenteditable="true"] { background: #ffd54a; }

.completed, .block, .relevance {
  margin: 0 14px 16px; background: var(--white);
  border: 3px solid var(--ink); border-radius: 2px; padding: 0 12px 12px; box-shadow: none; overflow: hidden;
}
.completed h2, .block h2, .relevance h2 {
  margin: 0 -12px 10px; padding: 10px 12px;
  background: var(--ink); color: #fff;
  font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase;
}
.toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.done-item { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.done-item .when { color: var(--muted); font-size: 0.85rem; font-weight: 700; }

.drivers { padding: 12px 0; display: flex; flex-direction: column; gap: 0; }
.routine-item, .inv-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.search { width: 100%; min-height: 48px; border: 2px solid var(--ink); border-radius: 2px; padding: 8px 12px; margin-bottom: 8px; }
.putaway-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.putaway-row select, .putaway-row input { min-height: 48px; border-radius: 2px; border: 2px solid var(--ink); padding: 8px; flex: 1; }

.relevance .rel-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.relevance .card-btn { scroll-snap-align: start; }

/* 3D slideshow */
.slides-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(250, 247, 240, 0.86);
  backdrop-filter: blur(14px) saturate(0.85);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
  display: flex; flex-direction: column;
  padding: calc(10px + var(--safe-top)) 10px calc(12px + var(--safe-bot));
  touch-action: none;
  overscroll-behavior: none;
}
.slides-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 248, 0.55);
  pointer-events: none;
  z-index: 0;
}
.slides-back > * { position: relative; z-index: 1; }

.slides-ui { flex: 1; display: flex; flex-direction: column; max-width: 720px; width: 100%; margin: 0 auto; overflow: visible; }
.slides-close { align-self: flex-end; width: auto; padding: 0 14px; border-radius: 2px; }
.slides-label { text-align: center; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; font-size: 1.1rem; margin: 4px 0 8px; }
.carousel {
  flex: 1; position: relative; perspective: 1200px;
  min-height: 280px; touch-action: none;
  overflow: visible;
}
.slide {
  position: absolute; left: 50%; top: 230px;
  width: min(calc(100vw - 28px), 400px);
  max-width: calc(100vw - 28px);
  box-sizing: border-box;
  transform-style: preserve-3d;
  transform-origin: top center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  border-radius: 2px;
  box-shadow: none;
  will-change: transform, opacity;
  touch-action: none;
}
.slide button, .slide input, .slide .qty, .slide .assign {
  touch-action: manipulation;
}
.slide .strip, .slide .task, .slide .card-btn { width: 100%; min-width: 0; box-shadow: none; }
.slide.is-front { pointer-events: auto; }
.slide.is-behind,
.slide.is-prev { pointer-events: none; }
.slide.is-behind .topline,
.slide.is-behind .name,
.slide.is-prev .topline,
.slide.is-prev .name {
  pointer-events: auto;
  cursor: pointer;
}
.slide.is-front .task,
.slide.is-front .strip {
  box-shadow: 0 14px 32px rgba(20, 10, 0, 0.22);
}
.slide.is-behind .task,
.slide.is-behind .strip {
  box-shadow: 0 6px 16px rgba(20, 10, 0, 0.12);
}
/* Name sits at the true top-left of a slideshow card so stacked peeks show the item. */
.slide .task .strip-inner {
  position: relative;
  padding-top: 36px;
}
.slide .task .main .topline {
  position: absolute;
  top: 0;
  left: 14px;
  right: 8px;
  height: 36px;
  display: flex;
  align-items: center;
  z-index: 2;
}
.slide .task .name {
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Keep stacked peeks to the name strip; body content stays on the front card. */
.slide.is-behind .assumed,
.slide.is-prev .assumed,
.slide.is-behind .notes,
.slide.is-prev .notes,
.slide.is-behind .art,
.slide.is-prev .art,
.slide.is-behind .qty,
.slide.is-prev .qty,
.slide.is-behind .check,
.slide.is-prev .check,
.slide.is-behind .assign,
.slide.is-prev .assign,
.slide.is-behind .quick,
.slide.is-prev .quick,
.slide.is-behind .dough-pickers,
.slide.is-prev .dough-pickers,
.slide.is-behind .amt-line,
.slide.is-prev .amt-line {
  visibility: hidden;
}
.slides-nav { display: flex; justify-content: center; gap: 12px; margin: 10px 0; }
.slides-nav .btn { width: 56px; font-size: 1.6rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; padding: 8px 4px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.swatch { width: 14px; height: 14px; border-radius: 2px; border: 2px solid var(--c); background: var(--bg); }

.modal-back {
  position: fixed; inset: 0; background: rgba(40, 40, 40, 0.25);
  z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 12px;
}
.modal {
  background: var(--white); width: 100%; max-width: 560px; max-height: min(90vh, 720px);
  overflow: auto; border-radius: 2px; border: 3px solid var(--ink); padding: 16px;
}
.modal h2 { margin: 0 0 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 700; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; border: 2px solid var(--ink); border-radius: 2px; padding: 8px 10px;
}
.field textarea { min-height: 90px; }
.drag-ghost { position: fixed; pointer-events: none; z-index: 95; opacity: 0.95; transform: scale(1.03); }
.toast-msg {
  position: fixed; left: 50%; bottom: calc(18px + var(--safe-bot)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 12px 10px 16px; border-radius: 2px; font-weight: 700; z-index: 100; max-width: 90vw;
  display: flex; align-items: center; gap: 10px;
}
.toast-action {
  background: #ffe08a; color: var(--ink); border: 2px solid var(--ink); border-radius: 2px;
  font-weight: 800; min-height: 36px; min-width: 64px; padding: 4px 12px;
}
.hidden { display: none !important; }
.swipe { width: 100%; accent-color: var(--cook); height: 28px; }

@media (min-width: 1000px) {
  .kitchen-main { padding: 0; }
  .board { padding: 0 14px; }
  .relevance { display: none !important; }
}

.login-mark { display:flex; justify-content:center; margin: 0 0 16px; }
.login-mark img { width:72px; height:72px; }
.section.drop-over { outline: 3px dashed var(--ink); outline-offset: 2px; }
.app-menu, .legend-pop {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--white); border: 3px solid var(--ink); border-radius: 2px;
  padding: 8px; box-shadow: none; z-index: 50; min-width: 200px;
  display: flex; flex-direction: column; gap: 6px;
}
.header-tools { position: relative; }
.art img { object-fit: contain; max-width: 52px; max-height: 42px; filter: drop-shadow(0 1px 1px rgba(40,40,40,.2)); }

.tray .badge-suggest {
  top: 3px; right: 4px;
  font-size: 0.52rem;
  padding: 1px 5px;
}
.tray { scrollbar-width: thin; }

.badge-today { background: var(--cook); }
.tray .card-btn.is-suggested { box-shadow: none; }


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tray-search-wrap {
  padding: 4px 14px 8px;
}
#tray-search {
  width: 100%;
  min-height: 44px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 700;
  font-size: 1rem;
}
#tray-search::placeholder { color: var(--muted); font-weight: 650; }
.art-stack { position: relative; display: inline-block; line-height: 0; }
.art-stack > img { display: block; }
.art { overflow: hidden; }
.art-overlay {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 52%;
  height: 52%;
  pointer-events: none;
}
.art-overlay svg { width: 100%; height: 100%; max-width: none; max-height: none; }
.section .task.compact .amt-dough-line,
.tray .card-btn .amt-dough-line {
  display: block;
}
.section .task.compact .amt-line .amt-note,
.tray .card-btn .amt-line .amt-note {
  display: block;
}

.section .task.compact .amt-dough-plain,
.tray .card-btn .amt-dough-plain {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  gap: 0;
}
.section .task.compact .amt-dough-plain .amt-num {
  display: block;
}
.section .task.compact .amt-dough-plain .amt-unit,
.section .task.compact .amt-dough-plain .amt-note {
  display: block;
  flex-basis: auto;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

/* Assigned tab + person to-do (black-and-white chrome, colorful cards) */
.assigned-tab {
  min-height: 44px;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: auto;
}
.assigned-tab[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.view-assigned, .view-person { padding: 8px 14px 24px; }
.assigned-list { display: flex; flex-direction: column; gap: 12px; }
.assigned-group h2 {
  margin: 0;
  padding: 10px 12px;
  background: var(--ink);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.assigned-group {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 2px;
  overflow: hidden;
}
.assigned-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
}
@media (min-width: 700px) {
  .assigned-tiles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .assigned-tiles { grid-template-columns: 1fr 1fr 1fr; }
}
.person-tile {
  width: 100%;
  min-height: 88px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.person-tile .pname {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.person-tile .pmeta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.25;
}
.assigned-empty, .person-empty {
  padding: 20px 14px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.person-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.person-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.person-back {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}
.person-head h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.person-shift {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}
.person-search-wrap { margin: 0 0 10px; }
#person-search {
  width: 100%;
  min-height: 44px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 700;
}
.person-tray-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; -webkit-overflow-scrolling: touch; }
.person-board .section { margin: 0; }
.section .task.compact .who-badge {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hold-menu .quick { display: flex; flex-direction: column; gap: 8px; }
.hold-menu .btn { width: 100%; }

.person-tray-row .card-btn {
  flex: 0 0 auto;
  width: 136px;
  min-width: 136px;
  max-width: 150px;
}
.person-head { padding-top: 4px; }
.person-head .person-back { align-self: flex-start; }

.section .task.compact .tile-body { padding-top: 4px; }
.section .task.compact .who-badge {
  position: static;
  display: inline-block;
  max-width: 100%;
  margin: 2px auto 0;
  align-self: center;
}

.person-tray-row .add-more-tile,
.person-tray-wrap > .add-more-tile {
  flex: 0 0 136px;
  box-sizing: border-box;
  width: 136px;
  min-width: 136px;
  max-width: 136px;
  min-height: 88px;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px;
  cursor: pointer;
  align-self: stretch;
  overflow: hidden;
}
.add-more-tile .add-more-plus {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.add-more-tile .add-more-label {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.slides-search-wrap {
  padding: 0 0 10px;
}
#slides-search {
  width: 100%;
  min-height: 44px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 700;
}
.person-tray-row .card-btn .pmeta {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
}

.person-tray-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 10px;
}
.person-tray-wrap .person-tray-row {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}
.person-tray-wrap .add-more-tile {
  flex: 0 0 136px;
  width: 136px;
  min-width: 136px;
  max-width: 136px;
  align-self: stretch;
}
.person-tray-row .amt-line,
.person-tray-row .tray-meta {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: normal;
  text-align: center;
}
.person-tray-row .amt-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.3em;
}

.print-btn, .person-print {
  min-height: 44px;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.print-ticket { display: none; }

@media print {
  @page { size: 80mm auto; margin: 0; }
  html, body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 80mm;
    max-width: 80mm;
  }
  body * { display: none !important; }
  #print-ticket, #print-ticket * { display: block !important; }
  #print-ticket {
    position: static !important;
    left: auto;
    top: auto;
    width: 72mm;
    max-width: 72mm;
    margin: 0 auto;
    padding: 3mm 4mm;
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-family: "Courier New", Courier, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
  }
  #print-ticket .pt-date,
  #print-ticket .pt-who,
  #print-ticket .pt-sec,
  #print-ticket .pt-line,
  #print-ticket .pt-special,
  #print-ticket .pt-shift {
    color: #000 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  #print-ticket .pt-date {
    font-size: 15px;
    font-weight: 900;
    margin: 0 0 2mm;
    text-transform: uppercase;
  }
  #print-ticket .pt-who {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 1mm;
    text-transform: uppercase;
  }
  #print-ticket .pt-shift {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 3mm;
  }
  #print-ticket .pt-sec {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 3mm 0 1mm;
    padding: 0;
  }
  #print-ticket .pt-line {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 0.8mm;
    white-space: pre-wrap;
    word-break: break-word;
  }
  #print-ticket .pt-special {
    margin: 4mm 0 0;
    font-size: 13px;
    font-weight: 700;
    white-space: pre-wrap;
  }
  #print-ticket img,
  #print-ticket svg { display: none !important; }
}

/* Letter-size printers that ignore 80mm page size still get a 72mm ticket. */
@media print and (min-width: 120mm) {
  html, body { width: auto; max-width: none; }
  #print-ticket { margin: 10mm 12mm; }
}

/* name + amount are the focus; no reserved gap for clipart */
.art:empty { display: none !important; }
.section .task.compact .tile-body {
  justify-content: flex-start;
  gap: 4px;
}
.section .task.compact .name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  overflow-wrap: break-word;
}
.section .task.compact .amt-line {
  font-size: 20px;
  font-weight: 900;
  margin-top: 2px;
}
.section .task.compact .amt-num,
.section .task.compact .amt-dough {
  font-size: 30px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.section .task.compact .art {
  margin: 6px auto 0;
  flex: 0 0 auto;
}
.section .task.compact .check { margin-top: auto; }
@media (max-width: 699px) {
  .section .task.compact { min-height: 188px; }
  .section .task.compact .name { font-size: 16px; overflow-wrap: break-word; }
  .section .task.compact .amt-num { font-size: 36px; }
}
@media (min-width: 700px) {
  .section .task.compact { min-height: 164px; }
  .section .task.compact .amt-num,
  .section .task.compact .amt-dough { font-size: 28px; }
}
.tray .card-btn .name {
  font-size: 18px;
  font-weight: 900;
}
.tray .card-btn .amt-line {
  font-size: 17px;
  font-weight: 900;
}
.slide .art:empty { display: none !important; }

/* desktop seasonal banner: keep aspect, no stretch */
@media (min-width: 1000px) {
  .header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vw * 140 / 800);
    min-height: 168px;
    max-height: 260px;
    overflow: hidden;
  }
  .season svg {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: auto;
    min-height: 100%;
    aspect-ratio: 800 / 140;
    transform: translateY(-50%);
  }
  .date-badge {
    margin: 0 auto;
  }
  .banner {
    margin: 10px 24px;
    padding: 12px 24px;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
  }
}

/* compact rectangle cards: text + check close, height fits content */
.section .task.compact {
  flex: 0 0 calc(50% - 6px);
  width: calc(50% - 6px);
  max-width: calc(50% - 6px);
  min-width: 0;
  min-height: 0;
  height: auto;
}
.section .task.compact .strip-inner {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  min-height: 0;
  height: auto;
  align-items: stretch;
  padding: 0 0 0 0;
  gap: 0 4px;
}
.section .task.compact .tile-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  grid-template-rows: auto auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 1px 6px;
  height: auto;
  min-height: 0;
  padding: 8px 6px 8px 6px;
  text-align: left;
}
.section .task.compact .main {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  text-align: left;
}
.section .task.compact .name {
  text-align: left;
  width: 100%;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.section .task.compact .amt-line {
  grid-column: 1;
  grid-row: 2;
  justify-content: flex-start;
  text-align: left;
  margin: 0;
  padding: 0;
  width: 100%;
}
.section .task.compact .art {
  grid-column: 1;
  grid-row: 3;
  margin: 2px 0 0;
  justify-self: start;
  flex: none;
}
.section .task.compact .art:empty { display: none !important; }
.section .task.compact .check {
  grid-column: 2;
  grid-row: 1 / -1;
  margin: 24px 0 0;
  align-self: end;
  justify-self: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}
.section .task.compact .pin {
  top: 3px;
  right: 8px;
  left: auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  font-size: 14px;
  line-height: 20px;
}
.section .task.compact .who-badge {
  position: static;
  display: inline-block;
  max-width: 100%;
  margin: 2px 0 0;
  align-self: flex-start;
}

.section .task.compact .amt-dough-plain {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  gap: 0;
}
.section .task.compact .amt-dough-line {
  display: block;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 699px) {
  .section .task.compact { min-height: 0; }
  .section .task.compact.is-dough-plain {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
  .section .task.compact .name { font-size: 19px; }
  .section .task.compact .amt-num { font-size: 36px; }
  .section .task.compact .amt-unit { font-size: 15px; font-weight: 800; }
  .section .task.compact .amt-dough-line { font-size: 24px; font-weight: 900; }
  .section .task.compact .art,
  .section .task.compact .art img,
  .section .task.compact .art svg {
    width: 36px;
    height: 30px;
    max-width: 40px;
    max-height: 32px;
    margin: 2px 0 0;
  }
}

@media (min-width: 700px) {
  .section .task.compact {
    flex: 0 0 calc(33.333% - 8px);
    width: calc(33.333% - 8px);
    min-width: 200px;
    max-width: none;
    min-height: 0;
  }
  .section .task.compact .amt-num,
  .section .task.compact .amt-dough { font-size: 28px; }
  .section .task.compact .amt-dough-line { font-size: 22px; font-weight: 900; }
}

@media (min-width: 1100px) {
  .section .task.compact {
    flex: 0 0 calc(25% - 8px);
    width: calc(25% - 8px);
    min-width: 220px;
    min-height: 0;
  }
}

/* ===== compact top banner: more list visible on one screen ===== */
.topbar { padding-bottom: 4px; }
.header-banner {
  min-height: 64px;
  height: 72px;
}
.date-badge {
  margin: 8px auto;
  padding: 2px 6px 3px;
  gap: 6px;
  border-width: 2px;
}
.day-nav {
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: 1.35rem;
  border-width: 2px;
}
.date-badge .dow,
.date-badge .fulldate {
  display: inline;
  vertical-align: baseline;
}
.date-badge .dow {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  margin-right: 0.45em;
}
.date-badge .fulldate {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: nowrap;
}
.date-today-hint {
  margin-top: 1px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}
.banner {
  margin: 6px 10px 4px;
  padding: 5px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 699px) {
  .header-banner { min-height: 60px; height: 68px; }
  .banner {
    white-space: normal;
    font-size: 0.72rem;
    padding: 4px 8px;
  }
}
@media (min-width: 700px) {
  .header-banner { min-height: 72px; height: 80px; }
  .date-badge { margin: 10px auto; }
  .date-badge .fulldate { font-size: 1.2rem; }
  .banner { font-size: 0.85rem; margin: 6px 16px 4px; }
}
@media (min-width: 1000px) {
  .header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    min-height: 80px;
    max-height: 96px;
    overflow: hidden;
  }
  .season svg {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: auto;
    min-height: 100%;
    aspect-ratio: 800 / 140;
    transform: translateY(-50%);
  }
  .date-badge { margin: 0 auto; }
  .date-badge .fulldate { font-size: 1.25rem; }
  .banner {
    margin: 6px 24px 4px;
    padding: 6px 16px;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
}

/* ===== squared-up compact cards: even grid, no clipping, full-height stripe ===== */
.section .wheel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  overflow: visible;
  align-items: stretch;
  padding: 8px 10px 10px;
}
.section .wheel .empty,
.section .wheel .do-first-hint {
  grid-column: 1 / -1;
}
.section .task.compact {
  flex: none;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 120px;
  height: auto;
  border-radius: 2px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
}
.section .task.compact.is-dough-plain {
  grid-column: 1 / -1;
  width: auto;
  max-width: none;
  flex: none;
}
.section .task.compact::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: var(--stripe, var(--ink));
  z-index: 1;
  pointer-events: none;
}
.section .task.compact .strip-inner {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  width: 100%;
  min-height: 100%;
  height: auto;
  align-items: stretch;
  gap: 0;
  padding: 0;
  box-sizing: border-box;
}
.section .task.compact .stripe {
  width: 6px;
  min-height: 100%;
  height: auto;
  align-self: stretch;
  visibility: hidden;
}
.section .task.compact .tile-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  grid-template-rows: auto auto auto;
  align-items: start;
  justify-content: stretch;
  gap: 2px 8px;
  height: auto;
  min-height: 100%;
  padding: 8px 8px 10px 6px;
  box-sizing: border-box;
  text-align: left;
  overflow: visible;
}
.section .task.compact .main {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  text-align: left;
}
.section .task.compact .name {
  text-align: left;
  width: 100%;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
}
.section .task.compact .amt-line {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0 0.3em;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  white-space: normal;
  overflow: visible;
  text-align: left;
}
.section .task.compact .amt-note {
  display: block;
  flex-basis: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  max-width: 100%;
}
.section .task.compact .art {
  grid-column: 1;
  grid-row: 3;
  margin: 2px 0 0;
  justify-self: start;
}
.section .task.compact .art:empty { display: none !important; }
.section .task.compact .check {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: start;
  justify-self: center;
  margin: 22px 0 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}
.section .task.compact .pin {
  top: 4px;
  right: 8px;
  left: auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  font-size: 14px;
  line-height: 20px;
  z-index: 3;
}
.section .task.compact .who-badge {
  position: static;
  display: inline-block;
  max-width: 100%;
  margin: 2px 0 0;
}

@media (max-width: 699px) {
  .section .task.compact { min-height: 120px; }
  .section .task.compact .name { font-size: 18px; }
  .section .task.compact .amt-num {
    font-size: 36px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
  }
  .section .task.compact .amt-unit { font-size: 15px; font-weight: 800; }
  .section .task.compact .amt-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .section .task.compact .amt-dough-line { font-size: 24px; font-weight: 900; white-space: nowrap; }
  .section .task.compact .art,
  .section .task.compact .art img,
  .section .task.compact .art svg {
    width: 36px;
    height: 30px;
    max-width: 40px;
    max-height: 32px;
  }
}

@media (min-width: 700px) {
  .section .wheel { grid-template-columns: repeat(3, 1fr); }
  .section .task.compact {
    min-width: 0;
    min-height: 96px;
    width: auto;
    max-width: none;
    flex: none;
  }
  .section .task.compact .amt-num,
  .section .task.compact .amt-dough { font-size: 28px; }
  .section .task.compact .amt-dough-line { font-size: 22px; font-weight: 900; }
  .section .task.compact .amt-line {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 0.3em;
  }
}

@media (min-width: 1100px) {
  .section .wheel { grid-template-columns: repeat(4, 1fr); }
  .section .task.compact { min-width: 0; }
}

/* phones: short labels on trays (name-full is on by default globally) */
.tray .card-btn .name-full,
.person-tray-row .name-full { display: none; }
.tray .card-btn .name-short,
.person-tray-row .name-short { display: inline; }

/* desktop: full names on cards and trays; phones keep short labels */
@media (min-width: 1000px) {
  .section .task.compact .name-full,
  .tray .card-btn .name-full,
  .person-tray-row .name-full,
  .person-board .name-full { display: inline; }
  .section .task.compact .name-short,
  .tray .card-btn .name-short,
  .person-tray-row .name-short,
  .person-board .name-short { display: none; }
}

/* inline number + unit always has a visible space (tray, person tray, desktop cards) */
.tray .card-btn .amt-line,
.person-tray-row .amt-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.3em;
  white-space: nowrap;
}
.amt-num + .amt-unit { margin-left: 0.15em; }

/* special banner: bright yellow, dark text, dark border */
.banner {
  background: #ffd54a;
  color: var(--ink);
  border: 3px solid var(--ink);
  margin: 6px 10px 4px;
  padding: 5px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.banner-label,
.banner-item {
  display: inline-block;
}
.banner-item {
  white-space: nowrap;
}
@media (min-width: 700px) {
  .banner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35em;
    font-size: 0.8rem;
    margin: 6px 16px 4px;
    padding: 5px 14px;
  }
}
@media (min-width: 1000px) {
  .banner {
    flex-direction: row;
    flex-wrap: nowrap;
    font-size: 0.85rem;
    margin: 6px 24px 4px;
    padding: 5px 16px;
    white-space: nowrap;
  }
}

@media (max-width: 699px) {
  .section .task.compact.is-dough-plain {
    grid-column: 1 / -1;
    width: auto;
    max-width: none;
  }
  .section .task.compact .name { font-size: 17px; letter-spacing: -0.03em; }
}
@media (min-width: 700px) {
  .section .task.compact.is-dough-plain {
    grid-column: auto;
  }
}

/* header tools: Assigned, Completed, Undo, Redo stay on the left */
.header-tools-left {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  flex-wrap: wrap;
  min-width: 0;
}
.assigned-tab { margin-right: 0; }
.completed-tab {
  min-height: 44px;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.completed-tab[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.hist-btn {
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
}
.hist-btn:disabled,
.header-tools .icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.print-btn .print-icon { display: none; }

@media (max-width: 699px) {
  .header-tools {
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
  }
  .header-tools-left {
    flex-wrap: nowrap;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .assigned-tab, .completed-tab {
    min-height: 36px;
    height: 36px;
    padding: 0 4px;
    font-size: 0.58rem;
    letter-spacing: 0;
    border-width: 2px;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
  }
  .header-tools .icon-btn,
  .header-tools .print-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    flex: none;
    box-sizing: border-box;
  }
  .header-tools .print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    font-size: inherit;
  }
  .header-tools .print-btn .print-label { display: none; }
  .header-tools .print-btn .print-icon {
    display: inline-block;
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 700;
  }
  .hist-btn { font-size: 1.2rem; }
}

/* date chip stays high-contrast on the richer fall gradient */
.date-badge {
  background: #fffdf8;
  box-shadow: 0 2px 12px rgba(40, 10, 0, 0.35);
}

/* Completed is an in-app screen, not a box at the bottom of the board */
.view-completed { padding: 8px 14px 24px; }
.completed-screen {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 2px;
  padding: 0 12px 16px;
}
.completed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -12px 12px;
  padding: 8px 10px;
  background: var(--ink);
  color: #fff;
}
.completed-head h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: #fff;
}
.completed-head .icon-btn {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
  width: 36px;
  height: 36px;
  min-width: 36px;
}

.assigned-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--ink);
  color: #fff;
}
.assigned-head h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: #fff;
}
.assigned-head .icon-btn {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
  width: 36px;
  height: 36px;
  min-width: 36px;
}

.completed-tab .count-badge,
.completed-bottom .count-badge {
  display: inline-block;
  min-width: 1em;
  margin-left: 0.2em;
  padding: 0 0.28em;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 0.85em;
  line-height: 1.25;
  font-weight: 900;
  vertical-align: 1px;
}

/* Header Print is hidden unless window.SHOW_HEADER_PRINT is true. Person-screen Print is unchanged. */
.header-tools .print-btn.hidden,
.header-tools .print-btn[hidden] {
  display: none !important;
}

/* Full-width Completed control under the last board section */
.completed-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: calc(100% - 28px);
  margin: 8px 14px 24px;
  min-height: 52px;
  padding: 12px 16px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.completed-bottom:hover,
.completed-bottom:focus-visible {
  background: #111;
}
.completed-bottom .count-badge {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
@media (min-width: 1000px) {
  .completed-bottom {
    width: calc(100% - 28px);
    margin: 10px 14px 28px;
  }
}

/* Tappable amount on board cards — looks like the existing number, not a chrome button */
button.amt-edit {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button.amt-edit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.section .task.compact .amt-dough-plain button.amt-dough-line {
  display: block;
  width: 100%;
}

/* Rolled-over leftover from a previous board day */
.rolled-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a4a12;
  background: #f3e3c4;
  border: 1px solid #c4a882;
  border-radius: 2px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Quantity dial pad — layout and behavior match pats-inventory
   (/workspace/newbot-inventory/mobile-inventory/public/styles.css + app.js) */
.qty-dialpad {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overscroll-behavior: none;
  pointer-events: none;
}
html.pad-open,
html.pad-open body {
  overflow: hidden !important;
}
.qty-dialpad[hidden] { display: none !important; }
.qty-dialpad-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.qty-dialpad-sheet {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.22);
  max-height: min(92vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.qty-dialpad-grab {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 4px auto 10px;
}
.qty-dialpad-head { margin: 0 0 8px; }
.qty-dialpad-name {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
  color: var(--ink);
}
.qty-dialpad-current {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.qty-dialpad-display {
  font-size: 2.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 10px 8px;
  margin: 0 0 10px;
  background: #f3f4f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 1.3em;
  line-height: 1.2;
  color: var(--ink);
}
.qty-dialpad-display.is-current { color: #1d4ed8; }
.qty-dialpad-display.is-current::after {
  content: " · current";
  font-size: 0.45em;
  font-weight: 700;
  vertical-align: middle;
  color: #64748b;
}
.qty-dialpad-display.is-rest { color: #9a3412; }
.qty-dialpad-unit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.qty-dialpad-unit-row[hidden] { display: none !important; }
.qty-dialpad-unit-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.qty-dialpad-unit {
  flex: 1;
  min-height: 44px;
  font: inherit;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.qty-dialpad-rest-row { margin: 0 0 12px; }
.qty-dialpad-rest-row[hidden] { display: none !important; }
.qty-dial-rest {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 2px solid #c2410c;
  background: #fff7ed;
  color: #9a3412;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}
.qty-dial-rest[aria-pressed="true"] {
  background: #9a3412;
  color: #fff;
  border-color: #7c2d12;
}
.qty-dialpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 10px;
}
.qty-dial-key {
  min-height: 64px;
  min-width: 64px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 1.55rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  color: var(--ink);
}
.qty-dial-key:active { background: #e5e7eb; }
.qty-dial-frac {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.qty-dialpad-tools {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.25fr;
  gap: 8px;
  align-items: stretch;
}
.qty-dial-tool {
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f9fafb;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  color: var(--ink);
}
.qty-dial-check {
  min-height: 64px;
  border-radius: 14px;
  border: 0;
  background: #15803d;
  color: #fff;
  font: inherit;
  font-size: 1.85rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.35);
}
.qty-dial-check:active { filter: brightness(0.95); }

@media (min-width: 700px) {
  .qty-dialpad { align-items: center; }
  .qty-dialpad-sheet {
    width: min(420px, 100%);
    margin: 0 auto;
  }
}

/* ===== Show-all faded catalog cards: compact icon row under active cards ===== */
.section .faded-row {
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px;
  align-items: flex-start;
  justify-content: flex-start;
}
.section .faded-row { gap: 5px; }
/* Whole faded tile is the add target, including picker tiles and the name band. */
.faded-tile {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-tap-highlight-color: rgba(245, 196, 0, 0.35);
}
.faded-tile .stripe,
.faded-tile .art,
.faded-tile .art-stack,
.faded-tile .name,
.faded-tile .faded-plus,
.faded-tile .usage-hint {
  pointer-events: none;
}
.dofirst-picker-row .faded-tile {
  cursor: pointer;
  touch-action: manipulation;
}

.section .faded-tile {
  position: relative;
  flex: 1 1 108px;
  width: auto;
  min-width: 102px;
  max-width: 130px;
  height: auto;
  min-height: 120px;
  max-height: none;
  box-sizing: border-box;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 20px;
  grid-template-rows: minmax(40px, 1fr) auto;
  align-items: stretch;
  column-gap: 0;
  row-gap: 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #ebe7de;
  opacity: 1;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 1px 0 var(--ink);
}
.section .faded-tile .stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 0;
  z-index: 2;
  opacity: 0.85;
}
.section .faded-tile .art,
.section .faded-tile .art-stack {
  grid-column: 1;
  grid-row: 1;
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 6px 0 4px 6px;
  opacity: 0.9;
  justify-self: center;
  align-self: center;
}
.section .faded-tile .art img,
.section .faded-tile .art svg,
.section .faded-tile .art-stack img,
.section .faded-tile .art-stack svg {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.section .faded-tile .faded-plus {
  grid-column: 2;
  grid-row: 1;
  position: static;
  z-index: 3;
  width: 16px;
  height: 16px;
  margin: 3px 3px 0 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 12px;
  text-align: center;
  pointer-events: none;
  justify-self: end;
  align-self: start;
  flex: none;
  opacity: 1;
}
.section .faded-tile .name {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  margin: 0;
  padding: 3px 3px 4px 7px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  color: #111;
  opacity: 1;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  border-top: 1px solid #d4d0c8;
  min-height: 2.4em;
}
.section .faded-tile .name-full { display: inline; }
.section .faded-tile .name-short { display: none; }
.section .faded-tile .usage-hint { display: none; }
.section .faded-tile:active { background: #ffd54a; }
.section .faded-tile:active .name { background: #fff8d4; }
@media (min-width: 700px) {
  .section .faded-tile { flex-basis: 112px; min-width: 108px; max-width: 136px; min-height: 126px; }
  .section .faded-tile .name { font-size: 13.5px; letter-spacing: 0; }
  .section .faded-tile .name-full { display: inline; }
  .section .faded-tile .name-short { display: none; }
}

.usage-hint {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ===== Recipe card book ===== */
.slide .binder-tab {
  position: absolute;
  top: -32px;
  height: 32px;
  min-width: 64px;
  max-width: 32%;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
  color: var(--ink);
  box-shadow: none;
}
.slide .binder-tab .name-full { display: none; }
.slide .binder-tab .name-short { display: inline; }
.slide .binder-tab.tab-slot-0 { left: 6px; }
.slide .binder-tab.tab-slot-1 { left: 50%; transform: translateX(-50%); }
.slide .binder-tab.tab-slot-2 { right: 6px; left: auto; }
@media (min-width: 700px) {
  .slide .binder-tab {
    min-width: 80px;
    max-width: 34%;
    font-size: 0.8rem;
    padding: 0 10px;
  }
  .slide .binder-tab .name-full { display: inline; }
  .slide .binder-tab .name-short { display: none; }
}
.slide.is-front .binder-tab {
  background: var(--ink);
  color: #fff;
}
#carousel.is-live .slide { transition: none; }
.slide { overflow: visible; }
.slide .task { overflow: hidden; }

#slides-add-note { margin: 0 auto 8px; display: none; }
#slides-add-note.on { display: block; }


/* ===== Recipe book: show the full card, not just the name peek ===== */
.slide.is-behind .assumed,
.slide.is-prev .assumed,
.slide.is-behind .notes,
.slide.is-prev .notes,
.slide.is-behind .art,
.slide.is-prev .art,
.slide.is-behind .qty,
.slide.is-prev .qty,
.slide.is-behind .check,
.slide.is-prev .check,
.slide.is-behind .assign,
.slide.is-prev .assign,
.slide.is-behind .quick,
.slide.is-prev .quick,
.slide.is-behind .dough-pickers,
.slide.is-prev .dough-pickers,
.slide.is-behind .amt-line,
.slide.is-prev .amt-line {
  visibility: visible;
}
.slide .binder-tab { pointer-events: auto; }
#carousel .slide { transition: none; }
#carousel:not(.is-live) .slide { transition: none; }

/* ===== Section health meter (green = caught up, red = lots selected) ===== */
.section-h { flex-wrap: wrap; }
.section-h h2 { flex: 0 1 auto; }
.health-meter {
  flex: 1 1 72px;
  min-width: 72px;
  max-width: 180px;
  height: 12px;
  margin: 0 4px;
  border: 2px solid #fff;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.section.do-first .health-meter { border-color: #fff; background: rgba(0, 0, 0, 0.35); }
.health-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

/* ===== Bottom action bar (WoW-style icon row) ===== */
body.has-action-bar .app:not(.show-top-tray) {
  padding-bottom: calc(24px + var(--safe-bot));
}
.app:not(.show-top-tray) .tray-wrap {
  padding: 0;
}
.app:not(.show-top-tray) .tray-search-wrap {
  padding: 4px 14px 8px;
}
.app:not(.show-top-tray) .tray-row {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px calc(8px + var(--safe-bot));
  background: #1a1a1a;
  border-top: 3px solid var(--ink);
  box-shadow: 0 -6px 18px rgba(20, 10, 0, 0.18);
}
.app:not(.show-top-tray) .tray {
  padding: 0 6px;
  gap: 6px;
  min-height: 68px;
  align-items: center;
  scroll-snap-type: x proximity;
  scroll-padding: 8px;
}
.app:not(.show-top-tray) .tray-arrow {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  flex: 0 0 28px;
  width: 28px;
  height: 52px;
  background: #fff;
  color: var(--ink);
}
.app:not(.show-top-tray) #tray-prev,
.app:not(.show-top-tray) #tray-next {
  left: auto;
  right: auto;
}
.app:not(.show-top-tray) .tray .card-btn,
.app:not(.show-top-tray) .tray .card-btn.action-tile {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  padding: 4px 3px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 2px 0 #000;
  scroll-snap-align: start;
  overflow: hidden;
}
.app:not(.show-top-tray) .tray .card-btn .stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 0;
}
.app:not(.show-top-tray) .tray .card-btn {
  position: relative;
}
.app:not(.show-top-tray) .tray .card-btn .art,
.app:not(.show-top-tray) .tray .card-btn .art-stack {
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 2px auto 0;
  flex: 0 0 28px;
}
.app:not(.show-top-tray) .tray .card-btn .art img,
.app:not(.show-top-tray) .tray .card-btn .art svg,
.app:not(.show-top-tray) .tray .card-btn .art-stack img,
.app:not(.show-top-tray) .tray .card-btn .art-stack svg {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.app:not(.show-top-tray) .tray .card-btn .name {
  margin: 0;
  padding: 0 1px 0 5px;
  max-width: 100%;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}
.app:not(.show-top-tray) .tray .card-btn .usage-hint,
.app:not(.show-top-tray) .tray .card-btn .tray-meta,
.app:not(.show-top-tray) .tray .card-btn .amt-line {
  display: none;
}
.app:not(.show-top-tray) .tray .card-btn.is-suggested {
  outline: 2px solid #ffd54a;
  outline-offset: -2px;
}
.app:not(.show-top-tray) .tray .empty {
  color: #eee;
  font-size: 0.8rem;
  padding: 8px;
}
.app:not(.show-top-tray) #view-kitchen {
  padding-bottom: 0;
}
.app:not(.show-top-tray) .completed-bottom {
  margin-bottom: calc(96px + var(--safe-bot));
}
.app:not(.show-top-tray) .kitchen-main {
  padding-bottom: 8px;
}

@media print {
  .app:not(.show-top-tray) .tray-row { display: none !important; }
  .app:not(.show-top-tray) .completed-bottom { margin-bottom: 16px; }
}

body.book-open .tray-row { display: none !important; }

/* Behind cards: keep the full card shape, but let binder tabs be the name */
.slide.is-behind .task .topline,
.slide.is-behind .task .name,
.slide.is-behind .assumed,
.slide.is-behind .notes,
.slide.is-behind .qty,
.slide.is-behind .check,
.slide.is-behind .assign,
.slide.is-behind .quick,
.slide.is-behind .dough-pickers,
.slide.is-behind .amt-line {
  visibility: hidden;
}
.slide.is-front .task .topline,
.slide.is-front .task .name,
.slide.is-front .assumed,
.slide.is-front .notes,
.slide.is-front .qty,
.slide.is-front .check,
.slide.is-front .assign,
.slide.is-front .quick,
.slide.is-front .dough-pickers,
.slide.is-front .amt-line {
  visibility: visible;
}


/* Show-all layout: section wheel is a 2/3/4-col grid, so active + faded rows must span it */
.section .active-row,
.section .faded-row {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.section .active-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.section .faded-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
  flex: none;
}
@media (min-width: 700px) {
  .section .active-row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .section .active-row { grid-template-columns: repeat(4, 1fr); }
}


/* Front card amount buttons fit on a 393px phone */
.slide .task,
.slide .strip,
.slide .strip-inner {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.slide .task .strip-inner {
  grid-template-columns: 8px 36px minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px 8px 8px 0;
  overflow: hidden;
}
.slide .task .main {
  min-width: 0;
  overflow: hidden;
}
.slide .qty {
  min-width: 0;
  flex-shrink: 0;
}
@media (max-width: 699px) {
  .slide .qty button {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }
  .slide .qty .amt { min-width: 36px; padding: 4px 2px; }
  .slide .task .check {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}


/* Bottom action bar is hidden. Set window.SHOW_BOTTOM_BAR = true to restore. Code is kept. */
.app:not(.show-bottom-bar) .tray-row,
.app:not(.show-bottom-bar) .tray-search-wrap,
.app:not(.show-bottom-bar) .tray-head {
  display: none !important;
}
.app:not(.show-bottom-bar):not(.show-top-tray) .tray-wrap {
  display: none;
  padding: 0;
  margin: 0;
}
.app:not(.show-bottom-bar):not(.show-top-tray) .completed-bottom {
  margin-bottom: 24px;
}
@media (min-width: 1000px) {
  .app:not(.show-bottom-bar):not(.show-top-tray) .completed-bottom {
    margin-bottom: 28px;
  }
}
.app:not(.show-bottom-bar) #view-kitchen {
  padding-bottom: 0;
}


/* ===== Do First: horizontal catalog scroll ===== */
.section.do-first .do-first-scroll-wrap,
.section.do-first .active-row {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.section.do-first .do-first-scroll-wrap {
  position: relative;
}
.section.do-first .do-first-scroll-wrap::before,
.section.do-first .do-first-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 28px;
  pointer-events: none;
  z-index: 3;
}
.section.do-first .do-first-scroll-wrap::before {
  left: 0;
  background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 100%);
}
.section.do-first .do-first-scroll-wrap::after {
  right: 0;
  background: linear-gradient(to left, #fff 0%, rgba(255,255,255,0) 100%);
}
.section.do-first .do-first-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding: 12px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding: 6px 16px 8px;
  min-width: 0;
}
.section.do-first .do-first-scroll .faded-tile {
  flex: 0 0 76px;
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  scroll-snap-align: start;
}

/* ===== Selected cards: uniform green (keep HACCP stripe) ===== */
.section .task.compact:not(.is-faded) {
  background: #dff5e1;
  border-color: #2e7d32;
}

/* ===== Landscape / wide kitchen screens: use the width, show more above the fold ===== */
@media (min-width: 1000px) {
  .board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    align-items: start;
    padding: 0 12px;
  }
  .section.do-first,
  .restaurant-health,
  #restaurant-health,
  #completed-screen-entry,
  .completed-tab-wide,
  button.completed-tab {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .restaurant-health,
  #restaurant-health {
    width: 100%;
    justify-items: center;
    align-items: center;
  }
  /* auto-fill so two-column sections get as many readable cards
     as fit, without a 4-col squeeze or a single stretched card */
  .section .wheel,
  .section .active-row {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  }
  .section .task.compact {
    min-height: 96px;
  }
  .section .task.compact .name {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
}
@media (min-width: 900px) and (max-height: 850px) {
  .header-banner {
    height: 52px;
    min-height: 48px;
    max-height: 56px;
  }
  .topbar { padding-bottom: 2px; }
  .date-badge { margin: 4px auto; padding: 1px 6px 2px; }
  .day-nav { width: 28px; height: 28px; min-width: 28px; font-size: 1.2rem; }
  .date-badge .fulldate { font-size: 1rem; }
  .banner {
    margin: 3px 14px 2px;
    padding: 3px 10px;
    font-size: 0.78rem;
  }
  .header-tools { padding: 0 10px; }
  .section-h { padding: 6px 10px; }
  .section-h h2 { font-size: 1.15rem; }
  .section .wheel { padding: 6px 8px 8px; gap: 6px; }
  .section .task.compact { min-height: 84px; }
  .section .task.compact .amt-num,
  .section .task.compact .amt-dough {
    font-size: 18px;
    line-height: 1.05;
  }
  .section .task.compact .amt-line { font-size: 15px; }
  .section .task.compact .amt-note { font-size: 12px; }
  .board { gap: 8px 10px; }
  .kitchen-main { padding-bottom: 0; }
}
@media (min-width: 1024px) and (max-height: 700px) {
  .header-banner { height: 44px; min-height: 40px; max-height: 48px; }
  .section .task.compact { min-height: 76px; }
  .section .task.compact .name { font-size: 16px; }
}


/* ===== Health needle gauge (old bar kept when SHOW_HEALTH_BAR) ===== */
.health-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0 2px;
  min-width: 0;
}
.health-gauge {
  width: 56px;
  height: 36px;
  flex: 0 0 auto;
  overflow: visible;
  line-height: 0;
}
.health-gauge-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
/* Needle rotation is an SVG attribute on <g class="health-needle">.
   Do not set the CSS transform property here — it overrides the attribute. */
.health-needle {
  transform-origin: 0 0;
}
.health-count {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  color: inherit;
  opacity: 0.95;
  min-width: 0.8em;
}
.section.do-first .health-count { color: #fff; }

/* ===== Do First selected cards are red; other sections stay green ===== */
.section .task.compact:not(.is-faded) {
  background: #dff5e1;
  border-color: #2e7d32;
}
.section.do-first .task.compact:not(.is-faded) {
  background: #fde0e0;
  border-color: #c62828;
}

/* ===== Do First + (replaces the catalog scroll; old scroll behind flag) ===== */
.section.do-first .dofirst-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 64px;
  width: 72px;
  height: 72px;
  margin: 4px 0 8px;
  border: 3px dashed var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  grid-column: auto;
}
.section.do-first .dofirst-plus-alone {
  width: 88px;
  height: 88px;
  margin: 10px 12px 14px;
}
.section.do-first .active-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-items: start;
  gap: 8px;
}
.section.do-first .active-row .dofirst-plus {
  width: 100%;
  min-height: 84px;
  height: auto;
  align-self: stretch;
}

/* Large Do First card picker */
.dofirst-picker {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: calc(8px + var(--safe-top)) 10px calc(10px + var(--safe-bot));
}
.dofirst-picker.hidden { display: none !important; }
.dofirst-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 0, 0.45);
}
.dofirst-picker-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  max-height: 100%;
  background: #fffdf8;
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  overflow: hidden;
}
.dofirst-picker-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  padding-right: 16px;
  background: #c62828;
  color: #fff;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.dofirst-picker-h h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dofirst-picker-h .icon-btn,
.dofirst-picker-h .dofirst-picker-x {
  position: static;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: none;
}
@media (max-width: 699px) {
  .dofirst-picker-h {
    padding: 10px 12px;
    padding-right: 14px;
    gap: 10px;
  }
  .dofirst-picker-h h2 { font-size: 1.02rem; }
}
.dofirst-picker-body {
  flex: 1;
  overflow: auto;
  padding: 10px 12px 16px;
  -webkit-overflow-scrolling: touch;
}
.dofirst-picker-sec { margin: 0 0 14px; }
.dofirst-picker-sec h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dofirst-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dofirst-picker-row .faded-tile {
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
  max-width: 110px;
  min-height: 110px;
}

/* ===== Smaller faded tiles so landscape shows every section ===== */
@media (min-width: 900px) and (max-height: 850px) {
  .section .faded-row { gap: 4px; padding: 0 0 6px; }
  .section .faded-tile {
    flex-basis: 58px;
    min-width: 58px;
    max-width: 64px;
    min-height: 68px;
  }
  .section .faded-tile .name {
    font-size: 10px;
    letter-spacing: -0.04em;
    padding: 2px 2px 3px;
    min-height: 2.2em;
  }
  .section .faded-tile .art,
  .section .faded-tile .art-stack { height: 28px; }
  .section .faded-tile .faded-plus { width: 14px; height: 14px; font-size: 0.65rem; }
}
@media (min-width: 1024px) and (max-height: 700px) {
  .section .faded-tile {
    flex-basis: 52px;
    min-width: 52px;
    max-width: 58px;
    min-height: 62px;
  }
  .section .faded-tile .name { font-size: 9.5px; }
}

/* Mobile: add tiles are a compact faded + grid at the bottom of each section.
   Desktop (700px and up) is unchanged. Full names stay visible; no abbreviations. */
@media (max-width: 699px) {
  .section .faded-row {
    gap: 5px;
    padding: 4px 0 6px;
  }
  .section .faded-tile {
    flex: 1 1 68px;
    width: auto;
    min-width: 62px;
    max-width: 84px;
    min-height: 74px;
    background: #e4e0d6;
    border: 1.5px solid #9a958c;
    box-shadow: none;
    opacity: 0.72;
    grid-template-columns: 1fr 15px;
    grid-template-rows: minmax(26px, 1fr) auto;
  }
  .section .faded-tile .stripe {
    width: 3px;
    opacity: 0.45;
  }
  .section .faded-tile .art,
  .section .faded-tile .art-stack {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 4px 0 2px 3px;
    opacity: 0.5;
  }
  .section .faded-tile .art img,
  .section .faded-tile .art svg,
  .section .faded-tile .art-stack img,
  .section .faded-tile .art-stack svg {
    width: 18px;
    height: 18px;
  }
  .section .faded-tile .faded-plus {
    width: 13px;
    height: 13px;
    margin: 2px 2px 0 0;
    border-width: 1.5px;
    font-size: 0.6rem;
    line-height: 9px;
    opacity: 0.95;
  }
  .section .faded-tile .name {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    padding: 2px 2px 3px 4px;
    min-height: 2.3em;
    background: #f3f0e8;
    color: #222;
    -webkit-line-clamp: 4;
    border-top-color: #d0cbc0;
  }
  .section .faded-tile .name-full { display: inline; }
  .section .faded-tile .name-short { display: none; }
  .section .faded-tile:active { opacity: 1; background: #ffd54a; }
  .section .faded-tile:active .name { background: #fff8d4; }
  .section.do-first .do-first-scroll .faded-tile {
    flex: 0 0 64px;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    min-height: 74px;
  }
}

/* ===== Flip binder book ===== */
.carousel.binder-book {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  perspective: none;
  touch-action: none;
}
.binder-rings {
  position: relative;
  z-index: 40;
  flex: 0 0 28px;
  height: 28px;
  pointer-events: none;
  margin: 0 8px -10px;
}
.binder-rings-svg {
  width: 100%;
  height: 28px;
  display: block;
  overflow: visible;
}
.binder-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  perspective: 1400px;
  transform-style: preserve-3d;
  overflow: visible;
}
.binder-book .slide {
  position: absolute;
  left: 50%;
  top: 10px;
  width: min(calc(100vw - 28px), 400px);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: visible;
}
.binder-book .slide .task,
.binder-book .slide .strip,
.binder-book .slide .strip-inner {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0 0 8px 8px;
}
.binder-tabs {
  flex: 0 0 46px;
  height: 46px;
  margin-top: 8px;
  overflow: hidden;
  --tab-count: 5;
}
.binder-tabs-viewport {
  height: 100%;
  overflow: hidden;
}
.binder-tabs-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: none;
}
.binder-book .binder-tab {
  position: static;
  flex: 0 0 calc(100% / var(--tab-count));
  width: calc(100% / var(--tab-count));
  max-width: none;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 4px 6px;
  border: 2px solid var(--ink);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #efebe3;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  left: auto;
  right: auto;
  top: auto;
  transform: none;
  pointer-events: auto;
}
.binder-book .binder-tab.is-current {
  background: var(--ink);
  color: #fff;
  z-index: 1;
}
@media (min-width: 700px) {
  .binder-book .slide { width: min(calc(100vw - 80px), 440px); }
  .binder-book .binder-tab { font-size: 0.85rem; }
}

/* Recipe button (number pad + flip book) */
.recipe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: #fff8d4;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.recipe-btn:active { background: #ffd54a; }
.qty-dialpad-recipe-row {
  display: flex;
  justify-content: center;
  padding: 0 12px 6px;
}
.qty-dialpad-recipe-row[hidden] { display: none !important; }
.slide .recipe-btn-card { margin: 8px 0 4px; }

/* Small Recipe chip on compact board / station cards. Stylesheet only (CSP). */
.task.compact .recipe-btn-compact,
.portal-station-board .task.compact .recipe-btn-compact {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-self: center;
  margin: 4px 0 2px;
  padding: 2px 7px;
  min-height: 22px;
  border-width: 1px;
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink, #1a1410);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-drag: none;
  cursor: pointer;
}
.task.compact .recipe-btn-compact:active,
.portal-station-board .task.compact .recipe-btn-compact:active {
  background: #ffd54a;
}

@media (min-width: 900px) and (max-height: 850px) {
  .health-gauge { width: 50px; height: 32px; }
  .section.do-first .dofirst-plus { min-height: 56px; height: 56px; width: 56px; font-size: 2rem; }
}

/* ===== Richer color + shared diagonal shine + layered depth ===== */
:root {
  --ok: #1fa362;
  --warn: #e84b55;
  --gold: #f0b400;
  --slice: #ff553d;
  --slice-bg: #ffe3dd;
  --prep: #2aaee6;
  --prep-bg: #def4fc;
  --portion: #2bc877;
  --portion-bg: #def8ea;
  --cook: #ff9310;
  --cook-bg: #ffecd0;
  --clean: #7a68ff;
  --clean-bg: #ece9ff;
  --dough: #c4963e;
  --dough-bg: #f6ebd2;
  --ft-produce: #249544;
  --ft-produce-bg: #dff4e6;
  --ft-frozen: #c27428;
  --ft-frozen-bg: #f6ead9;
  --ft-meat: #dc2f2f;
  --ft-meat-bg: #fde3e3;
  --ft-poultry: #e0b800;
  --ft-poultry-bg: #fff4c4;
  --ft-seafood: #1c73dc;
  --ft-seafood-bg: #dceafc;
  --ft-dairy: #a8a195;
  --ft-dairy-bg: #f7f5f1;
  --ft-cooked: #c27428;
  --ft-cooked-bg: #f6ead9;
  --ft-neutral: #8d949c;
  --ft-neutral-bg: #eef0f3;
  --card-green: #d8f5d6;
  --card-green-deep: #b7e8b4;
  --card-green-line: #1b7a32;
  --card-red: #ffd4d4;
  --card-red-deep: #ffb8b8;
  --card-red-line: #c21818;
  --shine: linear-gradient(155deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.28) 28%, rgba(255,255,255,0.04) 48%, rgba(255,255,255,0) 62%);
  --shadow-tight: 0 1px 1px rgba(40, 28, 12, 0.18);
  --shadow-soft: 0 6px 14px rgba(40, 28, 12, 0.14);
  --shadow-lift: 0 1px 1px rgba(40, 28, 12, 0.16), 0 8px 18px rgba(40, 28, 12, 0.14);
  --inset-shine: inset 0 1px 0 rgba(255,255,255,0.72), inset 0 -1px 0 rgba(40, 28, 12, 0.06);
}

.section {
  background: linear-gradient(180deg, #ffffff 0%, #f4f1ea 100%);
  box-shadow: var(--shadow-lift);
  border-radius: 12px;
}
.section .task.compact {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f0e8 100%);
  box-shadow: var(--shadow-tight), var(--shadow-soft);
  box-shadow: var(--shadow-tight), var(--shadow-soft), var(--inset-shine);
}
.section .task.compact:not(.is-faded) {
  background: linear-gradient(180deg, #e7f8e5 0%, #c8ebc5 100%);
  border-color: var(--card-green-line);
}
.section.do-first .task.compact:not(.is-faded) {
  background: linear-gradient(180deg, #ffe3e3 0%, #ffc4c4 100%);
  border-color: var(--card-red-line);
}
.section .task.compact.is-checked:not(.is-faded),
.section.do-first .task.compact.is-checked:not(.is-faded) {
  background: linear-gradient(180deg, #f3fbf4 0%, #dff5e1 100%);
  border-color: #2e7d32;
}
.section .task.compact::after,
.section .faded-tile::after,
.dofirst-picker-row .faded-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: var(--shine);
  pointer-events: none;
  border-radius: 12px 12px 0 0;
  z-index: 2;
}
.section .task.compact .stripe,
.section .faded-tile .stripe,
.dofirst-picker-row .faded-tile .stripe {
  position: relative;
  z-index: 3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.section .task.compact .tile-body,
.section .task.compact .name,
.section .task.compact .check,
.section .task.compact .amt-line,
.section .faded-tile .name,
.section .faded-tile .faded-plus {
  position: relative;
  z-index: 3;
}
.section .faded-tile,
.dofirst-picker-row .faded-tile {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f4ee 0%, #e8e3d8 100%);
  box-shadow: var(--shadow-tight), 0 5px 12px rgba(40, 28, 12, 0.12), var(--inset-shine);
}
.dofirst-picker-row .faded-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.btn, .icon-btn, .chip, .tab, .assigned-tab, .print-btn, .completed-bottom {
  box-shadow: var(--shadow-tight), 0 4px 10px rgba(40, 28, 12, 0.1), var(--inset-shine);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
}
.banner {
  background: linear-gradient(180deg, #ffe566 0%, #f5c400 100%);
  border-radius: 12px;
  box-shadow: var(--shadow-lift), var(--inset-shine);
  border-color: #c49200;
  color: #2a1c00;
}
.banner[contenteditable="true"] { background: linear-gradient(180deg, #ffe98a 0%, #ffd54a 100%); }
.banner.is-readonly {
  pointer-events: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}


/* Sleek date pill */
.date-badge {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  width: max-content;
  max-width: calc(100% - 88px);
  margin: 22px auto 18px;
  padding: 6px 10px 7px;
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 8px 22px rgba(40, 20, 8, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  touch-action: pan-y;
  overflow: hidden;
}
.date-badge-main {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 8px;
  text-align: center;
  cursor: pointer;
  min-width: 0;
}
.date-badge.is-today .date-badge-main { cursor: pointer; }
.date-badge .dow {
  display: block;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #5a5046;
}
.date-badge .fulldate {
  display: block;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-weight: 750;
  font-size: clamp(1.15rem, 4.6vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #1c1610;
}
.date-badge .date-slide {
  display: inline-block;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.date-badge.is-slide-left .date-slide { animation: date-slide-left 0.28s ease; }
.date-badge.is-slide-right .date-slide { animation: date-slide-right 0.28s ease; }
@keyframes date-slide-left {
  from { transform: translateX(18px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes date-slide-right {
  from { transform: translateX(-18px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.day-nav {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2a2218;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
  box-shadow: none;
}
.day-nav .chev { width: 18px; height: 18px; display: block; }
.date-today-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6a5a48;
}
.driver-chip {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  width: 56px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.driver-chip:hover .driver-car,
.driver-chip:focus-visible .driver-car {
  transform: translateY(-1px) scale(1.06);
  filter: brightness(1.08);
}
.driver-chip:active .driver-car {
  transform: scale(0.96);
  filter: brightness(0.96);
}
.driver-car {
  display: block;
  width: 44px;
  height: 28px;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(20, 8, 0, 0.45));
  transition: transform 0.15s ease, filter 0.15s ease;
  pointer-events: none;
}
.header-banner { position: relative; }

/* Month calendar */
.month-cal {
  position: absolute;
  left: 50%;
  top: calc(var(--safe-top, 0px) + 118px);
  transform: translateX(-50%);
  z-index: 40;
  width: min(360px, calc(100% - 16px));
  background: #fffdf8;
  border-radius: 16px;
  box-shadow: 0 1px 1px rgba(40,28,12,0.16), 0 16px 36px rgba(40,20,8,0.28);
  padding: 12px 12px 14px;
  color: #1c1610;
}
.month-cal.hidden, .month-cal[hidden] { display: none !important; }
.month-cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.month-cal-h h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  flex: 1;
  text-align: center;
}
.month-cal-h .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #f3efe6;
}
.month-cal-x { font-size: 1.35rem; font-weight: 700; line-height: 1; }
.month-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a5a48;
  margin-bottom: 4px;
}
.month-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.month-cal-day {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  padding: 4px 2px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  font-weight: 650;
  font-size: 0.92rem;
  box-shadow: none;
}
.month-cal-day.is-out { color: #b4aaa0; }
.month-cal-day.is-today { box-shadow: inset 0 0 0 2px #1c1610; }
.month-cal-day.is-selected { background: #1c1610; color: #fff; }
.month-cal-day.is-closed { background: #ece8e2; color: #6a5a48; }
.month-cal-day.is-busy { background: #fff1cc; }
.month-cal-day.is-closed.is-busy { background: #ece8e2; }
.cal-marks { display: flex; gap: 2px; min-height: 8px; align-items: center; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-dot.bills { background: #c4122e; }
.cal-dot.sabres { background: #002d62; }
.cal-closed {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: #8a3b2a;
}
.month-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 650;
  color: #5a5046;
}
.month-cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.month-cal-today {
  display: block;
  width: 100%;
  margin-top: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: #f3efe6;
  font-weight: 750;
  box-shadow: none;
}

/* Manager Complete button (appears after green check) */
.task-complete,
.section .task.compact .task-complete,
.station-card-foot .task-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 0;
  padding: 7px 12px;
  min-height: 34px;
  border: 2px solid #145a28;
  border-radius: 8px;
  background: #2e7d32;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  z-index: 4;
  box-shadow: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.section .task.compact .task-complete { grid-column: 1 / -1; width: 100%; box-sizing: border-box; }
.station-card-foot .task-complete { margin: 0 6px 0 0; width: auto; flex: 1 1 auto; }
.task-complete:active { transform: scale(0.98); background: #1b5e20; }
body.role-employee .task-complete,
body.role-employee [data-complete-task] {
  display: none !important;
}

/* Done-by line + checked cards */
.done-by {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #145a28;
  letter-spacing: -0.01em;
  line-height: 1.2;
  position: relative;
  z-index: 3;
}
.section .task.compact.is-checked .check {
  background: #1b7a32;
  color: #fff;
  border-color: #145a28;
}

/* Name picker */
.name-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.name-picker.hidden, .name-picker[hidden] { display: none !important; }
.name-picker-back {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 6, 0.45);
}
.name-picker-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: #fffdf8;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(18px + var(--safe-bot, 0px));
  box-shadow: 0 -8px 32px rgba(20, 10, 0, 0.28);
}
.name-picker-panel h2 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 800; }
.name-picker-card { margin: 0 0 12px; font-weight: 650; color: #5a5046; }
.name-picker-list { display: flex; flex-direction: column; gap: 8px; }
.name-pick {
  min-height: 56px;
  width: 100%;
  border: 2px solid #d8d0c4;
  border-radius: 12px;
  background: #fff;
  font-weight: 750;
  font-size: 1.05rem;
  text-align: left;
  padding: 12px 14px;
  box-shadow: var(--shadow-tight);
}
.name-pick[aria-pressed="true"] {
  background: #d8f5d6;
  border-color: #1b7a32;
}
.name-pick-add {
  border-style: dashed;
  background: #f7f3ea;
  text-align: center;
}
.name-picker-label {
  margin: 10px 0 0;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a5046;
}
.name-picker-empty { margin: 0 0 4px; }
.name-picker-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.name-picker-confirm:disabled { opacity: 0.45; }

/* Employee view-only chrome: hide edit controls, keep checks */
body.role-employee .pin,
body.role-employee [data-add-card],
body.role-employee .assign,
body.role-employee [data-amt],
body.role-employee [data-edit-amt],
body.role-employee [data-set-amt],
body.role-employee #btn-undo,
body.role-employee #btn-redo,
body.role-employee #btn-add-card,
body.role-employee #btn-edit-cards,
body.role-employee #btn-new-day,
body.role-employee .item-preview-assign,
body.role-employee .item-preview-dofirst,
body.role-employee .item-preview-remove,
body.role-employee .task-complete,
body.role-employee [data-complete-task],
body.role-employee #tray-search,
body.role-employee .tray-search-wrap {
  display: none !important;
}
body.role-employee .banner { pointer-events: none; }

/* Item photo preview */
.item-preview {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.item-preview.hidden, .item-preview[hidden] { display: none !important; }
.item-preview-back {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(20,12,6,0.4);
  pointer-events: auto;
}
.item-preview-panel {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  width: min(420px, calc(100% - 24px));
  max-height: min(92vh, 900px);
  overflow-y: auto;
  background: rgba(255,253,248,0.96);
  border-radius: 18px;
  padding: 16px;
  padding-top: 44px;
  box-shadow: 0 16px 40px rgba(20,10,0,0.3);
}
.item-preview-media {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-preview-media img, .item-preview-media video {
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  background: transparent;
}
.item-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.item-preview-actions .item-preview-dofirst,
.item-preview-actions .item-preview-remove {
  grid-column: auto;
}
.item-preview-actions .btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f0ece3 100%);
  box-shadow: var(--shadow-tight), var(--shadow-soft), var(--inset-shine);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.item-preview-actions .btn:disabled,
.item-preview-actions .btn[aria-disabled="true"] {
  opacity: 0.58;
  color: #5a5046;
  cursor: not-allowed;
  box-shadow: var(--inset-shine);
}
.item-preview-media.has-recipe { cursor: pointer; }
body.role-employee .item-preview-actions { grid-template-columns: 1fr; }
body.role-employee .item-preview-assign,
body.role-employee .item-preview-dofirst,
body.role-employee .item-preview-remove,
body.role-employee [data-preview-remove] {
  display: none !important;
}
@media (max-width: 420px) {
  .item-preview-panel { padding: 12px; padding-top: 40px; width: min(420px, calc(100% - 16px)); }
  .item-preview-media { min-height: 140px; }
  .item-preview-media img, .item-preview-media video { max-height: 38vh; }
  .item-preview-actions { gap: 8px; margin-top: 10px; }
  .item-preview-actions .btn { min-height: 44px; font-size: 0.95rem; padding: 8px 8px; }
}

/* No iOS long-press callout or text selection on cards / photo popup */
.task, .faded-tile, .item-preview, .item-preview-panel, .item-preview-media,
.item-preview-media img, .item-preview-media video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}


/* Driver + dry goods + portal */
.view-driver-page, .view-dry-goods, .view-portal { padding: 8px 14px 24px; }
.driver-page-head, .dry-goods-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.driver-page-head h2, .dry-goods-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.dry-goods-group { margin: 0 0 18px; }
.dry-goods-group h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dry-goods-row { display: flex; flex-wrap: wrap; gap: 8px; min-height: 72px; }
.dry-item {
  width: 104px;
  min-height: 120px;
  border-radius: 12px;
  border: 2px solid #d8d0c4;
  background: linear-gradient(180deg, #fff 0%, #f3efe6 100%);
  box-shadow: var(--shadow-lift);
  padding: 8px;
  position: relative;
  overflow: hidden;
}
.dry-item .dry-photo {
  width: 100%;
  height: 64px;
  border-radius: 8px;
  background: #efebe3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.7rem;
  color: #6a5a48;
}
.dry-item .dry-photo img { width: 100%; height: 100%; object-fit: cover; }
.dry-item .dry-name { margin-top: 6px; font-weight: 750; font-size: 0.8rem; line-height: 1.2; }
.dry-add { min-height: 44px; }
.portal-tabs { display: flex; gap: 8px; margin: 8px 0 10px; }
.portal-station-label { margin: 0 0 10px; font-weight: 700; color: #5a5046; }

/* Binder / picker polish */
.dofirst-picker-row .faded-tile .stripe { width: 6px; }
.dofirst-picker-row .faded-tile .name {
  margin-top: auto;
  padding: 4px 4px 6px;
  font-weight: 750;
  font-size: 0.74rem;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  overflow: visible;
}
.binder-tabs-track { justify-content: center; }
.binder-book .binder-tab { max-width: 140px; }
.slide .topline { position: static; }

body.role-employee .faded-tile,
body.role-employee .faded-row,
body.role-employee .dofirst-plus,
body.role-employee .do-first-scroll {
  display: none !important;
}


/* ===== Hide section-header + Card (flag) and compact Do First + ===== */
body.hide-section-add-card .section-h .add-free { display: none !important; }

.section.do-first .section-h {
  padding: 4px 10px;
  min-height: 0;
  gap: 6px;
}
.section.do-first .section-h h2 {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.section.do-first .health-gauge { width: 44px; height: 28px; }
.section.do-first .health-count { font-size: 0.7rem; }
.section.do-first .wheel {
  padding: 4px 8px 6px;
  min-height: 0;
}
.section.do-first .active-row {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.section.do-first .task.compact {
  flex: 0 0 auto !important;
  width: 156px !important;
  max-width: calc(100% - 56px);
  min-width: 132px;
  min-height: 0 !important;
}
.section.do-first .dofirst-plus,
.section.do-first .dofirst-plus-alone,
.section.do-first .active-row .dofirst-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 1.45rem !important;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  align-self: center;
  grid-column: auto;
  box-shadow: none;
}
.section.do-first .dofirst-plus-alone {
  margin: 2px 0 !important;
}
@media (min-width: 900px) and (max-height: 850px) {
  .section.do-first .dofirst-plus,
  .section.do-first .active-row .dofirst-plus,
  .section.do-first .dofirst-plus-alone {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 1.45rem !important;
  }
}

/* Do First cards: width stays 156px; height may grow so full words fit.
   Cards in the same row stretch to the tallest. */
.section.do-first .active-row {
  align-items: stretch !important;
}
.section.do-first .task.compact {
  flex: 0 0 156px !important;
  width: 156px !important;
  min-width: 156px !important;
  max-width: 156px !important;
  height: auto !important;
  min-height: 158px !important;
  max-height: none !important;
  box-sizing: border-box;
  overflow: visible !important;
}
.section.do-first .task.compact .strip-inner {
  height: 100% !important;
  min-height: 100% !important;
  box-sizing: border-box;
}
.section.do-first .task.compact .tile-body {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
  align-content: start;
  padding: 8px 6px 6px !important;
}
.section.do-first .task.compact .name {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-height: none;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  white-space: normal;
}
.section.do-first .task.compact .amt-line {
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
}
.section.do-first .task.compact .done-by {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.section.do-first .task.compact .task-complete {
  margin: 2px 0 0;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.68rem;
}
.section.do-first .dofirst-plus,
.section.do-first .dofirst-plus-alone,
.section.do-first .active-row .dofirst-plus {
  align-self: center !important;
  flex: 0 0 44px !important;
}


/* Station list menu (top left) */
.station-menu-wrap { position: relative; }
.station-menu-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 12, 6, 0.35);
}
.station-menu-back.hidden, .station-menu-back[hidden] { display: none !important; }
/* Keep the Stations dropdown above its backdrop (header is sticky z-index 40). */
body.station-menu-open .topbar {
  z-index: 81;
}
body.station-menu-open .station-menu {
  z-index: 82;
}
.station-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  width: min(340px, calc(100vw - 24px));
  background: #fffdf8;
  border-radius: 14px;
  box-shadow: 0 1px 1px rgba(40,28,12,0.16), 0 14px 32px rgba(40,20,8,0.26);
  padding: 8px;
  max-height: min(70vh, 520px);
  overflow: auto;
}
.station-menu.hidden, .station-menu[hidden] { display: none !important; }
.station-menu-date {
  padding: 4px 8px 8px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a5a48;
}
.station-menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 10px;
  box-shadow: none;
  min-height: 52px;
}
.station-menu-item:hover, .station-menu-item:focus-visible { background: #fff3d6; }
.station-menu-name { font-weight: 800; font-size: 1rem; color: var(--ink); }
.station-menu-who { font-size: 0.85rem; font-weight: 650; color: #3d342c; line-height: 1.35; }
.station-who-time { color: #6a5a48; font-weight: 600; }
.station-none { color: #8a8076; font-weight: 600; font-style: italic; }

/* Direct-to-person star (not the Do First pin) */
.who-badge.is-direct { padding-left: 6px; }
.direct-star {
  display: inline-block;
  margin-right: 3px;
  font-size: 0.85em;
  line-height: 1;
}

/* Assign modal station buttons */
.assign-h { margin: 12px 0 6px; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.assign-station-list { display: flex; flex-direction: column; gap: 6px; }
.assign-station-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 52px; }
.assign-sub { display: block; font-size: 0.8rem; font-weight: 650; color: #5a5046; }


/* ===== Banner date: true center, no clipping (overrides earlier layered rules) ===== */
body.hide-driver-chip .driver-chip,
#btn-driver.hidden { display: none !important; }

.header-banner {
  position: relative;
  overflow: hidden;
  min-height: 64px;
  height: 72px;
}
.date-badge {
  position: absolute !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0 !important;
  z-index: 2;
  overflow: visible !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 4px 10px 5px !important;
  box-sizing: border-box;
  line-height: 1.15;
}
.date-badge .dow,
.date-badge .fulldate {
  display: inline !important;
  vertical-align: baseline;
  line-height: 1.2 !important;
}
.date-badge .dow {
  font-size: 0.68rem !important;
  margin-right: 0.4em;
}
.date-badge .fulldate {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem) !important;
  letter-spacing: -0.02em;
  text-wrap: nowrap;
}
.date-badge .date-slide {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  line-height: 1.2;
  overflow: visible;
}
.date-today-hint {
  display: inline !important;
  margin: 0 4px !important;
  font-size: 0.58rem;
}
.day-nav {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
}
.day-nav .chev { width: 16px; height: 16px; }

@media (max-width: 699px) {
  .header-banner { min-height: 60px; height: 64px; }
  .date-badge { max-width: calc(100% - 12px); padding: 3px 8px 4px !important; }
  .date-badge .fulldate { font-size: 0.92rem !important; }
  .date-badge .dow { font-size: 0.6rem !important; }
  .day-nav { width: 24px !important; height: 24px !important; min-width: 24px !important; }
}
@media (min-width: 700px) {
  .header-banner { min-height: 68px; height: 76px; }
}
@media (min-width: 1000px) {
  .header-banner {
    height: 80px;
    min-height: 72px;
    max-height: 88px;
  }
}
@media (min-width: 900px) and (max-height: 850px) {
  .header-banner {
    height: 64px !important;
    min-height: 60px !important;
    max-height: 68px !important;
  }
}
@media (min-width: 1024px) and (max-height: 700px) {
  .header-banner {
    height: 58px !important;
    min-height: 56px !important;
    max-height: 62px !important;
  }
  .date-badge .fulldate { font-size: 1rem !important; }
}

.month-cal {
  top: calc(var(--safe-top, 0px) + 80px);
}

/* Gold star = assigned to a specific person, not just a station */
.direct-star {
  color: #e8b400;
  -webkit-text-fill-color: #e8b400;
  font-weight: 900;
  font-size: 1.05em;
  margin-right: 4px;
  filter: drop-shadow(0 1px 0 rgba(120, 80, 0, 0.35));
}

/* Do First pin stars on every station card would confuse the gold person-assignment star. */
.portal-station-board .task .pin { display: none; }

/* Station QR / station view: light red like Do First active; empty check until named done */
.portal-station-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.portal-station-board .empty,
.portal-station-board .station-removed-wrap {
  grid-column: 1 / -1;
}
.portal-station-board .task.compact,
.portal-station-board .task.compact:not(.is-faded),
.view-portal .task.compact.is-station-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  box-sizing: border-box;
  min-height: 200px;
  height: auto;
  margin: 0;
  padding: 0;
  justify-self: stretch;
  border: 2px solid #c62828;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff1f1 0%, #fde0e0 100%) !important;
  color: #1c1610;
  box-shadow: var(--shadow-tight), var(--shadow-soft), var(--inset-shine);
}
.portal-station-board .task.compact::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44%;
  background: var(--shine);
  pointer-events: none;
  border-radius: 14px 14px 0 0;
  z-index: 2;
}
.portal-station-board .task.compact .strip-inner {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  grid-template-rows: 1fr;
  flex: 1;
  width: 100%;
  min-height: 100%;
  height: auto;
  gap: 0 8px;
  padding: 10px 10px 10px 0;
  align-items: stretch;
  box-sizing: border-box;
}
.portal-station-board .task.compact .stripe {
  width: 7px;
  background: #c62828;
  border-radius: 0 0 0 12px;
  position: relative;
  z-index: 3;
}
.portal-station-board .task.compact .tile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  position: relative;
  z-index: 3;
  padding: 2px 2px 0 0;
}
.portal-station-board .task.compact .main {
  position: static;
  width: 100%;
  min-width: 0;
}
.portal-station-board .task.compact .name,
.portal-station-board .task.compact .name-full,
.portal-station-board .task.compact .name-short {
  color: #1c1610 !important;
  font-weight: 900;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  width: 100%;
  text-align: center;
}
.portal-station-board .task.compact .name-full { display: block; }
.portal-station-board .task.compact .name-short { display: none; }

/* Person badge gets its own row under the title — never overlays text */
.portal-station-board .task.compact .who-badge,
.view-portal .task.compact.is-station-card .who-badge {
  position: static !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  padding: 3px 10px;
  background: rgba(255, 250, 230, 0.96);
  color: #3a2010;
  border: 2px solid #e8b400;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 4;
  box-shadow: none;
}
.portal-station-board .task.compact .direct-star {
  color: #e8b400;
  -webkit-text-fill-color: #e8b400;
  font-weight: 900;
  font-size: 1.05em;
  margin-right: 4px;
  filter: drop-shadow(0 1px 0 rgba(120, 80, 0, 0.35));
}

.portal-station-board .task.compact .amt-line,
.portal-station-board .task.compact .amt-num,
.portal-station-board .task.compact .amt-unit,
.portal-station-board .task.compact .amt-note,
.portal-station-board .task.compact .amt-dough,
.portal-station-board .task.compact .amt-dough-line,
.portal-station-board .task.compact .amt-edit {
  color: #1c1610 !important;
  font-weight: 800;
}
.portal-station-board .task.compact .amt-line {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 2px 8px;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
}
.portal-station-board .task.compact .amt-dough-plain {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
  width: 100%;
  min-width: 0;
}
.portal-station-board .task.compact .amt-dough-line,
.portal-station-board .task.compact button.amt-edit,
.portal-station-board .task.compact button.amt-dough-line {
  display: inline;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1c1610;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-station-board .task.compact .art {
  margin: 2px auto 0;
}

.station-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding-top: 6px;
  position: relative;
  z-index: 3;
}
.station-card-foot .check { margin-left: auto; }

.station-take {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 5px 12px;
  min-height: 34px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff8e4;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
}
.station-take:hover, .station-take:focus-visible { background: #ffe8a8; }
.claim-picker-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }

.station-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 5px 12px;
  min-height: 34px;
  border: 2px solid #c62828;
  border-radius: 8px;
  background: #fff;
  color: #c62828;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
}
.station-remove:hover, .station-remove:focus-visible { background: #ffe8e8; }

.task .check.is-empty,
.section .task.compact .check.is-empty {
  background: #fff;
  color: transparent;
  border: 3px solid #8a8076;
  box-shadow: none;
}
.task .check.is-on,
.task.compact.is-checked .check,
.section .task.compact.is-checked .check {
  background: #2e7d32;
  color: #fff;
  border-color: #1b5e20;
}
.portal-station-board .task .check.is-empty {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin: 0;
  border-radius: 8px;
  background: #fff;
  border: 2px solid #c62828;
  color: transparent;
  box-shadow: none;
}
.portal-station-board .task .check.is-on,
.portal-station-board .task.is-checked .check {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin: 0;
  border-radius: 8px;
  background: #2e7d32;
  color: #fff;
  border: 3px solid #1b5e20;
  box-shadow: none;
  font-size: 1.15rem;
}
/* After a card is checked, it turns green (same selected green as the board) */
.portal-station-board .task.compact.is-checked,
.portal-station-board .task.compact.is-checked:not(.is-faded),
.view-portal .task.compact.is-station-card.is-checked {
  background: linear-gradient(180deg, #f3fbf4 0%, #dff5e1 100%) !important;
  border-color: #2e7d32 !important;
  color: #1c1610;
}
.portal-station-board .task.compact.is-checked .name,
.portal-station-board .task.compact.is-checked .name-full,
.portal-station-board .task.compact.is-checked .name-short,
.portal-station-board .task.compact.is-checked .amt-line,
.portal-station-board .task.compact.is-checked .amt-num,
.portal-station-board .task.compact.is-checked .amt-unit,
.portal-station-board .task.compact.is-checked .amt-note,
.portal-station-board .task.compact.is-checked .amt-dough,
.portal-station-board .task.compact.is-checked .amt-dough-line,
.portal-station-board .task.compact.is-checked .amt-edit,
.portal-station-board .task.compact.is-checked .done-by {
  color: #1c1610 !important;
}
.portal-station-board .task.compact.is-checked .stripe {
  background: #2e7d32;
}
.portal-station-board .task.compact.is-checked .station-remove {
  border-color: #2e7d32;
  color: #1b5e20;
}
.portal-station-board .task.compact.is-checked .station-remove:hover,
.portal-station-board .task.compact.is-checked .station-remove:focus-visible {
  background: #e8f5e9;
}

.station-removed-wrap { margin-top: 12px; }
.station-removed-toggle {
  border: 0;
  background: transparent;
  color: #6a5a48;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 0;
  box-shadow: none;
  cursor: pointer;
}
.station-removed-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.station-removed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #fff6f6;
  border-radius: 10px;
  font-weight: 700;
}
.station-restore { min-height: 36px; padding: 4px 12px; }

/* Assign list: people under stations, day's cards as small + sized chips */
.assigned-person { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.assigned-person .person-tile { width: 100%; max-width: 420px; }
.assign-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.assign-chips-empty { color: #8a8076; font-size: 0.8rem; font-weight: 600; font-style: italic; }
.assign-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  max-width: 140px;
}
.assign-chip.is-on,
.assign-chip[aria-pressed="true"] {
  border-style: solid;
  background: #fff3c0;
  box-shadow: 0 0 0 2px #e8b400 inset;
}
.assign-chip.is-on::before {
  content: "★";
  color: #e8b400;
  margin-right: 4px;
  font-size: 0.9em;
}

body.role-employee .station-remove,
body.role-employee .station-removed-wrap,
body.role-employee .assign-chips {
  display: none !important;
}


/* ===== Faded tiles: whole tile is the add target; + stays visible but is not a separate hit target ===== */
.faded-tile,
.section .faded-tile,
.dofirst-picker-row .faded-tile {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.faded-tile .faded-plus,
.section .faded-tile .faded-plus,
.dofirst-picker-row .faded-tile .faded-plus {
  pointer-events: none;
}
.faded-tile:active,
.section .faded-tile:active,
.dofirst-picker-row .faded-tile:active {
  background: #ffd54a;
  background-image: linear-gradient(180deg, #ffe7a0 0%, #ffd54a 100%);
}
.faded-tile:active .name,
.section .faded-tile:active .name,
.dofirst-picker-row .faded-tile:active .name {
  background: #fff8d4;
}

/* Do First pin ★ hidden; gold person-assignment star (.direct-star) stays */
body.hide-do-first-pin-star .pin {
  display: none !important;
}

/* Container / quantity caption in the photo popup (used when there is no container photo) */
.item-preview-container {
  margin: 8px 14px 0;
  padding: 6px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #3a2010;
}
.item-preview-container.hidden,
.item-preview-container[hidden] { display: none !important; }


/* Photo popup close X */
.item-preview-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-tight);
}
.item-preview-x:active { background: #ffe7a0; }

/* Qty dial pad: All bins option */
.qty-dialpad-special-row {
  display: flex;
  justify-content: center;
  padding: 0 16px 10px;
}
.qty-dialpad-special-row[hidden] { display: none !important; }
.qty-dial-special {
  min-width: 160px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff3c0;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.qty-dial-special:active,
.qty-dial-special[aria-pressed="true"] {
  background: #ffd54a;
}

/* Side sauce choice chips */
.side-sauce-choices { flex-wrap: wrap; }
.side-sauce-choices .choice[aria-pressed="true"] {
  background: #fff3c0;
  box-shadow: 0 0 0 2px #e8b400 inset;
}

/* Do First picker: on-board cards first */
.dofirst-picker-kicker {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 850;
}
.dofirst-picker-block { margin: 0 0 18px; }
.dofirst-picker-block .notes { margin: 0 0 10px; }
.dofirst-open-tile {
  flex: 0 0 110px;
  width: 110px;
  min-width: 110px;
  min-height: 118px;
  box-sizing: border-box;
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  border: 2px solid #2e7d32;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3fbf4 0%, #dff5e1 100%);
  cursor: pointer;
  box-shadow: var(--shadow-tight);
  position: relative;
  overflow: hidden;
}
.dofirst-open-tile .art,
.dofirst-open-tile .art-stack {
  width: 36px;
  height: 36px;
  margin-top: 4px;
}
.dofirst-open-tile .art img,
.dofirst-open-tile .art svg,
.dofirst-open-tile .art-stack img,
.dofirst-open-tile .art-stack svg {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.dofirst-open-tile .name {
  font-weight: 800;
  font-size: 0.74rem;
  text-align: center;
  line-height: 1.15;
  margin-top: 4px;
  white-space: normal;
  overflow-wrap: break-word;
}
.dofirst-open-tile .dofirst-open-qty {
  font-weight: 750;
  font-size: 0.72rem;
  text-align: center;
  color: #3a2010;
  margin-top: auto;
}
.dofirst-open-tile:active {
  background: #ffd54a;
}

body.role-employee [data-set-all-bins],
body.role-employee [data-toggle-sauce],
body.role-employee [data-edit-sauces],
body.role-employee [data-move-dofirst] {
  pointer-events: none;
}


/* Today jump chip: small "Back to today", never a second Today label */
.date-today-hint {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  margin: 0 2px !important;
  padding: 2px 6px !important;
  font-size: 0.55rem !important;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
  text-transform: none;
  border-radius: 999px;
  max-width: 8.2rem;
}
.date-today-arrow { font-size: 0.72rem; line-height: 1; }

body.overlay-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.portal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 0;
}
.portal-head-title {
  font-weight: 800;
  font-size: 1.05rem;
}
#btn-portal-back {
  width: 36px;
  height: 36px;
  min-width: 36px;
}

/* Phone: shrink Dough tray/count type so "1 small / 0 party / Rest large" fits. */
@media (max-width: 480px) {
  .section.do-first .task.compact[data-section="dough"] .name,
  .section[data-section="dough"] .task.compact .name,
  .section .task.compact.is-dough-plain .name,
  .portal-station-board .task.compact[data-section="dough"] .name {
    font-size: 15px;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .section.do-first .task.compact[data-section="dough"] .amt-dough-line,
  .section[data-section="dough"] .task.compact .amt-dough-line,
  .section .task.compact.is-dough-plain .amt-dough-line,
  .portal-station-board .task.compact .amt-dough-line,
  .section.do-first .task.compact[data-section="dough"] .amt-dough,
  .section[data-section="dough"] .task.compact .amt-dough,
  .portal-station-board .task.compact .amt-dough {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
    overflow: visible;
    max-width: 100%;
    text-overflow: unset;
  }
  .section[data-section="dough"] .task.compact .amt-num,
  .section.do-first .task.compact[data-section="dough"] .amt-num {
    font-size: 26px;
    line-height: 1;
  }
  .section[data-section="dough"] .task.compact .amt-unit,
  .section.do-first .task.compact[data-section="dough"] .amt-unit {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
  }
  .section.do-first .task.compact[data-section="dough"],
  .section[data-section="dough"] .task.compact,
  .section .task.compact.is-dough-plain {
    overflow: visible;
  }
}


/* Action verb (PORTION, WRAP, CUT…) sits small and light above the item name.
   Only on main selected board cards (and station boards). Not on faded add tiles
   (Bart t855–t856). */
.name-verb {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  color: rgba(40, 24, 16, 0.62);
  margin: 0 0 0.12em;
}
.name-item {
  display: block;
  font-weight: inherit;
  line-height: 1.15;
}

/* Card names display in ALL CAPS. Stored labels are unchanged.
   .name-verb keeps its own stacked/small font (already uppercase). */
.task .name,
.task .name-full,
.task .name-short,
.task .name-item,
.faded-tile .name,
.faded-tile .name-full,
.faded-tile .name-short,
.faded-tile .name-item,
.card-btn .name,
.card-btn .name-full,
.card-btn .name-item,
.dofirst-open-tile .name,
.person-tray-row .name,
.done-item .done-name,
.item-preview-title,
.driver-stock-tile .name {
  text-transform: uppercase;
}
.item-preview-title {
  margin: 0 14px 8px;
  padding-right: 36px;
  text-align: center;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.item-preview-title .name-verb {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.15em;
}
.item-preview-title:empty { display: none; }
.done-item .done-name {
  display: inline-block;
  font-weight: 900;
  line-height: 1.15;
}
.done-item .done-name .name-verb {
  text-align: left;
  font-size: 0.7rem;
}
.section .task.compact .name-verb,
.portal-station-board .task.compact .name-verb,
.dofirst-open-tile .name-verb,
.tray .card-btn .name-verb,
.person-tray-row .name-verb,
.slide .task .name-verb {
  text-align: inherit;
}
/* Faded add tiles keep a plain single-line name — no stacked verb font. */
.faded-tile .name-verb,
.faded-tile .name-item {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  margin: 0;
  line-height: inherit;
}
@media (max-width: 480px) {
  .section .task.compact .name-verb {
    font-size: 10px;
  }
  .item-preview-title { font-size: 1.15rem; }
}


/* Total kitchen health gauge in the top toolbar (no number). */
.total-health-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 2px 0 4px;
  line-height: 0;
  min-width: 0;
}
.header-tools .total-health-gauge,
.total-health-gauge {
  width: 44px;
  height: 28px;
  flex: 0 0 auto;
  overflow: visible;
}
.total-health-gauge .health-count { display: none !important; }
@media (max-width: 699px) {
  .header-tools .total-health-wrap {
    margin: 0 1px 0 2px;
  }
  .header-tools .total-health-gauge,
  .total-health-gauge {
    width: 36px;
    height: 22px;
  }
}


/* Do First dough tiles stay 156px at every width, so keep tray lines small
   enough that "Rest large" is never clipped (phone and tablet). */
.section.do-first .task.compact[data-section="dough"] .amt-dough-line,
.section.do-first .task.compact.is-dough-plain .amt-dough-line {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: break-word;
  overflow: visible;
  max-width: 100%;
  text-overflow: unset;
}

/* Very narrow phones: keep the new total gauge from crowding undo/redo. */
@media (max-width: 380px) {
  .header-tools { gap: 2px; padding: 0 4px; }
  .header-tools-left { gap: 2px; }
  .assigned-tab, .completed-tab {
    padding: 0 5px;
    font-size: 0.64rem;
  }
  .header-tools .icon-btn,
  .header-tools .print-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .header-tools .total-health-gauge,
  .total-health-gauge {
    width: 32px;
    height: 20px;
  }
}


/* ========== Batch 1 (t571–t595): full names, health above Do First, assign, station squares, desserts ========== */

/* Always spell out full names — no phone short-label swap */
.name-short { display: none !important; }
.name-full { display: inline !important; }
.section .task.compact .name-full,
.tray .card-btn .name-full,
.person-tray-row .name-full,
.person-board .name-full,
.section .faded-tile .name-full,
.slide .binder-tab .name-full,
.portal-station-board .task.compact .name-full { display: inline !important; }
.section .task.compact .name-short,
.tray .card-btn .name-short,
.person-tray-row .name-short,
.person-board .name-short,
.section .faded-tile .name-short,
.slide .binder-tab .name-short,
.portal-station-board .task.compact .name-short { display: none !important; }

/* Header no longer holds the total gauge */
.header-tools .total-health-wrap { display: none !important; }

/* RESTAURANT HEALTH — above Do First, a little bigger, 3 zone labels */
.restaurant-health {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 4px 0 16px;
  padding: 6px 8px 14px;
  box-sizing: border-box;
  overflow: visible;
}
.restaurant-health-title {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}
.restaurant-health-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, 100%);
}
.restaurant-health-arc-wrap {
  position: relative;
  width: min(320px, 94vw);
  height: 210px;
  overflow: visible;
  margin-top: 0;
}
.restaurant-health .restaurant-health-gauge,
.restaurant-health .total-health-gauge,
.restaurant-health-gauge {
  position: relative;
  left: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  flex: 0 0 auto;
  overflow: visible;
}
.restaurant-health-gauge .health-gauge-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.restaurant-health-labels {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  pointer-events: none;
}
.restaurant-health-labels .rhl {
  position: absolute;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  width: 38%;
}
.rhl-stocked {
  color: #1b8a2a;
  left: 0;
  bottom: 54%;
  text-align: center;
}
.rhl-work {
  color: #c49000;
  left: 50%;
  top: 8px;
  width: 44%;
  transform: translateX(-50%);
  text-align: center;
}
.rhl-out {
  color: #c62828;
  right: 0;
  bottom: 54%;
  text-align: center;
}
@media (max-width: 480px) {
  .restaurant-health-arc-wrap { width: min(320px, 94vw); height: 200px; margin-top: 0; }
  .restaurant-health .restaurant-health-gauge,
  .restaurant-health .total-health-gauge,
  .restaurant-health-gauge {
    width: 100%;
    height: 100%;
    left: auto;
  }
}
body.hide-predictions-btn #btn-predictions { display: none !important; }
#health-history-note { display: none !important; }

/* Assign picker: on-shift = green dotted; after assign = solid green fill.
   Station fill classes (st-fill-*) beat these so the name box matches the station. */
.assign-person-btn.is-on-shift:not([class*="st-fill-"]) {
  border: 3px dotted #2eaa3a !important;
  background: #fff !important;
  color: inherit;
  box-shadow: none;
}
.assign-person-btn.is-assigned:not([class*="st-fill-"]),
.assign-person-btn[aria-pressed="true"].is-assigned:not([class*="st-fill-"]) {
  border: 3px solid #2eaa3a !important;
  background: #2eaa3a !important;
  color: #fff !important;
}
.assign-person-btn.is-assigned .assign-sub { color: rgba(255,255,255,0.9); }

/* Station views use the same square cards as main board sections */
.portal-station-board {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  padding: 8px 10px 10px !important;
  align-items: stretch !important;
}
@media (min-width: 700px) {
  .portal-station-board { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 1100px) {
  .portal-station-board { grid-template-columns: repeat(4, 1fr) !important; }
}
.portal-station-board .task.compact,
.portal-station-board .task.compact:not(.is-faded),
.view-portal .task.compact.is-station-card {
  min-height: 120px !important;
  height: auto !important;
  border-radius: 2px !important;
  border: none !important;
  background: var(--tint, #fff) !important;
  width: auto !important;
  max-width: none !important;
  box-shadow: var(--shadow-tight), var(--shadow-soft), var(--inset-shine);
}
.portal-station-board .task.compact::after { display: none !important; }
.portal-station-board .task.compact .name,
.portal-station-board .task.compact .name-full {
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  text-align: center;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}
.portal-station-board .task.compact .tile-body {
  align-items: center;
  text-align: center;
}

/* Dessert restock list */
.dessert-restock-list {
  margin: 8px 10px 14px;
  padding: 10px 10px 6px;
  background: #fff;
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
}
.dessert-restock-list h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dessert-group-label {
  margin: 10px 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #666);
}
.dessert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  margin: 0 0 4px;
  border: 1px solid var(--line, #ddd);
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.dessert-row .dessert-name {
  font-weight: 800;
  font-size: 0.95rem;
  overflow-wrap: break-word;
  word-break: normal;
}
.dessert-row .dessert-qty {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 0.9rem;
}
.dessert-row.is-oos {
  background: #fde0e0;
  border-color: #c62828;
  color: #8a1212;
}
.dessert-row.is-oos .dessert-qty { color: #c62828; }
.dessert-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.dessert-sheet[hidden] { display: none !important; }
.dessert-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.dessert-sheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 12px 12px 24px;
  box-shadow: 0 -8px 28px rgba(0,0,0,0.18);
}

/* Out of Stock button at the top of the number pad */
.qty-dialpad-oos-row { margin: 0 0 8px; }
.qty-dial-oos {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #c62828;
  border-radius: 8px;
  background: #fff;
  color: #c62828;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.qty-dial-oos[aria-pressed="true"],
.qty-dial-oos.is-on {
  background: #c62828;
  color: #fff;
}


/* Never break a word in the middle on board or station cards */
.section .task.compact .name,
.section .task.compact .name-full,
.section .task.compact .name-item,
.section .task.compact .name-verb,
.section.do-first .task.compact .name,
.section.do-first .task.compact .name-item,
.section.do-first .task.compact .name-full,
.portal-station-board .task.compact .name,
.portal-station-board .task.compact .name-item,
.faded-tile .name,
.tray .card-btn .name {
  word-break: normal !important;
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  hyphens: none !important;
  white-space: normal !important;
}
.section.do-first .task.compact .name,
.section.do-first .task.compact .name-item {
  font-size: 14px;
}

/* Phase 2: suggestions, 3 PM tag, predictions, health history note */
.faded-tile .suggest-reason {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #8a4b00;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
}
.faded-tile.is-suggested {
  outline: 2px solid #e08a00;
  outline-offset: 0;
}
.faded-tile.is-weekend-stock {
  outline-color: #c62828;
}
.faded-tile.is-weekend-stock .suggest-reason { color: #c62828; }
.tag-3pm {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #1a237e;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Hidden with SHOW_3PM_TAG = false. Code and tag3pm data stay. */
body.hide-3pm-tag .tag-3pm { display: none !important; }
.station-help-block { margin: 8px 10px 14px; }
.station-help-block h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.health-history-note {
  margin: 4px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted, #666);
  text-align: center;
}
.view-predictions {
  padding: 8px 14px 24px;
}
.predictions-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.predictions-head h2 { margin: 0; font-size: 1.1rem; }
.pred-group { margin: 0 0 16px; }
.pred-group h3 { margin: 0 0 6px; font-size: 0.9rem; }
.pred-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line, #ddd);
}
.pred-row .pred-name { font-weight: 800; }
.pred-row .pred-reason { font-size: 0.8rem; color: var(--muted, #555); }
.owner-rule-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #ddd);
}
.owner-rule-row strong { display: block; }
.owner-rule-row .notes { margin: 2px 0 0; }
body.role-employee #btn-predictions { display: none !important; }


/* Curved SVG labels sit on the total gauge arc. Hide the old HTML chips. */
.restaurant-health-labels { display: none !important; }
.health-gauge-svg.has-arc-labels {
  overflow: visible;
  width: 100%;
  height: 100%;
  display: block;
}

/* Hide sub-lines we added (suggestion reasons, catalog notes). Keep names, quantities, user notes, and station headings. */
body.hide-card-descriptions .suggest-reason,
body.hide-card-descriptions .usage-hint,
body.hide-card-descriptions .tile .note:not(.user-note),
body.hide-card-descriptions .card-note-added,
body.hide-card-descriptions .added-card .catalog-note {
  display: none !important;
}


/* bigger card photos: shred cheese and other pictured compact tiles */
.section .task.compact .art,
.section .task.compact .art-stack {
  width: 72px;
  height: 60px;
  max-width: 76px;
  max-height: 64px;
  margin: 4px 0 0;
}
.section .task.compact .art img,
.section .task.compact .art svg,
.section .task.compact .art-stack img,
.section .task.compact .art-stack svg {
  width: 72px;
  height: 60px;
  max-width: 76px;
  max-height: 64px;
  object-fit: contain;
}
@media (max-width: 699px) {
  .section .task.compact { min-height: 136px; }
  .section .task.compact .art,
  .section .task.compact .art-stack,
  .section .task.compact .art img,
  .section .task.compact .art svg,
  .section .task.compact .art-stack img,
  .section .task.compact .art-stack svg {
    width: 72px;
    height: 60px;
    max-width: 76px;
    max-height: 64px;
  }
}
.section .faded-tile .art,
.section .faded-tile .art-stack {
  width: 52px;
  height: 52px;
  min-height: 52px;
  margin: 8px 0 4px 8px;
}
.section .faded-tile .art img,
.section .faded-tile .art svg,
.section .faded-tile .art-stack img,
.section .faded-tile .art-stack svg {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.section .faded-tile { min-height: 140px; }


/* Confirm add / remove (t724). Big Yes and Cancel, full words. */
.confirm-back {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + var(--safe-bot));
  background: rgba(34, 24, 16, 0.45);
  touch-action: manipulation;
}
.confirm-back.hidden { display: none; }
.confirm-dialog {
  width: min(440px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 40px rgba(40, 16, 8, 0.25);
}
.confirm-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
}
.confirm-dialog p {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--text);
}
.confirm-actions {
  display: flex;
  gap: 12px;
}
.confirm-btn {
  flex: 1;
  min-height: 56px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 900;
  touch-action: manipulation;
}
.confirm-yes {
  background: var(--ok);
  color: #fff;
}
.confirm-cancel {
  background: var(--white);
  color: var(--ink);
}

/* Station board: group cards by the person who has them (t727). */
.station-person-group {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.station-help-block { grid-column: 1 / -1; }
.station-person-head {
  grid-column: 1 / -1;
  margin: 10px 4px 4px;
  padding: 6px 4px 4px;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.station-person-group.is-open .station-person-head {
  color: var(--muted);
  border-bottom-color: var(--line);
}
.station-person-shift {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
}

/* Removal is press-and-hold on a card, then Remove in the popup.
   Visible on-card Remove buttons stay hidden (including leftover cached HTML). */
.board-remove,
.station-remove,
[data-board-remove],
[data-station-remove] {
  display: none !important;
}

.item-preview-actions .item-preview-unassign { }
body.role-employee .item-preview-unassign { display: none !important; }


/* Driver station Stock + Daily Tasks tabs */
.portal-station-board .driver-station-panel {
  grid-column: 1 / -1 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  min-width: 0;
}
/* Driver Stock health: same centered restaurant-health gauge */
.driver-station-panel .driver-stock-health {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 16px;
  justify-self: center;
}
@media (min-width: 1000px) {
  .driver-station-panel .driver-stock-health,
  .driver-stock-health {
    width: 100%;
    align-items: center;
    justify-items: center;
  }
}
.driver-station-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: nowrap;
  width: 100%;
}
.driver-station-tabs .chip {
  flex: 1 1 auto;
  min-height: 44px;
  height: 44px;
  max-height: 48px;
  font-size: 1rem;
  align-self: auto;
}
.driver-station-tabs .chip[aria-selected="true"] {
  background: #fff3c0;
  border-color: var(--ink);
}
.driver-stock-section { margin: 0 0 20px; }
.driver-stock-section h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
}
/* Same column rhythm as the station whiteboard cards */
.driver-stock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
@media (min-width: 700px) {
  .driver-stock-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .driver-stock-grid { grid-template-columns: repeat(4, 1fr); }
}
.driver-stock-grid .task.compact.is-dragging { opacity: 0.55; }
.driver-stock-grid .task.compact .art,
.driver-stock-grid .task.compact .art img,
.driver-stock-grid .task.compact .art svg {
  width: 72px;
  height: 60px;
  max-width: 76px;
  max-height: 64px;
  margin: 4px auto 0;
  box-sizing: border-box;
}
.driver-stock-grid .task.compact .art:empty {
  display: block !important;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(20, 16, 20, 0.12);
  border-radius: 6px;
}
.driver-daily-head {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
}
.driver-daily-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid #e6dfd4;
}
.driver-daily-item.is-done { opacity: 0.72; }
.driver-daily-item .driver-daily-body { flex: 1; min-width: 0; }
.driver-daily-item .driver-daily-name {
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.driver-daily-item .driver-daily-note {
  margin-top: 2px;
  font-size: 0.86rem;
  color: #5a5046;
}
.driver-daily-item .done-by { margin-top: 4px; }
.driver-boxes { margin: 18px 0 16px; }
.driver-boxes h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
}
.driver-box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  font-weight: 700;
}
.driver-board-cards { margin-top: 18px; }

/* Mobile add tiles (t814/t815): compact faded + grid. Must stay last to win over min-height 140px. Desktop unchanged. */
@media (max-width: 699px) {
  .section .faded-row {
    gap: 5px;
    padding: 4px 0 6px;
  }
  .section .faded-tile {
    flex: 1 1 68px;
    width: auto;
    min-width: 62px;
    max-width: 84px;
    min-height: 74px;
    background: #e4e0d6;
    border: 1.5px solid #9a958c;
    box-shadow: none;
    opacity: 0.72;
    grid-template-columns: 1fr 15px;
    grid-template-rows: minmax(26px, 1fr) auto;
  }
  .section .faded-tile .stripe {
    width: 3px;
    opacity: 0.45;
  }
  .section .faded-tile .art,
  .section .faded-tile .art-stack {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 4px 0 2px 3px;
    opacity: 0.5;
  }
  .section .faded-tile .art img,
  .section .faded-tile .art svg,
  .section .faded-tile .art-stack img,
  .section .faded-tile .art-stack svg {
    width: 18px;
    height: 18px;
  }
  .section .faded-tile .faded-plus {
    width: 13px;
    height: 13px;
    margin: 2px 2px 0 0;
    border-width: 1.5px;
    font-size: 0.6rem;
    line-height: 9px;
    opacity: 0.95;
  }
  .section .faded-tile .name {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0;
    padding: 2px 2px 3px 4px;
    min-height: 2.3em;
    background: #f3f0e8;
    color: #222;
    -webkit-line-clamp: 4;
    border-top-color: #d0cbc0;
  }
  .section .faded-tile .name-full { display: inline; }
  .section .faded-tile .name-short { display: none; }
  .section .faded-tile:active { opacity: 1; background: #ffd54a; }
  .section .faded-tile:active .name { background: #fff8d4; }
  .section.do-first .do-first-scroll .faded-tile {
    flex: 0 0 64px;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    min-height: 74px;
  }
}

/* Auto Fill (t822): button next to each section name + confirm list. */
.section-h .autofill-btn {
  min-height: 34px; margin-left: 8px; margin-right: auto; padding: 4px 10px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--white); color: var(--ink);
  font-weight: 900; font-size: 0.85rem; letter-spacing: 0.02em; white-space: nowrap; cursor: pointer;
  touch-action: manipulation;
}
.section-h .autofill-btn:active { transform: translateY(1px); }
body.role-employee .section-h .autofill-btn { display: none !important; }
.autofill-dialog { padding: 4px 2px; max-width: 560px; }
.autofill-title { margin: 0 0 2px; font-size: 1.35rem; font-weight: 900; color: var(--ink); }
.autofill-section-name { font-weight: 800; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem; }
.autofill-sub { margin: 0 0 10px; font-weight: 650; color: var(--text); line-height: 1.35; }
.autofill-list { display: flex; flex-direction: column; gap: 6px; max-height: min(58vh, 520px); overflow-y: auto; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }
.autofill-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 52px;
  border: 2px solid var(--line, #d9c7ae); border-radius: 8px; background: var(--white); cursor: pointer;
}
.autofill-row:has(.autofill-check:checked) { border-color: var(--ink); }
.autofill-check { width: 26px; height: 26px; flex: 0 0 auto; accent-color: var(--ok, #2e7d32); }
.autofill-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.autofill-name { font-weight: 900; color: var(--ink); font-size: 1.05rem; }
.autofill-why { font-size: 0.82rem; font-weight: 650; color: var(--muted); }
.autofill-who { font-size: 0.8rem; font-weight: 750; color: var(--text); }
.autofill-amt {
  flex: 0 0 auto; min-width: 54px; text-align: center; padding: 6px 8px; border: 2px solid var(--ink);
  border-radius: 6px; font-weight: 900; color: var(--ink); background: var(--paper);
}
.autofill-amt.is-blank { border-style: dashed; color: var(--muted); }
.autofill-actions .confirm-btn:disabled { opacity: 0.5; }
@media (max-width: 600px) {
  .section-h .autofill-btn { min-height: 30px; padding: 3px 8px; font-size: 0.78rem; margin-left: 6px; }
  .autofill-row { padding: 7px 8px; gap: 8px; }
  .autofill-name { font-size: 1rem; }
}


/* ===== Nov 24: Buffalo label, header Driver button, faded card colors, dense driver stock ===== */
.location-badge {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 4;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #1e3a5f;
  color: #fff;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 999px;
  padding: 2px 10px;
  line-height: 1.3;
}
.header-banner { position: relative; }
.date-badge { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.date-driver-btn {
  flex: 0 0 auto;
  margin: 0 0 0 4px;
  height: 28px;
  padding: 0 10px;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 999px;
  background: #fff3c0;
  color: var(--ink, #1a1410);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
}
.date-driver-btn:active { background: #ffe27a; }

/* Faded add tiles: same HACCP food-type colors as the real cards, in lighter form. */
.section .faded-tile,
.dofirst-picker-row .faded-tile {
  background: var(--tint, #ebe7de);
  border-color: var(--stripe, var(--ink, #1a1410));
}
.section .faded-tile .name,
.dofirst-picker-row .faded-tile .name {
  background: #fff;
  background: color-mix(in srgb, var(--tint, #fff) 45%, #fff);
  border-top-color: color-mix(in srgb, var(--stripe, #d4d0c8) 32%, #d4d0c8);
}
.section .faded-tile .stripe,
.dofirst-picker-row .faded-tile .stripe {
  background: var(--stripe, var(--ink, #1a1410));
  opacity: 0.9;
}
@media (max-width: 699px) {
  .section .faded-tile {
    background: var(--tint, #e4e0d6);
    border-color: color-mix(in srgb, var(--stripe, #9a958c) 55%, #9a958c);
    opacity: 0.92;
  }
  .section .faded-tile .name {
    background: color-mix(in srgb, var(--tint, #f3f0e8) 40%, #fff);
    color: #222;
  }
  .section .faded-tile .stripe { opacity: 0.85; }
}


/* Frozen portion real cards (t832): same brown as faded tiles, a shade more solid. */
.section .task.compact.ft-frozen:not(.is-faded),
.section.do-first .task.compact.ft-frozen:not(.is-faded) {
  background: linear-gradient(180deg, #f8efe3 0%, #ead4b4 100%);
  border-color: var(--ft-frozen);
}
.section .task.compact.ft-frozen.is-checked:not(.is-faded),
.section.do-first .task.compact.ft-frozen.is-checked:not(.is-faded) {
  background: linear-gradient(180deg, #f6f0e6 0%, #e8dcc8 100%);
  border-color: var(--ft-frozen);
}

/* Driver Stock tiles: same size, type, and tint as whiteboard faded add tiles.
   Still fill across the row, then wrap. Amount and check stay tappable. */
.driver-stock-section { margin: 0 0 10px; }
.driver-stock-section h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 800;
}
.driver-stock-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 5px;
  width: 100%;
}
.driver-stock-grid .driver-stock-tile {
  position: relative;
  flex: 1 1 108px;
  width: auto;
  min-width: 102px;
  max-width: 130px;
  height: auto;
  min-height: 120px;
  max-height: none;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 22px;
  grid-template-rows: minmax(40px, 1fr) auto;
  align-items: stretch;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 4px;
  background: var(--tint, #ebe7de);
  opacity: 1;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 1px 0 var(--ink, #1a1410);
}
.driver-stock-grid .driver-stock-tile .stripe {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  z-index: 2;
  background: var(--stripe, var(--ink, #1a1410));
  opacity: 0.9;
}
.driver-stock-grid .driver-stock-tile .amt-edit {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 28px;
  min-width: 36px;
  margin: 6px 0 4px 6px;
  padding: 2px 6px;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #1a1410);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}
.driver-stock-grid .driver-stock-tile .amt-target-label {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink, #1a1410);
  opacity: 0.7;
}
.driver-stock-grid .driver-stock-tile .amt-edit .amt-num {
  font-size: inherit;
  font-weight: 900;
  line-height: 1.1;
}
.driver-stock-grid .driver-stock-tile .amt-edit.is-blank {
  min-width: 36px;
  min-height: 28px;
}
.driver-stock-grid .driver-stock-tile .amt-edit.is-fill {
  border: 0;
  background: transparent;
  min-height: 0;
  min-width: 0;
  padding: 0;
  pointer-events: none;
}
.driver-stock-grid .driver-stock-tile .check {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 3px 3px 0 0;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 4px;
  background: #fff;
  color: var(--ink, #1a1410);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}
.driver-stock-grid .driver-stock-tile .name {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  margin: 0;
  padding: 3px 3px 4px 7px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  background: color-mix(in srgb, var(--tint, #fff) 45%, #fff);
  color: #111;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  border-top: 1px solid #d4d0c8;
  min-height: 2.4em;
}
.driver-stock-grid .driver-stock-tile.is-checked {
  opacity: 0.9;
}
@media (min-width: 700px) {
  .driver-stock-grid .driver-stock-tile {
    flex-basis: 112px;
    min-width: 108px;
    max-width: 136px;
    min-height: 126px;
  }
  .driver-stock-grid .driver-stock-tile .name { font-size: 13.5px; }
  .driver-stock-grid { gap: 4px; }
}
@media (max-width: 699px) {
  .driver-stock-grid { gap: 5px; }
  .driver-stock-grid .driver-stock-tile {
    flex: 1 1 68px;
    min-width: 62px;
    max-width: 84px;
    min-height: 74px;
    background: var(--tint, #e4e0d6);
    border: 1.5px solid color-mix(in srgb, var(--stripe, #9a958c) 55%, #9a958c);
    box-shadow: none;
    opacity: 0.92;
    grid-template-columns: 1fr 18px;
    grid-template-rows: minmax(26px, 1fr) auto;
  }
  .driver-stock-grid .driver-stock-tile .stripe { width: 3px; opacity: 0.85; }
  .driver-stock-grid .driver-stock-tile .amt-edit {
    min-height: 22px;
    min-width: 28px;
    margin: 4px 0 2px 4px;
    padding: 1px 4px;
    font-size: 12px;
    border-width: 1.5px;
  }
  .driver-stock-grid .driver-stock-tile .amt-target-label { font-size: 7px; }
  .driver-stock-grid .driver-stock-tile .check {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin: 2px 2px 0 0;
    border-width: 1.5px;
    font-size: 0.65rem;
  }
  .driver-stock-grid .driver-stock-tile .name {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 2px 3px 4px;
    min-height: 2.3em;
    background: color-mix(in srgb, var(--tint, #f3f0e8) 40%, #fff);
    color: #222;
    border-top-color: #d0cbc0;
  }
}
.driver-station-panel .driver-stock-health { margin: 0 0 8px; }



/* Header Driver button: same header-menu slot that held Scan List. */
.header-driver-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 44px;
  margin: 0 0 0 6px;
  padding: 8px 12px;
  border: 3px solid #2A5FA8;
  border-radius: 2px;
  background: #2A5FA8;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
}
.header-driver-btn:hover,
.header-driver-btn:focus-visible,
.header-driver-btn:active {
  background: #2A5FA8;
  color: #FFFFFF;
  border-color: #2A5FA8;
  filter: brightness(0.94);
}
@media (max-width: 699px) {
  .header-driver-btn {
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.78rem;
    border-width: 2px;
    margin-left: 4px;
  }
}

/* Scan List: manager-only. Hidden unless window.SHOW_SCAN_LIST is true. Code is kept. */
body.hide-scan-list #btn-scan-list,
body.hide-scan-list #btn-scan-list-menu,
body.hide-scan-list #scan-list-input { display: none !important; }
.scan-list-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 44px;
  margin: 0 0 0 6px;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  touch-action: manipulation;
}
body.role-employee #btn-scan-list,
body.role-employee #btn-scan-list-menu,
body.role-employee #scan-list-input { display: none !important; }
@media (max-width: 699px) {
  .scan-list-btn {
    min-height: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.7rem;
    border-width: 2px;
    margin-left: 4px;
  }
}
.scan-list-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
  pointer-events: none; clip: rect(0, 0, 0, 0);
}
.modal:has(.scan-list-dialog) {
  display: flex; flex-direction: column; overflow: hidden;
  max-height: min(90vh, 720px);
}
.scan-list-dialog {
  padding: 4px 2px; max-width: 560px;
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden;
}
.scan-list-sub { margin: 0 0 10px; font-weight: 650; color: var(--text); line-height: 1.35; flex: 0 0 auto; }
.scan-list-dialog .autofill-title,
.scan-list-dialog .autofill-section-name { flex: 0 0 auto; }
.scan-list-rows { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-bottom: 10px; -webkit-overflow-scrolling: touch; }
.scan-list-actions {
  flex: 0 0 auto; position: sticky; bottom: 0;
  background: var(--white); padding-top: 8px;
}
.scan-list-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 64px;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 10px;
  border: 2px solid var(--stripe, var(--line, #d9c7ae));
  border-radius: 8px;
  background: var(--tint, var(--white));
}
.scan-list-row.is-dup { opacity: 0.82; }
.scan-list-row.is-unmatched { background: #fff; border-style: dashed; }
.scan-list-row:has(.scan-list-check:checked) { border-color: var(--ink); }
.scan-list-check { width: 26px; height: 26px; margin: 0; accent-color: var(--ok, #2e7d32); }
.scan-list-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-list-read { font-size: 0.8rem; font-weight: 650; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-list-name { font-weight: 900; color: var(--ink); font-size: 1.02rem; }
.scan-list-flag { font-size: 0.78rem; font-weight: 750; color: var(--ft-meat, #b42318); }
.scan-list-who { font-size: 0.78rem; font-weight: 750; color: var(--text); }
.scan-list-match {
  width: 100%; min-height: 36px; margin-top: 4px;
  border: 2px solid var(--ink); border-radius: 6px;
  background: #fff; font-weight: 750; color: var(--ink); padding: 4px 6px;
}
.scan-list-amt {
  grid-column: 3; grid-row: 1 / span 2; align-self: center;
  min-width: 54px; text-align: center; padding: 6px 4px;
  border: 2px solid var(--ink); border-radius: 6px;
  font-weight: 900; color: var(--ink); background: var(--paper, #fff);
  font-size: 1rem;
}
.scan-list-amt.is-blank { border-style: dashed; color: var(--muted); }
.scan-list-actions .confirm-btn:disabled { opacity: 0.5; }
@media (max-width: 600px) {
  #btn-scan-list { min-height: 36px; padding: 6px 10px; font-size: 0.78rem; }
  .scan-list-row { padding: 7px 8px; gap: 6px 8px; }
  .scan-list-name { font-size: 0.95rem; }
  .scan-list-amt { min-width: 48px; }
}

/* Morning dough / compact side bar (t835): the gray (and other) accent
   must follow the card's rounded corners. Do First and dough-plain cards
   use overflow:visible so text can fit, which left the old 6px square
   ::before bar looking clipped and blocky. Paint a full-card rounded
   layer and mask it to the left 6px instead. */
.section .task.compact::before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  background: var(--stripe, var(--ink));
  /* 12px card radius minus the 3px border, so the bar matches the inner curve. */
  border-radius: 9px 0 0 9px;
  -webkit-mask-image: linear-gradient(to right, #000 0 6px, transparent 6px);
  mask-image: linear-gradient(to right, #000 0 6px, transparent 6px);
}


/* === station followups (counter/driver/kitchen dashboards, search, assign) === */
body.hide-help-btn #btn-legend { display: none !important; }
body.hide-autofill-rule-text .autofill-why { display: none !important; }
body.hide-assign-chips .assign-chips,
body.hide-assign-chips .assign-chips-empty { display: none !important; }
body.hide-portal-board-tab .portal-tabs { display: none !important; }

#btn-board-search {
  flex: 0 0 auto;
  min-width: 40px;
  width: 40px;
  padding: 0;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}
.portal-head { justify-content: flex-start; }
.portal-main-btn {
  margin-left: auto;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #1a1410);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.portal-main-btn:active { transform: translateY(1px); }

.board-search-pop {
  position: fixed;
  z-index: 80;
  top: 58px;
  right: 10px;
  left: auto;
  width: min(420px, calc(100vw - 20px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  overflow: hidden;
}
.board-search-pop.hidden, .board-search-pop[hidden] { display: none !important; }
.board-search-panel { display: flex; flex-direction: column; min-height: 0; }
#board-search-input {
  margin: 10px 10px 6px;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--ink, #1a1410);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 650;
}
.board-search-results { overflow-y: auto; padding: 0 8px 10px; }
.board-search-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  margin: 0 0 4px;
  border: 1px solid #ddd6c8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.board-search-hit:active { background: #fff3c4; }
.board-search-name { font-weight: 800; color: var(--ink, #1a1410); }
.board-search-where { font-size: 0.8rem; font-weight: 650; color: var(--muted, #666); }
.search-flash { outline: 3px solid #f5a25a; outline-offset: 2px; }

.driver-stock-grid .stock-target-pill {
  position: absolute;
  top: 4px;
  left: 8px;
  z-index: 3;
  box-sizing: border-box;
  min-height: 16px;
  max-width: calc(100% - 14px);
  padding: 0 5px 0 15px;
  border: 1.5px solid #dc2626;
  border-radius: 999px;
  background: #fff;
  color: #9f1239;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.6' stroke='%23dc2626' stroke-width='1.6'/%3E%3Ccircle cx='8' cy='8' r='3.7' stroke='%23dc2626' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='8' r='1.2' fill='%23dc2626'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 3px 50%;
  background-size: 9px 9px;
  pointer-events: none;
}
.driver-stock-grid .stock-target-pill.is-blank { min-width: 18px; padding-left: 16px; padding-right: 4px; }
.driver-stock-grid .stock-bring-amt {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  justify-self: center;
  box-sizing: border-box;
  min-height: 26px;
  min-width: 42px;
  margin: 22px 0 2px 6px;
  padding: 2px 6px;
  border: 1.5px dashed #8a8376;
  border-radius: 6px;
  background: #fafafa;
  color: var(--ink, #1a1410);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}
.driver-stock-grid .stock-bring-amt.is-blank { color: transparent; }
.driver-stock-grid .stock-bring-amt.is-fill {
  border: 0;
  background: transparent;
  min-height: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.driver-stock-grid .driver-stock-tile.is-in-first {
  opacity: 1;
  box-shadow: 0 0 0 2px #c62828 inset;
}
.driver-dofirst-section h3 { color: #b71c1c; }
.driver-leave-faded-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.driver-leave-faded {
  min-height: 36px;
  padding: 6px 10px;
  border: 1.5px dashed #8a8376;
  border-radius: 8px;
  background: #f3f0ea;
  color: #333;
  font-weight: 750;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Smaller squares on every station dashboard (before: stock tiles 102–130px wide, 120px min tall, name 13px). */
.view-portal .driver-stock-grid .driver-stock-tile {
  flex: 1 1 78px;
  min-width: 74px;
  max-width: 100px;
  min-height: 86px;
}
.view-portal .driver-stock-grid .driver-stock-tile .name {
  font-size: 11px;
  padding: 2px 2px 3px 5px;
  -webkit-line-clamp: 3;
  min-height: 2em;
}
.view-portal .driver-stock-grid .stock-bring-amt {
  min-height: 22px;
  min-width: 34px;
  font-size: 11px;
  margin-top: 18px;
}
.view-portal .portal-station-board .task.compact,
.view-portal .portal-station-board .is-station-card {
  min-width: 0;
}
.view-portal .portal-station-board.is-station-view .task.compact,
.view-portal .driver-board-cards .task.compact,
.person-assigned-cards .task.compact {
  font-size: 13px;
}
.view-portal .portal-station-board.is-station-view .task.compact .name,
.view-portal .driver-board-cards .task.compact .name,
.person-assigned-cards .task.compact .name {
  font-size: 13px;
  line-height: 1.15;
}
.view-portal .portal-station-board.is-station-view .task.compact .art,
.view-portal .portal-station-board.is-station-view .task.compact .art-stack,
.view-portal .driver-board-cards .task.compact .art,
.person-assigned-cards .task.compact .art {
  width: 48px;
  height: 40px;
  max-width: 52px;
  max-height: 44px;
}
.person-assigned-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
@media (max-width: 480px) {
  .view-portal .driver-stock-grid .driver-stock-tile {
    flex-basis: 74px;
    min-width: 70px;
    max-width: 96px;
    min-height: 82px;
  }
  #btn-board-search { min-width: 40px; width: 40px; padding: 0; font-size: 1.2rem; }
}

/* Assign station buttons light up in their schedule color when selected. */
.assign-station-btn.has-color {
  background: var(--station-light, #fff);
  border-color: var(--station-dark, #1a1410);
  color: var(--station-ink, #1a1410);
}
.assign-station-btn.has-color.is-on,
.assign-station-btn.has-color[aria-pressed="true"] {
  background: var(--station-dark, #1a1410);
  border-color: var(--station-dark, #1a1410);
  color: var(--station-ink, #fff);
  box-shadow: inset 0 0 0 3px rgba(20, 20, 20, 0.35);
}

/* Driver / counter inventory: same section layout as the main whiteboard. */
.portal-station-board .section,
.portal-station-board .restaurant-health,
.portal-station-board .driver-stock-health,
.portal-station-board .driver-leave-section,
.portal-station-board .driver-faded-wrap {
  grid-column: 1 / -1;
}
.portal-station-board .section .task.compact.driver-inv-card,
.portal-station-board .section .task.compact.driver-inv-card:not(.is-faded) {
  flex: 0 0 calc(50% - 6px) !important;
  width: calc(50% - 6px) !important;
  max-width: calc(50% - 6px) !important;
  min-width: 0 !important;
  min-height: 208px !important;
  height: auto !important;
  border: none !important;
  border-radius: 2px !important;
  background: var(--tint, #fff) !important;
  box-shadow: none !important;
}
.portal-station-board .section .driver-inv-card .name,
.portal-station-board .section .driver-inv-card .name-full {
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  text-align: center;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: break-word !important;
}
.section .driver-inv-card .tile-body {
  justify-content: space-between;
}
.section .driver-inv-card .stock-bring-amt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 76px;
  min-height: 36px;
  margin: 6px auto 4px;
  padding: 4px 10px;
  border: 2px dashed #6d7277;
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.1;
  color: var(--ink, #1a1410);
  cursor: pointer;
}
.section .driver-inv-card .stock-bring-amt.is-blank {
  color: transparent;
}
@media (min-width: 700px) {
  .portal-station-board .section .task.compact.driver-inv-card,
  .portal-station-board .section .task.compact.driver-inv-card:not(.is-faded) {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 96px !important;
  }
}

/* Stations menu: always-colored section rows, names only when counts are hidden. */
body.hide-station-menu-counts .station-menu-who { display: none !important; }
body.hide-station-menu-counts .station-menu-item {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
}

/* Solid food-guide fills. Must be stylesheet classes: CSP style-src 'self'
   strips inline style="" so variables/--station-light never applied, and
   .has-color used to fall back to #fff (uncolored on the phone). */
.station-menu-item.has-color {
  border: 2px solid transparent;
  margin: 0 0 6px;
}
.station-menu-item.has-color.is-on,
.station-menu-item.has-color[aria-current="true"] {
  box-shadow: inset 0 0 0 3px rgba(20, 20, 20, 0.35);
}
.assign-station-btn.has-color { border-width: 2px; }

.st-fill-pizza,
.st-fill-pizza:hover,
.st-fill-pizza:focus,
.st-fill-pizza:focus-visible,
.st-fill-pizza:active,
.st-fill-pizza.is-on,
.st-fill-pizza.is-on-shift,
.st-fill-pizza.is-assigned,
.st-fill-pizza[aria-current="true"],
.st-fill-pizza[aria-pressed="true"] {
  background: #A8323B !important;
  border-color: #A8323B !important;
  color: #FFFFFF !important;
}
.st-fill-subs,
.st-fill-subs:hover,
.st-fill-subs:focus,
.st-fill-subs:focus-visible,
.st-fill-subs:active,
.st-fill-subs.is-on,
.st-fill-subs.is-on-shift,
.st-fill-subs.is-assigned,
.st-fill-subs[aria-current="true"],
.st-fill-subs[aria-pressed="true"] {
  background: #E9B824 !important;
  border-color: #E9B824 !important;
  color: #141414 !important;
}
.st-fill-fryers,
.st-fill-fryers:hover,
.st-fill-fryers:focus,
.st-fill-fryers:focus-visible,
.st-fill-fryers:active,
.st-fill-fryers.is-on,
.st-fill-fryers.is-on-shift,
.st-fill-fryers.is-assigned,
.st-fill-fryers[aria-current="true"],
.st-fill-fryers[aria-pressed="true"] {
  background: #E8701A !important;
  border-color: #E8701A !important;
  color: #141414 !important;
}
.st-fill-prep,
.st-fill-prep:hover,
.st-fill-prep:focus,
.st-fill-prep:focus-visible,
.st-fill-prep:active,
.st-fill-prep.is-on,
.st-fill-prep.is-on-shift,
.st-fill-prep.is-assigned,
.st-fill-prep[aria-current="true"],
.st-fill-prep[aria-pressed="true"] {
  background: #2E7D3E !important;
  border-color: #2E7D3E !important;
  color: #FFFFFF !important;
}
.st-fill-counter,
.st-fill-counter:hover,
.st-fill-counter:focus,
.st-fill-counter:focus-visible,
.st-fill-counter:active,
.st-fill-counter.is-on,
.st-fill-counter.is-on-shift,
.st-fill-counter.is-assigned,
.st-fill-counter[aria-current="true"],
.st-fill-counter[aria-pressed="true"] {
  background: #6A1B9A !important;
  border-color: #6A1B9A !important;
  color: #FFFFFF !important;
}
.st-fill-driver,
.st-fill-driver:hover,
.st-fill-driver:focus,
.st-fill-driver:focus-visible,
.st-fill-driver:active,
.st-fill-driver.is-on,
.st-fill-driver.is-on-shift,
.st-fill-driver.is-assigned,
.st-fill-driver[aria-current="true"],
.st-fill-driver[aria-pressed="true"] {
  background: #2A5FA8 !important;
  border-color: #2A5FA8 !important;
  color: #FFFFFF !important;
}
.st-fill-pizza .station-menu-name,
.st-fill-pizza .assign-sub,
.st-fill-prep .station-menu-name,
.st-fill-prep .assign-sub,
.st-fill-counter .station-menu-name,
.st-fill-counter .assign-sub,
.st-fill-driver .station-menu-name,
.st-fill-driver .assign-sub { color: #FFFFFF !important; }
.st-fill-subs .station-menu-name,
.st-fill-subs .assign-sub,
.st-fill-fryers .station-menu-name,
.st-fill-fryers .assign-sub { color: #141414 !important; }
.assign-person-btn[class*="st-fill-"].is-assigned,
.assign-person-btn[class*="st-fill-"][aria-pressed="true"] {
  box-shadow: inset 0 0 0 3px rgba(20, 20, 20, 0.45);
}

/* Driver inventory cards: same compact card as the main board (beat portal overrides). */
.portal-station-board .driver-station-panel .section .task.compact,
.portal-station-board .driver-station-panel .section .task.compact:not(.is-faded) {
  flex: 0 0 calc(50% - 6px) !important;
  width: calc(50% - 6px) !important;
  max-width: calc(50% - 6px) !important;
  min-width: 0 !important;
  min-height: 208px !important;
  height: auto !important;
  border: none !important;
  border-radius: 2px !important;
  background: var(--tint, #fff) !important;
  box-shadow: none !important;
}
.portal-station-board .driver-station-panel .section .task.compact .name,
.portal-station-board .driver-station-panel .section .task.compact .name-full {
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  text-align: center;
  white-space: normal !important;
  overflow: visible !important;
}
/* Driver Do First: a bit more square than the default 208px-tall compact card. */
@media (max-width: 700px) {
  .portal-station-board .driver-station-panel .section.do-first .task.compact,
  .portal-station-board .driver-station-panel .section.do-first .task.compact:not(.is-faded) {
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
  }
}
.amt-edit.is-blank .amt-blank { min-width: 1.25em; display: inline-block; }

/* Side sauce options. Colors reuse the board food-type palette.
   On the card: two left-aligned lines of colored text, no pills.
   Picker keeps tappable chips. */
.sauce-chip-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 1px;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  text-align: left;
}
.sauce-chip-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.35em;
  justify-content: flex-start;
  align-items: baseline;
  width: 100%;
  text-align: left;
}
.sauce-chip {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #1a1410;
  white-space: nowrap;
  text-align: left;
  text-transform: uppercase;
}
.sauce-chip.is-off { opacity: 0.4; }
.sauce-chip-hot { color: #8b1e1e; }
.sauce-chip-medium { color: #8a4b00; }
.sauce-chip-mild { color: #6a5a00; }
.sauce-chip-honey-mustard { color: #5c4a1e; }
.sauce-chip-bbq { color: #6a3f12; }
button.amt-edit.sauce-chip-btn {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}
/* True square, same width as neighbor compact tiles. The previous
   min-height: 208px made this tile taller than it was wide. */
.section .task.compact[data-preview-card="portion-side-sauces"] .tile-body,
.portal-station-board .task.compact[data-preview-card="portion-side-sauces"] .tile-body {
  align-items: stretch;
  text-align: left;
}
/* Percentage width is relative to the GRID CELL, not the row, so
   calc(50% - 6px) shrank this tile to ~76px. Stretch to the same
   cell as neighbor compact cards, then keep a 1/1 aspect ratio. */
.section .task.compact[data-preview-card="portion-side-sauces"],
.portal-station-board .task.compact[data-preview-card="portion-side-sauces"] {
  flex: 0 0 calc(50% - 6px);
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  align-self: start;
  justify-self: stretch;
  box-sizing: border-box;
}
.section .task.compact[data-preview-card="portion-side-sauces"] .amt-line,
.portal-station-board .task.compact[data-preview-card="portion-side-sauces"] .amt-line {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}
.section .task.compact[data-preview-card="portion-side-sauces"] .sauce-chip,
.portal-station-board .task.compact[data-preview-card="portion-side-sauces"] .sauce-chip {
  font-size: 11px;
}
.section .task.compact[data-preview-card="portion-side-sauces"] .art,
.portal-station-board .task.compact[data-preview-card="portion-side-sauces"] .art {
  display: none !important;
}
.side-sauce-choices .choice.sauce-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.side-sauce-choices .choice.sauce-chip-hot { background: var(--ft-meat-bg); border-color: var(--ft-meat); }
.side-sauce-choices .choice.sauce-chip-medium { background: var(--cook-bg); border-color: var(--cook); }
.side-sauce-choices .choice.sauce-chip-mild { background: var(--ft-poultry-bg); border-color: var(--ft-poultry); }
.side-sauce-choices .choice.sauce-chip-honey-mustard { background: var(--dough-bg); border-color: var(--dough); }
.side-sauce-choices .choice.sauce-chip-bbq { background: var(--ft-cooked-bg); border-color: var(--ft-cooked); }
.side-sauce-choices .choice.sauce-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }


/* desktop-snappy: shorten lingering motion for mouse/trackpad. Touch unchanged. */
@media (hover: hover) and (pointer: fine) {
  .section .task.compact {
    transition-duration: 0.1s;
  }
  .date-badge .date-slide,
  .date-badge.is-slide-left .date-slide,
  .date-badge.is-slide-right .date-slide {
    transition-duration: 0.1s;
    animation-duration: 0.1s;
  }
}


/* Toast / WebView taps: cards, amounts, and in-sheet buttons must receive the
   finger, not a parent scroller or backdrop. No inline styles (CSP). */
.task, .faded-tile, [data-edit-amt], [data-stock-edit-amt], [data-edit-sauces],
.item-preview-panel, .item-preview-actions, .item-preview-actions .btn,
.item-preview-x, .qty-dialpad-sheet, .qty-dial-key, .qty-dial-tool, .qty-dial-check,
.section.do-first .do-first-scroll .task {
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}
#pats-tap-debug {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 20000;
  width: 360px;
  max-width: 92vw;
  max-height: 40vh;
  overflow: auto;
  background: #111111;
  color: #e8e8e8;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px;
  border-radius: 8px;
  pointer-events: none;
}
#pats-tap-debug .tap-line {
  margin: 0 0 4px;
  word-break: break-all;
}
#pats-tap-debug .tap-asset {
  margin: 0 0 6px;
  font-weight: 800;
  color: #ffe08a;
}
#pats-asset-mark {
  position: fixed;
  right: 8px;
  bottom: 4px;
  z-index: 40;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8a8278;
  opacity: 0.72;
  pointer-events: none;
  line-height: 1;
}


/* QR station links (?view=qr): hide add / remove / amount / assign / inventory pickers. Checks stay. */
body.qr-checkoff-only .pin,
body.qr-checkoff-only [data-add-card],
body.qr-checkoff-only .assign,
body.qr-checkoff-only [data-amt],
body.qr-checkoff-only [data-edit-amt],
body.qr-checkoff-only [data-set-amt],
body.qr-checkoff-only [data-set-all-bins],
body.qr-checkoff-only [data-toggle-sauce],
body.qr-checkoff-only [data-dough-amt],
body.qr-checkoff-only #btn-undo,
body.qr-checkoff-only #btn-redo,
body.qr-checkoff-only #btn-add-card,
body.qr-checkoff-only #btn-edit-cards,
body.qr-checkoff-only #btn-new-day,
body.qr-checkoff-only .item-preview-assign,
body.qr-checkoff-only .item-preview-dofirst,
body.qr-checkoff-only .item-preview-remove,
body.qr-checkoff-only .item-preview-unassign,
body.qr-checkoff-only [data-preview-assign],
body.qr-checkoff-only [data-preview-dofirst],
body.qr-checkoff-only [data-preview-remove],
body.qr-checkoff-only [data-preview-unassign],
body.qr-checkoff-only .task-complete,
body.qr-checkoff-only [data-complete-task],
body.qr-checkoff-only .faded-tile,
body.qr-checkoff-only .faded-row,
body.qr-checkoff-only .dofirst-plus,
body.qr-checkoff-only .do-first-scroll,
body.qr-checkoff-only [data-open-dofirst-picker],
body.qr-checkoff-only .station-remove,
body.qr-checkoff-only [data-station-remove],
body.qr-checkoff-only [data-board-remove],
body.qr-checkoff-only .station-removed-wrap,
body.qr-checkoff-only .station-take,
body.qr-checkoff-only [data-claim-task],
body.qr-checkoff-only .assign-chips,
body.qr-checkoff-only .driver-leave-faded,
body.qr-checkoff-only .driver-leave-faded-grid,
body.qr-checkoff-only [data-driver-leave-add],
body.qr-checkoff-only [data-box-amt],
body.qr-checkoff-only .driver-boxes,
body.qr-checkoff-only .stock-bring-amt,
body.qr-checkoff-only [data-dessert-stock-edit-amt],
body.qr-checkoff-only [data-dessert-stock-item],
body.qr-checkoff-only [data-stock-item],
body.qr-checkoff-only .driver-inv-card,
body.qr-checkoff-only .qty,
body.qr-checkoff-only .section-h .add-free {
  display: none !important;
}
body.qr-checkoff-only .item-preview-actions { grid-template-columns: 1fr; }
body.qr-checkoff-only .amt-edit { display: none !important; }

/* ===== 20261127h: every popup fits the Toast / iPhone viewport, centered, opaque ===== */
button.faded-tile {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  margin: 0;
  cursor: pointer;
}
.item-preview {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  pointer-events: none;
}
.item-preview-back {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(20, 12, 6, 0.55);
  pointer-events: auto;
}
.item-preview-panel {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: min(420px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  background: #fffdf8;
  border-radius: 18px;
  padding: 0;
  padding-top: 44px;
  box-shadow: 0 16px 40px rgba(20, 10, 0, 0.3);
  box-sizing: border-box;
}
.item-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 8px;
}
.item-preview-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-preview-media img,
.item-preview-media video {
  max-width: 100%;
  max-height: 35vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
}
.item-preview-title {
  margin: 0 0 8px;
  padding-right: 36px;
}
.item-preview-container {
  margin: 8px 0 0;
}
.item-preview-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 10px 16px 16px;
  background: #fffdf8;
  position: sticky;
  bottom: 0;
  z-index: 3;
  box-shadow: 0 -8px 16px rgba(255, 253, 248, 0.9);
}
.item-preview-actions .item-preview-add {
  grid-column: 1 / -1;
  min-height: 56px;
  font-size: 1.2rem;
  font-weight: 900;
  background: #1b7a32;
  color: #fff;
  border: 2px solid var(--ink);
}
.item-preview-actions .item-preview-add.hidden,
.item-preview-actions .item-preview-add[hidden] {
  display: none !important;
}
.item-preview-x {
  z-index: 4;
  pointer-events: auto;
}

.confirm-back {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  background: rgba(34, 24, 16, 0.55);
  pointer-events: auto;
}
.confirm-dialog {
  width: min(440px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper, #fffdf8);
  box-sizing: border-box;
}
.confirm-dialog h2,
.confirm-dialog p {
  flex: 0 1 auto;
}
.confirm-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: var(--paper, #fffdf8);
  padding-top: 8px;
}

.qty-dialpad {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  pointer-events: none;
}
.qty-dialpad-sheet {
  width: min(520px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  padding: 8px 14px 10px;
  box-sizing: border-box;
  pointer-events: auto;
}
.qty-dialpad-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.qty-dialpad-tools {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
  z-index: 2;
}

.name-picker {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
}
.name-picker-panel {
  width: min(480px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border-radius: 16px;
  padding: 0;
  box-sizing: border-box;
}
.name-picker-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 8px;
}
.name-picker-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: #fffdf8;
  margin: 0;
  padding: 10px 16px calc(16px + var(--safe-bot, 0px));
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  background: rgba(40, 40, 40, 0.45);
}
.modal {
  width: min(560px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: auto;
  background: var(--white, #fff);
  box-sizing: border-box;
}

.dofirst-picker {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
}
.dofirst-picker-panel {
  width: min(1100px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  background: #fffdf8;
}

body.qr-checkoff-only .item-preview-add {
  display: none !important;
}
