.wx-v17-top, #detail .wx-v17-top {display:grid;grid-template-columns:minmax(0,30fr) minmax(0,70fr);align-items:stretch;gap:0;margin:1rem 0 .5rem;padding:.4rem;border-radius:.8rem;background:#f2ebdb;color:#24334a;border:1px solid #c7b99e;box-sizing:border-box}
.wx-v17-logo {align-content:center;font-weight:800;font-size:clamp(.7rem,2vw,1rem);overflow-wrap:anywhere;min-width:0}
.wx-v17-settings {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.2rem;min-width:0}
.wx-v17-settings button,.wx-v17-bottom button {min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere;line-height:1.25;padding:.25rem .1rem;font-size:clamp(.66rem,1.8vw,.95rem)}
.wx-v17-ready .wx-v17-bottom,#detail .wx-v17-bottom {position:sticky;bottom:0;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.25rem;padding:.5rem .5rem max(.5rem,env(safe-area-inset-bottom));background:#f2ebdb;color:#24334a;border:1px solid #c7b99e;border-radius:.7rem}
.wx-v17-ready .wx-reading-tools .wx-chapter-nav {display:none}
.wx-v17-top[hidden],.wx-v17-bottom [hidden]{display:none!important}
.wx-v17-dialog {width:min(90vw,480px);max-height:75dvh;overflow:auto;border-radius:.8rem;padding:1rem;color:#19293e;background:white}
.wx-v17-dialog label {display:grid;gap:.3rem;margin:.6rem 0}
.wx-v17-dialog select {width:100%}
.wx-v17-dialog::backdrop{background:#0008}

/* One public layout setting applies to novel and book text, without resizing artwork. */
.wx-v17-layout-active #body,.wx-v17-layout-active #wxV17BookHost .wx-v17-book-page-text{font-family:var(--wx-v17-family)!important;font-size:var(--wx-v17-font)!important;line-height:var(--wx-v17-line)!important;overflow-wrap:anywhere}
.wx-v17-layout-active #body p,.wx-v17-layout-active #wxV17BookHost .wx-v17-book-page-text p{margin-block:0 var(--wx-v17-paragraph);font-size:inherit;line-height:inherit}

/* V17 child brand: scoped to the shared public reader, never the review console. */
.wx-reader-app[data-wx-v17-brand="children"] {
 --wx-bg:#fff9e9;--wx-paper:#ffffff;--wx-ink:#23445b;--wx-soft:#426477;--wx-edge:#b9dbe8;--wx-accent:#176581;
 --wx-child-blue:#d8f0ff;--wx-child-yellow:#fff0b4;--wx-child-green:#d9f2d2;--wx-child-pink:#ffded9;--wx-child-purple:#e9e1ff;
}
.wx-reader-app[data-wx-v17-brand="children"] #wxReaderContent {background:var(--wx-bg);color:var(--wx-ink);border-radius:22px;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-top,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom {background:#fff7db;color:#23445b;border:2px solid #c8e5ef;border-radius:18px;box-shadow:0 4px 14px #22445b12;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-logo {color:#176581;text-align:center;padding:.25rem;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom button {min-width:0;min-height:52px;border:1px solid #7499ad;border-radius:13px;color:#23445b;background:var(--wx-child-blue);font-weight:800;box-shadow:none;margin:0;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button:nth-child(2),
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom button:nth-child(2){background:var(--wx-child-yellow)}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button:nth-child(3),
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom button:nth-child(3){background:var(--wx-child-green)}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button:nth-child(4),
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom button:nth-child(4){background:var(--wx-child-pink)}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button:nth-child(5){background:var(--wx-child-purple)}
.wx-reader-app[data-wx-v17-brand="children"] #wxV17EditionPicker,
.wx-reader-app[data-wx-v17-brand="children"] .wx-reading-auto,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-dialog {background:#f0faff;color:#23445b;border:1px solid #a8cfdf;border-radius:18px;padding:1rem;}
.wx-reader-app[data-wx-v17-brand="children"] #wxReaderContent select,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-dialog select,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-dialog button {min-height:48px;border:1px solid #7499ad;border-radius:12px;background:white;color:#23445b;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-book-page {background:white;color:#23445b;border:1px solid #b9dbe8;border-radius:18px;overflow:hidden;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-book-page-text {padding:.75rem;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-book-image-error {color:#814214;background:#fff0d3;padding:.75rem;border-radius:12px;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-top button:focus-visible,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom button:focus-visible,
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-dialog :is(button,select):focus-visible {outline:3px solid #176581;outline-offset:2px;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-bottom button:disabled{opacity:.55;cursor:default;}
@media(max-width:360px){.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button{font-size:.65rem;padding:.2rem 0;}}

/* Child theme: preserve single-row V17, constrain content and respect reduced motion. */
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-settings button {overflow-wrap:normal;word-break:break-all;}
.wx-reader-app[data-wx-v17-brand="children"] #wxV17Age {width:100%;max-width:26rem;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-book-page img {max-width:100%;height:auto;object-fit:contain;}
.wx-reader-app[data-wx-v17-brand="children"] .wx-v17-dialog {box-sizing:border-box;max-width:calc(100vw - 24px);}
@media(prefers-reduced-motion:reduce){.wx-reader-app[data-wx-v17-brand="children"] :is(.wx-v17-top,.wx-v17-bottom,.wx-v17-book-page) {scroll-behavior:auto;transition:none;animation:none;}}
