/* Shared family pages: existing brand palette, separated play and story routes. */
.mb-home.family-content .nav a[aria-current="page"]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:8px}
.mb-home .family-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;padding-top:24px;font-size:13px;line-height:1.7}
.mb-home .library-heading{padding:54px 0 48px;max-width:840px}
.mb-home .library-heading h1{font-size:clamp(32px,5vw,56px);letter-spacing:.015em;line-height:1.6}
.mb-home .library-heading p{color:var(--muted)}
.mb-home .library-heading .fine{font-size:13px}
.mb-home .library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 24px;padding-bottom:64px}
.mb-home .library-card{min-width:0;background:var(--white);border:1px solid var(--line);border-radius:18px;overflow:hidden;display:flex;flex-direction:column}
.mb-home .library-card>img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#fffdf7}
.mb-home .library-card-copy{padding:24px;display:flex;flex-direction:column;flex:1}
.mb-home .library-number{margin:0 0 8px;color:var(--orange);font-size:12px;font-weight:700}
.mb-home .library-card h2{font-size:24px;line-height:1.7}
.mb-home .library-card-copy>p:not(.library-number){font-size:14px;color:var(--muted);margin:14px 0 22px}
.mb-home .library-card .btn{width:100%;margin-top:auto}
.mb-home .library-pdf-guide{padding:36px;border:1px solid var(--line);background:var(--pale);border-radius:18px;margin:0 0 64px;max-width:900px}
.mb-home .library-pdf-guide h2{font-size:28px}
.mb-home .book-heading{max-width:none;padding-bottom:24px}
.mb-home .book-heading h1{font-size:clamp(30px,4vw,48px)}
.mb-home .library-reader{margin:0 0 20px;padding:22px;background:#ece9dc;border:1px solid var(--line);border-radius:18px;min-width:0}
.mb-home .library-reader .reader-note{margin:0 0 18px;font-size:13px}
.mb-home .library-reader .reader-page{background:var(--white)}
.mb-home .library-reader .reader-page figcaption{min-height:8em;padding:24px;font-size:clamp(17px,1.6vw,22px);line-height:1.9}
.mb-home .library-reader .reader-page figcaption p{margin:0;overflow-wrap:anywhere}
.mb-home .library-reader .reader-controls{margin-bottom:0}
.mb-home .library-reader [data-book-motion]{font-size:14px}
.mb-home .book-credit{font-size:12px;margin-bottom:30px}
.mb-home .book-store-card h2{font-size:24px}
.mb-home .family-return{display:flex;flex-wrap:wrap;align-items:center;gap:24px;margin:40px 0 64px}
.mb-home .family-doors>h2,.mb-home .family-guide>h2{margin-bottom:30px}
.mb-home .family-door-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.mb-home .family-door{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:36px;position:relative;min-width:0;overflow:hidden}
.mb-home .family-door .door-symbol{display:block;font-size:48px;letter-spacing:.16em;color:var(--orange);height:110px;padding:12px 0}
.mb-home .family-door>img{display:block;width:110px;height:110px;object-fit:contain;margin-bottom:16px;border-radius:12px}
.mb-home .family-door .eyebrow{margin-bottom:10px}
.mb-home .family-door h3{font-size:26px;margin:0 0 12px;line-height:1.6}
.mb-home .family-door p{font-size:15px}
.mb-home .family-door .btn{margin-top:12px}
.mb-home .family-guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.mb-home .family-guide-grid article{border-top:2px solid var(--line);padding-top:16px}
.mb-home .family-guide-grid h3{font-size:19px;line-height:1.7;margin:0 0 12px}
.mb-home .family-guide-grid p{color:var(--muted);font-size:14px}
.mb-home .family-guide-grid a{font-size:14px;font-weight:700}
.mb-home .legacy-links{margin:0 0 60px;font-size:14px}
.mb-home .legacy-links summary{cursor:pointer;padding:12px 0;min-height:44px}
.mb-home input:focus-visible{outline:3px solid #005fcc;outline-offset:4px}
@media(max-width:999px){
 .mb-home .library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 18px}
 .mb-home .family-guide-grid{grid-template-columns:1fr;gap:24px}
 .mb-home .family-door{padding:24px}
 .mb-home .library-reader{max-width:760px;margin-left:auto;margin-right:auto}
 .mb-home .library-reader .reader-page figcaption{font-size:20px;min-height:0}
}
@media(max-width:599px){
 .mb-home .library-grid,.mb-home .family-door-grid{grid-template-columns:1fr}
 .mb-home .library-heading{padding-top:36px;padding-bottom:30px}
 .mb-home .library-card-copy{padding:22px}
 .mb-home .library-pdf-guide{padding:24px}
 .mb-home .library-reader{padding:10px;border-radius:12px}
 .mb-home .library-reader .reader-page figcaption{font-size:18px;padding:18px 14px}
 .mb-home .library-reader .reader-controls{gap:8px}
 .mb-home .library-reader .reader-controls>.btn{padding:12px 13px;font-size:14px}
 .mb-home .library-reader [data-book-position]{font-size:13px}
 .mb-home .library-reader .reader-note{font-size:12px;padding:4px 4px 0}
 .mb-home .library-reader [data-book-motion]{font-size:13px}
 .mb-home .book-store-card h2{font-size:22px}
 .mb-home .family-breadcrumb{font-size:12px}
 .mb-home .family-return{gap:18px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.mb-home .btn{transition:none}}

.mb-home .library-parent-note{border-top:1px solid var(--line);padding:12px 0;margin:0 0 30px;font-size:14px}
.mb-home .library-parent-note summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:700}
.mb-home .library-parent-note p{max-width:760px;margin:12px 0;color:var(--muted)}

/* Theme links supplement, rather than filter, the complete book list. */
.mb-home .library-themes{margin:0 0 40px}
.mb-home .library-themes>h2,.mb-home .library-all-title{font-size:clamp(23px,3vw,30px);line-height:1.7}
.mb-home .library-themes-intro{max-width:760px;margin:12px 0 22px;color:var(--muted);font-size:15px}
.mb-home .library-themes-intro a{text-decoration:underline;font-weight:700}
.mb-home .library-theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.mb-home .library-theme{min-width:0;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--white)}
.mb-home .library-theme h3{font-size:20px;line-height:1.7;margin:0 0 8px}
.mb-home .library-theme>p{font-size:14px;color:var(--muted);margin:0 0 12px}
.mb-home .library-theme ul{list-style:none;padding:0;margin:0}
.mb-home .library-theme li+li{border-top:1px solid var(--line)}
.mb-home .library-theme a{display:block;padding:12px 0;min-height:44px;line-height:1.8;font-size:14px;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.mb-home .library-theme a:focus-visible{outline:3px solid #005fcc;outline-offset:4px}
.mb-home .library-all-title{margin:0 0 24px}
.mb-home .book-heading .book-topic{font-weight:700;color:var(--ink);margin-bottom:8px}
@media(max-width:899px){.mb-home .library-theme-grid{grid-template-columns:1fr}.mb-home .library-theme{padding:22px}.mb-home .library-themes{margin-bottom:32px}}

/* Final-page choices stay outside the original story and animated paper. */
.mb-home .library-reader .reader-ending{border-top:1px solid var(--line);margin:24px 0 0;padding:26px 12px 8px;text-align:left}
.mb-home .library-reader .reader-ending>h2{font-size:25px;text-align:center;margin:0 0 8px}
.mb-home .library-reader .reader-ending-thanks{text-align:center;margin:0 0 28px}
.mb-home .library-reader .reader-ending h3{font-size:20px;line-height:1.7;margin:0 0 10px}
.mb-home .library-reader .reader-next-books>p{font-size:14px;margin:0 0 16px}
.mb-home .library-reader .reader-recommendations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;list-style:none;margin:0;padding:0}
.mb-home .library-reader .reader-recommendations li{min-width:0}
.mb-home .library-reader .reader-recommendation{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:16px;height:100%;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--white);text-decoration:none;overflow-wrap:anywhere}
.mb-home .library-reader .reader-recommendation img{width:84px;height:auto;max-width:100%;border-radius:8px}
.mb-home .library-reader .reader-recommendation strong{display:block;font-size:16px;line-height:1.8}
.mb-home .library-reader .reader-recommendation-note{display:block;font-size:13px;color:var(--muted);line-height:1.9;margin:8px 0}
.mb-home .library-reader .reader-recommendation-action{display:block;font-size:14px;text-decoration:underline;text-underline-offset:4px}
.mb-home .library-reader .reader-recommendation:focus-visible{outline:3px solid #005fcc;outline-offset:4px}
.mb-home .library-reader .reader-save{border-top:1px solid var(--line);margin-top:24px;padding-top:24px}
.mb-home .library-reader .reader-save-label{font-size:13px;font-weight:700;margin:0 0 8px}
.mb-home .library-reader .reader-save>p{font-size:14px;line-height:1.9}
.mb-home .library-reader .reader-save .reader-save-note{font-size:13px;color:var(--muted)}
.mb-home .library-reader .reader-save .btn{margin-top:10px;white-space:normal;text-align:center}
@media(max-width:899px){.mb-home .library-reader .reader-recommendations{grid-template-columns:1fr}}
@media(max-width:399px){.mb-home .library-reader .reader-ending{padding:22px 0 8px}.mb-home .library-reader .reader-recommendation{grid-template-columns:64px minmax(0,1fr);gap:12px;padding:14px}.mb-home .library-reader .reader-recommendation img{width:64px}.mb-home .library-reader .reader-save .btn{width:100%;gap:12px}}

/* Optional paid set guidance stays inside the existing adult PDF guide. */
.mb-home .family-guide-grid .family-pdf-guide-link{display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:4px}
.mb-home .library-drawing-set{margin-top:28px;padding-top:28px;border-top:1px solid var(--line)}
.mb-home .library-drawing-set h3{font-size:22px;line-height:1.7;margin:0 0 16px}
.mb-home .library-drawing-set p{margin:16px 0}
.mb-home .drawing-set-books{list-style:none;padding:0;margin:12px 0 20px}
.mb-home .drawing-set-books a{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}
.mb-home .drawing-set-store{max-width:100%;white-space:normal;text-align:center;overflow-wrap:anywhere}
.mb-home .library-drawing-set a:focus-visible,.mb-home .family-pdf-guide-link:focus-visible{outline:3px solid #005fcc;outline-offset:4px}
.mb-home .drawing-set-previews{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}
.mb-home .drawing-set-preview{min-width:0;margin:0;padding:1rem;border:1px solid var(--line);border-radius:1rem;background:#fff}
.mb-home .drawing-set-preview img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:.5rem}
.mb-home .drawing-set-preview figcaption{padding-top:.75rem}
.mb-home .drawing-set-preview figcaption p{margin:.5rem 0 0;font-size:.95rem}
.mb-home #drawing-set-samples{scroll-margin-top:1.5rem}
@media(max-width:700px){.mb-home .drawing-set-previews{grid-template-columns:1fr}}

/* Homepage picture-first shortcuts: original game art, native local links. */
.mb-home .home-quick-start{padding-top:30px}
.mb-home .home-quick-start h2{font-size:clamp(25px,3.5vw,38px);line-height:1.6;margin:0}
.mb-home .home-quick-note{color:var(--muted);font-size:15px;margin:10px 0 24px}
.mb-home .home-quick-symbols{position:absolute;width:0;height:0;overflow:hidden}
.mb-home .home-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;list-style:none;padding:0;margin:0}
.mb-home .home-quick-grid li{min-width:0;display:flex}
.mb-home .home-quick-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-width:0;padding:18px 12px 20px;border:2px solid #b9c7b6;border-radius:22px;background:var(--white);color:var(--ink);text-decoration:none;text-align:center;touch-action:manipulation}
.mb-home .home-quick-picture{display:block;width:100%;max-width:200px;height:auto;flex-shrink:0}
.mb-home .home-quick-label{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:12px;font-size:17px;line-height:1.7;font-weight:700;overflow-wrap:anywhere}
.mb-home .home-quick-card:hover{border-color:var(--ink);background:#f3f4e9}
.mb-home .home-quick-card:focus-visible,.mb-home .home-quick-all a:focus-visible{outline:3px solid #005fcc;outline-offset:4px}
.mb-home .home-quick-card:active{background:#e7edde}
.mb-home .home-quick-all{margin:20px 0 0}
.mb-home .home-quick-all a{display:inline-flex;align-items:center;min-height:44px;font-weight:700;text-decoration:underline;text-underline-offset:5px}
.mb-home .home-quick-break{display:none}
@media(max-width:699px){
 .mb-home .home-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .mb-home .home-quick-card{padding:12px 8px 16px;border-radius:18px}
 .mb-home .home-quick-label{font-size:15px;margin-top:8px}
 .mb-home .home-quick-note{font-size:14px}
 .mb-home .home-quick-break{display:inline}
}

/* Book-only reading layout: keep the story large, with help after the last page. */
.mb-home.family-home[data-family-kind="book"]>.wrap{width:min(1480px,calc(100% - 32px))}
.mb-home[data-family-kind="book"] .book-back{margin:8px 0 0;font-size:14px}
.mb-home[data-family-kind="book"] .book-back a{display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:4px}
.mb-home[data-family-kind="book"] .book-heading{padding:8px 0 16px}
.mb-home[data-family-kind="book"] .book-heading h1{font-size:clamp(24px,3vw,36px);line-height:1.5;margin:0}
.mb-home[data-family-kind="book"] .library-reader{max-width:none;margin:0;padding:0;border:0;border-radius:0;background:transparent}
.mb-home[data-family-kind="book"] .library-reader .reader-pages{max-width:900px;margin:0 auto 20px;padding:4px}
.mb-home[data-family-kind="book"] .library-reader.reader-spread .reader-pages{max-width:none}
.mb-home[data-family-kind="book"] .library-reader .reader-page{padding:8px;max-width:900px;margin:0 auto 16px}
.mb-home[data-family-kind="book"] .library-reader.reader-ready .reader-page{margin:0;max-width:none}
.mb-home[data-family-kind="book"] .library-reader .reader-page img{width:100%;max-width:none;height:auto;object-fit:contain}
.mb-home[data-family-kind="book"] .library-reader .reader-page figcaption{padding:12px 16px;min-height:0}
.mb-home[data-family-kind="book"] .library-reader .reader-page figcaption p{font-size:clamp(19px,1.8vw,25px);line-height:1.8;margin:0;text-align:center}
.mb-home[data-family-kind="book"] .reader-controls{margin:12px 0 0;gap:12px}
.mb-home[data-family-kind="book"] .reader-controls button{min-height:48px}
.mb-home[data-family-kind="book"] .book-reading-help{max-width:900px;margin:24px auto 0;font-size:14px;line-height:1.8}
.mb-home[data-family-kind="book"] .book-reading-help summary{cursor:pointer;min-height:44px;padding-block:10px}
.mb-home[data-family-kind="book"] .book-reading-help p{margin:12px 0}
.mb-home[data-family-kind="book"] .book-back a:focus-visible,.mb-home[data-family-kind="book"] .book-reading-help summary:focus-visible{outline:3px solid #326349;outline-offset:4px}
@media(max-width:599px){
 .mb-home.family-home[data-family-kind="book"]>.wrap{width:calc(100% - 16px)}
 .mb-home[data-family-kind="book"] .header{padding-inline:8px}
 .mb-home[data-family-kind="book"] .book-back,.mb-home[data-family-kind="book"] .book-heading{padding-inline:8px}
 .mb-home[data-family-kind="book"] .library-reader .reader-page{padding:3px}
 .mb-home[data-family-kind="book"] .library-reader .reader-page figcaption{padding:12px 9px}
 .mb-home[data-family-kind="book"] .reader-controls{gap:8px}
 .mb-home[data-family-kind="book"] .book-reading-help{padding-inline:8px}
}
