.member-nav{font-size:12px;white-space:nowrap;color:var(--green);margin-left:0}
.account-layout{max-width:1000px;margin:35px auto;display:grid;grid-template-columns:180px 1fr;gap:24px}
.member-panel{background:#fff;border:1px solid var(--line);padding:26px;border-radius:12px}
.account-menu{display:flex;flex-direction:column;gap:7px;align-self:start}
.account-menu button{text-align:left;padding:12px;border-radius:7px}
.account-menu button[aria-current=true]{background:#e4efdf;color:#286b51}
.member-panel h2{font-size:22px;margin-top:0}.member-panel p{line-height:1.8;color:var(--muted)}
.member-form{max-width:430px;margin:40px auto}
.member-form label{display:block;margin:18px 0;font-size:13px}
.member-form input,.member-panel select{display:block;width:100%;padding:12px;margin-top:8px;border:1px solid var(--line);border-radius:6px;font:inherit}
.member-form .primary{width:100%}.member-links{display:flex;gap:15px;flex-wrap:wrap;margin-top:20px;font-size:12px;color:var(--green)}
.member-error{color:#bd6251!important;white-space:pre-wrap}.member-summary{margin:25px 0 0}.member-summary h1{font-size:26px}.member-summary .primary{display:inline-block}
.member-row{padding:18px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.member-row h3{margin:0 0 8px;font-size:17px}.member-row p{white-space:pre-line}.member-row a,.member-row button{color:var(--green);font-size:13px;margin-right:12px}
.member-stats{display:flex;gap:28px;flex-wrap:wrap}.member-stats strong{font-size:30px;display:block;color:var(--green)}
.sentence-star[role=button]{cursor:pointer!important}.sentence-star[aria-pressed=true] svg{fill:#d5b65d!important;stroke:#b29748!important}
#saveWord{padding:7px 12px;border:1px solid var(--line);border-radius:6px;color:var(--green);margin-top:10px}
.dictionary-dialog{width:min(336px,calc((100vw - 32px)*.7));max-width:336px;padding:20px;border-radius:8px}
.dictionary-entry{gap:8px;padding-right:14px}
.dictionary-entry h2{font-size:22px;min-width:0}
.dictionary-dialog .dictionary-meta{font-size:11px;gap:8px;margin:6px 0 12px;flex-wrap:wrap}
.dictionary-dialog .dictionary-translation{font-size:14px;margin-bottom:10px;line-height:1.65}
.dictionary-dialog .dictionary-close{right:8px;top:3px;font-size:24px}
.dictionary-dialog #dictionaryStatus{font-size:10px;min-height:12px;margin:7px 0}
.dictionary-dialog .dictionary-done{font-size:12px;padding:6px 13px;margin-top:8px}
.dictionary-entry #saveWord{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:2px;margin:0;border:0;background:transparent;color:var(--green)}
#saveWord svg{display:block;width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
#saveWord[aria-pressed=true] svg{fill:#d8b655;stroke:#b38a27}
.dictionary-word-actions{display:flex;align-items:center;gap:8px;flex:none}
@media(max-width:850px){
 .dictionary-entry{flex-wrap:wrap;align-items:center}
 .dictionary-entry h2{flex:0 0 auto;width:max-content;max-width:100%;overflow-wrap:anywhere}
 .dictionary-word-actions{flex:0 0 auto}
}
html[data-theme=dark] .member-panel{background:#1d2922}html[data-theme=dark] .account-menu button[aria-current=true]{background:#324d3a;color:#d5edda}
@media(max-width:850px){.account-layout{grid-template-columns:1fr;margin-top:18px}.account-menu{flex-direction:row;flex-wrap:wrap;gap:4px;padding:12px}.account-menu button{font-size:12px;padding:9px}.member-panel{padding:20px}body>header{flex-wrap:wrap;height:auto;min-height:70px;padding-top:10px;padding-bottom:10px}body>header .member-nav{margin-left:auto}body>header>.theme-toggle{margin-left:0}}
@media(max-width:440px){body>header .member-nav{font-size:11px}body>header{column-gap:8px}.lesson-page>header #help{display:none}}

/* Mobile lesson word popup: width, word size, icons and translation. */
.phonetic-tags{display:inline-flex;flex-wrap:wrap;gap:7px}
.phonetic-tag{display:inline-block;background:#f1f2f1;color:#818981;padding:4px 9px;border-radius:5px;line-height:1.5;font-weight:400}
html[data-theme=dark] .phonetic-tag{background:#303a34;color:#bec8c0}
@media(max-width:850px){
 .lesson-page #dictionaryDialog{width:90vw;max-width:90vw;padding:12px 20px}
 .lesson-page #dictionaryWord{font-size:19.8px;line-height:32px}
 .lesson-page #dictionaryDialog .dictionary-entry{min-height:32px;padding-right:32px}
 .lesson-page #dictionaryClose{display:grid;place-items:center;top:12px;right:12px;width:32px;height:32px;padding:0;font-size:31.2px;line-height:1}
 .lesson-page #dictionaryCloseBottom{display:none}
 .lesson-page #dictionaryDialog .dictionary-meta{margin:3px 0 6px;line-height:1.5}
 .lesson-page #dictionaryDialog .dictionary-translation{margin:0;line-height:1.55;min-height:4.65em}
 .lesson-page #dictionaryStatus{margin:4px 0 0;min-height:0}
 .lesson-page #dictionaryStatus:empty{display:none}
 .lesson-page #dictionaryAudio,.lesson-page .dictionary-entry #saveWord{width:25.6px;height:25.6px;min-width:25.6px;min-height:25.6px}
 .lesson-page #dictionaryAudio svg{width:14.4px;height:14.4px}
 .lesson-page #saveWord svg{width:22.4px;height:22.4px}
 .lesson-page #dictionaryTranslation{font-size:12.8px;font-weight:500}
}

/* Keep lesson popup controls reachable on mobile and in fullscreen. */
.lesson-page #dictionaryDialog{position:fixed;inset:0;margin:auto;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.lesson-page #dictionaryClose{z-index:2;pointer-events:auto;touch-action:manipulation}
@media(max-width:850px){.lesson-page #dictionaryCloseBottom{display:block;touch-action:manipulation}}
