/* A compact home row; the existing hero and other workspace panels keep their layout. */
.family-panel .family-heading{margin-bottom:10px;align-items:center;flex-wrap:wrap}
.family-panel .family-heading h2{white-space:normal}
.family-panel .family-heading h2 small{font-size:11px;color:var(--muted);font-weight:400;margin-left:10px}
.family-heading-actions{display:flex;align-items:center;gap:14px;margin-left:auto}
.family-heading-actions button,.family-enable{font-size:11px;color:#788dab;min-height:30px}
.family-enable{margin-left:8px;color:#3879c7}
.family-disabled .studio-section-head{flex-wrap:wrap}
.family-disabled .studio-section-head h2{white-space:normal}
.family-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.family-card{display:flex;align-items:flex-start;gap:10px;min-width:0;min-height:102px;padding:10px 12px;border:1px solid #e6edf6;border-radius:4px;background:#f8faff}
.family-current{background:#fafbf7}
.family-current>img{width:46px;height:64px;object-fit:cover;border-radius:2px;flex-shrink:0;margin-top:3px}
.family-card-copy{min-width:0;flex:1}
.family-eyebrow{font-size:10px;color:#8496ac;display:block;margin-bottom:3px}
.family-card h3{font-size:14px;font-weight:600;line-height:1.5;margin:0;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.family-card p{font-size:11px;line-height:1.5;color:var(--muted);margin:3px 0 0}
.family-card-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:2px}
.family-card-actions button{min-height:28px;color:#427fc6;font-size:11px;text-align:left}
.family-card-actions button+button{color:#7b8ea5}
.family-symbol{display:grid;place-items:center;width:32px;height:36px;flex-shrink:0;color:#658ee0;margin-top:6px}
.family-symbol .icon{width:25px;height:25px}
.family-symbol-note{color:#7b8ac9}
.family-dialog{padding:0;width:min(760px,calc(100vw - 32px));max-height:88dvh;border:1px solid #dbe5f0;border-radius:5px;background:var(--paper,#fff);color:var(--ink,#25354c);box-shadow:0 18px 60px #0b203c35}
.family-dialog::backdrop{background:#0e213766;backdrop-filter:blur(2px)}
.family-dialog-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 20px;border-bottom:1px solid var(--line,#e5edf6)}
.family-dialog-top h2{font-size:18px;margin:0;outline:none}
.family-dialog-top>button{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;color:var(--muted)}
.family-dialog-body{padding:18px 20px}
.family-dialog-intro{font-size:12px;color:var(--muted);line-height:1.8;margin:0 0 14px}
.family-book-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.family-book-list>button{display:flex;align-items:center;gap:10px;border:1px solid var(--line,#e5edf6);padding:10px;text-align:left;border-radius:3px;min-width:0}
.family-book-list img{width:48px;height:64px;object-fit:cover;flex-shrink:0;border-radius:2px}
.family-book-list>button>span:nth-child(2){flex:1;min-width:0}
.family-book-list b{font-size:13px}.family-book-list small{display:block;font-size:10px;color:var(--muted);line-height:1.7;margin-top:3px}
.family-reader-layout{display:grid;grid-template-columns:160px minmax(0,1fr);gap:22px}
.family-reader-layout figure{margin:0}.family-reader-layout figure img{width:160px;height:214px;object-fit:cover;border-radius:3px}
.family-reader-layout figcaption{font-size:10px;color:var(--muted);margin-top:8px;line-height:1.6}
.family-reader-layout h3{font-size:20px;line-height:1.5;margin:15px 0}
.family-chapters{display:flex;gap:8px;flex-wrap:wrap}.family-chapters button{font-size:11px;padding:7px 10px;border:1px solid var(--line,#e5edf6);border-radius:3px}
.family-chapters button[aria-pressed=true]{color:#397bc6;background:#eaf3ff;border-color:#b9d4f3}
.family-story-text{font-size:15px;line-height:1.95;margin:0 0 12px}
.family-reading-question,.family-discussion-hint{background:#f4f8ff;border:1px solid #e2eaf6;border-radius:3px;padding:12px;font-size:12px;line-height:1.8;margin-top:14px}
.family-reading-question p,.family-discussion-hint p{margin:5px 0 0}.family-reading-question b{font-size:11px;color:#6387b5}
.family-question-title{font-size:21px;line-height:1.6;margin:20px 0}
.family-discussion-hint summary{cursor:pointer}
.family-reader-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:16px}
.family-reader-actions button{font-size:12px;padding:9px 14px;border:1px solid var(--line,#e5edf6);border-radius:3px;min-height:36px}
#family-note-form label{display:block;font-size:12px;font-weight:600;margin:14px 0 7px}
#family-note-form select,#family-note-form textarea{width:100%;max-width:100%;border:1px solid var(--line,#dce6f2);background:var(--paper,#fff);color:var(--ink,#25354c);padding:9px 10px;border-radius:3px;font:inherit;font-size:13px;line-height:1.7}
#family-note-form textarea{resize:vertical;min-height:110px}.family-save-status{font-size:11px;color:var(--muted);margin-right:auto}
#family-note-form textarea[name=childText],#family-note-form textarea[name=parentText],#family-note-form textarea[name=discovery]{min-height:68px}
.family-history-quotes{display:grid!important;gap:7px!important;margin-top:10px}
.family-history-quotes h3{font-size:13px;margin:0;color:#397fc4}
.family-history-quotes p{margin:4px 0 0}
.family-record-list{display:grid;gap:10px}.family-record-list article{border:1px solid var(--line,#e5edf6);border-radius:3px;padding:12px}
.family-record-list article>div{display:flex;justify-content:space-between;gap:10px;font-size:12px}.family-record-list small{color:var(--muted)}
.family-record-list p{font-size:13px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;margin:9px 0}
.family-record-list article>button{font-size:10px;min-height:28px;color:#8695a8}.family-empty{font-size:13px;color:var(--muted);padding:20px 0;line-height:1.8}
.family-panel button:focus-visible,.family-enable:focus-visible,.family-dialog button:focus-visible{outline:2px solid #548fda;outline-offset:2px}
.studio-page.dark .family-card{background:#19293e;border-color:#2d415b}.studio-page.dark .family-current{background:#1a2b31}
.studio-page.dark .family-card-actions button{color:#9bc3f6}.studio-page.dark .family-card-actions button+button{color:#9cacc3}
.studio-page.dark .family-dialog{border-color:#365170}.studio-page.dark .family-reading-question,.studio-page.dark .family-discussion-hint{background:#1b304b;border-color:#365170}
.studio-page.dark .family-chapters button[aria-pressed=true]{background:#284569;color:#daeaff;border-color:#577ca7}
@media(max-width:1000px){.family-panel .family-heading h2 small{display:block;margin:3px 0 0}.family-grid{gap:8px}.family-card{padding:9px;gap:7px}.family-symbol{width:24px}.family-card h3{font-size:11px}.family-current>img{width:38px;height:56px}}
@media(max-width:650px){.family-grid{grid-template-columns:1fr}.family-card{min-height:82px;padding:10px}.family-card h3{font-size:13px}.family-card-actions button{font-size:11px;min-height:30px}.family-heading-actions{gap:12px}.family-panel .family-heading h2{font-size:17px}.family-book-list{grid-template-columns:1fr}.family-reader-layout{grid-template-columns:1fr}.family-reader-layout figure{display:none}.family-dialog-body{padding:15px}.family-dialog-top{padding:12px 15px}.family-dialog-top h2{font-size:16px}.family-question-title{font-size:19px}.family-story-text{font-size:15px}}

/* Home recommendations follow the compact cover-left, text-right reference. */
.family-panel .family-heading{margin-bottom:14px;gap:12px}
.family-panel .family-heading h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.family-panel .family-title-star{color:#eda63d;font-size:24px;line-height:1;font-weight:400}
body.studio-page .family-panel .family-heading h2 small{margin:0 0 0 10px;font-size:13px;line-height:1.5}
.family-panel .family-heading-actions{gap:16px}
.family-panel .family-heading-actions button{display:flex;align-items:center;gap:4px;font-size:13px;min-height:28px}
.family-heading-actions .icon{width:16px;height:16px}
.family-book-strip{display:flex;align-items:center;gap:12px}
.family-recommendation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0;flex:1}
.family-recommendation{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:center;min-width:0;min-height:120px;padding:11px;text-align:left;background:var(--paper,#fff);border:1px solid var(--line,#e6edf6);border-radius:4px;color:var(--ink)}
.family-recommendation:hover{background:#4385de06;border-color:#9ebee4;color:var(--ink)}
.family-recommendation-cover{position:relative;display:block;width:64px;height:96px;border-radius:3px;overflow:hidden;box-shadow:1px 2px 6px #203a551a}
.family-recommendation-cover>img{display:block;width:100%;height:100%;object-fit:cover}
.family-recommendation-cover>span{position:absolute;top:6px;left:3px;right:3px;font-family:'Songti SC','Noto Serif SC',STSong,'SimSun',serif;font-size:10px;font-weight:650;text-align:center;line-height:1.4;color:#213b4b;text-shadow:0 1px 2px #fff,0 0 5px #fff}
.family-recommendation-copy{display:flex;flex-direction:column;gap:7px;min-width:0}
.family-recommendation-copy>strong{font-size:15px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.family-recommendation-copy>span{font-size:13px;line-height:1.6;color:var(--muted,#8492a8)}
.family-choose-arrow{display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid var(--line,#e6edf6);border-radius:4px;color:#4385de;background:var(--paper,#fff)}
.family-choose-arrow .icon{width:20px;height:20px}
.family-recommendation:focus-visible,.family-choose-arrow:focus-visible{outline:2px solid #548fda;outline-offset:2px}
.studio-page.dark .family-recommendation:hover{background:#1c304b;border-color:#5178a6}
@media(max-width:1100px){.family-recommendation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.family-choose-arrow{display:none}}
@media(max-width:650px){.family-recommendation-grid{gap:8px}.family-recommendation{grid-template-columns:44px minmax(0,1fr);gap:8px;min-height:94px;padding:8px}.family-recommendation-cover{width:44px;height:66px}.family-recommendation-cover>span{font-size:8px}.family-recommendation-copy{gap:4px}.family-recommendation-copy>strong{font-size:13px;line-height:1.4}.family-recommendation-copy>span{font-size:11px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}body.studio-page .family-panel .family-heading h2 small{font-size:11px}.family-panel .family-heading-actions{gap:12px}.family-panel .family-heading-actions button{font-size:11px;min-height:30px}}

/* Shared-reading actions: clear hierarchy with a readable, compact footer. */
.study-family-footer{display:block!important;width:auto;align-self:stretch;margin-top:12px;padding-top:12px;border-top:1px solid #b5cee540}
.study-family-footer .study-family-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;align-items:stretch}
.study-family-footer .study-family-actions button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:40px;padding:8px;border:1px solid #a7c8e2;border-radius:4px;font-size:13px;line-height:1.4;text-align:center;white-space:nowrap;background:#f3f8ff;color:#245b91}
.study-family-footer .study-family-actions .study-family-continue{background:#267dde;border-color:#398eea;color:#fff}
.study-family-footer .study-family-actions .icon{width:18px;height:18px;flex:none}
.study-family-footer .study-family-footnote{margin:9px 0 0;font-size:11px;line-height:1.8;color:#48617a;overflow-wrap:anywhere}
.study-family-footer .study-family-footnote span{display:block}
.study-family-footer button:hover{filter:brightness(1.12)}
.study-family-footer button:focus-visible{outline:2px solid #9bdcff;outline-offset:3px}
