/* Work Calendar, v26. One accent, one hairline, one type scale.
   The month is the product: every other surface steps back so the dates and the names read first.
   Glass is a highlight and a lift on a solid surface. It never fades the fill.
   Screen rules come first. The print block at the end is carried over unchanged from v25. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: local('Inter'), local('Inter Variable');
}

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #05060a;
  --surface: #0e1014;
  --surface-2: #15171c;
  --surface-3: #1d2027;
  --canvas-ground: #080b11;
  --border: #23262d;
  --border-hi: #353943;
  --grid-line: #2a2e36;
  --edge: #f0f0f0;
  --text: #f0f0f0;
  --text-2: #a8a8b2;
  --text-3: #8b8b95;
  --accent: #14b8a6;
  --accent-ink: #04120f;
  --danger: #ff6961;
  --warn: #ff9f0a;
  --radius: 14px;
  --radius-sm: 10px;
  --si-t: env(safe-area-inset-top, 0px);
  --si-b: env(safe-area-inset-bottom, 0px);
  --si-l: env(safe-area-inset-left, 0px);
  --si-r: env(safe-area-inset-right, 0px);
  --pad: 12px;
  --glass: 1;
  --lg-x: 0.22;
  --lg-y: 0;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --dur-fast: 110ms;
  --dur-med: 230ms;
  --dur-slow: 360ms;
  --dur-exit: 220ms;
  --font: -apple-system, BlinkMacSystemFont, 'Inter Variable', system-ui, 'Segoe UI', Roboto, sans-serif;
  --tap: 44px;
  --head: 56px;
  --paper-w: 8.5in;
  --paper-h: 11in;
  --paper-inner-w: 7.6in;
  --paper-inner-h: 10.1in;
  --paper-margin: .45in;
}
html.light {
  color-scheme: light;
  --bg: #eef0f4;
  --surface: #fff;
  --surface-2: #f5f6f8;
  --surface-3: #e9ebf0;
  --canvas-ground: #eef0f4;
  --border: #e1e4ea;
  --border-hi: #c9ced7;
  --grid-line: #dadee5;
  --edge: #0f1419;
  --text: #0f1419;
  --text-2: #565b64;
  --text-3: #686d76;
  --accent-ink: #fff;
  --danger: #c81e1e;
  --warn: #b45309;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, [role="button"] { font: inherit; color: inherit; background: transparent; border: none; cursor: pointer; }
button:disabled { cursor: default; opacity: .38; }
input, select, textarea { font: inherit; color: inherit; }
html, body {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sr-only, #status-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Ground and weather ─────────────────────────────────────────────── */
.ground, .ground-scrim { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
@supports (height: 100lvh) { .ground, .ground-scrim { height: 100lvh; } }
.ground {
  background:
    radial-gradient(46% 34% at 12% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%),
    var(--canvas-ground);
}
html.light .ground {
  background:
    radial-gradient(46% 34% at 12% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 72%),
    var(--canvas-ground);
}
.ground-scrim { z-index: -2; background: radial-gradient(120% 90% at 50% 0%, transparent 0%, rgba(0, 0, 0, .28) 100%); }
html.light .ground-scrim { background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .2) 0%, rgba(238, 240, 244, .72) 100%); }
html.wx-on .ground-scrim { opacity: .35; }
#weather-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
#weather-glass { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }

/* ── Header ─────────────────────────────────────────────────────────── */
.top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: calc(var(--head) + var(--si-t));
  padding: var(--si-t) calc(var(--pad) - 4px + var(--si-r)) 0 calc(var(--pad) + 4px + var(--si-l));
  position: relative;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff calc((1 - var(--glass)) * 78%), transparent);
  transition: box-shadow var(--dur-med) var(--ease-out);
}
.brand { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  line-height: 1.2;
}
.eyebrow:hover { color: var(--accent); }
.word { font-size: 17px; font-weight: 720; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 0; flex: none; }
.icon-btn, .text-btn {
  min-width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--text-2);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.icon-btn svg { width: 20px; height: 20px; display: block; }
.icon-btn:active, .text-btn:active { transform: scale(.96); }
#btn-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 4px 4px 4px 0;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  position: relative;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
#btn-print::after { content: ''; position: absolute; inset: -4px 0; }
#btn-print svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
#btn-print:active { transform: scale(.96); }
#btn-settings { display: none; }
#btn-theme .icon-sun, html.light #btn-theme .icon-moon { display: none; }
html.light #btn-theme .icon-sun { display: block; }
.burger { position: relative; width: 18px; height: 14px; }
.burger span {
  position: absolute; left: 0; right: 0; height: 1.6px; border-radius: 2px; background: currentColor;
  transition: transform var(--dur-med) var(--ease-out), top var(--dur-med) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.burger span:nth-child(1) { top: 1px; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 11px; }
#btn-menu[aria-expanded="true"] .burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
#btn-menu[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
#btn-menu[aria-expanded="true"] .burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
#btn-menu[aria-expanded="true"], #btn-weather[aria-expanded="true"] { background: var(--surface-3); color: var(--text); }

/* ── Menus (Mortgage bounds; no staggered reveal) ───────────────────── */
.menu, .wx-menu, .month-pop {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff calc((1 - var(--glass)) * 72%), transparent),
    0 16px 40px rgba(0, 0, 0, calc(.16 + (1 - var(--glass)) * .28));
}
.menu, .wx-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: calc(var(--pad) + var(--si-r));
  width: min(280px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--si-t) - var(--si-b) - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  z-index: 50;
  transform-origin: top right;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), visibility 0s linear 0s, box-shadow var(--dur-med) var(--ease-out);
}
.menu::before, .wx-menu::before, .month-pop::before, .overlay-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(42% 36% at calc(var(--lg-x) * 100%) calc(var(--lg-y) * 100%), color-mix(in srgb, #fff calc((1 - var(--glass)) * 34%), transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, #fff calc((1 - var(--glass)) * 10%), transparent), transparent 22%);
  filter: blur(calc((1 - var(--glass)) * 2px));
}
.menu > *, .wx-menu > *, .month-pop > *, .overlay-card > * { position: relative; z-index: 1; }
html.light .menu::before, html.light .wx-menu::before, html.light .month-pop::before, html.light .overlay-card::before {
  background:
    radial-gradient(42% 36% at calc(var(--lg-x) * 100%) calc(var(--lg-y) * 100%), color-mix(in srgb, #0f1419 calc((1 - var(--glass)) * 14%), transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, #fff calc((1 - var(--glass)) * 40%), transparent), transparent 18%);
}
.menu:not(.open), .wx-menu:not(.open) {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--dur-exit) var(--ease-exit), transform var(--dur-exit) var(--ease-exit), visibility 0s linear var(--dur-exit);
}
.menu.open, .wx-menu.open { visibility: visible; opacity: 1; transform: none; }
.nav-item, .wx-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.nav-item.current { color: var(--text); }
.nav-badge { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--text-3); }
.nav-sep { color: var(--text-2); }
.nav-sep-chev { margin-left: auto; transition: transform var(--dur-fast) var(--ease-out); }
.nav-sep[aria-expanded="true"] .nav-sep-chev { transform: rotate(90deg); }
#nav-tools { display: flex; flex-direction: column; }
.nav-item.soon { color: var(--text-3); }
.menu :focus-visible, .wx-menu :focus-visible, .month-pop :focus-visible, .overlay-card :focus-visible { outline-offset: -2px; }
.wx-menu { width: min(320px, calc(100vw - 24px)); right: calc(56px + var(--si-r)); }
.wx-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 10px 4px;
}
.wx-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 8px; }
.chip {
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.chip[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.weather-preferences { position: static; visibility: visible; opacity: 1; width: 100%; padding: 12px 0 0; background: none; box-shadow: none; transform: none; }
.weather-preferences .wx-h { padding: 8px 0 4px; }
.weather-preferences .wx-row { padding: 4px 0 8px; }

/* ── Workspace ──────────────────────────────────────────────────────── */
.content-area {
  flex: 1;
  min-height: 0;
  overflow: visible;
  contain: layout style;
  display: flex;
  flex-direction: column;
  padding: 0 calc(var(--pad) + var(--si-r)) 0 calc(var(--pad) + var(--si-l));
}
.workspace-bar, .roster-head, #roster-search, #roster-no-match { display: none; }

/* Month bar: the month names itself at the left; Today and the arrows sit together at the right. */
.month-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  position: relative;
}
#month-label {
  order: 0;
  flex: 0 1 auto;
  min-width: 0;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: -6px;
  padding: 0 8px 0 6px;
  border-radius: 10px;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.03em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#month-label::after {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: translateY(-2px) rotate(45deg);
}
#btn-today {
  order: 1;
  flex: none;
  height: 34px;
  margin: 6px 4px 6px auto;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-hi);
  background-color: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  position: relative;
}
#btn-today::after { content: ''; position: absolute; inset: -5px 0; }
#btn-today:active { transform: scale(.96); }
#btn-prev { order: 2; margin-left: auto; }
#btn-today:not([hidden]) ~ #btn-prev { margin-left: 0; }
#btn-next { order: 3; margin-right: -8px; }
.month-bar .icon-btn { color: var(--text); }
.month-pop {
  position: absolute;
  top: calc(100% - 2px);
  left: -4px;
  width: min(288px, calc(100vw - 24px));
  padding: 8px;
  z-index: 30;
  overflow: hidden;
}
.month-pop:not(.open) { display: none; }
.year-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#month-pop-year { font-weight: 720; font-variant-numeric: tabular-nums; }
#month-pop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.empty-cue {
  flex: none;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-2);
}
.empty-cue strong { color: var(--text); font-weight: 680; }

.board {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
}

/* ── The month ──────────────────────────────────────────────────────── */
.grid-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--grid-line);
}
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.weekdays {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--grid-line);
}
.weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 0 7px;
}
.grid {
  flex: 1;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
  background: var(--grid-line);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.day {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 3px 3px;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
}
html.is-assigning .day { cursor: copy; }
.day-top { display: flex; align-items: center; gap: 3px; min-width: 0; }
.day .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  line-height: 1;
}
.day .mon {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-left: 2px;
}
.day.is-lead, .day.is-buffer { background: var(--surface-2); color: var(--text-2); }
.day.is-lead .num, .day.is-buffer .num { color: var(--text-3); font-weight: 560; }
.day.is-lead .mon + .num, .day.is-buffer .mon + .num { padding-left: 2px; }

/* Month edges: the owner's thick first/last bars, in the text colour. */
.day.is-month-start { box-shadow: inset 4px 0 0 var(--edge); }
.day.is-month-end { box-shadow: inset -4px 0 0 var(--edge); }
.day.is-month-start.is-month-end { box-shadow: inset 4px 0 0 var(--edge), inset -4px 0 0 var(--edge); }
.day.is-month-start .day-top { padding-left: 3px; }
/* On an inked day the bar keeps a hairline of paper beside it, so it never sinks into a dark ink. */
.day.is-ink.is-month-start { box-shadow: inset 4px 0 0 var(--edge), inset 6px 0 0 var(--surface); }
.day.is-ink.is-month-end { box-shadow: inset -4px 0 0 var(--edge), inset -6px 0 0 var(--surface); }
.day.is-ink.is-month-start.is-month-end { box-shadow: inset 4px 0 0 var(--edge), inset 6px 0 0 var(--surface), inset -4px 0 0 var(--edge), inset -6px 0 0 var(--surface); }

/* A day with one person wears that person's ink; two or more get stacked labels. */
.day.is-ink, .day.is-lead.is-ink, .day.is-buffer.is-ink { background: var(--ink); color: var(--ink-fg, var(--text)); }
.day.is-lead.is-ink, .day.is-buffer.is-ink { background: color-mix(in srgb, var(--ink) 62%, var(--surface)); }
.day.is-ink .num, .day.is-ink .mon, .day.is-lead.is-ink .num, .day.is-buffer.is-ink .num,
.day.is-lead.is-ink .mon, .day.is-buffer.is-ink .mon { color: inherit; }

.day.is-today .num,
.day.is-today.is-ink .num,
.day.is-today.is-lead.is-ink .num,
.day.is-today.is-buffer.is-ink .num { background: var(--accent); color: var(--accent-ink); }
.day.is-ink.is-today .num { box-shadow: 0 0 0 2px var(--surface); }

/* Selection: a 3px accent frame on every selected day. Empty days also take an accent wash;
   assigned days keep their ink so you can still see who is on them. */
.day.is-selected { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 1; }
.day.is-selected:not(.is-ink) { color: var(--text); background-color: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.day.is-selected.is-ink { box-shadow: inset 0 0 0 5px var(--surface); }
.day.is-selected.is-ink.is-month-start { box-shadow: inset 4px 0 0 var(--edge), inset 0 0 0 5px var(--surface); }
.day.is-selected.is-ink.is-month-end { box-shadow: inset -4px 0 0 var(--edge), inset 0 0 0 5px var(--surface); }
.day.is-selected .num { background: var(--accent); color: var(--accent-ink); border-radius: 6px; }
.day:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; z-index: 1; }
.day.is-selected:focus-visible { outline-width: 3px; }

.who {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin-top: 1px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.who-row {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  padding: 1px 3px;
  border-radius: 5px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-align: center;
}
.day.is-ink .who-row { background: transparent; color: inherit; padding: 0 2px; font-size: 14px; }
/* Calendar labels shrink to their available width instead of splitting names. */
.who-row .sn { display: block; overflow: hidden; white-space: nowrap; overflow-wrap: normal; }
.who-more { font-size: 11px; font-weight: 700; color: var(--text-2); text-align: center; }
.day.is-ink .who-more { color: inherit; opacity: .8; }
.dot {
  position: absolute;
  right: 4px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.day.is-flash { animation: none; }
.day:active:not(.is-selected):not(.is-ink) { background: color-mix(in srgb, var(--text) 7%, var(--surface)); }
.day.is-lead:active:not(.is-selected):not(.is-ink), .day.is-buffer:active:not(.is-selected):not(.is-ink) { background: color-mix(in srgb, var(--text) 7%, var(--surface-2)); }
.day.is-ink:active:not(.is-selected) { filter: brightness(.94); }
@media (hover: hover) {
  .day:hover:not(.is-selected):not(.is-ink) { background: color-mix(in srgb, var(--text) 4%, var(--surface)); }
  .day.is-lead:hover:not(.is-selected):not(.is-ink), .day.is-buffer:hover:not(.is-selected):not(.is-ink) { background: color-mix(in srgb, var(--text) 4%, var(--surface-2)); }
  .day.is-ink:hover:not(.is-selected) { filter: brightness(1.06); }
  html.is-assigning .day:hover:not(.is-selected) { outline: 2px dashed var(--accent); outline-offset: -3px; }
  .icon-btn:hover, .text-btn:hover:not(:disabled) { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
  #btn-print:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
  a.nav-item:hover, .nav-item.clickable:hover, .wx-opt:hover { background: var(--surface-3); }
  .chip:not([aria-checked="true"]):hover { color: var(--text); background: var(--surface-3); }
  .ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 6%, transparent); }
  .primary:hover:not(:disabled) { filter: brightness(1.06); }
  #month-label:hover, #btn-today:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
}

.note-pop { position: absolute; z-index: 5; display: flex; }
.note-pop input {
  width: 100%;
  min-height: 36px;
  font-size: 16px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
}
.type-pop {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  pointer-events: none;
}
#type-query { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
#type-match { font-size: 14px; font-weight: 700; }

.grid-scroll.is-from-right { animation: fromRight 180ms var(--ease-out); }
.grid-scroll.is-from-left { animation: fromLeft 180ms var(--ease-out); }
@keyframes fromRight { from { opacity: .45; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes fromLeft { from { opacity: .45; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ── Mode line: says what the next tap does, then messages, then the save state ── */
.mode-line {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  padding: 0 2px;
  font-size: 12.5px;
  font-weight: 560;
  line-height: 18px;
  color: var(--text-2);
}
#mode-text { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#mode-text.is-message { color: var(--text); font-weight: 650; }
.mode-line.is-armed #mode-text { color: var(--text); }
.mode-line.is-armed::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: -4px;
  border-radius: 50%;
  background: var(--accent);
}
#save-status { flex: none; color: var(--text-3); font-weight: 560; }
#save-status.is-private { color: var(--text-2); }
#save-status.is-dirty { color: var(--warn); font-weight: 650; }
#save-status.save-error { color: var(--danger); font-weight: 650; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 599px) {
  #save-status:not(.save-error):not(.is-private) { display: none; }
  #save-status.is-private:not(.is-dirty) { display: none; }
}

/* ── Person rail ────────────────────────────────────────────────────── */
.rail {
  position: relative;
  flex: none;
  display: flex;
  gap: 6px;
  align-items: stretch;
  height: var(--tap);
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
  touch-action: pan-x;
}
.rail::-webkit-scrollbar { display: none; }
#rail-list { display: flex; flex-direction: row; gap: 6px; min-width: 0; flex: none; }
.person {
  flex: none;
  min-width: 0;
  max-width: 180px;
  height: var(--tap);
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  scroll-snap-align: start;
  touch-action: manipulation;
  transition: box-shadow var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
}
.person .sn { font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .ct { margin-left: auto; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: inherit; opacity: .75; }
.person:active { filter: brightness(.92); }
/* Armed: an inset ring in the pill's own text colour and a check, so the ready person is unmistakable. */
.person.is-armed { outline: 2px solid currentColor; outline-offset: -5px; }
.person.is-armed::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Action bar ─────────────────────────────────────────────────────── */
.status {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: calc(56px + var(--si-b));
  padding: 6px calc(var(--pad) + var(--si-r)) calc(6px + var(--si-b)) calc(var(--pad) + var(--si-l));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.status > button {
  flex: 1 1 0;
  min-width: 0;
  height: var(--tap);
  padding: 0 8px;
  border-radius: 12px;
  border: 1px solid var(--border-hi);
  background-color: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.15;
}
@media (min-width: 375px) {
  .status > button { flex: 1 1 auto; padding: 0 6px; white-space: nowrap; }
}
.status > button.icon-only { flex: 0 0 var(--tap); padding: 0; color: var(--text); }
.status > button.icon-only svg { width: 19px; height: 19px; }
#btn-clear-month:active { color: var(--danger); }
html.is-empty #btn-add { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
#btn-add:active, #btn-clear-month:active { filter: brightness(.94); }

/* ── Sheets ─────────────────────────────────────────────────────────── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 10, 14, .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
}
.scrim.open { visibility: visible; opacity: 1; transition: opacity var(--dur-med) var(--ease-out), visibility 0s; }
.overlay {
  position: fixed;
  z-index: 70;
  left: 0; right: 0; bottom: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: transform var(--dur-med) var(--ease-out), visibility 0s linear 0s;
}
.overlay.open { visibility: visible; transform: none; }
.overlay:not(.open) { visibility: hidden; transition: transform var(--dur-exit) var(--ease-exit), visibility 0s linear var(--dur-exit); pointer-events: none; }
.overlay-card {
  position: relative;
  min-height: 0;
  max-height: min(86dvh, 760px);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--si-b);
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff calc((1 - var(--glass)) * 70%), transparent),
    0 -16px 36px rgba(0, 0, 0, calc(.12 + (1 - var(--glass)) * .2));
}
.grab {
  width: 36px; height: 4px; border-radius: 4px;
  background: var(--border-hi);
  margin: 8px auto 2px;
  flex: none;
  position: relative;
  touch-action: none;
}
.grab::before { content: ''; position: absolute; left: -48px; right: -48px; top: -14px; bottom: -10px; }
/* Every sheet header is the same three columns: the way out, the title, the commitment. */
.overlay-h {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(0, auto) minmax(72px, 1fr);
  align-items: center;
  gap: 6px;
  padding: 2px 10px 8px;
  flex: none;
  touch-action: none;
  border-bottom: 1px solid transparent;
}
.overlay-h h2 {
  grid-column: 2;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.overlay-h > :first-child { grid-column: 1; justify-self: start; }
.overlay-h > .overlay-end, .overlay-h > :last-child:not(h2) { grid-column: 3; justify-self: end; }
.overlay-start, .overlay-end { display: flex; align-items: center; gap: 6px; }
.overlay-h .ghost { border-color: transparent; color: var(--accent); font-weight: 600; padding: 0 10px; }
html.light .overlay-h .ghost { color: var(--accent); }
.overlay-h .primary { min-height: 36px; padding: 0 16px; border-radius: 999px; position: relative; }
.overlay-h .primary::after { content: ''; position: absolute; inset: -4px 0; }
#set-back[hidden] { display: inline-flex !important; visibility: hidden; }
#set-commit { min-height: 36px; padding: 0 16px; }
.sheet-body {
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 16px 22px;
  min-height: 0;
}
#settings-sheet .sheet-body { min-height: 0; flex: 1 1 auto; touch-action: pan-y; }
html:not(.no-motion) .set-view.is-enter { animation: setIn var(--dur-fast) var(--ease-out); }
@keyframes setIn { from { transform: translateX(10px); } to { transform: none; } }
#set-index { display: none; }
#set-appearance, #set-calendar, #set-print, #set-data, .roster-data {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
#set-data { border-bottom: 0; }
.set-view h3, .roster-data h3, .sheet-h {
  margin: 4px 0 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.owner-panel h3 { margin-top: 0; }
.sheet-h { margin-top: 14px; }
.sheet-h:first-of-type { margin-top: 2px; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span, .row-label { font-size: 13px; font-weight: 620; color: var(--text-2); }
.field input, .field select, .field textarea, #people-search, #day-search, .bulk-entry textarea {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.field input:focus, .field select:focus, .field textarea:focus, #people-search:focus, #day-search:focus, .bulk-entry textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.field input::placeholder, #people-search::placeholder, #day-search::placeholder, textarea::placeholder { color: var(--text-3); }
#people-search, #day-search { margin-bottom: 8px; }
.help { font-size: 13px; line-height: 1.45; color: var(--text-2); margin-bottom: 8px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-end { justify-content: flex-end; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
}
#set-motion, #set-haptics, #set-sub, #set-phones { min-width: 64px; }
.slider { width: 100%; accent-color: var(--accent); height: 44px; }
.slider-ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--text-3); margin-top: -6px; }
#glass-val { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 650; margin-left: 6px; }

/* Buttons */
.primary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.primary:active { filter: brightness(.92); }
.ghost {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-hi);
  font-weight: 620;
}
.ghost:active { background: color-mix(in srgb, var(--text) 10%, transparent); }
.danger { color: var(--danger); }
.primary.danger { background: var(--danger); color: #fff; }
html:not(.light) .primary.danger { color: #1a0605; }

/* Person form */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.swatch {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  font-size: 12px;
  font-weight: 650;
}
.swatch[aria-checked="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch.is-used::after {
  content: '';
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}
@media (min-width: 640px) { .swatches { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.ink-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; margin-top: 4px; }
#ink-name { font-size: 14px; font-weight: 680; }
.ink-custom { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 620; color: var(--text-2); min-height: 44px; }
#f-ink-color { width: 44px; height: 32px; padding: 0; border: none; background: transparent; border-radius: 8px; }
.ink-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 16px; }
.ink-previews > div { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.ink-previews > div > span:last-child { display: block; padding: 11px 8px; min-height: 44px; overflow-wrap: anywhere; text-align: center; font-size: 15px; font-weight: 700; border-radius: 10px; }
#ink-preview-print { color: #111; }
#f-hotkey-msg, #f-msg { color: var(--warn); min-height: 0; }
#f-msg.is-ok, #people-note.is-ok { color: var(--accent); font-weight: 600; }
.pending { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.pending span { font-weight: 650; min-width: 0; }
.pending .ghost { min-height: 36px; padding: 0 10px; }
#leave-ask, .ask {
  margin: 4px 0 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--border));
  background: color-mix(in srgb, var(--warn) 9%, var(--surface));
}
#leave-ask .help, .ask .help { color: var(--text); font-weight: 600; }
#person-actions { margin-top: 4px; }

/* Roster list */
#people-add { width: 100%; margin: 2px 0 12px; }
.person-edit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 6px;
  text-align: left;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
}
.person-edit:active { background: color-mix(in srgb, var(--text) 8%, transparent); }
.ink-dot { width: 12px; height: 12px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 16%, transparent); }
.person-edit-name { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.person-edit-nick { color: var(--text-3); font-size: 13px; font-weight: 600; }
@media (hover: hover) { .person-edit:hover { background: color-mix(in srgb, var(--text) 5%, transparent); } }
.bulk-entry { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--border); }
.bulk-entry summary { min-height: 44px; padding-block: 12px; cursor: pointer; font-weight: 620; }
.bulk-entry textarea { min-height: 120px; }
.owner-panel { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
#owner-controls { display: flex; flex-direction: column; gap: 8px; }
#owner-lock-confirm { display: flex; flex-direction: column; gap: 8px; }

/* Edit Day */
.day-names { display: flex; flex-direction: column; margin-bottom: 4px; }
.day-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.day-name-label { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.day-name .ghost { min-height: 36px; padding: 0 12px; color: var(--danger); border-color: transparent; position: relative; }
.day-name .ghost::after { content: ''; position: absolute; inset: -4px 0; }
.day-empty { padding: 6px 0 4px; }
.day-add { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.day-add-btn { display: inline-flex; align-items: center; gap: 8px; }

/* Clear Month */
.clear-warning { font-size: 15px; line-height: 1.5; color: var(--text); margin: 4px 0 18px; }

/* Print preview */
#preview-sheet .overlay-card { background: var(--surface-2); height: min(92dvh, 900px); max-height: min(92dvh, 900px); }
.preview-flag { margin: 0 16px 6px; font-size: 13px; color: var(--warn); font-weight: 600; }
.preview-frame {
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 8px 16px;
}

/* ── Wide screens ───────────────────────────────────────────────────── */
@media (min-width: 900px) {
  :root { --pad: 20px; }
  .board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 232px;
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: 14px;
    row-gap: 8px;
    padding-bottom: 12px;
  }
  html.is-empty .board { grid-template-columns: minmax(0, 1fr); }
  .grid-scroll { grid-column: 1; grid-row: 1; }
  .mode-line { grid-column: 1; grid-row: 2; }
  .rail {
    grid-column: 2;
    grid-row: 1 / span 2;
    height: auto;
    max-height: none;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    padding: 0 2px 0 0;
  }
  #rail-list { flex-direction: column; width: 100%; }
  .person { width: 100%; max-width: none; flex: none; }
  .day { padding: 6px 6px 5px; }
  .day .num { font-size: 15px; }
  .who-row { font-size: 13px; }
  .day.is-ink .who-row { font-size: 16px; }
  .word { font-size: 18px; }
  #month-label { font-size: 24px; }
  .status { justify-content: flex-start; }
  .status > button { flex: 0 0 auto; min-width: 116px; padding: 0 16px; }
  .status > button.icon-only { min-width: 0; }
  #btn-undo { margin-left: auto; }
  .overlay {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none;
    background: transparent;
    pointer-events: none;
  }
  .overlay.open { pointer-events: none; }
  .overlay-card {
    width: min(520px, calc(100vw - 48px));
    border-radius: 18px;
    max-height: min(80dvh, 720px);
    pointer-events: auto;
    transform: translateY(8px) scale(.985);
    opacity: 0;
    transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
  }
  .overlay.open .overlay-card { transform: none; opacity: 1; }
  .overlay:not(.open) .overlay-card { pointer-events: none; }
  .overlay-h { padding-top: 12px; }
  #preview-sheet .overlay-card { width: min(760px, calc(100vw - 48px)); }
  .grab { display: none; }
}
@media (min-width: 1100px) {
  .content-area { width: min(1120px, 100%); margin-inline: auto; }
  .status { padding-inline: max(calc(var(--pad) + var(--si-r)), calc((100vw - 1120px) / 2 + var(--pad))); }
  .top { padding-inline: max(calc(var(--pad) + var(--si-l)), calc((100vw - 1120px) / 2 + var(--pad))) max(calc(var(--pad) - 8px + var(--si-r)), calc((100vw - 1120px) / 2 + var(--pad) - 8px)); }
  .menu { right: max(calc(var(--pad) + var(--si-r)), calc((100vw - 1120px) / 2 + var(--pad))); }
  .wx-menu { right: max(calc(56px + var(--si-r)), calc((100vw - 1120px) / 2 + 56px)); }
}

/* ── Narrow phones ──────────────────────────────────────────────────── */
@media (max-width: 430px) {
  .word { font-size: 16px; }
  #month-label { font-size: 19px; }
}
@media (max-width: 389px) {
  :root { --pad: 10px; }
  .word { font-size: 15px; }
  .eyebrow { letter-spacing: .12em; }
  .top { gap: 4px; }
  #btn-print { padding: 0 10px; margin-right: 2px; }
  #btn-print span { display: none; }
  .icon-btn { min-width: 40px; }
  #month-label { font-size: 18px; }
  .weekdays span { font-size: 10px; letter-spacing: .04em; padding: 6px 0; }
  .day .num { font-size: 13px; min-width: 20px; height: 20px; }
  .day.is-ink .who-row { font-size: 13px; }
  .empty-cue { font-size: 13px; }
  .status { gap: 5px; }
  .status > button { font-size: 12.5px; padding: 0 5px; }
  .mode-line { font-size: 12px; }
}

/* ── Short landscape phones ─────────────────────────────────────────── */
@media screen and (max-height: 500px) {
  :root { --head: 44px; }
  .eyebrow { display: none; }
  .month-bar { min-height: 40px; height: 40px; }
  #btn-today { margin-block: 6px; height: 28px; }
  /* Rows are too short to stack a name under the date, so the name sits beside it. */
  .day { flex-direction: row; align-items: flex-start; gap: 3px; padding: 3px 3px 2px; }
  .day-top { flex: none; }
  .who { align-self: stretch; margin-top: 0; }
  .day .num { font-size: 12px; height: 18px; }
  .who-row, .day.is-ink .who-row { font-size: 11px; }
  .weekdays span { padding: 3px 0; }
  .board { gap: 4px; padding-bottom: 4px; }
  .mode-line { min-height: 14px; line-height: 14px; font-size: 11px; }
  .status { min-height: calc(52px + var(--si-b)); padding-block: 4px calc(4px + var(--si-b)); }
}

/* ── Motion ─────────────────────────────────────────────────────────── */
html.no-motion *, html.no-motion *::before, html.no-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Print. The preview scales a wrapper. The printed tree is a table, never a grid.
   @page owns the var(--paper-margin) margin. The sheet padding is screen-only so it is not applied twice. */
#print-root {
  position: relative;
  width: var(--paper-w);
  visibility: hidden;
  pointer-events: none;
}
#print-root.previewing { visibility: visible; }
.sheet {
  width: var(--paper-w);
  min-height: var(--paper-h);
  padding: var(--paper-margin);
  box-sizing: border-box;
  background: #fff;
  color: #000;
  position: relative;
}
.sheet-next { break-before: page; page-break-before: always; }
.p-body { width: var(--paper-inner-w); }
.boundary {
  position: absolute;
  left: var(--paper-margin);
  right: var(--paper-margin);
  top: calc(var(--paper-margin) + var(--paper-inner-h));
  border-top: 1px solid #111;
  height: 0;
}
.p-title {
  font-size: 22pt;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: #111;
  margin: 0 0 1pt;
  white-space: nowrap;
  overflow: hidden;
}
.p-sub {
  text-align: center;
  font-size: 13pt;
  font-weight: 750;
  margin: 0 0 6pt;
  color: #111;
  letter-spacing: -0.01em;
}
.p-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 2px solid #111;
}
.p-table th {
  font-size: 11pt;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4pt 0 5pt;
  border-right: 2px solid #111;
  border-bottom: 3px solid #111;
  color: #111;
  background: #fff;
}
.p-table td {
  height: 0.58in;
  vertical-align: top;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  padding: 2pt 3pt 2pt;
  overflow: hidden;
  color: #111;
  position: relative;
  background: #fff;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.p-table th:last-child,
.p-table td:last-child { border-right: none; }
.p-table tr:last-child td { border-bottom: none; }
.p-top { display: flex; justify-content: space-between; align-items: baseline; gap: 3pt; position: relative; z-index: 1; }
.p-num { font-size: 14pt; font-weight: 800; color: #111; line-height: 1; letter-spacing: -0.02em; }
.p-mon { font-size: 9pt; font-weight: 800; letter-spacing: .04em; color: #111; text-transform: uppercase; }
.p-cell.is-edge { background: #eceff3; }
.p-cell.is-edge .p-num { font-size: 11pt; font-weight: 750; color: #3f3f46; }
.p-cell.is-edge .p-mon { color: #111; }
.p-cell.is-month-start { box-shadow: inset 3px 0 0 #111; }
.p-cell.is-month-end { box-shadow: inset -3px 0 0 #111; }
.p-cell.is-month-start .p-top { padding-left: 5px; }
.p-cell.is-month-end .p-num { margin-right: 5px; }
.p-who {
  position: absolute;
  left: 2pt;
  right: 2pt;
  top: 18pt;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.p-who.is-split {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
}
.p-name {
  flex: none;
  width: 100%;
  max-width: 100%;
  font-size: var(--name, 20px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  text-align: center;
  color: #111;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 1px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.p-who.is-split .p-name {
  border-radius: 2px;
  padding: 1px 2px;
}
.p-more {
  font-size: 8pt;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: #111;
}
.p-note {
  position: absolute;
  left: 2pt;
  right: 2pt;
  bottom: 1pt;
  font-size: 8pt;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  color: #111;
  z-index: 1;
}
.p-dot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2pt;
  width: 5pt;
  height: 5pt;
  border-radius: 50%;
  background: #111;
  margin: 0 auto;
  z-index: 1;
}
.p-legend { margin-top: 8pt; }
.p-leg-h { font-size: 8pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 3pt; color: #111; }
.p-leg {
  display: flex;
  flex-wrap: wrap;
  gap: 3pt 14pt;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p-leg-row {
  flex: 1 1 calc((100% - (var(--cols, 1) - 1) * 14pt) / var(--cols, 1));
  max-width: calc((100% - (var(--cols, 1) - 1) * 14pt) / var(--cols, 1));
  min-width: 0;
  min-height: 16pt;
  display: flex;
  align-items: center;
  gap: 6pt;
  padding: 2pt 0;
  background: transparent;
  color: #111;
  overflow: visible;
}
.p-leg-chip {
  width: 9pt;
  height: 9pt;
  border-radius: 2pt;
  flex: none;
  border: 0.75pt solid #111;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.p-leg-name {
  overflow-wrap: anywhere;
  flex: 1 1 auto;
  font-weight: 750;
  font-size: 10pt;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  min-width: 0;
  color: #111;
}
.p-legend.is-dense .p-leg { gap: 1pt 12pt; }
.p-legend.is-dense .p-leg-row { min-height: 14pt; padding: 1pt 0; }
.p-legend.is-dense .p-leg-name {
  overflow-wrap: anywhere; font-size: 9pt; }
.p-leg-row.is-off .p-leg-name {
  overflow-wrap: anywhere; color: #444; }
.p-leg-phone {
  flex: none;
  font-size: 9.5pt;
  font-weight: 650;
  color: #111;
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.p-legend.is-dense .p-leg-phone { font-size: 9pt; }
.p-foot-wrap.cols-2 { display: flex; align-items: flex-start; gap: 12pt; }
.p-foot-wrap.cols-2 > .p-foot { flex: 1 1 0; min-width: 0; }
.p-foot { margin: 4pt 0 0; padding: 0; list-style: none; }
.p-foot-li { font-size: 8pt; line-height: 1.3; }
.p-foot-date { font-weight: 800; }

@page { size: letter; margin: .45in; }

/* #print-slot is a body child. Screen keeps it offstage. Print shows only that slot,
   at var(--paper-inner-w), with the @page margin supplying the var(--paper-margin). Never width:auto.
   Never break-inside:avoid on a cell. Never display:block on a hidden sheet. */
#print-slot {
  position: absolute;
  left: -10000px;
  top: 0;
  width: var(--paper-inner-w);
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

@media print {
  html, body {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body > *:not(#print-slot) { display: none !important; }
  #print-slot {
    display: block !important;
    position: static !important;
    left: auto !important;
    width: var(--paper-inner-w) !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }
  #print-root {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
    width: var(--paper-inner-w) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .sheet {
    width: var(--paper-inner-w) !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .sheet[hidden] { display: none !important; }
  .p-body { width: var(--paper-inner-w) !important; }
  .boundary { display: none !important; }
  .p-table, .p-table tr, .p-table td, .p-table th {
    break-inside: auto;
    page-break-inside: auto;
  }
  .sheet-next:not([hidden]) { break-before: page; page-break-before: always; }
}

html.is-printing, html.is-printing body {
  height: auto !important;
  overflow: visible !important;
  background: #fff !important;
}
html.is-printing body > *:not(#print-slot) { display: none !important; }
html.is-printing #print-slot {
  display: block !important;
  position: static !important;
  left: auto !important;
  width: var(--paper-inner-w) !important;
  height: auto !important;
  overflow: visible !important;
  background: #fff !important;
}
html.is-printing #print-root {
  visibility: visible !important;
  transform: none !important;
  width: var(--paper-inner-w) !important;
  position: static !important;
}
html.is-printing .sheet {
  width: var(--paper-inner-w) !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html.is-printing .sheet[hidden] { display: none !important; }
html.is-printing .p-body { width: var(--paper-inner-w) !important; }
html.is-printing .boundary { display: none !important; }




:root {--paper-w:8.5in;--paper-h:11in;--paper-inner-w:7.6in;--paper-inner-h:10.1in;--paper-margin:.45in}
/* Keep a full name and its phone together in a colored print card. */
.p-leg {gap:4pt}
.p-leg-row {flex:0 0 calc((100% - (var(--cols,4) - 1)*4pt)/var(--cols,4));max-width:calc((100% - (var(--cols,4) - 1)*4pt)/var(--cols,4));flex-direction:column;justify-content:center;gap:2pt;padding:4pt;min-height:24pt;border-radius:3pt;print-color-adjust:exact;-webkit-print-color-adjust:exact;color:#111}
.p-leg-name {flex:none;max-width:100%;width:100%;text-align:center;white-space:normal;overflow-wrap:anywhere;font-size:10pt;font-weight:700;line-height:1.2}
.p-leg-phone {margin:0;max-width:100%;font-size:9pt;font-weight:400}
.p-legend.is-dense .p-leg {gap:3pt}
.p-legend.is-dense .p-leg-row {flex-basis:calc((100% - (var(--cols,4) - 1)*3pt)/var(--cols,4));max-width:calc((100% - (var(--cols,4) - 1)*3pt)/var(--cols,4));min-height:20pt;padding:3pt;gap:1pt}


.p-name {display:block;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
@media print {
  .sheet {height:calc(var(--paper-inner-h) - 24px)!important;max-height:calc(var(--paper-inner-h) - 24px)!important;overflow:hidden!important}
  .p-body {width:var(--print-body-w,var(--paper-inner-w))!important}
}
html.is-printing .sheet {height:calc(var(--paper-inner-h) - 24px)!important;overflow:hidden!important}
html.is-printing .p-body {width:var(--print-body-w,var(--paper-inner-w))!important}
.person {touch-action:manipulation}
