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

.btn.small,
.btn.ghost.small {
  padding: 7px 10px;
  font-size: 12px;
}

.child-chip {
  position: relative;
}

.child-edit {
  appearance: none;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
}

.child-age {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,217,102,.16);
  border: 1px solid rgba(255,217,102,.26);
  color: #fff3bd;
  font-size: 11px;
  font-weight: 800;
}

.task-id-field {
  display: none !important;
}

.family-goal {
  min-width: 300px;
  padding: 9px 15px 9px 10px;
}

.goal-donut {
  width: 72px;
  height: 72px;
  background:
    conic-gradient(#ffd966 calc(var(--goal-progress) * 1%), rgba(255,255,255,.14) 0),
    radial-gradient(circle at 50% 50%, rgba(255,217,102,.12), rgba(255,255,255,.04));
}

.goal-donut::after {
  inset: 10px;
}

.goal-donut-value {
  font-size: 15px;
}

.family-goal-title {
  font-size: 12px;
}

.family-goal-sub {
  font-size: 15px;
}

.goal-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}

.goal-preview-donut {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background:
    conic-gradient(#ffd966 72%, rgba(255,255,255,.14) 0),
    rgba(255,255,255,.08);
  color: #fff3bd;
  font-weight: 800;
}

.goal-preview-copy {
  display: grid;
  gap: 3px;
}

.goal-preview-copy span,
.template-item small,
.checkin-item small,
.small {
  color: var(--muted);
  font-size: 12px;
}

.schedule-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.schedule-row button {
  appearance: none;
  border: 1px solid rgba(31,24,48,.18);
  background: rgba(255,255,255,.38);
  color: #1f1830;
  border-radius: 8px;
  padding: 5px 0;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.day-add-task {
  appearance: none;
  width: 100%;
  margin: 0 0 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.day-add-task:hover {
  border-color: rgba(255,217,102,.42);
  background: rgba(255,217,102,.10);
}

.repeat-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.36);
  color: #1f1830;
  font-size: 10px;
  font-weight: 800;
}

.template-preview,
.checkin-list {
  display: grid;
  gap: 8px;
}

.template-item,
.checkin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}

.checkin-item {
  justify-content: flex-start;
  cursor: pointer;
}

.checkin-item input {
  width: 22px;
  height: 22px;
  accent-color: #ffd966;
}

.checkin-item span {
  display: grid;
  gap: 2px;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sync-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}

.sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-head h4 {
  margin: 0 0 3px;
  font-size: 16px;
}

.sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sync-code {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255,217,102,.32);
  border-radius: 999px;
  background: rgba(255,217,102,.14);
  color: #fff3bd;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.sync-status {
  min-height: 16px;
  margin: 0;
}

.sync-status.ok {
  color: #bff3cc;
}

.sync-status.warn {
  color: #ffd966;
}

.sync-status.err {
  color: #ffb6bd;
}

.import-label {
  display: inline-flex;
  align-items: center;
}

.modal .card.wide {
  width: min(680px, 100%);
}

@media (max-width: 720px) {
  .week-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .family-goal {
    min-width: 100%;
  }

  .goal-donut {
    width: 62px;
    height: 62px;
  }

  .template-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .sync-grid {
    grid-template-columns: 1fr;
  }

  .sync-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
