/* v3.10 follow-up fixes: visual density, draft selection, document select, pencil, Japanese font */
:root,html,body,button,input,textarea,select,option,.app,.dialog,#study{font-family:'Noto Sans JP','Noto Sans KR',sans-serif!important;font-synthesis:none}
body{font-weight:400}
.app .jp,.app .term-text,.app .wordcell{font-weight:500!important}
.app .meaning,.dialog .detail-example,.passage-original,.passage-body{font-weight:400!important}
h1,h2,h3,strong,.workspace-nav .active,.studentchip.active,.tab.active{font-weight:600!important}
rt,.term-reading{font-weight:400!important}
/* Full-width workspaces with no wasted right side. */
.workspace-nav{box-sizing:border-box!important;width:calc(100% - 24px)!important;max-width:none!important;margin-inline:12px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:3px!important}
.workspace-nav button{min-width:0!important;width:100%!important;display:flex!important;align-items:center;justify-content:center;text-align:center}
.teacher .studentstrip{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-padding-inline:12px;padding-right:14px!important;flex-wrap:nowrap!important}
.teacher .studentstrip .studentchip{flex:0 0 auto!important;white-space:nowrap!important}
.teacher .manageactions{display:flex!important;align-items:stretch!important;gap:6px!important}
.teacher .manageactions button{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.3!important;white-space:nowrap!important;min-width:0!important}
/* Explicit selection mode: no vacant leading squares in normal reading. */
.draft-actions{display:flex!important;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 0!important}
.draft-actions[hidden]{display:none!important}
.draft-actions .select-mode-toggle{padding:4px 12px!important;min-height:32px!important;font-size:12px!important}
.wordrow .draft-check{flex:0 0 18px!important;margin-right:5px!important}
/* Wide add/edit popup and true native document selection. */
#composeExisting[data-native-select]{position:relative!important;opacity:1!important;width:100%!important;height:auto!important;min-height:44px!important;pointer-events:auto!important;padding:10px 32px 10px 12px!important;border:1px solid var(--line)!important;border-radius:10px;background:var(--paper);color:var(--text);font-size:13px;tab-index:0}
#composeExisting[data-native-select] + .select-trigger{display:none!important}
/* Compact right-aligned pencil for examples. */
.quick-detail .example-inline{display:flex;align-items:start;gap:5px;width:100%;min-width:0;margin:3px 0 6px}
.quick-detail .example-inline .detail-example{flex:1;min-width:0;margin:0!important;font-size:13px;line-height:1.75}
.quick-detail .example-inline .example-pencil{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;min-height:32px!important;padding:0!important;border:none!important;background:transparent!important;color:var(--muted)!important;font-size:17px!important;border-radius:7px}
.quick-detail .example-inline .example-pencil:focus-visible{outline:2px solid var(--orange)}
.quick-detail .example-inline rt{font-size:.57em!important;font-weight:400;line-height:1.3}
/* Only the content scrolls in the detailed view. */
#modal.dialog:has(.quick-detail) .detail-scroll{overflow-y:auto;min-height:0}
@media(min-width:800px){#modal.dialog:has(#composeForm){width:min(94vw,1400px)!important;max-width:1400px!important}#modal.dialog:has(#composeForm) #modalBody{max-width:none!important}}
@media(max-width:700px){.workspace-nav{width:calc(100% - 20px)!important;margin-inline:10px!important}.teacher .manageactions button{min-height:38px!important;padding:0 12px!important}}
