:root {
  --ink: #1a1f1c;
  --soft: #4a554c;
  --line: #c5cdc4;
  --rule: #1f3326;
  --paper: #fff;
  --band: #f3f6f1;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: #e7ece4;
}

.print-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: #1e3d28;
  color: #f4f7ef;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.print-bar span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.print-bar-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.print-bar a {
  color: #e9f0df;
  font-weight: 600;
  text-decoration: none;
}

.print-bar button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  background: #d4a15a;
  color: #0f2418;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sheet {
  width: min(860px, calc(100% - 2rem));
  margin: 1.25rem auto 2.5rem;
  background: var(--paper);
  border: 1px solid #d5ddd2;
  border-radius: 12px;
  padding: 1.5rem 1.6rem 1.75rem;
  box-shadow: 0 16px 40px rgba(20, 40, 24, 0.1);
}

.sheet-header {
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rule);
}

.eyebrow {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--soft);
}

.sheet-header h1 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.1;
}

.sheet-header h1 span {
  font-weight: 500;
  font-size: 0.78em;
}

.intro {
  margin: 0;
  max-width: 40rem;
  color: var(--soft);
  line-height: 1.45;
}

.day-block {
  margin-top: 1.35rem;
  break-inside: avoid-page;
}

.day-block h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--rule);
}

.day-rule {
  height: 2px;
  margin: 0.35rem 0 0.85rem;
  background: linear-gradient(90deg, var(--rule), transparent 85%);
}

.shift {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.65rem;
  background: #fff;
  break-inside: avoid;
}

.shift:nth-child(odd) {
  background: var(--band);
}

.shift-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.time {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
}

.shift h3 {
  margin: 0.12rem 0 0.2rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--soft);
  font-size: 0.9rem;
}

.need {
  font-weight: 700;
  color: var(--ink);
}

.count {
  margin: 0;
  min-width: 2.6rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.name-lines {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.name-lines li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.45rem;
  align-items: end;
  min-height: 1.55rem;
}

.line-num {
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.filled-name {
  font-weight: 600;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
}

.blank-line {
  display: block;
  width: 100%;
  border-bottom: 1.5px solid #7f8a80;
  min-height: 1.15rem;
}

.info-only {
  margin: 0.45rem 0 0;
  color: var(--soft);
  font-style: italic;
}

.sheet-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.92rem;
}

.sheet-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .print-bar {
    align-items: stretch;
  }

  .print-bar-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media print {
  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .sheet {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .day-block {
    break-inside: auto;
  }

  .shift {
    break-inside: avoid;
    box-shadow: none;
  }

  .blank-line {
    border-bottom-color: #333;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
