/* Comfortable, readable grown-up controls in the family nook. */
#admin-section{min-width:0}
#admin-section .section-heading{gap:15px}
#admin-section .section-heading h2{overflow-wrap:anywhere}
#admin-section .admin-grid{min-width:0;gap:22px;align-items:start}
#admin-section .panel{min-width:0}
#admin-section .panel>h3{line-height:1.25}
#admin-section .subheading{margin-top:30px;padding-top:23px;border-top:1px solid #dce3ce}
#admin-section .text-button{min-height:44px;line-height:1.4}
#admin-section button{touch-action:manipulation}
#admin-section input,#admin-section select{min-width:0;max-width:100%}
#admin-section .form-help{font-size:12px;line-height:1.55}
#family-invite-form{gap:16px}
#family-invite-form .button{justify-self:start;min-height:44px}
#preview-family-note{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;margin:18px 0 23px;padding:16px 19px;border:1px solid #cddab8;border-radius:17px;background:#eaf0da;color:#3d563c;font-size:13px;line-height:1.6}
#preview-family-note p{flex:1;min-width:180px;margin:0;color:inherit;font-size:inherit;line-height:inherit}
#reset-preview-family{flex:none;min-height:44px;margin:0;padding:8px 13px;border:1px solid #b6c5a0;border-radius:11px;background:#f8faee;color:#3c583c;font:inherit;font-size:11px;font-weight:700;line-height:1.3;cursor:pointer}
#reset-preview-family:hover{background:#fffcec;border-color:#96af7f}
#invite-result{margin:22px 0 0;padding:17px;border:1px solid #c7d5ad;border-radius:15px;background:#f0f4df}
#invite-result p{margin:0 0 12px;font-size:12px;line-height:1.6;color:#45603e;overflow-wrap:anywhere}
#invite-link{display:block;width:100%;min-width:0;background:#fffef6;font-size:12px;line-height:1.5;text-overflow:ellipsis}
#copy-invite{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;padding:8px 12px;border:1px solid #becaa9;border-radius:10px;background:#fffef3;color:#355237;font-size:12px;font-weight:700}
#copy-invite:hover{background:#e5edce}
#preview-invites{min-width:0;margin-top:18px}
#preview-invites:empty{display:none}
#admin-section .member{min-width:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 14px;padding:15px 0;border-color:#e0e6d5;line-height:1.5}
#admin-section .member>div:first-child{flex:1;min-width:140px}
#admin-section .member strong,#admin-section .member small{overflow-wrap:anywhere;word-break:normal}
#admin-section .member strong{font-size:14px}
#admin-section .member small{margin-top:3px;font-size:11px;line-height:1.5;color:#697d5e}
#admin-section .member>div:last-child:not(:first-child){max-width:100%}
#admin-section .member button{min-height:44px;max-width:100%;padding:8px 10px;white-space:normal;line-height:1.35;text-align:left}
#preview-invites .member{padding:13px 14px;margin-top:8px;border:1px solid #e2d3a5;border-radius:13px;background:#fbf5df}
#preview-invites .member:first-child{margin-top:0}
#preview-invites button{border:1px solid #d6c58d;border-radius:10px;background:#fffdf2;color:#4d5b33;font-size:11px;font-weight:700}
#preview-invites button:hover{background:#f4e6b7}
#admin-section .approval{padding:17px 0;border-color:#e0e6d5}
#admin-section .approval>strong,#admin-section .approval>small,#admin-section .approval>p{overflow-wrap:anywhere}
#admin-section .approval>small{margin-top:4px;line-height:1.5}
#admin-section .approval>p{margin:11px 0 14px;line-height:1.65}
#admin-section .approval-actions{flex-wrap:wrap;gap:9px}
#admin-section .approval-actions .button{min-height:44px;padding:10px 16px;line-height:1.3}
#preview-join-dialog{width:min(450px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:32px;border:1px solid #e3e8d3;background:#fcfcf1}
#preview-join-dialog h2{padding-right:22px;font-size:29px;line-height:1.15}
#preview-join-dialog p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
#preview-join-description{margin:15px 0 22px;color:#526b49}
#preview-join-form{gap:16px}
#preview-join-form input{min-height:46px}
#preview-join-form .button{min-height:46px;justify-self:start}
#preview-join-dialog .dialog-close{min-width:40px;min-height:40px}
#admin-section button:focus-visible,#preview-join-dialog button:focus-visible{outline:3px solid #bc8029;outline-offset:3px}
/* A toast is moved into the current dialog so native modal layering cannot hide it. */
#toast{width:max-content;max-width:min(520px,calc(100% - 32px));box-sizing:border-box;padding:12px 18px;border:1px solid #78966a;background:#244b39;color:#fffdeb;font-size:13px;line-height:1.5;text-align:center;overflow-wrap:anywhere;pointer-events:none}
dialog #toast{position:fixed;z-index:110;bottom:17px}
@media(max-width:680px){
  #admin-section .admin-grid{grid-template-columns:minmax(0,1fr);gap:16px;margin-top:18px}
  #admin-section .panel{padding:21px 19px;border-radius:18px}
  #admin-section .section-heading{gap:10px}
  #admin-section .section-heading h2{font-size:26px}
  #admin-section .section-heading>.text-button{padding:7px 0;font-size:12px}
  #preview-family-note{margin:13px 0 17px;padding:13px 15px;gap:10px;font-size:12px;border-radius:14px}
  #preview-family-note p{min-width:0;flex-basis:100%}
  #reset-preview-family{padding:9px 11px}
  #admin-section .member{gap:9px;padding:13px 0}
  #admin-section .member>div:first-child{min-width:150px}
  #admin-section .member button{font-size:11px}
  #preview-invites .member{padding:12px}
  #invite-result{padding:14px}
  #invite-link{font-size:11px;padding:11px 10px}
  #preview-join-dialog{padding:30px 22px 24px;border-radius:22px}
  #preview-join-dialog h2{font-size:26px}
  #toast{max-width:calc(100% - 24px);padding:10px 13px;border-radius:12px;font-size:12px}
  dialog #toast{bottom:10px}
}
@media(max-width:359px){
  #admin-section .panel{padding:18px 15px}
  #admin-section .member>div:first-child{flex-basis:100%;min-width:0}
  #admin-section .member>div:last-child:not(:first-child){display:flex;flex-wrap:wrap;gap:4px 9px}
  #admin-section .member>div:last-child>br{display:none}
  #admin-section .approval-actions .button{padding-inline:13px;font-size:11px}
}
.identity-options{display:grid;gap:12px;margin:24px 0}
.identity-options .button{min-height:48px;white-space:normal;overflow-wrap:anywhere;justify-content:flex-start}
#identity-dialog,#parent-dialog{max-width:min(520px,calc(100vw - 24px));padding:38px}
#identity-dialog h2,#parent-dialog h2{font-size:32px;line-height:1.15;margin:8px 0 18px}
#parent-dialog form{margin-top:24px}
.profile-choice{max-width:175px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#parent-upload{margin-top:24px}
@media(max-width:600px){#identity-dialog,#parent-dialog{padding:30px 22px 24px}.profile-choice{max-width:115px;font-size:10px}}
