/* Keep parallel day-view work lanes inside the phone screen.
   The lane width is divided automatically by the number of people. */
@media (max-width: 650px) {
  .day-calendar {
    padding: 14px;
    overflow: hidden;
  }

  .timeline-board {
    width: 100%;
    min-width: 0;
    grid-template-columns: 38px minmax(0, 1fr);
    overflow-x: hidden;
  }

  .timeline-lanes {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(var(--person-count), minmax(0, 1fr));
  }

  .timeline-lane {
    min-width: 0;
  }

  .timeline-lane-title {
    min-width: 0;
    padding: 0 3px;
    font-size: clamp(.62rem, 2.8vw, .78rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .timeline-band {
    left: 3px;
    right: 3px;
    min-width: 0;
    padding: 6px 5px;
    font-size: clamp(.62rem, 2.7vw, .76rem);
    overflow: hidden;
  }

  .timeline-band strong,
  .timeline-band span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .timeline-band .event-time,
  .timeline-band .event-person {
    font-size: clamp(.56rem, 2.4vw, .68rem);
    white-space: nowrap;
  }

  .time-label {
    right: 4px;
    font-size: .62rem;
  }

  .break-axis-label {
    right: 3px;
    font-size: .55rem;
  }

  /* Weekly view: always show all seven days at once on iPhone. */
  .week-calendar {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-x: hidden;
  }

  .week-day {
    min-width: 0;
    min-height: 340px;
    padding: 6px 3px;
    overflow: hidden;
  }

  .week-day-header {
    font-size: clamp(.62rem, 2.7vw, .76rem);
    line-height: 1.35;
    padding-bottom: 6px;
  }

  .week-day .blocked-label {
    font-size: clamp(.48rem, 2.1vw, .62rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .week-day .day-events {
    gap: 2px;
  }

  .week-day .event {
    min-width: 0;
    padding: 4px 2px;
    font-size: clamp(.48rem, 2vw, .6rem);
    overflow: hidden;
    overflow-wrap: anywhere;
  }

  .week-day .event-time,
  .week-day .event-person {
    font-size: clamp(.44rem, 1.8vw, .54rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Assignee headings should be plain text, not colored blocks. */
.timeline-lane-title {
  background: transparent !important;
  color: var(--ink) !important;
}
