:root {
  color-scheme: light;
  --text: #1f2933;
  --muted: #5f6c7b;
  --line: #d7dde4;
  --soft-line: #edf1f5;
  --surface: #ffffff;
  --page: #f5f7fa;
  --track: #fbfcfe;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
header {
  padding: 24px 28px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.2;
}
h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
p {
  margin: 0;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}
.meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}
details {
  margin-top: 14px;
  color: var(--muted);
}
details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}
details ul {
  columns: 2;
  margin: 10px 0 0;
  padding-left: 18px;
}
main {
  padding: 18px 28px 32px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
}
.mobile-legend {
  display: none;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: var(--muted);
  white-space: nowrap;
}
.swatch {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.day-section {
  margin: 0 0 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}
.day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  min-width: 900px;
}
.day-heading p {
  color: var(--muted);
  white-space: nowrap;
}
.timeline {
  min-width: 900px;
}
.time-axis,
.person-row {
  display: grid;
  grid-template-columns: 220px minmax(680px, 1fr);
  gap: 14px;
}
.time-axis {
  height: 28px;
  color: var(--muted);
  font-size: 12px;
}
.axis-track,
.track {
  position: relative;
}
.tick-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.person-row {
  min-height: 34px;
  border-top: 1px solid var(--soft-line);
}
.person-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  font-weight: 700;
}
.person-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track {
  min-height: 34px;
  background: var(--track);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--soft-line);
}
.bar {
  position: absolute;
  top: 6px;
  bottom: 6px;
  min-width: 2px;
  border-radius: 4px;
  color: white;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
.bar span {
  display: block;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 18px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-times {
  display: none;
}
.empty {
  color: var(--muted);
}
@media (max-width: 1000px) {
  header,
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  h1 {
    font-size: 22px;
  }
  .meta {
    gap: 6px;
  }
  .meta span {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 4px 8px;
    font-size: 12px;
  }
  details ul {
    columns: 1;
  }
  .desktop-legend {
    display: none;
  }
  .mobile-legend {
    display: block;
    margin: 0 0 12px;
  }
  .mobile-legend .legend {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }
  .legend-item {
    white-space: normal;
  }
  .day-section {
    padding: 12px;
    overflow-x: visible;
  }
  .day-heading {
    display: block;
    min-width: 0;
    margin-bottom: 10px;
  }
  .day-heading h2 {
    font-size: 16px;
  }
  .day-heading p {
    margin-top: 2px;
    font-size: 12px;
    white-space: normal;
  }
  .timeline {
    min-width: 0;
  }
  .time-axis,
  .person-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .time-axis {
    height: 22px;
    font-size: 10px;
  }
  .time-axis > div:first-child {
    display: none;
  }
  .axis-track {
    height: 22px;
  }
  .tick-label:nth-child(even) {
    display: none;
  }
  .tick-label:first-child {
    margin-left: 6px;
    transform: translateX(0);
  }
  .tick-label:last-child {
    margin-left: -6px;
    transform: translateX(-100%);
  }
  .person-row {
    min-height: 0;
    padding: 10px 0;
  }
  .person-name {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 0;
    font-size: 14px;
  }
  .person-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .mobile-times {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
  }
  .mobile-time-chip {
    flex: 0 0 auto;
    min-height: 22px;
    padding: 2px 6px;
    border: 1px solid #666;
    border-left-width: 4px;
    border-radius: 6px;
    background: #fbfcfe;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
  }
  .track {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
  }
  .bar {
    top: 8px;
    bottom: 8px;
    min-width: 6px;
  }
  .bar span {
    padding: 0;
    font-size: 0;
    line-height: 0;
  }
}
@media (max-width: 420px) {
  .meta span {
    flex-basis: 100%;
  }
  .person-name {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .mobile-times {
    grid-column: 2;
    justify-content: flex-start;
  }
}
@media print {
  body {
    background: white;
  }
  .day-section {
    break-inside: avoid;
  }
}
