.events-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.cal-shell{
  padding:14px;
}

.hidden{
  display:none !important;
}

.mobile-only{
  display:none;
}

@media (max-width: 740px){
  .mobile-only{
    display:flex;
    gap:8px;
    margin-bottom:10px;
  }
}

.cal-shell .cal-toggle{
  opacity:.85;
}

.cal-shell .cal-toggle.is-active{
  opacity:1;
  box-shadow: inset 0 0 0 2px rgba(var(--accent-1-rgb), .35);
}

/* Month header/nav rows */
.cal-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.cal-nav-title{
  font-weight:700;
}

/* Month grid */
.cal-dow-row{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:4px;
}

.cal-dow{
  font-size:.85rem;
  text-align:center;
}

.cal-cell{
  min-width:0;
  overflow:hidden;
  padding:10px;
  min-height:90px;
}

.cal-cell-head{
  display:flex;
  justify-content:space-between;
  gap:4px;
}

.cal-daynum{
  font-weight:700;
}

.cal-empty{
  margin-top:10px;
  font-size:.86rem;
}

/* Event chips */
.cal-events{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.cal-event{
  font-size:.86rem;
  line-height:1.2;
  padding:6px 7px;
  border-radius:10px;
  background: rgba(var(--accent-1-rgb), .06);
  border: 1px solid rgba(var(--accent-1-rgb), .16);
}

.cal-event-title{
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.cal-event-desc{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.cal-more{
  margin-top:6px;
  padding:6px 8px;
  font-size:.8rem;
  border-radius:10px;
}

/* Week view */
.week-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
}

.week-day{
  min-width:0;
  border:1px solid rgba(0,0,0,.06);
  border-radius:14px;
  padding:10px;
  background:#fff;
}

.week-day-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
  margin-bottom:8px;
}

.week-dow{
  font-weight:800;
}

.week-date{
  color:var(--muted);
  font-weight:700;
}

.week-events{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* List view */
.cal-list-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.cal-list-time{
  white-space:nowrap;
}

.cal-link{
  text-decoration:underline;
}

@media (max-width: 740px){
  .week-grid{
    grid-template-columns:1fr;
  }

  .mini.cal-cell{
    padding:8px !important;
    min-height:70px !important;
  }

  .mini.cal-cell .cal-events{
    max-height:none;
    overflow:visible;
    padding-right:0;
  }

  .cal-event-desc{
    display:none;
  }

  .cal-event{
    font-size:.6rem;
  }

  .mini{
    padding:8px !important;
    min-height:70px !important;
  }
}

.cal-empty-small{
  margin-top:8px;
}

.cal-list-card{
  padding:12px;
}

.cal-list-row{
  display:flex;
  justify-content:space-between;
  gap:4px;
  flex-wrap:wrap;
}

.cal-list-title{
  font-weight:700;
  line-height:1.25;
}

.cal-link{
  text-decoration:underline;
}

.cal-list-time{
  white-space:nowrap;
}