/* Shared site chrome: used by reading, browsing and parent tools. */
:root{--paper:#ffffff;--ink:#302440;--muted:#706578;--green:#7043cd;--line:#e6deef;--soft:#eee7fa;--focus:#7043cd;color-scheme:light}
body{font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif}::selection{background:#e3d7f5;color:var(--ink)}
.site-header{max-width:1240px;min-height:80px;margin:auto;padding:12px 32px;display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.site-header .brand{display:inline-flex;align-items:center;gap:9px;min-height:44px;font-size:20px;font-weight:700;color:var(--ink);text-decoration:none;letter-spacing:0;white-space:nowrap}.site-header .brand svg{flex:none}
.site-header nav{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.site-header nav a,.site-header nav button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 10px;font-size:14px;color:var(--green);text-decoration:none;border-radius:8px}.site-header nav a:hover{background:var(--soft)}
.site-header #identity{font-size:13px;color:var(--muted);max-width:200px;overflow-wrap:anywhere}
.skip-link{position:absolute;left:16px;top:-100px;background:var(--green);color:white;padding:12px 16px;z-index:10}.skip-link:focus{top:8px}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}main h1[tabindex="-1"]:focus{outline:none}
.login-help a{display:inline-flex;align-items:center;min-height:44px}
.site-footer{max-width:1240px;margin:auto;padding:20px 32px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:13px;color:var(--muted)}.site-footer a{min-height:44px;display:inline-flex;align-items:center;color:var(--green)}
#confirm-dialog{max-width:460px;width:calc(100% - 32px);padding:28px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink)}#confirm-dialog::backdrop{background:#30244059}#confirm-dialog h2{font-size:22px;margin:0 0 12px}#confirm-dialog p{font-size:15px;line-height:1.7;white-space:pre-line}#confirm-dialog .actions{justify-content:flex-end}
@media(max-width:640px){.site-header{padding:10px 20px;min-height:68px;gap:4px 12px}.site-header .brand{font-size:18px}.site-header nav{gap:0;width:auto}.site-header nav a,.site-header nav button{font-size:13px;padding-inline:8px}.site-header #identity{display:none}.site-header .brand svg{width:24px;height:24px}.site-header #navigation{width:100%;justify-content:flex-start;border-top:1px solid var(--line);padding-top:6px;margin-top:4px}.site-footer{padding:16px 20px}.site-header .nav-shelf{display:inline-flex!important}}

.portal-shelf-link{margin-left:auto;display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;color:var(--green);font-size:14px;text-decoration:none;border-radius:8px}.portal-shelf-link:hover{background:var(--soft)}

/* Shared layouts for public, family and parent surfaces. */
:root{--radius:6px;--story:#fff0e2;--space:24px}
body{background:var(--paper);color:var(--ink)}
.site-header,.site-footer{max-width:1344px}.site-header{min-height:90px;padding-block:14px}.site-header .brand{font-size:22px;gap:10px}.site-header nav{gap:20px}.site-header nav a{padding-inline:0;border-radius:0}.site-header nav a:hover{background:transparent;text-decoration:underline}
.reading-site main,.parent-site main{max-width:1344px;padding-inline:32px}
.reading-site button,.parent-site button,.parent-site .button,.parent-site input,.parent-site select,.reading-site input,.reading-site select{border-radius:6px}
.reading-site h1,.parent-site h1{letter-spacing:0}
.reading-site #shelf .hero{padding:28px 0}.reading-site #shelf h1{font-size:36px}.reading-site #shelf .filters{padding-bottom:24px;border-bottom:1px solid var(--line);margin-bottom:28px}
.reading-site .shelf-cover{height:246px;aspect-ratio:auto;border-radius:4px;background:var(--soft)}
.reading-site #shelf #books{gap:32px 24px}.reading-site #shelf #recent{border-radius:6px}.reading-site #shelf #recent .tile-action{border-radius:6px}
.reading-site #lessons .series-layout{gap:48px}.reading-site #lessons .series-cover{border-radius:4px;background:var(--soft)}
.reading-site #lessons .chapter{border-radius:0}.reading-site #lessons .chapter-number{border-radius:4px;background:var(--soft);color:var(--green)}
.reading-site .reader-top{padding-block:12px}.reading-site .page-stage{border:0;border-radius:0;background:var(--soft);padding:20px}.reading-site .page-meta{border-color:var(--line)}
.reading-site #reader .controls button{background:#fff;border:1px solid var(--line)}.reading-site #reader .controls button:disabled{background:transparent;border-color:transparent;color:var(--muted)}
.reading-site #sentences button{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;margin:0;padding:14px 12px}.reading-site #sentences button.playing{background:var(--soft);border-left:1px solid var(--green)}.reading-site #sentences button.loading{outline:1px dashed var(--green);outline-offset:-1px}.reading-site #sentences button:hover:not(:disabled){background:var(--soft)}
.parent-site .login-welcome h1{font-family:inherit;font-size:36px;line-height:1.4}.parent-site .login-fields{border-radius:6px;background:var(--soft);border:0;padding:32px}.parent-site .login-layout{max-width:1100px;gap:96px;margin-block:56px 72px}.parent-site .login-notes{margin-top:36px}
.parent-site .page-heading h1{font-size:32px}.parent-site #account-panel{max-width:none}.parent-site .account-layout{gap:48px}.parent-site .metrics{background:var(--soft);border-radius:4px;padding:12px}.parent-site .account-usage .metric:first-child{padding-left:12px}.parent-site .family.active,.parent-site .series.active{background:var(--soft)}
.parent-site dialog,#confirm-dialog{border-radius:6px}.parent-site #status{box-shadow:none}.parent-site .badge{border-radius:4px}
@media(max-width:850px){.reading-site main,.parent-site main{padding-inline:24px}.reading-site #shelf h1{font-size:30px}.reading-site .shelf-cover{height:220px}.reading-site #lessons .series-layout{gap:28px}.parent-site .login-layout{gap:40px}.parent-site .account-layout{gap:32px}}
@media(max-width:640px){.site-header{min-height:76px;padding:10px 20px}.site-header .brand{font-size:19px}.site-header nav{gap:10px}.site-header nav a{font-size:13px}.reading-site main,.parent-site main{padding-inline:20px}.reading-site #shelf{padding:0}.reading-site #shelf .hero{padding:20px 0}.reading-site #shelf h1{font-size:27px}.reading-site .shelf-cover{height:180px}.reading-site #shelf #books{gap:28px 16px}.reading-site .page-stage{padding:8px}.reading-site .reader-top{padding:0}.reading-site #lessons{padding:0}.reading-site #lessons .series-layout{gap:24px}.parent-site .login-layout{margin:20px 0 32px}.parent-site .login-welcome h1{font-size:27px}.parent-site .login-fields{padding:24px 20px}.parent-site .page-heading h1{font-size:27px}.parent-site .account-usage .metric,.parent-site .account-usage .metric:first-child{padding-inline:0}.parent-site .metrics{padding:12px 16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Image-only pages keep the book centered without an empty listening column. */
.reading-site #reading-layout.without-audio{grid-template-columns:minmax(0,1fr)}

/* Reading practice: direct choices, quiet spacing. */
.practice-settings{margin:20px 0 16px;border-top:1px solid var(--line,#e6deef);color:var(--ink,#302440)}
.practice-settings summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:12px 0;list-style:none;cursor:pointer}
.practice-settings summary::-webkit-details-marker{display:none}
.practice-settings summary strong{font-size:15px;font-weight:600}
.practice-current{display:block;margin-top:4px;font-size:12px;line-height:1.6;color:var(--muted,#706578);font-variant-numeric:tabular-nums}
.practice-chevron{flex:none;width:16px;color:var(--muted,#706578)}
.practice-settings[open] .practice-chevron{transform:rotate(180deg)}
.practice-options{display:grid;gap:20px;padding:8px 0 20px}
.practice-row{padding:0;margin:0;border:0;min-width:0}
.practice-label{padding:0;margin-bottom:8px;font-size:13px;font-weight:500;color:var(--muted,#706578)}
.practice-row select{width:100%;min-height:44px;font:inherit}
.practice-choices{display:flex;gap:4px;background:var(--soft,#eee7fa);padding:3px;border-radius:6px}
.practice-choices button{flex:1;min-width:0;min-height:44px;padding:8px 2px;margin:0;border:0;border-radius:4px;background:transparent;color:var(--ink,#302440);font:inherit;font-size:14px;line-height:1.4;white-space:nowrap;font-variant-numeric:tabular-nums;cursor:pointer}
.practice-choices button[aria-pressed="true"]{background:var(--green,#7043cd);color:#fff;font-weight:600}
.practice-choices button:hover:not([aria-pressed="true"]){background:#e3d7f5}
.practice-modes{border:0;border-top:1px solid var(--line,#e6deef);padding:16px 0 0;margin:0;min-width:0;display:grid;gap:0}
.practice-modes legend{float:left;width:100%;padding:0;margin:0 0 6px;font-size:13px;color:var(--muted,#706578)}
.practice-mode{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px;cursor:pointer}
.practice-mode input{flex:none;width:18px;height:18px;min-width:18px;margin:0;accent-color:var(--green,#7043cd)}
.practice-settings .practice-hint{margin:6px 0 16px;font-size:12px;line-height:1.6;color:var(--muted,#706578)}
.practice-settings :focus-visible{outline:3px solid #7043cd;outline-offset:3px}
@media(min-width:900px) and (max-width:1000px){.practice-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}}

#books .pinnable-book{min-width:0;display:flex;flex-direction:column;align-items:stretch}#books .pinnable-book>.book{width:100%;flex:1}#books .pin-book{margin-top:8px}
.pin-book{display:inline-flex;align-items:center;justify-content:center;gap:6px;align-self:flex-start;min-height:44px;padding:8px 10px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted,#706578);font:inherit;font-size:13px;line-height:1.5;cursor:pointer;white-space:nowrap}
.pin-book svg{flex:none;width:16px;height:16px}
.pin-book[aria-pressed="true"]{background:var(--soft,#eee7fa);color:var(--green,#7043cd);font-weight:600;text-decoration:none}
.pin-book:hover:not(:disabled){background:#e3d7f5;color:#302440}
.pin-book:focus-visible{outline:3px solid #7043cd;outline-offset:3px}

/* Approved berry/apricot world. --green remains an internal compatibility alias. */
:root{--primary:#7043cd;--green:var(--primary);--primary-hover:#5930ab;--ground:#f8f4ff;--highlight:#ffc38c;--paper:#fff;--ink:#302440;--muted:#706578;--soft:#eee7fa;--line:#e6deef;--focus:#7043cd;--radius:10px;scrollbar-color:#b3a4c5 var(--ground)}
body{background:var(--ground)}
::selection{background:var(--highlight);color:var(--ink)}
.site-header{max-width:none;background:var(--paper);padding-inline:max(32px,calc((100% - 1280px)/2));border-bottom:1px solid var(--line)}
.site-header .brand{color:var(--primary)}
.reading-site button,.parent-site button,.parent-site .button,.parent-site input,.parent-site select,.reading-site input,.reading-site select{border-radius:10px}
.reading-site .page-stage{background:var(--paper);border-radius:16px;padding:24px}
.reading-site .listening{background:var(--paper);border-radius:16px;padding:24px;min-width:0}
.reading-site #reader .controls button:not(:disabled){background:var(--soft);border-color:transparent;color:var(--primary)}
.reading-site .practice-settings{margin-top:20px}
.reading-site .practice-choices button{border-radius:6px}
.reading-site .practice-choices{border-radius:8px}
.reading-site .shelf-cover,.reading-site #lessons .series-cover{border-radius:10px}
.reading-site #shelf #books .pinnable-book{background:var(--paper);padding:14px;border-radius:16px}
.reading-site #shelf #books .book{background:transparent;padding:0;border:0;box-shadow:none}
.reading-site #shelf #books .book:hover{background:transparent}
.reading-site #shelf #books .shelf-cover{background:var(--soft)}
.reading-site #lessons .series-directory{background:var(--paper);border-radius:16px;padding:24px}
.parent-site .login-fields{background:var(--paper);border-radius:16px}
.parent-site .metrics{background:var(--paper);border-radius:12px}
.parent-site .family.active,.parent-site .series.active{background:var(--highlight);color:var(--ink)}
.parent-site dialog,#confirm-dialog{border-radius:16px;background:var(--paper)}
.pin-book[aria-pressed="true"]{background:var(--highlight);color:var(--ink)}
@media(max-width:850px){.site-header{padding-inline:24px}}
@media(max-width:640px){.site-header{padding-inline:20px}.reading-site .page-stage{padding:12px}.reading-site .listening{padding:20px}.reading-site #shelf #books{gap:20px 12px}.reading-site #shelf #books .pinnable-book{padding:10px}.reading-site #lessons .series-directory{padding:16px}}
