.family-page { margin: 0; min-height: 100vh; background: #f4f8f6; color: #213732; font-family: system-ui, 'Microsoft YaHei', sans-serif; }
.family-portal { max-width: 720px; margin: auto; padding: 1.2rem 1rem 3rem; }
.family-teacher { color: inherit; }
.family-portal [hidden], .family-teacher [hidden] { display: none !important; }
.family-portal h1, .family-portal h2, .family-portal h3, .family-teacher h2, .family-teacher h3 { margin: 0 0 .45rem; font-weight: 700; }
.family-portal h1 { font-size: 1.8rem; line-height: 1.3; }
.family-portal h2, .family-teacher h2 { font-size: 1.2rem; }
.family-portal h3, .family-teacher h3 { font-size: 1rem; }
.family-portal p, .family-teacher p { margin: .25rem 0; }
.family-top { padding: .65rem 0 .3rem; }
.family-card { background: #fff; border: 1px solid #dce8e2; border-radius: 1rem; padding: 1rem; margin: .7rem 0; }
.family-teacher .family-card { color: #253b36; }
.family-muted { color: #576b65; font-size: .88rem; }
.family-status { min-height: 1.2em; color: #475f58; font-size: .88rem; }
.family-status:empty { display: none; }
.family-line { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.family-between { justify-content: space-between; }
.family-field { display: block; box-sizing: border-box; width: 100%; margin: .4rem 0; border: 1px solid #c8d9d2; background: #fff; color: #223932; border-radius: .65rem; padding: .63rem .7rem; font: inherit; font-size: .95rem; }
.family-button { display: inline-flex; justify-content: center; align-items: center; box-sizing: border-box; border: 1px solid #b8cec4; background: #fff; color: #25493b; border-radius: .6rem; padding: .48rem .8rem; font: inherit; font-size: .88rem; font-weight: 650; min-height: 2.25rem; text-decoration: none; cursor: pointer; }
.family-button.primary { background: #23694e; color: #fff; border-color: #23694e; }
.family-button.danger { color: #a5334b; border-color: #e8c8d2; }
.family-button:disabled { opacity: .55; cursor: default; }
.family-button:focus-visible, .family-field:focus-visible { outline: 2px solid #348265; outline-offset: 2px; }
.family-form { display: grid; gap: .65rem; max-width: 420px; }
.family-form label, .family-select { font-size: .9rem; font-weight: 650; }
.family-select { display: block; }
.family-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.family-tabs [aria-current='true'] { background: #23694e; color: white; border-color: #23694e; }
.family-row { padding: .7rem 0; border-top: 1px solid #e6efea; }
.family-rows > :first-child { border-top: 0; }
.family-qr { display: block; width: min(100%, 230px); height: auto; margin: .6rem 0; }
.family-pet { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: .8rem; }
.family-pet-image { width: 116px; height: 116px; object-fit: contain; background: #f1f8f1; border-radius: 1rem; }
.family-egg { display: grid; width: 116px; height: 116px; place-items: center; border-radius: 1rem; background: #f1f8f1; font-size: 2.5rem; }
.family-score { background: #eff7f2; border-radius: .7rem; padding: .55rem .7rem; margin: .4rem 0; }
.family-section { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid #e6efea; }
.family-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.family-photo { display: block; width: min(100%, 460px); height: auto; border-radius: .6rem; }
@media (max-width: 480px) { .family-portal { padding: .85rem .7rem 2rem; } .family-card { padding: .8rem; } }

/* Class invitation binding follows the supplied parent-page flow; business
   tabs stay intact. These styles affect only the invitation form. */
.family-binding-banner{padding:18px;border-radius:18px;background:linear-gradient(120deg,#edf5ff,#fff9df);color:#24344d;margin-bottom:18px}
.family-binding-banner h2{margin:6px 0;font-size:24px}.family-binding-banner p{color:#64748b;margin:0}
#family-bind{border-radius:22px;background:#fff;box-shadow:0 12px 32px #477eb915}
#family-bind .family-button.primary{width:100%;padding:14px;border:0;background:linear-gradient(110deg,#6fa9ed,#397df3);border-radius:16px;color:white;font-size:18px}
#family-bind .family-field{background:#f8faff;border-color:#dce3ef;border-radius:12px;padding:13px}
.family-consent{display:flex!important;align-items:flex-start;gap:9px;font-size:14px;line-height:1.6}.family-consent input{width:18px;height:18px;flex-shrink:0;margin-top:3px}
#family-bind [hidden]{display:none!important}#family-binding-privacy{padding:12px;background:#f5f9ff;border-radius:12px;color:#64748b;font-size:13px}
