/* ==========================================================================
   Ups N Downtown — volunteer desk
   Fonts, colours, base elements and .btn come from /tokens.css (the public
   site's design system; see public_site/DESIGN.md). This file is layout and
   app components only, and uses the shared tokens directly.

   The rule of the house: paper, ink and type do the work. Ornament lives in
   the header (ornament mark + harlequin band) and beside the page title.
   Coverage colour-coding everywhere: short = red-ink, covered = emerald
   outline, full = quiet.
   ========================================================================== */

body.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
}

.app h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.75rem); margin-bottom: 0.9rem; }
.app h2 { font-size: clamp(1.4rem, 1.25rem + 0.7vw, 1.7rem); margin-bottom: 0.75rem; }
.app h3 { font-size: 1rem; }
.app p { margin: 0 0 0.9rem; }
.app section { margin-bottom: 2.25rem; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 20; padding: 0.6rem 1rem; background: var(--pine); color: var(--cream); border-radius: var(--radius-sm); }
.skip-link:focus { left: 0.5rem; top: 0.5rem; color: var(--cream); }
.muted { color: var(--text-muted); }
.eyebrow {
  margin: 0 0 0.3rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--red-ink);
}
.lede { font-size: var(--text-lg); max-width: 60ch; }

/* ---- Header --------------------------------------------------------------- */
.app-header { background: var(--emerald); }
.app-header__inner {
  position: relative;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.6rem 1rem 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
}
.app-band {
  height: 12px;
  box-sizing: content-box;
  background: var(--cream-warm) url("/assets/motifs/harlequin-band.svg") center / 17.14px 12px repeat-x;
  border-block: 2px solid var(--pine);
}
.app-brand { display: inline-flex; align-items: center; gap: 0.65rem; min-height: 2.75rem; text-decoration: none; }
.app-brand__mark { flex: none; width: 2.1rem; height: auto; }
.app-brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.app-brand__name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; color: var(--cream); }
.app-brand__tag { margin-top: 0.2rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-light); }
.app-brand:hover .app-brand__name { color: var(--cream-warm); }

.app-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.app-nav form { margin: 0; }
.app-nav a,
.app-nav .link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--cream);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.app-nav a:hover,
.app-nav .link-button:hover { background: rgb(255 254 250 / 0.14); color: var(--cream); }
.app-nav a[aria-current="page"] {
  background: var(--cream);
  color: var(--pine);
  box-shadow: 0 3px 0 var(--pine);
}
.app-nav .link-button { color: var(--cream-warm); font-weight: 500; }

@media (max-width: 47.99rem) {
  /* brand + "Log out" on the top row, section tabs on their own row */
  .app-nav { flex: 1 1 100%; margin-inline: -0.35rem; padding-bottom: 0.3rem; }
  .app-nav form { position: absolute; top: 0.6rem; right: 0.65rem; }
  .app-nav a { padding-inline: 0.8rem; }
}

/* ---- Layout ----------------------------------------------------------------- */
.app-main { flex: 1; width: 100%; max-width: 68rem; margin: 0 auto; padding: 1.5rem 1rem 3.5rem; }
.app-main--narrow { max-width: 34rem; }
.app-main--medium { max-width: 46rem; }
.app-footer {
  padding: 1.1rem 1rem 1.4rem;
  border-top: 2px dotted var(--border);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.app-footer p { margin: 0; }
.app-footer a { display: inline-block; padding-block: 0.35rem; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.75rem 1.5rem; margin-bottom: 1.25rem; }
.page-head h1 { margin-bottom: 0.4rem; }
.page-head .lede { margin-bottom: 0; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.page-title::after {                       /* the one starburst per screen */
  content: "";
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.3em;
  vertical-align: 0.05em;
  background: url("/assets/motifs/starburst.svg") center / contain no-repeat;
}
.breadcrumb { margin-bottom: 0.75rem; font-size: var(--text-sm); }
.breadcrumb a { display: inline-block; padding-block: 0.6rem; }

.card {
  margin-bottom: 1.4rem;
  padding: 1.25rem;
  background: var(--cream-warm);
  border: 2px solid var(--pine);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard);
}
.card > :last-child { margin-bottom: 0; }
.card__title, .card h2 { color: var(--pine); }
.notice h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.1rem); }
.app .notice__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.notice--waiting { position: relative; padding-top: 1.5rem; }
.notice__art { float: right; width: 3.6rem; height: auto; margin: -0.25rem 0 0.5rem 1rem; }

/* ---- Buttons (base .btn is in tokens.css) ---------------------------------- */
.btn--block { display: flex; width: 100%; }
.btn--small { min-height: 2.75rem; padding: 0.45em 1.15em; font-size: var(--text-sm); white-space: nowrap; }
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;                    /* 44px tap target */
  padding: 0 0.25rem;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  color: var(--emerald);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button:hover { color: var(--red-ink); text-decoration-color: currentColor; }
.link-button--danger { color: var(--red-ink); text-decoration-color: color-mix(in srgb, var(--red-ink) 45%, transparent); }

/* ---- Badges, pills, fill dots ------------------------------------------------ */
.badge {
  display: inline-block;
  min-width: 1.45rem;
  padding: 0 0.4em;
  border-radius: var(--radius-pill);
  background: var(--red-ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45rem;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
}
.app-nav .badge { box-shadow: 0 0 0 1.5px var(--cream); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.22em 0.75em 0.22em 0.6em;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}
.pill::before { content: ""; flex: none; width: 0.9em; height: 0.9em; background: currentColor; }
.pill--short   { background: var(--status-need-bg);    color: var(--status-need-fg); }
.pill--covered { background: var(--status-covered-bg); color: var(--status-covered-fg); }
.pill--full    { background: var(--status-full-bg);    color: var(--status-full-fg); }
/* shape as well as colour: starburst = needs help, check = covered, dot = full */
.pill--short::before {
  -webkit-mask: url("/assets/motifs/starburst.svg") center / contain no-repeat;
          mask: url("/assets/motifs/starburst.svg") center / contain no-repeat;
  width: 1.05em; height: 1.05em;
}
.pill--covered::before { clip-path: polygon(8% 52%, 22% 38%, 40% 58%, 78% 14%, 93% 28%, 41% 86%); }
.pill--full::before { border-radius: 50%; width: 0.6em; height: 0.6em; }
.pill--role { background: var(--emerald); color: var(--cream); border-color: var(--emerald); padding-left: 0.75em; }
.pill--role::before { display: none; }

.spots { display: inline-flex; gap: 0.28rem; vertical-align: middle; margin-right: 0.45rem; }
.spots__dot { width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 2px solid #9aa691; background: transparent; }
.spots__dot--needed { border-color: var(--red-ink); border-style: dashed; }
.spots__dot--on { background: var(--emerald); border-color: var(--emerald); }

/* ---- Flash messages ------------------------------------------------------------ */
.flashes { margin-bottom: 1.1rem; }
.flash {
  margin: 0 0 0.7rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--pine);
  border-radius: var(--radius-md);
  background: var(--cream-warm);
  font-weight: 500;
}
.flash--success { background: var(--status-covered-bg); border-color: var(--status-covered-fg); color: #053d24; }
.flash--error   { background: var(--status-need-bg); border-color: var(--status-need-fg); color: #6e1a0b; }
.flash--warning, .flash--info { background: #fbe6b9; border-color: var(--gold-ink); }

/* ---- Forms ------------------------------------------------------------------------ */
.form h2 { margin-bottom: 1rem; }
.field { margin-bottom: 1.05rem; }
.field label { display: block; margin-bottom: 0.3rem; font-size: var(--text-sm); font-weight: 700; }
.optional { font-weight: 400; color: var(--text-muted); font-size: 0.9em; }
.app input:not([type="hidden"], [type="checkbox"], [type="radio"]),
.app select,
.app textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 1rem;                        /* 16px: no zoom-on-focus in iOS */
  color: var(--text);
  background: var(--cream);
  border: 2px solid var(--pine);
  border-radius: var(--radius-sm);
}
.app textarea { min-height: 5.5rem; }
.app input::placeholder, .app textarea::placeholder { color: #6f7d68; }
.app input:focus-visible, .app select:focus-visible, .app textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.field--error input, .field--error select, .field--error textarea { border-color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-ink); }
.app .field__help { margin: 0.3rem 0 0; font-size: var(--text-sm); color: var(--text-muted); }
.field > ul { margin: 0.35rem 0 0; padding-left: 1.15rem; font-size: var(--text-sm); color: var(--text-muted); }
.app .field__error, .app .form-errors { margin: 0.35rem 0 0; font-size: var(--text-sm); font-weight: 600; color: var(--status-need-fg); }
.field__error::before { content: "Error: "; font-weight: 700; }
.app .form-errors { margin-bottom: 1rem; padding: 0.7rem 0.9rem; background: var(--status-need-bg); border: 2px solid var(--status-need-fg); border-radius: var(--radius-sm); }
.form-errors p { margin: 0; }
.field--trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.app .form__fineprint { margin: 1.1rem 0 0; font-size: var(--text-sm); color: var(--text-muted); }
.form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0 1rem; }
.form__grid .field--note { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1rem; padding-top: 1rem; border-top: 2px dotted var(--border); }
.inline-form label { font-size: var(--text-sm); font-weight: 700; }
.inline-form select { flex: 1 1 12rem; width: auto; }
.app .inline-form + .field__help { margin-top: 0.5rem; }

/* ---- Login / landing ---------------------------------------------------------------- */
.auth { display: grid; gap: 2.25rem; align-items: start; padding-top: 0.75rem; }
.auth__intro { position: relative; margin-bottom: 0; }
.auth__intro .script { margin: 0 0 0.25rem; transform: rotate(-2deg); transform-origin: left center; }
.auth__intro h1 { font-size: clamp(2.2rem, 1.5rem + 3.4vw, 3.4rem); }
.auth__star { position: absolute; pointer-events: none; }
.auth__star--1 { right: 0.25rem; top: -0.5rem; }
.auth__star--2 { right: 3.25rem; top: 1.6rem; }
.auth__card { margin-bottom: 0; }
.app .auth__alt { margin-top: 1.1rem; text-align: center; }
.auth__alt a { display: inline-block; padding-block: 0.5rem; }
.app .steps { list-style: none; counter-reset: step; margin: 0 0 1.6rem; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  min-height: 2.25rem;
  margin-bottom: 0.9rem;
  padding: 0.3rem 0 0 3rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--emerald);
  color: var(--cream);
  box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
}
@media (min-width: 52rem) {
  .auth { grid-template-columns: 1.15fr 1fr; gap: 4rem; padding-top: 2.5rem; }
  .auth__star--1 { right: 1.5rem; }
  .auth__star--2 { right: 5rem; }
}

/* ==========================================================================
   SHIFT BOARD — the main volunteer screen
   ========================================================================== */
.my-shifts__list { list-style: none; margin: 0 0 0.9rem; padding: 0; }
.my-shifts__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0 1rem;
  min-height: 3rem;
  border-bottom: 2px dotted var(--border);
}
.my-shifts__list form { margin: 0; }
.my-shifts__when { flex: 1; min-width: 0; padding-block: 0.45rem; line-height: 1.35; }
.my-shifts__when strong { font-weight: 700; white-space: nowrap; }
.my-shifts__time { display: inline-block; white-space: nowrap; }
.my-shifts__list li > :last-child { flex: none; white-space: nowrap; }
.my-shifts__list li > .muted { font-size: var(--text-sm); }
.my-shifts .muted { font-size: var(--text-sm); }

/* Season at a glance: one chip per day, one mark per shift */
.glance { margin-bottom: 2rem; }
.glance__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
  margin-bottom: 0.6rem;
}
.glance__hint { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; color: var(--text-muted); }
.glance__days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.glance__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-height: 4.6rem;
  padding: 0.4rem 0.2rem 0.5rem;
  background: var(--cream);
  border: 2px solid var(--pine);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard-sm);
  color: var(--pine);
  text-decoration: none;
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
}
.glance__day:hover { color: var(--pine); background: var(--cream-warm); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--pine); }
.glance__dow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.glance__num { font-family: var(--font-display); font-size: 1.45rem; font-weight: 400; line-height: 1; }
.glance__marks { display: flex; gap: 0.22rem; margin-top: 0.35rem; }
.glance__mark { position: relative; display: block; width: 0.72rem; height: 0.72rem; flex: none; }
.glance__mark--short   { background: var(--red-ink); transform: rotate(45deg) scale(0.86); }          /* red diamond */
.glance__mark--covered { border: 2px solid var(--emerald); border-radius: 50%; }                      /* green ring */
.glance__mark--full    { background: #a9b3a1; border-radius: 50%; transform: scale(0.8); }           /* quiet dot */
.glance__mark--mine    { background: var(--emerald); border: 0; border-radius: 50%; transform: none; box-shadow: 0 0 0 2px var(--cream), 0 0 0 3.5px var(--orange); }
.app .glance__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.glance__key li { display: inline-flex; align-items: center; gap: 0.5em; }

/* Day groups */
.day { scroll-margin-top: 0.5rem; }
.day__title {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 -1rem 0.9rem;
  padding: 0.55rem 1rem 0.45rem;
  background: var(--cream);
  border-bottom: 2px solid var(--pine);
  color: var(--emerald);
}
.day__date { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.day__shifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.8rem 1rem; }

/* Shift card. Grid:  time    action
                      note    action
                      status  status
                      crew    crew      */
.shift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "time   action"
    "note   action"
    "status status"
    "crew   crew";
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0 0.6rem;
  padding: 0.7rem 0.8rem 0.8rem 1.05rem;
  background: var(--cream);
  border: 2px solid var(--pine);
  border-radius: var(--radius-md);
  box-shadow: inset 7px 0 0 var(--emerald);
}
.app .shift > *, .app .shift p { margin: 0; }
.shift__time {
  grid-area: time;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.15;
  color: var(--pine);
}
.shift__note { grid-area: note; font-size: var(--text-sm); font-style: italic; color: var(--text-muted); }
.shift__status { grid-area: status; padding-top: 0.45rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; }
.shift__status .spots { margin-right: 0; }
.shift__crew { grid-area: crew; padding-top: 0.4rem; font-size: var(--text-sm); }
.shift__action {
  grid-area: action;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  min-height: 2.75rem;
  font-size: var(--text-sm);
  text-align: right;
}
.shift__action form { margin: 0; }
.shift__in { font-weight: 700; color: var(--status-covered-fg); white-space: nowrap; }

/* short = the loud one: warm card, red edge, hard shadow, red button */
.shift--short { background: var(--cream-warm); box-shadow: inset 7px 0 0 var(--red-ink), var(--shadow-hard); }
/* covered = calm */
.shift--covered { box-shadow: inset 7px 0 0 var(--emerald); }
/* full = quietest */
.shift--full { background: transparent; border-color: var(--border); box-shadow: inset 7px 0 0 #a9b3a1; }
.shift--full .shift__time { color: var(--sage-ink); }
/* mine */
.shift--mine { background: var(--status-covered-bg); border-color: var(--emerald); box-shadow: inset 7px 0 0 var(--emerald), 4px 4px 0 var(--emerald); }
.shift--mine .shift__time { color: var(--pine); }

@media (max-width: 23.5rem) {
  .shift__time { font-size: 1.08rem; }
  .shift .btn--small { padding-inline: 0.9em; }
}
@media (min-width: 48rem) {
  .day__title { position: static; margin-inline: 0; padding-inline: 0; }
  .glance__days { grid-template-columns: repeat(auto-fill, minmax(3.9rem, 1fr)); }
}

/* ==========================================================================
   COORDINATOR
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin: 0 0 1.5rem; }
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 0.8rem 1rem 0.85rem;
  background: var(--cream-warm);
  border: 2px solid var(--pine);
  border-radius: var(--radius-md);
}
.stat dt { margin-top: 0.15rem; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.stat dd { margin: 0; font-family: var(--font-display); font-size: 2.3rem; line-height: 1.05; color: var(--pine); }
.stat dd small { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.stat--short { background: var(--status-need-bg); border-color: var(--status-need-fg); box-shadow: 4px 4px 0 var(--status-need-fg); }
.stat--short dd, .stat--short dt { color: var(--status-need-fg); }
.stat--covered dd { color: var(--emerald); }
@media (min-width: 48rem) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.table-wrap { overflow-x: auto; background: var(--cream); border: 2px solid var(--pine); border-radius: var(--radius-md); box-shadow: var(--shadow-hard); }
.app table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.app th, .app td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.app thead th {
  padding-block: 0.6rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--sage-ink);
  border-bottom: 2px solid var(--pine);
}
.app tbody tr:hover > td, .app tbody tr:hover > th[scope="row"] { background: var(--cream-warm); }
.app tbody:last-child tr:last-child > * { border-bottom: 0; }
.app td a, .app th a { display: inline-block; padding-block: 0.15rem; }

.schedule__day th {
  padding-block: 0.5rem;
  background: var(--cream-warm);
  border-top: 2px solid var(--pine);
  border-bottom: 1px solid var(--pine);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pine);
}
.schedule tbody:first-of-type .schedule__day th { border-top: 0; }
.schedule__row th { white-space: nowrap; font-weight: 700; font-size: 1rem; }
.schedule__row th small { font-weight: 400; white-space: normal; }
.schedule__row--short th:first-child { box-shadow: inset 6px 0 0 var(--red-ink); }
.schedule__row--past { opacity: 0.6; }
.schedule__coverage { white-space: nowrap; }
.schedule__manage { text-align: right; }

.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.9rem 1.5rem; margin-bottom: 0.9rem; }
.person__info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; overflow-wrap: anywhere; }
.person__info strong { font-size: var(--text-lg); }
.person__info a { display: inline-block; padding-block: 0.15rem; }
.person__note { font-style: italic; }
.person__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.people:not(.people--pending) .person { background: var(--cream); border-color: var(--border); box-shadow: none; }

.people-table th[scope="row"] { font-weight: 700; font-size: 1rem; }
.people-table .pill--role { margin-left: 0.3rem; }
.people-table__actions { text-align: right; }
.menu { position: relative; display: inline-block; text-align: left; }
.menu summary { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.25rem; cursor: pointer; color: var(--emerald); font-weight: 600; }
.menu summary:hover { color: var(--red-ink); }
.menu summary { list-style: none; gap: 0.35em; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 0.5em; height: 0.5em; margin-top: -0.25em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.menu[open] summary::after { transform: rotate(-135deg); margin-top: 0.2em; }
.menu form { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 0; }

.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.2rem 1rem; padding: 0.6rem 0; border-bottom: 2px dotted var(--border); }
.roster li > div { display: flex; flex-direction: column; overflow-wrap: anywhere; min-width: 0; }
.roster form { margin: 0; }
.roster li:last-child { border-bottom: 0; }
.roster__contact { font-size: var(--text-sm); }
.roster__contact a { display: inline-block; padding-block: 0.15rem; }
.card h2 .pill { margin-left: 0.4rem; vertical-align: 0.3em; }

/* Phones: tables become stacks of cards rather than scrolling sideways */
@media (max-width: 40rem) {
  .my-shifts__sep { display: none; }
  .my-shifts__time { display: block; }

  .schedule thead, .people-table thead { display: none; }

  .schedule tr.schedule__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.15rem 0.75rem;
    padding: 0.6rem 0.9rem 0.7rem 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .schedule tr.schedule__row > * { padding: 0; border: 0; background: none !important; }
  .schedule__row th { font-size: 1.05rem; }
  .schedule__coverage { grid-column: 1 / -1; grid-row: 2; }
  .schedule__crew { grid-column: 1 / -1; }
  .schedule__row--short th:first-child { box-shadow: none; }
  .schedule tr.schedule__row--short { box-shadow: inset 6px 0 0 var(--red-ink); }
  .schedule__manage { grid-column: 2; grid-row: 1; }
  .schedule__crew { padding-top: 0.3rem !important; }

  .people-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 0.75rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
  }
  .people-table tr > * { padding: 0; border: 0; background: none !important; }
  .people-table th[scope="row"] { grid-column: 1; }
  .people-table__count { grid-column: 2; grid-row: 1; color: var(--text-muted); white-space: nowrap; }
  .people-table__count::before { content: attr(data-label) ": "; }
  .people-table__contact { grid-column: 1; overflow-wrap: anywhere; }
  .people-table__actions { grid-column: 2; grid-row: 2; align-self: start; }
  .people-table .menu form { align-items: flex-end; text-align: right; }
  .people-table tbody tr:last-child { border-bottom: 0; }
}

/* Touch screens: stretch standalone links in lists, tables and notices to a
   44px-tall target */
@media (pointer: coarse), (max-width: 40rem) {
  .app .people-table__contact a,
  .app .person__info a,
  .app .roster__contact a,
  .app .schedule__manage a,
  .app .schedule__row th a,
  .app .breadcrumb a,
  .app .auth__alt a,
  .app .app-footer a,
  .app .flash a,
  .app p.muted a { display: inline-block; padding-block: 0.7rem; }
  .app .people-table__contact br { display: none; }
  .app .people-table__contact a { display: block; width: fit-content; }
  .app .flash:has(a), .app p.muted:has(a) { padding-block: 0.1rem; }
}
