.planner-mode {
  grid-template-columns: repeat(3, 1fr);
}

.family-settings {
  margin: 28px 0 8px;
  padding-top: 24px;
  border-top: 3px double var(--line);
}

.family-help {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.family-child {
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

.family-child:first-child {
  border-top: 0;
}

.child-main {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) 90px 130px 32px;
  gap: 7px;
  align-items: end;
}

.child-main label,
.custody-options label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 0.62rem;
}

.child-main input,
.child-main select,
.custody-options input,
.custody-options select {
  height: 36px;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 0 8px;
}

.remove-child {
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.custody-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 9px 0;
}

.custody-week {
  flex-direction: row !important;
  align-items: center;
  gap: 7px !important;
}

.custody-week input {
  width: 16px;
  height: 16px;
}

.child-details {
  margin: 8px 0 0;
  padding: 10px 0;
}

.child-details .planned-form {
  margin-top: 9px;
}

.child-period-list {
  margin-bottom: 0;
}

.third-party-block {
  margin-top: 8px;
}

.third-party-block .planned-form {
  grid-template-columns: 1fr 1fr auto;
}

.coverage-item {
  border-left: 3px solid #ad6b26;
  padding-left: 10px;
}

.family-care-highlight {
  box-shadow: inset 0 0 0 2px #ad6b26 !important;
}

.family-care-highlight::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 4px;
  height: calc(100% - 2px);
  background: #ad6b26;
}

.care-dot {
  background: #ad6b26;
}

.family-legend {
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .child-main {
    grid-template-columns: 1fr 85px 32px;
  }

  .child-main label:first-child {
    grid-column: 1 / -1;
  }

  .child-main label:nth-child(3) {
    grid-column: 1 / 3;
  }

  .custody-options {
    grid-template-columns: 1fr;
  }

  .third-party-block .planned-form {
    grid-template-columns: 1fr 1fr;
  }

  .third-party-block .planned-form button {
    grid-column: 1 / -1;
    height: 38px;
  }
}
