/* Sweet Butter checklists — design tokens and components.
   Palette: steel-tinted neutrals with a butter-yellow highlight. Status colors are semantic
   (good / warn / bad / info) and never double as the accent. Weekday chips use the day-dot
   label colors kitchens already use for food rotation. */

:root {
  color-scheme: light;
  --ground: #edefea;
  --surface: #ffffff;
  --surface-2: #f5f6f3;
  --surface-3: #e6e9e3;
  --ink: #191c1a;
  --ink-2: #3b413d;
  --muted: #646c66;
  --line: #d5d9d2;
  --line-strong: #b5bbb3;
  --butter: #f4c542;
  --butter-soft: #fcefc2;
  --butter-ink: #664a00;
  --action: #191c1a;
  --on-action: #ffffff;
  --on-good: #ffffff; /* text on --good and --bad backgrounds */
  --on-bad: #ffffff;
  --good: #1f7446;
  --good-soft: #dcf0e3;
  --warn: #975400;
  --warn-soft: #fcebd1;
  --bad: #b8352a;
  --bad-soft: #f9dcd6;
  --info: #2c5a8a;
  --info-soft: #dce7f3;
  --scrim: rgba(18, 22, 20, 0.45);
  --shadow-pop: 0 18px 50px rgba(18, 22, 20, 0.22), 0 2px 6px rgba(18, 22, 20, 0.12);
  --dot-mon: #2f6fd0;
  --dot-tue: #f2c230;
  --dot-wed: #d83a2e;
  --dot-thu: #7a4e2d;
  --dot-fri: #2e9a48;
  --dot-sat: #f07f1a;
  --dot-sun: #1d1d1d;
  --dot-ring: rgba(0, 0, 0, 0.12);

  --font-display: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --tap: 48px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ground: #0e1110;
    --surface: #171b19;
    --surface-2: #1e2320;
    --surface-3: #262c28;
    --ink: #e8ece6;
    --ink-2: #c2c9c2;
    --muted: #8f9892;
    --line: #2a302c;
    --line-strong: #3d4540;
    --butter: #f2c94c;
    --butter-soft: #3a3116;
    --butter-ink: #f5d985;
    --action: #f2c94c;
    --on-action: #151714;
    --on-good: #0e1110;
    --on-bad: #0e1110;
    --good: #5cc48a;
    --good-soft: #14301f;
    --warn: #f0a94a;
    --warn-soft: #382812;
    --bad: #f07a68;
    --bad-soft: #3a1914;
    --info: #86b5ea;
    --info-soft: #16283b;
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
    --dot-sun: #0a0a0a;
    --dot-ring: rgba(255, 255, 255, 0.28);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ground: #0e1110;
  --surface: #171b19;
  --surface-2: #1e2320;
  --surface-3: #262c28;
  --ink: #e8ece6;
  --ink-2: #c2c9c2;
  --muted: #8f9892;
  --line: #2a302c;
  --line-strong: #3d4540;
  --butter: #f2c94c;
  --butter-soft: #3a3116;
  --butter-ink: #f5d985;
  --action: #f2c94c;
  --on-action: #151714;
  --on-good: #0e1110;
  --on-bad: #0e1110;
  --good: #5cc48a;
  --good-soft: #14301f;
  --warn: #f0a94a;
  --warn-soft: #382812;
  --bad: #f07a68;
  --bad-soft: #3a1914;
  --info: #86b5ea;
  --info-soft: #16283b;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  --dot-sun: #0a0a0a;
  --dot-ring: rgba(255, 255, 255, 0.28);
}

/* ------------------------------------------------------------------ base */

html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--butter);
  outline-offset: 2px;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.num,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

#root {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------------ buttons & chips */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.08s;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
}
.btn-quiet {
  background: transparent;
  border-color: transparent;
}
.btn-quiet:hover {
  background: var(--surface-2);
}
.btn-danger {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 40%, var(--line));
}
/* Delete draft, tapped once: tap again to delete it. */
.btn.editor-delete.is-sure {
  background: var(--bad);
  border-color: var(--bad);
  color: var(--on-bad);
}
.btn-lg {
  min-height: 56px;
  font-size: 18px;
  padding: 0 24px;
}
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
}
.icon-btn:hover {
  background: var(--surface-2);
}
.icon-btn:disabled {
  opacity: 0.3;
  background: transparent;
  cursor: default;
}
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--ink-2);
}
.pill .icon {
  width: 16px;
  height: 16px;
}
.pill-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.pill-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill-good {
  background: var(--good-soft);
  color: var(--good);
}
.pill-info {
  background: var(--info-soft);
  color: var(--info);
}
.pill-butter {
  background: var(--butter-soft);
  color: var(--butter-ink);
}

.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-3);
  border-radius: var(--r-md);
}
.seg button {
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 600;
  color: var(--muted);
}
.seg button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 500;
}
.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

/* Day-dot weekday chips: the colored labels kitchens use for food rotation. */
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 1px var(--dot-ring);
  display: inline-block;
}
.dot-0 {
  background: var(--dot-sun);
}
.dot-1 {
  background: var(--dot-mon);
}
.dot-2 {
  background: var(--dot-tue);
}
.dot-3 {
  background: var(--dot-wed);
}
.dot-4 {
  background: var(--dot-thu);
}
.dot-5 {
  background: var(--dot-fri);
}
.dot-6 {
  background: var(--dot-sat);
}
.daychips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.daychip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.daychip .dot {
  width: 16px;
  height: 16px;
  opacity: 0.35;
}
.daychip[aria-pressed='true'] {
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.daychip[aria-pressed='true'] .dot {
  opacity: 1;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--butter);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.progress.is-done > span {
  background: var(--good);
}

/* ------------------------------------------------------------------ forms */

.field {
  display: grid;
  gap: 6px;
}
.field > .label,
.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.hint {
  font-size: 14px;
  color: var(--muted);
}
.input,
.textarea,
.select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.textarea {
  min-height: 72px;
  resize: vertical;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--butter) 55%, transparent);
}
.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.input-inline {
  width: auto;
  min-width: 0;
}
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.toggle input {
  appearance: none;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  position: relative;
  flex: none;
  transition: background 0.15s;
}
.toggle input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.toggle input:checked {
  background: var(--good);
  border-color: var(--good);
}
.toggle input:checked::after {
  transform: translateX(20px);
}

/* ------------------------------------------------------------------ demo bar (preview only) */

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
}
.demo-bar .seg {
  background: color-mix(in srgb, var(--surface) 14%, transparent);
}
.demo-bar .seg button {
  color: color-mix(in srgb, var(--surface) 70%, transparent);
}
.demo-bar .seg button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
}
.demo-bar .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--butter);
  color: #191c1a;
}
.demo-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.demo-clock .time {
  font-family: var(--font-mono);
  font-weight: 500;
  min-width: 11ch;
}
.demo-clock button,
.demo-clock select {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--surface) 30%, transparent);
  background: transparent;
  color: inherit;
  padding: 0 10px;
}
.demo-clock select option {
  color: #191c1a;
}
.demo-spacer {
  flex: 1;
}
/* Wide screens: everything in one row. Phones: view, clock, and a button for the rest. */
.demo-extra {
  display: contents;
}
.demo-more,
.demo-narrow {
  display: none;
}
@media (max-width: 600px) {
  .demo-bar {
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .demo-bar .tag,
  .demo-wide,
  .demo-clock > .icon {
    display: none;
  }
  .demo-clock {
    gap: 4px;
  }
  .demo-clock button {
    padding: 0 6px;
  }
  .demo-push-stack {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
  }
  .demo-bar .seg button {
    padding: 6px 8px;
  }
  .demo-clock .time {
    min-width: 0;
  }
  .demo-more {
    display: grid;
    place-items: center;
    width: 30px;
    height: 32px;
    margin-left: auto;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--surface) 30%, transparent);
    background: transparent;
    color: inherit;
  }
  .demo-extra {
    display: none;
  }
  .demo-extra.is-open {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .demo-narrow {
    display: contents;
  }
  .demo-narrow select {
    min-height: 32px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--surface) 30%, transparent);
    background: transparent;
    color: inherit;
    padding: 0 10px;
  }
  .demo-narrow select option {
    color: #191c1a;
  }
}

/* ------------------------------------------------------------------ staff top bar */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.topbar .clock {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}
.topbar .grow {
  flex: 1;
}
@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 8px 10px;
  }
  .topbar .clock {
    display: none;
  }
  .topbar .grow {
    flex-basis: 0;
  }
  .whoami {
    padding: 4px 14px;
  }
  .whoami .avatar {
    display: none;
  }
  .whoami-name {
    font-size: 21px;
  }
}
.sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--good);
}
.sync .icon {
  width: 18px;
  height: 18px;
}
.sync.is-pending {
  color: var(--warn);
}
.sync.is-busy {
  color: var(--muted);
}
/* A position made here: who has it (a long team scrolls inside the sheet). */
.pick-people {
  max-height: 360px;
  overflow-y: auto;
  gap: 0;
}

/* A blurry or dark photo, shown before it's saved: retake it or use it anyway. */
.retake-photo {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--surface-2);
}

/* Which version of the app this is (lock screen, back end menu), and the back end's Reload. */
.app-version {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.new-version {
  margin: 8px 12px 0;
  background: var(--butter-soft);
  border-color: var(--butter);
  color: var(--ink);
}

/* PIN setup: pick a language, two big buttons. */
.lang-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 440px;
}
.lang-pick .btn {
  min-height: 72px;
  font-size: 22px;
}
/* Who's signed in on this iPad: big, top left, on every screen. */
.whoami {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 18px 4px 4px;
  border-radius: 999px;
  background: var(--butter-soft);
}
.whoami .avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
  background: var(--butter);
  color: #191c1a;
}
.whoami-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}
.whoami-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--butter-ink);
}
.whoami-name {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  background: var(--butter-soft);
  color: var(--butter-ink);
  flex: none;
}
.avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
}
.avatars {
  display: flex;
}
.avatars .avatar {
  box-shadow: 0 0 0 2px var(--surface);
}
.avatars .avatar + .avatar {
  margin-left: -6px;
}

/* ------------------------------------------------------------------ lock screen */

.lock {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px 16px 48px;
}
.lock-inner {
  width: min(420px, 100%);
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}
.lock-time {
  font-family: var(--font-display);
  font-size: clamp(64px, 14vw, 104px);
  font-weight: 600;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.lock-date {
  color: var(--muted);
  font-weight: 500;
  font-size: 19px;
}
.lock-side,
.lock-pad {
  display: grid;
  gap: 22px;
  justify-items: center;
  width: 100%;
}
/* "Right now" on the lock screen: what's late or due soon, for whoever walks up. */
.lock-heads {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
}
.lock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--line-strong);
}
.lock-head.is-overdue {
  border-left-color: var(--bad);
}
.lock-head.is-open {
  border-left-color: var(--warn);
}
.lock-head.is-signoff {
  border-left-color: var(--butter);
  background: var(--butter-soft);
}
/* Open tasks (prep the syrup check asked for): listed until they're done. */
.lock-tasks-label {
  margin-top: 8px;
}
.lock-head.is-task {
  border-left-color: var(--info);
}
.lock-head-more {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px;
}
.lock-head-title {
  font-weight: 700;
  font-size: 17px;
  min-width: 0;
}
.lock-head-sub {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}
@media (min-width: 900px) {
  .lock.has-heads .lock-inner {
    width: min(980px, 100%);
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 56px;
    align-items: center;
  }
  .lock.has-heads .lock-side {
    justify-items: start;
    text-align: left;
  }
}
.pin-dots {
  display: flex;
  gap: 16px;
  height: 22px;
}
.pin-dots span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink-2);
}
.pin-dots span.on {
  background: var(--ink);
  border-color: var(--ink);
}
.pin-dots.shake {
  animation: shake 0.35s;
}
@keyframes shake {
  25% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(8px);
  }
  75% {
    transform: translateX(-4px);
  }
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
.key {
  height: 72px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
}
.key:active {
  background: var(--surface-3);
}
.key-quiet {
  background: transparent;
  border-color: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--muted);
}
.lock-error {
  color: var(--bad);
  font-weight: 600;
  min-height: 1.4em;
}
.demo-hint {
  font-size: 14px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  line-height: 1.6;
}
.demo-hint b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ------------------------------------------------------------------ today */

.screen {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 64px;
  display: grid;
  gap: 20px;
}
.today-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.today-head h1 {
  font-size: 34px;
}
.today-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}
@media (min-width: 900px) {
  .today-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  }
}
.col {
  display: grid;
  gap: 24px;
  align-content: start;
}
.group {
  display: grid;
  gap: 10px;
}
.group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-label .count {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}
.group-label.is-bad {
  color: var(--bad);
}
.empty {
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
button.card:hover {
  border-color: var(--line-strong);
}
.card.is-bad {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
/* On a phone, a long due time ("Due Tomorrow 3:00 PM") goes under the name when both don't fit,
   rather than pushing the card off the side of the screen. */
@media (max-width: 600px) {
  .card-top {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}
.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
}
.card-sub {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-foot .progress {
  flex: 1;
}
.card-foot .tally {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-2);
  min-width: 7ch;
  text-align: right;
}

/* Later today: a ticket rail with times down the side */
.rail {
  display: grid;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.rail-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  width: 100%;
}
.rail-item:first-child {
  border-top: 0;
}
.rail-item:hover {
  background: var(--surface-2);
}
.rail-time {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.rail-name {
  font-weight: 600;
}
.rail-meta {
  font-size: 14px;
  color: var(--muted);
}
.dayhead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.dayhead:first-child {
  border-top: 0;
}

.fixcard {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--bad-soft);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent);
  text-align: left;
  width: 100%;
}
.fixcard .note {
  color: var(--bad);
  font-weight: 600;
}
/* Needs attention: the card opens what it's about; Got it clears it for every manager. */
.attn-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 0;
}
.attn-open {
  display: grid;
  gap: 4px;
  padding: 14px 0 14px 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.attn-gotit {
  flex: none;
}
/* An issue's Assign and Handled, side by side. */
.attn-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
/* On a phone the words get the width; Got it goes under them. */
@media (max-width: 600px) {
  .attn-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 0 14px;
  }
  .attn-open {
    padding: 14px 16px 10px;
  }
  .attn-gotit,
  .attn-card-actions {
    justify-self: start;
    margin-left: 16px;
  }
}
/* For you: what's on me, set apart from what's wrong. */
.fixcard.for-you-card {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--butter-ink, var(--ink)) 30%, transparent);
  box-shadow: inset 4px 0 0 var(--butter);
}
/* A to-do's photos on its card, under its words, the whole width (on a phone, above its buttons). */
.for-you-card > .task-photos {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  padding: 0 16px 14px;
}
.for-you-card > .task-photos .task-photo {
  width: 64px;
  height: 64px;
}
@media (max-width: 600px) {
  .for-you-card > .task-photos {
    order: 1;
    margin: -4px 0 0;
    padding: 0 16px 12px;
  }
  .for-you-card > .attn-card-actions {
    order: 2;
  }
}
.group-label.is-mine {
  color: var(--ink);
}
/* Who something is on. */
.assigned-tag {
  background: var(--info-soft);
  color: var(--info);
  font-weight: 600;
  max-width: 100%;
}
.assigned-tag > span {
  overflow-wrap: anywhere;
}
.assigned-tag.is-mine {
  background: var(--butter);
  color: #191c1a;
}
.handled-how {
  font-size: 14px;
}
.reopened-line {
  font-size: 14px;
}
.assign-people .chip {
  min-height: 44px;
}
/* A written answer someone asked for: news, not something wrong. */
.fixcard.is-answer {
  background: var(--info-soft);
  border-color: color-mix(in srgb, var(--info) 35%, transparent);
}
.fixcard.is-answer .note {
  color: var(--info);
}
.attn-held {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-weight: 600;
}
.attn-held .icon {
  flex: none;
  color: var(--good);
}
.attn-all {
  justify-self: start;
}

/* ------------------------------------------------------------------ running a list */

.run {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 120px;
}
.run-head {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 65px);
  z-index: 10;
  display: grid;
  gap: 12px;
  padding: 16px 0 14px;
  background: var(--ground);
}
.run-head-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.run-head h1 {
  font-size: 32px;
  flex: 1;
  min-width: 12ch;
}
.run-head .tally {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-2);
}
.run-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}
.run-progress .progress {
  flex: 1;
  height: 10px;
}
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
}
.banner-good {
  background: var(--good-soft);
  color: var(--good);
}
.banner-info {
  background: var(--info-soft);
  color: var(--info);
}
.banner-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
/* Staff are done: waiting for a manager to sign off. */
.banner-signoff {
  background: var(--butter-soft);
  color: var(--butter-ink);
  border: 1px solid var(--butter);
}
/* The moment staff finish a list a manager signs off: a full-screen reminder that flashes a few times. */
.handoff {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--ink) 60%, transparent);
  animation: handoff-flash 0.8s ease-in-out 6;
}
@keyframes handoff-flash {
  0%,
  100% {
    background: color-mix(in srgb, var(--ink) 60%, transparent);
  }
  50% {
    background: color-mix(in srgb, var(--butter) 85%, transparent);
  }
}
.handoff-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  width: 100%;
  max-width: 520px;
  padding: 28px 24px;
  border-radius: 22px;
  border: 3px solid var(--butter);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.handoff-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: var(--butter);
  color: #3b2a00;
}
.handoff-icon .icon {
  width: 34px;
  height: 34px;
}
.handoff h2 {
  margin: 0;
  font-size: 30px;
}
.handoff p {
  margin: 0;
  font-size: 18px;
  color: var(--ink-2);
}
.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .handoff {
    animation: none;
  }
}

.section {
  margin-top: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.section-head h2 {
  font-size: 22px;
  flex: 1;
}
.section-head .tally {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.section.is-collapsed .section-head {
  border-bottom: 0;
}

.item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 14px 16px 14px 12px;
  border-top: 1px solid var(--line);
  position: relative;
}
.item:first-child {
  border-top: 0;
}
.item.is-locked {
  opacity: 0.55;
}
.item.is-attention {
  background: color-mix(in srgb, var(--butter-soft) 55%, var(--surface));
}
.item.is-fixing {
  background: color-mix(in srgb, var(--bad-soft) 60%, var(--surface));
}
.item-lead {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}
.item-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.item-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
  min-width: 14ch;
  padding-top: 8px;
}
.item.is-done .item-title {
  color: var(--muted);
}
.item-ins {
  font-size: 15px;
  color: var(--ink-2);
  white-space: pre-line;
}
.item-ref {
  display: block;
  max-width: 260px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.item-ref-btn {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 14px;
  color: var(--muted);
}
.item-kids {
  grid-column: 1 / -1;
  margin: 6px 0 -14px 26px;
  border-left: 2px solid var(--line);
}
.item-kids > .item {
  grid-template-columns: 48px minmax(0, 1fr);
  padding-left: 8px;
}
.item-kids > .item:first-child {
  border-top: 1px solid var(--line);
}
.kid-enter {
  animation: kid-in 0.22s ease-out;
}
@keyframes kid-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: transparent;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.check .icon {
  width: 24px;
  height: 24px;
  stroke-width: 3;
}
.check:hover {
  border-color: var(--ink-2);
}
.check.on {
  background: var(--good);
  border-color: var(--good);
  color: var(--on-good);
}
.check.couldnt {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}
/* Moved to another day (core moves.ts): dealt with here, done there. */
.check.moved {
  background: var(--info-soft);
  border-color: var(--info);
  color: var(--info);
}
.item.is-moved .item-title {
  color: var(--muted);
}
.item.is-moved .lead-icon {
  background: var(--info-soft);
  color: var(--info);
}
/* Already on order (core onorder.ts): the thank-you can run long. */
.tag.item-on-order {
  white-space: normal;
  text-align: left;
  line-height: 1.35;
  padding: 4px 8px;
}
/* Couldn't complete, no time: move it to tomorrow instead. */
.callout.move-instead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}
.callout.move-instead .move-instead-btn {
  grid-column: 2;
  justify-self: start;
}
.lead-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}
.lead-icon.on {
  background: var(--good-soft);
  color: var(--good);
}
.lead-icon.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.ring {
  width: 44px;
  height: 44px;
}
.ring text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--ink-2);
}

.yn {
  display: inline-flex;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.yn button {
  min-width: 76px;
  min-height: 48px;
  border: 0;
  background: var(--surface);
  font-weight: 700;
  font-size: 17px;
}
.yn button + button {
  border-left: 1px solid var(--line-strong);
}
.yn button[aria-pressed='true'].yes {
  background: var(--good);
  color: var(--on-good);
}
.yn button[aria-pressed='true'].no {
  background: var(--bad);
  color: var(--on-bad);
}
.numin {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  overflow: hidden;
}
.numin input {
  width: 96px;
  min-height: 48px;
  border: 0;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 20px;
  background: transparent;
  text-align: right;
}
.numin input:focus {
  outline: none;
}
.numin .unit {
  padding: 0 12px 0 4px;
  color: var(--muted);
  font-weight: 600;
}
.numin.is-bad {
  border-color: var(--bad);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 30%, transparent);
}
.range-hint {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.textin {
  width: 100%;
}
textarea.textin {
  display: block;
  min-height: 48px;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  font: inherit;
}
.item-row.is-stacked {
  flex-direction: column;
  align-items: stretch;
}
/* A rating: ten buttons, one tap (two rows of five on a phone). */
.scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  flex: 1;
  max-width: 620px;
}
.scale button {
  min-height: 48px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
}
.scale button[aria-pressed='true'] {
  background: var(--good);
  border-color: var(--good);
  color: var(--on-good);
}
.scale button[aria-pressed='true'].is-bad {
  background: var(--bad);
  border-color: var(--bad);
  color: var(--on-bad);
}
@media (max-width: 480px) {
  .scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.item-row.is-stacked .item-controls {
  width: 100%;
  flex-wrap: nowrap;
}
.item-row.is-stacked .item-controls .textin {
  flex: 1;
}

.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  background: var(--surface-3);
  position: relative;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb .badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 2px var(--surface);
}
.cam-btn {
  width: 76px;
  height: 76px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line-strong);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  align-content: center;
}
.cam-btn .icon {
  width: 26px;
  height: 26px;
}
.cam-btn.is-needed {
  border-color: var(--warn);
  color: var(--warn);
  background: var(--warn-soft);
}

.prompt {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--butter-soft);
  color: var(--butter-ink);
  font-weight: 600;
  font-size: 15px;
}
.prompt .input-row .input {
  flex: 1;
  min-width: 180px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink-2);
}
.tag .icon {
  width: 14px;
  height: 14px;
}
.tag-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.tag-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.tag-good {
  background: var(--good-soft);
  color: var(--good);
}
.tag-info {
  background: var(--info-soft);
  color: var(--info);
}
.notes {
  display: grid;
  gap: 4px;
  font-size: 15px;
}
.notes p {
  margin: 0;
}
.notes .by {
  color: var(--muted);
  font-size: 13px;
}
.more-btn {
  align-self: flex-start;
}

/* ------------------------------------------------------------------ sheets, menus, viewer, toast */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--scrim);
  display: grid;
  align-items: end;
  justify-items: center;
  animation: fade 0.15s;
}
@media (min-width: 700px) {
  .backdrop {
    align-items: center;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-pop);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 16px;
  animation: rise 0.2s ease-out;
}
@media (min-width: 700px) {
  .sheet {
    border-radius: var(--r-lg);
  }
}
@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
.sheet h2 {
  font-size: 26px;
}
.sheet-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.reason-list {
  display: grid;
  gap: 8px;
}
.reason {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 600;
  text-align: left;
}
.reason[aria-pressed='true'] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.menu {
  display: grid;
  gap: 4px;
}
.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  font-weight: 600;
  text-align: left;
}
.menu button:hover {
  background: var(--surface-2);
}

/* The app's own camera (staff/Camera.tsx), for a dark photo: with the iPad's light on. */
.camera {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #080a09;
  color: #f1f3ef;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.camera-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px 12px;
}
.camera-top .icon-btn {
  color: #f1f3ef;
}
.camera-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #f1f3ef;
}
.camera-light[aria-pressed='true'] {
  background: var(--butter);
  color: #191c1a;
}
.camera-view {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
/* All of what's taken shows, as big as fits. */
.camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.camera-bottom {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom, 0px));
}
.camera-note {
  font-size: 16px;
  text-align: center;
  color: #e7ebe5;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.camera-note.is-bad span {
  color: #ffb4a8;
}
.camera-shutter {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #f1f3ef;
  border: 5px solid rgba(255, 255, 255, 0.35);
  background-clip: padding-box;
  cursor: pointer;
}
.camera-shutter:active {
  transform: scale(0.94);
}
.camera-shutter:disabled {
  opacity: 0.4;
  cursor: default;
}
.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 10, 9, 0.94);
  color: #f1f3ef;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px 20px;
}
.viewer-top .icon-btn {
  color: #f1f3ef;
}
.viewer-top .icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
/* The whole photo, as big as fits the screen (never past it, however big the photo is). */
.viewer-img {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: pinch-zoom;
}
.viewer-img img {
  position: absolute;
  top: 0;
  left: 12px;
  width: calc(100% - 24px);
  height: 100%;
  object-fit: contain;
}
.viewer-cap {
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  font-size: 15px;
  color: #c9cec8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 70;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  text-align: center;
  animation: rise 0.2s ease-out;
  max-width: calc(100% - 32px);
}

/* ------------------------------------------------------------------ back end (admin) */

.admin {
  flex: 1;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  font-size: 15px;
  min-height: 0;
}
@media (max-width: 860px) {
  .admin {
    grid-template-columns: minmax(0, 1fr);
    /* The top bar keeps its height when a page is short; the page takes the rest. */
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
  }
}
.side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: grid;
  gap: 18px;
  align-content: start;
}
@media (max-width: 860px) {
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }
  .side .brand {
    display: none;
  }
}
.side nav {
  display: grid;
  gap: 2px;
}
@media (max-width: 860px) {
  .side nav {
    display: flex;
    gap: 6px;
  }
  .side .nav-item .nav-long {
    display: none;
  }
  .side .nav-item .nav-short {
    display: inline;
  }
}
.side-foot {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
@media (max-width: 860px) {
  .side-foot .app-version {
    display: none;
  }
  .new-version {
    margin: 0;
  }
}
@media (max-width: 860px) {
  .side-foot {
    border-top: 0;
    display: flex;
    align-items: center;
    padding: 0;
    margin-left: auto;
  }
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 0;
  background: transparent;
  font-weight: 600;
  color: var(--ink-2);
  text-align: left;
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--surface-2);
}
.nav-item[aria-current='page'] {
  background: var(--butter-soft);
  color: var(--butter-ink);
}
.nav-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bad);
  color: var(--on-bad);
}
/* Alerts' number is blue: what's come in, not what's to do. */
.nav-item .count.is-info {
  background: var(--info);
  color: var(--surface);
}
.nav-short {
  display: none;
}

/* Phones: the back end's pages move to a tab bar at the bottom, like other iPhone apps. */
@media (max-width: 600px) {
  .side {
    justify-content: space-between;
    overflow: visible;
  }
  .side .brand {
    display: grid;
    padding: 0 !important;
    white-space: nowrap;
  }
  .side .brand b {
    font-size: 19px;
  }
  .side-foot .muted {
    max-width: 30vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .side nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0;
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .side .nav-item {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 4px 0;
    font-size: 11px;
    letter-spacing: -0.1px;
    text-align: center;
  }
  .side .nav-item > span:not(.count) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .side .nav-item .nav-long {
    display: none;
  }
  .side .nav-item .nav-short {
    display: inline;
  }
  .side .nav-item .count {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    margin: 0;
    font-size: 11px;
    padding: 0 5px;
  }
  .admin .page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}
/* The smallest phones: ten tab names a size smaller (as small as iOS's own), so each fits. */
@media (max-width: 370px) {
  .side .nav-item {
    font-size: 10px;
    letter-spacing: -0.2px;
  }
}
.page {
  padding: 24px 28px 64px;
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}
@media (max-width: 600px) {
  .page {
    padding: 16px 16px 48px;
  }
}
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 32px;
  flex: 1;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--butter);
}
.tabs .count {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.table {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.trow {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
}
.trow:first-child {
  border-top: 0;
}
button.trow:hover {
  background: var(--surface-2);
}
.trow.is-head {
  padding-block: 10px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 760px) {
  .trow {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .trow > .hide-sm {
    display: none;
  }
}
.trow-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
}
.trow-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

/* List editor */
.editor-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.title-input {
  flex: 1;
  min-width: 14ch;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  padding: 2px 8px;
  margin-left: -8px;
}
.title-input:hover {
  border-color: var(--line);
}
.title-input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
}
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}
.editor {
  display: grid;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1100px) {
  .editor {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr);
  }
}
.outline {
  display: grid;
  gap: 14px;
}
.o-section {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.o-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 8px 6px 10px;
  border-top: 1px solid var(--line);
  position: relative;
}
.o-row:first-child {
  border-top: 0;
}
.o-row.is-section {
  background: var(--surface-2);
  min-height: 56px;
}
.o-row.is-selected {
  background: var(--butter-soft);
  box-shadow: inset 3px 0 0 var(--butter);
}
.o-type {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--ink-2);
  flex: none;
}
.o-type .icon {
  width: 18px;
  height: 18px;
}
/* Dragging something by its icon (core moveNodeTo): where it would go shows as a line, or a frame
   around a section's name or its Add item. */
.o-type.is-handle {
  cursor: grab;
}
.o-type.is-handle:hover {
  background: var(--line);
}
.o-type.is-handle:active {
  cursor: grabbing;
}
.o-row.is-dragging {
  opacity: 0.45;
}
.o-row.is-drop-before::before,
.o-row.is-drop-after::after {
  content: '';
  position: absolute;
  left: var(--o-indent, 8px);
  right: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--info);
  pointer-events: none;
  z-index: 2;
}
.o-row.is-drop-before::before {
  top: -2px;
}
.o-row.is-drop-after::after {
  bottom: -2px;
}
.o-row.is-drop-into,
.o-add.is-drop-into {
  box-shadow: inset 0 0 0 2px var(--info);
}
.o-title {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--r-sm);
  padding: 6px 8px;
  font-weight: 500;
}
.o-row.is-section .o-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.o-title:focus {
  outline: none;
  border-color: var(--line-strong);
  background: var(--surface);
}
.o-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.o-badges .tag {
  font-size: 12px;
}
.o-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 8px 6px;
  background: var(--butter-soft);
  box-shadow: inset 3px 0 0 var(--butter);
}
.o-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.o-tools .icon-btn {
  width: 34px;
  height: 34px;
}
.o-tools .icon {
  width: 18px;
  height: 18px;
}
.o-add {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.o-add .btn {
  min-height: 36px;
  font-size: 14px;
}
.inspector {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
@media (max-width: 1099px) {
  .inspector {
    position: static;
    max-height: none;
  }
}
/* Below 1100px the settings panel is a sheet: select an item, then tap Settings. */
.o-settings,
.inspector-sheet-head,
.inspector-scrim {
  display: none;
}
@media (max-width: 1099px) {
  .o-settings {
    display: inline-flex;
    margin-right: auto;
  }
  .inspector-host {
    display: none;
  }
  .inspector-host.is-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: max(48px, 8vh);
    z-index: 45;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    border-radius: 18px 18px 0 0;
    box-shadow: var(--shadow-pop);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: rise 0.2s ease-out;
  }
  .inspector-host.is-sheet .inspector {
    border: 0;
    border-radius: 0;
  }
  .inspector-sheet-head {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .inspector-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 44;
    background: var(--scrim);
  }
}
.inspector h2 {
  font-size: 22px;
}
.inspector-group {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.inspector-group > h3 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pair {
  display: grid;
  gap: 8px;
}
.pair .lang {
  position: relative;
}
.pair .lang::before {
  content: attr(data-lang);
  position: absolute;
  left: 10px;
  top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  pointer-events: none;
}
.pair .lang .input,
.pair .lang .textarea {
  padding-left: 38px;
}
.rule {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.rule-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  flex-wrap: wrap;
}
.rule-then {
  display: grid;
  gap: 8px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.check-row input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
}
/* What a checked "Then" needs next (which list, who gets the alert, the task), under its checkbox. */
.rule-more {
  display: grid;
  gap: 10px;
  padding-left: 30px;
}
.alert-who {
  display: grid;
  gap: 8px;
}
.sentence {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--butter-soft);
  color: var(--butter-ink);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}
.occ-list {
  display: grid;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  overflow: hidden;
}
.occ {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.occ:first-child {
  border-top: 0;
}
.occ .mono {
  color: var(--ink-2);
}
.sched-grid {
  display: grid;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1100px) {
  .sched-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
  }
}
.panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.panel h2 {
  font-size: 22px;
}
.problems {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bad-soft);
  color: var(--bad);
  font-weight: 600;
  font-size: 14px;
}
.version {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.version:first-child {
  border-top: 0;
}
.vnum {
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
}

.attn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.attn:first-child {
  border-top: 0;
}
.attn-title {
  font-weight: 700;
  font-size: 17px;
}
.attn-detail {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
/* The report: what wasn't done, item by item. */
.report-left {
  margin: -2px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 2px;
}
.attn-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.attn.is-resolved {
  opacity: 0.6;
}
.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.person:first-child {
  border-top: 0;
}
/* Back-end access: who each login is on the team (their positions pick which alerts reach them). */
.team-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.team-line .icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.team-line.is-unlinked {
  color: var(--warn);
}
.link-btn {
  background: none;
  border: 0;
  padding: 6px 2px;
  font: inherit;
  font-weight: 600;
  color: var(--info);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
@media (max-width: 700px) {
  .person {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .person > .hide-sm {
    display: none;
  }
}
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--info-soft);
  color: var(--info);
  font-size: 14px;
  font-weight: 500;
}
.callout .icon {
  margin-top: 1px;
}
.callout.callout-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.email-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

/* ------------------------------------------------------------------ alerts */

.phone-alerts,
.email-alerts,
.added-emails {
  gap: 14px;
}
/* What's emailed when something's added: on (dark, a check) or off (an x). */
.added-kinds .chip:disabled {
  cursor: default;
}
.added-kinds .chip[aria-pressed='false'] {
  color: var(--muted);
}
.phone-alerts-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.phone-alerts-head h2 {
  font-size: 20px;
}
.phone-alerts-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--muted);
}
.phone-alerts-icon.is-on {
  background: var(--butter);
  color: #191c1a;
}
.steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.alert-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
}
.alert-open {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.alert-row:hover {
  background: var(--surface-2);
}
.alert-made {
  font-size: 14px;
  font-weight: 600;
  color: var(--info);
}
.alert-meta .alert-todo {
  justify-self: end;
}
.alert-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.alert-meta {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
  font-size: 13px;
}
.alert-kind {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
}
.alert-kind.is-rule {
  background: var(--bad-soft);
  color: var(--bad);
}
.alert-kind.is-late,
.alert-kind.is-missed {
  background: var(--warn-soft);
  color: var(--warn);
}
.alert-kind.is-note {
  background: var(--info-soft);
  color: var(--info);
}
.alert-kind.is-fix {
  background: var(--bad-soft);
  color: var(--bad);
}
.alert-kind.is-order {
  background: var(--info-soft);
  color: var(--info);
}
/* Alerts (blue, like their number): what's new since you last looked stands out; a tapped notification's one has a ring. */
.alert-row.is-new {
  background: var(--info-soft);
}
.alert-row.is-new:hover {
  background: color-mix(in srgb, var(--info-soft) 80%, var(--surface-2));
}
.alert-row.is-opened {
  box-shadow: inset 0 0 0 2px var(--info);
  animation: alert-opened 1.6s ease-out 1;
}
@keyframes alert-opened {
  from {
    box-shadow: inset 0 0 0 4px var(--info);
  }
}
.alert-new {
  justify-self: end;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--info);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.alert-state {
  font-size: 14px;
  font-weight: 600;
  color: var(--bad);
}
.alert-state.is-done {
  color: var(--good);
}
.alerts-page .page-head h1 {
  flex: 1;
}
/* Alerts are off on this phone: one line, to the settings. */
.alerts-off {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--warn-soft);
  color: var(--warn);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.alerts-off b {
  text-decoration: underline;
}
/* Sign off (managers' Today): lists waiting on a manager; ready ones stand out. */
.card.signoff-card.is-ready {
  border-color: var(--good);
  box-shadow: inset 4px 0 0 var(--good);
}
.signoff-done {
  font-size: 14px;
  padding: 0 4px;
}
/* A manager stepped in on someone else's session to sign off. */
.stepin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}
.stepin-bar span {
  flex: 1;
  min-width: 0;
}
.stepin-bar .btn {
  background: var(--surface);
  color: var(--ink);
  border-color: transparent;
}
.stepin-pin {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 4px 0 8px;
}

/* The nightly report: night by night, counts, then not done / late / on time. */
.report-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.report-day {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
  text-align: center;
}
.report-day b {
  font-size: 18px;
}
.report-status {
  margin: 0;
  max-width: 65ch;
}
.report-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.report-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}
.report-count b {
  font-family: var(--font-mono);
  font-size: 17px;
}
.report-count.is-bad b,
.report-mark.is-bad {
  color: var(--bad);
}
.report-count.is-late b,
.report-mark.is-late {
  color: var(--warn);
}
.report-count.is-good b,
.report-mark.is-good {
  color: var(--good);
}
.attn.report-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.report-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
}
.report-mark.is-bad {
  background: var(--bad-soft);
}
.report-mark.is-late {
  background: var(--warn-soft);
}
.report-mark.is-good {
  background: var(--good-soft, var(--surface-2));
}
@media (max-width: 600px) {
  .attn.report-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .attn.report-row .attn-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* What staff wrote ("Champagne 1, Rosé 0"): keep their line breaks. */
.entry-title {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.alert-kind.is-fixed {
  background: var(--good-soft, var(--surface-2));
  color: var(--good);
}
/* To fix: icon, what's broken (and where), Mark fixed. */
.attn.fix-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
}
@media (max-width: 600px) {
  .attn.fix-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .attn.fix-row .attn-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  /* Needs attention on a phone: the words get the width; Send back, Assign and Handled go under them. */
  .attn:not(.fix-row):not(.report-row):not(.alert-row) {
    grid-template-columns: minmax(0, 1fr);
  }
  .attn:not(.fix-row):not(.report-row):not(.alert-row) > .attn-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 600px) {
  .alert-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .alert-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding-left: 50px;
    text-align: left;
  }
  .alert-meta .alert-todo {
    margin-left: auto;
  }
}

/* The preview's stand-in for a phone notification. */
.demo-push-stack {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.demo-push {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 10px 12px 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-pop);
  color: var(--ink);
  animation: demo-push-in 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.demo-push-app {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f4c542;
  display: grid;
  place-items: center;
}
.demo-push-app::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #191c1a;
}
.demo-push-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.demo-push-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.demo-push-title {
  font-weight: 700;
  font-size: 15px;
}
.demo-push-body {
  font-size: 14px;
  color: var(--muted);
}
.demo-push-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  border-radius: 999px;
}
@keyframes demo-push-in {
  from {
    transform: translateY(-16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo-push {
    animation: none;
  }
}

/* Positions in the app: a bar that opens to every position, to take some out of the app
   (People → Positions, and the top of Match lists to positions). */
.in-app {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.in-app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.in-app-title {
  min-width: 0;
}
.in-app-title .count {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted);
}
.in-app-chip .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.in-app-out {
  display: grid;
  gap: 8px;
}
.chip.is-out {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}
/* Front or back of house: two groups of positions; tap one to move it across. */
.house-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.house-col {
  display: grid;
  gap: 8px;
  align-content: start;
}
.house-col .chip .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .house-cols {
    grid-template-columns: 1fr;
  }
}
.position-pills {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.in-app-still {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--warn-soft);
  color: var(--ink);
}

/* A manager's spot check: the items picked, each marked Looks good or Redo. */
.spot-wait {
  display: grid;
  justify-items: start;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.spot-wait .icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 6px;
}
.spot-list {
  display: grid;
  gap: 12px;
}
.spot {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.spot.is-good {
  border-color: var(--good);
}
.spot.is-redo {
  border-color: var(--bad);
}
.spot-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.spot-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 14px;
}
.spot-sub {
  font-size: 14px;
  margin-top: 2px;
}
.spot-intro {
  font-weight: 600;
}
/* A picked item's photo, big, to hold up against the real thing (tap for full screen). */
.spot-photo {
  margin: 0;
  display: grid;
  gap: 6px;
}
.spot-photo button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-3);
  cursor: zoom-in;
}
.spot-photo img {
  display: block;
  width: 100%;
  max-height: min(56vh, 520px);
  object-fit: contain;
}
.spot-photo figcaption {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: var(--warn);
}
.spot-photo figcaption .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
/* Signing off before the list is finished: the note, at the top of the spot check. */
.spot-anyway {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 600;
}
.spot-anyway .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
/* The sign-off before the list is finished: why it's locked, and what to do. */
.spot-tip {
  font-weight: 500;
  font-size: 13px;
}
.spot-wait-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.anyway-left {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 2px;
  color: var(--muted);
}

/* The back end's Preview: the staff screens on this restaurant's lists. */
.preview {
  min-height: 100vh;
  min-height: 100dvh;
}
.preview-home {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.trow.preview-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
/* "See it as" is in the top bar; phones have no room there, so it's under the intro instead. */
.preview-as {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
}
@media (max-width: 640px) {
  .preview-as {
    display: flex;
  }
}
.trow.preview-row .pill .icon {
  width: 14px;
  height: 14px;
}
@media (max-width: 640px) {
  .preview .topbar {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .preview .topbar .hide-sm {
    display: none;
  }
  .preview .topbar .brand b {
    font-size: 17px;
  }
}

/* Lists page, reordering: arrows on each row, "Sort by time" beside a folder's name. */
.reorder-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 500;
}
.move-btns {
  display: flex;
  gap: 2px;
}
.group-label-action {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
}

/* Folders sheet: one row per folder (name, Spanish name, count and actions). */
.folder-edit {
  display: grid;
  gap: 8px;
}
.folder-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.folder-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
@media (max-width: 640px) {
  .folder-row {
    grid-template-columns: 1fr;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .folder-row-actions {
    justify-content: flex-end;
  }
}

/* A list's notes for staff: in the editor, and at the top of the list on the iPad. */
.list-notes {
  display: grid;
  gap: 8px;
}
.list-notes-run {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--info-soft);
}
.list-notes-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--info);
}
.list-notes-text {
  white-space: pre-line;
  line-height: 1.45;
}
.list-notes-text.is-folded {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-notes-run {
  margin-top: 12px;
}
.list-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.list-notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--info);
  font-size: 14px;
  font-weight: 700;
}
.list-notes-toggle .icon {
  width: 18px;
  height: 18px;
}
.list-notes-text.is-folded {
  cursor: pointer;
}
.list-notes-hide {
  justify-self: start;
}
/* The last seconds before an iPad signs someone out. */
.lock-warning {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border-radius: var(--r-lg);
  /* The same in light and dark mode: dark text on butter yellow. */
  background: var(--butter);
  color: #191c1a;
  font-size: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.lock-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}
.lock-setting label {
  flex: 1;
  min-width: 240px;
}

/* At the end of a finished list: back to all lists without scrolling up. */
.run-finish {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}

/* Repeating lists: each time as a chip; tap to skip one (shown struck through). */
.slotchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.slotchip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: line-through;
}
.slotchip[aria-pressed='true'] {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

/* Lists page: ready-made lists (from Jolt) waiting to be brought in. */
.import-offer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.import-offer-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--butter);
  color: var(--ink);
}
.import-offer-text {
  display: grid;
  gap: 2px;
}
@media (max-width: 640px) {
  .import-offer {
    grid-template-columns: auto 1fr;
  }
  .import-offer .btn {
    grid-column: 1 / -1;
  }
}

/* Points: the week's total on the iPad's Today screen, and "+3" on items worth more than 1. */
.points-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: var(--butter);
  color: #1b1a14;
  font-weight: 700;
  font-size: 14px;
}
.points-chip .icon {
  width: 16px;
  height: 16px;
}
/* Back end: items done, per person. */
.points-row {
  grid-template-columns: 32px 1fr minmax(80px, 30%) 64px;
}
.points-rank {
  font-family: var(--font-mono);
  color: var(--muted);
  text-align: center;
}
.points-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.points-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--butter);
}
.points-total {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  text-align: right;
}
@media (max-width: 640px) {
  .points-row {
    grid-template-columns: 32px 1fr 64px;
  }
}

/* ------------------------------------------------------------------ Toast: team and positions */

.toast-panel {
  gap: 14px;
}
.toast-panel .import-offer-text b {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.toast-banner {
  font-weight: 500;
  align-items: flex-start;
  flex-wrap: wrap;
}
.toast-banner > span {
  flex: 1 1 260px;
}
.toast-banner .icon {
  margin-top: 2px;
}
.toast-changes {
  display: grid;
  gap: 6px;
}
.toast-changes ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 15px;
}
.toast-changes .btn {
  justify-self: start;
}
.toast-owner {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  flex-wrap: wrap;
}
.steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  line-height: 1.45;
}
.connect-form {
  display: grid;
  gap: 14px;
}
.connect-more summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.connect-more[open] summary {
  margin-bottom: 8px;
}
.trow.position-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.pick-lists,
.match-lists {
  display: grid;
  gap: 14px;
}
.pick-group {
  display: grid;
  gap: 6px;
}
.pick-row {
  padding: 6px 2px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  flex-wrap: nowrap;
}
.pick-row > span:first-of-type {
  flex: 1;
  min-width: 0;
}
.pick-row input[disabled] {
  opacity: 0.55;
}
.match-row {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.match-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}
.setup-search {
  font-size: 19px;
  min-height: 52px;
}
@media (max-width: 700px) {
  /* On a phone, a person's row buttons are icons, so their name keeps the room. */
  .person .btn-text {
    display: none;
  }
}

/* To-dos a manager plans for a day (the back end's To-dos, and Create a list on an iPad or phone):
   made for a phone first. The box and "Added" stay together above the keyboard (return adds);
   Add is at the bottom, after the options, like any form. */
.todo-planner {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.todo-dayscroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.todo-dayscroll::-webkit-scrollbar {
  display: none;
}
.daypill {
  position: relative;
  flex: none;
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 70px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  scroll-snap-align: center;
}
.daypill[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.daypill-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.daypill-date {
  font-size: 12px;
  opacity: 0.75;
  white-space: nowrap;
}
.daypill .count {
  position: absolute;
  top: -6px;
  right: -4px;
  margin: 0;
  font-size: 11px;
  padding: 0 5px;
  background: var(--butter);
  color: var(--ink);
}
.todo-compose {
  display: grid;
  gap: 10px;
  /* Scrolled to (Change), it shows clear of a phone's bar at the top. */
  scroll-margin-top: 120px;
}
.todo-compose-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.todo-box {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  resize: none;
  line-height: 1.35;
  font-size: 17px;
}
/* Add (or Cancel and Save) at the bottom of the box: on the right on a wide screen, the width of
   the box on a phone. "Added" shows over it when it was tapped; kept in view clear of a phone's
   bar at the top. */
.todo-end {
  display: grid;
  gap: 10px;
  scroll-margin: 130px 0 24px;
}
.todo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}
.todo-add {
  min-height: 46px;
  min-width: 160px;
}
@media (max-width: 600px) {
  .todo-actions .btn {
    flex: 1;
    min-height: 48px;
  }
  .todo-actions .todo-add {
    flex: 2;
    min-width: 0;
  }
}
.todo-opts {
  display: flex;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: wrap;
}
.todo-opt-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  min-width: 28px;
}
.todo-due {
  width: auto;
}
.todo-flash {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--good);
  font-weight: 600;
  font-size: 14px;
}
.todo-flash-mark {
  flex: none;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.todo-flash .icon {
  width: 16px;
  height: 16px;
}
.todo-flash .link-btn {
  padding: 0 2px;
}
/* Just added: a green banner that pops in (each time), the box flashes green, and the new to-do
   in the day's list lights up green and fades back. */
@keyframes added-pop {
  from {
    transform: translateY(-6px) scale(0.97);
    opacity: 0;
  }
}
.todo-flash.is-added {
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--good-soft);
  font-size: 15px;
  line-height: 1.35;
  animation: added-pop 0.28s ease-out;
}
.todo-flash.is-added .todo-flash-mark {
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(--good);
  color: var(--on-good);
}
.todo-box.is-added {
  animation: box-added 1.2s ease-out;
}
.todo-box.is-added::placeholder {
  color: var(--good);
  font-weight: 600;
  opacity: 1;
}
@keyframes todo-added {
  0%,
  55% {
    background-color: var(--good-soft);
    box-shadow: inset 4px 0 0 var(--good);
  }
}
.todo-row.is-added {
  animation: todo-added 2.6s ease-out;
}
.todo-editing {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warn);
  font-weight: 600;
  font-size: 14px;
}
.todo-editing .icon {
  width: 16px;
  height: 16px;
}
.todo-status {
  font-weight: 600;
  font-size: 14px;
}
.todo-status.is-good {
  color: var(--good);
}
.todo-status.is-late {
  color: var(--warn);
}
.todo-status.is-bad {
  color: var(--bad);
}
/* The written answer to a to-do that asked for one. */
.todo-answer {
  font-weight: 600;
  color: var(--info);
}
.todo-row.is-editing {
  background: var(--butter-soft);
}
/* In Create a list on an iPad (a sheet, narrower than the screen), a to-do's words get the width
   and its buttons go under them, as on a phone (side by side, the words were squeezed to a word a line). */
.sheet .todo-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.sheet .todo-row .attn-actions {
  justify-content: flex-start;
  margin-left: -10px;
}
.todo-suggested {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--info);
}
.todo-suggested .icon {
  width: 14px;
  height: 14px;
}
.todo-suggest {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--info-soft);
  font-size: 14px;
}
/* Each question with its label above its answers, the same on a phone and an iPad. */
.todo-suggest .todo-opts {
  display: grid;
  justify-items: start;
  gap: 6px;
}
/* Plan ahead (managers): Create a list, now and then, out of the way of today's work. */
.plan-ahead {
  gap: 8px;
}
.plan-ahead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.todo-plan-count {
  font-size: 14px;
}
@media (max-width: 600px) {
  /* Typing a to-do on a phone: the tab bar steps aside (on Android it would sit on the keyboard). */
  body:has(.todo-box:focus) .side nav {
    display: none;
  }
  /* On a phone: the words get the width; Change and Remove go under them. */
  .todo-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .todo-row .attn-actions {
    justify-content: flex-start;
    margin-left: -10px;
  }
  .todos-intro {
    display: none;
  }
}
.run-todo-from {
  font-size: 14px;
}

/* "Put this on my phone": the QR code to scan, and how. */
.phone-setup {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: left;
}
.qr {
  width: min(240px, 70vw);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.phone-steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 6px;
  justify-self: stretch;
}
.phone-code {
  margin: 0;
  font-size: 14px;
  justify-self: stretch;
}
.todo-phone-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  font-size: 14px;
}
.todo-phone-link .icon {
  width: 16px;
  height: 16px;
}
.home-tip {
  margin: 0 0 12px;
}

/* The preview's "Phone" view: the app at a phone's width. On a wide screen the page's own
   phone rules (by screen width) don't apply, so the ones the staff screens use are repeated here. */
.demo-phone {
  width: min(390px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--ground);
}
.demo-phone .today-grid {
  grid-template-columns: minmax(0, 1fr);
}
.demo-phone .screen {
  padding-left: 16px;
  padding-right: 16px;
}
.demo-phone .topbar {
  flex-wrap: wrap;
  padding: 8px 16px;
  gap: 8px 10px;
}
.demo-phone .topbar .clock,
.demo-phone .whoami .avatar {
  display: none;
}
.demo-phone .topbar .grow {
  flex-basis: 0;
}
.demo-phone .whoami {
  padding: 4px 14px;
}
.demo-phone .whoami-name {
  font-size: 21px;
}
.demo-phone .todo-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.demo-phone .todo-row .attn-actions {
  justify-content: flex-start;
  margin-left: -10px;
}


/* Create a list as its own screen on a phone. */
.todo-screen {
  max-width: 720px;
}
.todo-screen-head {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.todo-screen-head h1 {
  font-size: 30px;
}
/* On a phone each to-do's buttons fit on one line: no icons, less padding. */
@media (max-width: 600px) {
  .todo-row .attn-actions {
    gap: 0;
  }
  .todo-row .attn-actions .btn {
    padding-left: 6px;
    padding-right: 6px;
  }
  .todo-row .attn-actions .btn .icon {
    display: none;
  }
}
.demo-phone .todo-row .attn-actions {
  gap: 0;
}
.demo-phone .todo-row .attn-actions .btn {
  padding-left: 6px;
  padding-right: 6px;
}
.demo-phone .todo-row .attn-actions .btn .icon {
  display: none;
}

/* Plan ahead's links: Put this on my phone, How it works. */
.plan-ahead-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* A short tour (Create a list, for managers): a spotlight on the real thing, and a tip next to it. */
.tour {
  position: fixed;
  inset: 0;
  z-index: 75;
  /* Only the blocks (everything but an open spotlight) and the tip take taps. */
  pointer-events: none;
}
.tour-block {
  position: fixed;
  pointer-events: auto;
  /* The screen under the tour doesn't scroll, and a swipe right reaches the tour (to go back). */
  touch-action: none;
}
.tour-dim {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 20, 0.6);
}
.tour-spot {
  position: fixed;
  border-radius: 14px;
  box-shadow:
    0 0 0 3px var(--butter),
    0 0 0 9999px rgba(18, 22, 20, 0.6);
  transition:
    top 0.2s ease,
    left 0.2s ease,
    width 0.2s ease,
    height 0.2s ease;
  pointer-events: none;
}
.tour-tip {
  position: fixed;
  pointer-events: auto;
  width: min(380px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 16px 16px 12px;
  display: grid;
  gap: 12px;
  animation: fade 0.15s;
}
.tour-text {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}
/* The tip's arrow, at the middle of what it points at. */
.tour-tip[data-side='below']::before,
.tour-tip[data-side='above']::after {
  content: '';
  position: absolute;
  left: calc(var(--caret-x, 24px) - 9px);
  border: 9px solid transparent;
}
.tour-tip[data-side='below']::before {
  top: -9px;
  border-top: 0;
  border-bottom-color: var(--surface);
}
.tour-tip[data-side='above']::after {
  bottom: -9px;
  border-bottom: 0;
  border-top-color: var(--surface);
}
/* What to tap, when the tour asks for a tap. */
.tour-do {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--butter-soft);
  color: var(--butter-ink);
  font-size: 17px;
  font-weight: 600;
}
.tour-do .icon {
  flex: none;
  animation: tour-nudge 1.2s ease-in-out infinite;
}
@keyframes tour-nudge {
  50% {
    transform: translateY(-3px);
  }
}
.tour-tip[data-side='above'] .tour-do .icon {
  animation-name: tour-nudge-down;
}
@keyframes tour-nudge-down {
  50% {
    transform: translateY(3px);
  }
}
/* The button to tap pulses. */
.tour-spot.is-tap {
  animation: tour-pulse 1.4s ease-in-out infinite;
}
@keyframes tour-pulse {
  50% {
    box-shadow:
      0 0 0 7px var(--butter),
      0 0 0 9999px rgba(18, 22, 20, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spot.is-tap,
  .tour-do .icon {
    animation: none;
  }
}
.tour-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tour-count {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tour-skip {
  font-size: 14px;
  margin-left: 6px;
}
.tour-card {
  margin: 0 0 12px;
  align-items: center;
}
.tour-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Suggest repeating: a few questions (all optional), or Quick send. */
.todo-suggest-head {
  display: flex;
  align-items: flex-start;
  gap: 10px 14px;
  flex-wrap: wrap;
}
.todo-suggest-head > span {
  flex: 1 1 220px;
}
.todo-quick-send {
  flex: none;
}
.todo-suggest-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Setting up a PIN: "Sam Chen already has a PIN", read like a note, not centered like the title. */
.setup-already {
  text-align: left;
  width: 100%;
}

/* Pick positions: All · FOH · BOH above the chips; what's picked on the other side, said under them. */
.position-pick {
  display: grid;
  justify-items: start;
  gap: 8px;
}
.position-pick .chips {
  justify-self: stretch;
}
.position-elsewhere {
  font-size: 14px;
}

/* ------------------------------------------------------------------ the list editor on a phone */

/* Editing a list on a phone: the tab bar steps aside, and Publish sits at the bottom instead. */
@media (max-width: 600px) {
  .admin.is-editing .side nav {
    display: none;
  }
  .admin.is-editing .page {
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }
  .admin.is-editing .page.has-publish {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  }
  body:has(.admin.is-editing) .toast {
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }
}
.pe {
  gap: 16px;
}
.pe-top {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -6px -8px -10px -12px;
}
.pe-icon {
  border-radius: 999px;
}
.pe-head {
  display: grid;
  gap: 8px;
}
.pe-name {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
}
.pe-name .icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--muted);
}
.pe-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 15px;
}

/* A list that's never been published: its setup, one tap per step. */
.pe-setup {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--butter-soft);
}
.pe-setup h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.pe-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.pe-step-n {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--surface-3);
}
.pe-step.is-done .pe-step-n {
  background: var(--good);
  color: var(--on-good);
}
.pe-step-n .icon {
  width: 18px;
  height: 18px;
}
.pe-step-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.pe-step-label {
  font-weight: 700;
}
.pe-step-value {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pe-setup .hint {
  margin: 4px 2px 0;
}
.pe-chev {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.pe-tabs {
  margin-top: -4px;
}
.pe-notes {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  text-align: left;
}
.pe-notes .icon {
  flex: none;
  margin-top: 2px;
}

/* The outline: sections as cards, each item one tap away from its settings. */
.pe-outline {
  display: grid;
  gap: 14px;
}
.pe-outline.is-dragging {
  user-select: none;
  -webkit-user-select: none;
}
.pe-block {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.pe-sec-head {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.pe-sec {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  min-width: 0;
}
.pe-sec-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  min-width: 0;
}
.pe-sec-title.is-empty,
.pe-title.is-empty {
  color: var(--muted);
  font-style: italic;
}
.pe-node {
  position: relative;
  background: var(--surface);
}
.pe-node.is-dragging {
  z-index: 20;
  box-shadow: var(--shadow-pop);
  border-radius: var(--r-md);
  opacity: 1;
}
.pe-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px 10px calc(14px + var(--depth, 0) * 20px);
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  font-size: 17px;
  transition: background-color 0.4s;
}
.pe-block > .pe-node:first-child > .pe-row,
.pe-sec-head + .pe-node > .pe-row {
  border-top: 0;
}
.pe-row:active {
  background: var(--surface-2);
}
/* Press and hold to pick it up: no text selection or long-press menu on the way. */
.pe-row,
.pe-sec {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* Dropping it here puts it under this item. */
.pe-row.is-drop-into {
  background: var(--info-soft);
  box-shadow: inset 0 0 0 2px var(--info);
}
.pe-block.is-dragging {
  position: relative;
  z-index: 20;
  box-shadow: var(--shadow-pop);
}
/* "Under …": the item it would go under, named just above its row. */
.pe-drop-into {
  position: fixed;
  left: 20px;
  z-index: 26;
  max-width: calc(100% - 40px);
  margin-top: -34px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--info);
  color: var(--on-good, #fff);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.pe-move-hint {
  margin: -4px 2px 0;
  font-size: 13px;
  color: var(--muted);
}
.pe-row.is-lit {
  background: var(--butter-soft);
}
/* Just added: the item drops in, green with a check where its kind's icon goes, and fades back;
   the box under it flashes green and says it went in. */
@keyframes pe-row-in {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
}
@keyframes pe-added {
  0%,
  55% {
    background-color: var(--good-soft);
    box-shadow: inset 4px 0 0 var(--good);
  }
}
.pe-row.is-added {
  animation:
    pe-row-in 0.28s ease-out,
    pe-added 2.6s ease-out;
}
.pe-row.is-added .pe-type {
  background: var(--good);
  color: var(--on-good);
}
@keyframes box-added {
  from {
    border-color: var(--good);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 35%, transparent);
  }
}
.pe-quick-box.is-added {
  animation: box-added 1.2s ease-out;
}
.pe-quick-box.is-added::placeholder {
  color: var(--good);
  font-weight: 600;
  opacity: 1;
}
.pe-type {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  transition:
    background-color 0.4s,
    color 0.4s;
}
.pe-type .icon {
  width: 18px;
  height: 18px;
}
.pe-main {
  flex: 1;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.pe-title {
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.pe-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pe-badges .tag {
  font-size: 12px;
}
.pe-drop {
  position: fixed;
  left: calc(20px + var(--depth, 0) * 20px);
  right: 20px;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
  background: var(--info);
  z-index: 25;
  pointer-events: none;
}
.pe-empty {
  margin: 0;
  padding: 14px 16px 4px;
  color: var(--muted);
}
.pe-add {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink-2);
  font-weight: 600;
  text-align: left;
}
.pe-add .icon {
  width: 20px;
  height: 20px;
}

/* Adding: the words, the kind under them (and what that kind needs), Add; Return for the next. */
.pe-quick {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--butter-soft);
}
.pe-quick-box {
  width: 100%;
  min-height: 48px;
  font-size: 17px;
  resize: none;
}
.pe-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pe-types .chip {
  min-height: 36px;
  padding: 0 10px;
  font-size: 14px;
  gap: 6px;
}
.pe-types .chip .icon {
  width: 16px;
  height: 16px;
}
.pe-kind-hint {
  margin: -2px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}
.pe-kind-hint strong {
  font-weight: 650;
  color: var(--ink);
}
/* What the kind needs: its choices, its sub-items, its range. Set in, under the item it's for. */
.pe-parts {
  display: grid;
  gap: 8px;
  margin-left: 4px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--butter);
}
.pe-parts-head {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}
.pe-parts-head span {
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
}
.pe-part {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pe-part .input {
  flex: 1;
  min-width: 0;
}
.pe-part .icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
}
.pe-part-mark {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--muted);
  background: var(--surface);
}
.is-choice .pe-part-mark {
  border-radius: 50%;
}
.is-sub .pe-part-mark {
  border-radius: 5px;
}
.pe-another {
  justify-self: start;
}
/* Lowest to highest, then the unit: fits any phone (the inputs share what's left). */
.pe-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  max-width: 330px;
}
.pe-range .input {
  width: 100%;
  min-width: 0;
}
.pe-range-unit {
  font-weight: 600;
}
.pe-range-what {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 330px;
  font-size: 15px;
}
.pe-range-what .input {
  min-width: 0;
}
/* What happens after (rules), right in the add box. */
.pe-rules {
  display: grid;
  gap: 8px;
}
.pe-quick .rule {
  background: var(--surface);
}
.pe-add-rule {
  justify-self: start;
}
.pe-add-rule,
.pe-another {
  white-space: normal;
  text-align: left;
}
.pe-rules-hint {
  margin-top: -4px;
  font-size: 13px;
  color: var(--muted);
}
.pe-count .chip {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}
.pe-nudge {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--bad);
}
.pe-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pe-quick-actions > .btn-sm:first-child {
  margin-right: auto;
}
.pe-quick-add {
  flex: none;
  min-height: 48px;
}
.pe-quick-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.pe-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* At the bottom: Undo after a delete, and Publish. */
.pe-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.pe-bottom > * {
  pointer-events: auto;
}
.pe-undo,
.pe-publish {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  font-weight: 600;
}
.pe-undo {
  background: var(--ink);
  color: var(--surface);
}
.pe-undo .btn {
  background: transparent;
  color: var(--surface);
  border-color: color-mix(in srgb, var(--surface) 45%, transparent);
}
.pe-publish {
  background: var(--surface);
  border: 1px solid var(--line);
}
.pe-undo > span,
.pe-publish > span {
  flex: 1;
  min-width: 0;
}
.pe-publish .btn {
  min-height: 48px;
}
@media (min-width: 601px) {
  .pe-bottom {
    left: auto;
    width: 420px;
  }
}

/* The settings sheet: the item's settings, then how to arrange it. */
.pe-sheet-head {
  position: sticky;
  top: -20px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -20px -20px 0;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.pe-sheet-title {
  display: grid;
  min-width: 0;
  margin-right: 12px;
}
.pe-sheet-kind {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.pe-sheet-name {
  font-weight: 700;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The item's settings, as in the computer's side panel, but the sheet's own width. */
.pe-sheet-body {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.pe-sheet-body .inspector {
  position: static;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  min-width: 0;
}
.pe-sheet-body .inspector > *,
.pe-sheet-body .inspector-group > * {
  min-width: 0;
}
.pe-sheet-body .inspector .btn {
  white-space: normal;
  text-align: left;
}
.pe-sheet-body .inspector .input-row {
  flex-wrap: wrap;
}
.pe-sheet-body .inspector-done {
  display: none;
}
/* On a phone, an item's settings (and rules made in the add box) never run off the side: every
   grid takes what width there is, and a picker shows as much of its choice as fits. */
.pe-sheet-body,
.pe-sheet-body .inspector,
.pe-sheet-body .inspector-group,
.pe-sheet-body .field,
.pe-narrow .rule,
.pe-narrow .rule-then,
.pe-narrow .rule-more,
.pe-narrow .alert-who {
  grid-template-columns: minmax(0, 1fr);
}
.pe-sheet-body select,
.pe-sheet-body .select,
.pe-narrow select,
.pe-narrow .select {
  min-width: 0;
  max-width: 100%;
}
.pe-narrow .rule-head .select {
  flex: 1 1 150px;
}
@media (max-width: 360px) {
  .pe-tabs button {
    padding-left: 8px;
    padding-right: 8px;
  }
  .pe-quick-actions .btn {
    padding-left: 12px;
    padding-right: 12px;
  }
  .pe-quick-actions > .btn-sm:first-child {
    font-size: 15px;
  }
}
.pe-actions {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pe-actions h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.pe-action-list {
  display: grid;
  gap: 8px;
}
.pe-action-list .btn {
  justify-content: flex-start;
  min-height: 48px;
  text-align: left;
}
.pe-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pe-move-to {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.pe-version {
  margin: 0;
  font-size: 14px;
}

/* Example photos ("what good looks like"): thumbnails to see big or take off, and Add. */
.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.example {
  position: relative;
  width: 84px;
  height: 84px;
  flex: none;
}
.example-img {
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.example-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.example-x {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid var(--surface);
  background: var(--ink);
  color: var(--surface);
  padding: 0;
}
.example-x .icon {
  width: 14px;
  height: 14px;
}
.example.is-saving {
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.example-add {
  min-height: 48px;
}

/* The phone editor: for the whole list (notes, example photos), and photos on items. */
.pe-forall {
  display: grid;
  gap: 10px;
}
.pe-forall-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pe-forall-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.pe-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.pe-quick-photo {
  flex: none;
  min-height: 48px;
  padding: 0 14px;
}

/* Staff: a whole list's example photos, above its items (under its notes). */
.list-examples {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.list-examples-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}
.list-example {
  flex: none;
  width: 132px;
  height: 132px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.list-examples.is-one .list-example {
  width: 100%;
  height: auto;
  max-height: 260px;
}
.list-example img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.list-examples.is-one .list-example img {
  max-height: 260px;
}

/* ------------------------------------------------------------------ Days: lists by day, and one list item by item */

.days .report-day .days-date {
  justify-self: center;
  width: auto;
  min-height: 36px;
  padding: 4px 10px;
  font-size: 15px;
  color: var(--ink-2);
  background: var(--surface);
}
.days-today {
  justify-self: center;
}
.days-list {
  overflow: hidden;
}
.day-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
}
.days-list > :first-child.day-row,
.days-list > .day-group:first-child > .day-row:first-child {
  border-top: 0;
}
.day-row:active {
  background: var(--surface-2);
}
.day-row.is-sub {
  padding-left: 44px;
  min-height: 52px;
}
.day-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.day-mark .icon {
  width: 16px;
  height: 16px;
}
.day-row.is-good .day-mark {
  background: var(--good-soft, var(--surface-2));
  color: var(--good);
}
.day-row.is-bad .day-mark {
  background: var(--bad-soft);
  color: var(--bad);
}
.day-row.is-late .day-mark {
  background: var(--warn-soft);
  color: var(--warn);
}
.day-row.is-info .day-mark {
  background: var(--info-soft);
  color: var(--info);
}
.day-main {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.day-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.day-meta {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.day-status.is-bad {
  color: var(--bad);
  font-weight: 600;
}
.day-status.is-late {
  color: var(--warn);
  font-weight: 600;
}
.day-status.is-good {
  color: var(--good);
}
.day-status.is-info {
  color: var(--info);
}

.run-sheet {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.run-status {
  margin: 0;
  display: grid;
  gap: 2px;
}
.run-status span {
  color: var(--muted);
}
.run-status.is-good b {
  color: var(--good);
}
.run-status.is-bad b {
  color: var(--bad);
}
.run-status.is-late b {
  color: var(--warn);
}
.run-status.is-info b {
  color: var(--info);
}
.run-missing {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bad-soft);
}
.run-missing h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--bad);
}
.run-missing ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 3px;
}
.run-notes {
  display: grid;
  gap: 4px;
  font-size: 15px;
}
.run-items {
  display: grid;
  gap: 2px;
}
.run-section {
  display: grid;
  gap: 2px;
  margin-top: 6px;
}
.run-section h3 {
  margin: 4px 0 2px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.run-item {
  display: flex;
  gap: 10px;
  padding: 8px 0 8px calc(var(--depth, 0) * 22px);
  border-top: 1px solid var(--line);
}
.run-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.run-mark .icon {
  width: 14px;
  height: 14px;
}
.run-item.is-done .run-mark {
  background: var(--good);
  color: var(--on-good);
}
.run-item.is-missed .run-mark,
.run-item.is-fixing .run-mark {
  background: var(--bad-soft);
  color: var(--bad);
}
.run-item.is-couldnt .run-mark,
.run-item.is-needs-more .run-mark {
  background: var(--warn-soft);
  color: var(--warn);
}
.run-main {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.run-title {
  overflow-wrap: anywhere;
}
.run-item.is-missed .run-title {
  font-weight: 600;
}
.run-meta {
  font-size: 14px;
  color: var(--muted);
}
.run-item.is-missed .run-meta,
.run-item.is-fixing .run-meta {
  color: var(--bad);
  font-weight: 600;
}
.run-answer,
.run-note {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.run-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.run-photo {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.run-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.run-detail {
  font-size: 13px;
}

/* ------------------------------------------------------------------ My To-dos (/me) */

.me {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 100vh;
}
.me-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.me-head h1 {
  font-size: 30px;
  margin: 0;
}
.me-notify {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--butter);
  color: #191c1a;
}
.me-notify > .icon {
  margin-top: 2px;
}
.me-notify > div {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.me-add {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.me-add .input {
  font-size: 17px;
  min-height: 48px;
}
.me-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.me-kind button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.me-for {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.me-for .select {
  min-height: 40px;
  max-width: 170px;
}
.me-add-btn {
  margin-left: auto;
}
.me-group {
  display: grid;
  gap: 8px;
}
.me-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.me-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.me-item.is-done {
  opacity: 0;
  transform: translateX(24px);
}
.me-item.is-finished {
  opacity: 0.7;
}
.me-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: transparent;
  cursor: pointer;
  flex: none;
}
.me-check:hover,
.me-check:focus-visible {
  border-color: var(--good);
  color: var(--good);
}
.me-item.is-done .me-check,
.me-check.is-checked {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}
.me-item[data-kind='issue'] .me-check {
  border-color: color-mix(in srgb, var(--bad) 60%, var(--line-strong));
}
.me-item-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.me-item-title {
  font-weight: 700;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.me-item-detail {
  color: var(--muted);
  font-size: 14px;
}
.me-item-from {
  font-size: 14px;
  color: var(--info);
  font-weight: 600;
}
.me-pass {
  align-self: start;
}
.me-empty {
  margin: 0;
  padding: 4px 2px;
}
.me-done-toggle {
  justify-self: start;
}
/* Photos on a to-do (core tasks.ts; ui/taskphotos.tsx): small ones on it, wherever it shows, a
   tap for one big. On My To-dos, Photo beside the words as one's added (the ones picked show
   under the box, each with an × to take it off), and Photo on one already there. */
.task-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.task-photo {
  width: 56px;
  height: 56px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
}
.task-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.task-photo.is-saving {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: default;
}
.me-add-top {
  display: flex;
  gap: 8px;
}
.me-add-top .input {
  flex: 1;
  min-width: 0;
}
.me-add-photo {
  min-height: 48px;
  flex: none;
  gap: 6px;
  padding: 0 14px;
}
/* On a phone, what each one says gets the width: its buttons (Photo, Ordered, Tag, Assign) go
   under the words instead of beside them. */
@media (max-width: 480px) {
  .me-section .me-item {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    row-gap: 4px;
  }
  .me-section .me-item-actions {
    grid-column: 2;
    margin: 0 0 -6px -12px;
  }
}
.me-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}
.me-pick {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
}
.me-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.me-pick-x {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid var(--surface);
  background: var(--ink);
  color: var(--surface);
  padding: 0;
}
.me-pick-x .icon {
  width: 14px;
  height: 14px;
}
.viewer-cap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.viewer-remove {
  flex: none;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #f1f3ef;
}
.viewer-remove.is-sure {
  background: var(--bad);
  color: #fff;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* "Updating…" / "Offline": the back end or My To-dos showing what was kept on this phone (see live-admin.ts). */
.sync-pill {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-action);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-pop);
  animation: sync-pill-in 0.2s ease 0.8s both;
}
@keyframes sync-pill-in {
  from {
    opacity: 0;
  }
}
/* Above the back end's tab bar on a phone. */
@media (max-width: 600px) {
  .admin > .sync-pill {
    bottom: calc(env(safe-area-inset-bottom) + 76px);
  }
}

/* Tags (core tags.ts): who or what something is waiting for. */
.chip-sm {
  min-height: 34px;
  padding: 0 12px;
  gap: 6px;
  font-size: 14px;
}
.chip .icon {
  width: 15px;
  height: 15px;
}
.chip .count {
  font-weight: 700;
  opacity: 0.7;
}
.tag-trade {
  background: var(--butter-soft);
  color: var(--butter-ink);
}
.tag-new {
  display: flex;
  gap: 8px;
}
.tag-new .input {
  flex: 1;
  min-width: 0;
}
.fix-tags {
  margin: 4px 0 2px;
}
.me-tags {
  gap: 6px;
}
.me-tag-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.me-tag-input {
  min-height: 34px;
  width: 140px;
  font-size: 15px;
  padding: 0 10px;
}
.me-item-actions {
  display: flex;
  align-self: start;
  gap: 2px;
}
/* Each says what it does under its icon: Ordered, Tag, Assign. */
.me-act {
  width: 50px;
  height: auto;
  min-height: 44px;
  padding: 5px 0 3px;
  grid-template-rows: auto auto;
  gap: 2px;
  color: var(--ink-2);
}
.me-act .icon {
  width: 20px;
  height: 20px;
}
.me-act-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--muted);
}
.me-fix-mark {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
  color: var(--muted);
}
.me-section .group-label {
  margin-top: 6px;
}
/* My To-dos: To-dos and Alerts. What's on you is red; new alerts are blue. */
.me-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-lg);
  background: var(--surface-3);
}
.me-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: calc(var(--r-lg) - 4px);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.me-tab[aria-selected='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(18, 22, 20, 0.12);
}
.me-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.me-count.is-bad {
  background: var(--bad);
  color: var(--on-bad);
}
.me-count.is-info,
.group-label .count.is-info {
  background: var(--info);
  color: var(--surface);
}

/* The owner's spot check in My To-dos (MeSpotCheck.tsx): a day at a time, each photo as wide as
   the screen (on a phone, edge to edge), what it is under it, and Not right?. */
.sc {
  display: grid;
  gap: 22px;
}
.sc-day {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.sc-day-name {
  display: grid;
  gap: 2px;
  text-align: center;
}
.sc-day-name b {
  font-size: 19px;
}
.sc-day-name .muted {
  font-size: 14px;
}
.sc-group {
  display: grid;
  gap: 28px;
}
.sc-group > .group-label {
  margin-bottom: -16px;
}
.sc-photo {
  margin: 0;
  display: grid;
  gap: 10px;
}
.sc-img {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
}
.sc-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-cap {
  display: grid;
  gap: 3px;
  justify-items: start;
}
.sc-item {
  font-size: 18px;
}
.sc-meta,
.sc-check {
  font-size: 14px;
  color: var(--muted);
}
.sc-check.is-ok {
  color: var(--good);
  font-weight: 600;
}
.sc-check.is-back {
  color: var(--warn);
  font-weight: 600;
}
.sc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.sc-open {
  color: var(--ink-2);
  text-decoration: none;
}
.sc-shot-label,
.sc-second {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: -4px;
}
.sc-second {
  color: var(--info);
}
.sc-none {
  padding: 28px 12px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.sc-quote {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid var(--butter);
  background: var(--butter-soft);
  font-size: 15px;
  justify-self: stretch;
}
.sc-quote span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.sc-sent {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 4px;
  font-size: 14px;
  color: var(--info);
  font-weight: 600;
}
.sc-sent .icon {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
}
.sc-failed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 600;
}
.sc-empty {
  margin: 0;
  text-align: center;
}
@media (max-width: 480px) {
  .sc-img,
  .sc-none {
    margin: 0 -16px;
    width: calc(100% + 32px);
    border-radius: 0;
  }
}
.group-label .count.is-info {
  padding: 1px 7px;
  border-radius: 999px;
}
.me-alerts {
  display: grid;
  gap: 18px;
}
.me-alert.is-new {
  background: var(--info-soft);
  border-color: color-mix(in srgb, var(--info) 35%, var(--line));
}
.me-alert.is-opened {
  box-shadow: 0 0 0 2px var(--info);
}
.me-alert-kind {
  align-self: start;
}
.me-alert-when {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.me-alert-when .alert-new {
  font-family: var(--font-body);
}
.me-alert .me-item-actions .btn {
  white-space: nowrap;
}
.me-alerts-where {
  margin: 0;
}
/* An alert's thing on your list, just opened from it: lit up a moment. */
.me-item.is-flash {
  box-shadow: 0 0 0 2px var(--info);
  animation: alert-opened 1.6s ease-out 1;
}
/* Make it a to-do. */
.alert-todo-text {
  min-height: 88px;
  font-size: 17px;
}
.alert-todo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.alert-todo-kind button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.alert-todo-for {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.alert-todo-for .select {
  min-height: 40px;
  max-width: 200px;
}

/* A list opened from the spot check email: the item it's about, highlighted. */
.run-item.is-focus {
  background: var(--butter-soft);
  border-radius: var(--r-md);
  box-shadow: 0 0 0 2px var(--butter);
}
.run-off {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.run-off:hover,
.run-off:focus-visible {
  color: var(--bad);
}
.run-off .icon {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------------ notes to whoever did it (coaching.ts) */

/* The back end: what was said about an item, under it in a run, and Not right?. */
.run-coach {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding: 6px 10px;
  border-left: 3px solid var(--butter);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--butter-soft);
}
.run-coach.is-after {
  border-left-color: var(--line-strong);
  background: var(--surface-2);
}
.run-coach-text {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.run-coach-text .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: var(--butter-ink);
}
.run-coach.is-after .run-coach-text .icon {
  color: var(--muted);
}
.run-coach-meta {
  font-size: 13px;
  color: var(--muted);
}
.run-coach-remove {
  font-size: 13px;
}
.coach-about {
  display: flex;
  gap: 12px;
  align-items: center;
}
.coach-about > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.coach-photo {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.coach-text {
  min-height: 96px;
}
.coach-hint {
  margin: 0;
}

/* A note's thread, like texts (ui/thread.tsx): theirs on the left, yours on the right. */
.thread {
  display: grid;
  gap: 6px;
}
.thread-msg {
  justify-self: start;
  max-width: 85%;
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 16px 16px 16px 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.thread-msg.is-mine {
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  background: var(--info-soft, #e3edf8);
  border-color: color-mix(in srgb, var(--info) 30%, transparent);
}
.thread-msg.is-note {
  background: var(--butter-soft);
  border-color: color-mix(in srgb, var(--butter) 60%, transparent);
}
.thread-who {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.thread-text {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.thread-about {
  display: flex;
  gap: 12px;
  align-items: center;
}
.thread-photo {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.reply-box {
  display: grid;
  gap: 8px;
}
.reply-text {
  min-height: 64px;
}
.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.coach-reply-btn {
  justify-self: start;
}
.item-coach .thread {
  margin: 2px 0 0 24px;
}
.item-coach .thread-text {
  font-size: 15px;
}
.run-coach .thread {
  margin-top: 4px;
}
.run-coach .reply-box {
  margin-top: 4px;
}
.coach-left-reply {
  font-size: 14px;
  color: var(--info);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* The iPad: the card on Today until they're read, the notes when they sign in, and on the item. */
.coach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-color: var(--butter);
  background: var(--butter-soft);
}
button.coach-card:hover {
  border-color: var(--butter-ink);
}
.coach-card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--butter);
  color: #3d2c00;
}
.coach-card-body {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.coach-card-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}
.coach-card-read {
  flex: none;
}
.coach-notes {
  display: grid;
  gap: 16px;
}
.coach-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.coach-note-photo {
  flex: none;
  width: 112px;
  height: 112px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.coach-note-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coach-note-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.coach-note-item {
  font-size: 18px;
}
.coach-note-text {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--butter);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--butter-soft);
  font-size: 19px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.coach-gotit {
  min-width: 180px;
}
.item-coach {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.item-coach p {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 8px 10px;
  border-left: 4px solid var(--butter);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--butter-soft);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.item-coach .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--butter-ink);
}
@media (max-width: 600px) {
  .coach-note-photo {
    width: 84px;
    height: 84px;
  }
  .coach-note-text {
    font-size: 17px;
  }
}
/* The back end's Alerts: the notes left, and how each is going. */
.coach-left {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.coach-left h3 {
  margin: 0;
  font-size: 15px;
}
.coach-left-row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  width: 100%;
}
button.coach-left-row:hover {
  border-color: var(--line-strong);
}
.coach-left-text {
  overflow-wrap: anywhere;
}
.coach-left-meta {
  font-size: 13px;
}
.coach-left-state {
  font-size: 13px;
  font-weight: 600;
  color: var(--warn);
}
.coach-left-state.is-seen {
  color: var(--info);
}
.coach-left-state.is-done {
  color: var(--good);
}

/* My To-dos, the owner's: what's on someone else is still there, quieter, with whose it is. */
.me-item.is-theirs {
  background: var(--surface-2);
}
.me-item.is-theirs .me-item-title {
  color: var(--ink-2);
}
.me-item-from.is-theirs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}
.me-item-from.is-theirs .icon {
  width: 14px;
  height: 14px;
}

/* My To-dos: yearly reminders (core yearly.ts): Every year when adding, and the list of them all. */
.me-yearly {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.me-yearly .select,
.me-yearly .input {
  min-height: 36px;
  width: auto;
  max-width: 220px;
}
.me-yearly-next {
  font-size: 14px;
}
.me-yearly-list-toggle {
  justify-self: start;
}
.me-yearly-list .me-item.is-finished {
  opacity: 1;
  background: var(--surface-2);
}
.me-check.is-yearly {
  display: grid;
  place-items: center;
  border-color: var(--line);
  color: var(--muted);
}
.me-check.is-yearly .icon {
  width: 16px;
  height: 16px;
}
.me-yearly-remove.is-sure {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
}

/* ------------------------------------------------------------------ protocols: read and sign */

/* Waiting on Today until they've signed. */
.proto-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border-color: color-mix(in srgb, var(--info) 45%, var(--line));
  background: var(--info-soft);
}
.proto-card-open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.proto-card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--info);
  color: var(--surface);
}
.proto-card-body {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.proto-card-name {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.proto-card-sub {
  font-size: 14px;
  color: var(--ink-2);
}
.proto-card-act {
  flex: none;
}

/* One, full screen. */
.proto-run {
  display: grid;
  gap: 16px;
  align-content: start;
}
.proto-run .run-head h1 {
  font-size: 30px;
  overflow-wrap: anywhere;
}
.proto-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 15px;
  color: var(--muted);
}
.proto-body {
  gap: 14px;
}
.proto-text {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.proto-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.proto-photo {
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.proto-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proto-sign {
  gap: 18px;
}
.proto-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
  counter-reset: proto-step;
}
.proto-steps > li {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 46px;
  counter-increment: proto-step;
}
.proto-steps > li::before {
  content: counter(proto-step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-3);
  font-weight: 700;
  font-family: var(--font-mono);
}
.proto-steps > li.is-done::before {
  content: '✓';
  background: var(--good);
  color: var(--on-good);
}
.proto-understand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.proto-understand input {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 1px 0 0;
  accent-color: var(--good);
}
.proto-understand b {
  font-size: 18px;
}
.proto-understand .hint {
  display: block;
  margin-top: 4px;
}
.proto-step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
}
/* The signature: paper-white in dark mode too (it's kept as a picture). */
.sigpad {
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 2.2 / 1;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}
.proto-selfie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.proto-selfie img,
.proto-selfie-empty {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  object-fit: cover;
}
.proto-selfie-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.proto-problem {
  margin: 0;
  font-weight: 600;
  color: var(--bad);
}
.proto-gotit {
  justify-self: start;
  min-width: 220px;
}
.proto-signed {
  justify-self: stretch;
}

/* Who's done it (managers). */
.proto-team {
  gap: 12px;
}
.proto-team-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}
.proto-team-head .tally {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-2);
}
.proto-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.proto-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.proto-person.is-left {
  opacity: 0.7;
}
.proto-person-steps,
.proto-mark {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.proto-thumb {
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #ffffff;
}
.proto-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proto-thumb.is-sig img {
  object-fit: contain;
}

/* What pops up as they sign in. */
.proto-pop {
  display: grid;
  gap: 12px;
}
.proto-pop-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.proto-pop-name {
  font-size: 19px;
  overflow-wrap: anywhere;
}
.proto-pop-text {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.proto-pop-body {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.proto-pop-from {
  font-size: 14px;
}
.proto-pop-item .btn {
  justify-self: start;
  margin-top: 4px;
}

/* To look back at, on Today. */
.proto-rail {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}
.proto-rail-icon {
  display: grid;
  place-items: center;
  color: var(--info);
}
.proto-rail-name {
  display: block;
  overflow-wrap: anywhere;
}
.proto-all {
  justify-self: start;
}

/* A quick reminder, made on an iPad. */
.proto-quick-box {
  min-height: 96px;
  font-size: 18px;
}

/* The back end's Protocols page. */
.proto-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.proto-row:first-child {
  border-top: 0;
}
.proto-row:hover {
  background: var(--surface-2);
}
.proto-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.proto-row-main b {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.proto-row-main .muted {
  font-size: 14px;
}
.proto-row-steps {
  font-size: 13px;
  color: var(--ink-2);
}
.proto-row-progress {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
@media (max-width: 600px) {
  .proto-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .proto-row-progress {
    grid-row: 2;
  }
}
.proto-detail .page-head h1 {
  overflow-wrap: anywhere;
}
.proto-sheet {
  gap: 12px;
}
.proto-grid {
  display: grid;
}
.proto-grid-row {
  display: grid;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.proto-grid-row.is-head {
  padding: 8px 0;
  border-top: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.proto-grid-row.is-left {
  opacity: 0.7;
}
.proto-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.proto-cell-when {
  font-size: 13px;
}
.proto-unsign.is-sure {
  color: var(--bad);
}
/* On a phone, each person's steps go under their name. */
@media (max-width: 760px) {
  .proto-grid-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .proto-grid-row.is-head {
    display: none;
  }
  .proto-grid-row > [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
}
.proto-editor .panel h2 {
  font-size: 20px;
}
.proto-editor-actions {
  justify-content: flex-start;
}
.proto-people {
  max-height: 260px;
  overflow: auto;
}

/* Printing a protocol: the sheet as it was on paper, without the app around it. */
@media print {
  .side,
  .no-print,
  .sync-pill,
  .toast,
  .demo-bar {
    display: none !important;
  }
  body {
    background: #ffffff;
  }
  .admin {
    display: block;
  }
  .page {
    padding: 0;
  }
  .panel {
    border-color: #999999;
    break-inside: avoid;
  }
  .proto-grid-row {
    break-inside: avoid;
  }
}
