#calendarView #calendarAccountScope {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#calendarView #calendarAccountForecastStrip {
  min-width: 0;
  max-width: 100%;
}

#calendarView .calendar-checking-risk {
  grid-column: 1 / -1;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
}

body[data-theme="midnight"] #calendarView .calendar-checking-risk {
  color: #fdba74;
}

#calendarView .account-forecast-tile.is-secondary-cash {
  opacity: 0.92;
}

#calendarView .account-forecast-tile.is-risk {
  box-shadow: inset 3px 0 0 #c2410c;
}

@media (max-width: 1279px) {
  #calendarView #calendarAccountScope {
    display: flex;
    flex-wrap: wrap;
  }
}

#calendarView .calendar-unassigned-warning,
#calendarView .calendar-scope-empty {
  margin: 0 0 10px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

body[data-theme="midnight"] #calendarView .calendar-unassigned-warning,
body[data-theme="midnight"] #calendarView .calendar-scope-empty {
  color: #fdba74;
}

@media (min-width: 721px) {
  #calendarView .calendar-account-balances {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1px 8px;
    margin-top: auto;
    padding-top: 3px;
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  #calendarView .calendar-account-balance {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1px 3px;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    font-variant-numeric: tabular-nums;
  }

  html[data-calendar-text="compact"] #calendarView .calendar-account-balance {
    font-size: 8px;
  }

  html[data-calendar-text="large"] #calendarView .calendar-account-balance {
    font-size: 11px;
  }

  #calendarView .calendar-account-identity {
    display: flex;
    align-items: baseline;
    gap: 3px;
    min-width: min(7.5ch, 100%);
    flex: 1 1 0;
    max-width: 100%;
    overflow: hidden;
    color: #3a435c;
  }

  #calendarView .calendar-account-name {
    min-width: 0;
    flex: 1 1 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #calendarView .calendar-account-suffix {
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
  }

  #calendarView .calendar-account-initials {
    font-weight: 800;
  }

  #calendarView .calendar-account-balance[data-person-color="teal"] .calendar-account-initials { color: #0b5f58; }
  #calendarView .calendar-account-balance[data-person-color="purple"] .calendar-account-initials { color: #6d28d9; }
  #calendarView .calendar-account-balance[data-person-color="amber"] .calendar-account-initials { color: #8a4506; }
  #calendarView .calendar-account-balance[data-person-color="blue"] .calendar-account-initials { color: #1e40af; }
  #calendarView .calendar-account-balance[data-person-color="rose"] .calendar-account-initials { color: #9f1239; }

  #calendarView .calendar-account-amount,
  #calendarView .calendar-account-arrow {
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
  }

  #calendarView .calendar-account-amount.is-up,
  #calendarView .calendar-account-amount.is-up .calendar-account-arrow { color: #065f40; }

  #calendarView .calendar-account-amount.is-down,
  #calendarView .calendar-account-amount.is-down .calendar-account-arrow { color: #9a2e26; }

  #calendarView .calendar-account-amount.is-flat { color: #3a435c; }

  #calendarView .calendar-account-risk {
    flex: none;
    font-weight: 800;
    line-height: 1;
  }

  #calendarView .calendar-account-balance.is-risk .calendar-account-identity {
    font-weight: 800;
  }

  #calendarView .calendar-account-balance.is-balance-collapsed {
    display: none;
  }

  #calendarView .calendar .day:has(.calendar-account-balances) > .day-projected-balance,
  #calendarView .calendar .day:has(.calendar-account-balances) > .day-total {
    margin-top: 0;
  }

  body[data-theme="midnight"] #calendarView .calendar-account-identity,
  body[data-theme="midnight"] #calendarView .calendar-account-amount.is-flat {
    color: #aeb5d0;
  }

  body[data-theme="midnight"] #calendarView .calendar-account-balance[data-person-color="teal"] .calendar-account-initials { color: #5eead4; }
  body[data-theme="midnight"] #calendarView .calendar-account-balance[data-person-color="purple"] .calendar-account-initials { color: #c4b5fd; }
  body[data-theme="midnight"] #calendarView .calendar-account-balance[data-person-color="amber"] .calendar-account-initials { color: #fbbf24; }
  body[data-theme="midnight"] #calendarView .calendar-account-balance[data-person-color="blue"] .calendar-account-initials { color: #93c5fd; }
  body[data-theme="midnight"] #calendarView .calendar-account-balance[data-person-color="rose"] .calendar-account-initials { color: #fda4af; }

  body[data-theme="midnight"] #calendarView .calendar-account-amount.is-up,
  body[data-theme="midnight"] #calendarView .calendar-account-amount.is-up .calendar-account-arrow { color: #6ee7b7; }

  body[data-theme="midnight"] #calendarView .calendar-account-amount.is-down,
  body[data-theme="midnight"] #calendarView .calendar-account-amount.is-down .calendar-account-arrow { color: #fca5a5; }
}

@media (max-width: 720px) {
  #calendarView .calendar-account-balances {
    display: none;
  }
}

.calendar-account-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
