@import url('./library-pop.css') layer(libraryPop);
/* The verb-table heading is the common reference for Library section titles. */
/* Menus begin at their content anchor, rather than centring within the viewport. */
html body #vocabulary-dialog[data-university-library] #exercise-view #exercise-catalog:not([hidden]),
html body #vocabulary-dialog[data-university-library] #flashcards-view #fc-dashboard:not([hidden]){align-content:start!important}
html body #vocabulary-dialog[data-university-library]{
 --library-title-font:UniversityActions,CityTiny5,system-ui,sans-serif;
 --library-title-size:clamp(24px,3vw,34px);
 --library-title-ink:#49345f;
 --library-title-inset:calc((100vw - min(100vw,1420px))/2 + clamp(12px,3vw,36px));
 --catalog-top:calc(var(--learning-height) + env(safe-area-inset-top,0px) + 12px + var(--library-title-size) + 16px);
}
html body #vocabulary-dialog[data-university-library] #study-section-title.section-heading{
 position:fixed!important;inset:calc(var(--learning-height) + env(safe-area-inset-top,0px) + 12px) var(--library-title-inset) auto!important;
 display:block!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;
 font:400 var(--library-title-size)/1 var(--library-title-font)!important;
 color:var(--library-title-ink)!important;-webkit-text-fill-color:currentColor!important;-webkit-text-stroke:0!important;text-shadow:none!important;
 text-align:left!important;text-transform:uppercase;letter-spacing:normal;white-space:normal!important;
}
html body #vocabulary-dialog[data-university-library] #verbs-view .verb-heading h1{
 font:400 var(--library-title-size)/1 var(--library-title-font);color:var(--library-title-ink);
}
/* Only the requested Hiragana/Katakana selectors share the verb-table buttons. */
html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs button{
 display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:10px;
 width:100%;min-width:0;min-height:48px;padding:8px 14px;margin:0;
 border:0;border-image:url('/assets/interface-v2/pastel-ui/lavender-normal.png') 4 fill stretch!important;border-image-width:8px!important;
 border-radius:0;background:none!important;box-shadow:none!important;color:#49345f!important;
 font:400 20px/1.1 var(--library-title-font)!important;text-transform:uppercase;
 text-shadow:none!important;-webkit-text-stroke:0;image-rendering:pixelated;transform:none!important;
}
html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs button[aria-pressed=true]{border-image-source:url('/assets/interface-v2/pastel-ui/mint-normal.png')!important}
html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs button:active{translate:0 2px}
html body #vocabulary-dialog[data-university-library] #flashcards-view .fc-stats{grid-template-columns:repeat(5,minmax(0,1fr))!important}
html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-stats>div[data-state=new]{--frame:url('/assets/interface-v2/pastel-ui/paper-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-stats>div[data-state=again]{--frame:url('/assets/interface-v2/pastel-ui/peach-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-stats>div[data-state=hesitant]{--frame:url('/assets/interface-v2/pastel-ui/gold-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-stats>div[data-state=comfortable]{--frame:url('/assets/interface-v2/pastel-ui/blue-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-stats>div[data-state=acquired]{--frame:url('/assets/interface-v2/pastel-ui/mint-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-count{margin:0!important}
html body #vocabulary-dialog[data-university-library] .fc-count-summary{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
html body #vocabulary-dialog[data-university-library] #fc-due-count{font:400 16px/1.2 var(--library-title-font);color:#49345f;white-space:normal}
html body #vocabulary-dialog[data-university-library] #flashcards-view #flashcard-word{font-size:clamp(38px,5vw,48px);color:#191722;-webkit-text-fill-color:#191722;line-height:1.35}
html body #vocabulary-dialog[data-university-library] #flashcards-view .fc-library-word{color:#191722;-webkit-text-fill-color:#191722;font-size:32px}
html body #vocabulary-dialog[data-university-library] #flashcards-view #flashcard-context .target-word{color:#191722!important;background:none;font-weight:700}
html body #vocabulary-dialog[data-university-library] #fc-rating{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
html body #vocabulary-dialog[data-university-library] #fc-rating button,
html body #vocabulary-dialog[data-university-library] #flip-flashcard{
 border:0!important;border-image:var(--fc-action-frame) 4 fill stretch!important;border-image-width:8px!important;
 background:none!important;box-shadow:none!important;border-radius:0;image-rendering:pixelated;
 color:#332945!important;-webkit-text-fill-color:currentColor;text-shadow:none!important;-webkit-text-stroke:0;
 font:400 22px/1.1 var(--library-title-font)!important;text-transform:uppercase;min-height:52px;padding:10px 6px;
}
html body #vocabulary-dialog[data-university-library] #fc-rating button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
html body #vocabulary-dialog[data-university-library] #fc-rating button small{font:400 15px/1 var(--library-title-font);text-transform:none}
html body #vocabulary-dialog[data-university-library] #fc-rating button[data-grade=again]{--fc-action-frame:url('/assets/interface-v2/pastel-ui/peach-normal.png');--fc-action-pressed:url('/assets/interface-v2/pastel-ui/peach-pressed.png')}
html body #vocabulary-dialog[data-university-library] #fc-rating button[data-grade=hesitant]{--fc-action-frame:url('/assets/interface-v2/pastel-ui/gold-normal.png');--fc-action-pressed:url('/assets/interface-v2/pastel-ui/gold-pressed.png')}
html body #vocabulary-dialog[data-university-library] #fc-rating button[data-grade=comfortable]{--fc-action-frame:url('/assets/interface-v2/pastel-ui/blue-normal.png');--fc-action-pressed:url('/assets/interface-v2/pastel-ui/blue-pressed.png')}
html body #vocabulary-dialog[data-university-library] #fc-rating button[data-grade=acquired]{--fc-action-frame:url('/assets/interface-v2/pastel-ui/mint-normal.png');--fc-action-pressed:url('/assets/interface-v2/pastel-ui/mint-pressed.png')}
html body #vocabulary-dialog[data-university-library] #flip-flashcard{--fc-action-frame:url('/assets/interface-v2/pastel-ui/lavender-normal.png');--fc-action-pressed:url('/assets/interface-v2/pastel-ui/lavender-pressed.png')}
html body #vocabulary-dialog[data-university-library] #fc-rating button:active,html body #vocabulary-dialog[data-university-library] #flip-flashcard:active{--fc-action-frame:var(--fc-action-pressed);translate:0 2px}
html body #vocabulary-dialog[data-university-library][data-study-view=flashcards]:is([data-flashcard-mode=review],[data-flashcard-mode=browse],[data-flashcard-mode=setup],[data-flashcard-mode=finished]) #flashcards-view{
 position:fixed;inset:var(--catalog-top) max(14px,calc((100vw - 880px)/2)) var(--catalog-bottom)!important;
 width:auto!important;max-width:none!important;height:calc(100dvh - var(--catalog-top) - var(--catalog-bottom))!important;max-height:none!important;min-height:0;align-self:stretch!important;padding:0!important;margin:0!important;overflow:auto;
}
html body #vocabulary-dialog[data-university-library] #flashcards-view #fc-setup{padding:0;margin:0 auto}
html body #vocabulary-dialog[data-university-library] #fc-setup :is(.setup-choices,.setup-directions){margin-bottom:12px}
html body #vocabulary-dialog[data-university-library] #fc-setup .pixel-button{font:400 20px/1.15 var(--library-title-font);min-height:48px;padding:8px}
html body #vocabulary-dialog[data-university-library] #fc-setup #fc-selected-count{margin:12px 0;font-size:16px}
html body #vocabulary-dialog[data-university-library] #flashcards-view #flashcard-review:not([hidden]){display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px;height:100%;min-height:0;max-width:none;margin:0;overflow:hidden}
html body #vocabulary-dialog[data-university-library] #flashcard-review .flashcard-topline{margin:0;min-height:32px;padding:0;gap:12px}
html body #vocabulary-dialog[data-university-library] #fc-stop-review,
html body #vocabulary-dialog[data-university-library] .fc-finished-actions button{
 border:0!important;border-image:var(--fc-exit-frame) 4 fill stretch!important;border-image-width:8px!important;
 background:none!important;box-shadow:none!important;border-radius:0;image-rendering:pixelated;
 color:#332945!important;-webkit-text-fill-color:currentColor;text-shadow:none!important;-webkit-text-stroke:0;
 font:400 20px/1.1 var(--library-title-font)!important;text-transform:uppercase;padding:10px 12px;min-height:48px;
}
html body #vocabulary-dialog[data-university-library] #fc-stop-review{--fc-exit-frame:url('/assets/interface-v2/pastel-ui/paper-normal.png');min-height:32px;padding:6px 12px;font-size:18px!important}
html body #vocabulary-dialog[data-university-library] #fc-finished:not([hidden]){display:grid;gap:14px;max-width:760px;margin:0 auto;padding:22px}
html body #vocabulary-dialog[data-university-library] #fc-finished :is(h2,p,.fc-session-summary){margin:0}
html body #vocabulary-dialog[data-university-library] #fc-session-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html body #vocabulary-dialog[data-university-library] #fc-session-summary span{min-width:0}
html body #vocabulary-dialog[data-university-library] #fc-finished h2{font:400 30px/1.1 var(--library-title-font);color:var(--library-title-ink);text-shadow:none;-webkit-text-stroke:0}
html body #vocabulary-dialog[data-university-library] .fc-finished-actions{display:grid;gap:10px}
html body #vocabulary-dialog[data-university-library] .fc-finished-actions button{width:100%;min-width:0;max-width:none!important;margin:0!important;white-space:normal}
html body #vocabulary-dialog[data-university-library] #fc-finished-home{--fc-exit-frame:url('/assets/interface-v2/pastel-ui/blue-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-finished-close{--fc-exit-frame:url('/assets/interface-v2/pastel-ui/lavender-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-new-series{--fc-exit-frame:url('/assets/interface-v2/pastel-ui/mint-normal.png')}
html body #vocabulary-dialog[data-university-library] #fc-new-series:disabled{--fc-exit-frame:url('/assets/interface-v2/pastel-ui/paper-normal.png');filter:grayscale(1);opacity:.65;cursor:default}
html body #vocabulary-dialog[data-university-library] :is(#fc-stop-review,.fc-finished-actions button):not(:disabled):active{translate:0 2px}
html body #vocabulary-dialog[data-university-library] #flashcard-review .fc-face{min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px}
html body #vocabulary-dialog[data-university-library] #flashcard-review :is(#flip-flashcard,#fc-rating,#fc-browse-navigation){margin:0}
@media(orientation:landscape) and (max-height:650px){
 html body #vocabulary-dialog[data-university-library] #flashcards-view #flashcard-review:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(230px,.75fr);grid-template-rows:32px auto minmax(0,1fr);gap:8px 16px}
 html body #vocabulary-dialog[data-university-library] #flashcard-review .flashcard-topline{grid-column:1/-1}
 html body #vocabulary-dialog[data-university-library] #flashcard-review .fc-face{grid-column:1;grid-row:2/4;padding:8px 12px}
 html body #vocabulary-dialog[data-university-library] #flashcard-review #flip-flashcard{grid-column:2;grid-row:2;min-height:44px}
 html body #vocabulary-dialog[data-university-library] #flashcard-review :is(#fc-rating,#fc-browse-navigation){grid-column:2;grid-row:3;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:6px}
 html body #vocabulary-dialog[data-university-library] #fc-rating button{font-size:18px!important;min-height:44px;padding:6px}
 html body #vocabulary-dialog[data-university-library] #flashcard-review #fc-browse-note{display:none}
 html body #vocabulary-dialog[data-university-library] #fc-finished:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(220px,1fr);gap:8px 18px;padding:14px}
 html body #vocabulary-dialog[data-university-library] #fc-finished>:not(.fc-finished-actions){grid-column:1}
 html body #vocabulary-dialog[data-university-library] .fc-finished-actions{grid-column:2;grid-row:1/5;align-content:center;gap:6px}
 html body #vocabulary-dialog[data-university-library] .fc-finished-actions button{min-height:44px;padding:6px;font-size:18px!important}
 html body #vocabulary-dialog[data-university-library] #fc-finished h2{font-size:24px}
 html body #vocabulary-dialog[data-university-library] #fc-session-summary{gap:4px}
 html body #vocabulary-dialog[data-university-library] #fc-session-summary span{padding:4px;font-size:15px}
}
@media(max-width:400px){
 html body #vocabulary-dialog[data-university-library] #fc-rating{gap:5px}
 html body #vocabulary-dialog[data-university-library] #fc-rating button{font-size:17px!important;padding:10px 4px}
 html body #vocabulary-dialog[data-university-library] #fc-dashboard .fc-stats dt{font-size:11px!important;white-space:normal!important}
}
@media(max-width:480px) and (max-height:700px) and (orientation:portrait){
 html body #vocabulary-dialog[data-university-library] #fc-finished:not([hidden]){padding:12px;gap:8px}
 html body #vocabulary-dialog[data-university-library] #fc-finished h2{font-size:24px}
 html body #vocabulary-dialog[data-university-library] #fc-session-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 html body #vocabulary-dialog[data-university-library] #fc-session-summary span{padding:6px 4px;font-size:16px;white-space:nowrap}
 html body #vocabulary-dialog[data-university-library] .fc-finished-actions{gap:6px}
 html body #vocabulary-dialog[data-university-library] .fc-finished-actions button{min-height:44px;padding:6px;font-size:18px!important}
 html body #vocabulary-dialog[data-university-library] #fc-next-review{font-size:16px}
}
@media(max-width:359px){html body #vocabulary-dialog[data-university-library][data-study-view=flashcards]:is([data-flashcard-mode=setup],[data-flashcard-mode=review],[data-flashcard-mode=finished]){--library-title-size:20px}}
@media(orientation:landscape) and (max-height:360px){
 html body #vocabulary-dialog[data-university-library] #fc-finished:not([hidden]){padding:10px;gap:6px 16px}
 html body #vocabulary-dialog[data-university-library] #fc-finished h2{font-size:22px}
 html body #vocabulary-dialog[data-university-library] #fc-finished #fc-session-total{font-size:16px;line-height:20px}
 html body #vocabulary-dialog[data-university-library] #fc-finished #fc-next-review{font-size:14px;line-height:18px}
 html body #vocabulary-dialog[data-university-library] #fc-session-summary span{font-size:14px;line-height:18px;padding:3px}
 html body #vocabulary-dialog[data-university-library] #flashcards-view #flashcard-review:not([hidden]){grid-template-rows:28px auto minmax(0,1fr);gap:6px 16px}
 html body #vocabulary-dialog[data-university-library] #flashcard-review .flashcard-topline{min-height:28px;font-size:15px}
 html body #vocabulary-dialog[data-university-library] #fc-stop-review{min-height:28px;font-size:16px!important;padding:4px 10px}
 html body #vocabulary-dialog[data-university-library] #flashcard-review #flip-flashcard{height:44px;padding:8px;min-height:44px}
 html body #vocabulary-dialog[data-university-library] #fc-rating button{height:44px;padding:4px;gap:3px}
}
@media(max-width:699px){html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs button{padding:8px 10px;font-size:18px!important}}
@media(max-width:400px) and (orientation:portrait){html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs button{padding:8px 7px;font-size:15px!important}}
@media(max-height:650px) and (orientation:landscape){
 html body:has(#vocabulary-dialog[data-university-library][open]){--main-key:44px;--main-height:60px;--learning-height:60px}
 html body #vocabulary-dialog[data-university-library]{--library-title-size:22px}
 html body #vocabulary-dialog[data-university-library] #kana-view .library-tabs button{padding-block:4px;font-size:16px!important}
}
@media(max-height:360px) and (orientation:landscape){
 html body #vocabulary-dialog[data-university-library]{--catalog-top:calc(var(--learning-height) + env(safe-area-inset-top,0px) + 12px)}
 html body #vocabulary-dialog[data-university-library] #study-section-title.section-heading{display:none!important}
}
/* Native frame corners stay pixel-exact at their fixed integer enlargement.
   This affects bitmap painting, not the smooth Japanese font glyphs. */
html body #vocabulary-dialog[data-university-library]{image-rendering:pixelated}

/* The shared SRS dashboard has five categories in either entry path. */
#vocabulary-dialog #flashcards-view .fc-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
