/* Parent screens of M5: the review (#review=<id>), drafts on the family page, the device confirm. */
.child-row { flex-wrap: wrap; }
/* "Kind entfernen" (D89): its own line in the child's row; the question above the buttons. */
.child-remove { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.child-remove .form-msg { flex-basis: 100%; }
.device-confirm { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.device-confirm p { flex-basis: 100%; margin: 0; }
.drafts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.drafts h2, .review-deck { font-size: 1.25rem; margin: 0; }
.btn.small { padding: 10px 14px; font-size: 1rem; min-height: 44px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.review-check-all { margin: 0; padding: 10px 12px; border-radius: var(--r-btn); background: var(--accent-soft);
  color: var(--ink); font-weight: 700; }
.review-count { font-weight: 800; color: var(--bad); margin: 0; }
.review-count:empty { display: none; }
.review-body, .review-list { display: flex; flex-direction: column; gap: 10px; }
.review-item { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.review-item.flagged { border: 2px solid var(--yolk); }
.vocab-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
/* M5 review: the meanings are the longest cell ("verletzen; sich wehtun"). */
@media (min-width: 640px) {
  .vocab-cells { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .vocab-cells input { width: 100%; min-width: 0; }
}
.field select, .field textarea { font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; }
.field textarea { min-height: 4.5em; resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--bad); }
.issue { background: var(--bad-soft); border-radius: var(--r-btn); padding: 10px 12px; display: flex; flex-direction: column;
  gap: 6px; align-items: flex-start; }
.issue p { margin: 0; color: var(--ink); font-weight: 700; }
.issue.flag { background: var(--accent-soft); }
.read-cells { font-family: ui-monospace, monospace; font-weight: 600; overflow-wrap: anywhere; }
.review-pages summary { font-weight: 800; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.review-pages h3 { font-size: 1rem; margin: 12px 0 4px; }
.page-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; margin: 0; }
.review-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; }
.review-bar .unsaved { margin: 0; font-weight: 800; flex-basis: 100%; }
.review-bar .unsaved:empty, .review-msg:empty { display: none; }
.review-msg { flex-basis: 100%; font-weight: 700; }
.review-errors { margin: 4px 0 0; padding-left: 20px; color: var(--bad); }
.review-group { display: flex; flex-direction: column; gap: 10px; }
.review-group h2 { font-size: 1.15rem; margin: 8px 0 0; }
.parents-only { padding: 12px 16px; }
.review-approve { display: flex; flex-wrap: wrap; gap: 10px; flex-basis: 100%; }
.child-row .name .review-count { display: block; font-size: 1rem; }
.confusing { display: flex; justify-content: center; }
.confusing-thanks { margin: 0; color: var(--muted); font-weight: 700; text-align: center; }
.review-done { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.review-done p { margin: 0; font-weight: 700; }

/* Groups made by the parent (D71). Every control is at least 44 px high (UX rule 15). */
.groups-box { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.groups-box h3 { margin: 0; }
.groups-box p { margin: 0; }
.group-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding-top: 12px; border-top: 2px solid var(--line); }
.group-name { flex: 1 1 12rem; min-width: 0; }
.group-name input { width: 100%; min-width: 0; min-height: 44px; }
.group-count { min-width: 2.5rem; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 800; }
.group-actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.group-actions .btn { flex: 1 1 8rem; min-width: 0; }
.group-sure { flex: 1 1 100%; color: var(--bad); font-weight: 600; }
.group-sure:empty { display: none; }
.group-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding-top: 12px; border-top: 2px solid var(--line); }
.group-move { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 14px; position: sticky; top: 0; z-index: 2; }
.group-move .field { flex: 1 1 12rem; min-width: 0; }
.group-move select { width: 100%; min-width: 0; min-height: 44px; }
.group-pick { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; align-self: flex-start; }
.group-pick input { width: 24px; height: 24px; }
.group-photos { align-self: flex-start; text-decoration: none; }
.review-addition { font-weight: 800; margin: 0; }

/* "Sprache ändern" (D76), in the review and on the admin page; the admin's family rows. */
.lang-change { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lang-change-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-change-note p { margin: 0 0 6px; font-weight: 700; }
.lang-change-note:empty { display: none; }
.admin-family { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.admin-family p, .admin-deck p { margin: 0; }
.admin-family strong, .admin-ids { overflow-wrap: anywhere; }
.admin-decks { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.admin-decks:empty { display: none; }
.admin-deck { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 2px solid var(--line); }
.admin-families, .admin-log { display: flex; flex-direction: column; gap: 10px; }

/* The safety check's flags (D80): the reason, then the parent's decision. */
.issue.safety { border-left: 4px solid var(--bad); }
.safety-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.safety-sure { font-weight: 700; }
.review-pending { background: var(--accent-soft); color: var(--ink); border-radius: var(--r-btn); padding: 10px 12px; font-weight: 700; }
.field-hint { display: block; color: var(--muted); font-size: var(--fs-body); font-weight: 400; }
