.study-page{max-width:1180px;margin:auto;padding:42px 28px 56px;color:#635242}
.study-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:28px}.study-heading>div{flex:1;min-width:0}.study-heading h1{font-family:Georgia,serif;font-weight:500;color:#514564;font-size:clamp(28px,4vw,44px);margin:0 0 12px}.study-heading p{line-height:1.6}.study-eyebrow{font-weight:800;letter-spacing:2px;color:#806398}.study-back{color:#806398;white-space:nowrap}.study-heading-links{display:flex;flex-direction:column;align-items:flex-end;gap:12px;flex:0 0 auto;width:max-content;max-width:100%;margin-top:12px}.study-heading-links a{color:#806398;white-space:nowrap}#studyIntro{max-width:none}#studyIntro strong{font-weight:800;color:#514564}
.study-controls{display:flex;align-items:end;flex-wrap:wrap;gap:20px;background:#fff9df;border:2px solid #e6d9b8;border-radius:20px;padding:22px;margin-bottom:20px}.study-controls label{display:flex;flex-direction:column;gap:8px;font-weight:650}.study-controls select{background:#fffdf4;border:2px solid #d6bf8b;border-radius:12px;padding:10px 14px;min-width:200px;max-width:100%}.study-count{margin-left:auto;padding:10px 0;font-weight:700}.study-translation-note{margin:-10px 4px 18px;color:#756587;font-size:14px;line-height:1.5}
.study-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:16px}.study-actions button,.study-play{border:2px solid #d6bf8b;border-radius:12px;padding:10px 16px;background:#fff9df;font-weight:650;text-decoration:none}.study-play{background:#c4e39b;border-color:#9abb75;margin-left:auto;color:#415b28}.study-actions button:disabled,.study-play[aria-disabled="true"]{opacity:.5;cursor:default}
.study-actions #exportHskFlashcards{display:inline-flex;align-items:center;justify-content:center;gap:8px;color:#806398}.study-export-lock{width:17px;height:17px;flex:0 0 17px}body.is-member #exportHskFlashcardsLock{display:none}
.study-action-spacer{flex:1}.study-actions #exportStage,.study-actions #exportLevel{color:#806398}.study-actions #cancelExport{color:#805d55;background:#fff4ed;border-color:#d7a99e}.study-export-progress{display:flex;align-items:center;gap:12px;margin:-4px 0 18px;color:#806398;font-size:14px}.study-export-progress progress{width:min(260px,40%);height:12px;accent-color:#9476cf}.study-export-progress[hidden]{display:none}
.study-noscript{background:#fff9df;border:2px solid #e6d9b8;border-radius:20px;padding:22px;margin:24px 0 0}.study-noscript h2{font-family:Georgia,serif;font-weight:500;color:#514564;font-size:22px;margin:0 0 12px}.study-noscript p{line-height:1.7;margin:0 0 12px}.study-noscript p:last-child{margin-bottom:0}.study-noscript a{color:#806398}
.study-faq,.study-related{margin:44px 0 0}.study-faq h2,.study-related h2{font-family:Georgia,serif;font-weight:500;color:#514564;font-size:clamp(20px,2.6vw,28px);margin:0 0 16px}
.study-faq h3{font-size:17px;color:#514564;margin:22px 0 8px}.study-faq p{line-height:1.75;margin:0}
.study-related-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 24px}.study-related-list li{min-width:0;border-bottom:1px solid #e6d9b8}.study-related-list li[hidden]{display:none}.study-related-list a{display:block;padding:12px 0;color:#806398;line-height:1.6;overflow-wrap:anywhere}
.study-word-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.study-word{position:relative;background:#fff9df;border:2px solid #e1d2ab;border-bottom:5px solid #cbb987;border-radius:22px;padding:24px;display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}.study-word:nth-child(2n){background:#eee3fb;border-color:#c9b6e2;border-bottom-color:#b39acc}.study-word-number{align-self:start;color:#9b80c8;font-weight:800;font-size:13px}.study-pinyin{font-size:22px;color:#806398;line-height:1.4;overflow-wrap:anywhere;margin:10px 0 6px}.study-hanzi{font-size:36px;line-height:1.3;font-weight:700;margin:0 0 12px}.study-meaning{font-size:22px;line-height:1.4;overflow-wrap:anywhere;margin:0 0 12px}.study-pos{font-size:14px;line-height:1.6;color:#8b7663;margin:0 0 20px;overflow-wrap:anywhere}.study-audio{display:flex;align-items:center;justify-content:center;padding:0;width:43px;height:43px;flex-shrink:0;background:#fff9df;border:2px solid #d6b775;border-bottom:5px solid #c4a565;border-radius:15px;margin-top:auto;cursor:pointer}.study-audio img{display:block;width:32px;height:32px;object-fit:contain}.study-audio.is-playing{outline:3px solid #9476cf;outline-offset:2px}.study-revisited{font-size:12px;color:#708a4d;margin-top:12px}#studyAudioStatus{color:#806398;min-height:24px}
@media(max-width:900px){.study-word-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.study-count{margin-left:0}.study-heading-links{max-width:100%;gap:10px}.study-related-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:0 16px}}
@media(max-width:600px){.study-page{padding:24px 16px 36px}.study-heading{flex-direction:column;align-items:start;gap:8px}.study-heading-links{max-width:100%;align-items:flex-start;justify-content:flex-start;margin-top:12px}.study-controls{padding:16px;gap:16px}.study-controls label{width:100%}.study-controls select{width:100%}.study-word-grid{grid-template-columns:1fr;gap:16px}.study-word{padding:22px}.study-play{margin-left:0;width:100%;text-align:center}.study-actions button{flex:1}.study-meaning{font-size:22px}.study-hanzi{font-size:38px}.study-related-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}}

#studyIntro>p{margin:0 0 12px;line-height:1.6}
#studyIntro>p:last-child{margin-bottom:0}
.study-heading-links{margin-top:88px}
@media(max-width:900px){.study-heading-links{margin-top:64px}}
@media(max-width:600px){.study-heading-links{margin-top:12px}}

/* Clickable card: the text region opens the word card, the speaker button stays a sibling
   so the two interactive elements are never nested inside each other. */
.study-word{cursor:pointer;transition:transform .12s,box-shadow .12s}
.study-word:hover{transform:translateY(-3px)}
.study-word-open{display:flex;flex-direction:column;align-items:center;width:100%;text-align:center}
.study-word-open:focus-visible{outline:3px solid #7560bc;outline-offset:4px;border-radius:12px}
.study-word-meta-line{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:18px}
.study-collect-inline-status{margin:0;color:#708a4d;font-size:13px;font-weight:650;line-height:1.3;text-align:center;position:absolute;left:50%;transform:translateX(-50%)}
.study-word-meta-line{position:relative}
.study-word-actions.has-collect{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:14px;width:100%;margin-top:auto}
.study-word-actions.has-collect .study-collect-gourd{position:static;top:auto;left:auto;transform:none;flex:0 0 44px}
.study-word-actions.has-collect .study-audio{margin-top:0}
.study-word-actions.has-collect .study-export{max-width:none;flex:0 0 auto;white-space:nowrap}
@media(max-width:600px){.study-word-actions.has-collect{gap:8px}}

/* Word card modal. The < > buttons are absolutely positioned inside the wrap so the card
   keeps its full width on narrow screens instead of being squeezed between them. */
.study-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}
/* 440 → 520：底部三个控件里 Export as image 最宽（约 143px），播放按钮又要严格居中，
   于是每一侧都得容下「按钮宽度 + 间距」。440/480 时右侧只剩 10px 左右，仍然贴着播放按钮。
   窄屏走 min(x,100%) 照旧，所以这个改动只影响桌面端。 */
.study-modal-wrap{position:relative;width:min(560px,100%)}
.study-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}
.study-modal-card{display:flex;flex-direction:column;align-items:center;text-align:center}
.study-modal-actions{position:relative;display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:44px;margin-top:22px}
.study-modal-actions .study-audio{margin-top:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
.study-collect-gourd{position:absolute;top:50%;left:calc(50% - 84px);transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:3px;background:#fff9df;border:2px solid #d6b775;border-bottom:5px solid #c4a565;border-radius:15px;cursor:pointer}
.study-modal-actions.has-collect{display:flex;justify-content:space-between;gap:14px}
.study-modal-actions.has-collect>*{position:static;transform:none;max-width:none;min-width:max-content}
.study-collect-gourd img{display:block;width:34px;height:34px;object-fit:contain}
/* Keep the three-control layout safe for long translations. */
.study-modal-actions .study-autoplay,.study-modal-actions .study-export{max-width:calc(50% - 44px)}
.study-autoplay{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:#806398;cursor:pointer;user-select:none}
.study-autoplay input{width:18px;height:18px;margin:0;accent-color:#9476cf;cursor:pointer}
.study-export{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;font-size:13px;font-weight:650;color:#806398;background:#fff9df;border:2px solid #d6bf8b;border-bottom:4px solid #c4a565;border-radius:12px;cursor:pointer}
.study-export:hover:not(:disabled){background:#fff3c5}
.study-export:disabled{opacity:.6;cursor:default}
.study-modal-status{color:#806398;font-size:13px;min-height:20px;margin:8px 0 0;text-align:center}
.study-collect-confirm-backdrop{position:fixed;inset:0;z-index:400;display:flex;align-items:center;justify-content:center;padding:20px;background:#54463266;backdrop-filter:blur(4px)}
.study-collect-confirm-backdrop[hidden]{display:none}
.study-collect-confirm{width:min(440px,100%);padding:25px 28px 22px;text-align:center;background:#fff9df;border:4px solid #f5dba1;border-radius:24px;box-shadow:0 10px #59452b22}
.study-collect-confirm p{margin:0;color:#635242;font-size:18px;font-weight:700;line-height:1.45}
.study-collect-confirm-actions{display:flex;justify-content:center;gap:12px;margin-top:20px}
.study-collect-confirm-actions button{min-width:110px;padding:10px 18px;border:2px solid #d6bf8b;border-bottom-width:4px;border-radius:12px;background:#fffdf4;color:#806398;font-size:15px;font-weight:700;cursor:pointer}
.study-collect-confirm-actions .study-collect-confirm-ok{background:#b5dc7b;border-color:#89b354;color:#415b28}
.study-collect-login-backdrop{z-index:410}
.study-collect-login-actions{flex-direction:column;align-items:stretch}
.study-collect-login-actions button{width:100%}
.study-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}
.study-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:24px;font-weight:700;line-height:1}
.study-nav-prev{left:6px}.study-nav-next{right:6px}
.study-nav:disabled{opacity:.35;cursor:default}
@media(max-width:600px){.study-modal{padding:30px 50px 20px}.study-nav{width:40px;height:40px;font-size:20px}.study-nav-prev{left:2px}.study-nav-next{right:2px}.study-modal-close{width:30px;height:30px;font-size:17px}
.study-modal-actions.has-collect{justify-content:center;flex-wrap:wrap;gap:12px 20px}}

.study-eyebrow{display:flex;align-items:center;gap:9px;margin:0 0 18px;color:#806398;font-size:15px;font-weight:800;letter-spacing:1px}.study-eyebrow a{color:inherit;text-decoration:none}.study-eyebrow a:hover,.study-eyebrow a[aria-current="page"]{text-decoration:underline;text-underline-offset:4px}.study-eyebrow a:focus-visible{outline:2px solid #806398;outline-offset:3px;border-radius:3px}
