.profile-fields {
  align-items: start;
  gap: 13px 14px;
}

.profile-field-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 25px;
}

.profile-field-heading > label,
.profile-field-heading > span {
  color: #3f5247;
  font-size: 12px;
  font-weight: 800;
}

.profile-field-help {
  flex: none;
}

.profile-field-help > summary {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #397760;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.profile-field-help > summary::-webkit-details-marker {
  display: none;
}

.profile-field-help > summary:hover,
.profile-field-help[open] > summary {
  border-color: #dcece1;
  background: #eaf6ee;
  color: var(--green);
}

.profile-field-help > summary:focus-visible {
  outline: 2px solid #55bb98;
  outline-offset: 1px;
}

.profile-field-help p {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 4px) 0 auto 0;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #cde4d7;
  border-radius: 8px;
  background: #f3fbf6;
  box-shadow: 0 5px 12px #17382b16;
  color: #365e50;
  font-size: 12px;
  line-height: 1.45;
}

.profile-bedtime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.profile-bedtime input[type='time'] {
  min-inline-size: 0;
  padding-inline: 6px;
}

@supports selector(:has(*)) {
  .profile-bedtime:not(:has(option[value='time']:checked)) .profile-bedtime-time,
  .profile-bedtime:not(:has(option[value='custom']:checked)) .profile-bedtime-custom {
    display: none;
  }

  .profile-bedtime:has(option[value='flexible']:checked),
  .profile-bedtime:has(option[value='custom']:checked) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .profile-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .profile-fields .control {
    min-height: 43px;
    font-size: 16px;
  }
}
