.family-dialog {
  position: fixed;
  inset: 0;
  height: fit-content;
  width: min(640px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 1px solid #c9a56a66;
  border-radius: 8px;
  background: #101318;
  color: #eae7e1;
  box-shadow: 0 28px 70px #000000c0;
  box-sizing: border-box;
  flex-direction: column;
  overflow: hidden;
}
.family-dialog:not([open]) { display: none; }
.family-dialog[open] { display: flex; }
.family-dialog::backdrop { background: #07080acc; }
.family-sheet {
  position: relative;
  box-sizing: border-box;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 28px 24px;
}
.family-dialog h2 {
  margin: 8px 48px 0 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -.02em;
}
.family-dialog h3 {
  margin: 22px 0 8px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
}
.family-dialog .family-kicker {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #d5ae77;
}
.family-lede, .family-dialog p { margin: 12px 0 0; font-size: .92rem; line-height: 1.65; color: #c8c4bb; }
.family-dialog h2 + p { margin-top: 12px; }
.family-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #eae7e1;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.family-close:hover, .family-close:focus-visible { color: #e5c18e; }
.family-dialog button {
  white-space: normal;
  letter-spacing: normal;
  text-transform: none;
}
.family-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin-top: 18px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #c9a56a33;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.family-choice strong,
.family-choice span {
  min-width: 0;
  white-space: normal;
}
.family-choice strong {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.3;
  color: #f4efe6;
}
.family-choice span { font-size: .9rem; line-height: 1.6; color: #c8c4bb; }
.family-choice:hover strong, .family-choice:focus-visible strong { color: #e5c18e; }
.family-form { display: grid; gap: 14px; margin-top: 22px; }
.family-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.family-field { display: grid; gap: 6px; min-width: 0; }
.family-field span, .family-check span { font-size: .78rem; color: #d6cbbb; }
.family-field input, .family-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9a56a55;
  border-radius: 4px;
  background: #0d0f12;
  color: #f4efe6;
  font: inherit;
  font-size: .92rem;
}
.family-field textarea { min-height: 120px; resize: vertical; }
.family-field input:focus-visible, .family-field textarea:focus-visible, .family-check input:focus-visible {
  outline: 2px solid #d5af77;
  outline-offset: 2px;
}
.family-checks { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.family-checks legend { margin-bottom: 8px; font-size: .78rem; color: #d6cbbb; }
.family-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; line-height: 1.5; color: #eae7e1; }
.family-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #c9a56a; }
.family-dialog .family-error { margin: 0; font-size: .84rem; line-height: 1.5; color: #e7b2a8; }
.family-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.family-submit, .family-quiet {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 4px;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.family-submit { border: 1px solid #c9a56a; background: #c9a56a; color: #1a140c; }
.family-submit:hover { color: #f4efe6; }
.family-submit:disabled { opacity: .55; cursor: not-allowed; }
.family-quiet { border: 1px solid #c9a56a55; background: transparent; color: #f4efe6; }
.family-quiet:hover, .family-quiet:focus-visible { color: #e5c18e; }
.family-clerk { min-height: 24px; margin-top: 16px; }
@media (max-width: 560px) {
  .family-row { grid-template-columns: 1fr; }
  .family-sheet { padding: 22px 18px 18px; }
}
