/* Shifty. The look follows Apple's Human Interface Guidelines: system type,
   semantic colours that adapt to light and dark, grouped lists, sheets, a
   sidebar on wide screens and a tab bar on narrow ones. Content first, chrome
   quiet. */

:root {
  color-scheme: light dark;

  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --label: #000000;
  --secondary: rgba(60, 60, 67, 0.68);
  --tertiary: rgba(60, 60, 67, 0.36);
  --separator: rgba(60, 60, 67, 0.22);
  --fill: rgba(120, 120, 128, 0.14);
  --fill-strong: rgba(120, 120, 128, 0.24);
  --tint: #2f55d4;
  --tint-soft: rgba(47, 85, 212, 0.12);
  --on-tint: #ffffff;
  --red: #c4271b;
  --red-soft: rgba(215, 0, 21, 0.1);
  --orange: #a84a00;
  --orange-soft: rgba(255, 149, 0, 0.16);
  --green: #34c759;
  --material: rgba(246, 246, 250, 0.82);
  --scrim: rgba(0, 0, 0, 0.32);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.18);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --control: 36px;
  --side: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-raised: #2c2c2e;
    --label: #ffffff;
    --secondary: rgba(235, 235, 245, 0.66);
    --tertiary: rgba(235, 235, 245, 0.34);
    --separator: rgba(84, 84, 88, 0.7);
    --fill: rgba(120, 120, 128, 0.26);
    --fill-strong: rgba(120, 120, 128, 0.4);
    --tint: #8ea2ff;
    --tint-soft: rgba(142, 162, 255, 0.2);
    --on-tint: #0a0f2e;
    --red: #ff6f66;
    --red-soft: rgba(255, 69, 58, 0.2);
    --orange: #ffb04a;
    --orange-soft: rgba(255, 159, 10, 0.2);
    --green: #30d158;
    --material: rgba(28, 28, 30, 0.8);
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}

@media (pointer: coarse) {
  :root {
    --control: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 1.0625rem/1.35 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
  opacity: 0.38;
}

a {
  color: var(--tint);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tint) 60%, transparent);
  outline-offset: 2px;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.tint {
  color: var(--tint);
}

.secondary {
  color: var(--secondary);
}

.footnote {
  font-size: 0.8125rem;
  line-height: 1.38;
  color: var(--secondary);
}

.noscript {
  padding: 2rem;
}

/* ── Shell: sidebar, toolbar, content, tab bar ─────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0.75rem 1rem;
  background: var(--material);
  border-right: 1px solid var(--separator);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.marmot {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.steps {
  display: grid;
  gap: 2px;
}

.step {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  border-radius: 9px;
  text-align: left;
}

.step .icon {
  color: var(--tint);
}

.step:hover {
  background: var(--fill);
}

.step.current {
  background: var(--tint);
  color: var(--on-tint);
}

.step.current .icon,
.step.current .step-status {
  color: inherit;
}

.step.current .step-status {
  opacity: 0.86;
}

.step-text {
  display: grid;
  min-width: 0;
}

.step-title {
  font-weight: 600;
}

.step-status {
  font-size: 0.8125rem;
  color: var(--secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-foot {
  margin-top: auto;
  padding: 0 0.5rem;
  display: grid;
  gap: 0.5rem;
}

.save-state {
  font-size: 0.8125rem;
  color: var(--secondary);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.8125rem;
}

.links {
  align-items: center;
}

/* The one spot of colour outside the tint: coffee is yellow everywhere. */
.link-coffee {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.8rem 0 0.65rem;
  border-radius: 999px;
  background: #ffdd00;
  color: #1c1c1e;
  font-weight: 600;
}

.link-coffee:hover {
  text-decoration: none;
  background: #f5d400;
}

.link-coffee .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.toolbar h1 {
  flex: 1;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.toolbar-actions .button {
  margin-left: 0.35rem;
}

.content {
  width: 100%;
  max-width: 46rem;
  padding: 0.5rem clamp(1rem, 4vw, 2rem) 4rem;
}

.content:has(.roster-controls) {
  max-width: none;
}

.tabbar {
  display: none;
}

/* ── Controls ──────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--control);
  padding: 0 0.95rem;
  border-radius: 10px;
  background: var(--tint);
  color: var(--on-tint);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.button .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.button.gray {
  background: var(--fill);
  color: var(--tint);
}

.button.plain {
  background: none;
  color: var(--tint);
  font-weight: 400;
  font-size: 1.0625rem;
  padding: 0 0.5rem;
}

.button.plain.strong {
  font-weight: 600;
}

.button.destructive,
.icon-button.destructive {
  color: var(--red);
}

.button:not(:disabled):active,
.icon-button:not(:disabled):active {
  opacity: 0.6;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--control);
  height: var(--control);
  flex: none;
  border-radius: 9px;
  color: var(--tint);
}

.icon-button:not(:disabled):hover {
  background: var(--fill);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.stepper output {
  min-width: 2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--secondary);
  white-space: nowrap;
}

.stepper button {
  width: calc(var(--control) + 6px);
  height: calc(var(--control) - 4px);
  background: var(--fill);
  font-size: 1.25rem;
  line-height: 1;
}

.stepper button:first-of-type {
  border-radius: 8px 0 0 8px;
  order: 2;
  margin-right: -0.55rem;
}

.stepper button:last-of-type {
  border-radius: 0 8px 8px 0;
  order: 3;
  border-left: 1px solid var(--separator);
}

.switch {
  flex: none;
  width: 51px;
  height: 31px;
  padding: 2px;
  border-radius: 999px;
  background: var(--fill-strong);
  transition: background-color 0.2s;
}

.switch span {
  display: block;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.switch[aria-checked="true"] {
  background: var(--green);
}

.switch[aria-checked="true"] span {
  transform: translateX(20px);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--fill);
  max-width: 100%;
}

.segmented button {
  min-height: calc(var(--control) - 6px);
  padding: 0 0.85rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.segmented button.on {
  background: var(--surface-raised);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  font-weight: 600;
}

.days {
  width: 100%;
  max-width: 21rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.day {
  aspect-ratio: 1;
  max-width: 2.75rem;
  width: 100%;
  border-radius: 50%;
  background: var(--fill);
  font-size: 0.9375rem;
  font-weight: 500;
}

.day.on {
  background: var(--tint);
  color: var(--on-tint);
  font-weight: 600;
}

/* ── Grouped lists ─────────────────────────────────────────────────────── */

.group {
  margin-top: 1.6rem;
}

.group > h2 {
  margin: 0 var(--side) 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--secondary);
}

.group > .footnote {
  margin: 0.45rem var(--side) 0;
}

.rows {
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.row {
  position: relative;
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem var(--side);
  text-align: left;
}

.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--side);
  right: 0;
  height: 1px;
  background: var(--separator);
  transform: scaleY(0.5);
  transform-origin: top;
}

.row-button:hover {
  background: var(--fill);
}

.row-button > .icon:last-child {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--tertiary);
}

.row-icon {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 7px;
}

.row-icon.tint {
  background: var(--tint);
  color: var(--on-tint);
}

.row-icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.row-text {
  flex: 1;
  min-width: 0;
  display: grid;
}

.row-text strong {
  font-weight: 500;
}

.row-text small {
  font-size: 0.8125rem;
  color: var(--secondary);
}

.row-value {
  font-size: 0.9375rem;
  color: var(--secondary);
  text-align: right;
}

.field > label,
.field > span:first-child {
  flex: 0 1 auto;
}

.field > input,
.field > select {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 2rem;
  border: 0;
  background: none;
  text-align: right;
  color: var(--label);
}

.field > input:first-child {
  text-align: left;
}

.field > input::placeholder {
  color: var(--tertiary);
}

.field > input:focus-visible,
.field > select:focus-visible {
  outline: none;
}

.field:focus-within {
  box-shadow: inset 3px 0 0 var(--tint);
}

.field > select {
  appearance: none;
  color: var(--tint);
  text-align-last: right;
}

.field > .stepper,
.field > .switch {
  margin-left: auto;
}

.unfit small {
  color: var(--orange);
}

.always {
  margin: 0 var(--side);
  display: grid;
  gap: 0.3rem;
  color: var(--secondary);
  font-size: 0.9375rem;
  list-style: disc;
  padding-left: 1.1rem;
}

/* ── Messages ──────────────────────────────────────────────────────────── */

.banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  padding: 0.7rem 0.6rem 0.7rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.banner p {
  flex: 1;
  padding-top: 0.05rem;
}

.banner .icon-button {
  margin: -0.4rem -0.2rem;
  color: inherit;
}

.banner.error {
  background: var(--red-soft);
  color: var(--red);
}

.banner.warning {
  background: var(--orange-soft);
  color: var(--orange);
}

.issues {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.issue {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--orange);
}

.issue.error {
  color: var(--red);
}

.issue .icon {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
}

.empty {
  max-width: 26rem;
  margin: clamp(2rem, 12vh, 7rem) auto 0;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  text-align: center;
}

.empty .marmot {
  width: 4.5rem;
  height: 4.5rem;
}

.empty h2 {
  font-size: 1.375rem;
  font-weight: 700;
}

.empty p {
  color: var(--secondary);
}

.empty .button,
.empty .button-row {
  margin-top: 0.6rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.spacer {
  flex: 1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.next {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
}

.next .icon {
  width: 0.9rem;
  height: 0.9rem;
}

/* ── Welcome ───────────────────────────────────────────────────────────── */

.welcome {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem var(--side);
}

.welcome-card {
  width: 100%;
  max-width: 27rem;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  text-align: center;
}

.welcome-card .marmot {
  width: 5.5rem;
  height: 5.5rem;
}

.welcome-card h1 {
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--secondary);
  max-width: 24rem;
}

.welcome-card .rows,
.welcome-card .banner {
  width: 100%;
  margin-top: 0.6rem;
}

.welcome-card .row {
  min-height: 3.75rem;
}

.welcome-card .links {
  justify-content: center;
  margin-top: 0.4rem;
}

/* ── Roster ────────────────────────────────────────────────────────────── */

.roster-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}

.print-title {
  display: none;
}

.board {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.board-day {
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.7rem var(--side) 0.2rem;
}

.board-day h3 {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--secondary);
}

.weekday {
  font-weight: 700;
  color: var(--label);
}

.closed {
  padding: 0.6rem 0 0.7rem;
  color: var(--tertiary);
  font-size: 0.9375rem;
}

.board-shift {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: start;
  padding: 0.6rem 0;
}

.board-shift + .board-shift {
  border-top: 1px solid color-mix(in srgb, var(--separator) 55%, transparent);
}

.shift-name {
  font-weight: 600;
  font-size: 0.9375rem;
  grid-column: 1;
}

.shift-time {
  grid-column: 1;
  font-size: 0.8125rem;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.places {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.place {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: calc(var(--control) - 4px);
  max-width: 100%;
  padding: 0 0.65rem;
  border-radius: 8px;
  background: var(--fill);
  font-size: 0.9375rem;
}

.place span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place:hover {
  background: var(--fill-strong);
}

.place .icon {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--secondary);
}

.place.open {
  background: var(--orange-soft);
  color: var(--orange);
  font-weight: 600;
}

.place.broken {
  background: var(--red-soft);
  color: var(--red);
}

.place.broken .icon {
  color: inherit;
}

.roster-note {
  margin-top: 1rem;
  max-width: 40rem;
}

.table-scroll {
  margin-top: 1rem;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--surface);
}

.people-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.people-table th,
.people-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--separator) 60%, transparent);
  white-space: nowrap;
}

.people-table tbody tr:last-child > * {
  border-bottom: 0;
}

.people-table thead th {
  font-weight: 400;
  color: var(--secondary);
}

.people-table tbody th,
.people-table thead th:first-child {
  position: sticky;
  left: 0;
  background: var(--surface);
  font-weight: 600;
}

.people-table tbody th span,
.people-table tbody th small {
  display: block;
}

.people-table tbody th small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.duty {
  display: grid;
}

.duty + .duty {
  margin-top: 0.35rem;
}

.duty strong {
  font-weight: 500;
}

.duty small {
  font-size: 0.75rem;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.duty.broken strong {
  color: var(--red);
}

/* ── Sheets ────────────────────────────────────────────────────────────── */

.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  animation: fade 0.2s ease-out;
}

.sheet {
  position: absolute;
  top: 6vh;
  left: 50%;
  width: min(34rem, calc(100% - 2rem));
  max-height: 88vh;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  .sheet {
    background: var(--surface);
  }

  .sheet .rows {
    background: var(--surface-raised);
  }
}

.sheet-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--separator) 60%, transparent);
}

.sheet-bar h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.sheet-bar > :first-child {
  justify-self: start;
}

.sheet-bar > :last-child {
  justify-self: end;
}

.sheet-body {
  overflow-y: auto;
  padding: 0.25rem var(--side) calc(1.75rem + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

.sheet-body > .group:first-of-type {
  margin-top: 1rem;
}

.sheet-lead {
  margin: 0.9rem var(--side) 0;
  color: var(--secondary);
  font-size: 0.9375rem;
}

.sheet-body > .footnote {
  margin: 1.2rem var(--side) 0;
}

.sheet-foot {
  margin-top: 1.6rem;
  display: flex;
  justify-content: center;
}

@keyframes rise {
  from {
    transform: translate(-50%, 24px);
    opacity: 0;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ── Narrow screens: tab bar instead of sidebar, sheets from the bottom ── */

@media (max-width: 54rem) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .toolbar h1 {
    font-size: 1.5rem;
  }

  .toolbar-actions .button span {
    display: none;
  }

  .toolbar-actions .button {
    padding: 0;
    width: var(--control);
  }

  .roster-actions .spacer {
    display: none;
  }

  .roster-actions .button {
    padding: 0 0.7rem;
  }

  .content {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 0.3rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom));
    background: var(--material);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--separator);
  }

  .tab {
    display: grid;
    justify-items: center;
    gap: 0.1rem;
    min-height: 3rem;
    padding: 0.2rem 0;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--secondary);
  }

  .tab .icon {
    width: 1.55rem;
    height: 1.55rem;
  }

  .tab.current {
    color: var(--tint);
  }

  .sheet {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 94dvh;
    transform: none;
    border-radius: 14px 14px 0 0;
    animation-name: rise-narrow;
  }

  @keyframes rise-narrow {
    from {
      transform: translateY(40%);
      opacity: 0.6;
    }
  }
}

/* ── Wide screens: the week as seven columns ───────────────────────────── */

@media (min-width: 70rem) {
  .board {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
  }

  .board-day {
    padding: 0.7rem 0.7rem 0.3rem;
  }

  .board-shift {
    grid-template-columns: minmax(0, 1fr);
  }

  .places {
    grid-column: 1;
    grid-row: auto;
    flex-direction: column;
    margin-top: 0.4rem;
  }

  .place {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Paper ─────────────────────────────────────────────────────────────── */

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --label: #000;
    --secondary: #333;
    --fill: transparent;
    --separator: #999;
  }

  .sidebar,
  .toolbar,
  .tabbar,
  .actions,
  .roster-controls,
  .next,
  .issues,
  .banner,
  .roster-note,
  .sheet-layer {
    display: none !important;
  }

  .shell {
    display: block;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .print-title {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .board {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    font-size: 0.75rem;
  }

  .board-day {
    border: 1px solid #999;
    border-radius: 6px;
    padding: 0.35rem;
    break-inside: avoid;
  }

  .board-shift {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.3rem 0;
  }

  .places {
    grid-column: 1;
    grid-row: auto;
    flex-direction: column;
    gap: 0;
  }

  .place {
    min-height: 0;
    padding: 0;
    font-size: 0.75rem;
    color: #000;
    background: none;
  }

  .place .icon {
    display: none;
  }

  .table-scroll {
    overflow: visible;
  }

  .people-table {
    font-size: 0.75rem;
  }
}
