.wordbook-page{max-width:1180px;padding:42px 24px 64px;margin:auto;color:#635242;min-height:65vh}.book-heading{display:flex;align-items:center;justify-content:space-between;gap:24px}.book-heading h1{font-family:Georgia,serif;font-size:44px;color:#514564;margin:8px 0}.book-heading img{width:58px;height:58px;object-fit:contain}.book-title-row{display:flex;align-items:center;gap:16px}.book-heading a{color:#806398}.wordbook-page p{line-height:1.6}.book-summary-panel{padding:18px 20px;background:#fff9df;border:2px solid #e1d2ab;border-radius:20px;margin:20px 0 14px}.book-summary-panel h2{margin:0 0 12px;font-size:17px;color:#6b5949}.book-summary{display:flex;flex-wrap:wrap;gap:10px}.book-summary-chip{border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:14px;background:#fffdf2;color:#806398;padding:9px 14px;font-weight:750;cursor:pointer}.book-summary-chip[aria-pressed=true]{background:#eee3fb;border-color:#c9b6e2;border-bottom-color:#b39acc}.book-controls{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(150px,.8fr) minmax(240px,1.5fr) auto;align-items:end;gap:14px 16px;padding:20px;background:#fff9df;border:2px solid #e1d2ab;border-radius:20px;margin:14px 0 20px}.book-controls label{display:flex;flex-direction:column;gap:7px;min-width:0;color:#6b5949;font-weight:650}.book-controls input,.book-controls select{width:100%;min-width:0;border:2px solid #d8c897;border-radius:12px;padding:11px 13px;background:#fffdf2;color:#635242;font-size:16px}.book-controls .book-language-field{grid-column:1/-1;display:flex;flex-direction:row;align-items:center;gap:12px;padding-top:12px;border-top:1px solid #e1d2ab}.book-language-field span{white-space:nowrap}.book-language-field select{width:auto;min-width:180px}.book-search-button{min-height:45px;border:2px solid #9abb75;border-bottom:5px solid #7d9d4f;border-radius:13px;background:#c4e39b;color:#415b28;padding:9px 22px;font-size:16px;font-weight:750;cursor:pointer}.book-search-button:hover{filter:brightness(.98)}#bookCount{min-height:22px;color:#806398;font-weight:700}#bookFallback,#bookStatus{color:#806398}#bookStatus{min-height:24px}.book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.book-word{position:relative;min-width:0;min-height:292px;display:flex;flex-direction:column;align-items:center;padding:24px;border:2px solid #e1d2ab;border-bottom:5px solid #cbb987;border-radius:22px;background:#fff9df;text-align:center;cursor:pointer;transition:transform .12s,box-shadow .12s}.book-word:nth-child(2n){background:#eee3fb;border-color:#c9b6e2;border-bottom-color:#b39acc}.book-word:hover{transform:translateY(-3px)}.book-word-open{width:100%;display:flex;align-items:center;flex-direction:column;text-align:center}.book-word-open:focus-visible{outline:3px solid #7560bc;outline-offset:5px;border-radius:12px}.book-word .study-word-meta-line{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:20px}.book-badge{align-self:flex-start;color:#806398;font-size:13px;font-weight:750}.book-pinyin{font-size:22px;color:#806398;line-height:1.4;margin:10px 0 6px;overflow-wrap:anywhere}.book-hanzi{font-size:36px;line-height:1.3;font-weight:700;color:#635242;margin:0 0 12px}.book-meaning{font-size:22px;line-height:1.4;color:#635242;margin:0 0 12px;overflow-wrap:anywhere}.book-pos{font-size:14px;line-height:1.6;color:#8b7663;margin:0 0 20px;overflow-wrap:anywhere}.book-actions{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:12px;width:100%;margin-top:auto;padding-top:12px}.book-actions button{min-height:44px;border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:13px;background:#fff9df;color:#806398;padding:8px 11px;font-weight:650;cursor:pointer}.book-actions .book-delete{color:#a45164;flex:0 0 44px;padding:5px;font-size:13px}.book-actions .book-play{color:#9476cf;flex:0 0 44px;padding:5px;font-size:21px}.book-actions .book-export{white-space:nowrap;font-size:13px}.book-actions button:disabled{opacity:.6;cursor:default}.is-playing{outline:3px solid #9476cf;outline-offset:2px}#bookEmpty{padding:45px 20px;background:#fffdf2;border:2px dashed #d4c2e8;border-radius:20px;text-align:center}.book-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin:28px 0}.book-pagination[hidden]{display:none}.book-page-button{border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:12px;background:#fff9df;color:#806398;padding:9px 16px;font-weight:700;cursor:pointer}.book-page-button:disabled{opacity:.45;cursor:default}.book-page-label{font-weight:700;color:#6b5949}
.book-modal-backdrop{position:fixed;inset:0;z-index:300;background:#54463266;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:20px}.book-modal-wrap{position:relative;width:min(560px,100%)}.book-modal{position:relative;width:100%;max-height:88vh;overflow:auto;background:#fff9df;border:5px solid #f5dba1;border-radius:28px;padding:34px 66px 24px;box-shadow:0 12px #59452b22}.book-modal-card{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}.book-modal-badge{align-self:flex-start;color:#9b80c8;font-size:14px;font-weight:700}.book-modal-pinyin{font-size:26px;color:#806398;margin:24px 0 8px;overflow-wrap:anywhere}.book-modal-hanzi{font-size:76px;line-height:1.2;color:#635242;margin:0 0 20px}.book-modal-meaning{font-size:30px;color:#635242;margin:0 0 22px;overflow-wrap:anywhere}.book-modal-pos{font-size:18px;color:#8b7663;margin:0 0 14px}.book-modal-actions{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;margin-top:18px}.book-modal-actions button{min-width:44px;min-height:44px;border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:12px;background:#fffdf2;color:#806398;padding:8px 12px;font-weight:650;cursor:pointer}.book-modal-actions .book-modal-play{font-size:21px;color:#9476cf}.book-modal-actions .book-modal-delete{color:#a45164}.book-modal-actions .book-export{font-size:13px}.book-modal-actions button:disabled{opacity:.6;cursor:default}.book-modal-status{min-height:20px;margin:8px 0 0;text-align:center;color:#806398;font-size:13px}.book-modal-close{position:absolute;top:8px;right:10px;width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center;background:#fffdf4;border:2px solid #e1d2ab;border-radius:12px;color:#806398;font-size:20px;line-height:1;cursor:pointer}.book-modal-nav{position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:48px;height:48px;padding:0;display:flex;align-items:center;justify-content:center;background:#fff9df;border:2px solid #d6bf8b;border-bottom:4px solid #c4a565;border-radius:16px;color:#806398;font-size:28px;font-weight:700;line-height:1;cursor:pointer}.book-modal-prev{left:6px}.book-modal-next{right:6px}.book-modal-nav:disabled{opacity:.35;cursor:default}
@media(max-width:850px){.book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.book-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.book-search-field{grid-column:1/-1}.book-search-button{justify-self:start}}
@media(max-width:550px){.wordbook-page{padding:24px 16px}.book-heading{align-items:start;flex-direction:column;gap:8px}.book-heading h1{font-size:36px}.book-controls{grid-template-columns:1fr;padding:14px;gap:12px}.book-controls .book-search-field{grid-column:auto}.book-controls .book-language-field{grid-column:auto;align-items:flex-start;flex-direction:column}.book-language-field select{width:100%}.book-search-button{width:100%}.book-grid{grid-template-columns:1fr;gap:16px}.book-word{min-height:275px;padding:22px}.book-modal-backdrop{padding:10px}.book-modal{padding:30px 50px 20px}.book-modal-hanzi{font-size:58px}.book-modal-meaning{font-size:24px}.book-modal-nav{width:40px;height:40px;font-size:22px}.book-modal-prev{left:2px}.book-modal-next{right:2px}.book-modal-close{width:30px;height:30px;font-size:17px}.book-modal-actions{gap:7px;flex-wrap:wrap}.book-modal-actions button{padding:7px 9px;font-size:12px}}
.book-actions .book-delete{padding:8px}.book-delete svg{display:block;width:24px;height:24px;margin:auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.book-actions .book-play,.book-modal-actions .book-play{display:flex;align-items:center;justify-content:center;flex:0 0 43px;width:43px;height:43px;min-width:43px;min-height:43px;padding:0;background:#fff9df;border:2px solid #d6b775;border-bottom:5px solid #c4a565;border-radius:15px;color:#806398;cursor:pointer}
.book-actions .book-play img,.book-modal-actions .book-play img{display:block;width:32px;height:32px;object-fit:contain}
.book-autoplay{display:inline-flex;align-items:center;gap:7px;color:#806398;font-size:13px;white-space:nowrap;cursor:pointer;user-select:none}
.book-autoplay input{width:18px;height:18px;margin:0;accent-color:#9476cf;cursor:pointer}
.book-modal-actions{justify-content:space-between;gap:10px}
.book-modal-actions .book-autoplay{flex:0 0 auto}
.book-modal-actions .book-delete{flex:0 0 43px;width:43px;height:43px;min-width:43px;min-height:43px;padding:5px}
.book-modal-actions .book-export{flex:0 1 auto;white-space:nowrap}
.book-modal-actions .book-play{flex:0 0 43px}
@media(max-width:550px){.book-modal-actions{gap:6px;flex-wrap:wrap;justify-content:center}.book-modal-actions .book-autoplay{gap:4px;font-size:12px}.book-modal-actions .book-export{font-size:11px;padding:7px 8px}}
/* Heading: the two lines under the title are one block of text, not two paragraphs. */
#bookSubtitle{margin:0;color:#806398;font-weight:650}
#bookNote{margin:0;color:#756579}
.book-heading-links{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}
.book-heading-links a{font-weight:700;white-space:nowrap}
.book-heading-links a:focus-visible{outline:3px solid #7560bc;outline-offset:3px;border-radius:8px}
/* Desktop: the note takes its own full-width line under the heading. Phones: it sits right below the subtitle, above the links. */
.book-heading{flex-wrap:wrap}
#bookNote{flex:1 0 100%;order:2}
@media(min-width:551px){.book-heading{row-gap:0}}
@media(max-width:550px){#bookNote{flex:0 0 auto;order:1}.book-heading-links{order:2}}
.book-flashcards{margin:34px 0 0;padding:20px;background:#fff9df;border:2px solid #e1d2ab;border-radius:20px}
.book-flashcards h2{margin:0 0 8px;font-size:17px;color:#6b5949}
.book-flashcards p{margin:0 0 14px;color:#756579}
.book-flashcard-links{display:flex;flex-wrap:wrap;gap:10px}
.book-flashcard-links a{display:inline-block;padding:9px 14px;border:2px solid #c9b6e2;border-bottom-width:4px;border-radius:14px;background:#eee3fb;color:#514564;font-weight:750;text-decoration:none}
.book-flashcard-links a:hover{background:#e4d6f8}
.book-flashcard-links a:focus-visible{outline:3px solid #7560bc;outline-offset:3px}
.book-login-backdrop{position:fixed;inset:0;z-index:400;background:#54463266;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:20px}
.book-login{width:min(430px,100%);background:#fff9e5;border:5px solid #f5dba1;border-radius:26px;padding:26px 24px;text-align:center;box-shadow:0 12px #59452b22}
.book-login p{margin:0 0 18px;font-size:16px;color:#6b5949}
.book-login-actions{display:flex;flex-direction:column;gap:9px}
.book-login-actions button{min-height:46px;border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:12px;background:#fffdf2;color:#6b5949;font-size:15px;font-weight:700;cursor:pointer}
.book-login-actions .book-login-ok{border-color:#89b354;border-bottom-color:#6f9b40;background:#b5dc7b;color:#415b28}
.book-login-actions button:focus-visible{outline:3px solid #7560bc;outline-offset:3px}
@media(max-width:550px){.book-heading-links{align-items:flex-start}.book-flashcards{padding:16px}.book-flashcard-links{gap:8px}}

.book-heading-copy{flex:1 0 100%;order:2;min-width:0}.book-heading-copy p{margin:0}#bookPremiumNote{margin-top:8px;color:#806398;font-weight:650}.book-search-button{display:inline-flex;align-items:center;justify-content:center;gap:8px}.book-page-button{display:inline-flex;align-items:center;justify-content:center;gap:8px}.book-lock-icon{display:inline-block;width:17px;height:17px;flex:0 0 17px;color:currentColor}#bookPremiumNote[hidden],#bookSearchLock[hidden]{display:none}
@media(max-width:550px){.book-heading-copy{order:1}.book-heading-links{order:2}}.book-delete-confirm-backdrop{position:fixed;inset:0;z-index:500;background:#54463266;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:20px}.book-delete-confirm{width:min(560px,100%);background:#fff9e5;border:5px solid #f5dba1;border-radius:26px;padding:30px 28px;box-shadow:0 12px #59452b22}.book-delete-confirm p{margin:0;color:#6b5949;line-height:1.55;text-align:center}.book-delete-confirm #bookDeleteQuestion{font-size:20px;font-weight:750;margin-bottom:12px}.book-delete-confirm #bookDeleteExplanation{font-size:15px;margin-bottom:22px}.book-delete-confirm-actions{display:flex;flex-direction:column;gap:10px}.book-delete-confirm-actions button{min-height:48px;padding:10px 16px;border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:13px;background:#fffdf2;color:#6b5949;font-size:15px;font-weight:750;cursor:pointer}.book-delete-confirm-actions #bookDeleteConfirm{border-color:#89b354;border-bottom-color:#6f9b40;background:#b5dc7b;color:#415b28}.book-delete-confirm-actions button:focus-visible{outline:3px solid #7560bc;outline-offset:3px}
@media(max-width:550px){.book-delete-confirm{padding:24px 18px}.book-delete-confirm #bookDeleteQuestion{font-size:18px}.book-delete-confirm-actions button{font-size:14px}}
.book-delete-confirm-backdrop[hidden]{display:none}

body.is-member #bookSearchLock{display:none!important}

/* Keep the Wordbook intro text in its own column beside the three game shortcuts. */
.wordbook-page .book-heading{display:grid;grid-template-columns:minmax(0,1fr) 360px;grid-template-areas:"intro actions" "copy actions";align-items:start;column-gap:24px;row-gap:8px;position:relative;flex-wrap:initial}
.wordbook-page .book-heading>div:first-child{grid-area:intro;min-width:0}
.wordbook-page .book-heading-copy{grid-area:copy;display:block;flex:none;order:initial;width:auto;max-width:none;min-width:0;margin:0}
.wordbook-page .book-heading-copy p{margin:0}
.wordbook-page #bookNote{flex:none;order:initial;max-width:none}
.wordbook-page .book-heading-links{grid-area:actions;position:static;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-end;gap:12px;min-width:0;margin-top:70px}
.wordbook-page .book-heading-links>a{box-sizing:border-box;display:flex;flex:0 0 108px;width:108px;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;margin:0;padding:0;border:0;border-radius:18px;background:transparent;color:#635242;font-size:16px;font-weight:700;line-height:1.2;text-align:center;text-decoration:none;white-space:nowrap;transition:color .15s,transform .15s}
.wordbook-page .book-heading-links .learn-vocab-icon{display:grid;place-items:center;width:60px;height:60px;box-sizing:border-box;border:2px solid #b59ddc;border-radius:16px;background:#c9b6ef;transition:background .15s,border-color .15s}
.wordbook-page .book-heading-links .learn-vocab-icon img{display:block;width:42px;height:42px;object-fit:contain}
.wordbook-page .book-heading-links .player-hub{position:static;right:auto;top:auto;float:none;flex:0 0 108px;width:108px;gap:10px;margin:0;color:#635242;font-size:16px;font-weight:700;text-align:center;text-decoration:none}
.wordbook-page .book-heading-links .player-hub .brand-icon{display:grid;place-items:center;width:60px;height:60px;box-sizing:border-box;padding:0;border:2px solid #b59ddc;border-radius:16px;background:#c9b6ef;color:#fff;font-size:38px}
.wordbook-page .book-heading-links>a:hover{color:#9476cf;transform:translateY(-1px)}
.wordbook-page .book-heading-links .learn-vocab-link:hover .learn-vocab-icon,.wordbook-page .book-heading-links .player-hub:hover .brand-icon{background:#d8caf7;border-color:#a98bc7}
.wordbook-page .book-heading-links>a:focus-visible{outline:3px solid #7560bc;outline-offset:4px;border-radius:18px}
@media(max-width:900px){.wordbook-page .book-heading{grid-template-columns:minmax(0,1fr) 300px;column-gap:16px}.wordbook-page .book-heading-links{gap:8px;margin-top:58px}.wordbook-page .book-heading-links>a,.wordbook-page .book-heading-links .player-hub{flex-basis:94px;width:94px;font-size:13px;gap:8px}.wordbook-page .book-heading-links .learn-vocab-icon,.wordbook-page .book-heading-links .player-hub .brand-icon{width:52px;height:52px;border-radius:14px}.wordbook-page .book-heading-links .learn-vocab-icon img{width:36px;height:36px}.wordbook-page .book-heading-links .player-hub .brand-icon{font-size:32px}}
@media(max-width:700px){.wordbook-page .book-heading{grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "copy" "actions";row-gap:8px}.wordbook-page .book-heading-links{justify-content:flex-end;margin:8px 0 6px}.wordbook-page .book-heading-links>a,.wordbook-page .book-heading-links .player-hub{flex-basis:92px;width:92px;gap:6px;font-size:12px}.wordbook-page .book-heading-links .learn-vocab-icon,.wordbook-page .book-heading-links .player-hub .brand-icon{width:46px;height:46px;border-radius:13px}.wordbook-page .book-heading-links .learn-vocab-icon img{width:32px;height:32px}.wordbook-page .book-heading-links .player-hub .brand-icon{font-size:30px}}
@media(max-width:380px){.wordbook-page .book-heading-links{gap:4px}.wordbook-page .book-heading-links>a,.wordbook-page .book-heading-links .player-hub{flex-basis:84px;width:84px;font-size:11px}.wordbook-page .book-heading-links .learn-vocab-icon,.wordbook-page .book-heading-links .player-hub .brand-icon{width:42px;height:42px;border-radius:12px}.wordbook-page .book-heading-links .learn-vocab-icon img{width:30px;height:30px}.wordbook-page .book-heading-links .player-hub .brand-icon{font-size:27px}}
