.calendar-icon-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.calendar-icon-field legend {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 860;
  line-height: 1.25;
}

.calendar-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.calendar-icon-choice {
  position: relative;
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.calendar-icon-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calendar-icon-choice.selected {
  border-color: rgba(0, 140, 134, 0.38);
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-shadow: 0 0 0 2px rgba(0, 140, 134, 0.08);
}

.calendar-icon-choice:focus-within {
  outline: 2px solid rgba(0, 140, 134, 0.3);
  outline-offset: 2px;
}

.calendar-icon-choice .calendar-icon-preview {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: currentColor;
}

.calendar-icon-choice.selected .calendar-icon-preview {
  background: #ffffff;
}

.calendar-icon-choice .icon {
  width: 22px;
  height: 22px;
}

.calendar-icon-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 17px;
  height: 17px;
  display: none;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
}

.calendar-icon-choice.selected .calendar-icon-check {
  display: grid;
}

.calendar-icon-check .icon {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

.calendar-event-icon.custom {
  background: var(--surface-soft);
  color: var(--navy);
}

.calendar-detail-summary strong .icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -3px;
}

@media (max-width: 374px) {
  .calendar-icon-grid {
    gap: 7px;
  }
}
