/* Planning history stays visible without fading text below readable contrast. */
@media screen {
  .planning-day-detail .planning-detail-row.history-complete {
    background: #f5f7fa;
    color: #465775;
    border-color: #dce3ef;
    border-left-color: #afbbcf;
  }
  .planning-day-detail .planning-detail-row.history-complete :is(.planning-kind,.planning-meta,.muted) {
    color: #536580;
  }
  .planning-detail-row.history-complete .planning-row-actions > button:not(.danger) {
    color: #425a82;
    border-color: #c8d3e4;
  }
  .planning-history-status {
    display: inline-flex;
    align-items: center;
    gap: .32em;
    padding: 5px 8px;
    margin: auto 0;
    border-radius: 7px;
    background: #e7edf5;
    color: #425575;
    font-size: .86rem;
    font-weight: 650;
    white-space: nowrap;
  }
  .planning-history-status [aria-hidden] { font-weight: 750; }
  .planning-history-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 8px;
    margin: 0;
  }
  .planning-history-totals > div {
    display: grid;
    align-content: start;
    gap: 2px;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid #d6e0ef;
    border-radius: 9px;
    color: #355277;
    background: #f4f7fd;
  }
  .planning-history-totals > .arrival { color: #275e47; background: #eff8f2; }
  .planning-history-totals > .departure { color: #8a4829; background: #fff6ef; }
  .planning-history-totals > .history-done-count { color: #425575; background: #edf1f7; }
  .planning-history-totals dt { font-size: .79rem; font-weight: 650; }
  .planning-history-totals dd {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 6px;
    margin: 0;
  }
  .planning-history-totals dd > b {
    font-size: 1.16rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
  }
  .planning-history-totals dd > small { font-size: .72rem; }
  .planning-day-events .planning-count.history-complete,
  .planning-day-events .planning-count.history-done-count {
    color: #425575;
    background: #eef2f8;
  }
  .planning-day-events .planning-count.history-done-count { border: 1px solid #d7e1ef; }
  .planning-month-day.history-complete:not(.selected):not(.search-hit) { background: #f2f5fa; }
  .planning-month-day .planning-month-counts {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0 4px;
    line-height: 1.2;
    color: #425575;
  }
  .planning-month-day .planning-month-counts[hidden],
  .planning-month-count-legend[hidden] { display: none; }
  .planning-month-counts > span { white-space: nowrap; }
  .planning-month-counts > .month-done { font-weight: 720; }
  .planning-month-count-legend {
    margin: 7px 0 0;
    font-size: .76rem;
    color: #4d607c;
  }
  @media(max-width: 640px) {
    .planning-history-totals { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .planning-month-day .planning-month-counts { max-width: 100%; }
  }
}
