.section-heading .family-auth-trigger {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #52687a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.section-heading .family-auth-trigger:focus-visible { outline: 2px solid #237ca8; outline-offset: 2px; }
.family-auth-icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card-chinese { --card-tone: #d9effb; --card-accent: #237ca8; }
.card-coming-soon { cursor: default; }
.card-status { margin: 7px 0 0; color: var(--card-accent); font-size: .82rem; font-weight: 600; }
.family-auth-dialog {
  width: min(100% - 24px, 520px);
  max-width: 520px;
  max-height: min(90dvh, 760px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 20px 70px #173b5640;
}
.family-auth-dialog::backdrop { background: #102d426e; }
.family-auth-panel { padding: 24px; }
.family-auth-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.family-auth-heading h2 { margin: 0; font-size: 1.35rem; }
.family-auth-heading button { min-width: 44px; min-height: 44px; padding: 6px 12px; }
.family-auth-description { margin-bottom: 18px; color: var(--muted); }
.family-auth-status-list { display: grid; gap: 10px; margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: var(--sky); }
.family-auth-status-list div { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 10px; }
.family-auth-status-list dt { color: var(--muted); }
.family-auth-status-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.family-auth-form { display: grid; gap: 10px; }
.family-auth-form label { font-weight: 700; }
.family-auth-form input { width: 100%; }
.family-auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.family-auth-actions .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.family-auth-actions [data-family-auth-logout] { background: #fff; color: var(--blue-dark); }
.family-auth-message { min-height: 1.65em; margin: 14px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.family-auth-message[data-state="error"] { color: var(--red); }
@media (hover: hover) {
  .section-heading .family-auth-trigger:hover { background: #f4f3ee; }
}
@media (max-width: 650px) {
  .section-heading { align-items: center; }
  .section-heading .family-auth-trigger { min-height: 44px; padding-inline: 10px; }
  .family-auth-panel { padding: 20px 16px; }
  .family-auth-status-list div { grid-template-columns: 1fr; gap: 2px; }
  .family-auth-actions { flex-direction: column; }
  .family-auth-actions button { width: 100%; }
}
